@flowcore/sdk 1.9.2 → 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 +20 -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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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
|
@@ -45,7 +45,7 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
|
|
|
45
45
|
/**
|
|
46
46
|
* Parse the response
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
parseResponse(rawResponse) {
|
|
49
49
|
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
50
50
|
if (response.errors) {
|
|
51
51
|
throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
|
|
@@ -53,15 +53,10 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
|
|
|
53
53
|
if (!response.data || response.data?.organization.createApiKey === null) {
|
|
54
54
|
throw new command_error_js_1.CommandError(this.constructor.name, "Failed to create API key");
|
|
55
55
|
}
|
|
56
|
-
const apiKeys = await flowcoreClient.execute(new api_key_list_js_1.ApiKeyListCommand({
|
|
57
|
-
tenantId: this.input.tenantId,
|
|
58
|
-
}));
|
|
59
|
-
const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
|
|
60
|
-
if (!apiKey) {
|
|
61
|
-
throw new Error("API key not found");
|
|
62
|
-
}
|
|
63
56
|
return {
|
|
64
|
-
|
|
57
|
+
id: "",
|
|
58
|
+
name: "",
|
|
59
|
+
createdAt: "",
|
|
65
60
|
value: response.data.organization.createApiKey,
|
|
66
61
|
};
|
|
67
62
|
}
|
|
@@ -69,10 +64,26 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
|
|
|
69
64
|
* Get the body for the request
|
|
70
65
|
*/
|
|
71
66
|
getBody() {
|
|
72
|
-
return
|
|
67
|
+
return {
|
|
73
68
|
query: graphQlQueryById,
|
|
74
69
|
variables: this.input,
|
|
75
|
-
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Fill in the missing fields
|
|
74
|
+
*/
|
|
75
|
+
async processResponse(flowcoreClient, response) {
|
|
76
|
+
const apiKeys = await flowcoreClient.execute(new api_key_list_js_1.ApiKeyListCommand({
|
|
77
|
+
tenantId: this.input.tenantId,
|
|
78
|
+
}));
|
|
79
|
+
const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
|
|
80
|
+
if (!apiKey) {
|
|
81
|
+
throw new Error("API key not found");
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
...apiKey,
|
|
85
|
+
value: response.value,
|
|
86
|
+
};
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
89
|
exports.ApiKeyCreateCommand = ApiKeyCreateCommand;
|
|
@@ -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"}
|
|
@@ -55,10 +55,10 @@ class ApiKeyDeleteCommand extends command_js_1.GraphQlCommand {
|
|
|
55
55
|
* Get the body for the request
|
|
56
56
|
*/
|
|
57
57
|
getBody() {
|
|
58
|
-
return
|
|
58
|
+
return {
|
|
59
59
|
query: graphQlQueryById,
|
|
60
60
|
variables: this.input,
|
|
61
|
-
}
|
|
61
|
+
};
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
exports.ApiKeyDeleteCommand = ApiKeyDeleteCommand;
|
|
@@ -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"}
|
|
@@ -53,10 +53,10 @@ class ApiKeyListCommand extends command_js_1.GraphQlCommand {
|
|
|
53
53
|
* Get the body for the request
|
|
54
54
|
*/
|
|
55
55
|
getBody() {
|
|
56
|
-
return
|
|
56
|
+
return {
|
|
57
57
|
query: graphQlQueryById,
|
|
58
58
|
variables: this.input,
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
exports.ApiKeyListCommand = ApiKeyListCommand;
|
|
@@ -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"}
|
|
@@ -43,15 +43,6 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
43
43
|
...input,
|
|
44
44
|
waitForDelete: input.waitForDelete ?? true,
|
|
45
45
|
});
|
|
46
|
-
/**
|
|
47
|
-
* The allowed modes for the command
|
|
48
|
-
*/
|
|
49
|
-
Object.defineProperty(this, "allowedModes", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
value: ["bearer"]
|
|
54
|
-
});
|
|
55
46
|
}
|
|
56
47
|
/**
|
|
57
48
|
* Parse the response
|
|
@@ -62,7 +53,7 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
62
53
|
throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
63
54
|
}
|
|
64
55
|
if (!parsedResponse.data.datacore?.requestDelete) {
|
|
65
|
-
throw new not_found_js_1.NotFoundException("DataCore", this.input.dataCoreId);
|
|
56
|
+
throw new not_found_js_1.NotFoundException("DataCore", { id: this.input.dataCoreId });
|
|
66
57
|
}
|
|
67
58
|
return parsedResponse.data.datacore.requestDelete.deleting;
|
|
68
59
|
}
|
|
@@ -70,15 +61,15 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
70
61
|
* Get the body for the request
|
|
71
62
|
*/
|
|
72
63
|
getBody() {
|
|
73
|
-
return
|
|
64
|
+
return {
|
|
74
65
|
query: graphQlQuery,
|
|
75
66
|
variables: this.input,
|
|
76
|
-
}
|
|
67
|
+
};
|
|
77
68
|
}
|
|
78
69
|
/**
|
|
79
70
|
* Wait for the response (timeout: 25 seconds)
|
|
80
71
|
*/
|
|
81
|
-
async
|
|
72
|
+
async processResponse(client, response) {
|
|
82
73
|
if (!this.input.waitForDelete) {
|
|
83
74
|
return response;
|
|
84
75
|
}
|
|
@@ -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"}
|
|
@@ -44,9 +44,20 @@ class DataCoreFetchCommand extends command_js_1.Command {
|
|
|
44
44
|
}
|
|
45
45
|
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(data_core_js_1.DataCoreSchema), rawResponse);
|
|
46
46
|
if (response.length === 0) {
|
|
47
|
-
throw new not_found_js_1.NotFoundException("DataCore", this.input.dataCore);
|
|
47
|
+
throw new not_found_js_1.NotFoundException("DataCore", { name: this.input.dataCore });
|
|
48
48
|
}
|
|
49
49
|
return response[0];
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Handle the client error
|
|
53
|
+
*/
|
|
54
|
+
handleClientError(error) {
|
|
55
|
+
if (error.status === 404) {
|
|
56
|
+
throw new not_found_js_1.NotFoundException("DataCore", {
|
|
57
|
+
[this.input.dataCoreId ? "id" : "name"]: this.input.dataCoreId ?? this.input.dataCore,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
51
62
|
}
|
|
52
63
|
exports.DataCoreFetchCommand = DataCoreFetchCommand;
|
|
@@ -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"}
|
|
@@ -35,7 +35,7 @@ class DataCoreUpdateCommand extends command_js_1.Command {
|
|
|
35
35
|
if (Object.keys(payload).length === 0) {
|
|
36
36
|
throw new command_error_js_1.CommandError(this.constructor.name, "No fields to update");
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return payload;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* 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"}
|
|
@@ -65,7 +65,7 @@ class EventTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
65
65
|
throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
66
66
|
}
|
|
67
67
|
if (!parsedResponse.data?.eventType?.requestDelete) {
|
|
68
|
-
throw new not_found_js_1.NotFoundException("EventType", this.input.eventTypeId);
|
|
68
|
+
throw new not_found_js_1.NotFoundException("EventType", { id: this.input.eventTypeId });
|
|
69
69
|
}
|
|
70
70
|
return parsedResponse.data.eventType.requestDelete.deleting;
|
|
71
71
|
}
|
|
@@ -74,15 +74,15 @@ class EventTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
74
74
|
*/
|
|
75
75
|
getBody() {
|
|
76
76
|
const { waitForDelete: _, ...rest } = this.input;
|
|
77
|
-
return
|
|
77
|
+
return {
|
|
78
78
|
query: graphQlQuery,
|
|
79
79
|
variables: rest,
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* Wait for the response (timeout: 25 seconds)
|
|
84
84
|
*/
|
|
85
|
-
async
|
|
85
|
+
async processResponse(client, response) {
|
|
86
86
|
if (!this.input.waitForDelete) {
|
|
87
87
|
return response;
|
|
88
88
|
}
|
|
@@ -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"}
|
|
@@ -44,9 +44,20 @@ class EventTypeFetchCommand extends command_js_1.Command {
|
|
|
44
44
|
}
|
|
45
45
|
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(event_type_js_1.EventTypeSchema), rawResponse);
|
|
46
46
|
if (response.length === 0) {
|
|
47
|
-
throw new not_found_js_1.NotFoundException("EventType", this.input.eventType);
|
|
47
|
+
throw new not_found_js_1.NotFoundException("EventType", { name: this.input.eventType });
|
|
48
48
|
}
|
|
49
49
|
return response[0];
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Handle the client error
|
|
53
|
+
*/
|
|
54
|
+
handleClientError(error) {
|
|
55
|
+
if (error.status === 404) {
|
|
56
|
+
throw new not_found_js_1.NotFoundException("EventType", {
|
|
57
|
+
[this.input.eventTypeId ? "id" : "name"]: this.input.eventTypeId ?? this.input.eventType,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
51
62
|
}
|
|
52
63
|
exports.EventTypeFetchCommand = EventTypeFetchCommand;
|
|
@@ -7,7 +7,7 @@ export type EventTypeUpdateInput = {
|
|
|
7
7
|
/** The id of the event type */
|
|
8
8
|
eventTypeId: string;
|
|
9
9
|
/** The description of the event type */
|
|
10
|
-
description
|
|
10
|
+
description?: string;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Update an event type
|
|
@@ -28,7 +28,7 @@ export declare class EventTypeUpdateCommand extends Command<EventTypeUpdateInput
|
|
|
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
|
* Parse the response
|
|
34
34
|
*/
|
|
@@ -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,EAAE,MAAM,CAAA;
|
|
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"}
|
|
@@ -30,8 +30,8 @@ class EventTypeUpdateCommand extends command_js_1.Command {
|
|
|
30
30
|
* Get the body for the request
|
|
31
31
|
*/
|
|
32
32
|
getBody() {
|
|
33
|
-
const { eventTypeId:
|
|
34
|
-
return
|
|
33
|
+
const { eventTypeId: _, ...payload } = this.input;
|
|
34
|
+
return payload;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* 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"}
|
|
@@ -38,7 +38,8 @@ class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
|
|
|
38
38
|
* Get the body for the request
|
|
39
39
|
*/
|
|
40
40
|
getBody() {
|
|
41
|
-
|
|
41
|
+
const { ...rest } = this.input;
|
|
42
|
+
return rest;
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
exports.EventsFetchTimeBucketsByNamesCommand = EventsFetchTimeBucketsByNamesCommand;
|
|
@@ -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"}
|
|
@@ -46,13 +46,13 @@ class EventsFetchCommand extends command_js_1.Command {
|
|
|
46
46
|
* Get the body for the request
|
|
47
47
|
*/
|
|
48
48
|
getBody() {
|
|
49
|
-
return
|
|
49
|
+
return {
|
|
50
50
|
tenant: this.input.tenant,
|
|
51
51
|
dataCoreId: this.input.dataCoreId,
|
|
52
52
|
flowType: this.input.flowType,
|
|
53
53
|
eventTypes: this.input.eventTypes,
|
|
54
54
|
timeBucket: this.input.timeBucket,
|
|
55
|
-
}
|
|
55
|
+
};
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
exports.EventsFetchCommand = EventsFetchCommand;
|
|
@@ -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"}
|
|
@@ -70,7 +70,7 @@ class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
70
70
|
throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
71
71
|
}
|
|
72
72
|
if (!parsedResponse.data?.datacore?.flowtype?.requestDelete) {
|
|
73
|
-
throw new not_found_js_1.NotFoundException("FlowType", this.input.flowTypeId);
|
|
73
|
+
throw new not_found_js_1.NotFoundException("FlowType", { id: this.input.flowTypeId });
|
|
74
74
|
}
|
|
75
75
|
return parsedResponse.data.datacore.flowtype.requestDelete.deleting;
|
|
76
76
|
}
|
|
@@ -94,15 +94,15 @@ class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
94
94
|
* Get the body for the request
|
|
95
95
|
*/
|
|
96
96
|
getBody() {
|
|
97
|
-
return
|
|
97
|
+
return {
|
|
98
98
|
query: graphQlQuery,
|
|
99
99
|
variables: this.input,
|
|
100
|
-
}
|
|
100
|
+
};
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Wait for the response (timeout: 25 seconds)
|
|
104
104
|
*/
|
|
105
|
-
async
|
|
105
|
+
async processResponse(client, response) {
|
|
106
106
|
if (!this.input.waitForDelete) {
|
|
107
107
|
return response;
|
|
108
108
|
}
|
|
@@ -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"}
|
|
@@ -44,9 +44,20 @@ class FlowTypeFetchCommand extends command_js_1.Command {
|
|
|
44
44
|
}
|
|
45
45
|
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(flow_type_js_1.FlowTypeSchema), rawResponse);
|
|
46
46
|
if (response.length === 0) {
|
|
47
|
-
throw new not_found_js_1.NotFoundException("FlowType", this.input.flowType);
|
|
47
|
+
throw new not_found_js_1.NotFoundException("FlowType", { name: this.input.flowType });
|
|
48
48
|
}
|
|
49
49
|
return response[0];
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Handle the client error
|
|
53
|
+
*/
|
|
54
|
+
handleClientError(error) {
|
|
55
|
+
if (error.status === 404) {
|
|
56
|
+
throw new not_found_js_1.NotFoundException("FlowType", {
|
|
57
|
+
[this.input.flowTypeId ? "id" : "name"]: this.input.flowTypeId ?? this.input.flowType,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
51
62
|
}
|
|
52
63
|
exports.FlowTypeFetchCommand = FlowTypeFetchCommand;
|
|
@@ -7,7 +7,7 @@ export type FlowTypeUpdateInput = {
|
|
|
7
7
|
/** The id of the data core */
|
|
8
8
|
flowTypeId: string;
|
|
9
9
|
/** The description of the flow type */
|
|
10
|
-
description
|
|
10
|
+
description?: string;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Update a flow type
|
|
@@ -28,7 +28,7 @@ export declare class FlowTypeUpdateCommand extends Command<FlowTypeUpdateInput,
|
|
|
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
|
* Parse the response
|
|
34
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"flow-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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;CACrB,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;IAKrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
|