@flowcore/sdk 1.4.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/README.md +41 -0
- package/esm/commands/api-key/api-key.create.d.ts +34 -0
- package/esm/commands/api-key/api-key.create.d.ts.map +1 -0
- package/esm/commands/api-key/api-key.create.js +74 -0
- package/esm/commands/api-key/api-key.delete.d.ts +28 -0
- package/esm/commands/api-key/api-key.delete.d.ts.map +1 -0
- package/esm/commands/api-key/api-key.delete.js +60 -0
- package/esm/commands/api-key/api-key.list.d.ts +27 -0
- package/esm/commands/api-key/api-key.list.d.ts.map +1 -0
- package/esm/commands/api-key/api-key.list.js +58 -0
- package/esm/commands/data-core/data-core.create.d.ts +39 -0
- package/esm/commands/data-core/data-core.create.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.create.js +32 -0
- package/esm/commands/data-core/data-core.delete-request.d.ts +37 -0
- package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.delete-request.js +94 -0
- package/esm/commands/data-core/data-core.exists.d.ts +37 -0
- package/esm/commands/data-core/data-core.exists.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.exists.js +33 -0
- package/esm/commands/data-core/data-core.fetch.d.ts +51 -0
- package/esm/commands/data-core/data-core.fetch.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.fetch.js +48 -0
- package/esm/commands/data-core/data-core.list.d.ts +33 -0
- package/esm/commands/data-core/data-core.list.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.list.js +40 -0
- package/esm/commands/data-core/data-core.update.d.ts +41 -0
- package/esm/commands/data-core/data-core.update.d.ts.map +1 -0
- package/esm/commands/data-core/data-core.update.js +43 -0
- package/esm/commands/event-type/event-type.create.d.ts +35 -0
- package/esm/commands/event-type/event-type.create.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.create.js +32 -0
- package/esm/commands/event-type/event-type.delete-request.d.ts +37 -0
- package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.delete-request.js +98 -0
- package/esm/commands/event-type/event-type.exists.d.ts +37 -0
- package/esm/commands/event-type/event-type.exists.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.exists.js +33 -0
- package/esm/commands/event-type/event-type.fetch.d.ts +45 -0
- package/esm/commands/event-type/event-type.fetch.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.fetch.js +48 -0
- package/esm/commands/event-type/event-type.list.d.ts +31 -0
- package/esm/commands/event-type/event-type.list.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.list.js +36 -0
- package/esm/commands/event-type/event-type.update.d.ts +37 -0
- package/esm/commands/event-type/event-type.update.d.ts.map +1 -0
- package/esm/commands/event-type/event-type.update.js +39 -0
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts +53 -0
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -0
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +40 -0
- package/esm/commands/events/events.fetch.d.ts +58 -0
- package/esm/commands/events/events.fetch.d.ts.map +1 -0
- package/esm/commands/events/events.fetch.js +54 -0
- package/esm/commands/flow-type/flow-type.create.d.ts +35 -0
- package/esm/commands/flow-type/flow-type.create.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.create.js +32 -0
- package/esm/commands/flow-type/flow-type.delete-request.d.ts +47 -0
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.delete-request.js +118 -0
- package/esm/commands/flow-type/flow-type.exists.d.ts +39 -0
- package/esm/commands/flow-type/flow-type.exists.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.exists.js +33 -0
- package/esm/commands/flow-type/flow-type.fetch.d.ts +51 -0
- package/esm/commands/flow-type/flow-type.fetch.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.fetch.js +48 -0
- package/esm/commands/flow-type/flow-type.list.d.ts +31 -0
- package/esm/commands/flow-type/flow-type.list.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.list.js +36 -0
- package/esm/commands/flow-type/flow-type.update.d.ts +37 -0
- package/esm/commands/flow-type/flow-type.update.d.ts.map +1 -0
- package/esm/commands/flow-type/flow-type.update.js +39 -0
- package/esm/commands/index.d.ts +32 -0
- package/esm/commands/index.d.ts.map +1 -0
- package/esm/commands/index.js +39 -0
- package/esm/commands/secret/secret.create.d.ts +30 -0
- package/esm/commands/secret/secret.create.d.ts.map +1 -0
- package/esm/commands/secret/secret.create.js +60 -0
- package/esm/commands/secret/secret.delete.d.ts +28 -0
- package/esm/commands/secret/secret.delete.d.ts.map +1 -0
- package/esm/commands/secret/secret.delete.js +61 -0
- package/esm/commands/secret/secret.list.d.ts +26 -0
- package/esm/commands/secret/secret.list.d.ts.map +1 -0
- package/esm/commands/secret/secret.list.js +63 -0
- package/esm/commands/tenant/tenant.fetch.d.ts +43 -0
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -0
- package/esm/commands/tenant/tenant.fetch.js +77 -0
- package/esm/commands/tenant/tenant.list.d.ts +20 -0
- package/esm/commands/tenant/tenant.list.d.ts.map +1 -0
- package/esm/commands/tenant/tenant.list.js +65 -0
- package/esm/commands/variable/variable.create.d.ts +31 -0
- package/esm/commands/variable/variable.create.d.ts.map +1 -0
- package/esm/commands/variable/variable.create.js +66 -0
- package/esm/commands/variable/variable.delete.d.ts +28 -0
- package/esm/commands/variable/variable.delete.d.ts.map +1 -0
- package/esm/commands/variable/variable.delete.js +63 -0
- package/esm/commands/variable/variable.list.d.ts +27 -0
- package/esm/commands/variable/variable.list.d.ts.map +1 -0
- package/esm/commands/variable/variable.list.js +69 -0
- package/esm/common/command.d.ts +63 -0
- package/esm/common/command.d.ts.map +1 -0
- package/esm/common/command.js +91 -0
- package/esm/common/flowcore-client.d.ts +39 -0
- package/esm/common/flowcore-client.d.ts.map +1 -0
- package/esm/common/flowcore-client.js +72 -0
- package/esm/contracts/api-key.d.ts +14 -0
- package/esm/contracts/api-key.d.ts.map +1 -0
- package/esm/contracts/api-key.js +9 -0
- package/esm/contracts/data-core.d.ts +38 -0
- package/esm/contracts/data-core.d.ts.map +1 -0
- package/esm/contracts/data-core.js +38 -0
- package/esm/contracts/event-type.d.ts +33 -0
- package/esm/contracts/event-type.d.ts.map +1 -0
- package/esm/contracts/event-type.js +33 -0
- package/esm/contracts/event.d.ts +20 -0
- package/esm/contracts/event.d.ts.map +1 -0
- package/esm/contracts/event.js +15 -0
- package/esm/contracts/flow-type.d.ts +32 -0
- package/esm/contracts/flow-type.d.ts.map +1 -0
- package/esm/contracts/flow-type.js +31 -0
- package/esm/contracts/index.d.ts +4 -0
- package/esm/contracts/index.d.ts.map +1 -0
- package/esm/contracts/index.js +1 -0
- package/esm/contracts/tenant.d.ts +50 -0
- package/esm/contracts/tenant.d.ts.map +1 -0
- package/esm/contracts/tenant.js +33 -0
- package/esm/contracts/variable.d.ts +13 -0
- package/esm/contracts/variable.d.ts.map +1 -0
- package/esm/contracts/variable.js +8 -0
- package/esm/exceptions/client-error.d.ts +9 -0
- package/esm/exceptions/client-error.d.ts.map +1 -0
- package/esm/exceptions/client-error.js +20 -0
- package/esm/exceptions/command-error.d.ts +7 -0
- package/esm/exceptions/command-error.d.ts.map +1 -0
- package/esm/exceptions/command-error.js +8 -0
- package/esm/exceptions/index.d.ts +4 -0
- package/esm/exceptions/index.d.ts.map +1 -0
- package/esm/exceptions/index.js +3 -0
- package/esm/exceptions/invalid-response.d.ts +8 -0
- package/esm/exceptions/invalid-response.d.ts.map +1 -0
- package/esm/exceptions/invalid-response.js +15 -0
- package/esm/exceptions/not-found.d.ts +7 -0
- package/esm/exceptions/not-found.d.ts.map +1 -0
- package/esm/exceptions/not-found.js +8 -0
- package/esm/mod.d.ts +6 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +5 -0
- package/esm/package.json +3 -0
- package/esm/utils/parse-response-helper.d.ts +6 -0
- package/esm/utils/parse-response-helper.d.ts.map +1 -0
- package/esm/utils/parse-response-helper.js +16 -0
- package/package.json +28 -0
- package/script/commands/api-key/api-key.create.d.ts +34 -0
- package/script/commands/api-key/api-key.create.d.ts.map +1 -0
- package/script/commands/api-key/api-key.create.js +78 -0
- package/script/commands/api-key/api-key.delete.d.ts +28 -0
- package/script/commands/api-key/api-key.delete.d.ts.map +1 -0
- package/script/commands/api-key/api-key.delete.js +64 -0
- package/script/commands/api-key/api-key.list.d.ts +27 -0
- package/script/commands/api-key/api-key.list.d.ts.map +1 -0
- package/script/commands/api-key/api-key.list.js +62 -0
- package/script/commands/data-core/data-core.create.d.ts +39 -0
- package/script/commands/data-core/data-core.create.d.ts.map +1 -0
- package/script/commands/data-core/data-core.create.js +36 -0
- package/script/commands/data-core/data-core.delete-request.d.ts +37 -0
- package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -0
- package/script/commands/data-core/data-core.delete-request.js +98 -0
- package/script/commands/data-core/data-core.exists.d.ts +37 -0
- package/script/commands/data-core/data-core.exists.d.ts.map +1 -0
- package/script/commands/data-core/data-core.exists.js +37 -0
- package/script/commands/data-core/data-core.fetch.d.ts +51 -0
- package/script/commands/data-core/data-core.fetch.d.ts.map +1 -0
- package/script/commands/data-core/data-core.fetch.js +52 -0
- package/script/commands/data-core/data-core.list.d.ts +33 -0
- package/script/commands/data-core/data-core.list.d.ts.map +1 -0
- package/script/commands/data-core/data-core.list.js +44 -0
- package/script/commands/data-core/data-core.update.d.ts +41 -0
- package/script/commands/data-core/data-core.update.d.ts.map +1 -0
- package/script/commands/data-core/data-core.update.js +47 -0
- package/script/commands/event-type/event-type.create.d.ts +35 -0
- package/script/commands/event-type/event-type.create.d.ts.map +1 -0
- package/script/commands/event-type/event-type.create.js +36 -0
- package/script/commands/event-type/event-type.delete-request.d.ts +37 -0
- package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -0
- package/script/commands/event-type/event-type.delete-request.js +102 -0
- package/script/commands/event-type/event-type.exists.d.ts +37 -0
- package/script/commands/event-type/event-type.exists.d.ts.map +1 -0
- package/script/commands/event-type/event-type.exists.js +37 -0
- package/script/commands/event-type/event-type.fetch.d.ts +45 -0
- package/script/commands/event-type/event-type.fetch.d.ts.map +1 -0
- package/script/commands/event-type/event-type.fetch.js +52 -0
- package/script/commands/event-type/event-type.list.d.ts +31 -0
- package/script/commands/event-type/event-type.list.d.ts.map +1 -0
- package/script/commands/event-type/event-type.list.js +40 -0
- package/script/commands/event-type/event-type.update.d.ts +37 -0
- package/script/commands/event-type/event-type.update.d.ts.map +1 -0
- package/script/commands/event-type/event-type.update.js +43 -0
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts +53 -0
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -0
- package/script/commands/events/events.fetch-time-buckets-by-names.js +44 -0
- package/script/commands/events/events.fetch.d.ts +58 -0
- package/script/commands/events/events.fetch.d.ts.map +1 -0
- package/script/commands/events/events.fetch.js +58 -0
- package/script/commands/flow-type/flow-type.create.d.ts +35 -0
- package/script/commands/flow-type/flow-type.create.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.create.js +36 -0
- package/script/commands/flow-type/flow-type.delete-request.d.ts +47 -0
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.delete-request.js +122 -0
- package/script/commands/flow-type/flow-type.exists.d.ts +39 -0
- package/script/commands/flow-type/flow-type.exists.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.exists.js +37 -0
- package/script/commands/flow-type/flow-type.fetch.d.ts +51 -0
- package/script/commands/flow-type/flow-type.fetch.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.fetch.js +52 -0
- package/script/commands/flow-type/flow-type.list.d.ts +31 -0
- package/script/commands/flow-type/flow-type.list.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.list.js +40 -0
- package/script/commands/flow-type/flow-type.update.d.ts +37 -0
- package/script/commands/flow-type/flow-type.update.d.ts.map +1 -0
- package/script/commands/flow-type/flow-type.update.js +43 -0
- package/script/commands/index.d.ts +32 -0
- package/script/commands/index.d.ts.map +1 -0
- package/script/commands/index.js +55 -0
- package/script/commands/secret/secret.create.d.ts +30 -0
- package/script/commands/secret/secret.create.d.ts.map +1 -0
- package/script/commands/secret/secret.create.js +64 -0
- package/script/commands/secret/secret.delete.d.ts +28 -0
- package/script/commands/secret/secret.delete.d.ts.map +1 -0
- package/script/commands/secret/secret.delete.js +65 -0
- package/script/commands/secret/secret.list.d.ts +26 -0
- package/script/commands/secret/secret.list.d.ts.map +1 -0
- package/script/commands/secret/secret.list.js +67 -0
- package/script/commands/tenant/tenant.fetch.d.ts +43 -0
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -0
- package/script/commands/tenant/tenant.fetch.js +81 -0
- package/script/commands/tenant/tenant.list.d.ts +20 -0
- package/script/commands/tenant/tenant.list.d.ts.map +1 -0
- package/script/commands/tenant/tenant.list.js +69 -0
- package/script/commands/variable/variable.create.d.ts +31 -0
- package/script/commands/variable/variable.create.d.ts.map +1 -0
- package/script/commands/variable/variable.create.js +70 -0
- package/script/commands/variable/variable.delete.d.ts +28 -0
- package/script/commands/variable/variable.delete.d.ts.map +1 -0
- package/script/commands/variable/variable.delete.js +67 -0
- package/script/commands/variable/variable.list.d.ts +27 -0
- package/script/commands/variable/variable.list.d.ts.map +1 -0
- package/script/commands/variable/variable.list.js +73 -0
- package/script/common/command.d.ts +63 -0
- package/script/common/command.d.ts.map +1 -0
- package/script/common/command.js +96 -0
- package/script/common/flowcore-client.d.ts +39 -0
- package/script/common/flowcore-client.d.ts.map +1 -0
- package/script/common/flowcore-client.js +76 -0
- package/script/contracts/api-key.d.ts +14 -0
- package/script/contracts/api-key.d.ts.map +1 -0
- package/script/contracts/api-key.js +12 -0
- package/script/contracts/data-core.d.ts +38 -0
- package/script/contracts/data-core.d.ts.map +1 -0
- package/script/contracts/data-core.js +42 -0
- package/script/contracts/event-type.d.ts +33 -0
- package/script/contracts/event-type.d.ts.map +1 -0
- package/script/contracts/event-type.js +37 -0
- package/script/contracts/event.d.ts +20 -0
- package/script/contracts/event.d.ts.map +1 -0
- package/script/contracts/event.js +18 -0
- package/script/contracts/flow-type.d.ts +32 -0
- package/script/contracts/flow-type.d.ts.map +1 -0
- package/script/contracts/flow-type.js +35 -0
- package/script/contracts/index.d.ts +4 -0
- package/script/contracts/index.d.ts.map +1 -0
- package/script/contracts/index.js +2 -0
- package/script/contracts/tenant.d.ts +50 -0
- package/script/contracts/tenant.d.ts.map +1 -0
- package/script/contracts/tenant.js +37 -0
- package/script/contracts/variable.d.ts +13 -0
- package/script/contracts/variable.d.ts.map +1 -0
- package/script/contracts/variable.js +11 -0
- package/script/exceptions/client-error.d.ts +9 -0
- package/script/exceptions/client-error.d.ts.map +1 -0
- package/script/exceptions/client-error.js +24 -0
- package/script/exceptions/command-error.d.ts +7 -0
- package/script/exceptions/command-error.d.ts.map +1 -0
- package/script/exceptions/command-error.js +12 -0
- package/script/exceptions/index.d.ts +4 -0
- package/script/exceptions/index.d.ts.map +1 -0
- package/script/exceptions/index.js +19 -0
- package/script/exceptions/invalid-response.d.ts +8 -0
- package/script/exceptions/invalid-response.d.ts.map +1 -0
- package/script/exceptions/invalid-response.js +19 -0
- package/script/exceptions/not-found.d.ts +7 -0
- package/script/exceptions/not-found.d.ts.map +1 -0
- package/script/exceptions/not-found.js +12 -0
- package/script/mod.d.ts +6 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +21 -0
- package/script/package.json +3 -0
- package/script/utils/parse-response-helper.d.ts +6 -0
- package/script/utils/parse-response-helper.d.ts.map +1 -0
- package/script/utils/parse-response-helper.js +20 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventTypeFetchCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const event_type_js_1 = require("../../contracts/event-type.js");
|
|
7
|
+
const not_found_js_1 = require("../../exceptions/not-found.js");
|
|
8
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
9
|
+
/**
|
|
10
|
+
* Fetch an event type
|
|
11
|
+
*/
|
|
12
|
+
class EventTypeFetchCommand extends command_js_1.Command {
|
|
13
|
+
/**
|
|
14
|
+
* Get the method
|
|
15
|
+
*/
|
|
16
|
+
getMethod() {
|
|
17
|
+
return "GET";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get the base url
|
|
21
|
+
*/
|
|
22
|
+
getBaseUrl() {
|
|
23
|
+
return "https://event-type-2.api.flowcore.io";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
getPath() {
|
|
29
|
+
if ("eventTypeId" in this.input) {
|
|
30
|
+
return `/api/v1/event-types/${this.input.eventTypeId}`;
|
|
31
|
+
}
|
|
32
|
+
const queryParams = new URLSearchParams();
|
|
33
|
+
queryParams.set("flowTypeId", this.input.flowTypeId);
|
|
34
|
+
queryParams.set("name", this.input.eventType);
|
|
35
|
+
return `/api/v1/event-types?${queryParams.toString()}`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parse the response
|
|
39
|
+
*/
|
|
40
|
+
parseResponse(rawResponse) {
|
|
41
|
+
if ("eventTypeId" in this.input) {
|
|
42
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(event_type_js_1.EventTypeSchema, rawResponse);
|
|
43
|
+
return response;
|
|
44
|
+
}
|
|
45
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(event_type_js_1.EventTypeSchema), rawResponse);
|
|
46
|
+
if (response.length === 0) {
|
|
47
|
+
throw new not_found_js_1.NotFoundException("EventType", this.input.eventType);
|
|
48
|
+
}
|
|
49
|
+
return response[0];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.EventTypeFetchCommand = EventTypeFetchCommand;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type EventType } from "../../contracts/event-type.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the event type list command
|
|
5
|
+
*/
|
|
6
|
+
export type EventTypeListInput = {
|
|
7
|
+
/** The flow type id */
|
|
8
|
+
flowTypeId: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Fetch all event types for a flow type
|
|
12
|
+
*/
|
|
13
|
+
export declare class EventTypeListCommand extends Command<EventTypeListInput, EventType[]> {
|
|
14
|
+
/**
|
|
15
|
+
* Get the method
|
|
16
|
+
*/
|
|
17
|
+
protected getMethod(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get the base url
|
|
20
|
+
*/
|
|
21
|
+
protected getBaseUrl(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the path
|
|
24
|
+
*/
|
|
25
|
+
protected getPath(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Parse the response
|
|
28
|
+
*/
|
|
29
|
+
protected parseResponse(rawResponse: unknown): EventType[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=event-type.list.d.ts.map
|
|
@@ -0,0 +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,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;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,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventTypeListCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
const event_type_js_1 = require("../../contracts/event-type.js");
|
|
7
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
|
+
/**
|
|
9
|
+
* Fetch all event types for a flow type
|
|
10
|
+
*/
|
|
11
|
+
class EventTypeListCommand extends command_js_1.Command {
|
|
12
|
+
/**
|
|
13
|
+
* Get the method
|
|
14
|
+
*/
|
|
15
|
+
getMethod() {
|
|
16
|
+
return "GET";
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get the base url
|
|
20
|
+
*/
|
|
21
|
+
getBaseUrl() {
|
|
22
|
+
return "https://event-type-2.api.flowcore.io";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the path
|
|
26
|
+
*/
|
|
27
|
+
getPath() {
|
|
28
|
+
const queryParams = new URLSearchParams();
|
|
29
|
+
queryParams.set("flowTypeId", this.input.flowTypeId);
|
|
30
|
+
return `/api/v1/event-types?${queryParams.toString()}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parse the response
|
|
34
|
+
*/
|
|
35
|
+
parseResponse(rawResponse) {
|
|
36
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(event_type_js_1.EventTypeSchema), rawResponse);
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.EventTypeListCommand = EventTypeListCommand;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type EventType } from "../../contracts/event-type.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the event type update command
|
|
5
|
+
*/
|
|
6
|
+
export type EventTypeUpdateInput = {
|
|
7
|
+
/** The id of the event type */
|
|
8
|
+
eventTypeId: string;
|
|
9
|
+
/** The description of the event type */
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Update an event type
|
|
14
|
+
*/
|
|
15
|
+
export declare class EventTypeUpdateCommand extends Command<EventTypeUpdateInput, EventType> {
|
|
16
|
+
/**
|
|
17
|
+
* Get the method
|
|
18
|
+
*/
|
|
19
|
+
protected getMethod(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get the base url
|
|
22
|
+
*/
|
|
23
|
+
protected getBaseUrl(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get the path
|
|
26
|
+
*/
|
|
27
|
+
protected getPath(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the body for the request
|
|
30
|
+
*/
|
|
31
|
+
protected getBody(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Parse the response
|
|
34
|
+
*/
|
|
35
|
+
protected parseResponse(rawResponse: unknown): EventType;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=event-type.update.d.ts.map
|
|
@@ -0,0 +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;CACpB,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,GAAG,SAAS;IAKhD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;CAGlE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventTypeUpdateCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const event_type_js_1 = require("../../contracts/event-type.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
/**
|
|
8
|
+
* Update an event type
|
|
9
|
+
*/
|
|
10
|
+
class EventTypeUpdateCommand extends command_js_1.Command {
|
|
11
|
+
/**
|
|
12
|
+
* Get the method
|
|
13
|
+
*/
|
|
14
|
+
getMethod() {
|
|
15
|
+
return "PATCH";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get the base url
|
|
19
|
+
*/
|
|
20
|
+
getBaseUrl() {
|
|
21
|
+
return "https://event-type-2.api.flowcore.io";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the path
|
|
25
|
+
*/
|
|
26
|
+
getPath() {
|
|
27
|
+
return `/api/v1/event-types/${this.input.eventTypeId}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the body for the request
|
|
31
|
+
*/
|
|
32
|
+
getBody() {
|
|
33
|
+
const { eventTypeId: _eventTypeId, ...payload } = this.input;
|
|
34
|
+
return JSON.stringify(payload);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
parseResponse(rawResponse) {
|
|
40
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(event_type_js_1.EventTypeSchema, rawResponse);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.EventTypeUpdateCommand = EventTypeUpdateCommand;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
/**
|
|
3
|
+
* The input for the events fetch indexes command
|
|
4
|
+
*/
|
|
5
|
+
export interface EventsFetchTimeBucketsByNamesInput {
|
|
6
|
+
/** the tenant name */
|
|
7
|
+
tenant: string;
|
|
8
|
+
/** the data core id */
|
|
9
|
+
dataCoreId: string;
|
|
10
|
+
/** the flow type name */
|
|
11
|
+
flowType: string;
|
|
12
|
+
/** the event type names */
|
|
13
|
+
eventTypes: string[];
|
|
14
|
+
/** the paging cursor */
|
|
15
|
+
cursor?: string;
|
|
16
|
+
/** the page size (default is 10.000) */
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
/** start from this time bucket */
|
|
19
|
+
fromTimeBucket?: string;
|
|
20
|
+
/** end at this time bucket */
|
|
21
|
+
toTimeBucket?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The output for the events fetch indexes command
|
|
25
|
+
*/
|
|
26
|
+
export interface EventsFetchTimeBucketsByNamesOutput {
|
|
27
|
+
/** the time buckets */
|
|
28
|
+
timeBuckets: string[];
|
|
29
|
+
/** the next page cursor */
|
|
30
|
+
nextCursor?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fetch time buckets for an event type
|
|
34
|
+
*/
|
|
35
|
+
export declare class EventsFetchTimeBucketsByNamesCommand extends Command<EventsFetchTimeBucketsByNamesInput, EventsFetchTimeBucketsByNamesOutput> {
|
|
36
|
+
/**
|
|
37
|
+
* Get the base url for the request
|
|
38
|
+
*/
|
|
39
|
+
protected getBaseUrl(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get the path for the request
|
|
42
|
+
*/
|
|
43
|
+
protected getPath(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Parse the response
|
|
46
|
+
*/
|
|
47
|
+
protected parseResponse(rawResponse: unknown): EventsFetchTimeBucketsByNamesOutput;
|
|
48
|
+
/**
|
|
49
|
+
* Get the body for the request
|
|
50
|
+
*/
|
|
51
|
+
protected getBody(): string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=events.fetch-time-buckets-by-names.d.ts.map
|
|
@@ -0,0 +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;CAGrC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventsFetchTimeBucketsByNamesCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
6
|
+
const command_js_1 = require("../../common/command.js");
|
|
7
|
+
/**
|
|
8
|
+
* The response schema for the events fetch time buckets by names command
|
|
9
|
+
*/
|
|
10
|
+
const responseSchema = typebox_1.Type.Object({
|
|
11
|
+
timeBuckets: typebox_1.Type.Array(typebox_1.Type.String()),
|
|
12
|
+
nextCursor: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Fetch time buckets for an event type
|
|
16
|
+
*/
|
|
17
|
+
class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
|
|
18
|
+
/**
|
|
19
|
+
* Get the base url for the request
|
|
20
|
+
*/
|
|
21
|
+
getBaseUrl() {
|
|
22
|
+
return "https://event-source.api.flowcore.io";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the path for the request
|
|
26
|
+
*/
|
|
27
|
+
getPath() {
|
|
28
|
+
return "/api/v1/time-buckets/by-names";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parse the response
|
|
32
|
+
*/
|
|
33
|
+
parseResponse(rawResponse) {
|
|
34
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
35
|
+
return response;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get the body for the request
|
|
39
|
+
*/
|
|
40
|
+
getBody() {
|
|
41
|
+
return JSON.stringify(this.input);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.EventsFetchTimeBucketsByNamesCommand = EventsFetchTimeBucketsByNamesCommand;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type FlowcoreEvent } from "../../contracts/event.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the events fetch indexes command
|
|
5
|
+
*/
|
|
6
|
+
export interface EventsFetchEventsInput {
|
|
7
|
+
/** the tenant */
|
|
8
|
+
tenant: string;
|
|
9
|
+
/** the data core id */
|
|
10
|
+
dataCoreId: string;
|
|
11
|
+
/** the flow type name */
|
|
12
|
+
flowType: string;
|
|
13
|
+
/** the event type names */
|
|
14
|
+
eventTypes: string[];
|
|
15
|
+
/** the time bucket */
|
|
16
|
+
timeBucket: string;
|
|
17
|
+
/** the paging cursor */
|
|
18
|
+
cursor?: string;
|
|
19
|
+
/** the page size (default is 10.000) */
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
/** start from this event id */
|
|
22
|
+
fromEventId?: string;
|
|
23
|
+
/** after this event id */
|
|
24
|
+
afterEventId?: string;
|
|
25
|
+
/** end at this event id */
|
|
26
|
+
toEventId?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The output for the events fetch indexes command
|
|
30
|
+
*/
|
|
31
|
+
export interface EventsFetchEventsOutput {
|
|
32
|
+
/** the events */
|
|
33
|
+
events: FlowcoreEvent[];
|
|
34
|
+
/** the next page cursor */
|
|
35
|
+
nextCursor?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fetch time buckets for an event type
|
|
39
|
+
*/
|
|
40
|
+
export declare class EventsFetchCommand extends Command<EventsFetchEventsInput, EventsFetchEventsOutput> {
|
|
41
|
+
/**
|
|
42
|
+
* Get the base url for the request
|
|
43
|
+
*/
|
|
44
|
+
protected getBaseUrl(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Get the path for the request
|
|
47
|
+
*/
|
|
48
|
+
protected getPath(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Parse the response
|
|
51
|
+
*/
|
|
52
|
+
protected parseResponse(rawResponse: unknown): EventsFetchEventsOutput;
|
|
53
|
+
/**
|
|
54
|
+
* Get the body for the request
|
|
55
|
+
*/
|
|
56
|
+
protected getBody(): string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=events.fetch.d.ts.map
|
|
@@ -0,0 +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;CASrC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventsFetchCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
const event_js_1 = require("../../contracts/event.js");
|
|
8
|
+
/**
|
|
9
|
+
* The response schema for the events fetch command
|
|
10
|
+
*/
|
|
11
|
+
const responseSchema = typebox_1.Type.Object({
|
|
12
|
+
events: typebox_1.Type.Array(event_js_1.FlowcoreEventSchema),
|
|
13
|
+
nextCursor: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Fetch time buckets for an event type
|
|
17
|
+
*/
|
|
18
|
+
class EventsFetchCommand extends command_js_1.Command {
|
|
19
|
+
/**
|
|
20
|
+
* Get the base url for the request
|
|
21
|
+
*/
|
|
22
|
+
getBaseUrl() {
|
|
23
|
+
return "https://event-source.api.flowcore.io";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get the path for the request
|
|
27
|
+
*/
|
|
28
|
+
getPath() {
|
|
29
|
+
const query = {
|
|
30
|
+
...(this.input.cursor ? { cursor: this.input.cursor.toString() } : {}),
|
|
31
|
+
...(this.input.pageSize ? { pageSize: this.input.pageSize.toString() } : {}),
|
|
32
|
+
...(this.input.fromEventId ? { fromEventId: this.input.fromEventId } : {}),
|
|
33
|
+
...(this.input.afterEventId ? { afterEventId: this.input.afterEventId } : {}),
|
|
34
|
+
...(this.input.toEventId ? { toEventId: this.input.toEventId } : {}),
|
|
35
|
+
};
|
|
36
|
+
return `/api/v1/events?${new URLSearchParams(query).toString()}`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Parse the response
|
|
40
|
+
*/
|
|
41
|
+
parseResponse(rawResponse) {
|
|
42
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
43
|
+
return response;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get the body for the request
|
|
47
|
+
*/
|
|
48
|
+
getBody() {
|
|
49
|
+
return JSON.stringify({
|
|
50
|
+
tenant: this.input.tenant,
|
|
51
|
+
dataCoreId: this.input.dataCoreId,
|
|
52
|
+
flowType: this.input.flowType,
|
|
53
|
+
eventTypes: this.input.eventTypes,
|
|
54
|
+
timeBucket: this.input.timeBucket,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.EventsFetchCommand = EventsFetchCommand;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type FlowType } from "../../contracts/flow-type.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the data core create command
|
|
5
|
+
*/
|
|
6
|
+
export type FlowTypeCreateInput = {
|
|
7
|
+
/** The id of the data core */
|
|
8
|
+
dataCoreId: string;
|
|
9
|
+
/** The name of the flow type */
|
|
10
|
+
name: string;
|
|
11
|
+
/** The description of the flow type */
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create a flow type
|
|
16
|
+
*/
|
|
17
|
+
export declare class FlowTypeCreateCommand extends Command<FlowTypeCreateInput, FlowType> {
|
|
18
|
+
/**
|
|
19
|
+
* Get the method
|
|
20
|
+
*/
|
|
21
|
+
protected getMethod(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the base url
|
|
24
|
+
*/
|
|
25
|
+
protected getBaseUrl(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the path
|
|
28
|
+
*/
|
|
29
|
+
protected getPath(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Parse the response
|
|
32
|
+
*/
|
|
33
|
+
protected parseResponse(rawResponse: unknown): FlowType;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=flow-type.create.d.ts.map
|
|
@@ -0,0 +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,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB,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,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowTypeCreateCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const flow_type_js_1 = require("../../contracts/flow-type.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
/**
|
|
8
|
+
* Create a flow type
|
|
9
|
+
*/
|
|
10
|
+
class FlowTypeCreateCommand extends command_js_1.Command {
|
|
11
|
+
/**
|
|
12
|
+
* Get the method
|
|
13
|
+
*/
|
|
14
|
+
getMethod() {
|
|
15
|
+
return "POST";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get the base url
|
|
19
|
+
*/
|
|
20
|
+
getBaseUrl() {
|
|
21
|
+
return "https://flow-type-2.api.flowcore.io";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the path
|
|
25
|
+
*/
|
|
26
|
+
getPath() {
|
|
27
|
+
return `/api/v1/flow-types`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Parse the response
|
|
31
|
+
*/
|
|
32
|
+
parseResponse(rawResponse) {
|
|
33
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(flow_type_js_1.FlowTypeSchema, rawResponse);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.FlowTypeCreateCommand = FlowTypeCreateCommand;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GraphQlCommand } from "../../common/command.js";
|
|
2
|
+
import type { FlowcoreClient } from "../../common/flowcore-client.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the flow type delete request command
|
|
5
|
+
*/
|
|
6
|
+
export type FlowTypeDeleteRequestInput = {
|
|
7
|
+
/** The id of the flow type */
|
|
8
|
+
flowTypeId: string;
|
|
9
|
+
/** Whether to wait for the flow type to be deleted */
|
|
10
|
+
waitForDelete?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Request to delete a flow type
|
|
14
|
+
*/
|
|
15
|
+
export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTypeDeleteRequestInput, boolean> {
|
|
16
|
+
/**
|
|
17
|
+
* The allowed modes for the command
|
|
18
|
+
*/
|
|
19
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
20
|
+
/**
|
|
21
|
+
* Create a new flow type delete request command
|
|
22
|
+
*/
|
|
23
|
+
constructor(input: FlowTypeDeleteRequestInput);
|
|
24
|
+
/**
|
|
25
|
+
* Parse the response
|
|
26
|
+
*/
|
|
27
|
+
protected parseResponse(response: unknown): boolean;
|
|
28
|
+
getRequest(client: FlowcoreClient): Promise<{
|
|
29
|
+
allowedModes: ("apiKey" | "bearer")[];
|
|
30
|
+
body: string | undefined;
|
|
31
|
+
headers: Record<string, string>;
|
|
32
|
+
baseUrl: string;
|
|
33
|
+
path: string;
|
|
34
|
+
method: string;
|
|
35
|
+
parseResponse: (response: unknown, flowcoreClient: FlowcoreClient) => boolean | Promise<boolean>;
|
|
36
|
+
waitForResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Get the body for the request
|
|
40
|
+
*/
|
|
41
|
+
protected getBody(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Wait for the response (timeout: 25 seconds)
|
|
44
|
+
*/
|
|
45
|
+
protected waitForResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=flow-type.delete-request.d.ts.map
|
|
@@ -0,0 +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;AAOrE;;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,EAAE,cAAc,EAAE,cAAc,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAChG,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KACjF,CACF;IAqBD;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
|