@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
|
@@ -3,6 +3,7 @@ export * from "./tenant/tenant.enable-sensitive-data.js";
|
|
|
3
3
|
export * from "./tenant/tenant.fetch.js";
|
|
4
4
|
export * from "./tenant/tenant.list.js";
|
|
5
5
|
export * from "./tenant/tenant.translate-name-to-id.js";
|
|
6
|
+
export * from "./adapter/reset-adapter.js";
|
|
6
7
|
export * from "./api-key/api-key.create.js";
|
|
7
8
|
export * from "./api-key/api-key.delete.js";
|
|
8
9
|
export * from "./api-key/api-key.list.js";
|
|
@@ -36,13 +37,6 @@ export * from "./event-type/event-type.request-truncate.js";
|
|
|
36
37
|
export * from "./event-type/event-type.update.js";
|
|
37
38
|
export * from "./ingestion/ingest.batch.js";
|
|
38
39
|
export * from "./ingestion/ingest.event.js";
|
|
39
|
-
export * from "./iam/api-key-role-association.create.js";
|
|
40
|
-
export * from "./iam/api-key-role-association.delete.js";
|
|
41
|
-
export * from "./iam/api-key-role-association.list.js";
|
|
42
|
-
export * from "./iam/role.list.js";
|
|
43
|
-
export * from "./iam/user-role-association.create.js";
|
|
44
|
-
export * from "./iam/user-role-association.delete.js";
|
|
45
|
-
export * from "./iam/user-role-association.list.js";
|
|
46
40
|
export * from "./events/event.list.js";
|
|
47
41
|
export * from "./events/events.fetch-time-buckets-by-names.js";
|
|
48
42
|
export * from "./events/events.fetch.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wDAAwD,CAAA;AACtE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kDAAkD,CAAA;AAChE,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AAGjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,4BAA4B,CAAA;AAG1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wDAAwD,CAAA;AACtE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kDAAkD,CAAA;AAChE,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AAGjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAG5C,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AAGjE,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAG9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA"}
|
package/script/commands/index.js
CHANGED
|
@@ -20,6 +20,8 @@ __exportStar(require("./tenant/tenant.enable-sensitive-data.js"), exports);
|
|
|
20
20
|
__exportStar(require("./tenant/tenant.fetch.js"), exports);
|
|
21
21
|
__exportStar(require("./tenant/tenant.list.js"), exports);
|
|
22
22
|
__exportStar(require("./tenant/tenant.translate-name-to-id.js"), exports);
|
|
23
|
+
// Adapter
|
|
24
|
+
__exportStar(require("./adapter/reset-adapter.js"), exports);
|
|
23
25
|
// Api Key
|
|
24
26
|
__exportStar(require("./api-key/api-key.create.js"), exports);
|
|
25
27
|
__exportStar(require("./api-key/api-key.delete.js"), exports);
|
|
@@ -60,14 +62,6 @@ __exportStar(require("./event-type/event-type.update.js"), exports);
|
|
|
60
62
|
// Ingestion
|
|
61
63
|
__exportStar(require("./ingestion/ingest.batch.js"), exports);
|
|
62
64
|
__exportStar(require("./ingestion/ingest.event.js"), exports);
|
|
63
|
-
// IAM
|
|
64
|
-
__exportStar(require("./iam/api-key-role-association.create.js"), exports);
|
|
65
|
-
__exportStar(require("./iam/api-key-role-association.delete.js"), exports);
|
|
66
|
-
__exportStar(require("./iam/api-key-role-association.list.js"), exports);
|
|
67
|
-
__exportStar(require("./iam/role.list.js"), exports);
|
|
68
|
-
__exportStar(require("./iam/user-role-association.create.js"), exports);
|
|
69
|
-
__exportStar(require("./iam/user-role-association.delete.js"), exports);
|
|
70
|
-
__exportStar(require("./iam/user-role-association.list.js"), exports);
|
|
71
65
|
// Events
|
|
72
66
|
__exportStar(require("./events/event.list.js"), exports);
|
|
73
67
|
__exportStar(require("./events/events.fetch-time-buckets-by-names.js"), exports);
|
|
@@ -15,24 +15,11 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Ingest a batch of events
|
|
16
16
|
*/
|
|
17
17
|
class IngestBatchCommand 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: "webhook"
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(this, "allowedModes", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true,
|
|
32
|
-
writable: true,
|
|
33
|
-
value: ["apiKey"]
|
|
34
|
-
});
|
|
35
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "webhook";
|
|
22
|
+
allowedModes = ["apiKey"];
|
|
36
23
|
getMethod() {
|
|
37
24
|
return "POST";
|
|
38
25
|
}
|
|
@@ -15,24 +15,11 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Ingest an event
|
|
16
16
|
*/
|
|
17
17
|
class IngestEventCommand 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: "webhook"
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(this, "allowedModes", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true,
|
|
32
|
-
writable: true,
|
|
33
|
-
value: ["apiKey"]
|
|
34
|
-
});
|
|
35
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "webhook";
|
|
22
|
+
allowedModes = ["apiKey"];
|
|
36
23
|
getMethod() {
|
|
37
24
|
return "POST";
|
|
38
25
|
}
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a scenario
|
|
9
9
|
*/
|
|
10
10
|
class ScenarioCreateCommand 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
|
*/
|
|
@@ -11,18 +11,10 @@ const ScenarioDeleteOutputSchema = typebox_1.Type.Object({
|
|
|
11
11
|
* Delete a scenario
|
|
12
12
|
*/
|
|
13
13
|
class ScenarioDeleteCommand extends command_js_1.Command {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: false
|
|
24
|
-
});
|
|
25
|
-
}
|
|
14
|
+
/**
|
|
15
|
+
* Whether the command should retry on failure
|
|
16
|
+
*/
|
|
17
|
+
retryOnFailure = false;
|
|
26
18
|
/**
|
|
27
19
|
* Get the method
|
|
28
20
|
*/
|
|
@@ -15,18 +15,10 @@ function isScenarioFetchByNameAndTenantInput(input) {
|
|
|
15
15
|
* fetch a scenario
|
|
16
16
|
*/
|
|
17
17
|
class ScenarioFetchCommand extends command_js_1.Command {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: false
|
|
28
|
-
});
|
|
29
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* Whether the command should retry on failure
|
|
20
|
+
*/
|
|
21
|
+
retryOnFailure = false;
|
|
30
22
|
/**
|
|
31
23
|
* Get the method
|
|
32
24
|
*/
|
|
@@ -13,18 +13,10 @@ const ScenarioListOutputSchema = typebox_1.Type.Object({
|
|
|
13
13
|
* list all scenarios
|
|
14
14
|
*/
|
|
15
15
|
class ScenarioListCommand extends command_js_1.Command {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true,
|
|
25
|
-
value: false
|
|
26
|
-
});
|
|
27
|
-
}
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
retryOnFailure = false;
|
|
28
20
|
/**
|
|
29
21
|
* Get the method
|
|
30
22
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Update a scenario
|
|
9
9
|
*/
|
|
10
10
|
class ScenarioUpdateCommand 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
|
*/
|
|
@@ -26,18 +26,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
26
26
|
* List secrets
|
|
27
27
|
*/
|
|
28
28
|
class SecretCreateCommand 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
|
*/
|
|
@@ -26,18 +26,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
26
26
|
* List secrets
|
|
27
27
|
*/
|
|
28
28
|
class SecretDeleteCommand 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
|
*/
|
|
@@ -29,18 +29,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
29
29
|
* List secrets
|
|
30
30
|
*/
|
|
31
31
|
class SecretListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
Object.defineProperty(this, "allowedModes", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: ["bearer"]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
32
|
+
/**
|
|
33
|
+
* The allowed modes for the command
|
|
34
|
+
*/
|
|
35
|
+
allowedModes = ["bearer"];
|
|
44
36
|
/**
|
|
45
37
|
* Parse the response
|
|
46
38
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a Personal Access Token (PAT)
|
|
9
9
|
*/
|
|
10
10
|
class SecurityCreatePATCommand 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
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Delete a Personal Access Token (PAT)
|
|
9
9
|
*/
|
|
10
10
|
class SecurityDeletePATCommand 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
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Exchange a Personal Access Token (PAT) for an access token
|
|
9
9
|
*/
|
|
10
10
|
class SecurityExchangePATCommand 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
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Get a Personal Access Token (PAT)
|
|
9
9
|
*/
|
|
10
10
|
class SecurityGetPATCommand 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
|
*/
|
|
@@ -9,18 +9,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
9
9
|
* List all your Personal Access Token (PAT)
|
|
10
10
|
*/
|
|
11
11
|
class SecurityListPATCommand extends command_js_1.Command {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true,
|
|
21
|
-
value: false
|
|
22
|
-
});
|
|
23
|
-
}
|
|
12
|
+
/**
|
|
13
|
+
* Whether the command should retry on failure
|
|
14
|
+
*/
|
|
15
|
+
retryOnFailure = false;
|
|
24
16
|
/**
|
|
25
17
|
* Get the method
|
|
26
18
|
*/
|
|
@@ -48,18 +48,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
48
48
|
* List tenants
|
|
49
49
|
*/
|
|
50
50
|
class TenantListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*/
|
|
56
|
-
Object.defineProperty(this, "allowedModes", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
writable: true,
|
|
60
|
-
value: ["bearer"]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
51
|
+
/**
|
|
52
|
+
* The allowed modes for the command
|
|
53
|
+
*/
|
|
54
|
+
allowedModes = ["bearer"];
|
|
63
55
|
/**
|
|
64
56
|
* Parse the response
|
|
65
57
|
*/
|
|
@@ -29,18 +29,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
29
29
|
* Create a variable
|
|
30
30
|
*/
|
|
31
31
|
class VariableCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
Object.defineProperty(this, "allowedModes", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: ["bearer"]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
32
|
+
/**
|
|
33
|
+
* The allowed modes for the command
|
|
34
|
+
*/
|
|
35
|
+
allowedModes = ["bearer"];
|
|
44
36
|
/**
|
|
45
37
|
* Parse the response
|
|
46
38
|
*/
|
|
@@ -29,18 +29,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
29
29
|
* Create a variable
|
|
30
30
|
*/
|
|
31
31
|
class VariableDeleteCommand extends command_graphql_js_1.GraphQlCommand {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
Object.defineProperty(this, "allowedModes", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: ["bearer"]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
32
|
+
/**
|
|
33
|
+
* The allowed modes for the command
|
|
34
|
+
*/
|
|
35
|
+
allowedModes = ["bearer"];
|
|
44
36
|
/**
|
|
45
37
|
* Parse the response
|
|
46
38
|
*/
|
|
@@ -35,18 +35,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
35
35
|
* List variables
|
|
36
36
|
*/
|
|
37
37
|
class VariableListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*/
|
|
43
|
-
Object.defineProperty(this, "allowedModes", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: ["bearer"]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
38
|
+
/**
|
|
39
|
+
* The allowed modes for the command
|
|
40
|
+
*/
|
|
41
|
+
allowedModes = ["bearer"];
|
|
50
42
|
/**
|
|
51
43
|
* Parse the response
|
|
52
44
|
*/
|
|
@@ -6,18 +6,10 @@ const command_js_1 = require("./command.js");
|
|
|
6
6
|
* Abstract command for executing GraphQL requests
|
|
7
7
|
*/
|
|
8
8
|
class GraphQlCommand extends command_js_1.Command {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(this, "allowedModes", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: ["bearer"]
|
|
19
|
-
});
|
|
20
|
-
}
|
|
9
|
+
/**
|
|
10
|
+
* The allowed modes for the command
|
|
11
|
+
*/
|
|
12
|
+
allowedModes = ["bearer"];
|
|
21
13
|
/**
|
|
22
14
|
* Get the base URL for the request
|
|
23
15
|
*/
|
package/script/common/command.js
CHANGED
|
@@ -31,52 +31,27 @@ const tenant_cache_js_1 = require("./tenant.cache.js");
|
|
|
31
31
|
* Abstract command for executing requests
|
|
32
32
|
*/
|
|
33
33
|
class Command {
|
|
34
|
+
/**
|
|
35
|
+
* Whether the command should retry on failure
|
|
36
|
+
*/
|
|
37
|
+
retryOnFailure = true;
|
|
38
|
+
/**
|
|
39
|
+
* The dedicated subdomain for the command
|
|
40
|
+
*/
|
|
41
|
+
dedicatedSubdomain;
|
|
42
|
+
/**
|
|
43
|
+
* The allowed modes for the command
|
|
44
|
+
*/
|
|
45
|
+
allowedModes = ["apiKey", "bearer"];
|
|
46
|
+
/**
|
|
47
|
+
* The input for the command
|
|
48
|
+
*/
|
|
49
|
+
input;
|
|
50
|
+
/**
|
|
51
|
+
* The client auth options
|
|
52
|
+
*/
|
|
53
|
+
clientAuthOptions = {};
|
|
34
54
|
constructor(input) {
|
|
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: true
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* The dedicated subdomain for the command
|
|
46
|
-
*/
|
|
47
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true,
|
|
51
|
-
value: void 0
|
|
52
|
-
});
|
|
53
|
-
/**
|
|
54
|
-
* The allowed modes for the command
|
|
55
|
-
*/
|
|
56
|
-
Object.defineProperty(this, "allowedModes", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
writable: true,
|
|
60
|
-
value: ["apiKey", "bearer"]
|
|
61
|
-
});
|
|
62
|
-
/**
|
|
63
|
-
* The input for the command
|
|
64
|
-
*/
|
|
65
|
-
Object.defineProperty(this, "input", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true,
|
|
69
|
-
value: void 0
|
|
70
|
-
});
|
|
71
|
-
/**
|
|
72
|
-
* The client auth options
|
|
73
|
-
*/
|
|
74
|
-
Object.defineProperty(this, "clientAuthOptions", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
configurable: true,
|
|
77
|
-
writable: true,
|
|
78
|
-
value: {}
|
|
79
|
-
});
|
|
80
55
|
/**
|
|
81
56
|
* The input for the command
|
|
82
57
|
*/
|
|
@@ -10,25 +10,11 @@ const RETRYABLE_ERROR_CODES = [408, 429, 500, 502, 503, 504];
|
|
|
10
10
|
* A base client for executing commands
|
|
11
11
|
*/
|
|
12
12
|
class FlowcoreClient {
|
|
13
|
+
options;
|
|
14
|
+
mode;
|
|
15
|
+
baseUrl;
|
|
13
16
|
constructor(options) {
|
|
14
|
-
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: options
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(this, "mode", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: void 0
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(this, "baseUrl", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
17
|
+
this.options = options;
|
|
32
18
|
if (this.options.getBearerToken) {
|
|
33
19
|
this.mode = "bearer";
|
|
34
20
|
}
|