triangle-types 1.0.152 → 1.0.153

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.
@@ -7,7 +7,14 @@ export declare class TenantProvision {
7
7
  readonly provision_type_id: TenantProvisionTypeID;
8
8
  readonly name?: string;
9
9
  readonly value?: any;
10
+ readonly [x: string]: any;
10
11
  constructor(tenant_provision: TenantProvision);
11
12
  static is(tenant_provision: any): tenant_provision is TenantProvision;
12
13
  }
14
+ export declare class TenantTagProvisionAux extends TenantProvision {
15
+ readonly provision_type_id: "tag";
16
+ readonly num_voters: number;
17
+ constructor(tenant_provision: TenantTagProvisionAux);
18
+ static is(tenant_provision: any): tenant_provision is TenantTagProvisionAux;
19
+ }
13
20
  export {};
@@ -8,7 +8,6 @@ export class TenantProvision {
8
8
  provision_type_id;
9
9
  name;
10
10
  value;
11
- // readonly [x : string] : any
12
11
  constructor(tenant_provision) {
13
12
  if (!TenantProvision.is(tenant_provision)) {
14
13
  throw Error("Invalid Input.");
@@ -27,3 +26,21 @@ export class TenantProvision {
27
26
  (tenant_provision.name === undefined || typeof tenant_provision.name === "string"));
28
27
  }
29
28
  }
29
+ export class TenantTagProvisionAux extends TenantProvision {
30
+ provision_type_id;
31
+ num_voters;
32
+ // readonly [x : string] : any
33
+ constructor(tenant_provision) {
34
+ if (!TenantTagProvisionAux.is(tenant_provision)) {
35
+ throw Error("Invalid Input.");
36
+ }
37
+ super(tenant_provision);
38
+ this.provision_type_id = "tag";
39
+ this.num_voters = tenant_provision.num_voters;
40
+ }
41
+ static is(tenant_provision) {
42
+ return (TenantProvision.is(tenant_provision) &&
43
+ tenant_provision.provision_type_id === "tag" &&
44
+ typeof tenant_provision.num_voters === "number");
45
+ }
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.152",
3
+ "version": "1.0.153",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -6,14 +6,13 @@ export function is_tenant_provision_type_id(tenant_provision_type_id : any) : te
6
6
  return tenant_provision_type_ids.includes(tenant_provision_type_id)
7
7
  }
8
8
 
9
-
10
9
  export class TenantProvision {
11
10
  readonly tenant_id : string
12
11
  readonly provision_id : string
13
12
  readonly provision_type_id : TenantProvisionTypeID
14
13
  readonly name? : string
15
14
  readonly value? : any
16
- // readonly [x : string] : any
15
+ readonly [x : string] : any
17
16
 
18
17
  constructor(tenant_provision : TenantProvision) {
19
18
  if (!TenantProvision.is(tenant_provision)) {
@@ -35,4 +34,27 @@ export class TenantProvision {
35
34
  (tenant_provision.name === undefined || typeof tenant_provision.name === "string")
36
35
  )
37
36
  }
37
+ }
38
+
39
+ export class TenantTagProvisionAux extends TenantProvision {
40
+ readonly provision_type_id : "tag"
41
+ readonly num_voters : number
42
+ // readonly [x : string] : any
43
+
44
+ constructor(tenant_provision : TenantTagProvisionAux) {
45
+ if (!TenantTagProvisionAux.is(tenant_provision)) {
46
+ throw Error("Invalid Input.")
47
+ }
48
+ super(tenant_provision)
49
+ this.provision_type_id = "tag"
50
+ this.num_voters = tenant_provision.num_voters
51
+ }
52
+
53
+ static is(tenant_provision : any) : tenant_provision is TenantTagProvisionAux {
54
+ return (
55
+ TenantProvision.is(tenant_provision) &&
56
+ tenant_provision.provision_type_id === "tag" &&
57
+ typeof tenant_provision.num_voters === "number"
58
+ )
59
+ }
38
60
  }