@flowcore/sdk 1.47.0 → 1.48.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 +19 -0
- package/README.md +114 -0
- package/esm/commands/event-type/event-type.info.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.info.js +2 -1
- package/esm/commands/index.d.ts +5 -0
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +6 -0
- package/esm/commands/scenario/scenario.create.d.ts +41 -0
- package/esm/commands/scenario/scenario.create.d.ts.map +1 -0
- package/esm/commands/scenario/scenario.create.js +44 -0
- package/esm/commands/scenario/scenario.delete.d.ts +37 -0
- package/esm/commands/scenario/scenario.delete.d.ts.map +1 -0
- package/esm/commands/scenario/scenario.delete.js +47 -0
- package/esm/commands/scenario/scenario.fetch.d.ts +35 -0
- package/esm/commands/scenario/scenario.fetch.d.ts.map +1 -0
- package/esm/commands/scenario/scenario.fetch.js +44 -0
- package/esm/commands/scenario/scenario.list.d.ts +44 -0
- package/esm/commands/scenario/scenario.list.d.ts.map +1 -0
- package/esm/commands/scenario/scenario.list.js +49 -0
- package/esm/commands/scenario/scenario.update.d.ts +41 -0
- package/esm/commands/scenario/scenario.update.d.ts.map +1 -0
- package/esm/commands/scenario/scenario.update.js +44 -0
- package/esm/contracts/scenario.d.ts +18 -0
- package/esm/contracts/scenario.d.ts.map +1 -0
- package/esm/contracts/scenario.js +20 -0
- package/package.json +1 -1
- package/script/commands/event-type/event-type.info.d.ts.map +1 -1
- package/script/commands/event-type/event-type.info.js +2 -1
- package/script/commands/index.d.ts +5 -0
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +6 -0
- package/script/commands/scenario/scenario.create.d.ts +41 -0
- package/script/commands/scenario/scenario.create.d.ts.map +1 -0
- package/script/commands/scenario/scenario.create.js +48 -0
- package/script/commands/scenario/scenario.delete.d.ts +37 -0
- package/script/commands/scenario/scenario.delete.d.ts.map +1 -0
- package/script/commands/scenario/scenario.delete.js +51 -0
- package/script/commands/scenario/scenario.fetch.d.ts +35 -0
- package/script/commands/scenario/scenario.fetch.d.ts.map +1 -0
- package/script/commands/scenario/scenario.fetch.js +48 -0
- package/script/commands/scenario/scenario.list.d.ts +44 -0
- package/script/commands/scenario/scenario.list.d.ts.map +1 -0
- package/script/commands/scenario/scenario.list.js +53 -0
- package/script/commands/scenario/scenario.update.d.ts +41 -0
- package/script/commands/scenario/scenario.update.d.ts.map +1 -0
- package/script/commands/scenario/scenario.update.js +48 -0
- package/script/contracts/scenario.d.ts +18 -0
- package/script/contracts/scenario.d.ts.map +1 -0
- package/script/contracts/scenario.js +23 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Static, type TObject, type TOptional, type TString } from "@sinclair/typebox";
|
|
2
|
+
/**
|
|
3
|
+
* The schema for an event type
|
|
4
|
+
*/
|
|
5
|
+
export declare const ScenarioSchema: TObject<{
|
|
6
|
+
id: TString;
|
|
7
|
+
tenantId: TString;
|
|
8
|
+
name: TString;
|
|
9
|
+
displayName: TOptional<TString>;
|
|
10
|
+
description: TOptional<TString>;
|
|
11
|
+
createdAt: TString;
|
|
12
|
+
updatedAt: TString;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* The type for an event type
|
|
16
|
+
*/
|
|
17
|
+
export type Scenario = Static<typeof ScenarioSchema>;
|
|
18
|
+
//# sourceMappingURL=scenario.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../src/contracts/scenario.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAEjG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC;IACnC,EAAE,EAAE,OAAO,CAAA;IACX,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAeC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
/**
|
|
3
|
+
* The schema for an event type
|
|
4
|
+
*/
|
|
5
|
+
export const ScenarioSchema = Type.Object({
|
|
6
|
+
/** Unique identifier for the event type */
|
|
7
|
+
id: Type.String(),
|
|
8
|
+
/** ID of the tenant that owns this event type */
|
|
9
|
+
tenantId: Type.String(),
|
|
10
|
+
/** Name of the event type */
|
|
11
|
+
name: Type.String(),
|
|
12
|
+
/** Display name of the event type */
|
|
13
|
+
displayName: Type.Optional(Type.String()),
|
|
14
|
+
/** Description of the event type */
|
|
15
|
+
description: Type.Optional(Type.String()),
|
|
16
|
+
/** Creation timestamp */
|
|
17
|
+
createdAt: Type.String(),
|
|
18
|
+
/** Last update timestamp */
|
|
19
|
+
updatedAt: Type.String(),
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.info.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAI7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB;IACtB,UAAU,EAAE,aAAa,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IAC9F;;OAEG;cACsB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"event-type.info.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAI7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB;IACtB,UAAU,EAAE,aAAa,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;IAC9F;;OAEG;cACsB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAqE7F"}
|
|
@@ -41,13 +41,14 @@ class EventTypeInfoCommand extends command_custom_js_1.CustomCommand {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
const lastEvents = [];
|
|
44
|
+
const minLastEventLimit = Math.max(lastEventsLimit, lastEventsLimit * 3);
|
|
44
45
|
for (const timeBucket of lastTimeBucketResponse.timeBuckets) {
|
|
45
46
|
let cursor = undefined;
|
|
46
47
|
do {
|
|
47
48
|
const eventListResponse = await client.execute(new event_list_js_1.EventListCommand({
|
|
48
49
|
eventTypeId: this.input.eventTypeId,
|
|
49
50
|
timeBucket,
|
|
50
|
-
pageSize:
|
|
51
|
+
pageSize: minLastEventLimit - lastEvents.length,
|
|
51
52
|
order: "desc",
|
|
52
53
|
tenant: this.input.tenant,
|
|
53
54
|
...(cursor && { cursor }),
|
|
@@ -58,4 +58,9 @@ export * from "./security/pat.exchange.js";
|
|
|
58
58
|
export * from "./security/pat.get.js";
|
|
59
59
|
export * from "./security/pat.list.js";
|
|
60
60
|
export * from "./security/permissions.list.js";
|
|
61
|
+
export * from "./scenario/scenario.create.js";
|
|
62
|
+
export * from "./scenario/scenario.delete.js";
|
|
63
|
+
export * from "./scenario/scenario.fetch.js";
|
|
64
|
+
export * from "./scenario/scenario.list.js";
|
|
65
|
+
export * from "./scenario/scenario.update.js";
|
|
61
66
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wDAAwD,CAAA;AACtE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kDAAkD,CAAA;AAChE,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AAGjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,0CAA0C,CAAA;AACxD,cAAc,0CAA0C,CAAA;AACxD,cAAc,wCAAwC,CAAA;AACtD,cAAc,oBAAoB,CAAA;AAClC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AAGnD,cAAc,wBAAwB,CAAA;AACtC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAG5C,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AAGjE,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AAGvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wDAAwD,CAAA;AACtE,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kDAAkD,CAAA;AAChE,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AAGjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,0CAA0C,CAAA;AACxD,cAAc,0CAA0C,CAAA;AACxD,cAAc,wCAAwC,CAAA;AACtD,cAAc,oBAAoB,CAAA;AAClC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,qCAAqC,CAAA;AAGnD,cAAc,wBAAwB,CAAA;AACtC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAG5C,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,mDAAmD,CAAA;AAGjE,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAG9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA"}
|
package/script/commands/index.js
CHANGED
|
@@ -86,3 +86,9 @@ __exportStar(require("./security/pat.exchange.js"), exports);
|
|
|
86
86
|
__exportStar(require("./security/pat.get.js"), exports);
|
|
87
87
|
__exportStar(require("./security/pat.list.js"), exports);
|
|
88
88
|
__exportStar(require("./security/permissions.list.js"), exports);
|
|
89
|
+
// Scenario
|
|
90
|
+
__exportStar(require("./scenario/scenario.create.js"), exports);
|
|
91
|
+
__exportStar(require("./scenario/scenario.delete.js"), exports);
|
|
92
|
+
__exportStar(require("./scenario/scenario.fetch.js"), exports);
|
|
93
|
+
__exportStar(require("./scenario/scenario.list.js"), exports);
|
|
94
|
+
__exportStar(require("./scenario/scenario.update.js"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Scenario } from "../../contracts/scenario.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the scenario create command
|
|
5
|
+
*/
|
|
6
|
+
export interface ScenarioCreateInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
/** The name of the scenario */
|
|
10
|
+
name: string;
|
|
11
|
+
/** The description of the scenario */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** The display name of the scenario */
|
|
14
|
+
displayName?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a scenario
|
|
18
|
+
*/
|
|
19
|
+
export declare class ScenarioCreateCommand extends Command<ScenarioCreateInput, Scenario> {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the command should retry on failure
|
|
22
|
+
*/
|
|
23
|
+
protected retryOnFailure: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the method
|
|
26
|
+
*/
|
|
27
|
+
protected getMethod(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the base url
|
|
30
|
+
*/
|
|
31
|
+
protected getBaseUrl(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the path
|
|
34
|
+
*/
|
|
35
|
+
protected getPath(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
protected parseResponse(rawResponse: unknown): Scenario;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=scenario.create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.create.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/scenario.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioCreateCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const scenario_js_1 = require("../../contracts/scenario.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
/**
|
|
8
|
+
* Create a scenario
|
|
9
|
+
*/
|
|
10
|
+
class ScenarioCreateCommand 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
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the method
|
|
25
|
+
*/
|
|
26
|
+
getMethod() {
|
|
27
|
+
return "POST";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the base url
|
|
31
|
+
*/
|
|
32
|
+
getBaseUrl() {
|
|
33
|
+
return "https://scenario-2.api.flowcore.io";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the path
|
|
37
|
+
*/
|
|
38
|
+
getPath() {
|
|
39
|
+
return `/api/v1/scenarios`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(scenario_js_1.ScenarioSchema, rawResponse);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ScenarioCreateCommand = ScenarioCreateCommand;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
/**
|
|
3
|
+
* The input for the scenario delete command
|
|
4
|
+
*/
|
|
5
|
+
export interface ScenarioDeleteInput {
|
|
6
|
+
/** The scenario id */
|
|
7
|
+
scenarioId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ScenarioDeleteOutput {
|
|
10
|
+
success: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Delete a scenario
|
|
14
|
+
*/
|
|
15
|
+
export declare class ScenarioDeleteCommand extends Command<ScenarioDeleteInput, ScenarioDeleteOutput> {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
protected retryOnFailure: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Get the method
|
|
22
|
+
*/
|
|
23
|
+
protected getMethod(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get the base url
|
|
26
|
+
*/
|
|
27
|
+
protected getBaseUrl(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the path
|
|
30
|
+
*/
|
|
31
|
+
protected getPath(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Parse the response
|
|
34
|
+
*/
|
|
35
|
+
protected parseResponse(rawResponse: unknown): ScenarioDeleteOutput;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=scenario.delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/scenario.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;CACjB;AAMD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAC3F;;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,oBAAoB;CAG7E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioDeleteCommand = 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 ScenarioDeleteOutputSchema = typebox_1.Type.Object({
|
|
8
|
+
success: typebox_1.Type.Boolean(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* Delete a scenario
|
|
12
|
+
*/
|
|
13
|
+
class ScenarioDeleteCommand extends command_js_1.Command {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: false
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get the method
|
|
28
|
+
*/
|
|
29
|
+
getMethod() {
|
|
30
|
+
return "DELETE";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the base url
|
|
34
|
+
*/
|
|
35
|
+
getBaseUrl() {
|
|
36
|
+
return "https://scenario-2.api.flowcore.io";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the path
|
|
40
|
+
*/
|
|
41
|
+
getPath() {
|
|
42
|
+
return `/api/v1/scenarios/${this.input.scenarioId}`;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse the response
|
|
46
|
+
*/
|
|
47
|
+
parseResponse(rawResponse) {
|
|
48
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(ScenarioDeleteOutputSchema, rawResponse);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ScenarioDeleteCommand = ScenarioDeleteCommand;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Scenario } from "../../contracts/scenario.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the scenario fetch command
|
|
5
|
+
*/
|
|
6
|
+
export interface ScenarioFetchInput {
|
|
7
|
+
/** The scenario id */
|
|
8
|
+
scenarioId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* fetch a scenario
|
|
12
|
+
*/
|
|
13
|
+
export declare class ScenarioFetchCommand extends Command<ScenarioFetchInput, Scenario> {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the command should retry on failure
|
|
16
|
+
*/
|
|
17
|
+
protected retryOnFailure: boolean;
|
|
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): Scenario;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=scenario.fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/scenario.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioFetchCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const scenario_js_1 = require("../../contracts/scenario.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
/**
|
|
8
|
+
* fetch a scenario
|
|
9
|
+
*/
|
|
10
|
+
class ScenarioFetchCommand 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
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the method
|
|
25
|
+
*/
|
|
26
|
+
getMethod() {
|
|
27
|
+
return "GET";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the base url
|
|
31
|
+
*/
|
|
32
|
+
getBaseUrl() {
|
|
33
|
+
return "https://scenario-2.api.flowcore.io";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the path
|
|
37
|
+
*/
|
|
38
|
+
getPath() {
|
|
39
|
+
return `/api/v1/scenarios/${this.input.scenarioId}`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(scenario_js_1.ScenarioSchema, rawResponse);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ScenarioFetchCommand = ScenarioFetchCommand;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Scenario } from "../../contracts/scenario.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the scenario create command
|
|
5
|
+
*/
|
|
6
|
+
export interface ScenarioListInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The output for the scenario list command
|
|
12
|
+
*/
|
|
13
|
+
export interface ScenarioListOutput {
|
|
14
|
+
/** The tenant id */
|
|
15
|
+
id: string;
|
|
16
|
+
/** the scenarios in that tenant */
|
|
17
|
+
scenarios: Scenario[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* list all scenarios
|
|
21
|
+
*/
|
|
22
|
+
export declare class ScenarioListCommand extends Command<ScenarioListInput, ScenarioListOutput> {
|
|
23
|
+
/**
|
|
24
|
+
* Whether the command should retry on failure
|
|
25
|
+
*/
|
|
26
|
+
protected retryOnFailure: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get the method
|
|
29
|
+
*/
|
|
30
|
+
protected getMethod(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the base url
|
|
33
|
+
*/
|
|
34
|
+
protected getBaseUrl(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Get the path
|
|
37
|
+
*/
|
|
38
|
+
protected getPath(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Parse the response
|
|
41
|
+
*/
|
|
42
|
+
protected parseResponse(rawResponse: unknown): ScenarioListOutput;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=scenario.list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.list.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/scenario.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,mCAAmC;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAA;CACtB;AAOD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;IACrF;;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,kBAAkB;CAG3E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioListCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const scenario_js_1 = require("../../contracts/scenario.js");
|
|
7
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
|
+
const ScenarioListOutputSchema = typebox_1.Type.Object({
|
|
9
|
+
id: typebox_1.Type.String(),
|
|
10
|
+
scenarios: typebox_1.Type.Array(scenario_js_1.ScenarioSchema),
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* list all scenarios
|
|
14
|
+
*/
|
|
15
|
+
class ScenarioListCommand extends command_js_1.Command {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/**
|
|
19
|
+
* Whether the command should retry on failure
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(this, "retryOnFailure", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: false
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the method
|
|
30
|
+
*/
|
|
31
|
+
getMethod() {
|
|
32
|
+
return "GET";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the base url
|
|
36
|
+
*/
|
|
37
|
+
getBaseUrl() {
|
|
38
|
+
return "https://scenario-2.api.flowcore.io";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the path
|
|
42
|
+
*/
|
|
43
|
+
getPath() {
|
|
44
|
+
return `/api/v1/scenarios/tenant/${this.input.tenantId}`;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Parse the response
|
|
48
|
+
*/
|
|
49
|
+
parseResponse(rawResponse) {
|
|
50
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(ScenarioListOutputSchema, rawResponse);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ScenarioListCommand = ScenarioListCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Scenario } from "../../contracts/scenario.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the scenario update command
|
|
5
|
+
*/
|
|
6
|
+
export interface ScenarioUpdateInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
/** The scenario id */
|
|
10
|
+
scenarioId: string;
|
|
11
|
+
/** The description of the scenario */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** The display name of the scenario */
|
|
14
|
+
displayName?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Update a scenario
|
|
18
|
+
*/
|
|
19
|
+
export declare class ScenarioUpdateCommand extends Command<ScenarioUpdateInput, Scenario> {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the command should retry on failure
|
|
22
|
+
*/
|
|
23
|
+
protected retryOnFailure: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the method
|
|
26
|
+
*/
|
|
27
|
+
protected getMethod(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the base url
|
|
30
|
+
*/
|
|
31
|
+
protected getBaseUrl(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the path
|
|
34
|
+
*/
|
|
35
|
+
protected getPath(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
protected parseResponse(rawResponse: unknown): Scenario;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=scenario.update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.update.d.ts","sourceRoot":"","sources":["../../../src/commands/scenario/scenario.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAG3E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioUpdateCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const scenario_js_1 = require("../../contracts/scenario.js");
|
|
6
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
+
/**
|
|
8
|
+
* Update a scenario
|
|
9
|
+
*/
|
|
10
|
+
class ScenarioUpdateCommand 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
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the method
|
|
25
|
+
*/
|
|
26
|
+
getMethod() {
|
|
27
|
+
return "PATCH";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the base url
|
|
31
|
+
*/
|
|
32
|
+
getBaseUrl() {
|
|
33
|
+
return "https://scenario-2.api.flowcore.io";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the path
|
|
37
|
+
*/
|
|
38
|
+
getPath() {
|
|
39
|
+
return `/api/v1/scenarios/${this.input.scenarioId}`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(scenario_js_1.ScenarioSchema, rawResponse);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.ScenarioUpdateCommand = ScenarioUpdateCommand;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Static, type TObject, type TOptional, type TString } from "@sinclair/typebox";
|
|
2
|
+
/**
|
|
3
|
+
* The schema for an event type
|
|
4
|
+
*/
|
|
5
|
+
export declare const ScenarioSchema: TObject<{
|
|
6
|
+
id: TString;
|
|
7
|
+
tenantId: TString;
|
|
8
|
+
name: TString;
|
|
9
|
+
displayName: TOptional<TString>;
|
|
10
|
+
description: TOptional<TString>;
|
|
11
|
+
createdAt: TString;
|
|
12
|
+
updatedAt: TString;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* The type for an event type
|
|
16
|
+
*/
|
|
17
|
+
export type Scenario = Static<typeof ScenarioSchema>;
|
|
18
|
+
//# sourceMappingURL=scenario.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../../src/contracts/scenario.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAEjG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC;IACnC,EAAE,EAAE,OAAO,CAAA;IACX,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAeC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScenarioSchema = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
/**
|
|
6
|
+
* The schema for an event type
|
|
7
|
+
*/
|
|
8
|
+
exports.ScenarioSchema = typebox_1.Type.Object({
|
|
9
|
+
/** Unique identifier for the event type */
|
|
10
|
+
id: typebox_1.Type.String(),
|
|
11
|
+
/** ID of the tenant that owns this event type */
|
|
12
|
+
tenantId: typebox_1.Type.String(),
|
|
13
|
+
/** Name of the event type */
|
|
14
|
+
name: typebox_1.Type.String(),
|
|
15
|
+
/** Display name of the event type */
|
|
16
|
+
displayName: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
17
|
+
/** Description of the event type */
|
|
18
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
19
|
+
/** Creation timestamp */
|
|
20
|
+
createdAt: typebox_1.Type.String(),
|
|
21
|
+
/** Last update timestamp */
|
|
22
|
+
updatedAt: typebox_1.Type.String(),
|
|
23
|
+
});
|