@flowcore/sdk 1.10.0 → 1.10.2
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 +14 -0
- package/esm/commands/api-key/api-key.create.d.ts +4 -0
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
- package/esm/commands/api-key/api-key.create.js +9 -0
- 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 -2
- package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.delete-request.js +9 -0
- package/esm/commands/data-core/data-core.fetch.d.ts +3 -4
- package/esm/commands/data-core/data-core.fetch.d.ts.map +1 -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 +2 -2
- package/esm/commands/data-core/data-core.update.d.ts.map +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 +6 -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 +9 -0
- package/esm/commands/event-type/event-type.fetch.d.ts +2 -3
- package/esm/commands/event-type/event-type.fetch.d.ts.map +1 -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.truncate-request.d.ts +41 -0
- package/esm/commands/event-type/event-type.truncate-request.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.truncate-request.js +107 -0
- 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 +7 -2
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.delete-request.js +9 -0
- package/esm/commands/flow-type/flow-type.fetch.d.ts +4 -5
- package/esm/commands/flow-type/flow-type.fetch.d.ts.map +1 -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 +2 -2
- package/esm/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/esm/commands/index.d.ts +1 -0
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +1 -0
- package/esm/commands/tenant/tenant.fetch.d.ts +4 -5
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/esm/common/command.d.ts +5 -0
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +10 -0
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +3 -2
- package/package.json +1 -1
- package/script/commands/api-key/api-key.create.d.ts +4 -0
- package/script/commands/api-key/api-key.create.d.ts.map +1 -1
- package/script/commands/api-key/api-key.create.js +9 -0
- 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 -2
- package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
- package/script/commands/data-core/data-core.delete-request.js +9 -0
- package/script/commands/data-core/data-core.fetch.d.ts +3 -4
- package/script/commands/data-core/data-core.fetch.d.ts.map +1 -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 +2 -2
- package/script/commands/data-core/data-core.update.d.ts.map +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 +6 -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 +9 -0
- package/script/commands/event-type/event-type.fetch.d.ts +2 -3
- package/script/commands/event-type/event-type.fetch.d.ts.map +1 -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.truncate-request.d.ts +41 -0
- package/script/commands/event-type/event-type.truncate-request.d.ts.map +1 -0
- package/script/commands/event-type/event-type.truncate-request.js +111 -0
- 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 +7 -2
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.delete-request.js +9 -0
- package/script/commands/flow-type/flow-type.fetch.d.ts +4 -5
- package/script/commands/flow-type/flow-type.fetch.d.ts.map +1 -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 +2 -2
- package/script/commands/flow-type/flow-type.update.d.ts.map +1 -1
- package/script/commands/index.d.ts +1 -0
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +1 -0
- package/script/commands/tenant/tenant.fetch.d.ts +4 -5
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/script/common/command.d.ts +5 -0
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +10 -0
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +3 -2
|
@@ -3,10 +3,10 @@ import { type EventType } from "../../contracts/event-type.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the event type list command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface EventTypeListInput {
|
|
7
7
|
/** The flow type id */
|
|
8
8
|
flowTypeId: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
/**
|
|
11
11
|
* Fetch all event types for a flow type
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.list.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"event-type.list.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,SAAS,EAAE,CAAC;IAChF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAMpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,EAAE;CAIpE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import type { FlowcoreClient } from "../../common/flowcore-client.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the event type truncate request command
|
|
5
|
+
*/
|
|
6
|
+
export interface EventTypeTruncateRequestInput {
|
|
7
|
+
/** The id of the event type */
|
|
8
|
+
eventTypeId: string;
|
|
9
|
+
/** Wait for the event type to be truncated (default: true) */
|
|
10
|
+
waitForTruncate?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Request to truncate a event type
|
|
14
|
+
*/
|
|
15
|
+
export declare class EventTypeTruncateRequestCommand extends GraphQlCommand<EventTypeTruncateRequestInput, boolean> {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
protected retryOnFailure: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The allowed modes for the command
|
|
22
|
+
*/
|
|
23
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
24
|
+
/**
|
|
25
|
+
* Create a new event type truncate request command
|
|
26
|
+
*/
|
|
27
|
+
constructor(input: EventTypeTruncateRequestInput);
|
|
28
|
+
/**
|
|
29
|
+
* Parse the response
|
|
30
|
+
*/
|
|
31
|
+
protected parseResponse(response: unknown): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get the body for the request
|
|
34
|
+
*/
|
|
35
|
+
protected getBody(): Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Wait for the response (timeout: 25 seconds)
|
|
38
|
+
*/
|
|
39
|
+
protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=event-type.truncate-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-type.truncate-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.truncate-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,6BAA6B;IAC5C,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,8DAA8D;IAC9D,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AA+BD;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,cAAc,CAAC,6BAA6B,EAAE,OAAO,CAAC;IACzG;;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,6BAA6B;IAOhD;;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"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventTypeTruncateRequestCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
7
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
|
+
const not_found_js_1 = require("../../exceptions/not-found.js");
|
|
9
|
+
const event_type_fetch_js_1 = require("./event-type.fetch.js");
|
|
10
|
+
const graphQlQuery = `
|
|
11
|
+
mutation FLOWCORE_SDK_EVENT_TYPE_TRUNCATE_REQUEST($eventTypeId: ID!) {
|
|
12
|
+
eventType(id: $eventTypeId) {
|
|
13
|
+
requestTruncate {
|
|
14
|
+
truncating
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const responseSchema = typebox_1.Type.Object({
|
|
20
|
+
errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
21
|
+
message: typebox_1.Type.String(),
|
|
22
|
+
}))),
|
|
23
|
+
data: typebox_1.Type.Union([
|
|
24
|
+
typebox_1.Type.Object({
|
|
25
|
+
eventType: typebox_1.Type.Object({
|
|
26
|
+
requestTruncate: typebox_1.Type.Union([
|
|
27
|
+
typebox_1.Type.Object({
|
|
28
|
+
truncating: typebox_1.Type.Boolean(),
|
|
29
|
+
}),
|
|
30
|
+
typebox_1.Type.Null(),
|
|
31
|
+
]),
|
|
32
|
+
}),
|
|
33
|
+
}),
|
|
34
|
+
typebox_1.Type.Null(),
|
|
35
|
+
]),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Request to truncate a event type
|
|
39
|
+
*/
|
|
40
|
+
class EventTypeTruncateRequestCommand extends command_js_1.GraphQlCommand {
|
|
41
|
+
/**
|
|
42
|
+
* Create a new event type truncate request command
|
|
43
|
+
*/
|
|
44
|
+
constructor(input) {
|
|
45
|
+
super({
|
|
46
|
+
...input,
|
|
47
|
+
waitForTruncate: input.waitForTruncate ?? true,
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Whether the command should retry on failure
|
|
51
|
+
*/
|
|
52
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: false
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* The allowed modes for the command
|
|
60
|
+
*/
|
|
61
|
+
Object.defineProperty(this, "allowedModes", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true,
|
|
64
|
+
writable: true,
|
|
65
|
+
value: ["bearer"]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Parse the response
|
|
70
|
+
*/
|
|
71
|
+
parseResponse(response) {
|
|
72
|
+
const parsedResponse = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, response);
|
|
73
|
+
if (parsedResponse.errors) {
|
|
74
|
+
throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
|
|
75
|
+
}
|
|
76
|
+
if (!parsedResponse.data?.eventType?.requestTruncate) {
|
|
77
|
+
throw new not_found_js_1.NotFoundException("EventType", { id: this.input.eventTypeId });
|
|
78
|
+
}
|
|
79
|
+
return parsedResponse.data.eventType.requestTruncate.truncating;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the body for the request
|
|
83
|
+
*/
|
|
84
|
+
getBody() {
|
|
85
|
+
const { waitForTruncate: _, ...rest } = this.input;
|
|
86
|
+
return {
|
|
87
|
+
query: graphQlQuery,
|
|
88
|
+
variables: rest,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Wait for the response (timeout: 25 seconds)
|
|
93
|
+
*/
|
|
94
|
+
async processResponse(client, response) {
|
|
95
|
+
if (!this.input.waitForTruncate) {
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
const start = Date.now();
|
|
99
|
+
while (Date.now() - start < 25_000) {
|
|
100
|
+
const response = await client.execute(new event_type_fetch_js_1.EventTypeFetchCommand({
|
|
101
|
+
eventTypeId: this.input.eventTypeId,
|
|
102
|
+
}));
|
|
103
|
+
if (response.isTruncating) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
107
|
+
}
|
|
108
|
+
return response;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.EventTypeTruncateRequestCommand = EventTypeTruncateRequestCommand;
|
|
@@ -3,18 +3,22 @@ import { type FlowType } from "../../contracts/flow-type.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the data core create command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface FlowTypeCreateInput {
|
|
7
7
|
/** The id of the data core */
|
|
8
8
|
dataCoreId: string;
|
|
9
9
|
/** The name of the flow type */
|
|
10
10
|
name: string;
|
|
11
11
|
/** The description of the flow type */
|
|
12
12
|
description: string;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
/**
|
|
15
15
|
* Create a flow type
|
|
16
16
|
*/
|
|
17
17
|
export declare class FlowTypeCreateCommand extends Command<FlowTypeCreateInput, FlowType> {
|
|
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":"flow-type.create.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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":"flow-type.create.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.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,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB;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"}
|
|
@@ -8,6 +8,18 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a flow type
|
|
9
9
|
*/
|
|
10
10
|
class FlowTypeCreateCommand extends command_js_1.Command {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* Whether the command should retry on failure
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: false
|
|
21
|
+
});
|
|
22
|
+
}
|
|
11
23
|
/**
|
|
12
24
|
* Get the method
|
|
13
25
|
*/
|
|
@@ -4,16 +4,20 @@ import type { ClientError } from "../../exceptions/client-error.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* The input for the flow type delete request command
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface FlowTypeDeleteRequestInput {
|
|
8
8
|
/** The id of the flow type */
|
|
9
9
|
flowTypeId: string;
|
|
10
10
|
/** Whether to wait for the flow type to be deleted */
|
|
11
11
|
waitForDelete?: boolean;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
/**
|
|
14
14
|
* Request to delete a flow type
|
|
15
15
|
*/
|
|
16
16
|
export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTypeDeleteRequestInput, boolean> {
|
|
17
|
+
/**
|
|
18
|
+
* Whether the command should retry on failure
|
|
19
|
+
*/
|
|
20
|
+
protected retryOnFailure: boolean;
|
|
17
21
|
/**
|
|
18
22
|
* The allowed modes for the command
|
|
19
23
|
*/
|
|
@@ -36,6 +40,7 @@ export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTyp
|
|
|
36
40
|
parseResponse: (response: unknown) => boolean | Promise<boolean>;
|
|
37
41
|
processResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
|
|
38
42
|
handleClientError: (error: ClientError) => void;
|
|
43
|
+
retryOnFailure: boolean;
|
|
39
44
|
}>;
|
|
40
45
|
/**
|
|
41
46
|
* Get the body for the request
|
|
@@ -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;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,MAAM,
|
|
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,WAAW,0BAA0B;IACzC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAmCD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;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,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;QAC/C,cAAc,EAAE,OAAO,CAAA;KACxB,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"}
|
|
@@ -51,6 +51,15 @@ class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
|
|
|
51
51
|
...input,
|
|
52
52
|
waitForDelete: input.waitForDelete ?? true,
|
|
53
53
|
});
|
|
54
|
+
/**
|
|
55
|
+
* Whether the command should retry on failure
|
|
56
|
+
*/
|
|
57
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
value: false
|
|
62
|
+
});
|
|
54
63
|
/**
|
|
55
64
|
* The allowed modes for the command
|
|
56
65
|
*/
|
|
@@ -4,25 +4,25 @@ import type { ClientError } from "../../exceptions/client-error.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* The input for the flow type fetch by name command
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
export interface FlowTypeFetchByNameInput {
|
|
8
8
|
/** The id of the data core */
|
|
9
9
|
dataCoreId: string;
|
|
10
10
|
/** The name of the flow type */
|
|
11
11
|
flowType: string;
|
|
12
12
|
/** The id of the flow type */
|
|
13
13
|
flowTypeId?: never;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
/**
|
|
16
16
|
* The input for the flow type fetch by id command
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
export interface FlowTypeFetchByIdInput {
|
|
19
19
|
/** The id of the flow type */
|
|
20
20
|
flowTypeId: string;
|
|
21
21
|
/** The id of the data core */
|
|
22
22
|
dataCoreId?: never;
|
|
23
23
|
/** The name of the flow type */
|
|
24
24
|
flowType?: never;
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
/**
|
|
27
27
|
* The input for the flow type fetch command
|
|
28
28
|
*/
|
|
@@ -52,5 +52,4 @@ export declare class FlowTypeFetchCommand extends Command<FlowTypeFetchInput, Fl
|
|
|
52
52
|
*/
|
|
53
53
|
protected handleClientError(error: ClientError): void;
|
|
54
54
|
}
|
|
55
|
-
export {};
|
|
56
55
|
//# 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;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,
|
|
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,MAAM,WAAW,wBAAwB;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;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"}
|
|
@@ -3,10 +3,10 @@ import { type FlowType } from "../../contracts/flow-type.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the flow type list command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface FlowTypeListInput {
|
|
7
7
|
/** the data core id */
|
|
8
8
|
dataCoreId: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
/**
|
|
11
11
|
* Fetch all flow types for a data core
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-type.list.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"flow-type.list.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAMpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ,EAAE;CAInE"}
|
|
@@ -3,12 +3,12 @@ import { type FlowType } from "../../contracts/flow-type.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the flow type update command
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface FlowTypeUpdateInput {
|
|
7
7
|
/** The id of the data core */
|
|
8
8
|
flowTypeId: string;
|
|
9
9
|
/** The description of the flow type */
|
|
10
10
|
description?: string;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Update a flow type
|
|
14
14
|
*/
|
|
@@ -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,
|
|
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,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;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"}
|
|
@@ -27,6 +27,7 @@ export * from "./event-type/event-type.list.js";
|
|
|
27
27
|
export * from "./event-type/event-type.create.js";
|
|
28
28
|
export * from "./event-type/event-type.update.js";
|
|
29
29
|
export * from "./event-type/event-type.delete-request.js";
|
|
30
|
+
export * from "./event-type/event-type.truncate-request.js";
|
|
30
31
|
export * from "./events/events.fetch.js";
|
|
31
32
|
export * from "./events/events.fetch-time-buckets-by-names.js";
|
|
32
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../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c,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AAGvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAG3D,cAAc,0BAA0B,CAAA;AACxC,cAAc,gDAAgD,CAAA"}
|
package/script/commands/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __exportStar(require("./event-type/event-type.list.js"), exports);
|
|
|
50
50
|
__exportStar(require("./event-type/event-type.create.js"), exports);
|
|
51
51
|
__exportStar(require("./event-type/event-type.update.js"), exports);
|
|
52
52
|
__exportStar(require("./event-type/event-type.delete-request.js"), exports);
|
|
53
|
+
__exportStar(require("./event-type/event-type.truncate-request.js"), exports);
|
|
53
54
|
// Events
|
|
54
55
|
__exportStar(require("./events/events.fetch.js"), exports);
|
|
55
56
|
__exportStar(require("./events/events.fetch-time-buckets-by-names.js"), exports);
|
|
@@ -3,21 +3,21 @@ import { type Tenant } from "../../contracts/tenant.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The input for the tenant fetch by id command
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
export interface TenantFetchByIdInput {
|
|
7
7
|
/** The id of the tenant */
|
|
8
8
|
tenantId: string;
|
|
9
9
|
/** The name of the tenant */
|
|
10
10
|
tenant?: never;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* The input for the tenant fetch by name command
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
export interface TenantFetchByNameInput {
|
|
16
16
|
/** The name of the tenant */
|
|
17
17
|
tenant: string;
|
|
18
18
|
/** The id of the tenant */
|
|
19
19
|
tenantId?: never;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
/**
|
|
22
22
|
* The input for the tenant fetch command
|
|
23
23
|
*/
|
|
@@ -39,5 +39,4 @@ export declare class TenantFetchCommand extends GraphQlCommand<TenantFetchInput,
|
|
|
39
39
|
*/
|
|
40
40
|
protected getBody(): Record<string, unknown>;
|
|
41
41
|
}
|
|
42
|
-
export {};
|
|
43
42
|
//# sourceMappingURL=tenant.fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,KAAK,MAAM,EAAoC,MAAM,2BAA2B,CAAA;AAIzF;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,KAAK,MAAM,EAAoC,MAAM,2BAA2B,CAAA;AAIzF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAmC5E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;IAU9D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYtD"}
|
|
@@ -4,6 +4,10 @@ import type { FlowcoreClient } from "./flowcore-client.js";
|
|
|
4
4
|
* Abstract command for executing requests
|
|
5
5
|
*/
|
|
6
6
|
export declare abstract class Command<Input, Output> {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the command should retry on failure
|
|
9
|
+
*/
|
|
10
|
+
protected readonly retryOnFailure: boolean;
|
|
7
11
|
/**
|
|
8
12
|
* The allowed modes for the command
|
|
9
13
|
*/
|
|
@@ -54,6 +58,7 @@ export declare abstract class Command<Input, Output> {
|
|
|
54
58
|
parseResponse: (response: unknown) => Output | Promise<Output>;
|
|
55
59
|
processResponse: (client: FlowcoreClient, response: Output) => Promise<Output>;
|
|
56
60
|
handleClientError: (error: ClientError) => void;
|
|
61
|
+
retryOnFailure: boolean;
|
|
57
62
|
}>;
|
|
58
63
|
/**
|
|
59
64
|
* Wait for the response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;GAEG;AACH,8BAAsB,OAAO,CAAC,KAAK,EAAE,MAAM;IACzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAuB;IAE/E;;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AAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;QACnE,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,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9D,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;QAC9E,iBAAiB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;QAC/C,cAAc,EAAE,OAAO,CAAA;KACxB,CAAC;IAeF;;OAEG;cAEa,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F;AAED;;GAEG;AACH,8BAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAChF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;CAGrC"}
|
package/script/common/command.js
CHANGED
|
@@ -6,6 +6,15 @@ exports.GraphQlCommand = exports.Command = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class Command {
|
|
8
8
|
constructor(input) {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the command should retry on failure
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
9
18
|
/**
|
|
10
19
|
* The allowed modes for the command
|
|
11
20
|
*/
|
|
@@ -81,6 +90,7 @@ class Command {
|
|
|
81
90
|
parseResponse: this.parseResponse.bind(this),
|
|
82
91
|
processResponse: this.processResponse.bind(this),
|
|
83
92
|
handleClientError: this.handleClientError.bind(this),
|
|
93
|
+
retryOnFailure: this.retryOnFailure,
|
|
84
94
|
};
|
|
85
95
|
}
|
|
86
96
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../src/common/flowcore-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAI3C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,IAAI,CAAA;CACT;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,CAAA;AAErE;;GAEG;AACH,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,OAAO,CAAoB;gBAEN,OAAO,EAAE,aAAa;IAiBn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86,7 +86,7 @@ class FlowcoreClient {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
catch (error) {
|
|
89
|
-
if (this.options.retry && retryCount < this.options.retry.maxRetries) {
|
|
89
|
+
if (request.retryOnFailure && this.options.retry && retryCount < this.options.retry.maxRetries) {
|
|
90
90
|
const delay = this.options.retry.delay;
|
|
91
91
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
92
92
|
return this.innerExecute(command, retryCount + 1);
|
|
@@ -98,7 +98,8 @@ class FlowcoreClient {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
if (!response.ok) {
|
|
101
|
-
if (
|
|
101
|
+
if (request.retryOnFailure &&
|
|
102
|
+
this.options.retry && RETRYABLE_ERROR_CODES.includes(response.status) &&
|
|
102
103
|
retryCount < this.options.retry.maxRetries) {
|
|
103
104
|
const delay = this.options.retry.delay;
|
|
104
105
|
await new Promise((resolve) => setTimeout(resolve, delay));
|