triangle-types 1.0.244 → 1.0.246

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.
@@ -1,4 +1,4 @@
1
- declare const resource_type_ids: readonly ["role", "scout", "prism", "tag", "target", "user", "fragment_type", "palette"];
1
+ declare const resource_type_ids: readonly ["document", "scout", "prism", "tag", "target", "role", "user", "fragment_type", "palette"];
2
2
  export type ResourceTypeID = typeof resource_type_ids[number];
3
3
  export declare function is_resource_type_id(resource_type_id: any): resource_type_id is ResourceTypeID;
4
4
  export declare class TenantProvision {
@@ -6,6 +6,9 @@ export declare class TenantProvision {
6
6
  readonly provision_id: string;
7
7
  readonly resource_type_id: ResourceTypeID;
8
8
  readonly resource_id: string;
9
+ readonly is_readable: boolean;
10
+ readonly is_writable: boolean;
11
+ readonly is_deletable: boolean;
9
12
  readonly [x: string]: any;
10
13
  constructor(tenant_provision: TenantProvision);
11
14
  static is(tenant_provision: any): tenant_provision is TenantProvision;
@@ -1,4 +1,4 @@
1
- const resource_type_ids = ["role", "scout", "prism", "tag", "target", "user", "fragment_type", "palette"];
1
+ const resource_type_ids = ["document", "scout", "prism", "tag", "target", "role", "user", "fragment_type", "palette"];
2
2
  export function is_resource_type_id(resource_type_id) {
3
3
  return resource_type_ids.includes(resource_type_id);
4
4
  }
@@ -7,6 +7,9 @@ export class TenantProvision {
7
7
  provision_id;
8
8
  resource_type_id;
9
9
  resource_id;
10
+ is_readable;
11
+ is_writable;
12
+ is_deletable;
10
13
  constructor(tenant_provision) {
11
14
  if (!TenantProvision.is(tenant_provision)) {
12
15
  throw Error("Invalid Input.");
@@ -15,11 +18,17 @@ export class TenantProvision {
15
18
  this.provision_id = tenant_provision.provision_id;
16
19
  this.resource_type_id = tenant_provision.resource_type_id;
17
20
  this.resource_id = tenant_provision.resource_id;
21
+ this.is_readable = tenant_provision.is_readable;
22
+ this.is_writable = tenant_provision.is_writable;
23
+ this.is_deletable = tenant_provision.is_deletable;
18
24
  }
19
25
  static is(tenant_provision) {
20
26
  return (tenant_provision !== undefined &&
21
27
  typeof tenant_provision.provision_id === "string" &&
22
28
  is_resource_type_id(tenant_provision.resource_type_id) &&
23
- typeof tenant_provision.resource_id === "string");
29
+ typeof tenant_provision.resource_id === "string" &&
30
+ typeof tenant_provision.is_readable === "boolean" &&
31
+ typeof tenant_provision.is_writable === "boolean" &&
32
+ typeof tenant_provision.is_deletable === "boolean");
24
33
  }
25
34
  }
@@ -5,6 +5,9 @@ export declare class TenantRoleProvision {
5
5
  readonly provision_id: string;
6
6
  readonly resource_type_id: ResourceTypeID;
7
7
  readonly resource_id: string;
8
+ readonly is_readable: boolean;
9
+ readonly is_writable: boolean;
10
+ readonly is_deletable: boolean;
8
11
  readonly [x: string]: any;
9
12
  constructor(tenant_role_provision: TenantRoleProvision);
10
13
  static is(tenant_role_provision: any): tenant_role_provision is TenantRoleProvision;
@@ -5,6 +5,9 @@ export class TenantRoleProvision {
5
5
  provision_id;
6
6
  resource_type_id;
7
7
  resource_id;
8
+ is_readable;
9
+ is_writable;
10
+ is_deletable;
8
11
  constructor(tenant_role_provision) {
9
12
  if (!TenantRoleProvision.is(tenant_role_provision)) {
10
13
  throw Error("Invalid input.");
@@ -14,6 +17,9 @@ export class TenantRoleProvision {
14
17
  this.provision_id = tenant_role_provision.provision_id;
15
18
  this.resource_type_id = tenant_role_provision.resource_type_id;
16
19
  this.resource_id = tenant_role_provision.resource_id;
20
+ this.is_readable = tenant_role_provision.is_readable;
21
+ this.is_writable = tenant_role_provision.is_writable;
22
+ this.is_deletable = tenant_role_provision.is_deletable;
17
23
  }
18
24
  static is(tenant_role_provision) {
19
25
  return (tenant_role_provision !== undefined &&
@@ -21,6 +27,9 @@ export class TenantRoleProvision {
21
27
  typeof tenant_role_provision.role_id === "string" &&
22
28
  typeof tenant_role_provision.provision_id === "string" &&
23
29
  is_resource_type_id(tenant_role_provision.resource_type_id) &&
24
- typeof tenant_role_provision.resource_id === "string");
30
+ typeof tenant_role_provision.resource_id === "string" &&
31
+ typeof tenant_role_provision.is_readable === "boolean" &&
32
+ typeof tenant_role_provision.is_writable === "boolean" &&
33
+ typeof tenant_role_provision.is_deletable === "boolean");
25
34
  }
26
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.244",
3
+ "version": "1.0.246",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- const resource_type_ids = ["role", "scout", "prism", "tag", "target", "user", "fragment_type", "palette"] as const
1
+ const resource_type_ids = ["document", "scout", "prism", "tag", "target", "role", "user", "fragment_type", "palette"] as const
2
2
 
3
3
  export type ResourceTypeID = typeof resource_type_ids[number]
4
4
 
@@ -11,6 +11,9 @@ export class TenantProvision {
11
11
  readonly provision_id : string
12
12
  readonly resource_type_id : ResourceTypeID
13
13
  readonly resource_id : string
14
+ readonly is_readable : boolean
15
+ readonly is_writable : boolean
16
+ readonly is_deletable : boolean
14
17
  readonly [x : string] : any
15
18
 
16
19
  constructor(tenant_provision : TenantProvision) {
@@ -21,6 +24,9 @@ export class TenantProvision {
21
24
  this.provision_id = tenant_provision.provision_id
22
25
  this.resource_type_id = tenant_provision.resource_type_id
23
26
  this.resource_id = tenant_provision.resource_id
27
+ this.is_readable = tenant_provision.is_readable
28
+ this.is_writable = tenant_provision.is_writable
29
+ this.is_deletable = tenant_provision.is_deletable
24
30
  }
25
31
 
26
32
  static is(tenant_provision : any) : tenant_provision is TenantProvision {
@@ -28,7 +34,10 @@ export class TenantProvision {
28
34
  tenant_provision !== undefined &&
29
35
  typeof tenant_provision.provision_id === "string" &&
30
36
  is_resource_type_id(tenant_provision.resource_type_id) &&
31
- typeof tenant_provision.resource_id === "string"
37
+ typeof tenant_provision.resource_id === "string" &&
38
+ typeof tenant_provision.is_readable === "boolean" &&
39
+ typeof tenant_provision.is_writable === "boolean" &&
40
+ typeof tenant_provision.is_deletable === "boolean"
32
41
  )
33
42
  }
34
43
  }
@@ -6,6 +6,9 @@ export class TenantRoleProvision {
6
6
  readonly provision_id : string
7
7
  readonly resource_type_id : ResourceTypeID
8
8
  readonly resource_id : string
9
+ readonly is_readable : boolean
10
+ readonly is_writable : boolean
11
+ readonly is_deletable : boolean
9
12
 
10
13
  readonly [x : string] : any
11
14
 
@@ -18,6 +21,9 @@ export class TenantRoleProvision {
18
21
  this.provision_id = tenant_role_provision.provision_id
19
22
  this.resource_type_id = tenant_role_provision.resource_type_id
20
23
  this.resource_id = tenant_role_provision.resource_id
24
+ this.is_readable = tenant_role_provision.is_readable
25
+ this.is_writable = tenant_role_provision.is_writable
26
+ this.is_deletable = tenant_role_provision.is_deletable
21
27
  }
22
28
 
23
29
  static is(tenant_role_provision : any) : tenant_role_provision is TenantRoleProvision {
@@ -27,7 +33,10 @@ export class TenantRoleProvision {
27
33
  typeof tenant_role_provision.role_id === "string" &&
28
34
  typeof tenant_role_provision.provision_id === "string" &&
29
35
  is_resource_type_id(tenant_role_provision.resource_type_id) &&
30
- typeof tenant_role_provision.resource_id === "string"
36
+ typeof tenant_role_provision.resource_id === "string" &&
37
+ typeof tenant_role_provision.is_readable === "boolean" &&
38
+ typeof tenant_role_provision.is_writable === "boolean" &&
39
+ typeof tenant_role_provision.is_deletable === "boolean"
31
40
  )
32
41
  }
33
42
  }