@sonoransoftware/sonoran.js 1.0.33 → 1.0.35

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 (38) hide show
  1. package/.github/workflows/auto-pr-on-branch-push.yml +89 -0
  2. package/.github/workflows/codex_instructions.md +24 -0
  3. package/.github/workflows/push-pr-nudge-codex.yml +50 -0
  4. package/dist/constants.d.ts +205 -1
  5. package/dist/constants.js +1 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/instance/Instance.d.ts +6 -0
  8. package/dist/instance/Instance.js +27 -0
  9. package/dist/instance/instance.types.d.ts +3 -0
  10. package/dist/libs/rest/src/lib/REST.d.ts +2 -1
  11. package/dist/libs/rest/src/lib/REST.js +113 -0
  12. package/dist/libs/rest/src/lib/RequestManager.d.ts +2 -0
  13. package/dist/libs/rest/src/lib/RequestManager.js +201 -0
  14. package/dist/libs/rest/src/lib/errors/RateLimitError.js +19 -1
  15. package/dist/libs/rest/src/lib/utils/constants.d.ts +105 -22
  16. package/dist/libs/rest/src/lib/utils/constants.js +112 -2
  17. package/dist/managers/CADManager.d.ts +28 -0
  18. package/dist/managers/CADManager.js +90 -0
  19. package/dist/managers/CMSManager.d.ts +60 -0
  20. package/dist/managers/CMSManager.js +156 -0
  21. package/dist/managers/CMSServerManager.d.ts +3 -0
  22. package/dist/managers/CMSServerManager.js +36 -2
  23. package/dist/managers/RadioManager.d.ts +55 -0
  24. package/dist/managers/RadioManager.js +224 -0
  25. package/package.json +1 -1
  26. package/readme.md +170 -0
  27. package/src/constants.ts +239 -2
  28. package/src/index.ts +35 -1
  29. package/src/instance/Instance.ts +30 -1
  30. package/src/instance/instance.types.ts +4 -1
  31. package/src/libs/rest/src/lib/REST.ts +112 -1
  32. package/src/libs/rest/src/lib/RequestManager.ts +221 -10
  33. package/src/libs/rest/src/lib/errors/RateLimitError.ts +20 -2
  34. package/src/libs/rest/src/lib/utils/constants.ts +215 -25
  35. package/src/managers/CADManager.ts +86 -1
  36. package/src/managers/CMSManager.ts +142 -1
  37. package/src/managers/CMSServerManager.ts +39 -6
  38. package/src/managers/RadioManager.ts +187 -0
@@ -19,6 +19,7 @@ export interface RequestData {
19
19
  key: string;
20
20
  type: string;
21
21
  data: any;
22
+ internalKey?: string;
22
23
  }
