@sonoransoftware/sonoran.js 1.0.18 → 1.0.20

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 (89) hide show
  1. package/.eslintrc.js +10 -10
  2. package/.github/workflows/npm-publish.yml +34 -34
  3. package/.prettierrc.js +6 -6
  4. package/dist/builders/cad/DispatchCall.d.ts +92 -92
  5. package/dist/builders/cad/DispatchCall.js +144 -144
  6. package/dist/builders/cad/index.d.ts +1 -1
  7. package/dist/builders/cad/index.js +17 -17
  8. package/dist/builders/index.d.ts +1 -1
  9. package/dist/builders/index.js +19 -19
  10. package/dist/constants.d.ts +230 -230
  11. package/dist/constants.js +27 -27
  12. package/dist/errors/LibraryErrors.d.ts +19 -19
  13. package/dist/errors/LibraryErrors.js +47 -47
  14. package/dist/errors/Messages.d.ts +1 -1
  15. package/dist/errors/Messages.js +8 -8
  16. package/dist/errors/index.d.ts +2 -2
  17. package/dist/errors/index.js +18 -18
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.js +24 -24
  20. package/dist/instance/Instance.d.ts +24 -24
  21. package/dist/instance/Instance.js +139 -139
  22. package/dist/instance/instance.types.d.ts +17 -17
  23. package/dist/instance/instance.types.js +2 -2
  24. package/dist/libs/rest/src/index.d.ts +6 -6
  25. package/dist/libs/rest/src/index.js +22 -22
  26. package/dist/libs/rest/src/lib/REST.d.ts +101 -101
  27. package/dist/libs/rest/src/lib/REST.js +136 -129
  28. package/dist/libs/rest/src/lib/RequestManager.d.ts +59 -59
  29. package/dist/libs/rest/src/lib/RequestManager.js +191 -191
  30. package/dist/libs/rest/src/lib/errors/APIError.d.ts +9 -9
  31. package/dist/libs/rest/src/lib/errors/APIError.js +17 -17
  32. package/dist/libs/rest/src/lib/errors/HTTPError.d.ts +17 -17
  33. package/dist/libs/rest/src/lib/errors/HTTPError.js +23 -23
  34. package/dist/libs/rest/src/lib/errors/RateLimitError.d.ts +13 -13
  35. package/dist/libs/rest/src/lib/errors/RateLimitError.js +19 -19
  36. package/dist/libs/rest/src/lib/errors/index.d.ts +4 -4
  37. package/dist/libs/rest/src/lib/errors/index.js +20 -20
  38. package/dist/libs/rest/src/lib/handlers/IHandler.d.ts +7 -7
  39. package/dist/libs/rest/src/lib/handlers/IHandler.js +2 -2
  40. package/dist/libs/rest/src/lib/handlers/SequentialHandler.d.ts +45 -45
  41. package/dist/libs/rest/src/lib/handlers/SequentialHandler.js +143 -143
  42. package/dist/libs/rest/src/lib/utils/constants.d.ts +533 -527
  43. package/dist/libs/rest/src/lib/utils/constants.js +463 -443
  44. package/dist/libs/rest/src/lib/utils/utils.d.ts +1 -1
  45. package/dist/libs/rest/src/lib/utils/utils.js +22 -22
  46. package/dist/managers/BaseManager.d.ts +14 -14
  47. package/dist/managers/BaseManager.js +18 -18
  48. package/dist/managers/CADActiveUnitsManager.d.ts +15 -15
  49. package/dist/managers/CADActiveUnitsManager.js +38 -38
  50. package/dist/managers/CADManager.d.ts +29 -29
  51. package/dist/managers/CADManager.js +86 -86
  52. package/dist/managers/CADServerManager.d.ts +8 -8
  53. package/dist/managers/CADServerManager.js +28 -28
  54. package/dist/managers/CMSManager.d.ts +101 -101
  55. package/dist/managers/CMSManager.js +266 -266
  56. package/dist/managers/CMSServerManager.d.ts +8 -8
  57. package/dist/managers/CMSServerManager.js +34 -34
  58. package/dist/managers/CacheManager.d.ts +10 -10
  59. package/dist/managers/CacheManager.js +36 -36
  60. package/dist/managers/DataManager.d.ts +31 -31
  61. package/dist/managers/DataManager.js +58 -58
  62. package/dist/structures/Base.d.ts +9 -9
  63. package/dist/structures/Base.js +24 -24
  64. package/dist/structures/CADActiveUnit.d.ts +47 -47
  65. package/dist/structures/CADActiveUnit.js +66 -66
  66. package/dist/structures/CADServer.d.ts +26 -26
  67. package/dist/structures/CADServer.js +15 -15
  68. package/dist/structures/CMSServer.d.ts +18 -18
  69. package/dist/structures/CMSServer.js +12 -12
  70. package/dist/utils/index.d.ts +1 -1
  71. package/dist/utils/index.js +17 -17
  72. package/dist/utils/utils.d.ts +13 -13
  73. package/dist/utils/utils.js +79 -79
  74. package/docs/CAD-Methods-and-Usage.md +58 -58
  75. package/docs/CMS-Methods-and-Usage.md +211 -211
  76. package/docs/REST-Methods-and-Usage.md +46 -46
  77. package/package.json +48 -48
  78. package/readme.md +53 -53
  79. package/src/constants.ts +248 -248
  80. package/src/instance/Instance.ts +121 -121
  81. package/src/instance/instance.types.ts +17 -17
  82. package/src/libs/rest/src/lib/REST.ts +241 -235
  83. package/src/libs/rest/src/lib/RequestManager.ts +260 -260
  84. package/src/libs/rest/src/lib/handlers/SequentialHandler.ts +160 -160
  85. package/src/libs/rest/src/lib/utils/constants.ts +1012 -985
  86. package/src/managers/CADManager.ts +63 -63
  87. package/src/managers/CMSManager.ts +226 -226
  88. package/src/managers/CMSServerManager.ts +32 -32
  89. package/tsconfig.json +71 -71
