@flowcore/sdk 1.9.3 → 1.10.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 +13 -0
- package/esm/commands/api-key/api-key.create.d.ts +11 -3
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.create.js +22 -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.delete-request.d.ts +2 -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 +4 -13
- package/esm/commands/data-core/data-core.fetch.d.ts +5 -0
- 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.update.d.ts +1 -1
- 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.delete-request.d.ts +2 -2
- package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.delete-request.js +4 -4
- package/esm/commands/event-type/event-type.fetch.d.ts +5 -0
- 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.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.delete-request.d.ts +6 -4
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.js +4 -4
- package/esm/commands/flow-type/flow-type.fetch.d.ts +5 -0
- 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.update.d.ts +1 -1
- 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 +1 -1
- 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 +23 -6
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +33 -5
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +15 -9
- 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 +11 -3
- package/script/commands/api-key/api-key.create.d.ts.map +1 -1
- package/script/commands/api-key/api-key.create.js +22 -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.delete-request.d.ts +2 -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 +4 -13
- package/script/commands/data-core/data-core.fetch.d.ts +5 -0
- 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.update.d.ts +1 -1
- 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.delete-request.d.ts +2 -2
- package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
- package/script/commands/event-type/event-type.delete-request.js +4 -4
- package/script/commands/event-type/event-type.fetch.d.ts +5 -0
- 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.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.delete-request.d.ts +6 -4
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.delete-request.js +4 -4
- package/script/commands/flow-type/flow-type.fetch.d.ts +5 -0
- 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.update.d.ts +1 -1
- 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 +1 -1
- 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 +23 -6
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +33 -5
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +15 -9
- 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,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.9.3...v1.10.0) (2025-02-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add tests ([9590ea8](https://github.com/flowcore-io/flowcore-sdk/commit/9590ea8f95b23e219615c3219ae52c042925893f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add explicit return ([5b30642](https://github.com/flowcore-io/flowcore-sdk/commit/5b3064238fd0c353c43ce9b7af5d42a434ff6e6f))
|
|
14
|
+
* add more tests ([814cb94](https://github.com/flowcore-io/flowcore-sdk/commit/814cb943df9cf5934530dfeec8db7167c4cc1273))
|
|
15
|
+
|
|
3
16
|
## [1.9.3](https://github.com/flowcore-io/flowcore-sdk/compare/v1.9.2...v1.9.3) (2025-02-03)
|
|
4
17
|
|
|
5
18
|
|
|
@@ -23,12 +23,20 @@ export declare class ApiKeyCreateCommand extends GraphQlCommand<ApiKeyCreateInpu
|
|
|
23
23
|
/**
|
|
24
24
|
* Parse the response
|
|
25
25
|
*/
|
|
26
|
-
protected parseResponse(rawResponse: unknown
|
|
26
|
+
protected parseResponse(rawResponse: unknown): ApiKey & {
|
|
27
27
|
value: string;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
/**
|
|
30
30
|
* Get the body for the request
|
|
31
31
|
*/
|
|
32
|
-
protected getBody(): string
|
|
32
|
+
protected getBody(): Record<string, unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* Fill in the missing fields
|
|
35
|
+
*/
|
|
36
|
+
protected processResponse(flowcoreClient: FlowcoreClient, response: ApiKey & {
|
|
37
|
+
value: string;
|
|
38
|
+
}): Promise<ApiKey & {
|
|
39
|
+
value: string;
|
|
40
|
+
}>;
|
|
33
41
|
}
|
|
34
42
|
//# 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,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"}
|
|
@@ -42,7 +42,7 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
42
42
|
/**
|
|
43
43
|
* Parse the response
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
parseResponse(rawResponse) {
|
|
46
46
|
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
47
47
|
if (response.errors) {
|
|
48
48
|
throw new CommandError(this.constructor.name, response.errors[0].message);
|
|
@@ -50,15 +50,10 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
50
50
|
if (!response.data || response.data?.organization.createApiKey === null) {
|
|
51
51
|
throw new CommandError(this.constructor.name, "Failed to create API key");
|
|
52
52
|
}
|
|
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
53
|
return {
|
|
61
|
-
|
|
54
|
+
id: "",
|
|
55
|
+
name: "",
|
|
56
|
+
createdAt: "",
|
|
62
57
|
value: response.data.organization.createApiKey,
|
|
63
58
|
};
|
|
64
59
|
}
|
|
@@ -66,9 +61,25 @@ export class ApiKeyCreateCommand extends GraphQlCommand {
|
|
|
66
61
|
* Get the body for the request
|
|
67
62
|
*/
|
|
68
63
|
getBody() {
|
|
69
|
-
return
|
|
64
|
+
return {
|
|
70
65
|
query: graphQlQueryById,
|
|
71
66
|
variables: this.input,
|
|
72
|
-
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Fill in the missing fields
|
|
71
|
+
*/
|
|
72
|
+
async processResponse(flowcoreClient, response) {
|
|
73
|
+
const apiKeys = await flowcoreClient.execute(new ApiKeyListCommand({
|
|
74
|
+
tenantId: this.input.tenantId,
|
|
75
|
+
}));
|
|
76
|
+
const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
|
|
77
|
+
if (!apiKey) {
|
|
78
|
+
throw new Error("API key not found");
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
...apiKey,
|
|
82
|
+
value: response.value,
|
|
83
|
+
};
|
|
73
84
|
}
|
|
74
85
|
}
|
|
@@ -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"}
|
|
@@ -13,10 +13,6 @@ export type DataCoreDeleteRequestInput = {
|
|
|
13
13
|
* Request to delete a data core
|
|
14
14
|
*/
|
|
15
15
|
export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCoreDeleteRequestInput, boolean> {
|
|
16
|
-
/**
|
|
17
|
-
* The allowed modes for the command
|
|
18
|
-
*/
|
|
19
|
-
protected allowedModes: ("apiKey" | "bearer")[];
|
|
20
16
|
/**
|
|
21
17
|
* Create a new data core delete request command
|
|
22
18
|
*/
|
|
@@ -28,10 +24,10 @@ export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCor
|
|
|
28
24
|
/**
|
|
29
25
|
* Get the body for the request
|
|
30
26
|
*/
|
|
31
|
-
protected getBody(): string
|
|
27
|
+
protected getBody(): Record<string, unknown>;
|
|
32
28
|
/**
|
|
33
29
|
* Wait for the response (timeout: 25 seconds)
|
|
34
30
|
*/
|
|
35
|
-
protected
|
|
31
|
+
protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
36
32
|
}
|
|
37
33
|
//# 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,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA4BD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;
|
|
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,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA4BD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;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"}
|
|
@@ -40,15 +40,6 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
40
40
|
...input,
|
|
41
41
|
waitForDelete: input.waitForDelete ?? true,
|
|
42
42
|
});
|
|
43
|
-
/**
|
|
44
|
-
* The allowed modes for the command
|
|
45
|
-
*/
|
|
46
|
-
Object.defineProperty(this, "allowedModes", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true,
|
|
49
|
-
writable: true,
|
|
50
|
-
value: ["bearer"]
|
|
51
|
-
});
|
|
52
43
|
}
|
|
53
44
|
/**
|
|
54
45
|
* Parse the response
|
|
@@ -59,7 +50,7 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
59
50
|
throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
60
51
|
}
|
|
61
52
|
if (!parsedResponse.data.datacore?.requestDelete) {
|
|
62
|
-
throw new NotFoundException("DataCore", this.input.dataCoreId);
|
|
53
|
+
throw new NotFoundException("DataCore", { id: this.input.dataCoreId });
|
|
63
54
|
}
|
|
64
55
|
return parsedResponse.data.datacore.requestDelete.deleting;
|
|
65
56
|
}
|
|
@@ -67,15 +58,15 @@ export class DataCoreDeleteRequestCommand extends GraphQlCommand {
|
|
|
67
58
|
* Get the body for the request
|
|
68
59
|
*/
|
|
69
60
|
getBody() {
|
|
70
|
-
return
|
|
61
|
+
return {
|
|
71
62
|
query: graphQlQuery,
|
|
72
63
|
variables: this.input,
|
|
73
|
-
}
|
|
64
|
+
};
|
|
74
65
|
}
|
|
75
66
|
/**
|
|
76
67
|
* Wait for the response (timeout: 25 seconds)
|
|
77
68
|
*/
|
|
78
|
-
async
|
|
69
|
+
async processResponse(client, response) {
|
|
79
70
|
if (!this.input.waitForDelete) {
|
|
80
71
|
return response;
|
|
81
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
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
|
*/
|
|
@@ -46,6 +47,10 @@ 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
55
|
export {};
|
|
51
56
|
//# 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,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,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
|
}
|
|
@@ -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,MAAM,mBAAmB,GAAG;IAChC,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,CAAA;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,
|
|
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,MAAM,mBAAmB,GAAG;IAChC,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,CAAA;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
|
|
@@ -28,10 +28,10 @@ export declare class EventTypeDeleteRequestCommand extends GraphQlCommand<EventT
|
|
|
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=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,MAAM,2BAA2B,GAAG;IACxC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA+BD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;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;
|
|
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,MAAM,2BAA2B,GAAG;IACxC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA+BD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;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"}
|
|
@@ -62,7 +62,7 @@ export class EventTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
62
62
|
throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
63
63
|
}
|
|
64
64
|
if (!parsedResponse.data?.eventType?.requestDelete) {
|
|
65
|
-
throw new NotFoundException("EventType", this.input.eventTypeId);
|
|
65
|
+
throw new NotFoundException("EventType", { id: this.input.eventTypeId });
|
|
66
66
|
}
|
|
67
67
|
return parsedResponse.data.eventType.requestDelete.deleting;
|
|
68
68
|
}
|
|
@@ -71,15 +71,15 @@ export class EventTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
71
71
|
*/
|
|
72
72
|
getBody() {
|
|
73
73
|
const { waitForDelete: _, ...rest } = this.input;
|
|
74
|
-
return
|
|
74
|
+
return {
|
|
75
75
|
query: graphQlQuery,
|
|
76
76
|
variables: rest,
|
|
77
|
-
}
|
|
77
|
+
};
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Wait for the response (timeout: 25 seconds)
|
|
81
81
|
*/
|
|
82
|
-
async
|
|
82
|
+
async processResponse(client, response) {
|
|
83
83
|
if (!this.input.waitForDelete) {
|
|
84
84
|
return response;
|
|
85
85
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type EventType } from "../../contracts/event-type.js";
|
|
3
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
4
|
interface EventTypeFetchByIdInput {
|
|
4
5
|
/** The id of the event type */
|
|
5
6
|
eventTypeId: string;
|
|
@@ -40,6 +41,10 @@ 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
49
|
export {};
|
|
45
50
|
//# sourceMappingURL=event-type.fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"event-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,UAAU,uBAAuB;IAC/B,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAA;CAClB;AAED,UAAU,yBAAyB;IACjC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG,yBAAyB,CAAA;AAErF;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAChF;;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,SAAS;IAYjE;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -41,8 +41,19 @@ export class EventTypeFetchCommand extends Command {
|
|
|
41
41
|
}
|
|
42
42
|
const response = parseResponseHelper(Type.Array(EventTypeSchema), rawResponse);
|
|
43
43
|
if (response.length === 0) {
|
|
44
|
-
throw new NotFoundException("EventType", this.input.eventType);
|
|
44
|
+
throw new NotFoundException("EventType", { name: this.input.eventType });
|
|
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("EventType", {
|
|
54
|
+
[this.input.eventTypeId ? "id" : "name"]: this.input.eventTypeId ?? this.input.eventType,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
48
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.update.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,MAAM,oBAAoB,GAAG;IACjC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAClF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"event-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.update.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,MAAM,oBAAoB,GAAG;IACjC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAClF;;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;IAKrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;CAGlE"}
|
|
@@ -27,8 +27,8 @@ export class EventTypeUpdateCommand extends Command {
|
|
|
27
27
|
* Get the body for the request
|
|
28
28
|
*/
|
|
29
29
|
getBody() {
|
|
30
|
-
const { eventTypeId:
|
|
31
|
-
return
|
|
30
|
+
const { eventTypeId: _, ...payload } = this.input;
|
|
31
|
+
return payload;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Parse the response
|
|
@@ -48,6 +48,6 @@ export declare class EventsFetchTimeBucketsByNamesCommand extends Command<Events
|
|
|
48
48
|
/**
|
|
49
49
|
* Get the body for the request
|
|
50
50
|
*/
|
|
51
|
-
protected getBody(): string
|
|
51
|
+
protected getBody(): Record<string, unknown>;
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=events.fetch-time-buckets-by-names.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.fetch-time-buckets-by-names.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch-time-buckets-by-names.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,OAAO,CAC/D,kCAAkC,EAClC,mCAAmC,CACpC;IACC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAGpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,mCAAmC;IAK3F;;OAEG;cACgB,OAAO,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"events.fetch-time-buckets-by-names.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch-time-buckets-by-names.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,OAAO,CAC/D,kCAAkC,EAClC,mCAAmC,CACpC;IACC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAGpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,mCAAmC;IAK3F;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAItD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC9F;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,OAAO,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"events.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC9F;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAStD"}
|
|
@@ -43,12 +43,12 @@ export class EventsFetchCommand extends Command {
|
|
|
43
43
|
* Get the body for the request
|
|
44
44
|
*/
|
|
45
45
|
getBody() {
|
|
46
|
-
return
|
|
46
|
+
return {
|
|
47
47
|
tenant: this.input.tenant,
|
|
48
48
|
dataCoreId: this.input.dataCoreId,
|
|
49
49
|
flowType: this.input.flowType,
|
|
50
50
|
eventTypes: this.input.eventTypes,
|
|
51
51
|
timeBucket: this.input.timeBucket,
|
|
52
|
-
}
|
|
52
|
+
};
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraphQlCommand } from "../../common/command.js";
|
|
2
2
|
import type { FlowcoreClient } from "../../common/flowcore-client.js";
|
|
3
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
4
|
/**
|
|
4
5
|
* The input for the flow type delete request command
|
|
5
6
|
*/
|
|
@@ -32,16 +33,17 @@ export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTyp
|
|
|
32
33
|
baseUrl: string;
|
|
33
34
|
path: string;
|
|
34
35
|
method: string;
|
|
35
|
-
parseResponse: (response: unknown
|
|
36
|
-
|
|
36
|
+
parseResponse: (response: unknown) => boolean | Promise<boolean>;
|
|
37
|
+
processResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
|
|
38
|
+
handleClientError: (error: ClientError) => void;
|
|
37
39
|
}>;
|
|
38
40
|
/**
|
|
39
41
|
* Get the body for the request
|
|
40
42
|
*/
|
|
41
|
-
protected getBody(): string
|
|
43
|
+
protected getBody(): Record<string, unknown>;
|
|
42
44
|
/**
|
|
43
45
|
* Wait for the response (timeout: 25 seconds)
|
|
44
46
|
*/
|
|
45
|
-
protected
|
|
47
|
+
protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
46
48
|
}
|
|
47
49
|
//# sourceMappingURL=flow-type.delete-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"flow-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAmCD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAWtC,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAC/D;QACE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;QACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAChE,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;QAChF,iBAAiB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;KAChD,CACF;IAqBD;;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"}
|
|
@@ -67,7 +67,7 @@ export class FlowTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
67
67
|
throw new CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
68
68
|
}
|
|
69
69
|
if (!parsedResponse.data?.datacore?.flowtype?.requestDelete) {
|
|
70
|
-
throw new NotFoundException("FlowType", this.input.flowTypeId);
|
|
70
|
+
throw new NotFoundException("FlowType", { id: this.input.flowTypeId });
|
|
71
71
|
}
|
|
72
72
|
return parsedResponse.data.datacore.flowtype.requestDelete.deleting;
|
|
73
73
|
}
|
|
@@ -91,15 +91,15 @@ export class FlowTypeDeleteRequestCommand extends GraphQlCommand {
|
|
|
91
91
|
* Get the body for the request
|
|
92
92
|
*/
|
|
93
93
|
getBody() {
|
|
94
|
-
return
|
|
94
|
+
return {
|
|
95
95
|
query: graphQlQuery,
|
|
96
96
|
variables: this.input,
|
|
97
|
-
}
|
|
97
|
+
};
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Wait for the response (timeout: 25 seconds)
|
|
101
101
|
*/
|
|
102
|
-
async
|
|
102
|
+
async processResponse(client, response) {
|
|
103
103
|
if (!this.input.waitForDelete) {
|
|
104
104
|
return response;
|
|
105
105
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type FlowType } from "../../contracts/flow-type.js";
|
|
3
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
4
|
/**
|
|
4
5
|
* The input for the flow type fetch by name command
|
|
5
6
|
*/
|
|
@@ -46,6 +47,10 @@ export declare class FlowTypeFetchCommand extends Command<FlowTypeFetchInput, Fl
|
|
|
46
47
|
* Parse the response
|
|
47
48
|
*/
|
|
48
49
|
protected parseResponse(rawResponse: unknown): FlowType;
|
|
50
|
+
/**
|
|
51
|
+
* Handle the client error
|
|
52
|
+
*/
|
|
53
|
+
protected handleClientError(error: ClientError): void;
|
|
49
54
|
}
|
|
50
55
|
export {};
|
|
51
56
|
//# sourceMappingURL=flow-type.fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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":"flow-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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,KAAK,wBAAwB,GAAG;IAC9B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;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 FlowTypeFetchCommand extends Command {
|
|
|
41
41
|
}
|
|
42
42
|
const response = parseResponseHelper(Type.Array(FlowTypeSchema), rawResponse);
|
|
43
43
|
if (response.length === 0) {
|
|
44
|
-
throw new NotFoundException("FlowType", this.input.flowType);
|
|
44
|
+
throw new NotFoundException("FlowType", { name: this.input.flowType });
|
|
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("FlowType", {
|
|
54
|
+
[this.input.flowTypeId ? "id" : "name"]: this.input.flowTypeId ?? this.input.flowType,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
48
59
|
}
|