@binalyze/air-sdk 5.2.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/air/AIR.d.ts +13 -12
- package/dist/air/AIR.js +1 -0
- package/dist/air/AIR.js.map +1 -1
- package/dist/domains/acquisitions.d.ts +2 -2
- package/dist/domains/acquisitions.js +18 -12
- package/dist/domains/acquisitions.js.map +1 -1
- package/dist/domains/api-tokens.d.ts +2 -2
- package/dist/domains/api-tokens.js +48 -26
- package/dist/domains/api-tokens.js.map +1 -1
- package/dist/domains/assets.d.ts +2 -2
- package/dist/domains/assets.js +121 -62
- package/dist/domains/assets.js.map +1 -1
- package/dist/domains/baseline.d.ts +2 -2
- package/dist/domains/baseline.js +46 -23
- package/dist/domains/baseline.js.map +1 -1
- package/dist/domains/cases.d.ts +2 -2
- package/dist/domains/cases.js +63 -60
- package/dist/domains/cases.js.map +1 -1
- package/dist/domains/index.d.ts +1 -0
- package/dist/domains/index.js +1 -0
- package/dist/domains/index.js.map +1 -1
- package/dist/domains/interact.d.ts +2 -2
- package/dist/domains/interact.js +58 -24
- package/dist/domains/interact.js.map +1 -1
- package/dist/domains/investigation.d.ts +2 -0
- package/dist/domains/investigation.js +118 -0
- package/dist/domains/investigation.js.map +1 -0
- package/dist/domains/organization.d.ts +2 -2
- package/dist/domains/organization.js +160 -49
- package/dist/domains/organization.js.map +1 -1
- package/dist/domains/repositories.d.ts +2 -2
- package/dist/domains/repositories.js +14 -7
- package/dist/domains/repositories.js.map +1 -1
- package/dist/domains/tasks.d.ts +2 -2
- package/dist/domains/tasks.js +28 -23
- package/dist/domains/tasks.js.map +1 -1
- package/dist/domains/triage.d.ts +2 -2
- package/dist/domains/triage.js +101 -23
- package/dist/domains/triage.js.map +1 -1
- package/dist/domains/users.d.ts +2 -2
- package/dist/domains/users.js +16 -9
- package/dist/domains/users.js.map +1 -1
- package/dist/generated/bindings.d.ts +1 -0
- package/dist/generated/bindings.js +1 -0
- package/dist/generated/bindings.js.map +1 -1
- package/dist/sdk/typescript-axios/client/client.gen.js +52 -19
- package/dist/sdk/typescript-axios/client/client.gen.js.map +1 -1
- package/dist/sdk/typescript-axios/client/types.gen.d.ts +14 -12
- package/dist/sdk/typescript-axios/client/utils.gen.d.ts +1 -7
- package/dist/sdk/typescript-axios/client/utils.gen.js +29 -82
- package/dist/sdk/typescript-axios/client/utils.gen.js.map +1 -1
- package/dist/sdk/typescript-axios/client.gen.d.ts +1 -1
- package/dist/sdk/typescript-axios/core/bodySerializer.gen.js +3 -0
- package/dist/sdk/typescript-axios/core/bodySerializer.gen.js.map +1 -1
- package/dist/sdk/typescript-axios/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/sdk/typescript-axios/core/serverSentEvents.gen.js +141 -0
- package/dist/sdk/typescript-axios/core/serverSentEvents.gen.js.map +1 -0
- package/dist/sdk/typescript-axios/core/types.gen.d.ts +12 -12
- package/dist/sdk/typescript-axios/core/utils.gen.d.ts +19 -0
- package/dist/sdk/typescript-axios/core/utils.gen.js +95 -0
- package/dist/sdk/typescript-axios/core/utils.gen.js.map +1 -0
- package/dist/sdk/typescript-axios/index.js +2 -2
- package/dist/sdk/typescript-axios/index.js.map +1 -1
- package/dist/sdk/typescript-axios/sdk.gen.d.ts +177 -28
- package/dist/sdk/typescript-axios/sdk.gen.js +664 -122
- package/dist/sdk/typescript-axios/sdk.gen.js.map +1 -1
- package/dist/sdk/typescript-axios/types.gen.d.ts +4310 -660
- package/dist/types/acquisitions.d.ts +11 -6
- package/dist/types/api-tokens.d.ts +42 -15
- package/dist/types/assets.d.ts +147 -8
- package/dist/types/baseline.d.ts +35 -4
- package/dist/types/cases.d.ts +126 -14
- package/dist/types/common.d.ts +27 -0
- package/dist/types/common.js +3 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/interact.d.ts +61 -8
- package/dist/types/investigation.d.ts +75 -0
- package/dist/types/investigation.js +3 -0
- package/dist/types/investigation.js.map +1 -0
- package/dist/types/organization.d.ts +64 -12
- package/dist/types/organization.js +3 -0
- package/dist/types/organization.js.map +1 -1
- package/dist/types/repositories.d.ts +19 -3
- package/dist/types/repositories.js +1 -0
- package/dist/types/repositories.js.map +1 -1
- package/dist/types/tasks.d.ts +124 -6
- package/dist/types/triage.d.ts +46 -10
- package/dist/types/users.d.ts +19 -3
- package/dist/types/users.js +1 -0
- package/dist/types/users.js.map +1 -1
- package/dist/utils/builders.d.ts +26 -0
- package/dist/utils/builders.js +85 -0
- package/dist/utils/builders.js.map +1 -0
- package/dist/utils/error-helpers.d.ts +6 -0
- package/dist/utils/error-helpers.js +109 -0
- package/dist/utils/error-helpers.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/result.d.ts +2 -0
- package/dist/utils/result.js +19 -0
- package/dist/utils/result.js.map +1 -0
- package/dist/utils/utils.d.ts +29 -0
- package/dist/utils/utils.js +82 -0
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/domains/cases.js
CHANGED
|
@@ -2,92 +2,95 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createCasesAPI = createCasesAPI;
|
|
4
4
|
const bindings_1 = require("../generated/bindings");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const utils_2 = require("../utils");
|
|
5
7
|
function createCasesAPI() {
|
|
6
8
|
return {
|
|
7
|
-
checkName: async (
|
|
9
|
+
checkName: async (options) => {
|
|
8
10
|
const res = await (0, bindings_1.casesCheckName)({
|
|
9
|
-
query: { name },
|
|
11
|
+
query: { name: options.name },
|
|
10
12
|
});
|
|
11
|
-
return
|
|
13
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
12
14
|
},
|
|
13
|
-
get: async (
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return res?.data ?? res;
|
|
15
|
+
get: async (options) => {
|
|
16
|
+
const request = { path: { id: options.id } };
|
|
17
|
+
const res = await (0, bindings_1.casesGet)(request);
|
|
18
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
18
19
|
},
|
|
19
|
-
getMany: async (
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
getMany: async (options) => {
|
|
21
|
+
const query = (0, utils_2.buildCasesGetManyQuery)(options);
|
|
22
|
+
const res = await (0, bindings_1.casesGetMany)({ query });
|
|
23
|
+
return (0, utils_1.normalizePage)(res, (entity) => {
|
|
24
|
+
const current = entity;
|
|
25
|
+
const rawOptions = current?.data?.options;
|
|
26
|
+
const organizationIds = rawOptions && typeof rawOptions === 'object' && Array.isArray(rawOptions.organizationIds)
|
|
27
|
+
? (rawOptions.organizationIds ?? undefined)
|
|
28
|
+
: undefined;
|
|
29
|
+
const organizationId = organizationIds?.length ? organizationIds[0] : undefined;
|
|
30
|
+
return {
|
|
31
|
+
...current,
|
|
32
|
+
data: {
|
|
33
|
+
...(current?.data ?? {}),
|
|
34
|
+
organizationIds,
|
|
35
|
+
organizationId,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
26
38
|
});
|
|
27
|
-
return res?.data ?? res;
|
|
28
39
|
},
|
|
29
|
-
changeOwner: async (
|
|
40
|
+
changeOwner: async (options) => {
|
|
30
41
|
const res = await (0, bindings_1.casesChangeOwner)({
|
|
31
|
-
path: { id },
|
|
32
|
-
body: { newOwnerId },
|
|
42
|
+
path: { id: options.id },
|
|
43
|
+
body: { newOwnerId: options.newOwnerId },
|
|
33
44
|
});
|
|
34
|
-
return
|
|
45
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
35
46
|
},
|
|
36
|
-
close: async (
|
|
47
|
+
close: async (options) => {
|
|
37
48
|
const res = await (0, bindings_1.casesClose)({
|
|
38
|
-
path: { id },
|
|
49
|
+
path: { id: options.id },
|
|
39
50
|
});
|
|
40
|
-
return
|
|
51
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
41
52
|
},
|
|
42
|
-
create: async (
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
create: async (options) => {
|
|
54
|
+
const input = options.input;
|
|
55
|
+
const body = {
|
|
56
|
+
...input,
|
|
57
|
+
organizationId: typeof input.organizationId === 'number' ? input.organizationId : 0,
|
|
58
|
+
visibility: input.visibility ?? 'public-to-organization',
|
|
59
|
+
};
|
|
60
|
+
const res = await (0, bindings_1.casesCreate)({ body: body });
|
|
61
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
47
62
|
},
|
|
48
|
-
getActivities: async (
|
|
63
|
+
getActivities: async (options) => {
|
|
64
|
+
const query = (0, utils_2.buildCasesGetActivitiesQuery)(options);
|
|
49
65
|
const res = await (0, bindings_1.casesGetActivities)({
|
|
50
|
-
path: { id },
|
|
51
|
-
query
|
|
52
|
-
pageNumber,
|
|
53
|
-
pageSize,
|
|
54
|
-
filter,
|
|
55
|
-
},
|
|
66
|
+
path: { id: options.id },
|
|
67
|
+
query,
|
|
56
68
|
});
|
|
57
|
-
return
|
|
69
|
+
return (0, utils_1.normalizePage)(res);
|
|
58
70
|
},
|
|
59
|
-
getEndpoints: async (
|
|
71
|
+
getEndpoints: async (options) => {
|
|
72
|
+
const query = (0, utils_2.buildCasesGetEndpointsQuery)(options);
|
|
60
73
|
const res = await (0, bindings_1.casesGetEndpoints)({
|
|
61
|
-
path: { id },
|
|
62
|
-
query
|
|
63
|
-
pageNumber,
|
|
64
|
-
pageSize,
|
|
65
|
-
filter,
|
|
66
|
-
},
|
|
74
|
+
path: { id: options.id },
|
|
75
|
+
query,
|
|
67
76
|
});
|
|
68
|
-
return
|
|
77
|
+
return (0, utils_1.normalizePage)(res);
|
|
69
78
|
},
|
|
70
|
-
getTasks: async (
|
|
79
|
+
getTasks: async (options) => {
|
|
80
|
+
const query = (0, utils_2.buildCasesGetTasksQuery)(options);
|
|
71
81
|
const res = await (0, bindings_1.casesGetTasks)({
|
|
72
|
-
path: { id },
|
|
73
|
-
query
|
|
74
|
-
pageNumber,
|
|
75
|
-
pageSize,
|
|
76
|
-
filter,
|
|
77
|
-
},
|
|
82
|
+
path: { id: options.id },
|
|
83
|
+
query,
|
|
78
84
|
});
|
|
79
|
-
return res
|
|
85
|
+
return (0, utils_1.normalizePage)(res, (entity) => entity);
|
|
80
86
|
},
|
|
81
|
-
getUsers: async (
|
|
87
|
+
getUsers: async (options) => {
|
|
88
|
+
const query = (0, utils_2.buildCasesGetUsersQuery)(options);
|
|
82
89
|
const res = await (0, bindings_1.casesGetUsers)({
|
|
83
|
-
path: { id },
|
|
84
|
-
query
|
|
85
|
-
pageNumber,
|
|
86
|
-
pageSize,
|
|
87
|
-
filter,
|
|
88
|
-
},
|
|
90
|
+
path: { id: options.id },
|
|
91
|
+
query,
|
|
89
92
|
});
|
|
90
|
-
return
|
|
93
|
+
return (0, utils_1.normalizePage)(res);
|
|
91
94
|
},
|
|
92
95
|
};
|
|
93
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cases.js","sourceRoot":"","sources":["../../src/domains/cases.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cases.js","sourceRoot":"","sources":["../../src/domains/cases.ts"],"names":[],"mappings":";;AA0CA,wCAiHC;AA7ID,oDAwB+B;AAC/B,oCAAyD;AACzD,oCAA+J;AAE/J,SAAgB,cAAc;IAC5B,OAAO;QACL,SAAS,EAAE,KAAK,EAAE,OAAyB,EAAoB,EAAE;YAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAc,EAAC;gBAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAiC;aAC7D,CAAC,CAAC;YACH,OAAO,IAAA,sBAAc,EAAU,GAAG,CAAC,CAAC;QACtC,CAAC;QACD,GAAG,EAAE,KAAK,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,CAAC;QACD,YAAY,EAAE,KAAK,EAAE,OAKpB,EAAwB,EAAE;YACzB,MAAM,KAAK,GAAG,IAAA,mCAA2B,EAAC,OAAO,CAAC,CAAC;YACnD,MAAM,GAAG,GAAG,MAAM,IAAA,4BAAiB,EAAC;gBAClC,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAmC;gBACzD,KAAK;aACN,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAAmC,GAAG,CAAC,CAAC;QAC9D,CAAC;QACD,QAAQ,EAAE,KAAK,EAAE,OAKhB,EAAiC,EAAE;YAClC,MAAM,KAAK,GAAG,IAAA,+BAAuB,EAAC,OAAO,CAAC,CAAC;YAC/C,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAa,EAAC;gBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAA+B;gBACrD,KAAK;aACN,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAClB,GAAG,EACH,CAAC,MAAM,EAAE,EAAE,CAAC,MAA+B,CAC5C,CAAC;QACJ,CAAC;QACD,QAAQ,EAAE,KAAK,EAAE,OAKhB,EAA2B,EAAE;YAC5B,MAAM,KAAK,GAAG,IAAA,+BAAuB,EAAC,OAAO,CAAC,CAAC;YAC/C,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAa,EAAC;gBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAA+B;gBACrD,KAAK;aACN,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAAkC,GAAG,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/domains/index.d.ts
CHANGED
package/dist/domains/index.js
CHANGED
|
@@ -25,4 +25,5 @@ __exportStar(require("./organization"), exports);
|
|
|
25
25
|
__exportStar(require("./repositories"), exports);
|
|
26
26
|
__exportStar(require("./tasks"), exports);
|
|
27
27
|
__exportStar(require("./triage"), exports);
|
|
28
|
+
__exportStar(require("./investigation"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,iDAA+B;AAC/B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,iDAA+B;AAC/B,iDAA+B;AAC/B,0CAAwB;AACxB,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,iDAA+B;AAC/B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,iDAA+B;AAC/B,iDAA+B;AAC/B,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function createInteractAPI():
|
|
1
|
+
import { IInteractAPI } from '../types';
|
|
2
|
+
export declare function createInteractAPI(): IInteractAPI;
|
package/dist/domains/interact.js
CHANGED
|
@@ -2,55 +2,89 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createInteractAPI = createInteractAPI;
|
|
4
4
|
const bindings_1 = require("../generated/bindings");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
5
6
|
function createInteractAPI() {
|
|
6
7
|
return {
|
|
7
8
|
getCommands: async () => {
|
|
8
9
|
const res = await (0, bindings_1.interactCommandsGetMany)();
|
|
9
|
-
return
|
|
10
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
10
11
|
},
|
|
11
|
-
createShellSession: async (
|
|
12
|
+
createShellSession: async (options) => {
|
|
12
13
|
const res = await (0, bindings_1.interactShellAssignTask)({
|
|
13
|
-
body:
|
|
14
|
-
assetId,
|
|
15
|
-
caseId,
|
|
16
|
-
taskName,
|
|
17
|
-
...(taskConfig ? { taskConfig } : {}),
|
|
18
|
-
},
|
|
14
|
+
body: options,
|
|
19
15
|
});
|
|
20
|
-
return
|
|
16
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
21
17
|
},
|
|
22
|
-
|
|
18
|
+
executeCommand: async ({ sessionId, command, accept }) => {
|
|
23
19
|
const res = await (0, bindings_1.interactSessionExecuteCommand)({
|
|
24
20
|
path: { sessionId },
|
|
25
|
-
body: {
|
|
21
|
+
body: {
|
|
22
|
+
command,
|
|
23
|
+
...(accept ? { accept } : {}),
|
|
24
|
+
},
|
|
26
25
|
});
|
|
27
|
-
return
|
|
26
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
28
27
|
},
|
|
29
|
-
executeAsyncCommand: async (sessionId, command) => {
|
|
28
|
+
executeAsyncCommand: async ({ sessionId, command, accept }) => {
|
|
30
29
|
const res = await (0, bindings_1.interactSessionExecuteAsyncCommand)({
|
|
31
30
|
path: { sessionId },
|
|
32
|
-
body: {
|
|
31
|
+
body: {
|
|
32
|
+
command,
|
|
33
|
+
...(accept ? { accept } : {}),
|
|
34
|
+
},
|
|
33
35
|
});
|
|
34
|
-
return
|
|
36
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
35
37
|
},
|
|
36
|
-
getCommandMessage: async (sessionId, messageId) => {
|
|
38
|
+
getCommandMessage: async ({ sessionId, messageId }) => {
|
|
37
39
|
const res = await (0, bindings_1.interactSessionGetCommandMessage)({
|
|
38
40
|
path: { sessionId, messageId },
|
|
39
41
|
});
|
|
40
|
-
return
|
|
42
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
41
43
|
},
|
|
42
|
-
interruptCommand: async (sessionId, messageId) => {
|
|
44
|
+
interruptCommand: async ({ sessionId, messageId }) => {
|
|
43
45
|
const res = await (0, bindings_1.interactSessionInterruptCommand)({
|
|
44
46
|
path: { sessionId, messageId },
|
|
45
47
|
});
|
|
46
|
-
return
|
|
48
|
+
return (0, utils_1.unwrapResponse)(res);
|
|
47
49
|
},
|
|
48
|
-
closeSession: async (sessionId) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
closeSession: async ({ sessionId }) => {
|
|
51
|
+
try {
|
|
52
|
+
const res = await (0, bindings_1.interactSessionClose)({
|
|
53
|
+
path: { sessionId },
|
|
54
|
+
});
|
|
55
|
+
const status = (0, utils_1.extractStatusCode)(res, 200);
|
|
56
|
+
const payload = (0, utils_1.unwrapResponse)(res);
|
|
57
|
+
const success = (0, utils_1.isSuccessPayloadOrStatus)(payload, status);
|
|
58
|
+
const derivedSessionId = readSessionId(payload) ?? sessionId;
|
|
59
|
+
const message = success ? undefined : (0, utils_1.extractErrorMessage)(payload) || undefined;
|
|
60
|
+
const result = {
|
|
61
|
+
success,
|
|
62
|
+
sessionId: derivedSessionId,
|
|
63
|
+
statusCode: status,
|
|
64
|
+
...(message ? { message } : {}),
|
|
65
|
+
};
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
const status = (0, utils_1.extractStatusCode)(error, 500);
|
|
70
|
+
const message = (0, utils_1.extractErrorMessage)(error) || 'Failed to close session';
|
|
71
|
+
const failure = {
|
|
72
|
+
success: false,
|
|
73
|
+
sessionId,
|
|
74
|
+
statusCode: status,
|
|
75
|
+
message,
|
|
76
|
+
};
|
|
77
|
+
return failure;
|
|
78
|
+
}
|
|
53
79
|
},
|
|
54
80
|
};
|
|
55
81
|
}
|
|
82
|
+
function readSessionId(payload) {
|
|
83
|
+
if (!payload || typeof payload !== 'object') {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
const record = payload;
|
|
87
|
+
const candidate = record.sessionId ?? record.id;
|
|
88
|
+
return typeof candidate === 'string' ? candidate : undefined;
|
|
89
|
+
}
|
|
56
90
|
//# sourceMappingURL=interact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interact.js","sourceRoot":"","sources":["../../src/domains/interact.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"interact.js","sourceRoot":"","sources":["../../src/domains/interact.ts"],"names":[],"mappings":";;AA4BA,8CAiFC;AA7FD,oDAQ+B;AAE/B,oCAA4G;AAE5G,SAAgB,iBAAiB;IAC/B,OAAO;QACL,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,MAAM,GAAG,GAAG,MAAM,IAAA,kCAAuB,GAAE,CAAC;YAC5C,OAAO,IAAA,sBAAc,EAAqB,GAAG,CAAC,CAAC;QACjD,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAA0C,EAAE,EAAE;YACvE,MAAM,GAAG,GAAG,MAAM,IAAA,kCAAuB,EAAC;gBACxC,IAAI,EAAE,OAA8C;aACrD,CAAC,CAAC;YAEH,OAAO,IAAA,sBAAc,EAAuB,GAAG,CAAC,CAAC;QACnD,CAAC;QACD,cAAc,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAiC,EAAE,EAAE;YACtF,MAAM,GAAG,GAAG,MAAM,IAAA,wCAA6B,EAAC;gBAC9C,IAAI,EAAE,EAAE,SAAS,EAAE;gBACnB,IAAI,EAAE;oBACJ,OAAO;oBACP,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9B;aACF,CAAC,CAAC;YAEH,OAAO,IAAA,sBAAc,EAAiC,GAAG,CAAC,CAAC;QAC7D,CAAC;QACD,mBAAmB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAsC,EAAE,EAAE;YAChG,MAAM,GAAG,GAAG,MAAM,IAAA,6CAAkC,EAAC;gBACnD,IAAI,EAAE,EAAE,SAAS,EAAE;gBACnB,IAAI,EAAE;oBACJ,OAAO;oBACP,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EA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,SAAS,CAAC;gBAEhF,MAAM,MAAM,GAAwB;oBAClC,OAAO;oBACP,SAAS,EAAE,gBAAgB;oBAC3B,UAAU,EAAE,MAAM;oBAClB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAChC,CAAC;gBACF,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACxB,MAAM,MAAM,GAAG,IAAA,yBAAiB,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC;gBAC7C,MAAM,OAAO,GAAG,IAAA,2BAAmB,EAAC,KAAK,CAAC,IAAI,yBAAyB,CAAC;gBACxE,MAAM,OAAO,GAAwB;oBACnC,OAAO,EAAE,KAAK;oBACd,SAAS;oBACT,UAAU,EAAE,MAAM;oBAClB,OAAO;iBACR,CAAC;gBACF,OAAO,OAAO,CAAC;YACjB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,OAAgB;IACrC,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,OAAkC,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,CAAC;IAChD,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createInvestigationHubAPI = createInvestigationHubAPI;
|
|
4
|
+
const bindings_1 = require("../generated/bindings");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function createInvestigationHubAPI() {
|
|
7
|
+
return {
|
|
8
|
+
getFindingsStructure: async (options) => {
|
|
9
|
+
const res = await (0, bindings_1.investigationGetFindingDataStructure)({
|
|
10
|
+
path: { investigationId: options.investigationId },
|
|
11
|
+
});
|
|
12
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
13
|
+
return (dto && dto.result) ? dto.result : dto;
|
|
14
|
+
},
|
|
15
|
+
getFindings: async (options) => {
|
|
16
|
+
const resolvedAssignmentIds = await resolveAssignmentIds(options.investigationId, options.assignmentIds ?? options.includedEndpointIds);
|
|
17
|
+
const globalFilter = buildGlobalFilter({ assignmentIds: resolvedAssignmentIds });
|
|
18
|
+
const body = {
|
|
19
|
+
globalFilter,
|
|
20
|
+
filter: options.filter ?? [{ column: 'section', operator: '!=', value: '__never__' }],
|
|
21
|
+
onlyExcludedFindings: options.onlyExcludedFindings,
|
|
22
|
+
skip: options.skip,
|
|
23
|
+
take: options.take,
|
|
24
|
+
sort: options.sort,
|
|
25
|
+
};
|
|
26
|
+
const res = await (0, bindings_1.investigationFilterEndpointFindings)({
|
|
27
|
+
path: { investigationId: options.investigationId },
|
|
28
|
+
body,
|
|
29
|
+
});
|
|
30
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
31
|
+
return (dto && dto.result) ? dto.result : dto;
|
|
32
|
+
},
|
|
33
|
+
getFindingsSummary: async (options) => {
|
|
34
|
+
const resolvedAssignmentIds = await resolveAssignmentIds(options.investigationId, options.assignmentIds ?? options.includedEndpointIds);
|
|
35
|
+
const globalFilter = buildGlobalFilter({ ...options, assignmentIds: resolvedAssignmentIds });
|
|
36
|
+
const res = await (0, bindings_1.investigationGetFindingsSummary)({
|
|
37
|
+
path: { investigationId: options.investigationId },
|
|
38
|
+
body: { globalFilter },
|
|
39
|
+
});
|
|
40
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
41
|
+
return (dto && dto.result) ? dto.result : dto;
|
|
42
|
+
},
|
|
43
|
+
getMitreMatches: async (options) => {
|
|
44
|
+
const resolvedAssignmentIds = await resolveAssignmentIds(options.investigationId, options.assignmentIds ?? options.includedEndpointIds);
|
|
45
|
+
const globalFilter = buildGlobalFilter({ ...options, assignmentIds: resolvedAssignmentIds });
|
|
46
|
+
const res = await (0, bindings_1.investigationGetMitreMatches)({
|
|
47
|
+
path: { investigationId: options.investigationId },
|
|
48
|
+
body: { globalFilter },
|
|
49
|
+
});
|
|
50
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
51
|
+
return ((dto && dto.result) ? dto.result : dto);
|
|
52
|
+
},
|
|
53
|
+
getActivities: async (options) => {
|
|
54
|
+
const res = await (0, bindings_1.investigationActivityFilter)({
|
|
55
|
+
path: { investigationId: options.investigationId },
|
|
56
|
+
query: {
|
|
57
|
+
filter: {
|
|
58
|
+
allUsers: true,
|
|
59
|
+
unread: false,
|
|
60
|
+
...(options.filter ?? {}),
|
|
61
|
+
},
|
|
62
|
+
pageNumber: options.pageNumber ?? 1,
|
|
63
|
+
pageSize: options.pageSize ?? 20,
|
|
64
|
+
sortBy: options.sortBy ?? 'createdAt',
|
|
65
|
+
sortType: options.sortType ?? 'DESC',
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
69
|
+
const data = (dto && dto.result) ? dto.result : dto;
|
|
70
|
+
return (0, utils_1.normalizePage)(data);
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function buildGlobalFilter(options) {
|
|
75
|
+
const assignmentIds = options.assignmentIds ?? options.includedEndpointIds;
|
|
76
|
+
const globalFilter = {};
|
|
77
|
+
if (Array.isArray(assignmentIds) && assignmentIds.length > 0) {
|
|
78
|
+
globalFilter.assignmentIds = assignmentIds;
|
|
79
|
+
}
|
|
80
|
+
if (options.findingTypes)
|
|
81
|
+
globalFilter.findingTypes = options.findingTypes;
|
|
82
|
+
if (options.flagIds)
|
|
83
|
+
globalFilter.flagIds = options.flagIds;
|
|
84
|
+
if (options.findingCreatedBy)
|
|
85
|
+
globalFilter.findingCreatedBy = options.findingCreatedBy;
|
|
86
|
+
if (options.mitreTechniqueIds)
|
|
87
|
+
globalFilter.mitreTechniqueIds = options.mitreTechniqueIds;
|
|
88
|
+
if (options.mitreTacticIds)
|
|
89
|
+
globalFilter.mitreTacticIds = options.mitreTacticIds;
|
|
90
|
+
if (options.dateTimeRange)
|
|
91
|
+
globalFilter.dateTimeRange = options.dateTimeRange;
|
|
92
|
+
return globalFilter;
|
|
93
|
+
}
|
|
94
|
+
async function resolveAssignmentIds(investigationId, candidate) {
|
|
95
|
+
if (Array.isArray(candidate) && candidate.length > 0)
|
|
96
|
+
return candidate;
|
|
97
|
+
// Fallback: fetch all assignmentIds for the investigation
|
|
98
|
+
const res = await (0, bindings_1.investigationGetAssetsByInvestigationId)({
|
|
99
|
+
path: { investigationId },
|
|
100
|
+
});
|
|
101
|
+
const dto = (0, utils_1.unwrapResponse)(res);
|
|
102
|
+
const data = (dto && dto.result) ? dto.result : dto;
|
|
103
|
+
if (!Array.isArray(data))
|
|
104
|
+
return undefined;
|
|
105
|
+
const ids = [];
|
|
106
|
+
for (const platformGroup of data) {
|
|
107
|
+
const assets = platformGroup?.assets ?? [];
|
|
108
|
+
for (const asset of assets) {
|
|
109
|
+
const tasks = asset?.tasks ?? [];
|
|
110
|
+
for (const t of tasks) {
|
|
111
|
+
if (typeof t?._id === 'string')
|
|
112
|
+
ids.push(t._id);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return ids.length > 0 ? ids : undefined;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=investigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigation.js","sourceRoot":"","sources":["../../src/domains/investigation.ts"],"names":[],"mappings":";;AA0BA,8DA4EC;AA5FD,oDAa+B;AAC/B,oCAAyD;AAEzD,SAAgB,yBAAyB;IACvC,OAAO;QACL,oBAAoB,EAAE,KAAK,EAAE,OAAqC,EAAE,EAAE;YACpE,MAAM,GAAG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AAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC;YACjC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;gBACtB,IAAI,OAAO,CAAC,EAAE,GAAG,KAAK,QAAQ;oBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function createOrganizationAPI():
|
|
1
|
+
import { IOrganizationAPI } from '../types';
|
|
2
|
+
export declare function createOrganizationAPI(): IOrganizationAPI;
|