@crowdstrike/foundry-js 0.6.1 → 0.7.0
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/abstraction/collection.d.ts +4 -4
- package/dist/abstraction/logscale.d.ts +2 -2
- package/dist/apis/available-apis.d.ts +1 -8
- package/dist/apis/public-api.d.ts +1 -8
- package/dist/apis/remote-response/index.d.ts +15 -15
- package/dist/apis/types-response-for.d.ts +1 -8
- package/dist/apis/types.d.ts +1 -8
- package/dist/bridge.d.ts +2 -2
- package/dist/index.js +1 -10
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
@@ -12,9 +12,9 @@ export declare class Collection<DATA extends LocalData = LocalData> {
|
|
12
12
|
private readonly falcon;
|
13
13
|
private readonly definition;
|
14
14
|
constructor(falcon: FalconApi<DATA>, definition: CollectionDefinition);
|
15
|
-
write(key: string, data: Record<string, unknown>): Promise<
|
16
|
-
read(key: string): Promise<
|
17
|
-
delete(key: string): Promise<
|
18
|
-
search({ startKey, endKey, limit }: CollectionSearchDefinition): Promise<
|
15
|
+
write(key: string, data: Record<string, unknown>): Promise<unknown>;
|
16
|
+
read(key: string): Promise<unknown>;
|
17
|
+
delete(key: string): Promise<unknown>;
|
18
|
+
search({ startKey, endKey, limit }: CollectionSearchDefinition): Promise<unknown>;
|
19
19
|
}
|
20
20
|
export {};
|
@@ -8,7 +8,7 @@ interface WriteProperties {
|
|
8
8
|
export declare class Logscale<DATA extends LocalData = LocalData> {
|
9
9
|
private readonly falcon;
|
10
10
|
constructor(falcon: FalconApi<DATA>);
|
11
|
-
write(data: LogscaleRequestMessage['payload']['data'], properties: WriteProperties): Promise<
|
12
|
-
query(data: LogscaleRequestMessage['payload']['data']): Promise<
|
11
|
+
write(data: LogscaleRequestMessage['payload']['data'], properties: WriteProperties): Promise<unknown>;
|
12
|
+
query(data: LogscaleRequestMessage['payload']['data']): Promise<unknown>;
|
13
13
|
}
|
14
14
|
export {};
|
@@ -1,15 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
*
|
3
|
-
* This file is autogenerated
|
3
|
+
* This file is autogenerated.
|
4
4
|
*
|
5
5
|
* DO NOT EDIT DIRECTLY
|
6
6
|
*
|
7
|
-
* If you need to change the contents of this file please edit the above configuration file and
|
8
|
-
* then run:
|
9
|
-
*
|
10
|
-
* ```
|
11
|
-
* yarn cs-gen platform-apis
|
12
|
-
* ```
|
13
|
-
*
|
14
7
|
**/
|
15
8
|
export type ApiIdentifier = 'actors' | 'alerts' | 'detects' | 'devices' | 'fwmgr' | 'incidents' | 'mitre' | 'plugins' | 'remoteResponse' | 'workflows' | 'customobjects' | 'faasGateway' | 'loggingapi';
|
@@ -1,16 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
*
|
3
|
-
* This file is autogenerated
|
3
|
+
* This file is autogenerated.
|
4
4
|
*
|
5
5
|
* DO NOT EDIT DIRECTLY
|
6
6
|
*
|
7
|
-
* If you need to change the contents of this file please edit the above configuration file and
|
8
|
-
* then run:
|
9
|
-
*
|
10
|
-
* ```
|
11
|
-
* yarn cs-gen platform-apis
|
12
|
-
* ```
|
13
|
-
*
|
14
7
|
**/
|
15
8
|
import { ActorsApiBridge } from './actors';
|
16
9
|
import { AlertsApiBridge } from './alerts';
|
@@ -22,6 +22,15 @@ export interface GetEntitiesAppCommandV1RequestMessage extends BaseApiRequestMes
|
|
22
22
|
api: RemoteResponseRequestApi;
|
23
23
|
method: 'getEntitiesAppCommandV1';
|
24
24
|
}
|
25
|
+
export interface GetEntitiesPutFilesV2QueryParams extends BaseUrlParams {
|
26
|
+
ids: QueryParam;
|
27
|
+
}
|
28
|
+
export type GetEntitiesPutFilesV2ApiResponse = ApiResponsePayload;
|
29
|
+
export type GetEntitiesPutFilesV2ResponseMessage = BaseApiResponseMessage<GetEntitiesPutFilesV2ApiResponse>;
|
30
|
+
export interface GetEntitiesPutFilesV2RequestMessage extends BaseApiRequestMessage<GetEntitiesPutFilesV2QueryParams> {
|
31
|
+
api: RemoteResponseRequestApi;
|
32
|
+
method: 'getEntitiesPutFilesV2';
|
33
|
+
}
|
25
34
|
export interface GetQueriesPutFilesV1QueryParams extends BaseUrlParams {
|
26
35
|
filter?: string;
|
27
36
|
limit?: QueryParam;
|
@@ -78,23 +87,14 @@ export interface PostEntitiesAppSessionsV1RequestMessage extends BaseApiRequestM
|
|
78
87
|
api: RemoteResponseRequestApi;
|
79
88
|
method: 'postEntitiesAppSessionsV1';
|
80
89
|
}
|
81
|
-
export type
|
82
|
-
export type
|
83
|
-
export interface
|
84
|
-
}
|
85
|
-
export type PostEntitiesPutFilesGetV1ResponseMessage = BaseApiResponseMessage<PostEntitiesPutFilesGetV1ApiResponse>;
|
86
|
-
export interface PostEntitiesPutFilesGetV1RequestMessage extends BaseApiRequestMessage<PostEntitiesPutFilesGetV1QueryParams, PostEntitiesPutFilesGetV1PostData> {
|
87
|
-
api: RemoteResponseRequestApi;
|
88
|
-
method: 'postEntitiesPutFilesGetV1';
|
89
|
-
}
|
90
|
-
export type PostEntitiesPutFilesV1QueryParams = BaseUrlParams;
|
91
|
-
export type PostEntitiesPutFilesV1ApiResponse = ApiResponsePayload;
|
92
|
-
export interface PostEntitiesPutFilesV1PostData {
|
90
|
+
export type PostEntitiesPutFilesV2QueryParams = BaseUrlParams;
|
91
|
+
export type PostEntitiesPutFilesV2ApiResponse = ApiResponsePayload;
|
92
|
+
export interface PostEntitiesPutFilesV2PostData {
|
93
93
|
}
|
94
|
-
export type
|
95
|
-
export interface
|
94
|
+
export type PostEntitiesPutFilesV2ResponseMessage = BaseApiResponseMessage<PostEntitiesPutFilesV2ApiResponse>;
|
95
|
+
export interface PostEntitiesPutFilesV2RequestMessage extends BaseApiRequestMessage<PostEntitiesPutFilesV2QueryParams, PostEntitiesPutFilesV2PostData> {
|
96
96
|
api: RemoteResponseRequestApi;
|
97
|
-
method: '
|
97
|
+
method: 'postEntitiesPutFilesV2';
|
98
98
|
}
|
99
99
|
export type PostEntitiesScriptsGetV2QueryParams = BaseUrlParams;
|
100
100
|
export type PostEntitiesScriptsGetV2ApiResponse = ApiResponsePayload;
|
@@ -1,16 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
*
|
3
|
-
* This file is autogenerated
|
3
|
+
* This file is autogenerated.
|
4
4
|
*
|
5
5
|
* DO NOT EDIT DIRECTLY
|
6
6
|
*
|
7
|
-
* If you need to change the contents of this file please edit the above configuration file and
|
8
|
-
* then run:
|
9
|
-
*
|
10
|
-
* ```
|
11
|
-
* yarn cs-gen platform-apis
|
12
|
-
* ```
|
13
|
-
*
|
14
7
|
**/
|
15
8
|
import type { RequestMessage } from '../types';
|
16
9
|
import type { GetEntitiesActorsGetV2RequestMessage as Request00, GetQueriesActorsV2RequestMessage as Request01, PostAggregatesActorsGetV2RequestMessage as Request02, PostEntitiesActorsGetV2RequestMessage as Request03, PostEntitiesMitreV1RequestMessage as Request04, GetEntitiesActorsGetV2ResponseMessage as Response00, GetQueriesActorsV2ResponseMessage as Response01, PostAggregatesActorsGetV2ResponseMessage as Response02, PostEntitiesActorsGetV2ResponseMessage as Response03, PostEntitiesMitreV1ResponseMessage as Response04 } from './actors';
|
package/dist/apis/types.d.ts
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
*
|
3
|
-
* This file is autogenerated
|
3
|
+
* This file is autogenerated.
|
4
4
|
*
|
5
5
|
* DO NOT EDIT DIRECTLY
|
6
6
|
*
|
7
|
-
* If you need to change the contents of this file please edit the above configuration file and
|
8
|
-
* then run:
|
9
|
-
*
|
10
|
-
* ```
|
11
|
-
* yarn cs-gen platform-apis
|
12
|
-
* ```
|
13
|
-
*
|
14
7
|
**/
|
15
8
|
import { ActorsApiRequestMessage, ActorsApiResponseMessage } from './actors';
|
16
9
|
import { AlertsApiRequestMessage, AlertsApiResponseMessage } from './alerts';
|
package/dist/bridge.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { BroadcastMessage, DataUpdateMessage, LivereloadMessage, LocalData, RequestMessage, UnidirectionalRequestMessage } from './types';
|
1
|
+
import type { BroadcastMessage, DataUpdateMessage, LivereloadMessage, LocalData, PayloadOf, RequestMessage, ResponseFor, UnidirectionalRequestMessage } from './types';
|
2
2
|
interface BridgeOptions<DATA extends LocalData> {
|
3
3
|
onDataUpdate?: (event: DataUpdateMessage<DATA>) => void;
|
4
4
|
onBroadcast?: (event: BroadcastMessage) => void;
|
@@ -14,7 +14,7 @@ export declare class Bridge<DATA extends LocalData = LocalData> {
|
|
14
14
|
destroy(): void;
|
15
15
|
setOrigin(origin: string): void;
|
16
16
|
sendUnidirectionalMessage(message: UnidirectionalRequestMessage): void;
|
17
|
-
postMessage<REQ extends RequestMessage>(message: REQ): Promise<
|
17
|
+
postMessage<REQ extends RequestMessage>(message: REQ): Promise<PayloadOf<ResponseFor<REQ, DATA>>>;
|
18
18
|
private handleMessage;
|
19
19
|
}
|
20
20
|
export {};
|
package/dist/index.js
CHANGED
@@ -120,8 +120,6 @@ class Bridge {
|
|
120
120
|
};
|
121
121
|
window.parent.postMessage(eventData, this.targetOrigin);
|
122
122
|
}
|
123
|
-
// TODO: For some reason with adding more APIs, return type is not working
|
124
|
-
// Promise<PayloadOf<ResponseFor<REQ, DATA>>>
|
125
123
|
async postMessage(message) {
|
126
124
|
return new Promise((resolve, reject) => {
|
127
125
|
const messageId = v4();
|
@@ -2289,17 +2287,10 @@ class WorkflowsApiBridge {
|
|
2289
2287
|
|
2290
2288
|
/**
|
2291
2289
|
*
|
2292
|
-
* This file is autogenerated
|
2290
|
+
* This file is autogenerated.
|
2293
2291
|
*
|
2294
2292
|
* DO NOT EDIT DIRECTLY
|
2295
2293
|
*
|
2296
|
-
* If you need to change the contents of this file please edit the above configuration file and
|
2297
|
-
* then run:
|
2298
|
-
*
|
2299
|
-
* ```
|
2300
|
-
* yarn cs-gen platform-apis
|
2301
|
-
* ```
|
2302
|
-
*
|
2303
2294
|
**/
|
2304
2295
|
class FalconPublicApis {
|
2305
2296
|
isConnected = false;
|