Skip to content

Commit 680becb

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-16728
2 parents 4af550e + 16d9788 commit 680becb

File tree

106 files changed

+2735
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2735
-154
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "scalr",
3+
app: "all_voice_lab",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};

components/all_voice_lab/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/all_voice_lab",
3+
"version": "0.0.1",
4+
"description": "Pipedream All Voice Lab Components",
5+
"main": "all_voice_lab.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"all_voice_lab"
9+
],
10+
"homepage": "https://pipedream.com/apps/all_voice_lab",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import bitdefender from "../../bitdefender_gravityzone.app.mjs";
2+
3+
export default {
4+
key: "bitdefender_gravityzone-get-policy-details",
5+
name: "Get Policy Details",
6+
description: "Retrieve details about a specific policy. [See the documentation](https://www.bitdefender.com/business/support/en/77209-135304-getpolicydetails.html)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bitdefender,
11+
policyId: {
12+
propDefinition: [
13+
bitdefender,
14+
"policyId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.bitdefender.getPolicyDetails({
20+
$,
21+
data: {
22+
params: {
23+
policyId: this.policyId,
24+
},
25+
},
26+
});
27+
28+
$.export("$summary", `Successfully retrieved details for policy ${this.policyId}`);
29+
return response;
30+
},
31+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import bitdefender from "../../bitdefender_gravityzone.app.mjs";
2+
3+
export default {
4+
key: "bitdefender_gravityzone-get-scan-task-status",
5+
name: "Get Scan Task Status",
6+
description: "Get the status of a scan task. [See the documentation(https://www.bitdefender.com/business/support/en/77209-440638-gettaskstatus.html)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bitdefender,
11+
taskId: {
12+
propDefinition: [
13+
bitdefender,
14+
"taskId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.bitdefender.getTaskStatus({
20+
$,
21+
data: {
22+
params: {
23+
taskId: this.taskId,
24+
},
25+
},
26+
});
27+
28+
$.export("$summary", `Successfully retrieved status for task ${this.taskId}`);
29+
return response;
30+
},
31+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import bitdefender from "../../bitdefender_gravityzone.app.mjs";
2+
3+
export default {
4+
key: "bitdefender_gravityzone-move-endpoint-to-group",
5+
name: "Move Endpoint to Group",
6+
description: "Move an endpoint to a different group. [See the documentation](https://www.bitdefender.com/business/support/en/77209-128489-moveendpoints.html)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
bitdefender,
11+
endpointId: {
12+
propDefinition: [
13+
bitdefender,
14+
"endpointId",
15+
],
16+
},
17+
groupId: {
18+
propDefinition: [
19+
bitdefender,
20+
"groupId",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const response = await this.bitdefender.moveEndpointToGroup({
26+
$,
27+
data: {
28+
params: {
29+
endpointIds: [
30+
this.endpointId,
31+
],
32+
groupId: this.groupId,
33+
},
34+
},
35+
});
36+
37+
$.export("$summary", `Successfully moved endpoint ${this.endpointId} to group ${this.groupId}`);
38+
return response;
39+
},
40+
};
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import bitdefender from "../../bitdefender_gravityzone.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
3+
4+
export default {
5+
key: "bitdefender_gravityzone-scan-endpoint",
6+
name: "Scan Endpoint",
7+
description: "Trigger a scan on a specific endpoint. [See the documentation](https://www.bitdefender.com/business/support/en/77209-128495-createscantask.html)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
bitdefender,
12+
endpointId: {
13+
propDefinition: [
14+
bitdefender,
15+
"endpointId",
16+
],
17+
},
18+
scanType: {
19+
type: "integer",
20+
label: "Scan Type",
21+
description: "Type of scan to perform",
22+
options: [
23+
{
24+
label: "Quick Scan",
25+
value: 1,
26+
},
27+
{
28+
label: "Full Scan",
29+
value: 2,
30+
},
31+
{
32+
label: "Memory Scan",
33+
value: 3,
34+
},
35+
{
36+
label: "Custom Scan",
37+
value: 4,
38+
},
39+
],
40+
},
41+
name: {
42+
type: "string",
43+
label: "Name",
44+
description: "The name of the task. If the parameter is not passed, the name will be automatically generated.",
45+
optional: true,
46+
},
47+
returnAllTaskIds: {
48+
type: "boolean",
49+
label: "Return All Task IDs",
50+
description: "Indicates if the response will contain the IDs for all the tasks created as a result of the request",
51+
optional: true,
52+
},
53+
scanDepth: {
54+
type: "integer",
55+
label: "Scan Depth",
56+
description: "The scan profile",
57+
options: [
58+
{
59+
label: "Aggressive",
60+
value: 1,
61+
},
62+
{
63+
label: "Normal",
64+
value: 2,
65+
},
66+
{
67+
label: "Permissivearray",
68+
value: 3,
69+
},
70+
],
71+
optional: true,
72+
},
73+
scanPath: {
74+
type: "string[]",
75+
label: "Scan Path",
76+
description: "The list of target paths to be scanned",
77+
optional: true,
78+
},
79+
},
80+
async run({ $ }) {
81+
if ((this.scanDepth || this.scanPath) && this.scanType !== 4) {
82+
throw new ConfigurationError("Scan depth and path can only be used for custom scans");
83+
}
84+
85+
if ((this.scanDepth && !this.scanPath) || (this.scanPath && !this.scanDepth)) {
86+
throw new ConfigurationError("Scan depth and path must be used together");
87+
}
88+
89+
const response = await this.bitdefender.scanEndpoint({
90+
$,
91+
data: {
92+
params: {
93+
targetIds: [
94+
this.endpointId,
95+
],
96+
type: this.scanType,
97+
name: this.name,
98+
returnAllTaskIds: this.returnAllTaskIds,
99+
customScanSettings: this.scanDepth
100+
? {
101+
scanDepth: this.scanDepth,
102+
scanPath: this.scanPath,
103+
}
104+
: undefined,
105+
},
106+
},
107+
});
108+
109+
$.export("$summary", `Successfully initiated ${this.scanType} scan on endpoint ${this.endpointId}`);
110+
return response;
111+
},
112+
};

0 commit comments

Comments
 (0)