tabletcommand-backend-models 5.17.39 → 5.18.0

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.
Files changed (36) hide show
  1. package/build/models/agency.js +7 -2
  2. package/build/models/agency.js.map +1 -1
  3. package/build/models/arcgis-group.js +21 -0
  4. package/build/models/arcgis-group.js.map +1 -1
  5. package/build/models/battalion.js +7 -2
  6. package/build/models/battalion.js.map +1 -1
  7. package/build/models/checklist.js +7 -2
  8. package/build/models/checklist.js.map +1 -1
  9. package/build/models/personnel-import.js +7 -2
  10. package/build/models/personnel-import.js.map +1 -1
  11. package/build/models/template.js +7 -2
  12. package/build/models/template.js.map +1 -1
  13. package/build/models/user.js +7 -2
  14. package/build/models/user.js.map +1 -1
  15. package/definitions/models/agency.d.ts +94 -1
  16. package/definitions/models/agency.d.ts.map +1 -1
  17. package/definitions/models/arcgis-group.d.ts +15 -1
  18. package/definitions/models/arcgis-group.d.ts.map +1 -1
  19. package/definitions/models/battalion.d.ts +119 -0
  20. package/definitions/models/battalion.d.ts.map +1 -1
  21. package/definitions/models/checklist.d.ts +115 -1
  22. package/definitions/models/checklist.d.ts.map +1 -1
  23. package/definitions/models/personnel-import.d.ts +82 -1
  24. package/definitions/models/personnel-import.d.ts.map +1 -1
  25. package/definitions/models/template.d.ts +89 -1
  26. package/definitions/models/template.d.ts.map +1 -1
  27. package/definitions/models/user.d.ts +281 -0
  28. package/definitions/models/user.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/src/models/agency.ts +6 -1
  31. package/src/models/arcgis-group.ts +22 -0
  32. package/src/models/battalion.ts +5 -1
  33. package/src/models/checklist.ts +6 -1
  34. package/src/models/personnel-import.ts +6 -1
  35. package/src/models/template.ts +6 -1
  36. package/src/models/user.ts +6 -1
@@ -1,6 +1,120 @@
1
1
  /// <reference types="mongoose" />
2
2
  import * as uuid from "uuid";
3
- import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType, retrieveCurrentUnixTime } from "../helpers";
3
+ import { MongooseModule, currentDate, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType, retrieveCurrentUnixTime } from "../helpers";
4
+ export declare function ChecklistSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
5
+ _interface: import("../helpers").MongooseInterface<{
6
+ _id: {
7
+ type: import("mongoose").Types.ObjectIdConstructor;
8
+ auto: boolean;
9
+ };
10
+ position: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ userId: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ uuid: {
19
+ type: StringConstructor;
20
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
21
+ };
22
+ isMandatory: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ modified_date: {
27
+ type: StringConstructor;
28
+ };
29
+ modified_unix_date: {
30
+ type: NumberConstructor;
31
+ default: typeof retrieveCurrentUnixTime;
32
+ };
33
+ modified: {
34
+ type: DateConstructor;
35
+ default: typeof currentDate;
36
+ };
37
+ departmentId: {
38
+ type: StringConstructor;
39
+ required: boolean;
40
+ index: true;
41
+ };
42
+ active: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ name: {
47
+ type: StringConstructor;
48
+ required: boolean;
49
+ };
50
+ agencyId: {
51
+ type: typeof import("mongoose").Schema.Types.ObjectId;
52
+ ref: string;
53
+ default: null;
54
+ };
55
+ items: {
56
+ type: (import("mongoose").Schema<any> & {
57
+ _interface: import("../helpers").MongooseInterface<{
58
+ _id: {
59
+ type: import("mongoose").Types.ObjectIdConstructor;
60
+ auto: boolean;
61
+ };
62
+ position: {
63
+ type: NumberConstructor;
64
+ default: number;
65
+ };
66
+ userId: StringConstructor;
67
+ uuid: {
68
+ type: StringConstructor;
69
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
70
+ };
71
+ checklist_uuid: {
72
+ type: StringConstructor;
73
+ };
74
+ api_checklist_id: {
75
+ type: StringConstructor;
76
+ };
77
+ isMandatory: {
78
+ type: BooleanConstructor;
79
+ default: boolean;
80
+ };
81
+ modified_date: {
82
+ type: StringConstructor;
83
+ };
84
+ modified_unix_date: {
85
+ type: NumberConstructor;
86
+ default: typeof retrieveCurrentUnixTime;
87
+ };
88
+ departmentId: {
89
+ type: StringConstructor;
90
+ required: boolean;
91
+ index: true;
92
+ };
93
+ active: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ name: {
98
+ type: StringConstructor;
99
+ required: boolean;
100
+ };
101
+ agencyId: {
102
+ type: typeof import("mongoose").Schema.Types.ObjectId;
103
+ ref: string;
104
+ default: null;
105
+ };
106
+ description: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ };
110
+ }>;
111
+ _methods: unknown;
112
+ })[];
113
+ default: never[];
114
+ };
115
+ }>;
116
+ _methods: unknown;
117
+ };
4
118
  export declare function ChecklistModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
