@flowcore/sdk 1.20.0 → 1.21.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 +16 -0
- package/esm/commands/data-core/data-core.request-delete.d.ts +5 -1
- package/esm/commands/data-core/data-core.request-delete.d.ts.map +1 -1
- package/esm/commands/data-core/data-core.request-delete.js +3 -6
- package/esm/commands/event-type/event-type.info.d.ts +2 -0
- package/esm/commands/event-type/event-type.info.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.info.js +3 -0
- package/esm/commands/event-type/event-type.request-delete.d.ts +5 -1
- package/esm/commands/event-type/event-type.request-delete.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.request-delete.js +3 -6
- package/esm/commands/event-type/event-type.request-truncate.d.ts +5 -1
- package/esm/commands/event-type/event-type.request-truncate.d.ts.map +1 -1
- package/esm/commands/event-type/event-type.request-truncate.js +3 -6
- package/esm/commands/events/event.list.d.ts +5 -1
- package/esm/commands/events/event.list.d.ts.map +1 -1
- package/esm/commands/events/event.list.js +3 -6
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts +3 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +3 -6
- package/esm/commands/events/events.fetch.d.ts +3 -1
- package/esm/commands/events/events.fetch.d.ts.map +1 -1
- package/esm/commands/events/events.fetch.js +3 -6
- package/esm/commands/events/time-bucket.list.d.ts +5 -1
- package/esm/commands/events/time-bucket.list.d.ts.map +1 -1
- package/esm/commands/events/time-bucket.list.js +3 -6
- package/esm/commands/flow-type/flow-type.delete-request.d.ts +0 -2
- package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.request-delete.d.ts +5 -1
- package/esm/commands/flow-type/flow-type.request-delete.d.ts.map +1 -1
- package/esm/commands/flow-type/flow-type.request-delete.js +3 -6
- 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/security/pat.exchange.d.ts.map +1 -1
- package/esm/commands/security/permissions.list.d.ts +28 -0
- package/esm/commands/security/permissions.list.d.ts.map +1 -0
- package/esm/commands/security/permissions.list.js +38 -0
- package/esm/commands/tenant/tenant.translate-name-to-id.d.ts.map +1 -1
- package/esm/common/command-custom.d.ts +0 -2
- package/esm/common/command-custom.d.ts.map +1 -1
- package/esm/common/command.d.ts +9 -5
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +33 -11
- package/esm/common/flowcore-client.d.ts +5 -6
- package/esm/common/flowcore-client.d.ts.map +1 -1
- package/esm/common/flowcore-client.js +20 -35
- package/esm/common/tenant.cache.d.ts +17 -0
- package/esm/common/tenant.cache.d.ts.map +1 -0
- package/esm/common/tenant.cache.js +2 -0
- package/esm/contracts/pat.d.ts.map +1 -1
- package/esm/contracts/permission.d.ts +21 -0
- package/esm/contracts/permission.d.ts.map +1 -0
- package/esm/contracts/permission.js +16 -0
- package/esm/utils/local-cache.d.ts +11 -0
- package/esm/utils/local-cache.d.ts.map +1 -0
- package/esm/utils/local-cache.js +45 -0
- package/esm/utils/try-catch.d.ts +12 -0
- package/esm/utils/try-catch.d.ts.map +1 -0
- package/esm/utils/try-catch.js +10 -0
- package/package.json +1 -2
- package/script/commands/data-core/data-core.request-delete.d.ts +5 -1
- package/script/commands/data-core/data-core.request-delete.d.ts.map +1 -1
- package/script/commands/data-core/data-core.request-delete.js +3 -6
- package/script/commands/event-type/event-type.info.d.ts +2 -0
- package/script/commands/event-type/event-type.info.d.ts.map +1 -1
- package/script/commands/event-type/event-type.info.js +3 -0
- package/script/commands/event-type/event-type.request-delete.d.ts +5 -1
- package/script/commands/event-type/event-type.request-delete.d.ts.map +1 -1
- package/script/commands/event-type/event-type.request-delete.js +3 -6
- package/script/commands/event-type/event-type.request-truncate.d.ts +5 -1
- package/script/commands/event-type/event-type.request-truncate.d.ts.map +1 -1
- package/script/commands/event-type/event-type.request-truncate.js +3 -6
- package/script/commands/events/event.list.d.ts +5 -1
- package/script/commands/events/event.list.d.ts.map +1 -1
- package/script/commands/events/event.list.js +3 -6
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts +3 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
- package/script/commands/events/events.fetch-time-buckets-by-names.js +3 -6
- package/script/commands/events/events.fetch.d.ts +3 -1
- package/script/commands/events/events.fetch.d.ts.map +1 -1
- package/script/commands/events/events.fetch.js +3 -6
- package/script/commands/events/time-bucket.list.d.ts +5 -1
- package/script/commands/events/time-bucket.list.d.ts.map +1 -1
- package/script/commands/events/time-bucket.list.js +3 -6
- package/script/commands/flow-type/flow-type.delete-request.d.ts +0 -2
- package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.request-delete.d.ts +5 -1
- package/script/commands/flow-type/flow-type.request-delete.d.ts.map +1 -1
- package/script/commands/flow-type/flow-type.request-delete.js +3 -6
- 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/security/pat.exchange.d.ts.map +1 -1
- package/script/commands/security/permissions.list.d.ts +28 -0
- package/script/commands/security/permissions.list.d.ts.map +1 -0
- package/script/commands/security/permissions.list.js +42 -0
- package/script/commands/tenant/tenant.translate-name-to-id.d.ts.map +1 -1
- package/script/common/command-custom.d.ts +0 -2
- package/script/common/command-custom.d.ts.map +1 -1
- package/script/common/command.d.ts +9 -5
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +33 -11
- package/script/common/flowcore-client.d.ts +5 -6
- package/script/common/flowcore-client.d.ts.map +1 -1
- package/script/common/flowcore-client.js +20 -38
- package/script/common/tenant.cache.d.ts +17 -0
- package/script/common/tenant.cache.d.ts.map +1 -0
- package/script/common/tenant.cache.js +5 -0
- package/script/contracts/pat.d.ts.map +1 -1
- package/script/contracts/permission.d.ts +21 -0
- package/script/contracts/permission.d.ts.map +1 -0
- package/script/contracts/permission.js +19 -0
- package/script/utils/local-cache.d.ts +11 -0
- package/script/utils/local-cache.d.ts.map +1 -0
- package/script/utils/local-cache.js +49 -0
- package/script/utils/try-catch.d.ts +12 -0
- package/script/utils/try-catch.d.ts.map +1 -0
- package/script/utils/try-catch.js +13 -0
|
@@ -17,12 +17,9 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
17
17
|
class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
writable: true,
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
20
|
+
/**
|
|
21
|
+
* The dedicated subdomain for the command
|
|
22
|
+
*/
|
|
26
23
|
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
27
24
|
enumerable: true,
|
|
28
25
|
configurable: true,
|
|
@@ -38,7 +38,9 @@ export interface EventsFetchEventsOutput {
|
|
|
38
38
|
* Fetch time buckets for an event type
|
|
39
39
|
*/
|
|
40
40
|
export declare class EventsFetchCommand extends Command<EventsFetchEventsInput, EventsFetchEventsOutput> {
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* The dedicated subdomain for the command
|
|
43
|
+
*/
|
|
42
44
|
protected dedicatedSubdomain: string;
|
|
43
45
|
/**
|
|
44
46
|
* Get the base url for the request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC9F
|
|
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;IACH,UAAmB,kBAAkB,EAAE,MAAM,CAAiB;IAE9D;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAStD"}
|
|
@@ -18,12 +18,9 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
18
18
|
class EventsFetchCommand extends command_js_1.Command {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
writable: true,
|
|
25
|
-
value: true
|
|
26
|
-
});
|
|
21
|
+
/**
|
|
22
|
+
* The dedicated subdomain for the command
|
|
23
|
+
*/
|
|
27
24
|
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
28
25
|
enumerable: true,
|
|
29
26
|
configurable: true,
|
|
@@ -3,6 +3,8 @@ import { Command } from "../../common/command.js";
|
|
|
3
3
|
* The input for the events fetch indexes command
|
|
4
4
|
*/
|
|
5
5
|
export interface TimeBucketListInput {
|
|
6
|
+
/** the tenant */
|
|
7
|
+
tenant: string;
|
|
6
8
|
/** the event type ids */
|
|
7
9
|
eventTypeId: [string, ...string[]] | string;
|
|
8
10
|
/** the start time */
|
|
@@ -29,7 +31,9 @@ export interface TimeBucketListOutput {
|
|
|
29
31
|
* Fetch time buckets for an event type
|
|
30
32
|
*/
|
|
31
33
|
export declare class TimeBucketListCommand extends Command<TimeBucketListInput, TimeBucketListOutput> {
|
|
32
|
-
|
|
34
|
+
/**
|
|
35
|
+
* The dedicated subdomain for the command
|
|
36
|
+
*/
|
|
33
37
|
protected dedicatedSubdomain: string;
|
|
34
38
|
/**
|
|
35
39
|
* Get the method for the request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-bucket.list.d.ts","sourceRoot":"","sources":["../../../src/commands/events/time-bucket.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,qBAAqB;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB;IAChB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAChD,mBAAmB,EACnB,oBAAoB,CACrB;IACC
|
|
1
|
+
{"version":3,"file":"time-bucket.list.d.ts","sourceRoot":"","sources":["../../../src/commands/events/time-bucket.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,yBAAyB;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3C,qBAAqB;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mBAAmB;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB;IAChB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAChD,mBAAmB,EACnB,oBAAoB,CACrB;IACC;;OAEG;IACH,UAAmB,kBAAkB,EAAE,MAAM,CAAiB;IAE9D;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAepC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,oBAAoB;CAI7E"}
|
|
@@ -17,12 +17,9 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
17
17
|
class TimeBucketListCommand extends command_js_1.Command {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
writable: true,
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
20
|
+
/**
|
|
21
|
+
* The dedicated subdomain for the command
|
|
22
|
+
*/
|
|
26
23
|
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
27
24
|
enumerable: true,
|
|
28
25
|
configurable: true,
|
|
@@ -42,8 +42,6 @@ export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTyp
|
|
|
42
42
|
processResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
|
|
43
43
|
handleClientError: (error: ClientError) => void;
|
|
44
44
|
retryOnFailure: boolean;
|
|
45
|
-
supportsDedicatedUrl: boolean;
|
|
46
|
-
dedicatedSubdomain: string | undefined;
|
|
47
45
|
}>;
|
|
48
46
|
/**
|
|
49
47
|
* 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,iCAAiC,CAAA;AAChE,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;;;GAGG;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,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;IAWtC,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAC/D;QACE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC7B,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"}
|
|
@@ -5,6 +5,8 @@ import type { ClientError } from "../../exceptions/client-error.js";
|
|
|
5
5
|
* The input for the flow type request delete command
|
|
6
6
|
*/
|
|
7
7
|
export interface FlowTypeRequestDeleteInput {
|
|
8
|
+
/** The tenant */
|
|
9
|
+
tenant: string;
|
|
8
10
|
/** The id of the flow type */
|
|
9
11
|
flowTypeId: string;
|
|
10
12
|
/** Wait for the flow type to be deleted (default: false) */
|
|
@@ -20,7 +22,9 @@ export interface FlowTypeRequestDeleteOutput {
|
|
|
20
22
|
* Request to delete a flow type
|
|
21
23
|
*/
|
|
22
24
|
export declare class FlowTypeRequestDeleteCommand extends Command<FlowTypeRequestDeleteInput, FlowTypeRequestDeleteOutput> {
|
|
23
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The dedicated subdomain for the command
|
|
27
|
+
*/
|
|
24
28
|
protected dedicatedSubdomain: string;
|
|
25
29
|
/**
|
|
26
30
|
* Get the method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-type.request-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.request-delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAKnE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,OAAO,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IAChH
|
|
1
|
+
{"version":3,"file":"flow-type.request-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.request-delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAKnE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,OAAO,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IAChH;;OAEG;IACH,UAAmB,kBAAkB,EAAE,MAAM,CAAmB;IAEhE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,2BAA2B;IAUnF;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAS9D;;OAEG;cACsB,eAAe,CACtC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,2BAA2B,GACpC,OAAO,CAAC,2BAA2B,CAAC;CAkBxC"}
|
|
@@ -12,12 +12,9 @@ const flow_type_exists_js_1 = require("./flow-type.exists.js");
|
|
|
12
12
|
class FlowTypeRequestDeleteCommand extends command_js_1.Command {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
writable: true,
|
|
19
|
-
value: true
|
|
20
|
-
});
|
|
15
|
+
/**
|
|
16
|
+
* The dedicated subdomain for the command
|
|
17
|
+
*/
|
|
21
18
|
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
22
19
|
enumerable: true,
|
|
23
20
|
configurable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,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,2BAA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AA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
|
package/script/commands/index.js
CHANGED
|
@@ -74,3 +74,4 @@ __exportStar(require("./security/pat.delete.js"), exports);
|
|
|
74
74
|
__exportStar(require("./security/pat.exchange.js"), exports);
|
|
75
75
|
__exportStar(require("./security/pat.get.js"), exports);
|
|
76
76
|
__exportStar(require("./security/pat.list.js"), exports);
|
|
77
|
+
__exportStar(require("./security/permissions.list.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pat.exchange.d.ts","sourceRoot":"","sources":["../../../src/commands/security/pat.exchange.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,2BAA2B;IAC1C,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IACvG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;cAIpB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMvD;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,2BAA2B;
|
|
1
|
+
{"version":3,"file":"pat.exchange.d.ts","sourceRoot":"","sources":["../../../src/commands/security/pat.exchange.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,2BAA2B;IAC1C,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,mBAAmB,EAAE,2BAA2B,CAAC;IACvG;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;cAIpB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAMvD;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,2BAA2B;CAQpF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Permission } from "../../contracts/permission.js";
|
|
3
|
+
export interface PermissionsListInput {
|
|
4
|
+
/** Filter by the type of the frn */
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Fetch an event type
|
|
9
|
+
*/
|
|
10
|
+
export declare class PermissionsListCommand extends Command<PermissionsListInput, Permission[]> {
|
|
11
|
+
/**
|
|
12
|
+
* Get the method
|
|
13
|
+
*/
|
|
14
|
+
protected getMethod(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get the base url
|
|
17
|
+
*/
|
|
18
|
+
protected getBaseUrl(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Get the path
|
|
21
|
+
*/
|
|
22
|
+
protected getPath(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Parse the response
|
|
25
|
+
*/
|
|
26
|
+
protected parseResponse(rawResponse: unknown): Permission[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=permissions.list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.list.d.ts","sourceRoot":"","sources":["../../../src/commands/security/permissions.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,+BAA+B,CAAA;AAEjF,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,UAAU,EAAE,CAAC;IACrF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAQpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,UAAU,EAAE;CAIrE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermissionsListCommand = 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 permission_js_1 = require("../../contracts/permission.js");
|
|
8
|
+
/**
|
|
9
|
+
* Fetch an event type
|
|
10
|
+
*/
|
|
11
|
+
class PermissionsListCommand 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://iam.api.flowcore.io";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the path
|
|
26
|
+
*/
|
|
27
|
+
getPath() {
|
|
28
|
+
const queryParams = new URLSearchParams();
|
|
29
|
+
if (this.input.type) {
|
|
30
|
+
queryParams.set("type", this.input.type);
|
|
31
|
+
}
|
|
32
|
+
return `/api/v1/permissions?${queryParams.toString()}`;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Parse the response
|
|
36
|
+
*/
|
|
37
|
+
parseResponse(rawResponse) {
|
|
38
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(permission_js_1.PermissionSchema), rawResponse);
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.PermissionsListCommand = PermissionsListCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.translate-name-to-id.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.translate-name-to-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"tenant.translate-name-to-id.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.translate-name-to-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,OAAO,CAAC;IAClD,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;CACd,CAGC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAElF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;IAChH;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -27,8 +27,6 @@ export declare abstract class CustomCommand<Input, Output> extends Command<Input
|
|
|
27
27
|
processResponse: (client: FlowcoreClient, response: Output) => Promise<Output>;
|
|
28
28
|
handleClientError: (error: ClientError) => void;
|
|
29
29
|
retryOnFailure: boolean;
|
|
30
|
-
supportsDedicatedUrl: boolean;
|
|
31
|
-
dedicatedSubdomain: string | undefined;
|
|
32
30
|
}>;
|
|
33
31
|
/**
|
|
34
32
|
* Parse the response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-custom.d.ts","sourceRoot":"","sources":["../../src/common/command-custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE;;GAEG;AACH,8BAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;IAC/E;;OAEG;cACgB,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,QAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAEzE;;OAEG;IAEmB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;QACjE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,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;IAOF;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM;CAG5D"}
|
|
@@ -8,8 +8,10 @@ export declare abstract class Command<Input, Output> {
|
|
|
8
8
|
* Whether the command should retry on failure
|
|
9
9
|
*/
|
|
10
10
|
protected readonly retryOnFailure: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The dedicated subdomain for the command
|
|
13
|
+
*/
|
|
14
|
+
protected readonly dedicatedSubdomain?: string;
|
|
13
15
|
/**
|
|
14
16
|
* The allowed modes for the command
|
|
15
17
|
*/
|
|
@@ -19,6 +21,10 @@ export declare abstract class Command<Input, Output> {
|
|
|
19
21
|
*/
|
|
20
22
|
protected readonly input: Input;
|
|
21
23
|
constructor(input: Input);
|
|
24
|
+
/**
|
|
25
|
+
* Get the dedicated base URL
|
|
26
|
+
*/
|
|
27
|
+
protected getDedicatedBaseUrl(client: FlowcoreClient): Promise<string | null>;
|
|
22
28
|
/**
|
|
23
29
|
* Get the base URL for the request
|
|
24
30
|
*/
|
|
@@ -50,7 +56,7 @@ export declare abstract class Command<Input, Output> {
|
|
|
50
56
|
/**
|
|
51
57
|
* Get the request object
|
|
52
58
|
*/
|
|
53
|
-
getRequest(
|
|
59
|
+
getRequest(client: FlowcoreClient): Promise<{
|
|
54
60
|
allowedModes: ("apiKey" | "bearer")[];
|
|
55
61
|
body: string | Record<string, unknown> | Array<unknown> | undefined;
|
|
56
62
|
headers: Record<string, string>;
|
|
@@ -62,8 +68,6 @@ export declare abstract class Command<Input, Output> {
|
|
|
62
68
|
handleClientError: (error: ClientError) => void;
|
|
63
69
|
retryOnFailure: boolean;
|
|
64
70
|
customExecute?: (client: FlowcoreClient) => Promise<unknown>;
|
|
65
|
-
supportsDedicatedUrl: boolean;
|
|
66
|
-
dedicatedSubdomain: string | undefined;
|
|
67
71
|
}>;
|
|
68
72
|
/**
|
|
69
73
|
* Wait for the response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG1D;;GAEG;AACH,8BAAsB,OAAO,CAAC,KAAK,EAAE,MAAM;IACzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAO;IAEjD;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;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AAC,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;QACvB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAC7D,CAAC;IAeF;;OAEG;cAEa,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F"}
|
package/script/common/command.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Command = void 0;
|
|
4
|
+
const tenant_fetch_js_1 = require("../commands/tenant/tenant.fetch.js");
|
|
5
|
+
const command_error_js_1 = require("../exceptions/command-error.js");
|
|
6
|
+
const tenant_cache_js_1 = require("./tenant.cache.js");
|
|
4
7
|
/**
|
|
5
8
|
* Abstract command for executing requests
|
|
6
9
|
*/
|
|
@@ -15,12 +18,9 @@ class Command {
|
|
|
15
18
|
writable: true,
|
|
16
19
|
value: true
|
|
17
20
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
writable: true,
|
|
22
|
-
value: false
|
|
23
|
-
});
|
|
21
|
+
/**
|
|
22
|
+
* The dedicated subdomain for the command
|
|
23
|
+
*/
|
|
24
24
|
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
configurable: true,
|
|
@@ -50,6 +50,31 @@ class Command {
|
|
|
50
50
|
*/
|
|
51
51
|
this.input = input;
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Get the dedicated base URL
|
|
55
|
+
*/
|
|
56
|
+
async getDedicatedBaseUrl(client) {
|
|
57
|
+
if (!this.dedicatedSubdomain) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const inputTenant = typeof this.input === "object" && this.input !== null && "tenant" in this.input &&
|
|
61
|
+
typeof this.input.tenant === "string" && this.input.tenant;
|
|
62
|
+
if (!inputTenant) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
let tenant = tenant_cache_js_1.tenantCache.get(inputTenant);
|
|
66
|
+
if (!tenant) {
|
|
67
|
+
tenant = await client.execute(new tenant_fetch_js_1.TenantFetchCommand({ tenant: inputTenant }));
|
|
68
|
+
tenant_cache_js_1.tenantCache.set(inputTenant, tenant);
|
|
69
|
+
}
|
|
70
|
+
if (!tenant.isDedicated) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
if (!tenant.dedicated?.configuration.domain) {
|
|
74
|
+
throw new command_error_js_1.CommandError(this.constructor.name, `Tenant ${inputTenant} does not have a dedicated domain configured`);
|
|
75
|
+
}
|
|
76
|
+
return `https://${this.dedicatedSubdomain}.${tenant.dedicated.configuration.domain}`;
|
|
77
|
+
}
|
|
53
78
|
/**
|
|
54
79
|
* Get the method for the request
|
|
55
80
|
*/
|
|
@@ -90,21 +115,18 @@ class Command {
|
|
|
90
115
|
/**
|
|
91
116
|
* Get the request object
|
|
92
117
|
*/
|
|
93
|
-
|
|
94
|
-
async getRequest(_client) {
|
|
118
|
+
async getRequest(client) {
|
|
95
119
|
return {
|
|
96
120
|
allowedModes: this.allowedModes,
|
|
97
121
|
body: this.getBody(),
|
|
98
122
|
headers: this.getHeaders(),
|
|
99
|
-
baseUrl: this.getBaseUrl(),
|
|
123
|
+
baseUrl: (await this.getDedicatedBaseUrl(client)) ?? this.getBaseUrl(),
|
|
100
124
|
path: this.getPath(),
|
|
101
125
|
method: this.getMethod(),
|
|
102
126
|
parseResponse: this.parseResponse.bind(this),
|
|
103
127
|
processResponse: this.processResponse.bind(this),
|
|
104
128
|
handleClientError: this.handleClientError.bind(this),
|
|
105
129
|
retryOnFailure: this.retryOnFailure,
|
|
106
|
-
supportsDedicatedUrl: this.supportsDedicatedUrl,
|
|
107
|
-
dedicatedSubdomain: this.dedicatedSubdomain,
|
|
108
130
|
};
|
|
109
131
|
}
|
|
110
132
|
/**
|
|
@@ -34,7 +34,6 @@ export declare class FlowcoreClient {
|
|
|
34
34
|
private readonly options;
|
|
35
35
|
private mode;
|
|
36
36
|
private baseUrl;
|
|
37
|
-
private dedicatedTenantCache;
|
|
38
37
|
constructor(options: ClientOptions);
|
|
39
38
|
/**
|
|
40
39
|
* Get the auth header
|
|
@@ -51,16 +50,16 @@ export declare class FlowcoreClient {
|
|
|
51
50
|
/**
|
|
52
51
|
* Execute a command
|
|
53
52
|
*/
|
|
54
|
-
execute<Input, Output>(command: Command<Input, Output
|
|
55
|
-
/**
|
|
56
|
-
* Clear the dedicated tenant cache
|
|
57
|
-
*/
|
|
58
|
-
clearDedicatedTenantCache(): void;
|
|
53
|
+
execute<Input, Output>(command: Command<Input, Output>): Promise<Output>;
|
|
59
54
|
/**
|
|
60
55
|
* Close the client and clean up resources
|
|
61
56
|
* This should be called when the client is no longer needed to prevent memory leaks
|
|
62
57
|
*/
|
|
63
58
|
close(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Dispose the client
|
|
61
|
+
*/
|
|
62
|
+
[Symbol.dispose](): void;
|
|
64
63
|
}
|
|
65
64
|
export {};
|
|
66
65
|
//# sourceMappingURL=flowcore-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowcore-client.d.ts","sourceRoot":"","sources":["../../src/common/flowcore-client.ts"],"names":[],"mappings":"
|
|
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;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
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.FlowcoreClient = void 0;
|
|
7
|
-
const node_cache_1 = __importDefault(require("node-cache"));
|
|
8
|
-
const index_js_1 = require("../commands/index.js");
|
|
9
4
|
const client_error_js_1 = require("../exceptions/client-error.js");
|
|
10
5
|
const command_error_js_1 = require("../exceptions/command-error.js");
|
|
6
|
+
const try_catch_js_1 = require("../utils/try-catch.js");
|
|
7
|
+
const tenant_cache_js_1 = require("./tenant.cache.js");
|
|
11
8
|
const RETRYABLE_ERROR_CODES = [408, 429, 500, 502, 503, 504];
|
|
12
|
-
const getDedicatedTenantCacheKey = (tenantId) => `dedicated-tenant-${tenantId}`;
|
|
13
9
|
/**
|
|
14
10
|
* A base client for executing commands
|
|
15
11
|
*/
|
|
@@ -33,12 +29,6 @@ class FlowcoreClient {
|
|
|
33
29
|
writable: true,
|
|
34
30
|
value: void 0
|
|
35
31
|
});
|
|
36
|
-
Object.defineProperty(this, "dedicatedTenantCache", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true,
|
|
39
|
-
writable: true,
|
|
40
|
-
value: new node_cache_1.default()
|
|
41
|
-
});
|
|
42
32
|
if (this.options.getBearerToken) {
|
|
43
33
|
this.mode = "bearer";
|
|
44
34
|
}
|
|
@@ -74,29 +64,21 @@ class FlowcoreClient {
|
|
|
74
64
|
/**
|
|
75
65
|
* Execute a command (inner method)
|
|
76
66
|
*/
|
|
77
|
-
async innerExecute(command, retryCount = 0
|
|
67
|
+
async innerExecute(command, retryCount = 0) {
|
|
78
68
|
const request = await command.getRequest(this);
|
|
79
|
-
if (request.supportsDedicatedUrl && request.dedicatedSubdomain && dedicatedTenantId) {
|
|
80
|
-
let tenantConfig = this.dedicatedTenantCache.get(getDedicatedTenantCacheKey(dedicatedTenantId));
|
|
81
|
-
if (tenantConfig === undefined) {
|
|
82
|
-
const tenant = await this.execute(new index_js_1.TenantFetchCommand({ tenantId: dedicatedTenantId }));
|
|
83
|
-
tenantConfig = tenant;
|
|
84
|
-
this.dedicatedTenantCache.set(getDedicatedTenantCacheKey(dedicatedTenantId), tenant, 60 * 5);
|
|
85
|
-
}
|
|
86
|
-
if (tenantConfig.isDedicated) {
|
|
87
|
-
if (!tenantConfig.dedicated?.configuration.domain) {
|
|
88
|
-
throw new command_error_js_1.CommandError(command.constructor.name, `Tenant ${dedicatedTenantId} does not have a dedicated domain configured`);
|
|
89
|
-
}
|
|
90
|
-
this.baseUrl = `https://${request.dedicatedSubdomain}.${tenantConfig.dedicated?.configuration.domain}`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
69
|
if (request.customExecute) {
|
|
94
70
|
return request.customExecute(this);
|
|
95
71
|
}
|
|
96
72
|
if (!request.allowedModes.includes(this.mode)) {
|
|
97
73
|
throw new command_error_js_1.CommandError(command.constructor.name, `Not allowed in "${this.mode}" mode`);
|
|
98
74
|
}
|
|
99
|
-
const authHeader = await this.getAuthHeader();
|
|
75
|
+
const { data: authHeader, error: authHeaderError } = await (0, try_catch_js_1.tryCatch)(this.getAuthHeader());
|
|
76
|
+
if (authHeaderError) {
|
|
77
|
+
throw new client_error_js_1.ClientError("Failed to get auth header", 0, command.constructor.name, {
|
|
78
|
+
command: command.constructor.name,
|
|
79
|
+
error: authHeaderError,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
100
82
|
const headers = {
|
|
101
83
|
...request.headers,
|
|
102
84
|
...(authHeader ? { Authorization: authHeader } : {}),
|
|
@@ -152,22 +134,22 @@ class FlowcoreClient {
|
|
|
152
134
|
/**
|
|
153
135
|
* Execute a command
|
|
154
136
|
*/
|
|
155
|
-
execute(command
|
|
156
|
-
return this.innerExecute(command, 0
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Clear the dedicated tenant cache
|
|
160
|
-
*/
|
|
161
|
-
clearDedicatedTenantCache() {
|
|
162
|
-
this.dedicatedTenantCache.flushAll();
|
|
137
|
+
execute(command) {
|
|
138
|
+
return this.innerExecute(command, 0);
|
|
163
139
|
}
|
|
164
140
|
/**
|
|
165
141
|
* Close the client and clean up resources
|
|
166
142
|
* This should be called when the client is no longer needed to prevent memory leaks
|
|
167
143
|
*/
|
|
168
144
|
close() {
|
|
169
|
-
//
|
|
170
|
-
|
|
145
|
+
// Clear the tenant cache
|
|
146
|
+
tenant_cache_js_1.tenantCache.clear();
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Dispose the client
|
|
150
|
+
*/
|
|
151
|
+
[Symbol.dispose]() {
|
|
152
|
+
this.close();
|
|
171
153
|
}
|
|
172
154
|
}
|
|
173
155
|
exports.FlowcoreClient = FlowcoreClient;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LocalCache } from "../utils/local-cache.js";
|
|
2
|
+
export declare const tenantCache: LocalCache<{
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
description: string;
|
|
7
|
+
websiteUrl: string;
|
|
8
|
+
isDedicated: boolean;
|
|
9
|
+
dedicated: {
|
|
10
|
+
status: "ready" | "degraded" | "offline";
|
|
11
|
+
configuration: {
|
|
12
|
+
domain: string;
|
|
13
|
+
configurationRepoUrl: string;
|
|
14
|
+
};
|
|
15
|
+
} | null;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=tenant.cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.cache.d.ts","sourceRoot":"","sources":["../../src/common/tenant.cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;EAAoC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pat.d.ts","sourceRoot":"","sources":["../../src/contracts/pat.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pat.d.ts","sourceRoot":"","sources":["../../src/contracts/pat.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,SAAS,EAAE,OAAO,CAAC;IAC9B,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IACzB,SAAS,EAAE,OAAO,CAAA;CACnB,CAMC,CAAA;AACF;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Static, type TArray, type TLiteral, type TObject, type TString, type TUnion } from "@sinclair/typebox";
|
|
2
|
+
/**
|
|
3
|
+
* The schema for a permission
|
|
4
|
+
*/
|
|
5
|
+
export declare const PermissionSchema: TObject<{
|
|
6
|
+
tenant: TString;
|
|
7
|
+
type: TString;
|
|
8
|
+
id: TString;
|
|
9
|
+
action: TArray<TUnion<[
|
|
10
|
+
TLiteral<"read">,
|
|
11
|
+
TLiteral<"write">,
|
|
12
|
+
TLiteral<"ingest">,
|
|
13
|
+
TLiteral<"fetch">,
|
|
14
|
+
TLiteral<"*">
|
|
15
|
+
]>>;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* The type for a permission
|
|
19
|
+
*/
|
|
20
|
+
export type Permission = Static<typeof PermissionSchema>;
|
|
21
|
+
//# sourceMappingURL=permission.d.ts.map
|