@flowcore/sdk 1.48.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.
Files changed (157) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +47 -0
  3. package/esm/_dnt.shims.d.ts +1 -1
  4. package/esm/commands/adapter/reset-adapter.d.ts +52 -0
  5. package/esm/commands/adapter/reset-adapter.d.ts.map +1 -0
  6. package/esm/commands/adapter/reset-adapter.js +38 -0
  7. package/esm/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
  8. package/esm/commands/api-key/api-key.create.js +8 -21
  9. package/esm/commands/api-key/api-key.delete.js +4 -12
  10. package/esm/commands/api-key/api-key.list.js +4 -12
  11. package/esm/commands/data-core/data-core.create.js +4 -12
  12. package/esm/commands/data-core/data-core.request-delete.js +4 -12
  13. package/esm/commands/event-type/event-type.create.js +4 -12
  14. package/esm/commands/event-type/event-type.request-delete.js +4 -12
  15. package/esm/commands/event-type/event-type.request-truncate.js +4 -12
  16. package/esm/commands/events/event.list.js +4 -12
  17. package/esm/commands/events/events.fetch-time-buckets-by-names.js +4 -12
  18. package/esm/commands/events/events.fetch.js +4 -12
  19. package/esm/commands/events/time-bucket.list.js +4 -12
  20. package/esm/commands/flow-type/flow-type.create.js +4 -12
  21. package/esm/commands/flow-type/flow-type.request-delete.js +4 -12
  22. package/esm/commands/index.d.ts +1 -7
  23. package/esm/commands/index.d.ts.map +1 -1
  24. package/esm/commands/index.js +2 -8
  25. package/esm/commands/ingestion/ingest.batch.js +5 -18
  26. package/esm/commands/ingestion/ingest.event.js +5 -18
  27. package/esm/commands/scenario/scenario.create.js +4 -12
  28. package/esm/commands/scenario/scenario.delete.js +4 -12
  29. package/esm/commands/scenario/scenario.fetch.d.ts +22 -4
  30. package/esm/commands/scenario/scenario.fetch.d.ts.map +1 -1
  31. package/esm/commands/scenario/scenario.fetch.js +29 -13
  32. package/esm/commands/scenario/scenario.list.js +4 -12
  33. package/esm/commands/scenario/scenario.update.d.ts +4 -2
  34. package/esm/commands/scenario/scenario.update.d.ts.map +1 -1
  35. package/esm/commands/scenario/scenario.update.js +13 -12
  36. package/esm/commands/secret/secret.create.js +4 -12
  37. package/esm/commands/secret/secret.delete.js +4 -12
  38. package/esm/commands/secret/secret.list.js +4 -12
  39. package/esm/commands/security/pat.create.js +4 -12
  40. package/esm/commands/security/pat.delete.js +4 -12
  41. package/esm/commands/security/pat.exchange.js +4 -12
  42. package/esm/commands/security/pat.get.js +4 -12
  43. package/esm/commands/security/pat.list.js +4 -12
  44. package/esm/commands/tenant/tenant.list.js +4 -12
  45. package/esm/commands/variable/variable.create.js +4 -12
  46. package/esm/commands/variable/variable.delete.js +4 -12
  47. package/esm/commands/variable/variable.list.js +4 -12
  48. package/esm/common/command-graphql.js +4 -12
  49. package/esm/common/command.js +20 -45
  50. package/esm/common/flowcore-client.js +4 -18
  51. package/esm/common/notification-client.js +15 -72
  52. package/esm/common/websocket-client.js +16 -80
  53. package/esm/exceptions/client-error.js +6 -18
  54. package/esm/exceptions/invalid-response.js +2 -6
  55. package/esm/utils/local-cache.js +5 -19
  56. package/package.json +1 -1
  57. package/script/_dnt.shims.d.ts +1 -1
  58. package/script/commands/adapter/reset-adapter.d.ts +52 -0
  59. package/script/commands/adapter/reset-adapter.d.ts.map +1 -0
  60. package/script/commands/adapter/reset-adapter.js +42 -0
  61. package/script/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
  62. package/script/commands/api-key/api-key.create.js +8 -21
  63. package/script/commands/api-key/api-key.delete.js +4 -12
  64. package/script/commands/api-key/api-key.list.js +4 -12
  65. package/script/commands/data-core/data-core.create.js +4 -12
  66. package/script/commands/data-core/data-core.request-delete.js +4 -12
  67. package/script/commands/event-type/event-type.create.js +4 -12
  68. package/script/commands/event-type/event-type.request-delete.js +4 -12
  69. package/script/commands/event-type/event-type.request-truncate.js +4 -12
  70. package/script/commands/events/event.list.js +4 -12
  71. package/script/commands/events/events.fetch-time-buckets-by-names.js +4 -12
  72. package/script/commands/events/events.fetch.js +4 -12
  73. package/script/commands/events/time-bucket.list.js +4 -12
  74. package/script/commands/flow-type/flow-type.create.js +4 -12
  75. package/script/commands/flow-type/flow-type.request-delete.js +4 -12
  76. package/script/commands/index.d.ts +1 -7
  77. package/script/commands/index.d.ts.map +1 -1
  78. package/script/commands/index.js +2 -8
  79. package/script/commands/ingestion/ingest.batch.js +5 -18
  80. package/script/commands/ingestion/ingest.event.js +5 -18
  81. package/script/commands/scenario/scenario.create.js +4 -12
  82. package/script/commands/scenario/scenario.delete.js +4 -12
  83. package/script/commands/scenario/scenario.fetch.d.ts +22 -4
  84. package/script/commands/scenario/scenario.fetch.d.ts.map +1 -1
  85. package/script/commands/scenario/scenario.fetch.js +29 -13
  86. package/script/commands/scenario/scenario.list.js +4 -12
  87. package/script/commands/scenario/scenario.update.d.ts +4 -2
  88. package/script/commands/scenario/scenario.update.d.ts.map +1 -1
  89. package/script/commands/scenario/scenario.update.js +13 -12
  90. package/script/commands/secret/secret.create.js +4 -12
  91. package/script/commands/secret/secret.delete.js +4 -12
  92. package/script/commands/secret/secret.list.js +4 -12
  93. package/script/commands/security/pat.create.js +4 -12
  94. package/script/commands/security/pat.delete.js +4 -12
  95. package/script/commands/security/pat.exchange.js +4 -12
  96. package/script/commands/security/pat.get.js +4 -12
  97. package/script/commands/security/pat.list.js +4 -12
  98. package/script/commands/tenant/tenant.list.js +4 -12
  99. package/script/commands/variable/variable.create.js +4 -12
  100. package/script/commands/variable/variable.delete.js +4 -12
  101. package/script/commands/variable/variable.list.js +4 -12
  102. package/script/common/command-graphql.js +4 -12
  103. package/script/common/command.js +20 -45
  104. package/script/common/flowcore-client.js +4 -18
  105. package/script/common/notification-client.js +15 -72
  106. package/script/common/websocket-client.js +16 -80
  107. package/script/exceptions/client-error.js +6 -18
  108. package/script/exceptions/invalid-response.js +2 -6
  109. package/script/utils/local-cache.js +5 -19
  110. package/esm/commands/iam/api-key-role-association.create.d.ts +0 -45
  111. package/esm/commands/iam/api-key-role-association.create.d.ts.map +0 -1
  112. package/esm/commands/iam/api-key-role-association.create.js +0 -44
  113. package/esm/commands/iam/api-key-role-association.delete.d.ts +0 -45
  114. package/esm/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
  115. package/esm/commands/iam/api-key-role-association.delete.js +0 -44
  116. package/esm/commands/iam/api-key-role-association.list.d.ts +0 -31
  117. package/esm/commands/iam/api-key-role-association.list.d.ts.map +0 -1
  118. package/esm/commands/iam/api-key-role-association.list.js +0 -37
  119. package/esm/commands/iam/role.list.d.ts +0 -33
  120. package/esm/commands/iam/role.list.d.ts.map +0 -1
  121. package/esm/commands/iam/role.list.js +0 -41
  122. package/esm/commands/iam/user-role-association.create.d.ts +0 -42
  123. package/esm/commands/iam/user-role-association.create.d.ts.map +0 -1
  124. package/esm/commands/iam/user-role-association.create.js +0 -40
  125. package/esm/commands/iam/user-role-association.delete.d.ts +0 -42
  126. package/esm/commands/iam/user-role-association.delete.d.ts.map +0 -1
  127. package/esm/commands/iam/user-role-association.delete.js +0 -40
  128. package/esm/commands/iam/user-role-association.list.d.ts +0 -33
  129. package/esm/commands/iam/user-role-association.list.d.ts.map +0 -1
  130. package/esm/commands/iam/user-role-association.list.js +0 -39
  131. package/esm/contracts/iam.d.ts +0 -13
  132. package/esm/contracts/iam.d.ts.map +0 -1
  133. package/esm/contracts/iam.js +0 -9
  134. package/script/commands/iam/api-key-role-association.create.d.ts +0 -45
  135. package/script/commands/iam/api-key-role-association.create.d.ts.map +0 -1
  136. package/script/commands/iam/api-key-role-association.create.js +0 -48
  137. package/script/commands/iam/api-key-role-association.delete.d.ts +0 -45
  138. package/script/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
  139. package/script/commands/iam/api-key-role-association.delete.js +0 -48
  140. package/script/commands/iam/api-key-role-association.list.d.ts +0 -31
  141. package/script/commands/iam/api-key-role-association.list.d.ts.map +0 -1
  142. package/script/commands/iam/api-key-role-association.list.js +0 -41
  143. package/script/commands/iam/role.list.d.ts +0 -33
  144. package/script/commands/iam/role.list.d.ts.map +0 -1
  145. package/script/commands/iam/role.list.js +0 -45
  146. package/script/commands/iam/user-role-association.create.d.ts +0 -42
  147. package/script/commands/iam/user-role-association.create.d.ts.map +0 -1
  148. package/script/commands/iam/user-role-association.create.js +0 -44
  149. package/script/commands/iam/user-role-association.delete.d.ts +0 -42
  150. package/script/commands/iam/user-role-association.delete.d.ts.map +0 -1
  151. package/script/commands/iam/user-role-association.delete.js +0 -44
  152. package/script/commands/iam/user-role-association.list.d.ts +0 -33
  153. package/script/commands/iam/user-role-association.list.d.ts.map +0 -1
  154. package/script/commands/iam/user-role-association.list.js +0 -43
  155. package/script/contracts/iam.d.ts +0 -13
  156. package/script/contracts/iam.d.ts.map +0 -1
  157. package/script/contracts/iam.js +0 -12