5
119
  _id: import("bson").ObjectID;
6
120
  position: number;
@@ -1 +1 @@
1
- {"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/models/checklist.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EACL,cAAc,EAOd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAIpB,wBAAsB,eAAe,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6E7D;AAED,MAAM,WAAW,SAAU,SAAQ,8BAA8B,CAAC,OAAO,eAAe,CAAC;CAAI;AAC7F,MAAM,WAAW,cAAe,SAAQ,+BAA+B,CAAC,SAAS,CAAC;CAAI;;AACtF,wBAAiG"}
1
+ {"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/models/checklist.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EACL,cAAc,EAGd,WAAW,EAIX,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAIpB,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EvD;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAG7D;AAED,MAAM,WAAW,SAAU,SAAQ,8BAA8B,CAAC,OAAO,eAAe,CAAC;CAAI;AAC7F,MAAM,WAAW,cAAe,SAAQ,+BAA+B,CAAC,SAAS,CAAC;CAAI;;AACtF,wBAAiG"}
@@ -1,5 +1,86 @@
1
1
  /// <reference types="mongoose" />
2
- import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType } from "../helpers";
2
+ import { currentDate, MongooseModule, retrieveCurrentUnixTime, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType } from "../helpers";
3
+ export declare function PersonnelImportSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
4
+ _interface: import("../helpers").MongooseInterface<{
5
+ _id: {
6
+ type: import("mongoose").Types.ObjectIdConstructor;
7
+ auto: boolean;
8
+ };
9
+ PersonnelID: {
10
+ type: StringConstructor;
11
+ required: boolean;
12
+ };
13
+ PersonnelName: {
14
+ type: StringConstructor;
15
+ required: boolean;
16
+ };
17
+ PersonnelRank: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ PersonnelWorkCode: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ PersonnelNote: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ departmentId: {
30
+ type: StringConstructor;
31
+ };
32
+ radioNames: {
33
+ type: StringConstructor[];
34
+ default: never[];
35
+ };
36
+ shiftStartTime: {
37
+ type: NumberConstructor;
38
+ default: number;
39
+ };
40
+ shiftEndTime: {
41
+ type: NumberConstructor;
42
+ default: number;
43
+ };
44
+ shiftStart: {
45
+ type: DateConstructor;
46
+ default: string;
47
+ };
48
+ shiftEnd: {
49
+ type: DateConstructor;
50
+ default: string;
51
+ };
52
+ modified_unix_date: {
53
+ type: NumberConstructor;
54
+ default: typeof retrieveCurrentUnixTime;
55
+ };
56
+ modified: {
57
+ type: DateConstructor;
58
+ default: typeof currentDate;
59
+ };
60
+ active: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ agencyName: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ agencyCode: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ agencyId: {
73
+ type: typeof import("mongoose").Schema.Types.ObjectId;
74
+ ref: string;
75
+ default: null;
76
+ };
77
+ importNotes: {
78
+ type: StringConstructor;
79
+ default: string;
80
+ };
81
+ }>;
82
+ _methods: unknown;
83
+ };
3
84
  export declare function PersonnelImportModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
4
85
  _id: import("bson").ObjectID;
5
86
  PersonnelID: string;