@@ -1,443 +1,463 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CADDispatchStatusEnums = exports.CADDispatchOriginEnums = exports.CADModifyIdentifierActionEnums = exports.CADLookupByIntSearchTypeEnums = exports.CADRecordSectionCategoryEnums = exports.CADRecordTypeEnums = exports.AllAPITypes = exports.EventsCMSAPITypes = exports.ServersCMSAPITypes = exports.GeneralCMSAPITypes = exports.EmergencyCADAPITypes = exports.CivilianCADAPITypes = exports.GeneralCADAPITypes = exports.DefaultCMSRestOptions = exports.DefaultCADRestOptions = exports.DefaultUserAgent = void 0;
4
- const constants_1 = require("../../../../../constants");
5
- exports.DefaultUserAgent = 'Sonoran.js NPM Module';
6
- exports.DefaultCADRestOptions = {
7
- agent: {},
8
- api: 'https://api.sonorancad.com',
9
- headers: {},
10
- rejectOnRateLimit: true
11
- };
12
- exports.DefaultCMSRestOptions = {
13
- agent: {},
14
- api: 'https://api.sonorancms.com',
15
- headers: {},
16
- rejectOnRateLimit: true
17
- };
18
- exports.GeneralCADAPITypes = [
19
- {
20
- type: 'GET_SERVERS',
21
- path: 'general/get_servers',
22
- method: 'POST',
23
- minVersion: 2
24
- },
25
- {
26
- type: 'SET_SERVERS',
27
- path: 'general/set_servers',
28
- method: 'POST',
29
- minVersion: 3
30
- },
31
- {
32
- type: 'GET_VERSION',
33
- path: 'general/get_version',
34
- method: 'POST',
35
- minVersion: 0
36
- },
37
- {
38
- type: 'SET_PENAL_CODES',
39
- path: 'general/set_penal_codes',
40
- method: 'POST',
41
- minVersion: 2
42
- },
43
- {
44
- type: 'SET_API_ID',
45
- path: 'general/set_api_id',
46
- method: 'POST',
47
- minVersion: 2
48
- },
49
- {
50
- type: 'GET_TEMPLATES',
51
- path: 'general/get_templates',
52
- method: 'POST',
53
- minVersion: 2
54
- },
55
- {
56
- type: 'NEW_RECORD',
57
- path: 'general/new_record',
58
- method: 'POST',
59
- minVersion: 3
60
- },
61
- {
62
- type: 'EDIT_RECORD',
63
- path: 'general/edit_record',
64
- method: 'POST',
65
- minVersion: 3
66
- },
67
- {
68
- type: 'REMOVE_RECORD',
69
- path: 'general/remove_record',
70
- method: 'POST',
71
- minVersion: 3
72
- },
73
- {
74
- type: 'LOOKUP_INT',
75
- path: 'general/lookup_int',
76
- method: 'POST',
77
- minVersion: 3
78
- },
79
- {
80
- type: 'LOOKUP',
81
- path: 'general/lookup',
82
- method: 'POST',
83
- minVersion: 3
84
- },
85
- {
86
- type: 'GET_ACCOUNT',
87
- path: 'general/get_account',
88
- method: 'POST',
89
- minVersion: 3
90
- },
91
- {
92
- type: 'CHECK_APIID',
93
- path: 'general/check_apiid',
94
- method: 'POST',
95
- minVersion: 2
96
- },
97
- {
98
- type: 'APPLY_PERMISSION_KEY',
99
- path: 'general/apply_permission_key',
100
- method: 'POST',
101
- minVersion: 3
102
- },
103
- {
104
- type: 'SET_ACCOUNT_PERMISSIONS',
105
- path: 'general/set_account_permissions',
106
- method: 'POST',
107
- minVersion: 3
108
- },
109
- {
110
- type: 'BAN_USER',
111
- path: 'general/ban_user',
112
- method: 'POST',
113
- minVersion: 3
114
- },
115
- {
116
- type: 'VERIFY_SECRET',
117
- path: 'general/verify_secret',
118
- method: 'POST',
119
- minVersion: 2
120
- },
121
- {
122
- type: 'AUTH_STREETSIGNS',
123
- path: 'general/auth_streetsigns',
124
- method: 'POST',
125
- minVersion: 4
126
- },
127
- {
128
- type: 'SET_POSTALS',
129
- path: 'general/set_postals',
130
- method: 'POST',
131
- minVersion: 4
132
- },
133
- {
134
- type: 'SEND_PHOTO',
135
- path: 'general/send_photo',
136
- method: 'POST',
137
- minVersion: 4
138
- }
139
- ];
140
- exports.CivilianCADAPITypes = [
141
- {
142
- type: 'GET_CHARACTERS',
143
- path: 'civilian/get_characters',
144
- method: 'POST',
145
- minVersion: 2
146
- },
147
- {
148
- type: 'NEW_CHARACTER',
149
- path: 'civilian/new_character',
150
- method: 'POST',
151
- minVersion: 2
152
- },
153
- {
154
- type: 'EDIT_CHARACTER',
155
- path: 'civilian/edit_characters',
156
- method: 'POST',
157
- minVersion: 2
158
- },
159
- {
160
- type: 'REMOVE_CHARACTER',
161
- path: 'civilian/remove_character',
162
- method: 'POST',
163
- minVersion: 2
164
- }
165
- ];
166
- exports.EmergencyCADAPITypes = [
167
- {
168
- type: 'GET_IDENTIFIERS',
169
- path: 'emergency/get_identifiers',
170
- method: 'POST',
171
- minVersion: 3
172
- },
173
- {
174
- type: 'MODIFY_IDENTIFIER',
175
- path: 'emergency/modify_identifier',
176
- method: 'POST',
177
- minVersion: 4
178
- },
179
- {
180
- type: 'SET_IDENTIFIER',
181
- path: 'emergency/set_identifier',
182
- method: 'POST',
183
- minVersion: 3
184
- },
185
- {
186
- type: 'UNIT_PANIC',
187
- path: 'emergency/unit_panic',
188
- method: 'POST',
189
- minVersion: 2
190
- },
191
- {
192
- type: 'UNIT_STATUS',
193
- path: 'emergency/unit_status',
194
- method: 'POST',
195
- minVersion: 2
196
- },
197
- {
198
- type: 'GET_BLIPS',
199
- path: 'emergency/get_blips',
200
- method: 'POST',
201
- minVersion: 4
202
- },
203
- {
204
- type: 'ADD_BLIP',
205
- path: 'emergency/add_blip',
206
- method: 'POST',
207
- minVersion: 4
208
- },
209
- {
210
- type: 'MODIFY_BLIP',
211
- path: 'emergency/modify_blip',
212
- method: 'POST',
213
- minVersion: 4
214
- },
215
- {
216
- type: 'REMOVE_BLIP',
217
- path: 'emergency/remove_blip',
218
- method: 'POST',
219
- minVersion: 4
220
- },
221
- {
222
- type: '911_CALL',
223
- path: 'emergency/911_call',
224
- method: 'POST',
225
- minVersion: 2
226
- },
227
- {
228
- type: 'REMOVE_911',
229
- path: 'emergency/remove_911',
230
- method: 'POST',
231
- minVersion: 2
232
- },
233
- {
234
- type: 'GET_CALLS',
235
- path: 'emergency/get_calls',
236
- method: 'POST',
237
- minVersion: 3
238
- },
239
- {
240
- type: 'GET_ACTIVE_UNITS',
241
- path: 'emergency/get_active_units',
242
- method: 'POST',
243
- minVersion: 3
244
- },
245
- {
246
- type: 'KICK_UNIT',
247
- path: 'emergency/kick_unit',
248
- method: 'POST',
249
- minVersion: 2
250
- },
251
- {
252
- type: 'NEW_DISPATCH',
253
- path: 'emergency/new_dispatch',
254
- method: 'POST',
255
- minVersion: 3
256
- },
257
- {
258
- type: 'ATTACH_UNIT',
259
- path: 'emergency/attach_unit',
260
- method: 'POST',
261
- minVersion: 3
262
- },
263
- {
264
- type: 'DETACH_UNIT',
265
- path: 'emergency/detach_unit',
266
- method: 'POST',
267
- minVersion: 3
268
- },
269
- {
270
- type: 'SET_CALL_POSTAL',
271
- path: 'emergency/set_call_postal',
272
- method: 'POST',
273
- minVersion: 3
274
- },
275
- {
276
- type: 'SET_CALL_PRIMARY',
277
- path: 'emergency/set_call_primary',
278
- method: 'POST',
279
- minVersion: 3
280
- },
281
- {
282
- type: 'ADD_CALL_NOTE',
283
- path: 'emergency/add_call_note',
284
- method: 'POST',
285
- minVersion: 3
286
- },
287
- {
288
- type: 'CLOSE_CALL',
289
- path: 'emergency/close_call',
290
- method: 'POST',
291
- minVersion: 2
292
- },
293
- {
294
- type: 'UNIT_LOCATION',
295
- path: 'emergency/unit_location',
296
- method: 'POST',
297
- minVersion: 2
298
- },
299
- {
300
- type: 'SET_STREETSIGN_CONFIG',
301
- path: 'emergency/set_streetsign_config',
302
- method: 'POST',
303
- minVersion: 4
304
- },
305
- {
306
- type: 'UPDATE_STREETSIGN',
307
- path: 'emergency/update_streetsign',
308
- method: 'POST',
309
- minVersion: 4
310
- }
311
- ];
312
- exports.GeneralCMSAPITypes = [
313
- {
314
- type: 'GET_COM_ACCOUNT',
315
- path: 'general/get_com_account',
316
- method: 'POST',
317
- minVersion: 3
318
- },
319
- {
320
- type: 'GET_ACCOUNT_RANKS',
321
- path: 'general/get_account_ranks',
322
- method: 'POST',
323
- minVersion: 2,
324
- },
325
- {
326
- type: 'SET_ACCOUNT_RANKS',
327
- path: 'general/set_account_ranks',
328
- method: 'POST',
329
- minVersion: 2,
330
- },
331
- {
332
- type: 'GET_DEPARTMENTS',
333
- path: 'general/get_departments',
334
- method: 'POST',
335
- minVersion: 2,
336
- },
337
- {
338
- type: 'GET_SUB_VERSION',
339
- path: 'general/get_sub_version',
340
- method: 'POST',
341
- minVersion: 0
342
- },
343
- {
344
- type: 'CHECK_COM_APIID',
345
- path: 'general/check_com_apiid',
346
- method: 'POST',
347
- minVersion: 2
348
- },
349
- {
350
- type: 'CLOCK_IN_OUT',
351
- path: 'general/clock_in_out',
352
- method: 'POST',
353
- minVersion: 3
354
- }
355
- ];
356
- exports.ServersCMSAPITypes = [
357
- {
358
- type: 'GET_GAME_SERVERS',
359
- path: 'servers/get_game_servers',
360
- method: 'POST',
361
- minVersion: 2
362
- },
363
- {
364
- type: 'VERIFY_WHITELIST',
365
- path: 'servers/verify_whitelist',
366
- method: 'POST',
367
- minVersion: 3
368
- },
369
- {
370
- type: 'FULL_WHITELIST',
371
- path: 'servers/full_whitelist',
372
- method: 'POST',
373
- minVersion: 3
374
- }
375
- ];
376
- exports.EventsCMSAPITypes = [
377
- {
378
- type: 'RSVP',
379
- path: 'events/rsvp',
380
- method: 'POST',
381
- minVersion: 3
382
- }
383
- ];
384
- function formatForAll(array, product) {
385
- return array.map((val) => {
386
- return {
387
- ...val,
388
- product
389
- };
390
- });
391
- }
392
- exports.AllAPITypes = [...formatForAll(exports.GeneralCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.CivilianCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.EmergencyCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.GeneralCMSAPITypes, constants_1.productEnums.CMS), ...formatForAll(exports.ServersCMSAPITypes, constants_1.productEnums.CMS), ...formatForAll(exports.EventsCMSAPITypes, constants_1.productEnums.CMS)];
393
- var CADRecordTypeEnums;
394
- (function (CADRecordTypeEnums) {
395
- CADRecordTypeEnums[CADRecordTypeEnums["Warrant"] = 2] = "Warrant";
396
- CADRecordTypeEnums[CADRecordTypeEnums["Bolo"] = 3] = "Bolo";
397
- CADRecordTypeEnums[CADRecordTypeEnums["License"] = 4] = "License";
398
- CADRecordTypeEnums[CADRecordTypeEnums["VehicleRegistration"] = 5] = "VehicleRegistration";
399
- CADRecordTypeEnums[CADRecordTypeEnums["Character"] = 7] = "Character";
400
- CADRecordTypeEnums[CADRecordTypeEnums["PoliceRecord"] = 8] = "PoliceRecord";
401
- CADRecordTypeEnums[CADRecordTypeEnums["PoliceReport"] = 9] = "PoliceReport";
402
- CADRecordTypeEnums[CADRecordTypeEnums["MedicalRecord"] = 10] = "MedicalRecord";
403
- CADRecordTypeEnums[CADRecordTypeEnums["MedicalReport"] = 11] = "MedicalReport";
404
- CADRecordTypeEnums[CADRecordTypeEnums["FireRecord"] = 12] = "FireRecord";
405
- CADRecordTypeEnums[CADRecordTypeEnums["FireReport"] = 13] = "FireReport";
406
- CADRecordTypeEnums[CADRecordTypeEnums["DMVRecord"] = 14] = "DMVRecord";
407
- CADRecordTypeEnums[CADRecordTypeEnums["LawRecord"] = 15] = "LawRecord";
408
- CADRecordTypeEnums[CADRecordTypeEnums["LawReport"] = 16] = "LawReport";
409
- })(CADRecordTypeEnums = exports.CADRecordTypeEnums || (exports.CADRecordTypeEnums = {}));
410
- var CADRecordSectionCategoryEnums;
411
- (function (CADRecordSectionCategoryEnums) {
412
- CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Custom"] = 0] = "Custom";
413
- CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Flags"] = 1] = "Flags";
414
- CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Speed"] = 5] = "Speed";
415
- CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Charges"] = 6] = "Charges";
416
- CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["LinkedRecords"] = 9] = "LinkedRecords";
417
- })(CADRecordSectionCategoryEnums = exports.CADRecordSectionCategoryEnums || (exports.CADRecordSectionCategoryEnums = {}));
418
- var CADLookupByIntSearchTypeEnums;
419
- (function (CADLookupByIntSearchTypeEnums) {
420
- CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["IDENTIFIER"] = 0] = "IDENTIFIER";
421
- CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["SUPERVISOR_STATUS"] = 1] = "SUPERVISOR_STATUS";
422
- CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["ACTIVE_STATUS"] = 2] = "ACTIVE_STATUS";
423
- CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["NUMBER"] = 3] = "NUMBER";
424
- })(CADLookupByIntSearchTypeEnums = exports.CADLookupByIntSearchTypeEnums || (exports.CADLookupByIntSearchTypeEnums = {}));
425
- var CADModifyIdentifierActionEnums;
426
- (function (CADModifyIdentifierActionEnums) {
427
- CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["ADD"] = 0] = "ADD";
428
- CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["EDIT"] = 1] = "EDIT";
429
- CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["REMOVE"] = 2] = "REMOVE";
430
- })(CADModifyIdentifierActionEnums = exports.CADModifyIdentifierActionEnums || (exports.CADModifyIdentifierActionEnums = {}));
431
- var CADDispatchOriginEnums;
432
- (function (CADDispatchOriginEnums) {
433
- CADDispatchOriginEnums[CADDispatchOriginEnums["Caller"] = 0] = "Caller";
434
- CADDispatchOriginEnums[CADDispatchOriginEnums["RadioDispatch"] = 1] = "RadioDispatch";
435
- CADDispatchOriginEnums[CADDispatchOriginEnums["Observed"] = 2] = "Observed";
436
- CADDispatchOriginEnums[CADDispatchOriginEnums["WalkUp"] = 3] = "WalkUp";
437
- })(CADDispatchOriginEnums = exports.CADDispatchOriginEnums || (exports.CADDispatchOriginEnums = {}));
438
- var CADDispatchStatusEnums;
439
- (function (CADDispatchStatusEnums) {
440
- CADDispatchStatusEnums[CADDispatchStatusEnums["Pending"] = 0] = "Pending";
441
- CADDispatchStatusEnums[CADDispatchStatusEnums["Active"] = 1] = "Active";
442
- CADDispatchStatusEnums[CADDispatchStatusEnums["Closed"] = 2] = "Closed";
443
- })(CADDispatchStatusEnums = exports.CADDispatchStatusEnums || (exports.CADDispatchStatusEnums = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CADDispatchStatusEnums = exports.CADDispatchOriginEnums = exports.CADModifyIdentifierActionEnums = exports.CADLookupByIntSearchTypeEnums = exports.CADRecordSectionCategoryEnums = exports.CADRecordTypeEnums = exports.AllAPITypes = exports.FormsCMSAPITypes = exports.EventsCMSAPITypes = exports.ServersCMSAPITypes = exports.GeneralCMSAPITypes = exports.EmergencyCADAPITypes = exports.CivilianCADAPITypes = exports.GeneralCADAPITypes = exports.DefaultCMSRestOptions = exports.DefaultCADRestOptions = exports.DefaultUserAgent = void 0;
4
+ const constants_1 = require("../../../../../constants");
5
+ exports.DefaultUserAgent = 'Sonoran.js NPM Module';
6
+ exports.DefaultCADRestOptions = {
7
+ agent: {},
8
+ api: 'https://api.sonorancad.com',
9
+ headers: {},
10
+ rejectOnRateLimit: true
11
+ };
12
+ exports.DefaultCMSRestOptions = {
13
+ agent: {},
14
+ api: 'https://api.sonorancms.com',
15
+ headers: {},
16
+ rejectOnRateLimit: true
17
+ };
18
+ exports.GeneralCADAPITypes = [
19
+ {
20
+ type: 'GET_SERVERS',
21
+ path: 'general/get_servers',
22
+ method: 'POST',
23
+ minVersion: 2
24
+ },
25
+ {
26
+ type: 'SET_SERVERS',
27
+ path: 'general/set_servers',
28
+ method: 'POST',
29
+ minVersion: 3
30
+ },
31
+ {
32
+ type: 'GET_VERSION',
33
+ path: 'general/get_version',
34
+ method: 'POST',
35
+ minVersion: 0
36
+ },
37
+ {
38
+ type: 'SET_PENAL_CODES',
39
+ path: 'general/set_penal_codes',
40
+ method: 'POST',
41
+ minVersion: 2
42
+ },
43
+ {
44
+ type: 'SET_API_ID',
45
+ path: 'general/set_api_id',
46
+ method: 'POST',
47
+ minVersion: 2
48
+ },
49
+ {
50
+ type: 'GET_TEMPLATES',
51
+ path: 'general/get_templates',
52
+ method: 'POST',
53
+ minVersion: 2
54
+ },
55
+ {
56
+ type: 'NEW_RECORD',
57
+ path: 'general/new_record',
58
+ method: 'POST',
59
+ minVersion: 3
60
+ },
61
+ {
62
+ type: 'EDIT_RECORD',
63
+ path: 'general/edit_record',
64
+ method: 'POST',
65
+ minVersion: 3
66
+ },
67
+ {
68
+ type: 'REMOVE_RECORD',
69
+ path: 'general/remove_record',
70
+ method: 'POST',
71
+ minVersion: 3
72
+ },
73
+ {
74
+ type: 'LOOKUP_INT',
75
+ path: 'general/lookup_int',
76
+ method: 'POST',
77
+ minVersion: 3
78
+ },
79
+ {
80
+ type: 'LOOKUP',
81
+ path: 'general/lookup',
82
+ method: 'POST',
83
+ minVersion: 3
84
+ },
85
+ {
86
+ type: 'GET_ACCOUNT',
87
+ path: 'general/get_account',
88
+ method: 'POST',
89
+ minVersion: 3
90
+ },
91
+ {
92
+ type: 'CHECK_APIID',
93
+ path: 'general/check_apiid',
94
+ method: 'POST',
95
+ minVersion: 2
96
+ },
97
+ {
98
+ type: 'APPLY_PERMISSION_KEY',
99
+ path: 'general/apply_permission_key',
100
+ method: 'POST',
101
+ minVersion: 3
102
+ },
103
+ {
104
+ type: 'SET_ACCOUNT_PERMISSIONS',
105
+ path: 'general/set_account_permissions',
106
+ method: 'POST',
107
+ minVersion: 3
108
+ },
109
+ {
110
+ type: 'BAN_USER',
111
+ path: 'general/ban_user',
112
+ method: 'POST',
113
+ minVersion: 3
114
+ },
115
+ {
116
+ type: 'VERIFY_SECRET',
117
+ path: 'general/verify_secret',
118
+ method: 'POST',
119
+ minVersion: 2
120
+ },
121
+ {
122
+ type: 'AUTH_STREETSIGNS',
123
+ path: 'general/auth_streetsigns',
124
+ method: 'POST',
125
+ minVersion: 4
126
+ },
127
+ {
128
+ type: 'SET_POSTALS',
129
+ path: 'general/set_postals',
130
+ method: 'POST',
131
+ minVersion: 4
132
+ },
133
+ {
134
+ type: 'SEND_PHOTO',
135
+ path: 'general/send_photo',
136
+ method: 'POST',
137
+ minVersion: 4
138
+ }
139
+ ];
140
+ exports.CivilianCADAPITypes = [
141
+ {
142
+ type: 'GET_CHARACTERS',
143
+ path: 'civilian/get_characters',
144
+ method: 'POST',
145
+ minVersion: 2
146
+ },
147
+ {
148
+ type: 'NEW_CHARACTER',
149
+ path: 'civilian/new_character',
150
+ method: 'POST',
151
+ minVersion: 2
152
+ },
153
+ {
154
+ type: 'EDIT_CHARACTER',
155
+ path: 'civilian/edit_characters',
156
+ method: 'POST',
157
+ minVersion: 2
158
+ },
159
+ {
160
+ type: 'REMOVE_CHARACTER',
161
+ path: 'civilian/remove_character',
162
+ method: 'POST',
163
+ minVersion: 2
164
+ }
165
+ ];
166
+ exports.EmergencyCADAPITypes = [
167
+ {
168
+ type: 'GET_IDENTIFIERS',
169
+ path: 'emergency/get_identifiers',
170
+ method: 'POST',
171
+ minVersion: 3
172
+ },
173
+ {
174
+ type: 'MODIFY_IDENTIFIER',
175
+ path: 'emergency/modify_identifier',
176
+ method: 'POST',
177
+ minVersion: 4
178
+ },
179
+ {
180
+ type: 'SET_IDENTIFIER',
181
+ path: 'emergency/set_identifier',
182
+ method: 'POST',
183
+ minVersion: 3
184
+ },
185
+ {
186
+ type: 'UNIT_PANIC',
187
+ path: 'emergency/unit_panic',
188
+ method: 'POST',
189
+ minVersion: 2
190
+ },
191
+ {
192
+ type: 'UNIT_STATUS',
193
+ path: 'emergency/unit_status',
194
+ method: 'POST',
195
+ minVersion: 2
196
+ },
197
+ {
198
+ type: 'GET_BLIPS',
199
+ path: 'emergency/get_blips',
200
+ method: 'POST',
201
+ minVersion: 4
202
+ },
203
+ {
204
+ type: 'ADD_BLIP',
205
+ path: 'emergency/add_blip',
206
+ method: 'POST',
207
+ minVersion: 4
208
+ },
209
+ {
210
+ type: 'MODIFY_BLIP',
211
+ path: 'emergency/modify_blip',
212
+ method: 'POST',
213
+ minVersion: 4
214
+ },
215
+ {
216
+ type: 'REMOVE_BLIP',
217
+ path: 'emergency/remove_blip',
218
+ method: 'POST',
219
+ minVersion: 4
220
+ },
221
+ {
222
+ type: '911_CALL',
223
+ path: 'emergency/911_call',
224
+ method: 'POST',
225
+ minVersion: 2
226
+ },
227
+ {
228
+ type: 'REMOVE_911',
229
+ path: 'emergency/remove_911',
230
+ method: 'POST',
231
+ minVersion: 2
232
+ },
233
+ {
234
+ type: 'GET_CALLS',
235
+ path: 'emergency/get_calls',
236
+ method: 'POST',
237
+ minVersion: 3
238
+ },
239
+ {
240
+ type: 'GET_ACTIVE_UNITS',
241
+ path: 'emergency/get_active_units',
242
+ method: 'POST',
243
+ minVersion: 3
244
+ },
245
+ {
246
+ type: 'KICK_UNIT',
247
+ path: 'emergency/kick_unit',
248
+ method: 'POST',
249
+ minVersion: 2
250
+ },
251
+ {
252
+ type: 'NEW_DISPATCH',
253
+ path: 'emergency/new_dispatch',
254
+ method: 'POST',
255
+ minVersion: 3
256
+ },
257
+ {
258
+ type: 'ATTACH_UNIT',
259
+ path: 'emergency/attach_unit',
260
+ method: 'POST',
261
+ minVersion: 3
262
+ },
263
+ {
264
+ type: 'DETACH_UNIT',
265
+ path: 'emergency/detach_unit',
266
+ method: 'POST',
267
+ minVersion: 3
268
+ },
269
+ {
270
+ type: 'SET_CALL_POSTAL',
271
+ path: 'emergency/set_call_postal',
272
+ method: 'POST',
273
+ minVersion: 3
274
+ },
275
+ {
276
+ type: 'SET_CALL_PRIMARY',
277
+ path: 'emergency/set_call_primary',
278
+ method: 'POST',
279
+ minVersion: 3
280
+ },
281
+ {
282
+ type: 'ADD_CALL_NOTE',
283
+ path: 'emergency/add_call_note',
284
+ method: 'POST',
285
+ minVersion: 3
286
+ },
287
+ {
288
+ type: 'CLOSE_CALL',
289
+ path: 'emergency/close_call',
290
+ method: 'POST',
291
+ minVersion: 2
292
+ },
293
+ {
294
+ type: 'UNIT_LOCATION',
295
+ path: 'emergency/unit_location',
296
+ method: 'POST',
297
+ minVersion: 2
298
+ },
299
+ {
300
+ type: 'SET_STREETSIGN_CONFIG',
301
+ path: 'emergency/set_streetsign_config',
302
+ method: 'POST',
303
+ minVersion: 4
304
+ },
305
+ {
306
+ type: 'UPDATE_STREETSIGN',
307
+ path: 'emergency/update_streetsign',
308
+ method: 'POST',
309
+ minVersion: 4
310
+ }
311
+ ];
312
+ exports.GeneralCMSAPITypes = [
313
+ {
314
+ type: 'GET_COM_ACCOUNT',
315
+ path: 'general/get_com_account',
316
+ method: 'POST',
317
+ minVersion: 3
318
+ },
319
+ {
320
+ type: 'GET_ACCOUNT_RANKS',
321
+ path: 'general/get_account_ranks',
322
+ method: 'POST',
323
+ minVersion: 2,
324
+ },
325
+ {
326
+ type: 'SET_ACCOUNT_RANKS',
327
+ path: 'general/set_account_ranks',
328
+ method: 'POST',
329
+ minVersion: 2,
330
+ },
331
+ {
332
+ type: 'GET_DEPARTMENTS',
333
+ path: 'general/get_departments',
334
+ method: 'POST',
335
+ minVersion: 2,
336
+ },
337
+ {
338
+ type: 'GET_SUB_VERSION',
339
+ path: 'general/get_sub_version',
340
+ method: 'POST',
341
+ minVersion: 0
342
+ },
343
+ {
344
+ type: 'CHECK_COM_APIID',
345
+ path: 'general/check_com_apiid',
346
+ method: 'POST',
347
+ minVersion: 2
348
+ },
349
+ {
350
+ type: 'CLOCK_IN_OUT',
351
+ path: 'general/clock_in_out',
352
+ method: 'POST',
353
+ minVersion: 3
354
+ },
355
+ {
356
+ type: 'KICK_ACCOUNT',
357
+ path: 'general/kick_account',
358
+ method: 'POST',
359
+ minVersion: 3
360
+ },
361
+ {
362
+ type: 'BAN_ACCOUNT',
363
+ path: 'general/ban_account',
364
+ method: 'POST',
365
+ minVersion: 3
366
+ }
367
+ ];
368
+ exports.ServersCMSAPITypes = [
369
+ {
370
+ type: 'GET_GAME_SERVERS',
371
+ path: 'servers/get_game_servers',
372
+ method: 'POST',
373
+ minVersion: 2
374
+ },
375
+ {
376
+ type: 'VERIFY_WHITELIST',
377
+ path: 'servers/verify_whitelist',
378
+ method: 'POST',
379
+ minVersion: 3
380
+ },
381
+ {
382
+ type: 'FULL_WHITELIST',
383
+ path: 'servers/full_whitelist',
384
+ method: 'POST',
385
+ minVersion: 3
386
+ }
387
+ ];
388
+ exports.EventsCMSAPITypes = [
389
+ {
390
+ type: 'RSVP',
391
+ path: 'events/rsvp',
392
+ method: 'POST',
393
+ minVersion: 3
394
+ }
395
+ ];
396
+ exports.FormsCMSAPITypes = [
397
+ {
398
+ type: 'CHANGE_FORM_STAGE',
399
+ path: '/forms/change/stage',
400
+ method: 'POST',
401
+ minVersion: 0
402
+ }
403
+ ];
404
+ function formatForAll(array, product) {
405
+ return array.map((val) => {
406
+ return {
407
+ ...val,
408
+ product
409
+ };
410
+ });
411
+ }
412
+ exports.AllAPITypes = [...formatForAll(exports.GeneralCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.CivilianCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.EmergencyCADAPITypes, constants_1.productEnums.CAD), ...formatForAll(exports.GeneralCMSAPITypes, constants_1.productEnums.CMS), ...formatForAll(exports.ServersCMSAPITypes, constants_1.productEnums.CMS), ...formatForAll(exports.EventsCMSAPITypes, constants_1.productEnums.CMS)];
413
+ var CADRecordTypeEnums;
414
+ (function (CADRecordTypeEnums) {
415
+ CADRecordTypeEnums[CADRecordTypeEnums["Warrant"] = 2] = "Warrant";
416
+ CADRecordTypeEnums[CADRecordTypeEnums["Bolo"] = 3] = "Bolo";
417
+ CADRecordTypeEnums[CADRecordTypeEnums["License"] = 4] = "License";
418
+ CADRecordTypeEnums[CADRecordTypeEnums["VehicleRegistration"] = 5] = "VehicleRegistration";
419
+ CADRecordTypeEnums[CADRecordTypeEnums["Character"] = 7] = "Character";
420
+ CADRecordTypeEnums[CADRecordTypeEnums["PoliceRecord"] = 8] = "PoliceRecord";
421
+ CADRecordTypeEnums[CADRecordTypeEnums["PoliceReport"] = 9] = "PoliceReport";
422
+ CADRecordTypeEnums[CADRecordTypeEnums["MedicalRecord"] = 10] = "MedicalRecord";
423
+ CADRecordTypeEnums[CADRecordTypeEnums["MedicalReport"] = 11] = "MedicalReport";
424
+ CADRecordTypeEnums[CADRecordTypeEnums["FireRecord"] = 12] = "FireRecord";
425
+ CADRecordTypeEnums[CADRecordTypeEnums["FireReport"] = 13] = "FireReport";
426
+ CADRecordTypeEnums[CADRecordTypeEnums["DMVRecord"] = 14] = "DMVRecord";
427
+ CADRecordTypeEnums[CADRecordTypeEnums["LawRecord"] = 15] = "LawRecord";
428
+ CADRecordTypeEnums[CADRecordTypeEnums["LawReport"] = 16] = "LawReport";
429
+ })(CADRecordTypeEnums = exports.CADRecordTypeEnums || (exports.CADRecordTypeEnums = {}));
430
+ var CADRecordSectionCategoryEnums;
431
+ (function (CADRecordSectionCategoryEnums) {
432
+ CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Custom"] = 0] = "Custom";
433
+ CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Flags"] = 1] = "Flags";
434
+ CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Speed"] = 5] = "Speed";
435
+ CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["Charges"] = 6] = "Charges";
436
+ CADRecordSectionCategoryEnums[CADRecordSectionCategoryEnums["LinkedRecords"] = 9] = "LinkedRecords";
437
+ })(CADRecordSectionCategoryEnums = exports.CADRecordSectionCategoryEnums || (exports.CADRecordSectionCategoryEnums = {}));
438
+ var CADLookupByIntSearchTypeEnums;
439
+ (function (CADLookupByIntSearchTypeEnums) {
440
+ CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["IDENTIFIER"] = 0] = "IDENTIFIER";
441
+ CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["SUPERVISOR_STATUS"] = 1] = "SUPERVISOR_STATUS";
442
+ CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["ACTIVE_STATUS"] = 2] = "ACTIVE_STATUS";
443
+ CADLookupByIntSearchTypeEnums[CADLookupByIntSearchTypeEnums["NUMBER"] = 3] = "NUMBER";
444
+ })(CADLookupByIntSearchTypeEnums = exports.CADLookupByIntSearchTypeEnums || (exports.CADLookupByIntSearchTypeEnums = {}));
445
+ var CADModifyIdentifierActionEnums;
446
+ (function (CADModifyIdentifierActionEnums) {
447
+ CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["ADD"] = 0] = "ADD";
448
+ CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["EDIT"] = 1] = "EDIT";
449
+ CADModifyIdentifierActionEnums[CADModifyIdentifierActionEnums["REMOVE"] = 2] = "REMOVE";
450
+ })(CADModifyIdentifierActionEnums = exports.CADModifyIdentifierActionEnums || (exports.CADModifyIdentifierActionEnums = {}));
451
+ var CADDispatchOriginEnums;
452
+ (function (CADDispatchOriginEnums) {
453
+ CADDispatchOriginEnums[CADDispatchOriginEnums["Caller"] = 0] = "Caller";
454
+ CADDispatchOriginEnums[CADDispatchOriginEnums["RadioDispatch"] = 1] = "RadioDispatch";
455
+ CADDispatchOriginEnums[CADDispatchOriginEnums["Observed"] = 2] = "Observed";
456
+ CADDispatchOriginEnums[CADDispatchOriginEnums["WalkUp"] = 3] = "WalkUp";
457
+ })(CADDispatchOriginEnums = exports.CADDispatchOriginEnums || (exports.CADDispatchOriginEnums = {}));
458
+ var CADDispatchStatusEnums;
459
+ (function (CADDispatchStatusEnums) {
460
+ CADDispatchStatusEnums[CADDispatchStatusEnums["Pending"] = 0] = "Pending";
461
+ CADDispatchStatusEnums[CADDispatchStatusEnums["Active"] = 1] = "Active";
462
+ CADDispatchStatusEnums[CADDispatchStatusEnums["Closed"] = 2] = "Closed";
463
+ })(CADDispatchStatusEnums = exports.CADDispatchStatusEnums || (exports.CADDispatchStatusEnums = {}));