doers-comms-types 1.0.6 → 1.0.7
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/dist/src/types/Bot.d.ts +2 -1
- package/dist/src/types/Bot.js +7 -4
- package/package.json +1 -1
- package/src/types/Bot.ts +7 -4
package/dist/src/types/Bot.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class Bot {
|
|
|
11
11
|
readonly state_id: StateID;
|
|
12
12
|
readonly district?: number;
|
|
13
13
|
readonly party_id: PartyID;
|
|
14
|
-
readonly
|
|
14
|
+
readonly tone_guidelines_refresh: boolean;
|
|
15
15
|
readonly topics: string[];
|
|
16
16
|
readonly jurisdiction_ids: number[];
|
|
17
17
|
readonly office_class_id: OfficeClassID;
|
|
@@ -23,6 +23,7 @@ export declare class Bot {
|
|
|
23
23
|
export declare class BotAux extends Bot {
|
|
24
24
|
readonly jurisdictions: Jurisdiction[];
|
|
25
25
|
readonly photo_download_url?: string;
|
|
26
|
+
readonly tone_guidelines_text: string;
|
|
26
27
|
constructor(bot: any);
|
|
27
28
|
static is(bot: any): bot is BotAux;
|
|
28
29
|
}
|
package/dist/src/types/Bot.js
CHANGED
|
@@ -11,7 +11,7 @@ export class Bot {
|
|
|
11
11
|
state_id;
|
|
12
12
|
district;
|
|
13
13
|
party_id;
|
|
14
|
-
|
|
14
|
+
tone_guidelines_refresh;
|
|
15
15
|
topics;
|
|
16
16
|
jurisdiction_ids;
|
|
17
17
|
office_class_id;
|
|
@@ -28,7 +28,7 @@ export class Bot {
|
|
|
28
28
|
this.state_id = bot.state_id;
|
|
29
29
|
this.district = bot.district;
|
|
30
30
|
this.party_id = bot.party_id;
|
|
31
|
-
this.
|
|
31
|
+
this.tone_guidelines_refresh = bot.tone_guidelines_refresh;
|
|
32
32
|
this.topics = bot.topics;
|
|
33
33
|
this.jurisdiction_ids = bot.jurisdiction_ids;
|
|
34
34
|
this.office_class_id = bot.office_class_id;
|
|
@@ -44,7 +44,7 @@ export class Bot {
|
|
|
44
44
|
is_state_id(bot.state_id) &&
|
|
45
45
|
(bot.district === undefined || typeof bot.district === "number") &&
|
|
46
46
|
is_party_id(bot.party_id) &&
|
|
47
|
-
typeof bot.
|
|
47
|
+
typeof bot.tone_guidelines_refresh === "boolean" &&
|
|
48
48
|
Array.isArray(bot.topics) &&
|
|
49
49
|
bot.topics.every((topic) => typeof topic === "string") &&
|
|
50
50
|
Array.isArray(bot.jurisdiction_ids) &&
|
|
@@ -56,6 +56,7 @@ export class Bot {
|
|
|
56
56
|
export class BotAux extends Bot {
|
|
57
57
|
jurisdictions;
|
|
58
58
|
photo_download_url;
|
|
59
|
+
tone_guidelines_text;
|
|
59
60
|
constructor(bot) {
|
|
60
61
|
if (!BotAux.is(bot)) {
|
|
61
62
|
throw Error("Invalid input.");
|
|
@@ -63,11 +64,13 @@ export class BotAux extends Bot {
|
|
|
63
64
|
super(bot);
|
|
64
65
|
this.jurisdictions = bot.jurisdictions;
|
|
65
66
|
this.photo_download_url = bot.photo_download_url;
|
|
67
|
+
this.tone_guidelines_text = bot.tone_guidelines_text;
|
|
66
68
|
}
|
|
67
69
|
static is(bot) {
|
|
68
70
|
return (Bot.is(bot) &&
|
|
69
71
|
Array.isArray(bot.jurisdictions) &&
|
|
70
72
|
bot.jurisdictions.every(Jurisdiction.is) &&
|
|
71
|
-
(bot.photo_download_url === undefined || typeof bot.photo_download_url === "string")
|
|
73
|
+
(bot.photo_download_url === undefined || typeof bot.photo_download_url === "string") &&
|
|
74
|
+
(bot.tone_guidelines_text === undefined || typeof bot.tone_guidelines_text === "string"));
|
|
72
75
|
}
|
|
73
76
|
}
|
package/package.json
CHANGED
package/src/types/Bot.ts
CHANGED
|
@@ -12,7 +12,7 @@ export class Bot {
|
|
|
12
12
|
readonly state_id : StateID
|
|
13
13
|
readonly district? : number
|
|
14
14
|
readonly party_id : PartyID
|
|
15
|
-
readonly
|
|
15
|
+
readonly tone_guidelines_refresh : boolean
|
|
16
16
|
readonly topics : string[]
|
|
17
17
|
readonly jurisdiction_ids : number[]
|
|
18
18
|
readonly office_class_id : OfficeClassID
|
|
@@ -31,7 +31,7 @@ export class Bot {
|
|
|
31
31
|
this.state_id = bot.state_id
|
|
32
32
|
this.district = bot.district
|
|
33
33
|
this.party_id = bot.party_id
|
|
34
|
-
this.
|
|
34
|
+
this.tone_guidelines_refresh = bot.tone_guidelines_refresh
|
|
35
35
|
this.topics = bot.topics
|
|
36
36
|
this.jurisdiction_ids = bot.jurisdiction_ids
|
|
37
37
|
this.office_class_id = bot.office_class_id
|
|
@@ -49,7 +49,7 @@ export class Bot {
|
|
|
49
49
|
is_state_id(bot.state_id) &&
|
|
50
50
|
(bot.district === undefined || typeof bot.district === "number") &&
|
|
51
51
|
is_party_id(bot.party_id) &&
|
|
52
|
-
typeof bot.
|
|
52
|
+
typeof bot.tone_guidelines_refresh === "boolean" &&
|
|
53
53
|
Array.isArray(bot.topics) &&
|
|
54
54
|
bot.topics.every((topic : any) => typeof topic === "string") &&
|
|
55
55
|
Array.isArray(bot.jurisdiction_ids) &&
|
|
@@ -63,6 +63,7 @@ export class Bot {
|
|
|
63
63
|
export class BotAux extends Bot {
|
|
64
64
|
readonly jurisdictions : Jurisdiction[]
|
|
65
65
|
readonly photo_download_url? : string
|
|
66
|
+
readonly tone_guidelines_text : string
|
|
66
67
|
|
|
67
68
|
constructor(bot : any) {
|
|
68
69
|
if (!BotAux.is(bot)) {
|
|
@@ -71,6 +72,7 @@ export class BotAux extends Bot {
|
|
|
71
72
|
super(bot)
|
|
72
73
|
this.jurisdictions = bot.jurisdictions
|
|
73
74
|
this.photo_download_url = bot.photo_download_url
|
|
75
|
+
this.tone_guidelines_text = bot.tone_guidelines_text
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
static is(bot : any) : bot is BotAux {
|
|
@@ -78,7 +80,8 @@ export class BotAux extends Bot {
|
|
|
78
80
|
Bot.is(bot) &&
|
|
79
81
|
Array.isArray(bot.jurisdictions) &&
|
|
80
82
|
bot.jurisdictions.every(Jurisdiction.is) &&
|
|
81
|
-
(bot.photo_download_url === undefined || typeof bot.photo_download_url === "string")
|
|
83
|
+
(bot.photo_download_url === undefined || typeof bot.photo_download_url === "string") &&
|
|
84
|
+
(bot.tone_guidelines_text === undefined || typeof bot.tone_guidelines_text === "string")
|
|
82
85
|
)
|
|
83
86
|
}
|
|
84
87
|
}
|