@@ -1 +1 @@
1
- {"version":3,"file":"personnel-import.d.ts","sourceRoot":"","sources":["../../src/models/personnel-import.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,cAAc,EAEd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFnE;AAED,MAAM,WAAW,eAAgB,SAAQ,8BAA8B,CAAC,OAAO,qBAAqB,CAAC;CAAI;AACzG,MAAM,WAAW,oBAAqB,SAAQ,+BAA+B,CAAC,eAAe,CAAC;CAAI;;AAClG,wBAAmH"}
1
+ {"version":3,"file":"personnel-import.d.ts","sourceRoot":"","sources":["../../src/models/personnel-import.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyF7D;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;GAGnE;AAED,MAAM,WAAW,eAAgB,SAAQ,8BAA8B,CAAC,OAAO,qBAAqB,CAAC;CAAI;AACzG,MAAM,WAAW,oBAAqB,SAAQ,+BAA+B,CAAC,eAAe,CAAC;CAAI;;AAClG,wBAAmH"}
@@ -1,6 +1,94 @@
1
1
  /// <reference types="mongoose" />
2
2
  import * as uuid from "uuid";
3
- import { ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, MongooseModule, ReplaceModelReturnType } from "../helpers";
3
+ import { currentDate, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, MongooseModule, ReplaceModelReturnType, retrieveCurrentUnixTime } from "../helpers";
4
+ export declare function TemplateSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
5
+ _interface: import("../helpers").MongooseInterface<{
6
+ _id: {
7
+ type: import("mongoose").Types.ObjectIdConstructor;
8
+ auto: boolean;
9
+ };
10
+ position: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ userId: StringConstructor;
15
+ uuid: {
16
+ type: StringConstructor;
17
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
18
+ };
19
+ isMandatory: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ modified_unix_date: {
24
+ type: NumberConstructor;
25
+ default: typeof retrieveCurrentUnixTime;
26
+ };
27
+ modified: {
28
+ type: DateConstructor;
29
+ default: typeof currentDate;
30
+ };
31
+ departmentId: {
32
+ type: StringConstructor;
33
+ required: boolean;
34
+ index: true;
35
+ };
36
+ active: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ name: {
41
+ type: StringConstructor;
42
+ required: boolean;
43
+ };
44
+ checklist: {
45
+ type: (import("mongoose").Schema<any> & {
46
+ _interface: import("../helpers").MongooseInterface<{
47
+ name: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ position: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ id: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ }>;
60
+ _methods: unknown;
61
+ })[];
62
+ default: never[];
63
+ };
64
+ group: {
65
+ type: (import("mongoose").Schema<any> & {
66
+ _interface: import("../helpers").MongooseInterface<{
67
+ name: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ position: {
72
+ type: NumberConstructor;
73
+ default: number;
74
+ };
75
+ uuid: {
76
+ type: StringConstructor;
77
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
78
+ };
79
+ }>;
80
+ _methods: unknown;
81
+ })[];
82
+ default: never[];
83
+ };
84
+ agencyId: {
85
+ type: typeof import("mongoose").Schema.Types.ObjectId;
86
+ ref: string;
87
+ default: null;
88
+ };
89
+ }>;
90
+ _methods: unknown;
91
+ };
4
92
  export declare function TemplateModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
5
93
  _id: import("bson").ObjectID;
6
94
  position: number;
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/models/template.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAKL,8BAA8B,EAE9B,+BAA+B,EAE/B,cAAc,EACd,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,cAAc,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2H5D;AAED,MAAM,WAAW,QAAS,SAAQ,8BAA8B,CAAC,OAAO,cAAc,CAAC;CAAI;AAC3F,MAAM,WAAW,aAAc,SAAQ,+BAA+B,CAAC,QAAQ,CAAC;CAAI;;AACpF,wBAA8F"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/models/template.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAGL,WAAW,EAEX,8BAA8B,EAE9B,+BAA+B,EAE/B,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,cAAc,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2HtD;AAED,wBAAsB,cAAc,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAG5D;AAED,MAAM,WAAW,QAAS,SAAQ,8BAA8B,CAAC,OAAO,cAAc,CAAC;CAAI;AAC3F,MAAM,WAAW,aAAc,SAAQ,+BAA+B,CAAC,QAAQ,CAAC;CAAI;;AACpF,wBAA8F"}
@@ -1,5 +1,286 @@
1
1
  /// <reference types="mongoose" />
2
+ import * as uuid from "uuid";
2
3
  import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType, currentDate } from "../helpers";
