@flowcore/sdk 1.49.0 → 1.50.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/CHANGELOG.md +23 -0
- package/README.md +47 -0
- package/esm/_dnt.shims.d.ts +1 -1
- package/esm/commands/adapter/reset-adapter.d.ts +52 -0
- package/esm/commands/adapter/reset-adapter.d.ts.map +1 -0
- package/esm/commands/adapter/reset-adapter.js +38 -0
- package/esm/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
- package/esm/commands/api-key/api-key.create.js +8 -21
- package/esm/commands/api-key/api-key.delete.js +4 -12
- package/esm/commands/api-key/api-key.list.js +4 -12
- package/esm/commands/data-core/data-core.create.js +4 -12
- package/esm/commands/data-core/data-core.request-delete.js +4 -12
- package/esm/commands/event-type/event-type.create.js +4 -12
- package/esm/commands/event-type/event-type.request-delete.js +4 -12
- package/esm/commands/event-type/event-type.request-truncate.js +4 -12
- package/esm/commands/events/event.list.js +4 -12
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +4 -12
- package/esm/commands/events/events.fetch.js +4 -12
- package/esm/commands/events/time-bucket.list.js +4 -12
- package/esm/commands/flow-type/flow-type.create.js +4 -12
- package/esm/commands/flow-type/flow-type.request-delete.js +4 -12
- package/esm/commands/index.d.ts +1 -7
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +2 -8
- package/esm/commands/ingestion/ingest.batch.js +5 -18
- package/esm/commands/ingestion/ingest.event.js +5 -18
- package/esm/commands/scenario/scenario.create.js +4 -12
- package/esm/commands/scenario/scenario.delete.js +4 -12
- package/esm/commands/scenario/scenario.fetch.js +4 -12
- package/esm/commands/scenario/scenario.list.js +4 -12
- package/esm/commands/scenario/scenario.update.js +4 -12
- package/esm/commands/secret/secret.create.js +4 -12
- package/esm/commands/secret/secret.delete.js +4 -12
- package/esm/commands/secret/secret.list.js +4 -12
- package/esm/commands/security/pat.create.js +4 -12
- package/esm/commands/security/pat.delete.js +4 -12
- package/esm/commands/security/pat.exchange.js +4 -12
- package/esm/commands/security/pat.get.js +4 -12
- package/esm/commands/security/pat.list.js +4 -12
- package/esm/commands/tenant/tenant.list.js +4 -12
- package/esm/commands/variable/variable.create.js +4 -12
- package/esm/commands/variable/variable.delete.js +4 -12
- package/esm/commands/variable/variable.list.js +4 -12
- package/esm/common/command-graphql.js +4 -12
- package/esm/common/command.js +20 -45
- package/esm/common/flowcore-client.js +4 -18
- package/esm/common/notification-client.js +15 -72
- package/esm/common/websocket-client.js +16 -80
- package/esm/exceptions/client-error.js +6 -18
- package/esm/exceptions/invalid-response.js +2 -6
- package/esm/utils/local-cache.js +5 -19
- package/package.json +1 -1
- package/script/_dnt.shims.d.ts +1 -1
- package/script/commands/adapter/reset-adapter.d.ts +52 -0
- package/script/commands/adapter/reset-adapter.d.ts.map +1 -0
- package/script/commands/adapter/reset-adapter.js +42 -0
- package/script/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
- package/script/commands/api-key/api-key.create.js +8 -21
- package/script/commands/api-key/api-key.delete.js +4 -12
- package/script/commands/api-key/api-key.list.js +4 -12
- package/script/commands/data-core/data-core.create.js +4 -12
- package/script/commands/data-core/data-core.request-delete.js +4 -12
- package/script/commands/event-type/event-type.create.js +4 -12
- package/script/commands/event-type/event-type.request-delete.js +4 -12
- package/script/commands/event-type/event-type.request-truncate.js +4 -12
- package/script/commands/events/event.list.js +4 -12
- package/script/commands/events/events.fetch-time-buckets-by-names.js +4 -12
- package/script/commands/events/events.fetch.js +4 -12
- package/script/commands/events/time-bucket.list.js +4 -12
- package/script/commands/flow-type/flow-type.create.js +4 -12
- package/script/commands/flow-type/flow-type.request-delete.js +4 -12
- package/script/commands/index.d.ts +1 -7
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +2 -8
- package/script/commands/ingestion/ingest.batch.js +5 -18
- package/script/commands/ingestion/ingest.event.js +5 -18
- package/script/commands/scenario/scenario.create.js +4 -12
- package/script/commands/scenario/scenario.delete.js +4 -12
- package/script/commands/scenario/scenario.fetch.js +4 -12
- package/script/commands/scenario/scenario.list.js +4 -12
- package/script/commands/scenario/scenario.update.js +4 -12
- package/script/commands/secret/secret.create.js +4 -12
- package/script/commands/secret/secret.delete.js +4 -12
- package/script/commands/secret/secret.list.js +4 -12
- package/script/commands/security/pat.create.js +4 -12
- package/script/commands/security/pat.delete.js +4 -12
- package/script/commands/security/pat.exchange.js +4 -12
- package/script/commands/security/pat.get.js +4 -12
- package/script/commands/security/pat.list.js +4 -12
- package/script/commands/tenant/tenant.list.js +4 -12
- package/script/commands/variable/variable.create.js +4 -12
- package/script/commands/variable/variable.delete.js +4 -12
- package/script/commands/variable/variable.list.js +4 -12
- package/script/common/command-graphql.js +4 -12
- package/script/common/command.js +20 -45
- package/script/common/flowcore-client.js +4 -18
- package/script/common/notification-client.js +15 -72
- package/script/common/websocket-client.js +16 -80
- package/script/exceptions/client-error.js +6 -18
- package/script/exceptions/invalid-response.js +2 -6
- package/script/utils/local-cache.js +5 -19
- package/esm/commands/iam/api-key-role-association.create.d.ts +0 -45
- package/esm/commands/iam/api-key-role-association.create.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.create.js +0 -44
- package/esm/commands/iam/api-key-role-association.delete.d.ts +0 -45
- package/esm/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.delete.js +0 -44
- package/esm/commands/iam/api-key-role-association.list.d.ts +0 -31
- package/esm/commands/iam/api-key-role-association.list.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.list.js +0 -37
- package/esm/commands/iam/role.list.d.ts +0 -33
- package/esm/commands/iam/role.list.d.ts.map +0 -1
- package/esm/commands/iam/role.list.js +0 -41
- package/esm/commands/iam/user-role-association.create.d.ts +0 -42
- package/esm/commands/iam/user-role-association.create.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.create.js +0 -40
- package/esm/commands/iam/user-role-association.delete.d.ts +0 -42
- package/esm/commands/iam/user-role-association.delete.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.delete.js +0 -40
- package/esm/commands/iam/user-role-association.list.d.ts +0 -33
- package/esm/commands/iam/user-role-association.list.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.list.js +0 -39
- package/esm/contracts/iam.d.ts +0 -13
- package/esm/contracts/iam.d.ts.map +0 -1
- package/esm/contracts/iam.js +0 -9
- package/script/commands/iam/api-key-role-association.create.d.ts +0 -45
- package/script/commands/iam/api-key-role-association.create.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.create.js +0 -48
- package/script/commands/iam/api-key-role-association.delete.d.ts +0 -45
- package/script/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.delete.js +0 -48
- package/script/commands/iam/api-key-role-association.list.d.ts +0 -31
- package/script/commands/iam/api-key-role-association.list.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.list.js +0 -41
- package/script/commands/iam/role.list.d.ts +0 -33
- package/script/commands/iam/role.list.d.ts.map +0 -1
- package/script/commands/iam/role.list.js +0 -45
- package/script/commands/iam/user-role-association.create.d.ts +0 -42
- package/script/commands/iam/user-role-association.create.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.create.js +0 -44
- package/script/commands/iam/user-role-association.delete.d.ts +0 -42
- package/script/commands/iam/user-role-association.delete.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.delete.js +0 -44
- package/script/commands/iam/user-role-association.list.d.ts +0 -33
- package/script/commands/iam/user-role-association.list.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.list.js +0 -43
- package/script/contracts/iam.d.ts +0 -13
- package/script/contracts/iam.d.ts.map +0 -1
- package/script/contracts/iam.js +0 -12
|
@@ -9,6 +9,21 @@ const MAX_RECONNECT_INTERVAL = 30_000;
|
|
|
9
9
|
* Handles connection lifecycle, authentication, reconnection, and message sending/receiving.
|
|
10
10
|
*/
|
|
11
11
|
export class WebSocketClient {
|
|
12
|
+
authOptions;
|
|
13
|
+
overrideBaseUrl; // Field to store the override URL
|
|
14
|
+
webSocket;
|
|
15
|
+
options;
|
|
16
|
+
logger;
|
|
17
|
+
reconnectInterval;
|
|
18
|
+
reconnectAttempts = 0;
|
|
19
|
+
_isOpen = false;
|
|
20
|
+
_isConnecting = false;
|
|
21
|
+
webSocketFactory;
|
|
22
|
+
// Internal subject to push received data
|
|
23
|
+
internalSubject = new Subject();
|
|
24
|
+
// Store the current command and config for reconnects and sending
|
|
25
|
+
currentCommand = null;
|
|
26
|
+
currentConfig = null;
|
|
12
27
|
/**
|
|
13
28
|
* Creates a new WebSocketClient instance.
|
|
14
29
|
* @param authOptions - Authentication options (Bearer token via OIDC client or API Key).
|
|
@@ -16,86 +31,7 @@ export class WebSocketClient {
|
|
|
16
31
|
* @param webSocketFactory - Optional WebSocket factory for testing.
|
|
17
32
|
*/
|
|
18
33
|
constructor(authOptions, options, webSocketFactory) {
|
|
19
|
-
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: authOptions
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(this, "overrideBaseUrl", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: void 0
|
|
30
|
-
}); // Field to store the override URL
|
|
31
|
-
Object.defineProperty(this, "webSocket", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: void 0
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(this, "options", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: void 0
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(this, "logger", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: void 0
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(this, "reconnectInterval", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
value: void 0
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(this, "reconnectAttempts", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: 0
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(this, "_isOpen", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true,
|
|
65
|
-
value: false
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(this, "_isConnecting", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true,
|
|
70
|
-
writable: true,
|
|
71
|
-
value: false
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(this, "webSocketFactory", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
configurable: true,
|
|
76
|
-
writable: true,
|
|
77
|
-
value: void 0
|
|
78
|
-
});
|
|
79
|
-
// Internal subject to push received data
|
|
80
|
-
Object.defineProperty(this, "internalSubject", {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
configurable: true,
|
|
83
|
-
writable: true,
|
|
84
|
-
value: new Subject()
|
|
85
|
-
});
|
|
86
|
-
// Store the current command and config for reconnects and sending
|
|
87
|
-
Object.defineProperty(this, "currentCommand", {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
configurable: true,
|
|
90
|
-
writable: true,
|
|
91
|
-
value: null
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(this, "currentConfig", {
|
|
94
|
-
enumerable: true,
|
|
95
|
-
configurable: true,
|
|
96
|
-
writable: true,
|
|
97
|
-
value: null
|
|
98
|
-
});
|
|
34
|
+
this.authOptions = authOptions;
|
|
99
35
|
this.options = { reconnectInterval: 1000, ...options };
|
|
100
36
|
this.logger = options?.logger ?? defaultLogger;
|
|
101
37
|
this.reconnectInterval = this.options.reconnectInterval;
|
|
@@ -2,25 +2,13 @@
|
|
|
2
2
|
* An error thrown when the client request fails
|
|
3
3
|
*/
|
|
4
4
|
export class ClientError extends Error {
|
|
5
|
+
status;
|
|
6
|
+
command;
|
|
7
|
+
body;
|
|
5
8
|
constructor(message, status, command, body) {
|
|
6
9
|
super(`${command} failed with ${status}: ${body ? JSON.stringify(body) : message}`);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
writable: true,
|
|
11
|
-
value: status
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(this, "command", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: command
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(this, "body", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: body
|
|
24
|
-
});
|
|
10
|
+
this.status = status;
|
|
11
|
+
this.command = command;
|
|
12
|
+
this.body = body;
|
|
25
13
|
}
|
|
26
14
|
}
|
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
* An error thrown when the response from the server is invalid
|
|
3
3
|
*/
|
|
4
4
|
export class InvalidResponseException extends Error {
|
|
5
|
+
errors;
|
|
5
6
|
constructor(message, errors) {
|
|
6
7
|
const errorString = JSON.stringify(errors);
|
|
7
8
|
super(`${message}: ${errorString.slice(0, 1000)}`);
|
|
8
|
-
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true,
|
|
12
|
-
value: errors
|
|
13
|
-
});
|
|
9
|
+
this.errors = errors;
|
|
14
10
|
this.errors = errors;
|
|
15
11
|
}
|
|
16
12
|
}
|
package/esm/utils/local-cache.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
export class LocalCache {
|
|
2
|
+
defaultTtlMs;
|
|
3
|
+
cache = new Map();
|
|
4
|
+
// deno-lint-ignore no-explicit-any
|
|
5
|
+
timers = new Map();
|
|
2
6
|
constructor(defaultTtlMs) {
|
|
3
|
-
|
|
4
|
-
enumerable: true,
|
|
5
|
-
configurable: true,
|
|
6
|
-
writable: true,
|
|
7
|
-
value: defaultTtlMs
|
|
8
|
-
});
|
|
9
|
-
Object.defineProperty(this, "cache", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: new Map()
|
|
14
|
-
});
|
|
15
|
-
// deno-lint-ignore no-explicit-any
|
|
16
|
-
Object.defineProperty(this, "timers", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: new Map()
|
|
21
|
-
});
|
|
7
|
+
this.defaultTtlMs = defaultTtlMs;
|
|
22
8
|
}
|
|
23
9
|
get(key) {
|
|
24
10
|
return this.cache.get(key);
|
package/package.json
CHANGED
package/script/_dnt.shims.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Deno } from "@deno/shim-deno";
|
|
|
2
2
|
export { Deno } from "@deno/shim-deno";
|
|
3
3
|
import { default as WebSocket } from "ws";
|
|
4
4
|
export { default as WebSocket } from "ws";
|
|
5
|
-
export declare const dntGlobalThis: Omit<typeof globalThis, "
|
|
5
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, "WebSocket" | "Deno"> & {
|
|
6
6
|
Deno: typeof Deno;
|
|
7
7
|
WebSocket: typeof WebSocket;
|
|
8
8
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Command } from "@flowcore/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* The input for the reset adapter command
|
|
4
|
+
*/
|
|
5
|
+
export interface ResetAdapterInput {
|
|
6
|
+
/** The adapter ID to reset */
|
|
7
|
+
adapterId: string;
|
|
8
|
+
/** The tenant name */
|
|
9
|
+
tenant: string;
|
|
10
|
+
/** The time bucket to reset from (format: YYYYMMDDhhiiss) */
|
|
11
|
+
timeBucket?: string;
|
|
12
|
+
/** The event ID to reset from */
|
|
13
|
+
eventId?: string;
|
|
14
|
+
/** The reason for resetting the adapter */
|
|
15
|
+
reason?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ResetAdapterResponse {
|
|
18
|
+
/** Whether the reset was successful */
|
|
19
|
+
success: boolean;
|
|
20
|
+
/** A message describing the result */
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reset an adapter
|
|
25
|
+
*/
|
|
26
|
+
export declare class ResetAdapterCommand extends Command<ResetAdapterInput, ResetAdapterResponse> {
|
|
27
|
+
/**
|
|
28
|
+
* The dedicated subdomain for the command
|
|
29
|
+
*/
|
|
30
|
+
protected dedicatedSubdomain: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the command should retry on failure
|
|
33
|
+
*/
|
|
34
|
+
protected retryOnFailure: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Get the method
|
|
37
|
+
*/
|
|
38
|
+
protected getMethod(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get the base url
|
|
41
|
+
*/
|
|
42
|
+
protected getBaseUrl(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Get the path
|
|
45
|
+
*/
|
|
46
|
+
protected getPath(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Parse the response
|
|
49
|
+
*/
|
|
50
|
+
protected parseResponse(rawResponse: unknown): ResetAdapterResponse;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=reset-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-adapter.d.ts","sourceRoot":"","sources":["../../../src/commands/adapter/reset-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,oBAAoB,CAAC;IACvF;;OAEG;IACH,UAAmB,kBAAkB,SAAS;IAE9C;;OAEG;IACH,UAAmB,cAAc,UAAO;IAExC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,oBAAoB;CAG7E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResetAdapterCommand = void 0;
|
|
4
|
+
const sdk_1 = require("@flowcore/sdk");
|
|
5
|
+
/**
|
|
6
|
+
* Reset an adapter
|
|
7
|
+
*/
|
|
8
|
+
class ResetAdapterCommand extends sdk_1.Command {
|
|
9
|
+
/**
|
|
10
|
+
* The dedicated subdomain for the command
|
|
11
|
+
*/
|
|
12
|
+
dedicatedSubdomain = "logs";
|
|
13
|
+
/**
|
|
14
|
+
* Whether the command should retry on failure
|
|
15
|
+
*/
|
|
16
|
+
retryOnFailure = true;
|
|
17
|
+
/**
|
|
18
|
+
* Get the method
|
|
19
|
+
*/
|
|
20
|
+
getMethod() {
|
|
21
|
+
return "POST";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the base url
|
|
25
|
+
*/
|
|
26
|
+
getBaseUrl() {
|
|
27
|
+
return "https://logs.api.flowcore.io";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the path
|
|
31
|
+
*/
|
|
32
|
+
getPath() {
|
|
33
|
+
return "/api/v1/pods/reset";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Parse the response
|
|
37
|
+
*/
|
|
38
|
+
parseResponse(rawResponse) {
|
|
39
|
+
return rawResponse;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ResetAdapterCommand = ResetAdapterCommand;
|
|
@@ -5,13 +5,8 @@ exports.ConversationStreamCommand = void 0;
|
|
|
5
5
|
* Command to stream conversation events for a specific agent.
|
|
6
6
|
*/
|
|
7
7
|
class ConversationStreamCommand {
|
|
8
|
+
config;
|
|
8
9
|
constructor(config) {
|
|
9
|
-
Object.defineProperty(this, "config", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: void 0
|
|
14
|
-
});
|
|
15
10
|
if (!config.conversationId) {
|
|
16
11
|
throw new Error("conversationId is required in the config for ConversationStreamCommand");
|
|
17
12
|
}
|
|
@@ -30,27 +30,14 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
30
30
|
* Create an API key
|
|
31
31
|
*/
|
|
32
32
|
class ApiKeyCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
writable: true,
|
|
42
|
-
value: false
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* The allowed modes for the command
|
|
46
|
-
*/
|
|
47
|
-
Object.defineProperty(this, "allowedModes", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true,
|
|
51
|
-
value: ["bearer"]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
33
|
+
/**
|
|
34
|
+
* Whether the command should retry on failure
|
|
35
|
+
*/
|
|
36
|
+
retryOnFailure = false;
|
|
37
|
+
/**
|
|
38
|
+
* The allowed modes for the command
|
|
39
|
+
*/
|
|
40
|
+
allowedModes = ["bearer"];
|
|
54
41
|
/**
|
|
55
42
|
* Parse the response
|
|
56
43
|
*/
|
|
@@ -26,18 +26,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
26
26
|
* Delete an API key
|
|
27
27
|
*/
|
|
28
28
|
class ApiKeyDeleteCommand extends command_graphql_js_1.GraphQlCommand {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
Object.defineProperty(this, "allowedModes", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true,
|
|
37
|
-
writable: true,
|
|
38
|
-
value: ["bearer"]
|
|
39
|
-
});
|
|
40
|
-
}
|
|
29
|
+
/**
|
|
30
|
+
* The allowed modes for the command
|
|
31
|
+
*/
|
|
32
|
+
allowedModes = ["bearer"];
|
|
41
33
|
/**
|
|
42
34
|
* Parse the response
|
|
43
35
|
*/
|
|
@@ -30,18 +30,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
30
30
|
* List api keys
|
|
31
31
|
*/
|
|
32
32
|
class ApiKeyListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
Object.defineProperty(this, "allowedModes", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: ["bearer"]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
33
|
+
/**
|
|
34
|
+
* The allowed modes for the command
|
|
35
|
+
*/
|
|
36
|
+
allowedModes = ["bearer"];
|
|
45
37
|
/**
|
|
46
38
|
* Parse the response
|
|
47
39
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a data core
|
|
9
9
|
*/
|
|
10
10
|
class DataCoreCreateCommand extends command_js_1.Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: false
|
|
21
|
-
});
|
|
22
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
23
15
|
/**
|
|
24
16
|
* Get the method
|
|
25
17
|
*/
|
|
@@ -10,18 +10,10 @@ const data_core_exists_js_1 = require("./data-core.exists.js");
|
|
|
10
10
|
* Request to delete a data core
|
|
11
11
|
*/
|
|
12
12
|
class DataCoreRequestDeleteCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create an event type
|
|
9
9
|
*/
|
|
10
10
|
class EventTypeCreateCommand extends command_js_1.Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: false
|
|
21
|
-
});
|
|
22
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
23
15
|
/**
|
|
24
16
|
* Get the method
|
|
25
17
|
*/
|
|
@@ -10,18 +10,10 @@ const event_type_exists_js_1 = require("./event-type.exists.js");
|
|
|
10
10
|
* Request to delete an event type
|
|
11
11
|
*/
|
|
12
12
|
class EventTypeRequestDeleteCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -10,18 +10,10 @@ const event_type_fetch_js_1 = require("./event-type.fetch.js");
|
|
|
10
10
|
* Request to truncate an event type
|
|
11
11
|
*/
|
|
12
12
|
class EventTypeRequestTruncateCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -16,18 +16,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
16
16
|
* Fetch time buckets for an event type
|
|
17
17
|
*/
|
|
18
18
|
class EventListCommand extends command_js_1.Command {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: "event-source"
|
|
29
|
-
});
|
|
30
|
-
}
|
|
19
|
+
/**
|
|
20
|
+
* The dedicated subdomain for the command
|
|
21
|
+
*/
|
|
22
|
+
dedicatedSubdomain = "event-source";
|
|
31
23
|
/**
|
|
32
24
|
* Get the method for the request
|
|
33
25
|
*/
|
|
@@ -15,18 +15,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Fetch time buckets for an event type
|
|
16
16
|
*/
|
|
17
17
|
class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: "event-source"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "event-source";
|
|
30
22
|
/**
|
|
31
23
|
* Get the base url for the request
|
|
32
24
|
*/
|
|
@@ -16,18 +16,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
16
16
|
* Fetch time buckets for an event type
|
|
17
17
|
*/
|
|
18
18
|
class EventsFetchCommand extends command_js_1.Command {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: "event-source"
|
|
29
|
-
});
|
|
30
|
-
}
|
|
19
|
+
/**
|
|
20
|
+
* The dedicated subdomain for the command
|
|
21
|
+
*/
|
|
22
|
+
dedicatedSubdomain = "event-source";
|
|
31
23
|
/**
|
|
32
24
|
* Get the base url for the request
|
|
33
25
|
*/
|
|
@@ -15,18 +15,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Fetch time buckets for an event type
|
|
16
16
|
*/
|
|
17
17
|
class TimeBucketListCommand extends command_js_1.Command {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: "event-source"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "event-source";
|
|
30
22
|
/**
|
|
31
23
|
* Get the method for the request
|
|
32
24
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a flow type
|
|
9
9
|
*/
|
|
10
10
|
class FlowTypeCreateCommand extends command_js_1.Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: false
|
|
21
|
-
});
|
|
22
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
23
15
|
/**
|
|
24
16
|
* Get the method
|
|
25
17
|
*/
|
|
@@ -10,18 +10,10 @@ const flow_type_exists_js_1 = require("./flow-type.exists.js");
|
|
|
10
10
|
* Request to delete a flow type
|
|
11
11
|
*/
|
|
12
12
|
class FlowTypeRequestDeleteCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|