@flowcore/sdk 1.21.0 → 1.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/esm/commands/event-type/event-type.info.js +1 -1
- package/esm/commands/security/permissions.list.d.ts +3 -0
- package/esm/commands/security/permissions.list.d.ts.map +1 -1
- package/esm/commands/security/permissions.list.js +9 -1
- package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/esm/commands/tenant/tenant.fetch.js +19 -1
- package/esm/common/command.d.ts +1 -1
- package/esm/common/command.d.ts.map +1 -1
- package/esm/common/command.js +11 -1
- package/esm/common/notification-client.d.ts.map +1 -1
- package/esm/common/notification-client.js +1 -5
- package/esm/common/tenant.cache.d.ts +4 -8
- package/esm/common/tenant.cache.d.ts.map +1 -1
- package/esm/contracts/index.d.ts +1 -0
- package/esm/contracts/index.d.ts.map +1 -1
- package/esm/contracts/permission.d.ts +1 -2
- package/esm/contracts/permission.d.ts.map +1 -1
- package/esm/contracts/permission.js +0 -1
- package/package.json +1 -1
- package/script/commands/event-type/event-type.info.js +1 -1
- package/script/commands/security/permissions.list.d.ts +3 -0
- package/script/commands/security/permissions.list.d.ts.map +1 -1
- package/script/commands/security/permissions.list.js +9 -1
- package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
- package/script/commands/tenant/tenant.fetch.js +19 -1
- package/script/common/command.d.ts +1 -1
- package/script/common/command.d.ts.map +1 -1
- package/script/common/command.js +11 -1
- package/script/common/notification-client.d.ts.map +1 -1
- package/script/common/notification-client.js +1 -5
- package/script/common/tenant.cache.d.ts +4 -8
- package/script/common/tenant.cache.d.ts.map +1 -1
- package/script/contracts/index.d.ts +1 -0
- package/script/contracts/index.d.ts.map +1 -1
- package/script/contracts/permission.d.ts +1 -2
- package/script/contracts/permission.d.ts.map +1 -1
- package/script/contracts/permission.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.2](https://github.com/flowcore-io/flowcore-sdk/compare/v1.21.1...v1.21.2) (2025-03-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* ignore 403 from tenant fetch command ([c9c49df](https://github.com/flowcore-io/flowcore-sdk/commit/c9c49df3e61d0d93bb795d59e52b7202d65d805f))
|
|
9
|
+
* ignore 403 from tenant fetch command ([984f1da](https://github.com/flowcore-io/flowcore-sdk/commit/984f1da2ca75377ef590ca07fd46ea88b507f365))
|
|
10
|
+
|
|
11
|
+
## [1.21.1](https://github.com/flowcore-io/flowcore-sdk/compare/v1.21.0...v1.21.1) (2025-03-26)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* change union literals to string (to make forward compatible) ([9b8c14d](https://github.com/flowcore-io/flowcore-sdk/commit/9b8c14d3b25485e2b3ca26a5fbdb86c35e2a493d))
|
|
17
|
+
* **event-type:** :bug: add tenant to EventListCommand ([7b7e989](https://github.com/flowcore-io/flowcore-sdk/commit/7b7e9898bab300d55261d53667f704193b373620))
|
|
18
|
+
* permissions should never return action.all (*) ([d28c20d](https://github.com/flowcore-io/flowcore-sdk/commit/d28c20d43f41db560c535fcb12c6e97ceeae2ec9))
|
|
19
|
+
* permissions should never return action.all (*) ([48190e2](https://github.com/flowcore-io/flowcore-sdk/commit/48190e29f703ae6b0eae087d9dcae5aea66c410e))
|
|
20
|
+
|
|
3
21
|
## [1.21.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.20.0...v1.21.0) (2025-03-24)
|
|
4
22
|
|
|
5
23
|
|
|
@@ -40,11 +40,11 @@ export class EventTypeInfoCommand extends CustomCommand {
|
|
|
40
40
|
const lastEvents = [];
|
|
41
41
|
for (const timeBucket of lastTimeBucketResponse.timeBuckets) {
|
|
42
42
|
const eventListCommand = new EventListCommand({
|
|
43
|
-
tenant: this.input.tenant,
|
|
44
43
|
eventTypeId: this.input.eventTypeId,
|
|
45
44
|
timeBucket,
|
|
46
45
|
pageSize: lastEventsLimit - lastEvents.length,
|
|
47
46
|
order: "desc",
|
|
47
|
+
tenant: this.input.tenant,
|
|
48
48
|
});
|
|
49
49
|
const eventListResponse = await client.execute(eventListCommand);
|
|
50
50
|
lastEvents.push(...eventListResponse.events);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type Permission } from "../../contracts/permission.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the permissions list command
|
|
5
|
+
*/
|
|
3
6
|
export interface PermissionsListInput {
|
|
4
7
|
/** Filter by the type of the frn */
|
|
5
8
|
type?: string;
|
|
@@ -1 +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;
|
|
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;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAWD;;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"}
|
|
@@ -2,6 +2,14 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import { Command } from "../../common/command.js";
|
|
3
3
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
4
|
import { PermissionSchema } from "../../contracts/permission.js";
|
|
5
|
+
/**
|
|
6
|
+
* The response schema for the permissions list command
|
|
7
|
+
*/
|
|
8
|
+
const responseSchema = Type.Object({
|
|
9
|
+
...PermissionSchema.properties,
|
|
10
|
+
// parse as string to prevent sdk to fail when new actions are added
|
|
11
|
+
action: Type.Array(Type.String()),
|
|
12
|
+
});
|
|
5
13
|
/**
|
|
6
14
|
* Fetch an event type
|
|
7
15
|
*/
|
|
@@ -32,7 +40,7 @@ export class PermissionsListCommand extends Command {
|
|
|
32
40
|
* Parse the response
|
|
33
41
|
*/
|
|
34
42
|
parseResponse(rawResponse) {
|
|
35
|
-
const response = parseResponseHelper(Type.Array(
|
|
43
|
+
const response = parseResponseHelper(Type.Array(responseSchema), rawResponse);
|
|
36
44
|
return response;
|
|
37
45
|
}
|
|
38
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAoB5E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACvE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;IAK9D;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -2,6 +2,24 @@ import { Command } from "../../common/command.js";
|
|
|
2
2
|
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
3
3
|
import { NotFoundException } from "../../exceptions/not-found.js";
|
|
4
4
|
import { TenantSchema } from "../../contracts/tenant.js";
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
/**
|
|
7
|
+
* The response schema for the tenant fetch command
|
|
8
|
+
*/
|
|
9
|
+
const responseSchema = Type.Object({
|
|
10
|
+
...TenantSchema.properties,
|
|
11
|
+
dedicated: Type.Union([
|
|
12
|
+
Type.Null(),
|
|
13
|
+
Type.Object({
|
|
14
|
+
// parse as string to prevent sdk to fail when new status are added
|
|
15
|
+
status: Type.String(),
|
|
16
|
+
configuration: Type.Object({
|
|
17
|
+
domain: Type.String(),
|
|
18
|
+
configurationRepoUrl: Type.String(),
|
|
19
|
+
}),
|
|
20
|
+
}),
|
|
21
|
+
]),
|
|
22
|
+
});
|
|
5
23
|
/**
|
|
6
24
|
* Fetch a tenant
|
|
7
25
|
*/
|
|
@@ -31,7 +49,7 @@ export class TenantFetchCommand extends Command {
|
|
|
31
49
|
* Parse the response
|
|
32
50
|
*/
|
|
33
51
|
parseResponse(rawResponse) {
|
|
34
|
-
const response = parseResponseHelper(
|
|
52
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
35
53
|
return response;
|
|
36
54
|
}
|
|
37
55
|
/**
|
package/esm/common/command.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAE3D,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;IAE9C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAuB;IAE/E;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;gBAEnB,KAAK,EAAE,KAAK;IAOxB;;OAEG;cACa,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,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AAC,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/esm/common/command.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TenantFetchCommand } from "../commands/tenant/tenant.fetch.js";
|
|
2
|
+
import { ClientError } from "../exceptions/client-error.js";
|
|
2
3
|
import { CommandError } from "../exceptions/command-error.js";
|
|
3
4
|
import { tenantCache } from "./tenant.cache.js";
|
|
4
5
|
/**
|
|
@@ -61,7 +62,16 @@ export class Command {
|
|
|
61
62
|
}
|
|
62
63
|
let tenant = tenantCache.get(inputTenant);
|
|
63
64
|
if (!tenant) {
|
|
64
|
-
tenant = await client.execute(new TenantFetchCommand({ tenant: inputTenant }))
|
|
65
|
+
tenant = await client.execute(new TenantFetchCommand({ tenant: inputTenant }))
|
|
66
|
+
.catch((error) => {
|
|
67
|
+
if (error instanceof ClientError && error.status === 403) {
|
|
68
|
+
return {
|
|
69
|
+
isDedicated: false,
|
|
70
|
+
dedicated: null,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
throw error;
|
|
74
|
+
});
|
|
65
75
|
tenantCache.set(inputTenant, tenant);
|
|
66
76
|
}
|
|
67
77
|
if (!tenant.isDedicated) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EA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AO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAiB;IAEtC;;;;;;OAMG;gBAEgB,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,WAAW,EAAE,6BAA6B,EAC1C,gBAAgB,EAAE;QACjC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EACD,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAU9C;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED;;OAEG;IACG,OAAO;IAyIb;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,UAAU;IAMV;;;OAGG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM;CAGnC"}
|
|
@@ -2,7 +2,6 @@ import * as dntShim from "../_dnt.shims.js";
|
|
|
2
2
|
import { defaultLogger } from "../utils/logger.js";
|
|
3
3
|
import { FlowcoreClient } from "./flowcore-client.js";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
|
-
import { TenantFetchCommand } from "../commands/tenant/tenant.fetch.js";
|
|
6
5
|
import { DataCoreFetchCommand } from "../commands/data-core/data-core.fetch.js";
|
|
7
6
|
import { FlowTypeFetchCommand } from "../commands/flow-type/flow-type.fetch.js";
|
|
8
7
|
import { EventTypeFetchCommand } from "../commands/event-type/event-type.fetch.js";
|
|
@@ -138,11 +137,8 @@ export class NotificationClient {
|
|
|
138
137
|
urlParams.set("api_key", this.authOptions.apiKey);
|
|
139
138
|
urlParams.set("api_key_id", this.authOptions.apiKeyId);
|
|
140
139
|
}
|
|
141
|
-
const tenant = await flowcoreClient.execute(new TenantFetchCommand({
|
|
142
|
-
tenant: this.subscriptionSpec.tenant,
|
|
143
|
-
}));
|
|
144
140
|
const dataCore = await flowcoreClient.execute(new DataCoreFetchCommand({
|
|
145
|
-
|
|
141
|
+
tenant: this.subscriptionSpec.tenant,
|
|
146
142
|
dataCore: this.subscriptionSpec.dataCore,
|
|
147
143
|
}));
|
|
148
144
|
let flowType;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { LocalCache } from "../utils/local-cache.js";
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
displayName: string;
|
|
6
|
-
description: string;
|
|
7
|
-
websiteUrl: string;
|
|
2
|
+
type DedicatedTenant = {
|
|
8
3
|
isDedicated: boolean;
|
|
9
4
|
dedicated: {
|
|
10
5
|
status: "ready" | "degraded" | "offline";
|
|
11
6
|
configuration: {
|
|
12
7
|
domain: string;
|
|
13
|
-
configurationRepoUrl: string;
|
|
14
8
|
};
|
|
15
9
|
} | null;
|
|
16
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export declare const tenantCache: LocalCache<DedicatedTenant>;
|
|
12
|
+
export {};
|
|
17
13
|
//# sourceMappingURL=tenant.cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.cache.d.ts","sourceRoot":"","sources":["../../src/common/tenant.cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tenant.cache.d.ts","sourceRoot":"","sources":["../../src/common/tenant.cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,KAAK,eAAe,GAAG;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE;QACT,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACxC,aAAa,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAClC,GAAG,IAAI,CAAA;CACT,CAAA;AAED,eAAO,MAAM,WAAW,6BAA6C,CAAA"}
|
package/esm/contracts/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export type { EventType } from "./event-type.js";
|
|
|
3
3
|
export type { FlowType } from "./flow-type.js";
|
|
4
4
|
export type { FlowcoreEvent } from "./event.js";
|
|
5
5
|
export type { Tenant } from "./tenant.js";
|
|
6
|
+
export type { Permission } from "./permission.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../src/contracts/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CACZ,MAAM,CAAC;QACL,QAAQ,CAAC,MAAM,CAAC;QAChB,QAAQ,CAAC,OAAO,CAAC;QACjB,QAAQ,CAAC,QAAQ,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../src/contracts/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CACZ,MAAM,CAAC;QACL,QAAQ,CAAC,MAAM,CAAC;QAChB,QAAQ,CAAC,OAAO,CAAC;QACjB,QAAQ,CAAC,QAAQ,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC;KAClB,CAAC,CACH,CAAA;CACF,CAYC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -43,11 +43,11 @@ class EventTypeInfoCommand extends command_custom_js_1.CustomCommand {
|
|
|
43
43
|
const lastEvents = [];
|
|
44
44
|
for (const timeBucket of lastTimeBucketResponse.timeBuckets) {
|
|
45
45
|
const eventListCommand = new event_list_js_1.EventListCommand({
|
|
46
|
-
tenant: this.input.tenant,
|
|
47
46
|
eventTypeId: this.input.eventTypeId,
|
|
48
47
|
timeBucket,
|
|
49
48
|
pageSize: lastEventsLimit - lastEvents.length,
|
|
50
49
|
order: "desc",
|
|
50
|
+
tenant: this.input.tenant,
|
|
51
51
|
});
|
|
52
52
|
const eventListResponse = await client.execute(eventListCommand);
|
|
53
53
|
lastEvents.push(...eventListResponse.events);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Command } from "../../common/command.js";
|
|
2
2
|
import { type Permission } from "../../contracts/permission.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the permissions list command
|
|
5
|
+
*/
|
|
3
6
|
export interface PermissionsListInput {
|
|
4
7
|
/** Filter by the type of the frn */
|
|
5
8
|
type?: string;
|
|
@@ -1 +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;
|
|
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;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAWD;;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"}
|
|
@@ -5,6 +5,14 @@ const typebox_1 = require("@sinclair/typebox");
|
|
|
5
5
|
const command_js_1 = require("../../common/command.js");
|
|
6
6
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
7
|
const permission_js_1 = require("../../contracts/permission.js");
|
|
8
|
+
/**
|
|
9
|
+
* The response schema for the permissions list command
|
|
10
|
+
*/
|
|
11
|
+
const responseSchema = typebox_1.Type.Object({
|
|
12
|
+
...permission_js_1.PermissionSchema.properties,
|
|
13
|
+
// parse as string to prevent sdk to fail when new actions are added
|
|
14
|
+
action: typebox_1.Type.Array(typebox_1.Type.String()),
|
|
15
|
+
});
|
|
8
16
|
/**
|
|
9
17
|
* Fetch an event type
|
|
10
18
|
*/
|
|
@@ -35,7 +43,7 @@ class PermissionsListCommand extends command_js_1.Command {
|
|
|
35
43
|
* Parse the response
|
|
36
44
|
*/
|
|
37
45
|
parseResponse(rawResponse) {
|
|
38
|
-
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(
|
|
46
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(responseSchema), rawResponse);
|
|
39
47
|
return response;
|
|
40
48
|
}
|
|
41
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"tenant.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,CAAA;AAoB5E;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACvE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;IAK9D;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -5,6 +5,24 @@ const command_js_1 = require("../../common/command.js");
|
|
|
5
5
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
6
6
|
const not_found_js_1 = require("../../exceptions/not-found.js");
|
|
7
7
|
const tenant_js_1 = require("../../contracts/tenant.js");
|
|
8
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
9
|
+
/**
|
|
10
|
+
* The response schema for the tenant fetch command
|
|
11
|
+
*/
|
|
12
|
+
const responseSchema = typebox_1.Type.Object({
|
|
13
|
+
...tenant_js_1.TenantSchema.properties,
|
|
14
|
+
dedicated: typebox_1.Type.Union([
|
|
15
|
+
typebox_1.Type.Null(),
|
|
16
|
+
typebox_1.Type.Object({
|
|
17
|
+
// parse as string to prevent sdk to fail when new status are added
|
|
18
|
+
status: typebox_1.Type.String(),
|
|
19
|
+
configuration: typebox_1.Type.Object({
|
|
20
|
+
domain: typebox_1.Type.String(),
|
|
21
|
+
configurationRepoUrl: typebox_1.Type.String(),
|
|
22
|
+
}),
|
|
23
|
+
}),
|
|
24
|
+
]),
|
|
25
|
+
});
|
|
8
26
|
/**
|
|
9
27
|
* Fetch a tenant
|
|
10
28
|
*/
|
|
@@ -34,7 +52,7 @@ class TenantFetchCommand extends command_js_1.Command {
|
|
|
34
52
|
* Parse the response
|
|
35
53
|
*/
|
|
36
54
|
parseResponse(rawResponse) {
|
|
37
|
-
const response = (0, parse_response_helper_js_1.parseResponseHelper)(
|
|
55
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
38
56
|
return response;
|
|
39
57
|
}
|
|
40
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/common/command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAE3D,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;IAE9C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAuB;IAE/E;;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AAc,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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Command = void 0;
|
|
4
4
|
const tenant_fetch_js_1 = require("../commands/tenant/tenant.fetch.js");
|
|
5
|
+
const client_error_js_1 = require("../exceptions/client-error.js");
|
|
5
6
|
const command_error_js_1 = require("../exceptions/command-error.js");
|
|
6
7
|
const tenant_cache_js_1 = require("./tenant.cache.js");
|
|
7
8
|
/**
|
|
@@ -64,7 +65,16 @@ class Command {
|
|
|
64
65
|
}
|
|
65
66
|
let tenant = tenant_cache_js_1.tenantCache.get(inputTenant);
|
|
66
67
|
if (!tenant) {
|
|
67
|
-
tenant = await client.execute(new tenant_fetch_js_1.TenantFetchCommand({ tenant: inputTenant }))
|
|
68
|
+
tenant = await client.execute(new tenant_fetch_js_1.TenantFetchCommand({ tenant: inputTenant }))
|
|
69
|
+
.catch((error) => {
|
|
70
|
+
if (error instanceof client_error_js_1.ClientError && error.status === 403) {
|
|
71
|
+
return {
|
|
72
|
+
isDedicated: false,
|
|
73
|
+
dedicated: null,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
throw error;
|
|
77
|
+
});
|
|
68
78
|
tenant_cache_js_1.tenantCache.set(inputTenant, tenant);
|
|
69
79
|
}
|
|
70
80
|
if (!tenant.isDedicated) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../src/common/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAW/D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAcD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAKD,UAAU,mCAAmC;IAC3C,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,UAAU,mCAAmC;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,KAAK,6BAA6B,GAC9B,mCAAmC,GACnC,mCAAmC,CAAA;AAEvC;;;GAGG;AACH,qBAAa,kBAAkB;IAmB3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IApBnC,OAAO,CAAC,GAAG,CAA+C;IAC1D,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,aAAa,CAAiB;IAEtC;;;;;;OAMG;gBAEgB,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,WAAW,EAAE,6BAA6B,EAC1C,gBAAgB,EAAE;QACjC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,EACD,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAU9C;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED;;OAEG;IACG,OAAO;IAyIb;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;OAEG;IACH,UAAU;IAMV;;;OAGG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM;CAGnC"}
|
|
@@ -28,7 +28,6 @@ const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
|
28
28
|
const logger_js_1 = require("../utils/logger.js");
|
|
29
29
|
const flowcore_client_js_1 = require("./flowcore-client.js");
|
|
30
30
|
const node_buffer_1 = require("node:buffer");
|
|
31
|
-
const tenant_fetch_js_1 = require("../commands/tenant/tenant.fetch.js");
|
|
32
31
|
const data_core_fetch_js_1 = require("../commands/data-core/data-core.fetch.js");
|
|
33
32
|
const flow_type_fetch_js_1 = require("../commands/flow-type/flow-type.fetch.js");
|
|
34
33
|
const event_type_fetch_js_1 = require("../commands/event-type/event-type.fetch.js");
|
|
@@ -164,11 +163,8 @@ class NotificationClient {
|
|
|
164
163
|
urlParams.set("api_key", this.authOptions.apiKey);
|
|
165
164
|
urlParams.set("api_key_id", this.authOptions.apiKeyId);
|
|
166
165
|
}
|
|
167
|
-
const tenant = await flowcoreClient.execute(new tenant_fetch_js_1.TenantFetchCommand({
|
|
168
|
-
tenant: this.subscriptionSpec.tenant,
|
|
169
|
-
}));
|
|
170
166
|
const dataCore = await flowcoreClient.execute(new data_core_fetch_js_1.DataCoreFetchCommand({
|
|
171
|
-
|
|
167
|
+
tenant: this.subscriptionSpec.tenant,
|
|
172
168
|
dataCore: this.subscriptionSpec.dataCore,
|
|
173
169
|
}));
|
|
174
170
|
let flowType;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { LocalCache } from "../utils/local-cache.js";
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
displayName: string;
|
|
6
|
-
description: string;
|
|
7
|
-
websiteUrl: string;
|
|
2
|
+
type DedicatedTenant = {
|
|
8
3
|
isDedicated: boolean;
|
|
9
4
|
dedicated: {
|
|
10
5
|
status: "ready" | "degraded" | "offline";
|
|
11
6
|
configuration: {
|
|
12
7
|
domain: string;
|
|
13
|
-
configurationRepoUrl: string;
|
|
14
8
|
};
|
|
15
9
|
} | null;
|
|
16
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export declare const tenantCache: LocalCache<DedicatedTenant>;
|
|
12
|
+
export {};
|
|
17
13
|
//# sourceMappingURL=tenant.cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.cache.d.ts","sourceRoot":"","sources":["../../src/common/tenant.cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tenant.cache.d.ts","sourceRoot":"","sources":["../../src/common/tenant.cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,KAAK,eAAe,GAAG;IACrB,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE;QACT,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;QACxC,aAAa,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAClC,GAAG,IAAI,CAAA;CACT,CAAA;AAED,eAAO,MAAM,WAAW,6BAA6C,CAAA"}
|
|
@@ -3,4 +3,5 @@ export type { EventType } from "./event-type.js";
|
|
|
3
3
|
export type { FlowType } from "./flow-type.js";
|
|
4
4
|
export type { FlowcoreEvent } from "./event.js";
|
|
5
5
|
export type { Tenant } from "./tenant.js";
|
|
6
|
+
export type { Permission } from "./permission.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../src/contracts/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CACZ,MAAM,CAAC;QACL,QAAQ,CAAC,MAAM,CAAC;QAChB,QAAQ,CAAC,OAAO,CAAC;QACjB,QAAQ,CAAC,QAAQ,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../src/contracts/permission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CACZ,MAAM,CAAC;QACL,QAAQ,CAAC,MAAM,CAAC;QAChB,QAAQ,CAAC,OAAO,CAAC;QACjB,QAAQ,CAAC,QAAQ,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC;KAClB,CAAC,CACH,CAAA;CACF,CAYC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|