doers-comms-types 1.0.13 → 1.0.15

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.
@@ -97,7 +97,6 @@ export const office_classes_by_office_class_id = {
97
97
  "Recorder",
98
98
  "Auditor",
99
99
  "Surveyor",
100
- "Recorder",
101
100
  "District Attorney",
102
101
  "Sheriff"
103
102
  ]
@@ -2,6 +2,7 @@ import { BotAux } from "./Bot.js";
2
2
  export declare class User {
3
3
  readonly user_id: string;
4
4
  readonly admin: boolean;
5
+ readonly active: boolean;
5
6
  readonly bot_ids: string[];
6
7
  readonly email: string;
7
8
  readonly [x: string]: any;
@@ -2,6 +2,7 @@ import { BotAux } from "./Bot.js";
2
2
  export class User {
3
3
  user_id;
4
4
  admin;
5
+ active;
5
6
  bot_ids;
6
7
  email;
7
8
  constructor(user) {
@@ -10,6 +11,7 @@ export class User {
10
11
  }
11
12
  this.user_id = user.user_id;
12
13
  this.admin = user.admin;
14
+ this.active = user.active;
13
15
  this.bot_ids = user.bot_ids;
14
16
  this.email = user.email;
15
17
  }
@@ -17,6 +19,7 @@ export class User {
17
19
  return (user !== undefined &&
18
20
  typeof user.user_id === "string" &&
19
21
  typeof user.admin === "boolean" &&
22
+ typeof user.active === "boolean" &&
20
23
  typeof user.email === "string" &&
21
24
  Array.isArray(user.bot_ids) &&
22
25
  user.bot_ids.every((bot_id) => typeof bot_id === "string"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doers-comms-types",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -115,7 +115,6 @@ export const office_classes_by_office_class_id : Record<OfficeClassID, OfficeCla
115
115
  "Recorder",
116
116
  "Auditor",
117
117
  "Surveyor",
118
- "Recorder",
119
118
  "District Attorney",
120
119
  "Sheriff"
121
120
  ]
package/src/types/User.ts CHANGED
@@ -3,6 +3,7 @@ import { BotAux } from "./Bot"
3
3
  export class User {
4
4
  readonly user_id : string
5
5
  readonly admin : boolean
6
+ readonly active : boolean
6
7
  readonly bot_ids : string[]
7
8
  readonly email : string
8
9
  readonly [x : string] : any
@@ -13,6 +14,7 @@ export class User {
13
14
  }
14
15
  this.user_id = user.user_id
15
16
  this.admin = user.admin
17
+ this.active = user.active
16
18
  this.bot_ids = user.bot_ids
17
19
  this.email = user.email
18
20
  }
@@ -22,6 +24,7 @@ export class User {
22
24
  user !== undefined &&
23
25
  typeof user.user_id === "string" &&
24
26
  typeof user.admin === "boolean" &&
27
+ typeof user.active === "boolean" &&
25
28
  typeof user.email === "string" &&
26
29
  Array.isArray(user.bot_ids) &&
27
30
  user.bot_ids.every((bot_id : any) => typeof bot_id === "string")