@flowcore/sdk 1.28.1 → 1.30.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 +24 -0
- package/esm/commands/index.d.ts +5 -3
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +5 -3
- package/esm/commands/tenant/tenant.disable-pii.d.ts +38 -0
- package/esm/commands/tenant/tenant.disable-pii.d.ts.map +1 -0
- package/esm/commands/tenant/tenant.disable-pii.js +51 -0
- package/esm/commands/tenant/tenant.enable-pii.d.ts +38 -0
- package/esm/commands/tenant/tenant.enable-pii.d.ts.map +1 -0
- package/esm/commands/tenant/tenant.enable-pii.js +51 -0
- package/esm/contracts/tenant.d.ts +2 -1
- package/esm/contracts/tenant.d.ts.map +1 -1
- package/esm/contracts/tenant.js +1 -0
- package/package.json +1 -1
- package/script/commands/index.d.ts +5 -3
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +5 -3
- package/script/commands/tenant/tenant.disable-pii.d.ts +38 -0
- package/script/commands/tenant/tenant.disable-pii.d.ts.map +1 -0
- package/script/commands/tenant/tenant.disable-pii.js +55 -0
- package/script/commands/tenant/tenant.enable-pii.d.ts +38 -0
- package/script/commands/tenant/tenant.enable-pii.d.ts.map +1 -0
- package/script/commands/tenant/tenant.enable-pii.js +55 -0
- package/script/contracts/tenant.d.ts +2 -1
- package/script/contracts/tenant.d.ts.map +1 -1
- package/script/contracts/tenant.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.30.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.29.0...v1.30.0) (2025-04-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **tenant:** :sparkles: add optional PII enabled field to TenantSchema ([c36d269](https://github.com/flowcore-io/flowcore-sdk/commit/c36d26921b221dce2411701ed7d0f32326c8ea01))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **tenant:** :art: change TOptional import to type import ([8f0c139](https://github.com/flowcore-io/flowcore-sdk/commit/8f0c139bed38283af763badd8238071759759337))
|
|
14
|
+
|
|
15
|
+
## [1.29.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.28.1...v1.29.0) (2025-04-16)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **tenant:** :sparkles: add commands to enable and disable PII for tenants ([7772e21](https://github.com/flowcore-io/flowcore-sdk/commit/7772e212ee75fe526eeb0044677014d4b43935a0))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **commands:** :fire: remove unnecessary blank line in index.ts ([4aa12ee](https://github.com/flowcore-io/flowcore-sdk/commit/4aa12eecd9ea6e5a444dd23490feb1cbded2918d))
|
|
26
|
+
|
|
3
27
|
## [1.28.1](https://github.com/flowcore-io/flowcore-sdk/compare/v1.28.0...v1.28.1) (2025-04-15)
|
|
4
28
|
|
|
5
29
|
|
package/esm/commands/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./tenant/tenant.disable-pii.js";
|
|
2
|
+
export * from "./tenant/tenant.enable-pii.js";
|
|
1
3
|
export * from "./tenant/tenant.fetch.js";
|
|
2
4
|
export * from "./tenant/tenant.list.js";
|
|
3
5
|
export * from "./tenant/tenant.translate-name-to-id.js";
|
|
@@ -25,21 +27,21 @@ export * from "./flow-type/flow-type.update.js";
|
|
|
25
27
|
export * from "./event-type/event-type.create.js";
|
|
26
28
|
export * from "./event-type/event-type.exists.js";
|
|
27
29
|
export * from "./event-type/event-type.fetch.js";
|
|
30
|
+
export * from "./event-type/event-type.info.js";
|
|
28
31
|
export * from "./event-type/event-type.list.js";
|
|
29
32
|
export * from "./event-type/event-type.request-delete.js";
|
|
30
33
|
export * from "./event-type/event-type.request-truncate.js";
|
|
31
34
|
export * from "./event-type/event-type.update.js";
|
|
32
|
-
export * from "./event-type/event-type.info.js";
|
|
33
35
|
export * from "./iam/api-key-role-association.create.js";
|
|
34
36
|
export * from "./iam/api-key-role-association.delete.js";
|
|
35
37
|
export * from "./iam/api-key-role-association.list.js";
|
|
38
|
+
export * from "./iam/role.list.js";
|
|
36
39
|
export * from "./iam/user-role-association.create.js";
|
|
37
40
|
export * from "./iam/user-role-association.delete.js";
|
|
38
41
|
export * from "./iam/user-role-association.list.js";
|
|
39
|
-
export * from "./
|
|
42
|
+
export * from "./events/event.list.js";
|
|
40
43
|
export * from "./events/events.fetch-time-buckets-by-names.js";
|
|
41
44
|
export * from "./events/events.fetch.js";
|
|
42
|
-
export * from "./events/event.list.js";
|
|
43
45
|
export * from "./events/time-bucket.list.js";
|
|
44
46
|
export * from "./container-registry/container-registry.create.js";
|
|
45
47
|
export * from "./container-registry/container-registry.delete.js";
|
|
@@ -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,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;A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,iCAAiC,CAAA;AAC/C,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mCAAmC,CAAA;AAGjD,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"}
|
package/esm/commands/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// Tenant
|
|
2
|
+
export * from "./tenant/tenant.disable-pii.js";
|
|
3
|
+
export * from "./tenant/tenant.enable-pii.js";
|
|
2
4
|
export * from "./tenant/tenant.fetch.js";
|
|
3
5
|
export * from "./tenant/tenant.list.js";
|
|
4
6
|
export * from "./tenant/tenant.translate-name-to-id.js";
|
|
@@ -32,23 +34,23 @@ export * from "./flow-type/flow-type.update.js";
|
|
|
32
34
|
export * from "./event-type/event-type.create.js";
|
|
33
35
|
export * from "./event-type/event-type.exists.js";
|
|
34
36
|
export * from "./event-type/event-type.fetch.js";
|
|
37
|
+
export * from "./event-type/event-type.info.js";
|
|
35
38
|
export * from "./event-type/event-type.list.js";
|
|
36
39
|
export * from "./event-type/event-type.request-delete.js";
|
|
37
40
|
export * from "./event-type/event-type.request-truncate.js";
|
|
38
41
|
export * from "./event-type/event-type.update.js";
|
|
39
|
-
export * from "./event-type/event-type.info.js";
|
|
40
42
|
// IAM
|
|
41
43
|
export * from "./iam/api-key-role-association.create.js";
|
|
42
44
|
export * from "./iam/api-key-role-association.delete.js";
|
|
43
45
|
export * from "./iam/api-key-role-association.list.js";
|
|
46
|
+
export * from "./iam/role.list.js";
|
|
44
47
|
export * from "./iam/user-role-association.create.js";
|
|
45
48
|
export * from "./iam/user-role-association.delete.js";
|
|
46
49
|
export * from "./iam/user-role-association.list.js";
|
|
47
|
-
export * from "./iam/role.list.js";
|
|
48
50
|
// Events
|
|
51
|
+
export * from "./events/event.list.js";
|
|
49
52
|
export * from "./events/events.fetch-time-buckets-by-names.js";
|
|
50
53
|
export * from "./events/events.fetch.js";
|
|
51
|
-
export * from "./events/event.list.js";
|
|
52
54
|
export * from "./events/time-bucket.list.js";
|
|
53
55
|
// Container
|
|
54
56
|
export * from "./container-registry/container-registry.create.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the tenant disable pii command
|
|
5
|
+
*/
|
|
6
|
+
export interface TenantDisablePiiInput {
|
|
7
|
+
/** The id of the tenant */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TenantDisablePiiResponse {
|
|
11
|
+
piiEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Disable Personal Identifiable Information (PII) Feature for a tenant
|
|
15
|
+
*/
|
|
16
|
+
export declare class TenantDisablePiiCommand extends Command<TenantDisablePiiInput, TenantDisablePiiResponse> {
|
|
17
|
+
/**
|
|
18
|
+
* Get the method
|
|
19
|
+
*/
|
|
20
|
+
protected getMethod(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
protected getBaseUrl(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
protected getPath(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Parse the response
|
|
31
|
+
*/
|
|
32
|
+
protected parseResponse(rawResponse: unknown): TenantDisablePiiResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Handle the client error
|
|
35
|
+
*/
|
|
36
|
+
protected handleClientError(error: ClientError): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=tenant.disable-pii.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.disable-pii.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.disable-pii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,OAAO,CAAA;CACpB;AASD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,qBAAqB,EAAE,wBAAwB,CAAC;IACnG;;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,wBAAwB;IAKhF;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Command } from "../../common/command.js";
|
|
3
|
+
import { NotFoundException } from "../../exceptions/not-found.js";
|
|
4
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
5
|
+
/**
|
|
6
|
+
* The response schema for the tenant disable pii command
|
|
7
|
+
*/
|
|
8
|
+
const responseSchema = Type.Object({
|
|
9
|
+
piiEnabled: Type.Boolean(),
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Disable Personal Identifiable Information (PII) Feature for a tenant
|
|
13
|
+
*/
|
|
14
|
+
export class TenantDisablePiiCommand extends Command {
|
|
15
|
+
/**
|
|
16
|
+
* Get the method
|
|
17
|
+
*/
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "POST";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://tenant.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return `/api/v1/tenants/${this.input.tenantId}/disable-pii`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parse the response
|
|
35
|
+
*/
|
|
36
|
+
parseResponse(rawResponse) {
|
|
37
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Handle the client error
|
|
42
|
+
*/
|
|
43
|
+
handleClientError(error) {
|
|
44
|
+
if (error.status === 404) {
|
|
45
|
+
throw new NotFoundException("Tenant", {
|
|
46
|
+
id: this.input.tenantId,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the tenant enable pii command
|
|
5
|
+
*/
|
|
6
|
+
export interface TenantEnablePiiInput {
|
|
7
|
+
/** The id of the tenant */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TenantEnablePiiResponse {
|
|
11
|
+
piiEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Enable Personal Identifiable Information (PII) Feature for a tenant
|
|
15
|
+
*/
|
|
16
|
+
export declare class TenantEnablePiiCommand extends Command<TenantEnablePiiInput, TenantEnablePiiResponse> {
|
|
17
|
+
/**
|
|
18
|
+
* Get the method
|
|
19
|
+
*/
|
|
20
|
+
protected getMethod(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
protected getBaseUrl(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
protected getPath(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Parse the response
|
|
31
|
+
*/
|
|
32
|
+
protected parseResponse(rawResponse: unknown): TenantEnablePiiResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Handle the client error
|
|
35
|
+
*/
|
|
36
|
+
protected handleClientError(error: ClientError): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=tenant.enable-pii.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.enable-pii.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.enable-pii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAA;CACpB;AASD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,uBAAuB,CAAC;IAChG;;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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Command } from "../../common/command.js";
|
|
3
|
+
import { NotFoundException } from "../../exceptions/not-found.js";
|
|
4
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
5
|
+
/**
|
|
6
|
+
* The response schema for the tenant enable pii command
|
|
7
|
+
*/
|
|
8
|
+
const responseSchema = Type.Object({
|
|
9
|
+
piiEnabled: Type.Boolean(),
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Enable Personal Identifiable Information (PII) Feature for a tenant
|
|
13
|
+
*/
|
|
14
|
+
export class TenantEnablePiiCommand extends Command {
|
|
15
|
+
/**
|
|
16
|
+
* Get the method
|
|
17
|
+
*/
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "POST";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://tenant.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return `/api/v1/tenants/${this.input.tenantId}/enable-pii`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parse the response
|
|
35
|
+
*/
|
|
36
|
+
parseResponse(rawResponse) {
|
|
37
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Handle the client error
|
|
42
|
+
*/
|
|
43
|
+
handleClientError(error) {
|
|
44
|
+
if (error.status === 404) {
|
|
45
|
+
throw new NotFoundException("Tenant", {
|
|
46
|
+
id: this.input.tenantId,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static, type TBoolean, type TLiteral, type TNull, type TObject, type TString, type TUnion } from "@sinclair/typebox";
|
|
1
|
+
import { type Static, type TBoolean, type TLiteral, type TNull, type TObject, type TOptional, type TString, type TUnion } from "@sinclair/typebox";
|
|
2
2
|
interface TenantById {
|
|
3
3
|
tenantId: string;
|
|
4
4
|
tenant?: never;
|
|
@@ -33,6 +33,7 @@ export declare const TenantSchema: TObject<{
|
|
|
33
33
|
}>;
|
|
34
34
|
}>
|
|
35
35
|
]>;
|
|
36
|
+
piiEnabled: TOptional<TBoolean>;
|
|
36
37
|
}>;
|
|
37
38
|
/**
|
|
38
39
|
* The type for a tenant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC;IACjC,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,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AM,CAAC;QAChB,KAAK;QACL,OAAO,CAAC;YACN,MAAM,EAAE,MAAM,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC;gBACjB,QAAQ,CAAC,UAAU,CAAC;gBACpB,QAAQ,CAAC,SAAS,CAAC;aACpB,CAAC,CAAA;YACF,aAAa,EAAE,OAAO,CAAC;gBACrB,MAAM,EAAE,OAAO,CAAA;gBACf,oBAAoB,EAAE,OAAO,CAAA;gBAC7B,4BAA4B,EAAE,OAAO,CAAA;aACtC,CAAC,CAAA;SACH,CAAC;KACH,CAAC,CAAA;IACF,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;CAChC,CAuBC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
package/esm/contracts/tenant.js
CHANGED
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./tenant/tenant.disable-pii.js";
|
|
2
|
+
export * from "./tenant/tenant.enable-pii.js";
|
|
1
3
|
export * from "./tenant/tenant.fetch.js";
|
|
2
4
|
export * from "./tenant/tenant.list.js";
|
|
3
5
|
export * from "./tenant/tenant.translate-name-to-id.js";
|
|
@@ -25,21 +27,21 @@ export * from "./flow-type/flow-type.update.js";
|
|
|
25
27
|
export * from "./event-type/event-type.create.js";
|
|
26
28
|
export * from "./event-type/event-type.exists.js";
|
|
27
29
|
export * from "./event-type/event-type.fetch.js";
|
|
30
|
+
export * from "./event-type/event-type.info.js";
|
|
28
31
|
export * from "./event-type/event-type.list.js";
|
|
29
32
|
export * from "./event-type/event-type.request-delete.js";
|
|
30
33
|
export * from "./event-type/event-type.request-truncate.js";
|
|
31
34
|
export * from "./event-type/event-type.update.js";
|
|
32
|
-
export * from "./event-type/event-type.info.js";
|
|
33
35
|
export * from "./iam/api-key-role-association.create.js";
|
|
34
36
|
export * from "./iam/api-key-role-association.delete.js";
|
|
35
37
|
export * from "./iam/api-key-role-association.list.js";
|
|
38
|
+
export * from "./iam/role.list.js";
|
|
36
39
|
export * from "./iam/user-role-association.create.js";
|
|
37
40
|
export * from "./iam/user-role-association.delete.js";
|
|
38
41
|
export * from "./iam/user-role-association.list.js";
|
|
39
|
-
export * from "./
|
|
42
|
+
export * from "./events/event.list.js";
|
|
40
43
|
export * from "./events/events.fetch-time-buckets-by-names.js";
|
|
41
44
|
export * from "./events/events.fetch.js";
|
|
42
|
-
export * from "./events/event.list.js";
|
|
43
45
|
export * from "./events/time-bucket.list.js";
|
|
44
46
|
export * from "./container-registry/container-registry.create.js";
|
|
45
47
|
export * from "./container-registry/container-registry.delete.js";
|
|
@@ -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,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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,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"}
|
package/script/commands/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// Tenant
|
|
18
|
+
__exportStar(require("./tenant/tenant.disable-pii.js"), exports);
|
|
19
|
+
__exportStar(require("./tenant/tenant.enable-pii.js"), exports);
|
|
18
20
|
__exportStar(require("./tenant/tenant.fetch.js"), exports);
|
|
19
21
|
__exportStar(require("./tenant/tenant.list.js"), exports);
|
|
20
22
|
__exportStar(require("./tenant/tenant.translate-name-to-id.js"), exports);
|
|
@@ -48,23 +50,23 @@ __exportStar(require("./flow-type/flow-type.update.js"), exports);
|
|
|
48
50
|
__exportStar(require("./event-type/event-type.create.js"), exports);
|
|
49
51
|
__exportStar(require("./event-type/event-type.exists.js"), exports);
|
|
50
52
|
__exportStar(require("./event-type/event-type.fetch.js"), exports);
|
|
53
|
+
__exportStar(require("./event-type/event-type.info.js"), exports);
|
|
51
54
|
__exportStar(require("./event-type/event-type.list.js"), exports);
|
|
52
55
|
__exportStar(require("./event-type/event-type.request-delete.js"), exports);
|
|
53
56
|
__exportStar(require("./event-type/event-type.request-truncate.js"), exports);
|
|
54
57
|
__exportStar(require("./event-type/event-type.update.js"), exports);
|
|
55
|
-
__exportStar(require("./event-type/event-type.info.js"), exports);
|
|
56
58
|
// IAM
|
|
57
59
|
__exportStar(require("./iam/api-key-role-association.create.js"), exports);
|
|
58
60
|
__exportStar(require("./iam/api-key-role-association.delete.js"), exports);
|
|
59
61
|
__exportStar(require("./iam/api-key-role-association.list.js"), exports);
|
|
62
|
+
__exportStar(require("./iam/role.list.js"), exports);
|
|
60
63
|
__exportStar(require("./iam/user-role-association.create.js"), exports);
|
|
61
64
|
__exportStar(require("./iam/user-role-association.delete.js"), exports);
|
|
62
65
|
__exportStar(require("./iam/user-role-association.list.js"), exports);
|
|
63
|
-
__exportStar(require("./iam/role.list.js"), exports);
|
|
64
66
|
// Events
|
|
67
|
+
__exportStar(require("./events/event.list.js"), exports);
|
|
65
68
|
__exportStar(require("./events/events.fetch-time-buckets-by-names.js"), exports);
|
|
66
69
|
__exportStar(require("./events/events.fetch.js"), exports);
|
|
67
|
-
__exportStar(require("./events/event.list.js"), exports);
|
|
68
70
|
__exportStar(require("./events/time-bucket.list.js"), exports);
|
|
69
71
|
// Container
|
|
70
72
|
__exportStar(require("./container-registry/container-registry.create.js"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the tenant disable pii command
|
|
5
|
+
*/
|
|
6
|
+
export interface TenantDisablePiiInput {
|
|
7
|
+
/** The id of the tenant */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TenantDisablePiiResponse {
|
|
11
|
+
piiEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Disable Personal Identifiable Information (PII) Feature for a tenant
|
|
15
|
+
*/
|
|
16
|
+
export declare class TenantDisablePiiCommand extends Command<TenantDisablePiiInput, TenantDisablePiiResponse> {
|
|
17
|
+
/**
|
|
18
|
+
* Get the method
|
|
19
|
+
*/
|
|
20
|
+
protected getMethod(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
protected getBaseUrl(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
protected getPath(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Parse the response
|
|
31
|
+
*/
|
|
32
|
+
protected parseResponse(rawResponse: unknown): TenantDisablePiiResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Handle the client error
|
|
35
|
+
*/
|
|
36
|
+
protected handleClientError(error: ClientError): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=tenant.disable-pii.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.disable-pii.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.disable-pii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,OAAO,CAAA;CACpB;AASD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,qBAAqB,EAAE,wBAAwB,CAAC;IACnG;;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,wBAAwB;IAKhF;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TenantDisablePiiCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const not_found_js_1 = require("../../exceptions/not-found.js");
|
|
7
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
|
+
/**
|
|
9
|
+
* The response schema for the tenant disable pii command
|
|
10
|
+
*/
|
|
11
|
+
const responseSchema = typebox_1.Type.Object({
|
|
12
|
+
piiEnabled: typebox_1.Type.Boolean(),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Disable Personal Identifiable Information (PII) Feature for a tenant
|
|
16
|
+
*/
|
|
17
|
+
class TenantDisablePiiCommand extends command_js_1.Command {
|
|
18
|
+
/**
|
|
19
|
+
* Get the method
|
|
20
|
+
*/
|
|
21
|
+
getMethod() {
|
|
22
|
+
return "POST";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the base url
|
|
26
|
+
*/
|
|
27
|
+
getBaseUrl() {
|
|
28
|
+
return "https://tenant.api.flowcore.io";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get the path
|
|
32
|
+
*/
|
|
33
|
+
getPath() {
|
|
34
|
+
return `/api/v1/tenants/${this.input.tenantId}/disable-pii`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
parseResponse(rawResponse) {
|
|
40
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Handle the client error
|
|
45
|
+
*/
|
|
46
|
+
handleClientError(error) {
|
|
47
|
+
if (error.status === 404) {
|
|
48
|
+
throw new not_found_js_1.NotFoundException("Tenant", {
|
|
49
|
+
id: this.input.tenantId,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.TenantDisablePiiCommand = TenantDisablePiiCommand;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { ClientError } from "../../exceptions/client-error.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the tenant enable pii command
|
|
5
|
+
*/
|
|
6
|
+
export interface TenantEnablePiiInput {
|
|
7
|
+
/** The id of the tenant */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TenantEnablePiiResponse {
|
|
11
|
+
piiEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Enable Personal Identifiable Information (PII) Feature for a tenant
|
|
15
|
+
*/
|
|
16
|
+
export declare class TenantEnablePiiCommand extends Command<TenantEnablePiiInput, TenantEnablePiiResponse> {
|
|
17
|
+
/**
|
|
18
|
+
* Get the method
|
|
19
|
+
*/
|
|
20
|
+
protected getMethod(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
protected getBaseUrl(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
protected getPath(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Parse the response
|
|
31
|
+
*/
|
|
32
|
+
protected parseResponse(rawResponse: unknown): TenantEnablePiiResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Handle the client error
|
|
35
|
+
*/
|
|
36
|
+
protected handleClientError(error: ClientError): void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=tenant.enable-pii.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.enable-pii.d.ts","sourceRoot":"","sources":["../../../src/commands/tenant/tenant.enable-pii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAA;CACpB;AASD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,uBAAuB,CAAC;IAChG;;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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TenantEnablePiiCommand = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
|
+
const not_found_js_1 = require("../../exceptions/not-found.js");
|
|
7
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
8
|
+
/**
|
|
9
|
+
* The response schema for the tenant enable pii command
|
|
10
|
+
*/
|
|
11
|
+
const responseSchema = typebox_1.Type.Object({
|
|
12
|
+
piiEnabled: typebox_1.Type.Boolean(),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Enable Personal Identifiable Information (PII) Feature for a tenant
|
|
16
|
+
*/
|
|
17
|
+
class TenantEnablePiiCommand extends command_js_1.Command {
|
|
18
|
+
/**
|
|
19
|
+
* Get the method
|
|
20
|
+
*/
|
|
21
|
+
getMethod() {
|
|
22
|
+
return "POST";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the base url
|
|
26
|
+
*/
|
|
27
|
+
getBaseUrl() {
|
|
28
|
+
return "https://tenant.api.flowcore.io";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get the path
|
|
32
|
+
*/
|
|
33
|
+
getPath() {
|
|
34
|
+
return `/api/v1/tenants/${this.input.tenantId}/enable-pii`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
parseResponse(rawResponse) {
|
|
40
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Handle the client error
|
|
45
|
+
*/
|
|
46
|
+
handleClientError(error) {
|
|
47
|
+
if (error.status === 404) {
|
|
48
|
+
throw new not_found_js_1.NotFoundException("Tenant", {
|
|
49
|
+
id: this.input.tenantId,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.TenantEnablePiiCommand = TenantEnablePiiCommand;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static, type TBoolean, type TLiteral, type TNull, type TObject, type TString, type TUnion } from "@sinclair/typebox";
|
|
1
|
+
import { type Static, type TBoolean, type TLiteral, type TNull, type TObject, type TOptional, type TString, type TUnion } from "@sinclair/typebox";
|
|
2
2
|
interface TenantById {
|
|
3
3
|
tenantId: string;
|
|
4
4
|
tenant?: never;
|
|
@@ -33,6 +33,7 @@ export declare const TenantSchema: TObject<{
|
|
|
33
33
|
}>;
|
|
34
34
|
}>
|
|
35
35
|
]>;
|
|
36
|
+
piiEnabled: TOptional<TBoolean>;
|
|
36
37
|
}>;
|
|
37
38
|
/**
|
|
38
39
|
* The type for a tenant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC;IACjC,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,QAAQ,CAAA;IACrB,SAAS,EAAE,MAAM,CAAC;QAChB,KAAK;QACL,OAAO,CAAC;YACN,MAAM,EAAE,MAAM,CAAC;gBACb,QAAQ,CAAC,OAAO,CAAC;gBACjB,QAAQ,CAAC,UAAU,CAAC;gBACpB,QAAQ,CAAC,SAAS,CAAC;aACpB,CAAC,CAAA;YACF,aAAa,EAAE,OAAO,CAAC;gBACrB,MAAM,EAAE,OAAO,CAAA;gBACf,oBAAoB,EAAE,OAAO,CAAA;gBAC7B,4BAA4B,EAAE,OAAO,CAAA;aACtC,CAAC,CAAA;SACH,CAAC;KACH,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/contracts/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,OAAO,EACZ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