4
+ export declare function UserSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
5
+ _interface: import("../helpers").MongooseInterface<{
6
+ nick: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ index: true;
10
+ };
11
+ email: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ index: true;
15
+ };
16
+ name: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ uuid: {
21
+ type: StringConstructor;
22
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
23
+ };
24
+ departmentId: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ required: boolean;
28
+ index: true;
29
+ };
30
+ modified_date: {
31
+ type: DateConstructor;
32
+ default: typeof currentDate;
33
+ };
34
+ when: {
35
+ type: DateConstructor;
36
+ };
37
+ agencyId: {
38
+ type: typeof import("mongoose").Schema.Types.ObjectId;
39
+ ref: string;
40
+ default: null;
41
+ };
42
+ managedAgencies: {
43
+ type: typeof import("mongoose").Schema.Types.ObjectId[];
44
+ ref: string;
45
+ default: never[];
46
+ };
47
+ active: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ admin: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ superuser: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ isPro: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ mobileAccess: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ webAccess: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ outsider: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ shareLocationEnabled: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ beaconEnabled: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ userContributionEnabled: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ syncLoggingExpireDate: {
88
+ type: DateConstructor;
89
+ default: null;
90
+ };
91
+ beacons: {
92
+ type: StringConstructor[];
93
+ default: never[];
94
+ };
95
+ salt: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ select: boolean;
99
+ };
100
+ pass: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ select: boolean;
104
+ };
105
+ mapHidden: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ mapId: {
110
+ type: StringConstructor;
111
+ default: string;
112
+ };
113
+ vehicle: {
114
+ type: import("mongoose").Schema<any> & {
115
+ _interface: import("../helpers").MongooseInterface<{
116
+ radioName: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ vehicleId: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ }>;
125
+ _methods: unknown;
126
+ };
127
+ default: null;
128
+ };
129
+ sessionCountiPhone: {
130
+ type: NumberConstructor;
131
+ default: number;
132
+ };
133
+ sessionCountiPad: {
134
+ type: NumberConstructor;
135
+ default: number;
136
+ };
137
+ rtsAuthKey: {
138
+ type: StringConstructor;
139
+ default: string;
140
+ };
141
+ pubNubV2: {
142
+ type: import("mongoose").Schema<any> & {
143
+ _interface: import("../helpers").MongooseInterface<{
144
+ token: {
145
+ type: StringConstructor;
146
+ default: string;
147
+ };
148
+ expireAt: {
149
+ type: DateConstructor;
150
+ default: typeof currentDate;
151
+ };
152
+ runAt: {
153
+ type: DateConstructor;
154
+ default: string;
155
+ };
156
+ }>;
157
+ _methods: unknown;
158
+ };
159
+ default: null;
160
+ };
161
+ pubNubV3: {
162
+ type: import("mongoose").Schema<any> & {
163
+ _interface: import("../helpers").MongooseInterface<{
164
+ token: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ expireAt: {
169
+ type: DateConstructor;
170
+ default: typeof currentDate;
171
+ };
172
+ runAt: {
173
+ type: DateConstructor;
174
+ default: string;
175
+ };
176
+ }>;
177
+ _methods: unknown;
178
+ };
179
+ default: null;
180
+ };
181
+ token: {
182
+ type: StringConstructor;
183
+ default: string;
184
+ };
185
+ tokenExpireAt: {
186
+ type: DateConstructor;
187
+ default: typeof currentDate;
188
+ };
189
+ shareLocationPhone: {
190
+ type: BooleanConstructor;
191
+ default: boolean;
192
+ };
193
+ shareLocationTablet: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ offlineMapsEnabled: {
198
+ type: BooleanConstructor;
199
+ default: boolean;
200
+ };
201
+ fireMapperProEnabled: {
202
+ type: BooleanConstructor;
203
+ default: boolean;
204
+ };
205
+ arcGISAuth: {
206
+ type: import("mongoose").Schema<any> & {
207
+ _interface: import("../helpers").MongooseInterface<{
208
+ username: {
209
+ type: StringConstructor;
210
+ default: string;
211
+ };
212
+ encrypted: {
213
+ type: import("mongoose").Schema<any> & {
214
+ _interface: import("../helpers").MongooseInterface<{
215
+ iv: {
216
+ type: StringConstructor;
217
+ default: string;
218
+ };
219
+ encryptedData: {
220
+ type: StringConstructor;
221
+ default: string;
222
+ };
223
+ }>;
224
+ _methods: unknown;
225
+ };
226
+ default: null;
227
+ };
228
+ }>;
229
+ _methods: unknown;
230
+ };
231
+ default: null;
232
+ };
233
+ arcGISAuthError: {
234
+ type: import("mongoose").Schema<any> & {
235
+ _interface: import("../helpers").MongooseInterface<{
236
+ code: {
237
+ type: NumberConstructor;
238
+ default: number;
239
+ };
240
+ error: {
241
+ type: StringConstructor;
242
+ default: string;
243
+ };
244
+ error_description: {
245
+ type: StringConstructor;
246
+ default: string;
247
+ };
248
+ message: {
249
+ type: StringConstructor;
250
+ default: string;
251
+ };
252
+ }>;
253
+ _methods: unknown;
254
+ };
255
+ default: null;
256
+ };
257
+ offDutyEnabled: {
258
+ type: BooleanConstructor;
259
+ default: boolean;
260
+ };
261
+ webMapSettings: {
262
+ defaultZoomLevel: {
263
+ type: NumberConstructor;
264
+ };
265
+ defaultCenter: {
266
+ type: NumberConstructor[];
267
+ default: never[];
268
+ };
269
+ defaultMap: {
270
+ type: StringConstructor;
271
+ };
272
+ };
273
+ locationToCAD: {
274
+ type: BooleanConstructor;
275
+ default: boolean;
276
+ };
277
+ logOffEnabled: {
278
+ type: BooleanConstructor;
279
+ default: boolean;
280
+ };
281
+ }>;
282
+ _methods: unknown;
283
+ };
3
284
  export declare function UserModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