@@ -7,25 +7,11 @@ const RETRYABLE_ERROR_CODES = [408, 429, 500, 502, 503, 504];
7
7
  * A base client for executing commands
8
8
  */
9
9
  export class FlowcoreClient {
10
+ options;
11
+ mode;
12
+ baseUrl;
10
13
  constructor(options) {
11
- Object.defineProperty(this, "options", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: options
16
- });
17
- Object.defineProperty(this, "mode", {
18
- enumerable: true,
19
- configurable: true,
20
- writable: true,
21
- value: void 0
22
- });
23
- Object.defineProperty(this, "baseUrl", {
24
- enumerable: true,
25
- configurable: true,
26
- writable: true,
27
- value: void 0
28
- });
14
+ this.options = options;
29
15
  if (this.options.getBearerToken) {
30
16
  this.mode = "bearer";
31
17
  }
@@ -12,6 +12,18 @@ const MAX_RECONNECT_INTERVAL = 30_000;
12
12
  * Manages connection lifecycle, authentication, and event handling.
13
13
  */
14
14
  export class NotificationClient {
15
+ observer;
16
+ authOptions;
17
+ subscriptionSpec;
18
+ url = "wss://tenant.api.flowcore.io/notifications";
19
+ webSocket;
20
+ options;
21
+ logger;
22
+ eventCount = 0;
23
+ reconnectInterval;
24
+ reconnectAttempts = 0;
25
+ _isOpen = false;
26
+ _isConnecting = false;
15
27
  /**
16
28
  * Creates a new NotificationClient instance
17
29
  * @param observer - RxJS Subject for emitting notification events
@@ -20,78 +32,9 @@ export class NotificationClient {
20
32
  * @param options - Configuration options for the client
21
33
  */
22
34
  constructor(observer, authOptions, subscriptionSpec, options) {
23
- Object.defineProperty(this, "observer", {
24
- enumerable: true,
25
- configurable: true,
26
- writable: true,
27
- value: observer
28
- });
29
- Object.defineProperty(this, "authOptions", {
30
- enumerable: true,
31
- configurable: true,
32
- writable: true,
33
- value: authOptions
34
- });
35
- Object.defineProperty(this, "subscriptionSpec", {
36
- enumerable: true,
37
- configurable: true,
38
- writable: true,
39
- value: subscriptionSpec
40
- });
41
- Object.defineProperty(this, "url", {
42
- enumerable: true,
43
- configurable: true,
44
- writable: true,
45
- value: "wss://tenant.api.flowcore.io/notifications"
46
- });
47
- Object.defineProperty(this, "webSocket", {
48
- enumerable: true,
49
- configurable: true,
50
- writable: true,
51
- value: void 0
52
- });
53
- Object.defineProperty(this, "options", {
54
- enumerable: true,
55
- configurable: true,
56
- writable: true,
57
- value: void 0
58
- });
59
- Object.defineProperty(this, "logger", {
60
- enumerable: true,
61
- configurable: true,
62
- writable: true,
63
- value: void 0
64
- });
65
- Object.defineProperty(this, "eventCount", {
66
- enumerable: true,
67
- configurable: true,
68
- writable: true,
69
- value: 0
70
- });
71
- Object.defineProperty(this, "reconnectInterval", {
72
- enumerable: true,
73
- configurable: true,
74
- writable: true,
75
- value: void 0
76
- });
77
- Object.defineProperty(this, "reconnectAttempts", {
78
- enumerable: true,
79
- configurable: true,
80
- writable: true,
81
- value: 0
82
- });
83
- Object.defineProperty(this, "_isOpen", {
84
- enumerable: true,
85
- configurable: true,
86
- writable: true,
87
- value: false
88
- });
89
- Object.defineProperty(this, "_isConnecting", {
90
- enumerable: true,
91
- configurable: true,
92
- writable: true,
93
- value: false
94
- });
35
+ this.observer = observer;
36
+ this.authOptions = authOptions;
37
+ this.subscriptionSpec = subscriptionSpec;
95
38
  this.options = {
96
39
  reconnectInterval: 1000,
97
40
  ...options,
@@ -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
- Object.defineProperty(this, "authOptions", {
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
- Object.defineProperty(this, "status", {
8
- enumerable: true,
9
- configurable: true,
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
- Object.defineProperty(this, "errors", {
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
  }
@@ -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
- Object.defineProperty(this, "defaultTtlMs", {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowcore/sdk",
3
- "version": "1.48.0",
3
+ "version": "1.50.0",
4
4
  "description": "Flowcore SDK",
5
5
  "homepage": "https://github.com/flowcore-io/flowcore-sdk#readme",
6
6
  "repository": {
@@ -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, "Deno" | "WebSocket"> & {
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
- constructor() {
34
- super(...arguments);
35
- /**
36
- * Whether the command should retry on failure
37
- */
38
- Object.defineProperty(this, "retryOnFailure", {
39
- enumerable: true,
40
- configurable: true,
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
- constructor() {
30
- super(...arguments);
31
- /**
32
- * The allowed modes for the command
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
- constructor() {
34
- super(...arguments);
35
- /**
36
- * The allowed modes for the command
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
- constructor() {
12
- super(...arguments);
13
- /**
14
- * Whether the command should retry on failure
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
- constructor() {
14
- super(...arguments);
15
- /**
16
- * The dedicated subdomain for the command
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
- constructor() {
12
- super(...arguments);
13
- /**
14
- * Whether the command should retry on failure
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
- constructor() {
14
- super(...arguments);
15
- /**
16
- * The dedicated subdomain for the command
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
- constructor() {
14
- super(...arguments);
15
- /**
16
- * The dedicated subdomain for the command
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
  */