@flowcore/sdk 1.9.3 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/esm/commands/api-key/api-key.create.d.ts +15 -3
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.create.js +31 -11
- package/esm/commands/api-key/api-key.delete.d.ts +1 -1
- package/esm/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.delete.js +2 -2
- package/esm/commands/api-key/api-key.list.d.ts +1 -1
- package/esm/commands/api-key/api-key.list.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.list.js +2 -2
- package/esm/commands/data-core/data-core.create.d.ts +6 -2
- package/esm/commands/data-core/data-core.create.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.create.js +12 -0
- package/esm/commands/data-core/data-core.delete-request.d.ts +6 -6
- package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.delete-request.js +7 -7
- package/esm/commands/data-core/data-core.fetch.d.ts +8 -4
- package/esm/commands/data-core/data-core.fetch.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.fetch.js +12 -1
- package/esm/commands/data-core/data-core.list.d.ts +2 -2
- package/esm/commands/data-core/data-core.list.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.update.d.ts +3 -3
- package/esm/commands/data-core/data-core.update.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.update.js +1 -1
- package/esm/commands/event-type/event-type.create.d.ts +6 -2
- package/esm/commands/event-type/event-type.create.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.create.js +12 -0
- package/esm/commands/event-type/event-type.delete-request.d.ts +8 -4
- package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.delete-request.js +13 -4
- package/esm/commands/event-type/event-type.fetch.d.ts +7 -3
- package/esm/commands/event-type/event-type.fetch.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.fetch.js +12 -1
- package/esm/commands/event-type/event-type.list.d.ts +2 -2
- package/esm/commands/event-type/event-type.list.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.update.d.ts +1 -1
- package/esm/commands/event-type/event-type.update.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.update.js +2 -2
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +2 -1
- package/esm/commands/events/events.fetch.d.ts +1 -1
- package/esm/commands/events/events.fetch.d.ts.map +1 -1
- package/esm/commands/events/events.fetch.js +2 -2
- package/esm/commands/flow-type/flow-type.create.d.ts +6 -2
- package/esm/commands/flow-type/flow-type.create.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.create.js +12 -0
- package/esm/commands/flow-type/flow-type.delete-request.d.ts +13 -6
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.js +13 -4
- package/esm/commands/flow-type/flow-type.fetch.d.ts +9 -5
- package/esm/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.fetch.js +12 -1
- package/esm/commands/flow-type/flow-type.list.d.ts +2 -2
- package/esm/commands/flow-type/flow-type.list.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.update.d.ts +3 -3
- package/esm/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.update.js +1 -1
- package/esm/commands/secret/secret.create.d.ts +1 -1
- package/esm/commands/secret/secret.create.d.ts.map +1 -1
- package/esm/commands/secret/secret.create.js +2 -2
- package/esm/commands/secret/secret.delete.d.ts +1 -1
- package/esm/commands/secret/secret.delete.d.ts.map +1 -1
- package/esm/commands/secret/secret.delete.js +2 -3
- package/esm/commands/secret/secret.list.d.ts +1 -1
- package/esm/commands/secret/secret.list.d.ts.map +1 -1
- package/esm/commands/secret/secret.list.js +2 -2
- package/esm/commands/tenant/tenant.fetch.d.ts +5 -6
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.fetch.js +7 -5
- package/esm/commands/tenant/tenant.list.d.ts +1 -1
- package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.list.js +2 -2
- package/esm/commands/variable/variable.create.d.ts +1 -1
- package/esm/commands/variable/variable.create.d.ts.map +1 -1
- package/esm/commands/variable/variable.create.js +2 -2
- package/esm/commands/variable/variable.delete.d.ts +1 -1
- package/esm/commands/variable/variable.delete.d.ts.map +1 -1
- package/esm/commands/variable/variable.delete.js +2 -2
- package/esm/commands/variable/variable.list.d.ts +1 -1
- package/esm/commands/variable/variable.list.d.ts.map +1 -1
- package/esm/commands/variable/variable.list.js +2 -2
- package/esm/common/command.d.ts +28 -6
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +43 -5
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +18 -11
- package/esm/exceptions/not-found.d.ts +1 -1
- package/esm/exceptions/not-found.d.ts.map +1 -1
- package/esm/exceptions/not-found.js +2 -2
- package/package.json +1 -1
- package/script/commands/api-key/api-key.create.d.ts +15 -3
- package/script/commands/api-key/api-key.create.d.ts.map +1 -1
- package/script/commands/api-key/api-key.create.js +31 -11
- package/script/commands/api-key/api-key.delete.d.ts +1 -1
- package/script/commands/api-key/api-key.delete.d.ts.map +1 -1
- package/script/commands/api-key/api-key.delete.js +2 -2
- package/script/commands/api-key/api-key.list.d.ts +1 -1
- package/script/commands/api-key/api-key.list.d.ts.map +1 -1
- package/script/commands/api-key/api-key.list.js +2 -2
- package/script/commands/data-core/data-core.create.d.ts +6 -2
- package/script/commands/data-core/data-core.create.d.ts.map +1 -1
- package/script/commands/data-core/data-core.create.js +12 -0
- package/script/commands/data-core/data-core.delete-request.d.ts +6 -6
- package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/script/commands/data-core/data-core.delete-request.js +7 -7
- package/script/commands/data-core/data-core.fetch.d.ts +8 -4
- package/script/commands/data-core/data-core.fetch.d.ts.map +1 -1
- package/script/commands/data-core/data-core.fetch.js +12 -1
- package/script/commands/data-core/data-core.list.d.ts +2 -2
- package/script/commands/data-core/data-core.list.d.ts.map +1 -1
- package/script/commands/data-core/data-core.update.d.ts +3 -3
- package/script/commands/data-core/data-core.update.d.ts.map +1 -1
- package/script/commands/data-core/data-core.update.js +1 -1
- package/script/commands/event-type/event-type.create.d.ts +6 -2
- package/script/commands/event-type/event-type.create.d.ts.map +1 -1
- package/script/commands/event-type/event-type.create.js +12 -0
- package/script/commands/event-type/event-type.delete-request.d.ts +8 -4
- package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/script/commands/event-type/event-type.delete-request.js +13 -4
- package/script/commands/event-type/event-type.fetch.d.ts +7 -3
- package/script/commands/event-type/event-type.fetch.d.ts.map +1 -1
- package/script/commands/event-type/event-type.fetch.js +12 -1
- package/script/commands/event-type/event-type.list.d.ts +2 -2
- package/script/commands/event-type/event-type.list.d.ts.map +1 -1
- package/script/commands/event-type/event-type.update.d.ts +1 -1
- package/script/commands/event-type/event-type.update.d.ts.map +1 -1
- package/script/commands/event-type/event-type.update.js +2 -2
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.js +2 -1
- package/script/commands/events/events.fetch.d.ts +1 -1
- package/script/commands/events/events.fetch.d.ts.map +1 -1
- package/script/commands/events/events.fetch.js +2 -2
- package/script/commands/flow-type/flow-type.create.d.ts +6 -2
- package/script/commands/flow-type/flow-type.create.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.create.js +12 -0
- package/script/commands/flow-type/flow-type.delete-request.d.ts +13 -6
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.delete-request.js +13 -4
- package/script/commands/flow-type/flow-type.fetch.d.ts +9 -5
- package/script/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.fetch.js +12 -1
- package/script/commands/flow-type/flow-type.list.d.ts +2 -2
- package/script/commands/flow-type/flow-type.list.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.update.d.ts +3 -3
- package/script/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.update.js +1 -1
- package/script/commands/secret/secret.create.d.ts +1 -1
- package/script/commands/secret/secret.create.d.ts.map +1 -1
- package/script/commands/secret/secret.create.js +2 -2
- package/script/commands/secret/secret.delete.d.ts +1 -1
- package/script/commands/secret/secret.delete.d.ts.map +1 -1
- package/script/commands/secret/secret.delete.js +2 -3
- package/script/commands/secret/secret.list.d.ts +1 -1
- package/script/commands/secret/secret.list.d.ts.map +1 -1
- package/script/commands/secret/secret.list.js +2 -2
- package/script/commands/tenant/tenant.fetch.d.ts +5 -6
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/script/commands/tenant/tenant.fetch.js +7 -5
- package/script/commands/tenant/tenant.list.d.ts +1 -1
- package/script/commands/tenant/tenant.list.d.ts.map +1 -1
- package/script/commands/tenant/tenant.list.js +2 -2
- package/script/commands/variable/variable.create.d.ts +1 -1
- package/script/commands/variable/variable.create.d.ts.map +1 -1
- package/script/commands/variable/variable.create.js +2 -2
- package/script/commands/variable/variable.delete.d.ts +1 -1
- package/script/commands/variable/variable.delete.d.ts.map +1 -1
- package/script/commands/variable/variable.delete.js +2 -2
- package/script/commands/variable/variable.list.d.ts +1 -1
- package/script/commands/variable/variable.list.d.ts.map +1 -1
- package/script/commands/variable/variable.list.js +2 -2
- package/script/common/command.d.ts +28 -6
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +43 -5
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +18 -11
- package/script/exceptions/not-found.d.ts +1 -1
- package/script/exceptions/not-found.d.ts.map +1 -1
- package/script/exceptions/not-found.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.1](https://github.com/flowcore-io/flowcore-sdk/compare/v1.10.0...v1.10.1) (2025-02-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* disable retry for create resource commands ([c97f990](https://github.com/flowcore-io/flowcore-sdk/commit/c97f99017aaf6deef7ca431a61b5b4c322c3788f))
|
|
9
|
+
|
|
10
|
+
## [1.10.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.9.3...v1.10.0) (2025-02-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add tests ([9590ea8](https://github.com/flowcore-io/flowcore-sdk/commit/9590ea8f95b23e219615c3219ae52c042925893f))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add explicit return ([5b30642](https://github.com/flowcore-io/flowcore-sdk/commit/5b3064238fd0c353c43ce9b7af5d42a434ff6e6f))
|
|
21
|
+
* add more tests ([814cb94](https://github.com/flowcore-io/flowcore-sdk/commit/814cb943df9cf5934530dfeec8db7167c4cc1273))
|
|
22
|
+
|
|
3
23
|
## [1.9.3](https://github.com/flowcore-io/flowcore-sdk/compare/v1.9.2...v1.9.3) (2025-02-03)
|
|
4
24
|
|
|
5
25
|
|
|
@@ -16,6 +16,10 @@ export interface ApiKeyCreateInput {
|
|
|
16
16
|
export declare class ApiKeyCreateCommand extends GraphQlCommand<ApiKeyCreateInput, ApiKey & {
|
|
17
17
|
value: string;
|
|
18
18
|
}> {
|
|
19
|
+
/**
|
|
20
|
+
* Whether the command should retry on failure
|
|
21
|
+
*/
|
|
22
|
+
protected retryOnFailure: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* The allowed modes for the command
|
|
21
25
|
*/
|
|
@@ -23,12 +27,20 @@ export declare class ApiKeyCreateCommand extends GraphQlCommand<ApiKeyCreateInpu
|
|
|
23
27
|
/**
|
|
24
28
|
* Parse the response
|
|
25
29
|
*/
|
|
26
|
-
protected parseResponse(rawResponse: unknown
|
|
30
|
+
protected parseResponse(rawResponse: unknown): ApiKey & {
|
|
27
31
|
value: string;
|
|
28
|
-
}
|
|
32
|
+
};
|
|
29
33
|
/**
|
|
30
34
|
* Get the body for the request
|
|
31
35
|
*/
|
|
32
|
-
protected getBody(): string
|
|
36
|
+
protected getBody(): Record<string, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Fill in the missing fields
|
|
39
|
+
*/
|
|
40
|
+
protected processResponse(flowcoreClient: FlowcoreClient, response: ApiKey & {
|
|
41
|
+
value: string;
|
|
42
|
+
}): Promise<ApiKey & {
|
|
43
|
+
value: string;
|
|
44
|
+
}>;
|
|
33
45
|
}
|
|
34
46
|
//# sourceMappingURL=api-key.create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.create.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;CACb;AA4BD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;IACpG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;
|
|
1
|
+
{"version":3,"file":"api-key.create.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;CACb;AA4BD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;IACpG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAC9B,WAAW,EAAE,OAAO,GACnB,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAiB7B;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CACtC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GACnC,OAAO,CAAC,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAevC"}
|
|
@@ -29,6 +29,15 @@ const responseSchema = Type.Object({
|
|
|
29
29
|
export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments);
|
|
32
|
+
/**
|
|
33
|
+
* Whether the command should retry on failure
|
|
34
|
+
*/
|
|
35
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: false
|
|
40
|
+
});
|
|
32
41
|
/**
|
|
33
42
|
* The allowed modes for the command
|
|
34
43
|
*/
|
|
@@ -42,7 +51,7 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
42
51
|
/**
|
|
43
52
|
* Parse the response
|
|
44
53
|
*/
|
|
45
|
-
|
|
54
|
+
parseResponse(rawResponse) {
|
|
46
55
|
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
47
56
|
if (response.errors) {
|
|
48
57
|
throw new CommandError(this.constructor.name, response.errors[0].message);
|
|
@@ -50,15 +59,10 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
50
59
|
if (!response.data || response.data?.organization.createApiKey === null) {
|
|
51
60
|
throw new CommandError(this.constructor.name, "Failed to create API key");
|
|
52
61
|
}
|
|
53
|
-
const apiKeys = await flowcoreClient.execute(new ApiKeyListCommand({
|
|
54
|
-
tenantId: this.input.tenantId,
|
|
55
|
-
}));
|
|
56
|
-
const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
|
|
57
|
-
if (!apiKey) {
|
|
58
|
-
throw new Error("API key not found");
|
|
59
|
-
}
|
|
60
62
|
return {
|
|
61
|
-
|
|
63
|
+
id: "",
|
|
64
|
+
name: "",
|
|
65
|
+
createdAt: "",
|
|
62
66
|
value: response.data.organization.createApiKey,
|
|
63
67
|
};
|
|
64
68
|
}
|
|
@@ -66,9 +70,25 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
66
70
|
* Get the body for the request
|
|
67
71
|
*/
|
|
68
72
|
getBody() {
|
|
69
|
-
return
|
|
73
|
+
return {
|
|
70
74
|
query: graphQlQueryById,
|
|
71
75
|
variables: this.input,
|
|
72
|
-
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Fill in the missing fields
|
|
80
|
+
*/
|
|
81
|
+
async processResponse(flowcoreClient, response) {
|
|
82
|
+
const apiKeys = await flowcoreClient.execute(new ApiKeyListCommand({
|
|
83
|
+
tenantId: this.input.tenantId,
|
|
84
|
+
}));
|
|
85
|
+
const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
|
|
86
|
+
if (!apiKey) {
|
|
87
|
+
throw new Error("API key not found");
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...apiKey,
|
|
91
|
+
value: response.value,
|
|
92
|
+
};
|
|
73
93
|
}
|
|
74
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAyBD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACjF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAyBD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACjF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA0BD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE;IAKhE;;OAEG;cACgB,OAAO,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA0BD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE;IAKhE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
|
|
@@ -3,7 +3,7 @@ import { type DataCore } from "../../contracts/data-core.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the data core create command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface DataCoreCreateInput {
|
|
7
7
|
/** The tenant id */
|
|
8
8
|
tenantId: string;
|
|
9
9
|
/** The name of the data core */
|
|
@@ -14,11 +14,15 @@ export type DataCoreCreateInput = {
|
|
|
14
14
|
accessControl: "public" | "private";
|
|
15
15
|
/** Whether the data core is delete protected */
|
|
16
16
|
deleteProtection: boolean;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
/**
|
|
19
19
|
* Create a data core
|
|
20
20
|
*/
|
|
21
21
|
export declare class DataCoreCreateCommand extends Command<DataCoreCreateInput, DataCore> {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the command should retry on failure
|
|
24
|
+
*/
|
|
25
|
+
protected retryOnFailure: boolean;
|
|
22
26
|
/**
|
|
23
27
|
* Get the method
|
|
24
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-core.create.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"data-core.create.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAA;IACnC,gDAAgD;IAChD,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;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,QAAQ;CAGjE"}
|
|
@@ -5,6 +5,18 @@ import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
|
5
5
|
* Create a data core
|
|
6
6
|
*/
|
|
7
7
|
export class DataCoreCreateCommand extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* Whether the command should retry on failure
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: false
|
|
18
|
+
});
|
|
19
|
+
}
|
|
8
20
|
/**
|
|
9
21
|
* Get the method
|
|
10
22
|
*/
|
|
@@ -3,20 +3,20 @@ import type { FlowcoreClient } from "../../common/flowcore-client.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the data core delete request command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface DataCoreDeleteRequestInput {
|
|
7
7
|
/** The id of the data core */
|
|
8
8
|
dataCoreId: string;
|
|
9
9
|
/** Wait for the data core to be deleted (default: true) */
|
|
10
10
|
waitForDelete?: boolean;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Request to delete a data core
|
|
14
14
|
*/
|
|
15
15
|
export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCoreDeleteRequestInput, boolean> {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
18
|
*/
|
|
19
|
-
protected
|
|
19
|
+
protected retryOnFailure: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Create a new data core delete request command
|
|
22
22
|
*/
|
|
@@ -28,10 +28,10 @@ export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCor
|
|
|
28
28
|
/**
|
|
29
29
|
* Get the body for the request
|
|
30
30
|
*/
|
|
31
|
-
protected getBody(): string
|
|
31
|
+
protected getBody(): Record<string, unknown>;
|
|
32
32
|
/**
|
|
33
33
|
* Wait for the response (timeout: 25 seconds)
|
|
34
34
|
*/
|
|
35
|
-
protected
|
|
35
|
+
protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=data-core.delete-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-core.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"data-core.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AA4BD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
|
|
@@ -41,13 +41,13 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
41
41
|
waitForDelete: input.waitForDelete ?? true,
|
|
42
42
|
});
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Whether the command should retry on failure
|
|
45
45
|
*/
|
|
46
|
-
Object.defineProperty(this, "
|
|
46
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
47
47
|
enumerable: true,
|
|
48
48
|
configurable: true,
|
|
49
49
|
writable: true,
|
|
50
|
-
value:
|
|
50
|
+
value: false
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
@@ -59,7 +59,7 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
59
59
|
throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
60
60
|
}
|
|
61
61
|
if (!parsedResponse.data.datacore?.requestDelete) {
|
|
62
|
-
throw new NotFoundException("DataCore", this.input.dataCoreId);
|
|
62
|
+
throw new NotFoundException("DataCore", { id: this.input.dataCoreId });
|
|
63
63
|
}
|
|
64
64
|
return parsedResponse.data.datacore.requestDelete.deleting;
|
|
65
65
|
}
|
|
@@ -67,15 +67,15 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
67
67
|
* Get the body for the request
|
|
68
68
|
*/
|
|
69
69
|
getBody() {
|
|
70
|
-
return
|
|
70
|
+
return {
|
|
71
71
|
query: graphQlQuery,
|
|
72
72
|
variables: this.input,
|
|
73
|
-
}
|
|
73
|
+
};
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Wait for the response (timeout: 25 seconds)
|
|
77
77
|
*/
|
|
78
|
-
async
|
|
78
|
+
async processResponse(client, response) {
|
|
79
79
|
if (!this.input.waitForDelete) {
|
|
80
80
|
return response;
|
|
81
81
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type DataCore } from "../../contracts/data-core.js";
|
|
3
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
4
|
/**
|
|
4
5
|
* The input for the data core fetch by id command
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
export interface DataCoreFetchByIdInput {
|
|
7
8
|
/** The id of the data core */
|
|
8
9
|
dataCoreId: string;
|
|
9
10
|
/** The name of the data core */
|
|
10
11
|
dataCore?: never;
|
|
11
12
|
/** The tenant id */
|
|
12
13
|
tenantId?: never;
|
|
13
|
-
}
|
|
14
|
+
}
|
|
14
15
|
/**
|
|
15
16
|
* The input for the data core fetch by name command
|
|
16
17
|
*/
|
|
17
|
-
interface DataCoreFetchByNameInput {
|
|
18
|
+
export interface DataCoreFetchByNameInput {
|
|
18
19
|
/** The tenant id */
|
|
19
20
|
tenantId: string;
|
|
20
21
|
/** The name of the data core */
|
|
@@ -46,6 +47,9 @@ export declare class DataCoreFetchCommand extends Command<DataCoreFetchInput, Da
|
|
|
46
47
|
* Parse the response
|
|
47
48
|
*/
|
|
48
49
|
protected parseResponse(rawResponse: unknown): DataCore;
|
|
50
|
+
/**
|
|
51
|
+
* Handle the client error
|
|
52
|
+
*/
|
|
53
|
+
protected handleClientError(error: ClientError): void;
|
|
49
54
|
}
|
|
50
|
-
export {};
|
|
51
55
|
//# sourceMappingURL=data-core.fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-core.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"data-core.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,wBAAwB,CAAA;AAElF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAYhE;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -41,8 +41,19 @@ export class DataCoreFetchCommand extends Command {
|
|
|
41
41
|
}
|
|
42
42
|
const response = parseResponseHelper(Type.Array(DataCoreSchema), rawResponse);
|
|
43
43
|
if (response.length === 0) {
|
|
44
|
-
throw new NotFoundException("DataCore", this.input.dataCore);
|
|
44
|
+
throw new NotFoundException("DataCore", { name: this.input.dataCore });
|
|
45
45
|
}
|
|
46
46
|
return response[0];
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Handle the client error
|
|
50
|
+
*/
|
|
51
|
+
handleClientError(error) {
|
|
52
|
+
if (error.status === 404) {
|
|
53
|
+
throw new NotFoundException("DataCore", {
|
|
54
|
+
[this.input.dataCoreId ? "id" : "name"]: this.input.dataCoreId ?? this.input.dataCore,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
48
59
|
}
|
|
@@ -3,12 +3,12 @@ import { type DataCore } from "../../contracts/data-core.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the data core fetch by name command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface DataCoreListInput {
|
|
7
7
|
/** The tenant id */
|
|
8
8
|
tenantId?: string;
|
|
9
9
|
/** The tenant name */
|
|
10
10
|
tenant?: string;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Fetch all data cores for a tenant
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"data-core.list.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAWpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;CAGnE"}
|
|
@@ -3,7 +3,7 @@ import { type DataCore } from "../../contracts/data-core.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the data core update command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface DataCoreUpdateInput {
|
|
7
7
|
/** The id of the data core */
|
|
8
8
|
dataCoreId: string;
|
|
9
9
|
/** The description of the data core */
|
|
@@ -12,7 +12,7 @@ export type DataCoreUpdateInput = {
|
|
|
12
12
|
accessControl?: "public" | "private";
|
|
13
13
|
/** Whether the data core is delete protected */
|
|
14
14
|
deleteProtection?: boolean;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
16
|
/**
|
|
17
17
|
* Update a data core
|
|
18
18
|
*/
|
|
@@ -32,7 +32,7 @@ export declare class DataCoreUpdateCommand extends Command<DataCoreUpdateInput,
|
|
|
32
32
|
/**
|
|
33
33
|
* Get the body for the request
|
|
34
34
|
*/
|
|
35
|
-
protected getBody(): string
|
|
35
|
+
protected getBody(): Record<string, unknown>;
|
|
36
36
|
/**
|
|
37
37
|
* Parse the response
|
|
38
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-core.update.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"data-core.update.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
|
|
@@ -32,7 +32,7 @@ export class DataCoreUpdateCommand extends Command {
|
|
|
32
32
|
if (Object.keys(payload).length === 0) {
|
|
33
33
|
throw new CommandError(this.constructor.name, "No fields to update");
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return payload;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Parse the response
|
|
@@ -3,18 +3,22 @@ import { type EventType } from "../../contracts/event-type.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the event type create command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface EventTypeCreateInput {
|
|
7
7
|
/** The id of the flow type */
|
|
8
8
|
flowTypeId: string;
|
|
9
9
|
/** The name of the event type */
|
|
10
10
|
name: string;
|
|
11
11
|
/** The description of the event type */
|
|
12
12
|
description: string;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
/**
|
|
15
15
|
* Create an event type
|
|
16
16
|
*/
|
|
17
17
|
export declare class EventTypeCreateCommand extends Command<EventTypeCreateInput, EventType> {
|
|
18
|
+
/**
|
|
19
|
+
* Whether the command should retry on failure
|
|
20
|
+
*/
|
|
21
|
+
protected retryOnFailure: boolean;
|
|
18
22
|
/**
|
|
19
23
|
* Get the method
|
|
20
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.create.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"event-type.create.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAClF;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;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,SAAS;CAGlE"}
|
|
@@ -5,6 +5,18 @@ import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
|
5
5
|
* Create an event type
|
|
6
6
|
*/
|
|
7
7
|
export class EventTypeCreateCommand extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* Whether the command should retry on failure
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: false
|
|
18
|
+
});
|
|
19
|
+
}
|
|
8
20
|
/**
|
|
9
21
|
* Get the method
|
|
10
22
|
*/
|
|
@@ -3,16 +3,20 @@ import type { FlowcoreClient } from "../../common/flowcore-client.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the event type delete request command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface EventTypeDeleteRequestInput {
|
|
7
7
|
/** The id of the event type */
|
|
8
8
|
eventTypeId: string;
|
|
9
9
|
/** Wait for the event type to be deleted (default: true) */
|
|
10
10
|
waitForDelete?: boolean;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Request to delete a event type
|
|
14
14
|
*/
|
|
15
15
|
export declare class EventTypeDeleteRequestCommand extends GraphQlCommand<EventTypeDeleteRequestInput, boolean> {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
protected retryOnFailure: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* The allowed modes for the command
|
|
18
22
|
*/
|
|
@@ -28,10 +32,10 @@ export declare class EventTypeDeleteRequestCommand extends GraphQlCommand<EventT
|
|
|
28
32
|
/**
|
|
29
33
|
* Get the body for the request
|
|
30
34
|
*/
|
|
31
|
-
protected getBody(): string
|
|
35
|
+
protected getBody(): Record<string, unknown>;
|
|
32
36
|
/**
|
|
33
37
|
* Wait for the response (timeout: 25 seconds)
|
|
34
38
|
*/
|
|
35
|
-
protected
|
|
39
|
+
protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
36
40
|
}
|
|
37
41
|
//# sourceMappingURL=event-type.delete-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"event-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AA+BD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,2BAA2B;IAO9C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
|
|
@@ -43,6 +43,15 @@ export class EventTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
43
43
|
...input,
|
|
44
44
|
waitForDelete: input.waitForDelete ?? true,
|
|
45
45
|
});
|
|
46
|
+
/**
|
|
47
|
+
* Whether the command should retry on failure
|
|
48
|
+
*/
|
|
49
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: false
|
|
54
|
+
});
|
|
46
55
|
/**
|
|
47
56
|
* The allowed modes for the command
|
|
48
57
|
*/
|
|
@@ -62,7 +71,7 @@ export class EventTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
62
71
|
throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
63
72
|
}
|
|
64
73
|
if (!parsedResponse.data?.eventType?.requestDelete) {
|
|
65
|
-
throw new NotFoundException("EventType", this.input.eventTypeId);
|
|
74
|
+
throw new NotFoundException("EventType", { id: this.input.eventTypeId });
|
|
66
75
|
}
|
|
67
76
|
return parsedResponse.data.eventType.requestDelete.deleting;
|
|
68
77
|
}
|
|
@@ -71,15 +80,15 @@ export class EventTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
71
80
|
*/
|
|
72
81
|
getBody() {
|
|
73
82
|
const { waitForDelete: _, ...rest } = this.input;
|
|
74
|
-
return
|
|
83
|
+
return {
|
|
75
84
|
query: graphQlQuery,
|
|
76
85
|
variables: rest,
|
|
77
|
-
}
|
|
86
|
+
};
|
|
78
87
|
}
|
|
79
88
|
/**
|
|
80
89
|
* Wait for the response (timeout: 25 seconds)
|
|
81
90
|
*/
|
|
82
|
-
async
|
|
91
|
+
async processResponse(client, response) {
|
|
83
92
|
if (!this.input.waitForDelete) {
|
|
84
93
|
return response;
|
|
85
94
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type EventType } from "../../contracts/event-type.js";
|
|
3
|
-
|
|
3
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
4
|
+
export interface EventTypeFetchByIdInput {
|
|
4
5
|
/** The id of the event type */
|
|
5
6
|
eventTypeId: string;
|
|
6
7
|
/** The id of the flow type */
|
|
@@ -8,7 +9,7 @@ interface EventTypeFetchByIdInput {
|
|
|
8
9
|
/** The name of the event type */
|
|
9
10
|
eventType?: never;
|
|
10
11
|
}
|
|
11
|
-
interface EventTypeFetchByNameInput {
|
|
12
|
+
export interface EventTypeFetchByNameInput {
|
|
12
13
|
/** The id of the flow type */
|
|
13
14
|
flowTypeId: string;
|
|
14
15
|
/** The name of the event type */
|
|
@@ -40,6 +41,9 @@ export declare class EventTypeFetchCommand extends Command<EventTypeFetchInput,
|
|
|
40
41
|
* Parse the response
|
|
41
42
|
*/
|
|
42
43
|
protected parseResponse(rawResponse: unknown): EventType;
|
|
44
|
+
/**
|
|
45
|
+
* Handle the client error
|
|
46
|
+
*/
|
|
47
|
+
protected handleClientError(error: ClientError): void;
|
|
43
48
|
}
|
|
44
|
-
export {};
|
|
45
49
|
//# sourceMappingURL=event-type.fetch.d.ts.map
|