4
285
  nick: string;
5
286
  email: string;
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/models/user.ts"],"names":[],"mappings":";AACA,OAAO,EAKL,cAAc,EAEd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACZ,MAAM,YAAY,CAAC;AAKpB,wBAAsB,UAAU,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiPxD;AAED,MAAM,WAAW,IAAK,SAAQ,8BAA8B,CAAC,OAAO,UAAU,CAAC;CAAI;AACnF,MAAM,WAAW,SAAU,SAAQ,+BAA+B,CAAC,IAAI,CAAC;CAAI;;AAC5E,wBAAkF"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/models/user.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAKL,cAAc,EAEd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACZ,MAAM,YAAY,CAAC;AAKpB,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiPlD;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGxD;AAED,MAAM,WAAW,IAAK,SAAQ,8BAA8B,CAAC,OAAO,UAAU,CAAC;CAAI;AACnF,MAAM,WAAW,SAAU,SAAQ,+BAA+B,CAAC,IAAI,CAAC;CAAI;;AAC5E,wBAAkF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "5.17.39",
3
+ "version": "5.18.0",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "test": "gulp",
@@ -9,7 +9,7 @@ import {
9
9
  ReplaceModelReturnType,
10
10
  } from "../helpers";
11
11
 
12
- export async function AgencyModule(mongoose: MongooseModule) {
12
+ export function AgencySchema(mongoose: MongooseModule) {
13
13
  const { Schema, Types } = mongoose;
14
14
 
15
15
  const CrossStaffedUnit = createSchema(Schema, {
@@ -109,6 +109,11 @@ export async function AgencyModule(mongoose: MongooseModule) {
109
109
  });
110
110
  modelSchema.set("autoIndex", false);
111
111
 
112
+ return modelSchema;
113
+ }
114
+
115
+ export async function AgencyModule(mongoose: MongooseModule) {
116
+ const modelSchema = AgencySchema(mongoose);
112
117
  return createModel(mongoose, "Agency", modelSchema);
113
118
  }
114
119
 
@@ -34,6 +34,24 @@ export async function ArcGISGroupModule(mongoose: MongooseModule) {
34
34
  id: false,
35
35
  });
36
36
 
37
+ const ArcGISUserInvitation = createSchema(Schema, {
38
+ username: {
39
+ type: String,
40
+ default: "",
41
+ },
42
+ atDate: {
43
+ type: Date,
44
+ default: currentDate,
45
+ },
46
+ invitedBy: {
47
+ type: String,
48
+ default: "",
49
+ },
50
+ }, {
51
+ _id: false,
52
+ id: false,
53
+ });
54
+
37
55
  const ArcGISDepartmentUser = createSchema(Schema, {
38
56
  // ArcGIS username
39
57
  username: {
@@ -127,6 +145,10 @@ export async function ArcGISGroupModule(mongoose: MongooseModule) {
127
145
  type: [String],
128
146
  default: [],
129
147
  },
148
+ invited: {
149
+ type: [ArcGISUserInvitation],
150
+ default: [],
151
+ },
130
152
 
131
153
  // departments that are linked via arcGISGroupId (linked by a super admin)
132
154
  linkedDepartments: {