@sonoransoftware/sonoran.js 1.0.66 → 1.0.68

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.
@@ -70,6 +70,11 @@ export declare class DispatchCallBuilder {
70
70
  * @param metaData Dictionary of metadata to store with a dispatch call, can be used later on
71
71
  */
72
72
  setMetadata(metaData: Record<string, string>): this;
73
+ /**
74
+ * Sets the auto-delete timer for this dispatch call
75
+ * @param deleteAfterMinutes Minutes until the dispatch call is deleted
76
+ */
77
+ setDeleteAfterMinutes(deleteAfterMinutes: number): this;
73
78
  /**
74
79
  * Sets specified units for this dispatch call
75
80
  * @param units Units to be removed from a call
@@ -108,6 +108,14 @@ class DispatchCallBuilder {
108
108
  this.data.metaData = metaData;
109
109
  return this;
110
110
  }
111
+ /**
112
+ * Sets the auto-delete timer for this dispatch call
113
+ * @param deleteAfterMinutes Minutes until the dispatch call is deleted
114
+ */
115
+ setDeleteAfterMinutes(deleteAfterMinutes) {
116
+ this.data.deleteAfterMinutes = deleteAfterMinutes;
117
+ return this;
118
+ }
111
119
  /**
112
120
  * Sets specified units for this dispatch call
113
121
  * @param units Units to be removed from a call
@@ -23,6 +23,7 @@ export interface CADNewDispatchBuilderOptions {
23
23
  description?: string;
24
24
  metaData?: Record<string, string>;
25
25
  units?: string[];
26
+ deleteAfterMinutes?: number;
26
27
  }
27
28
  export type Constructable<T> = abstract new (...args: any[]) => T;
28
29
  export interface Caches {
@@ -363,6 +364,11 @@ export interface CMSChangeFormStagePromiseResult {
363
364
  reason?: string;
364
365
  data?: unknown;
365
366
  }
367
+ export interface CMSGetFormSubmissionPromiseResult {
368
+ success: boolean;
369
+ reason?: string;
370
+ data?: unknown;
371
+ }
366
372
  export interface CMSGetFormLockStatusPromiseResult {
367
373
  success: boolean;
368
374
  reason?: string;
@@ -363,6 +363,11 @@ class REST extends events_1.EventEmitter {
363
363
  uniqueId: args[7],
364
364
  };
365
365
  }
366
+ case 'GET_FORM_SUBMISSION': {
367
+ return {
368
+ id: args[0]
369
+ };
370
+ }
366
371
  case 'BAN_ACCOUNT': {
367
372
  return {
368
373
  apiId: args[0],
@@ -38,7 +38,7 @@ export declare const CommunitiesCMSAPITypes: APITypeData[];
38
38
  export declare const ERLCMSAPITypes: APITypeData[];
39
39
  export declare const RadioAPITypes: APITypeData[];
40
40
  export declare const AllAPITypes: AllAPITypeData[];
41
- export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'SEND_DRAFT' | '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' | 'IDENTS_TO_GROUP' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_MY_CALL' | '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_CLOCKIN_TYPES' | 'GET_LATEST_ACTIVITY' | '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' | 'GET_FORM_LOCK_STATUS' | 'SET_FORM_LOCK_STATUS' | 'GET_CURRENT_SESSION' | 'START_SESSION' | 'STOP_SESSION' | 'CANCEL_SESSION' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | 'TRIGGER_PROMOTION_FLOWS' | 'GET_PROMOTION_FLOWS' | 'GET_CUSTOM_LOG_TYPES' | 'SET_GAME_SERVERS' | 'ERLC_GET_ONLINE_PLAYERS' | 'ERLC_GET_PLAYER_QUEUE' | 'ERLC_ADD_NEW_RECORD' | 'ERLC_EXECUTE_COMMAND' | 'ERLC_TEAMS_LOCK' | 'ERLC_TEAMS_UNLOCK' | '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' | 'PLAY_TONE';
41
+ export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'SEND_DRAFT' | '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' | 'IDENTS_TO_GROUP' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_MY_CALL' | '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_CLOCKIN_TYPES' | 'GET_LATEST_ACTIVITY' | '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_SUBMISSION' | 'GET_FORM_TEMPLATE_SUBMISSIONS' | 'GET_FORM_LOCK_STATUS' | 'SET_FORM_LOCK_STATUS' | 'GET_CURRENT_SESSION' | 'START_SESSION' | 'STOP_SESSION' | 'CANCEL_SESSION' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | 'TRIGGER_PROMOTION_FLOWS' | 'GET_PROMOTION_FLOWS' | 'GET_CUSTOM_LOG_TYPES' | 'SET_GAME_SERVERS' | 'ERLC_GET_ONLINE_PLAYERS' | 'ERLC_GET_PLAYER_QUEUE' | 'ERLC_ADD_NEW_RECORD' | 'ERLC_EXECUTE_COMMAND' | 'ERLC_TEAMS_LOCK' | 'ERLC_TEAMS_UNLOCK' | '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' | 'PLAY_TONE';
42
42
  export interface CMSServerAPIStruct {
43
43
  id: number;
44
44
  name: string;
@@ -307,6 +307,7 @@ interface CADNewDispatchBaseStruct {
307
307
  description: string;
308
308
  notes: CADDispatchNoteStruct[];
309
309
  metaData: Record<string, string>;
310
+ deleteAfterMinutes?: number;
310
311
  }
311
312
  export type CADNewDispatchStruct = (CADNewDispatchBaseStruct & {
312
313
  units: string[];
@@ -625,6 +626,9 @@ export interface RESTTypedAPIDataStructs {
625
626
  discord: string | undefined,
626
627
  uniqueId: number
627
628
  ];
629
+ GET_FORM_SUBMISSION: [
630
+ id: number
631
+ ];
628
632
  GET_FORM_TEMPLATE_SUBMISSIONS: [
629
633
  templateId: number,
630
634
  skip?: number,
@@ -555,6 +555,12 @@ exports.FormsCMSAPITypes = [
555
555
  path: 'forms/set_form_lock_status',
556
556
  method: 'POST',
557
557
  minVersion: 0
558
+ },
559
+ {
560
+ type: 'GET_FORM_SUBMISSION',
561
+ path: 'forms/get_submission',
562
+ method: 'POST',
563
+ minVersion: 0
558
564
  }
559
565
  ];
560
566
  exports.CommunitiesCMSAPITypes = [
@@ -212,6 +212,10 @@ export declare class CMSManager extends BaseManager {
212
212
  discord?: string;
213
213
  uniqueId: number;
214
214
  }): Promise<globalTypes.CMSChangeFormStagePromiseResult>;
215
+ /**
216
+ * Gets the form submission object for the given ID
217
+ */
218
+ getFormSubmission(formId: number): Promise<globalTypes.CMSGetFormSubmissionPromiseResult>;
215
219
  /**
216
220
  * Retrieves the lock status for a form template.
217
221
  */
@@ -519,6 +519,29 @@ class CMSManager extends BaseManager_1.BaseManager {
519
519
  }
520
520
  });
