triangle-types 1.0.254 → 1.0.256
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,3 +1,4 @@
|
|
|
1
|
+
import { FederalCongressMember } from "../federal_congress/FederalCongressMember.js";
|
|
1
2
|
import { FederalElectionCandidate } from "../federal_elections/FederalElectionCandidate.js";
|
|
2
3
|
export declare class Scout {
|
|
3
4
|
readonly scout_id: string;
|
|
@@ -9,7 +10,8 @@ export declare class Scout {
|
|
|
9
10
|
static is(scout: any): scout is Scout;
|
|
10
11
|
}
|
|
11
12
|
export declare class ScoutAux extends Scout {
|
|
12
|
-
readonly
|
|
13
|
+
readonly federal_election_candidates: FederalElectionCandidate[];
|
|
14
|
+
readonly federal_congress_member?: FederalCongressMember;
|
|
13
15
|
constructor(scout: any);
|
|
14
16
|
static is(scout: any): scout is ScoutAux;
|
|
15
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FederalCongressMember } from "../federal_congress/FederalCongressMember.js";
|
|
1
2
|
import { FederalElectionCandidate } from "../federal_elections/FederalElectionCandidate.js";
|
|
2
3
|
export class Scout {
|
|
3
4
|
scout_id;
|
|
@@ -25,16 +26,19 @@ export class Scout {
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
export class ScoutAux extends Scout {
|
|
28
|
-
|
|
29
|
+
federal_election_candidates;
|
|
30
|
+
federal_congress_member;
|
|
29
31
|
constructor(scout) {
|
|
30
32
|
if (!ScoutAux.is(scout)) {
|
|
31
33
|
throw Error("Invalid input.");
|
|
32
34
|
}
|
|
33
35
|
super(scout);
|
|
34
|
-
this.
|
|
36
|
+
this.federal_election_candidates = scout.federal_election_candidates;
|
|
37
|
+
this.federal_congress_member = scout.federal_congress_member;
|
|
35
38
|
}
|
|
36
39
|
static is(scout) {
|
|
37
40
|
return (Scout.is(scout) &&
|
|
38
|
-
(scout.
|
|
41
|
+
Array.isArray(scout.federal_election_candidates) && scout.federal_election_candidates.every(FederalElectionCandidate.is) &&
|
|
42
|
+
(scout.federal_congress_member === undefined || FederalCongressMember.is(scout.federal_congress_member)));
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -15,7 +15,7 @@ export class Tenant {
|
|
|
15
15
|
return (tenant !== undefined &&
|
|
16
16
|
typeof tenant.tenant_id === "string" &&
|
|
17
17
|
typeof tenant.name === "string" &&
|
|
18
|
-
typeof tenant.s3_id_img === "string");
|
|
18
|
+
(tenant.s3_id_img === undefined || typeof tenant.s3_id_img === "string"));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
export class TenantAux extends Tenant {
|
package/package.json
CHANGED
package/src/types/scout/Scout.ts
CHANGED
|
@@ -33,20 +33,23 @@ export class Scout {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export class ScoutAux extends Scout {
|
|
36
|
-
readonly
|
|
36
|
+
readonly federal_election_candidates : FederalElectionCandidate[]
|
|
37
|
+
readonly federal_congress_member? : FederalCongressMember
|
|
37
38
|
|
|
38
39
|
constructor(scout : any) {
|
|
39
40
|
if (!ScoutAux.is(scout)) {
|
|
40
41
|
throw Error("Invalid input.")
|
|
41
42
|
}
|
|
42
43
|
super(scout)
|
|
43
|
-
this.
|
|
44
|
+
this.federal_election_candidates = scout.federal_election_candidates
|
|
45
|
+
this.federal_congress_member = scout.federal_congress_member
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
static is(scout : any) : scout is ScoutAux {
|
|
47
49
|
return (
|
|
48
50
|
Scout.is(scout) &&
|
|
49
|
-
(scout.
|
|
51
|
+
Array.isArray(scout.federal_election_candidates) && scout.federal_election_candidates.every(FederalElectionCandidate.is) &&
|
|
52
|
+
(scout.federal_congress_member === undefined || FederalCongressMember.is(scout.federal_congress_member))
|
|
50
53
|
)
|
|
51
54
|
}
|
|
52
55
|
}
|
package/src/types/user/Tenant.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class Tenant {
|
|
|
20
20
|
tenant !== undefined &&
|
|
21
21
|
typeof tenant.tenant_id === "string" &&
|
|
22
22
|
typeof tenant.name === "string" &&
|
|
23
|
-
typeof tenant.s3_id_img === "string"
|
|
23
|
+
(tenant.s3_id_img === undefined || typeof tenant.s3_id_img === "string")
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
}
|