23
24
  export interface InternalRequestData extends RequestData {
24
25
  product: productEnums;
@@ -55,5 +56,6 @@ export declare class RequestManager extends EventEmitter {
55
56
  removeRateLimit(id: string): void;
56
57
  private createHandler;
57
58
  private static resolveRequestData;
59
+ private static resolveRadioRequest;
58
60
  debug(log: string): void;
59
61
  }
@@ -24,6 +24,10 @@ class RequestManager extends events_1.EventEmitter {
24
24
  this.options = { ...constants_1.DefaultCMSRestOptions, ...options };
25
25
  break;
26
26
  }
27
+ case constants_2.productEnums.RADIO: {
28
+ this.options = { ...constants_1.DefaultRadioRestOptions, ...options };
29
+ break;
30
+ }
27
31
  default: {
28
32
  throw new Error('No Product provided for RequestManager initialization');
29
33
  }
@@ -66,9 +70,15 @@ class RequestManager extends events_1.EventEmitter {
66
70
  case constants_2.productEnums.CMS:
67
71
  apiURL = instance.cmsApiUrl;
68
72
  break;
73
+ case constants_2.productEnums.RADIO:
74
+ apiURL = instance.radioApiUrl;
75
+ break;
69
76
  }
70
77
  const findType = constants_1.AllAPITypes.find((_type) => _type.type === type);
71
78
  if (findType) {
79
+ if (product === constants_2.productEnums.RADIO) {
80
+ return RequestManager.resolveRadioRequest(instance, apiURL, findType, data, apiData);
81
+ }
72
82
  apiData.fullUrl = `${apiURL}/${findType.path}`;
73
83
  apiData.method = findType.method;
74
84
  apiData.fetchOptions.method = findType.method;
@@ -79,6 +89,10 @@ class RequestManager extends events_1.EventEmitter {
79
89
  apiData.data.data = clonedData;
80
90
  break;
81
91
  }
92
+ case 'SET_GAME_SERVERS': {
93
+ apiData.data.data = clonedData;
94
+ break;
95
+ }
82
96
  case 'SET_PENAL_CODES': {
83
97
  apiData.data.data = [clonedData[0]];
84
98
  break;
@@ -119,6 +133,29 @@ class RequestManager extends events_1.EventEmitter {
119
133
  apiData.data.data = [clonedData[0]];
120
134
  break;
121
135
  }
136
+ case 'SET_CLOCK': {
137
+ apiData.data.data = Array.isArray(clonedData) ? clonedData : [clonedData];
138
+ break;
139
+ }
140
+ case 'JOIN_COMMUNITY':
141
+ case 'LEAVE_COMMUNITY': {
142
+ const internalKey = clonedData === null || clonedData === void 0 ? void 0 : clonedData.internalKey;
143
+ if (internalKey !== undefined) {
144
+ apiData.data.internalKey = internalKey;
145
+ }
146
+ const accountsSource = clonedData === null || clonedData === void 0 ? void 0 : clonedData.accounts;
147
+ const accountsArray = Array.isArray(accountsSource) ? accountsSource : accountsSource ? [accountsSource] : [];
148
+ apiData.data.data = accountsArray.map((entry) => {
149
+ if (typeof entry === 'string') {
150
+ return { account: entry };
151
+ }
152
+ if (entry && typeof entry === 'object' && 'account' in entry) {
153
+ return entry;
154
+ }
155
+ return { account: String(entry) };
156
+ });
157
+ break;
158
+ }
122
159
  case 'NEW_CHARACTER': {
123
160
  apiData.data.data = [clonedData[0]];
124
161
  break;
@@ -184,6 +221,170 @@ class RequestManager extends events_1.EventEmitter {
184
221
  };
185
222
  return apiData;
186
223
  }
224
+ static resolveRadioRequest(instance, apiURL, apiType, request, apiData) {
225
+ var _a, _b, _c;
226
+ if (!apiURL || typeof apiURL !== 'string') {
227
+ throw new Error('Radio API URL could not be resolved for request.');
228
+ }
229
+ const rawData = request.data;
230
+ const payload = rawData == null ? {} : (typeof rawData === 'object' ? (0, utils_1.cloneObject)(rawData) : rawData);
231
+ const headers = {
232
+ Accept: 'application/json'
233
+ };
234
+ const applyHeaders = (source) => {
235
+ if (!source)
236
+ return;
237
+ if (Array.isArray(source)) {
238
+ for (const [key, value] of source) {
239
+ headers[key] = value;
240
+ }
241
+ return;
242
+ }
243
+ if (typeof source === 'object' && source !== null && 'forEach' in source && typeof source.forEach === 'function') {
244
+ source.forEach((value, key) => {
245
+ headers[key] = value;
246
+ });
247
+ return;
248
+ }
249
+ Object.assign(headers, source);
250
+ };
251
+ applyHeaders(instance.apiHeaders);
252
+ let method = apiType.method;
253
+ let path = apiType.path;
254
+ let body;
255
+ const ensureAuth = () => {
256
+ if (!request.id || !request.key) {
257
+ throw new Error('Community ID or API Key could not be found for request.');
258
+ }
259
+ return {
260
+ id: request.id,
261
+ key: request.key,
262
+ encodedId: encodeURIComponent(request.id),
263
+ encodedKey: encodeURIComponent(request.key)
264
+ };
265
+ };
266
+ const encodeSegment = (value) => encodeURIComponent(String(value));
267
+ switch (apiType.type) {
268
+ case 'RADIO_GET_COMMUNITY_CHANNELS': {
269
+ const auth = ensureAuth();
270
+ path = `${apiType.path}/${auth.encodedId}/${auth.encodedKey}`;
271
+ method = 'GET';
272
+ break;
273
+ }
274
+ case 'RADIO_GET_CONNECTED_USERS': {
275
+ const auth = ensureAuth();
276
+ path = `${apiType.path}/${auth.encodedId}/${auth.encodedKey}`;
277
+ method = 'GET';
278
+ break;
279
+ }
280
+ case 'RADIO_GET_CONNECTED_USER': {
281
+ const auth = ensureAuth();
282
+ const roomIdRaw = (_a = payload === null || payload === void 0 ? void 0 : payload.roomId) !== null && _a !== void 0 ? _a : payload === null || payload === void 0 ? void 0 : payload.roomID;
283
+ if (roomIdRaw === undefined) {
284
+ throw new Error('roomId is required for RADIO_GET_CONNECTED_USER requests.');
285
+ }
286
+ const roomIdNumeric = typeof roomIdRaw === 'number' ? roomIdRaw : Number(roomIdRaw);
287
+ if (Number.isNaN(roomIdNumeric)) {
288
+ throw new Error('roomId must be a number for RADIO_GET_CONNECTED_USER requests.');
289
+ }
290
+ const identity = payload === null || payload === void 0 ? void 0 : payload.identity;
291
+ if (!identity) {
292
+ throw new Error('identity is required for RADIO_GET_CONNECTED_USER requests.');
293
+ }
294
+ path = `${apiType.path}/${auth.encodedId}/${auth.encodedKey}/${encodeSegment(roomIdNumeric)}/${encodeSegment(identity)}`;
295
+ method = 'GET';
296
+ break;
297
+ }
298
+ case 'RADIO_SET_USER_CHANNELS': {
299
+ const auth = ensureAuth();
300
+ const identity = payload === null || payload === void 0 ? void 0 : payload.identity;
301
+ if (!identity) {
302
+ throw new Error('identity is required for RADIO_SET_USER_CHANNELS requests.');
303
+ }
304
+ const options = (_b = payload === null || payload === void 0 ? void 0 : payload.options) !== null && _b !== void 0 ? _b : {};
305
+ path = `${apiType.path}/${auth.encodedId}/${auth.encodedKey}/${encodeSegment(identity)}`;
306
+ method = 'POST';
307
+ const requestBody = {};
308
+ if ((options === null || options === void 0 ? void 0 : options.transmit) !== undefined) {
309
+ requestBody.transmit = options.transmit;
310
+ }
311
+ if ((options === null || options === void 0 ? void 0 : options.scan) !== undefined) {
312
+ requestBody.scan = options.scan;
313
+ }
314
+ body = requestBody;
315
+ break;
316
+ }
317
+ case 'RADIO_SET_USER_DISPLAY_NAME': {
318
+ const auth = ensureAuth();
319
+ const accId = payload === null || payload === void 0 ? void 0 : payload.accId;
320
+ const displayName = payload === null || payload === void 0 ? void 0 : payload.displayName;
321
+ if (!accId || !displayName) {
322
+ throw new Error('accId and displayName are required for RADIO_SET_USER_DISPLAY_NAME requests.');
323
+ }
324
+ method = 'POST';
325
+ body = {
326
+ id: auth.id,
327
+ key: auth.key,
328
+ accId,
329
+ displayName
330
+ };
331
+ path = apiType.path;
332
+ break;
333
+ }
334
+ case 'RADIO_GET_SERVER_SUBSCRIPTION_FROM_IP': {
335
+ method = 'GET';
336
+ path = apiType.path;
337
+ break;
338
+ }
339
+ case 'RADIO_SET_SERVER_IP': {
340
+ const auth = ensureAuth();
341
+ const pushUrl = payload === null || payload === void 0 ? void 0 : payload.pushUrl;
342
+ if (!pushUrl) {
343
+ throw new Error('pushUrl is required for RADIO_SET_SERVER_IP requests.');
344
+ }
345
+ method = 'POST';
346
+ body = {
347
+ id: auth.id,
348
+ key: auth.key,
349
+ pushUrl
350
+ };
351
+ path = apiType.path;
352
+ break;
353
+ }
354
+ case 'RADIO_SET_IN_GAME_SPEAKER_LOCATIONS': {
355
+ const auth = ensureAuth();
356
+ const locations = payload === null || payload === void 0 ? void 0 : payload.locations;
357
+ if (!Array.isArray(locations)) {
358
+ throw new Error('locations array is required for RADIO_SET_IN_GAME_SPEAKER_LOCATIONS requests.');
359
+ }
360
+ method = 'POST';
361
+ body = {
362
+ id: auth.id,
363
+ key: auth.key,
364
+ locations
365
+ };
366
+ const token = (_c = payload === null || payload === void 0 ? void 0 : payload.token) !== null && _c !== void 0 ? _c : auth.key;
367
+ if (token) {
368
+ headers.Authorization = `Bearer ${token}`;
369
+ }
370
+ path = apiType.path;
371
+ break;
372
+ }
373
+ default: {
374
+ throw new Error(`Unsupported radio API type received: ${apiType.type}`);
375
+ }
376
+ }
377
+ apiData.typePath = path;
378
+ apiData.fullUrl = `${apiURL}/${path}`;
379
+ apiData.method = method;
380
+ apiData.fetchOptions.method = method;
381
+ if (body !== undefined) {
382
+ headers['Content-Type'] = 'application/json';
383
+ apiData.fetchOptions.body = JSON.stringify(body);
384
+ }
385
+ apiData.fetchOptions.headers = headers;
386
+ return apiData;
387
+ }
187
388
  debug(log) {
188
389
  return this.instance._debugLog(log);
189
390
  }
@@ -13,7 +13,25 @@ class RateLimitError extends Error {
13
13
  * The name of the error
14
14
  */
15
15
  get name() {
16
- return `Ratelimit Hit - [${this.product === constants_1.productEnums.CAD ? 'Sonoran CAD' : this.product === constants_1.productEnums.CMS ? 'Sonoran CMS' : 'Invalid Product'} '${this.type}']`;
16
+ let productName;
17
+ switch (this.product) {
18
+ case constants_1.productEnums.CAD: {
19
+ productName = 'Sonoran CAD';
20
+ break;
21
+ }
22
+ case constants_1.productEnums.CMS: {
23
+ productName = 'Sonoran CMS';
24
+ break;
25
+ }
26
+ case constants_1.productEnums.RADIO: {
27
+ productName = 'Sonoran Radio';
28
+ break;
29
+ }
30
+ default: {
31
+ productName = 'Invalid Product';
32
+ }
33
+ }
34
+ return `Ratelimit Hit - [${productName} '${this.type}']`;
17
35
  }
18
36
  }
19
37
  exports.RateLimitError = RateLimitError;
@@ -1,8 +1,9 @@
1
- import { productEnums } from '../../../../../constants';
1
+ import { productEnums, RadioSetUserChannelsOptions, RadioSpeakerLocation, CMSProfileFieldUpdate, CMSSetGameServerStruct } from '../../../../../constants';
2
2
  import type { RESTOptions } from '../REST';
3
3
  export declare const DefaultUserAgent = "Sonoran.js NPM Module";
4
4
  export declare const DefaultCADRestOptions: Required<RESTOptions>;
5
5
  export declare const DefaultCMSRestOptions: Required<RESTOptions>;
6
+ export declare const DefaultRadioRestOptions: Required<RESTOptions>;
6
7
  /**
7
8
  * The events that the REST manager emits
8
9
  */
@@ -35,8 +36,9 @@ export declare const EventsCMSAPITypes: APITypeData[];
35
36
  export declare const FormsCMSAPITypes: APITypeData[];
36
37
  export declare const CommunitiesCMSAPITypes: APITypeData[];
37
38
  export declare const ERLCMSAPITypes: APITypeData[];
39
+ export declare const RadioAPITypes: APITypeData[];
38
40
  export declare const AllAPITypes: AllAPITypeData[];
39
- export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'EDIT_RECORD' | 'REMOVE_RECORD' | 'LOOKUP_INT' | 'LOOKUP' | 'GET_ACCOUNT' | 'CHECK_APIID' | 'APPLY_PERMISSION_KEY' | 'SET_ACCOUNT_PERMISSIONS' | 'BAN_USER' | 'VERIFY_SECRET' | 'AUTH_STREETSIGNS' | 'SET_POSTALS' | 'SEND_PHOTO' | 'GET_CHARACTERS' | 'NEW_CHARACTER' | 'EDIT_CHARACTER' | 'REMOVE_CHARACTER' | 'GET_IDENTIFIERS' | 'MODIFY_IDENTIFIER' | 'SET_IDENTIFIER' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_ACTIVE_UNITS' | 'KICK_UNIT' | 'NEW_DISPATCH' | 'ATTACH_UNIT' | 'DETACH_UNIT' | 'SET_CALL_POSTAL' | 'SET_CALL_PRIMARY' | 'ADD_CALL_NOTE' | 'CLOSE_CALL' | 'UNIT_LOCATION' | 'SET_STREETSIGN_CONFIG' | 'UPDATE_STREETSIGN' | 'GET_COM_ACCOUNT' | 'GET_DEPARTMENTS' | 'GET_SUB_VERSION' | 'CHECK_COM_APIID' | 'VERIFY_WHITELIST' | 'CLOCK_IN_OUT' | 'FULL_WHITELIST' | 'GET_ACCOUNT_RANKS' | 'SET_ACCOUNT_RANKS' | 'RSVP' | 'CHANGE_FORM_STAGE' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | "ERLC_GET_ONLINE_PLAYERS" | "ERLC_ADD_NEW_RECORD";
41
+ export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'EDIT_RECORD' | 'REMOVE_RECORD' | 'LOOKUP_INT' | 'LOOKUP' | 'GET_ACCOUNT' | 'CHECK_APIID' | 'APPLY_PERMISSION_KEY' | 'SET_ACCOUNT_PERMISSIONS' | 'BAN_USER' | 'VERIFY_SECRET' | 'AUTH_STREETSIGNS' | 'SET_POSTALS' | 'SEND_PHOTO' | 'SET_CLOCK' | 'JOIN_COMMUNITY' | 'LEAVE_COMMUNITY' | 'GET_CHARACTERS' | 'NEW_CHARACTER' | 'EDIT_CHARACTER' | 'REMOVE_CHARACTER' | 'GET_IDENTIFIERS' | 'MODIFY_IDENTIFIER' | 'SET_IDENTIFIER' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_ACTIVE_UNITS' | 'KICK_UNIT' | 'NEW_DISPATCH' | 'ATTACH_UNIT' | 'DETACH_UNIT' | 'SET_CALL_POSTAL' | 'SET_CALL_PRIMARY' | 'ADD_CALL_NOTE' | 'CLOSE_CALL' | 'UNIT_LOCATION' | 'SET_STREETSIGN_CONFIG' | 'UPDATE_STREETSIGN' | 'GET_COM_ACCOUNT' | 'GET_DEPARTMENTS' | 'GET_SUB_VERSION' | 'GET_CURRENT_CLOCK_IN' | 'GET_ACCOUNTS' | 'GET_PROFILE_FIELDS' | 'CHECK_COM_APIID' | 'VERIFY_WHITELIST' | 'CLOCK_IN_OUT' | 'FULL_WHITELIST' | 'GET_ACCOUNT_RANKS' | 'SET_ACCOUNT_RANKS' | 'RSVP' | 'CHANGE_FORM_STAGE' | 'GET_FORM_TEMPLATE_SUBMISSIONS' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | 'SET_GAME_SERVERS' | 'ERLC_GET_ONLINE_PLAYERS' | 'ERLC_GET_PLAYER_QUEUE' | 'ERLC_ADD_NEW_RECORD' | 'RADIO_GET_COMMUNITY_CHANNELS' | 'RADIO_GET_CONNECTED_USERS' | 'RADIO_GET_CONNECTED_USER' | 'RADIO_SET_USER_CHANNELS' | 'RADIO_SET_USER_DISPLAY_NAME' | 'RADIO_GET_SERVER_SUBSCRIPTION_FROM_IP' | 'RADIO_SET_SERVER_IP' | 'RADIO_SET_IN_GAME_SPEAKER_LOCATIONS';
40
42
  export interface CMSServerAPIStruct {
41
43
  id: number;
42
44
  name: string;
@@ -271,10 +273,6 @@ export interface CADUnitLocationStruct {
271
273
  apiId: string;
272
274
  location: string;
273
275
  }
274
- export interface CMSProfileField {
275
- id: string;
276
- value: string;
277
- }
278
276
  export interface RESTTypedAPIDataStructs {
279
277
  GET_SERVERS: [];
280
278
  SET_SERVERS: [
@@ -296,7 +294,7 @@ export interface RESTTypedAPIDataStructs {
296
294
  ];
297
295
  CHECK_APIID: [apiId: string];
298
296
  APPLY_PERMISSION_KEY: [
299
- apiId: string,
297
+ apiId: string | undefined,
300
298
  permissionKey: string
301
299
  ];
302
300
  SET_ACCOUNT_PERMISSIONS: [data: CADModifyAccountPermsStruct];
@@ -305,9 +303,33 @@ export interface RESTTypedAPIDataStructs {
305
303
  AUTH_STREETSIGNS: [serverId: number];
306
304
  SET_POSTALS: [data: CADSetPostalStruct[]];
307
305
  SEND_PHOTO: [
308
- apiId: string,
306
+ apiId: string | undefined,
309
307
  url: string
310
308
  ];
309
+ SET_CLOCK: [
310
+ data: {
311
+ serverId: number;
312
+ currentUtc: string;
313
+ currentGame: string;
314
+ secondsPerHour: number;
315
+ }
316
+ ];
317
+ JOIN_COMMUNITY: [
318
+ payload: {
319
+ internalKey: string;
320
+ accounts: Array<{
321
+ account: string;
322
+ }>;
323
+ }
324
+ ];
325
+ LEAVE_COMMUNITY: [
326
+ payload: {
327
+ internalKey: string;
328
+ accounts: Array<{
329
+ account: string;
330
+ }>;
331
+ }
332
+ ];
311
333
  GET_CHARACTERS: [apiId: string];
312
334
  NEW_CHARACTER: [data: CADNewEditRecordOptionOneStruct | CADNewEditRecordOptionTwoStruct];
313
335
  EDIT_CHARACTER: [data: CADNewEditRecordOptionOneStruct | CADNewEditRecordOptionTwoStruct];
@@ -315,15 +337,15 @@ export interface RESTTypedAPIDataStructs {
315
337
  GET_IDENTIFIERS: [apiId: string];
316
338
  MODIFY_IDENTIFIER: [data: CADModifyIdentifierStruct];
317
339
  SET_IDENTIFIER: [
318
- apiId: string,
340
+ apiId: string | undefined,
319
341
  identId: number
320
342
  ];
321
343
  UNIT_PANIC: [
322
- apiId: string,
344
+ apiId: string | undefined,
323
345
  isPanic: boolean
324
346
  ];
325
347
  UNIT_STATUS: [
326
- apiId: string,
348
+ apiId: string | undefined,
327
349
  status: number,
328
350
  serverId: number
329
351
  ];
@@ -335,7 +357,7 @@ export interface RESTTypedAPIDataStructs {
335
357
  GET_CALLS: [data: CADGetCallsStruct];
336
358
  GET_ACTIVE_UNITS: [data: CADGetActiveUnitsStruct];
337
359
  KICK_UNIT: [
338
- apiId: string,
360
+ apiId: string | undefined,
339
361
  reason: string,
340
362
  serverId: number
341
363
  ];
@@ -399,6 +421,24 @@ export interface RESTTypedAPIDataStructs {
399
421
  uniqueId?: string
400
422
  ];
401
423
  GET_SUB_VERSION: [];
424
+ GET_CURRENT_CLOCK_IN: [
425
+ apiId?: string,
426
+ username?: string,
427
+ accId?: string,
428
+ discord?: string,
429
+ uniqueId?: string
430
+ ];
431
+ GET_ACCOUNTS: [
432
+ options?: {
433
+ skip?: number;
434
+ take?: number;
435
+ sysStatus?: boolean;
436
+ comStatus?: boolean;
437
+ banned?: boolean;
438
+ archived?: boolean;
439
+ }
440
+ ];
441
+ GET_PROFILE_FIELDS: [];
402
442
  CHECK_COM_APIID: [apiId: string];
403
443
  CLOCK_IN_OUT: [
404
444
  apiId?: string,
@@ -441,6 +481,7 @@ export interface RESTTypedAPIDataStructs {
441
481
  uniqueId: string | undefined
442
482
  ];
443
483
  GET_GAME_SERVERS: [];
484
+ SET_GAME_SERVERS: [servers: CMSSetGameServerStruct[]];
444
485
  VERIFY_WHITELIST: [
445
486
  apiId: string | undefined,
446
487
  accId: string | undefined,
@@ -460,22 +501,27 @@ export interface RESTTypedAPIDataStructs {
460
501
  uniqueId: string | undefined
461
502
  ];
462
503
  EDIT_ACC_PROFLIE_FIELDS: [
463
- apiId: string,
464
- username: string,
465
- accId: string,
466
- discord: string,
467
- uniqueId: string,
468
- profileFields: CMSProfileField[]
504
+ apiId: string | undefined,
505
+ username: string | undefined,
506
+ accId: string | undefined,
507
+ discord: string | undefined,
508
+ uniqueId: string | undefined,
509
+ profileFields: CMSProfileFieldUpdate[]
469
510
  ];
470
511
  CHANGE_FORM_STAGE: [
471
- accId: string,
512
+ accId: string | undefined,
472
513
  formId: number,
473
514
  newStageId: string,
474
- apiId: string,
475
- username: string,
476
- discord: string,
515
+ apiId: string | undefined,
516
+ username: string | undefined,
517
+ discord: string | undefined,
477
518
  uniqueId: number
478
519
  ];
520
+ GET_FORM_TEMPLATE_SUBMISSIONS: [
521
+ templateId: number,
522
+ skip?: number,
523
+ take?: number
524
+ ];
479
525
  BAN_ACCOUNT: [
480
526
  apiId: string | undefined,
481
527
  username: string | undefined,
@@ -493,6 +539,9 @@ export interface RESTTypedAPIDataStructs {
493
539
  ERLC_GET_ONLINE_PLAYERS: [
494
540
  robloxJoinCode: string
495
541
  ];
542
+ ERLC_GET_PLAYER_QUEUE: [
543
+ robloxJoinCode: string
544
+ ];
496
545
  ERLC_ADD_NEW_RECORD: [
497
546
  robloxJoinCode: string,
498
547
  executerDiscordId: string | number,
@@ -502,12 +551,41 @@ export interface RESTTypedAPIDataStructs {
502
551
  playerRobloxId?: string | number,
503
552
  points?: number
504
553
  ];
554
+ RADIO_GET_COMMUNITY_CHANNELS: [];
555
+ RADIO_GET_CONNECTED_USERS: [];
556
+ RADIO_GET_CONNECTED_USER: [
557
+ roomId: number,
558
+ identity: string
559
+ ];
560
+ RADIO_SET_USER_CHANNELS: [
561
+ identity: string,
562
+ options?: RadioSetUserChannelsOptions
563
+ ];
564
+ RADIO_SET_USER_DISPLAY_NAME: [
565
+ accId: string | undefined,
566
+ displayName: string
567
+ ];
568
+ RADIO_GET_SERVER_SUBSCRIPTION_FROM_IP: [];
569
+ RADIO_SET_SERVER_IP: [
570
+ pushUrl: string
571
+ ];
572
+ RADIO_SET_IN_GAME_SPEAKER_LOCATIONS: [
573
+ locations: RadioSpeakerLocation[],
574
+ token?: string
575
+ ];
505
576
  }
506
577
  export type PossibleRequestData = undefined | {
507
578
  data: CADPenalCodeStruct[] | CADSetAPIIDStruct | CADNewEditRecordOptionOneStruct | CADNewEditRecordOptionTwoStruct | CADLookupByIntStruct | CADLookupStruct | CADModifyAccountPermsStruct | CADKickBanUserStruct | CADSetPostalStruct[] | CADModifyIdentifierStruct | CADAddBlipStruct[] | CADModifyBlipStruct[] | CADGetCallsStruct | CADGetActiveUnitsStruct | CADNewDispatchStruct;
508
579
  } | {
509
580
  servers: CADServerAPIStruct[];
510
581
  deployMap: boolean;
582
+ } | {
583
+ data: {
584
+ serverId: number;
585
+ currentUtc: string;
586
+ currentGame: string;
587
+ secondsPerHour: number;
588
+ };
511
589
  } | {
512
590
  id: number;
513
591
  } | {
@@ -582,6 +660,11 @@ export type PossibleRequestData = undefined | {
582
660
  text2: string;
583
661
  text3: string;
584
662
  };
663
+ } | {
664
+ internalKey: string;
665
+ accounts: {
666
+ account: string;
667
+ }[];
585
668
  } | {
586
669
  apiId?: string;
587
670
  username?: string;