521
521
  }
522
+ /**
523
+ * Gets the form submission object for the given ID
524
+ */
525
+ async getFormSubmission(formId) {
526
+ if (!formId) {
527
+ throw new Error('formId is required to fetch submission');
528
+ }
529
+ return new Promise(async (resolve, reject) => {
530
+ var _a;
531
+ try {
532
+ const response = await ((_a = this.rest) === null || _a === void 0 ? void 0 : _a.request('GET_FORM_SUBMISSION', formId));
533
+ resolve({ success: true, data: response });
534
+ }
535
+ catch (err) {
536
+ if (err instanceof src_1.APIError) {
537
+ resolve({ success: false, reason: err.response });
538
+ }
539
+ else {
540
+ reject(err);
541
+ }
542
+ }
543
+ });
544
+ }
522
545
  /**
523
546
  * Retrieves the lock status for a form template.
524
547
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonoransoftware/sonoran.js",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "Sonoran.js is a library that allows you to interact with the Sonoran CAD and Sonoran CMS API. Based off of and utilizes several Discord.js library techniques for ease of use.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -123,6 +123,15 @@ export class DispatchCallBuilder {
123
123
  return this;
124
124
  }
125
125
 
126
+ /**
127
+ * Sets the auto-delete timer for this dispatch call
128
+ * @param deleteAfterMinutes Minutes until the dispatch call is deleted
129
+ */
130
+ public setDeleteAfterMinutes(deleteAfterMinutes: number): this {
131
+ this.data.deleteAfterMinutes = deleteAfterMinutes;
132
+ return this;
133
+ }
134
+
126
135
  /**
127
136
  * Sets specified units for this dispatch call
128
137
  * @param units Units to be removed from a call
package/src/constants.ts CHANGED
@@ -25,6 +25,7 @@ export interface CADNewDispatchBuilderOptions {
25
25
  description?: string;
26
26
  metaData?: Record<string, string>;
27
27
  units?: string[];
28
+ deleteAfterMinutes?: number;
28
29
  }
29
30
 
30
31
  export type Constructable<T> = abstract new (...args: any[]) => T;
@@ -406,6 +407,12 @@ export interface CMSChangeFormStagePromiseResult {
406
407
  data?: unknown;
407
408
  }
408
409
 
410
+ export interface CMSGetFormSubmissionPromiseResult {
411
+ success: boolean;
412
+ reason?: string;
413
+ data?: unknown;
414
+ }
415
+
409
416
  export interface CMSGetFormLockStatusPromiseResult {
410
417
  success: boolean;
411
418
  reason?: string;
@@ -473,6 +473,11 @@ export class REST extends EventEmitter {
473
473
  uniqueId: args[7],
474
474
  };
475
475
  }
476
+ case 'GET_FORM_SUBMISSION': {
477
+ return {
478
+ id: args[0]
479
+ };
480
+ }
476
481
  case 'BAN_ACCOUNT': {
477
482
  return {
478
483
  apiId: args[0],
@@ -590,6 +590,12 @@ export const FormsCMSAPITypes: APITypeData[] = [
590
590
  path: 'forms/set_form_lock_status',
591
591
  method: 'POST',
592
592
  minVersion: 0
593
+ },
594
+ {
595
+ type: 'GET_FORM_SUBMISSION',
596
+ path: 'forms/get_submission',
597
+ method: 'POST',
598
+ minVersion: 0
593
599
  }
594
600
  ];
595
601
 
@@ -709,7 +715,7 @@ function formatForAll(array: APITypeData[], product: productEnums): AllAPITypeDa
709
715
 
710
716
  export const AllAPITypes: AllAPITypeData[] = [ ...formatForAll(GeneralCADAPITypes, productEnums.CAD), ...formatForAll(CivilianCADAPITypes, productEnums.CAD), ...formatForAll(EmergencyCADAPITypes, productEnums.CAD), ...formatForAll(GeneralCMSAPITypes, productEnums.CMS), ...formatForAll(ServersCMSAPITypes, productEnums.CMS), ...formatForAll(EventsCMSAPITypes, productEnums.CMS), ...formatForAll(FormsCMSAPITypes, productEnums.CMS), ...formatForAll(CommunitiesCMSAPITypes, productEnums.CMS), ...formatForAll(ERLCMSAPITypes, productEnums.CMS), ...formatForAll(RadioAPITypes, productEnums.RADIO) ];
711
717
 
712
- export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'SEND_DRAFT' | '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' | 'IDENTS_TO_GROUP' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_MY_CALL' | '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_CLOCKIN_TYPES' | 'GET_LATEST_ACTIVITY' | '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' | 'GET_FORM_LOCK_STATUS' | 'SET_FORM_LOCK_STATUS' | 'GET_CURRENT_SESSION' | 'START_SESSION' | 'STOP_SESSION' | 'CANCEL_SESSION' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | 'TRIGGER_PROMOTION_FLOWS' | 'GET_PROMOTION_FLOWS' | 'GET_CUSTOM_LOG_TYPES' | 'SET_GAME_SERVERS' | 'ERLC_GET_ONLINE_PLAYERS' | 'ERLC_GET_PLAYER_QUEUE' | 'ERLC_ADD_NEW_RECORD' | 'ERLC_EXECUTE_COMMAND' | 'ERLC_TEAMS_LOCK' | 'ERLC_TEAMS_UNLOCK' | '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' | 'PLAY_TONE';
718
+ export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'SEND_DRAFT' | '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' | 'IDENTS_TO_GROUP' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_MY_CALL' | '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_CLOCKIN_TYPES' | 'GET_LATEST_ACTIVITY' | '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_SUBMISSION' | 'GET_FORM_TEMPLATE_SUBMISSIONS' | 'GET_FORM_LOCK_STATUS' | 'SET_FORM_LOCK_STATUS' | 'GET_CURRENT_SESSION' | 'START_SESSION' | 'STOP_SESSION' | 'CANCEL_SESSION' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT' | 'LOOKUP' | 'EDIT_ACC_PROFLIE_FIELDS' | 'SET_ACCOUNT_NAME' | 'FORCE_SYNC' | 'TRIGGER_PROMOTION_FLOWS' | 'GET_PROMOTION_FLOWS' | 'GET_CUSTOM_LOG_TYPES' | 'SET_GAME_SERVERS' | 'ERLC_GET_ONLINE_PLAYERS' | 'ERLC_GET_PLAYER_QUEUE' | 'ERLC_ADD_NEW_RECORD' | 'ERLC_EXECUTE_COMMAND' | 'ERLC_TEAMS_LOCK' | 'ERLC_TEAMS_UNLOCK' | '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' | 'PLAY_TONE';
713
719
 
714
720
  export interface CMSServerAPIStruct {
715
721
  id: number;
@@ -1014,6 +1020,7 @@ interface CADNewDispatchBaseStruct {
1014
1020
  description: string;
1015
1021
  notes: CADDispatchNoteStruct[];
1016
1022
  metaData: Record<string, string>;
1023
+ deleteAfterMinutes?: number;
1017
1024
  }
1018
1025
 
1019
1026
  export type CADNewDispatchStruct =
@@ -1335,6 +1342,9 @@ export interface RESTTypedAPIDataStructs {
1335
1342
  discord: string | undefined,
1336
1343
  uniqueId: number,
1337
1344
  ]
1345
+ GET_FORM_SUBMISSION: [
1346
+ id: number,
1347
+ ]
1338
1348
  GET_FORM_TEMPLATE_SUBMISSIONS: [
1339
1349
  templateId: number,
1340
1350
  skip?: number,
@@ -464,6 +464,28 @@ export class CMSManager extends BaseManager {
464
464
  });
465
465
  }
466
466
 
467
+ /**
468
+ * Gets the form submission object for the given ID
469
+ */
470
+ public async getFormSubmission(formId: number): Promise<globalTypes.CMSGetFormSubmissionPromiseResult> {
471
+ if (!formId) {
472
+ throw new Error('formId is required to fetch submission');
473
+ }
474
+
475
+ return new Promise(async (resolve, reject) => {
476
+ try {
477
+ const response: any = await this.rest?.request('GET_FORM_SUBMISSION', formId);
478
+ resolve({ success: true, data: response });
479
+ } catch (err) {
480
+ if (err instanceof APIError) {
481
+ resolve({ success: false, reason: err.response });
482
+ } else {
483
+ reject(err);
484
+ }
485
+ }
486
+ });
487
+ }
488
+
467
489
  /**
468
490
  * Retrieves the lock status for a form template.
469
491
  */