@superoffice/webapi 10.5.3 → 10.5.5

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 (198) hide show
  1. package/dist/cjs/AIAgent.d.ts +16 -0
  2. package/dist/cjs/AIAgent.d.ts.map +1 -1
  3. package/dist/cjs/AIAgent.js +34 -0
  4. package/dist/cjs/AIAgent.js.map +1 -1
  5. package/dist/cjs/AppointmentAgent.d.ts +117 -0
  6. package/dist/cjs/AppointmentAgent.d.ts.map +1 -1
  7. package/dist/cjs/AppointmentAgent.js +242 -0
  8. package/dist/cjs/AppointmentAgent.js.map +1 -1
  9. package/dist/cjs/CRMScriptAgent.d.ts +31 -0
  10. package/dist/cjs/CRMScriptAgent.d.ts.map +1 -1
  11. package/dist/cjs/CRMScriptAgent.js +67 -0
  12. package/dist/cjs/CRMScriptAgent.js.map +1 -1
  13. package/dist/cjs/Carriers.d.ts +1289 -31
  14. package/dist/cjs/Carriers.d.ts.map +1 -1
  15. package/dist/cjs/Converters.d.ts +30 -0
  16. package/dist/cjs/Converters.d.ts.map +1 -1
  17. package/dist/cjs/Converters.js +635 -30
  18. package/dist/cjs/Converters.js.map +1 -1
  19. package/dist/cjs/CustomerServiceAgent.d.ts +30 -0
  20. package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
  21. package/dist/cjs/CustomerServiceAgent.js +66 -0
  22. package/dist/cjs/CustomerServiceAgent.js.map +1 -1
  23. package/dist/cjs/DiagnosticsAgent.d.ts +105 -0
  24. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  25. package/dist/cjs/DiagnosticsAgent.js +229 -0
  26. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  27. package/dist/cjs/DocumentAgent.d.ts +17 -0
  28. package/dist/cjs/DocumentAgent.d.ts.map +1 -1
  29. package/dist/cjs/DocumentAgent.js +36 -0
  30. package/dist/cjs/DocumentAgent.js.map +1 -1
  31. package/dist/cjs/DocumentMigrationAgent.d.ts +7 -0
  32. package/dist/cjs/DocumentMigrationAgent.d.ts.map +1 -1
  33. package/dist/cjs/DocumentMigrationAgent.js +24 -0
  34. package/dist/cjs/DocumentMigrationAgent.js.map +1 -1
  35. package/dist/cjs/EMailAgent.d.ts +33 -0
  36. package/dist/cjs/EMailAgent.d.ts.map +1 -1
  37. package/dist/cjs/EMailAgent.js +69 -0
  38. package/dist/cjs/EMailAgent.js.map +1 -1
  39. package/dist/cjs/Enums.d.ts +299 -5
  40. package/dist/cjs/Enums.d.ts.map +1 -1
  41. package/dist/cjs/Enums.js +309 -4
  42. package/dist/cjs/Enums.js.map +1 -1
  43. package/dist/cjs/LicenseAgent.d.ts +15 -0
  44. package/dist/cjs/LicenseAgent.d.ts.map +1 -1
  45. package/dist/cjs/LicenseAgent.js +33 -0
  46. package/dist/cjs/LicenseAgent.js.map +1 -1
  47. package/dist/cjs/ListAgent.d.ts +23 -22
  48. package/dist/cjs/ListAgent.d.ts.map +1 -1
  49. package/dist/cjs/ListAgent.js +36 -48
  50. package/dist/cjs/ListAgent.js.map +1 -1
  51. package/dist/cjs/MDOAgent.d.ts +1 -1
  52. package/dist/cjs/MarketingAgent.d.ts +31 -0
  53. package/dist/cjs/MarketingAgent.d.ts.map +1 -1
  54. package/dist/cjs/MarketingAgent.js +67 -0
  55. package/dist/cjs/MarketingAgent.js.map +1 -1
  56. package/dist/cjs/PersonAgent.d.ts +35 -0
  57. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  58. package/dist/cjs/PersonAgent.js +71 -0
  59. package/dist/cjs/PersonAgent.js.map +1 -1
  60. package/dist/cjs/ProjectAgent.d.ts +16 -0
  61. package/dist/cjs/ProjectAgent.d.ts.map +1 -1
  62. package/dist/cjs/ProjectAgent.js +34 -0
  63. package/dist/cjs/ProjectAgent.js.map +1 -1
  64. package/dist/cjs/QuoteAgent.d.ts +16 -0
  65. package/dist/cjs/QuoteAgent.d.ts.map +1 -1
  66. package/dist/cjs/QuoteAgent.js +34 -0
  67. package/dist/cjs/QuoteAgent.js.map +1 -1
  68. package/dist/cjs/SaleAgent.d.ts +47 -0
  69. package/dist/cjs/SaleAgent.d.ts.map +1 -1
  70. package/dist/cjs/SaleAgent.js +101 -0
  71. package/dist/cjs/SaleAgent.js.map +1 -1
  72. package/dist/cjs/SelectionAgent.d.ts +15 -7
  73. package/dist/cjs/SelectionAgent.d.ts.map +1 -1
  74. package/dist/cjs/SelectionAgent.js +33 -21
  75. package/dist/cjs/SelectionAgent.js.map +1 -1
  76. package/dist/cjs/SentryAgent.d.ts +15 -0
  77. package/dist/cjs/SentryAgent.d.ts.map +1 -1
  78. package/dist/cjs/SentryAgent.js +33 -0
  79. package/dist/cjs/SentryAgent.js.map +1 -1
  80. package/dist/cjs/TicketAgent.d.ts +117 -2
  81. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  82. package/dist/cjs/TicketAgent.js +255 -0
  83. package/dist/cjs/TicketAgent.js.map +1 -1
  84. package/dist/cjs/WorkflowAgent.d.ts +80 -2
  85. package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
  86. package/dist/cjs/WorkflowAgent.js +188 -0
  87. package/dist/cjs/WorkflowAgent.js.map +1 -1
  88. package/dist/esm/AIAgent.d.ts +16 -0
  89. package/dist/esm/AIAgent.d.ts.map +1 -1
  90. package/dist/esm/AIAgent.js +34 -0
  91. package/dist/esm/AIAgent.js.map +1 -1
  92. package/dist/esm/AppointmentAgent.d.ts +117 -0
  93. package/dist/esm/AppointmentAgent.d.ts.map +1 -1
  94. package/dist/esm/AppointmentAgent.js +242 -0
  95. package/dist/esm/AppointmentAgent.js.map +1 -1
  96. package/dist/esm/CRMScriptAgent.d.ts +31 -0
  97. package/dist/esm/CRMScriptAgent.d.ts.map +1 -1
  98. package/dist/esm/CRMScriptAgent.js +67 -0
  99. package/dist/esm/CRMScriptAgent.js.map +1 -1
  100. package/dist/esm/Carriers.d.ts +1289 -31
  101. package/dist/esm/Carriers.d.ts.map +1 -1
  102. package/dist/esm/Converters.d.ts +30 -0
  103. package/dist/esm/Converters.d.ts.map +1 -1
  104. package/dist/esm/Converters.js +582 -8
  105. package/dist/esm/Converters.js.map +1 -1
  106. package/dist/esm/CustomerServiceAgent.d.ts +30 -0
  107. package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
  108. package/dist/esm/CustomerServiceAgent.js +66 -0
  109. package/dist/esm/CustomerServiceAgent.js.map +1 -1
  110. package/dist/esm/DiagnosticsAgent.d.ts +105 -0
  111. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  112. package/dist/esm/DiagnosticsAgent.js +229 -0
  113. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  114. package/dist/esm/DocumentAgent.d.ts +17 -0
  115. package/dist/esm/DocumentAgent.d.ts.map +1 -1
  116. package/dist/esm/DocumentAgent.js +36 -0
  117. package/dist/esm/DocumentAgent.js.map +1 -1
  118. package/dist/esm/DocumentMigrationAgent.d.ts +7 -0
  119. package/dist/esm/DocumentMigrationAgent.d.ts.map +1 -1
  120. package/dist/esm/DocumentMigrationAgent.js +24 -0
  121. package/dist/esm/DocumentMigrationAgent.js.map +1 -1
  122. package/dist/esm/EMailAgent.d.ts +33 -0
  123. package/dist/esm/EMailAgent.d.ts.map +1 -1
  124. package/dist/esm/EMailAgent.js +69 -0
  125. package/dist/esm/EMailAgent.js.map +1 -1
  126. package/dist/esm/Enums.d.ts +299 -5
  127. package/dist/esm/Enums.d.ts.map +1 -1
  128. package/dist/esm/Enums.js +305 -0
  129. package/dist/esm/Enums.js.map +1 -1
  130. package/dist/esm/LicenseAgent.d.ts +15 -0
  131. package/dist/esm/LicenseAgent.d.ts.map +1 -1
  132. package/dist/esm/LicenseAgent.js +33 -0
  133. package/dist/esm/LicenseAgent.js.map +1 -1
  134. package/dist/esm/ListAgent.d.ts +23 -22
  135. package/dist/esm/ListAgent.d.ts.map +1 -1
  136. package/dist/esm/ListAgent.js +36 -48
  137. package/dist/esm/ListAgent.js.map +1 -1
  138. package/dist/esm/MDOAgent.d.ts +1 -1
  139. package/dist/esm/MarketingAgent.d.ts +31 -0
  140. package/dist/esm/MarketingAgent.d.ts.map +1 -1
  141. package/dist/esm/MarketingAgent.js +67 -0
  142. package/dist/esm/MarketingAgent.js.map +1 -1
  143. package/dist/esm/PersonAgent.d.ts +35 -0
  144. package/dist/esm/PersonAgent.d.ts.map +1 -1
  145. package/dist/esm/PersonAgent.js +71 -0
  146. package/dist/esm/PersonAgent.js.map +1 -1
  147. package/dist/esm/ProjectAgent.d.ts +16 -0
  148. package/dist/esm/ProjectAgent.d.ts.map +1 -1
  149. package/dist/esm/ProjectAgent.js +34 -0
  150. package/dist/esm/ProjectAgent.js.map +1 -1
  151. package/dist/esm/QuoteAgent.d.ts +16 -0
  152. package/dist/esm/QuoteAgent.d.ts.map +1 -1
  153. package/dist/esm/QuoteAgent.js +34 -0
  154. package/dist/esm/QuoteAgent.js.map +1 -1
  155. package/dist/esm/SaleAgent.d.ts +47 -0
  156. package/dist/esm/SaleAgent.d.ts.map +1 -1
  157. package/dist/esm/SaleAgent.js +101 -0
  158. package/dist/esm/SaleAgent.js.map +1 -1
  159. package/dist/esm/SelectionAgent.d.ts +15 -7
  160. package/dist/esm/SelectionAgent.d.ts.map +1 -1
  161. package/dist/esm/SelectionAgent.js +33 -21
  162. package/dist/esm/SelectionAgent.js.map +1 -1
  163. package/dist/esm/SentryAgent.d.ts +15 -0
  164. package/dist/esm/SentryAgent.d.ts.map +1 -1
  165. package/dist/esm/SentryAgent.js +33 -0
  166. package/dist/esm/SentryAgent.js.map +1 -1
  167. package/dist/esm/TicketAgent.d.ts +117 -2
  168. package/dist/esm/TicketAgent.d.ts.map +1 -1
  169. package/dist/esm/TicketAgent.js +255 -0
  170. package/dist/esm/TicketAgent.js.map +1 -1
  171. package/dist/esm/WorkflowAgent.d.ts +80 -2
  172. package/dist/esm/WorkflowAgent.d.ts.map +1 -1
  173. package/dist/esm/WorkflowAgent.js +188 -0
  174. package/dist/esm/WorkflowAgent.js.map +1 -1
  175. package/package.json +5 -6
  176. package/src/AIAgent.ts +58 -0
  177. package/src/AppointmentAgent.ts +406 -0
  178. package/src/CRMScriptAgent.ts +114 -0
  179. package/src/Carriers.ts +1667 -34
  180. package/src/Converters.ts +677 -9
  181. package/src/CustomerServiceAgent.ts +112 -0
  182. package/src/DiagnosticsAgent.ts +380 -0
  183. package/src/DocumentAgent.ts +61 -0
  184. package/src/DocumentMigrationAgent.ts +30 -0
  185. package/src/EMailAgent.ts +118 -0
  186. package/src/Enums.ts +316 -0
  187. package/src/LicenseAgent.ts +56 -0
  188. package/src/ListAgent.ts +69 -65
  189. package/src/MDOAgent.ts +1 -1
  190. package/src/MarketingAgent.ts +114 -0
  191. package/src/PersonAgent.ts +122 -0
  192. package/src/ProjectAgent.ts +58 -0
  193. package/src/QuoteAgent.ts +58 -0
  194. package/src/SaleAgent.ts +172 -0
  195. package/src/SelectionAgent.ts +56 -23
  196. package/src/SentryAgent.ts +56 -0
  197. package/src/TicketAgent.ts +432 -2
  198. package/src/WorkflowAgent.ts +268 -2
@@ -39,6 +39,9 @@ export interface IWorkflowAgent {
39
39
  createDefaultWorkflowTriggerAsync(): Promise< carriers.WorkflowTrigger >;
40
40
  saveWorkflowTriggerAsync(entity: carriers.WorkflowTrigger) : Promise< carriers.WorkflowTrigger >;
41
41
  deleteWorkflowTriggerAsync(WorkflowTriggerId: number) : Promise<void>;
42
+ createDefaultWorkflowWaitForActionAsync(): Promise< carriers.WorkflowWaitForAction >;
43
+ saveWorkflowWaitForActionAsync(entity: carriers.WorkflowWaitForAction) : Promise< carriers.WorkflowWaitForAction >;
44
+ deleteWorkflowWaitForActionAsync(WorkflowWaitForActionId: number) : Promise<void>;
42
45
  getEmailFlowAsync(emailFlowId: number) : Promise< carriers.EmailFlow >;
43
46
  tryAddPersonsToEmailFlowAsync(request: carriers.Workflow_TryAddPersonsToEmailFlowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean[] >;
44
47
  tryAddPersonsToEmailFlowAsync(emailFlowId: number, personIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< boolean[] >;
@@ -50,6 +53,12 @@ export interface IWorkflowAgent {
50
53
  connectEmailFlowContentAsync(emailFlowId: number, messageId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
51
54
  copyEmailFlowContentAsync(request: carriers.Workflow_CopyEmailFlowContentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
52
55
  copyEmailFlowContentAsync(emailFlowId: number, shipmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
56
+ updateFormSubmissionsAsync(request: carriers.Workflow_UpdateFormSubmissionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
57
+ updateFormSubmissionsAsync(maxCount: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
58
+ setStatusOnWorkflowAsync(request: carriers.Workflow_SetStatusOnWorkflowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus >;
59
+ setStatusOnWorkflowAsync(emailFlowId: number, status: enums.WorkflowDefinitionStatus, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus >;
60
+ copyEmailFlowAsync(request: carriers.Workflow_CopyEmailFlowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
61
+ copyEmailFlowAsync(emailFlowId: number, newName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
53
62
  runAsync(webapi_options?:base.WebApiRequestOptions) : Promise< Date >;
54
63
  sendEventAsync(request: carriers.Workflow_SendEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowEventResult >;
55
64
  sendEventAsync(workflowEvent: carriers.WorkflowEvent, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowEventResult >;
@@ -65,6 +74,7 @@ export interface IWorkflowAgent {
65
74
  getWorkflowStepOptionAsync(request: carriers.Workflow_GetWorkflowStepOptionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowStepOptionBase >;
66
75
  getWorkflowStepOptionAsync(workflowStepOptionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowStepOptionBase >;
67
76
  getWorkflowTriggerAsync(workflowTriggerId: number) : Promise< carriers.WorkflowTrigger >;
77
+ getWorkflowWaitForActionAsync(workflowWaitForActionId: number) : Promise< carriers.WorkflowWaitForAction >;
68
78
  } // interface IWorkflowAgent
69
79
 
70
80
 
@@ -363,6 +373,73 @@ export class WorkflowAgent extends base.WebApiBase implements IWorkflowAgent {
363
373
  }
364
374
  });
365
375
  }
376
+
377
+ /**
378
+ * Set default values into a new WorkflowWaitForAction.
379
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
380
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
381
+ * @returns A blank entity.
382
+ */
383
+ public async createDefaultWorkflowWaitForActionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowWaitForAction > {
384
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
385
+ base.WebApiBase.SetPending(options);
386
+ return new Promise< carriers.WorkflowWaitForAction >(async (resolve, reject) => {
387
+ try {
388
+ const response = await this._axios.post("CreateDefaultWorkflowWaitForAction", null, config);
389
+ base.WebApiBase.SetCompleted(options);
390
+ const res : carriers.WorkflowWaitForAction = converters.Create_WorkflowWaitForAction_From( response.data );
391
+ resolve(res);
392
+ }
393
+ catch( err ) {
394
+ base.WebApiBase.HandleError(options, config, err);
395
+ reject(err);
396
+ }
397
+ });
398
+ }
399
+ /**
400
+ * Replace the existing WorkflowWaitForAction or creates a new WorkflowWaitForAction if the id parameter is empty
401
+ * @param entity - The WorkflowWaitForAction to be saved.
402
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
403
+ * @returns New or updated WorkflowWaitForAction
404
+ */
405
+ public async saveWorkflowWaitForActionAsync(entity: carriers.WorkflowWaitForAction, options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowWaitForAction > {
406
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
407
+ base.WebApiBase.SetPending(options);
408
+ return new Promise< carriers.WorkflowWaitForAction >(async (resolve, reject) => {
409
+ try {
410
+ const response = await this._axios.post("SaveWorkflowWaitForAction", entity, config);
411
+ base.WebApiBase.SetCompleted(options);
412
+ const res : carriers.WorkflowWaitForAction = converters.Create_WorkflowWaitForAction_From( response.data );
413
+ resolve(res);
414
+ }
415
+ catch( err ) {
416
+ base.WebApiBase.HandleError(options, config, err);
417
+ reject(err);
418
+ }
419
+ });
420
+ }
421
+
422
+ /**
423
+ * Deletes the WorkflowWaitForAction
424
+ * @param WorkflowWaitForActionId - The id of the WorkflowWaitForAction to be deleted.
425
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
426
+ */
427
+ public async deleteWorkflowWaitForActionAsync(WorkflowWaitForActionId: number, options?:base.WebApiRequestOptions) : Promise< void > {
428
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
429
+ base.WebApiBase.SetPending(options);
430
+ return new Promise< void >(async (resolve, reject) => {
431
+ try {
432
+ const response = await this._axios.post("DeleteWorkflowWaitForAction?WorkflowWaitForActionId=" + WorkflowWaitForActionId, null, config );
433
+ base.WebApiBase.SetCompleted(options);
434
+ const res = response.data;
435
+ resolve(res);
436
+ }
437
+ catch( err ) {
438
+ base.WebApiBase.HandleError(options, config, err);
439
+ reject(err);
440
+ }
441
+ });
442
+ }
366
443
  /**
367
444
  * Gets a EmailFlow object.
368
445
  * @param emailFlowId - The primary key.
@@ -408,14 +485,14 @@ export class WorkflowAgent extends base.WebApiBase implements IWorkflowAgent {
408
485
 
409
486
 
410
487
  /**
411
- * Try to add a participant to the EmailFlow
488
+ * Try to add a participant to the EmailFlow. Same function available in PersonAgent
412
489
  * @param request - EmailFlowId, PersonIds
413
490
  * @returns True if the corresponding participant was successfully added, false if it could not be added because of filter criteria or other reason
414
491
  */
415
492
  public async tryAddPersonsToEmailFlowAsync(request: carriers.Workflow_TryAddPersonsToEmailFlowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean[] >;
416
493
 
417
494
  /**
418
- * Try to add a participant to the EmailFlow
495
+ * Try to add a participant to the EmailFlow. Same function available in PersonAgent
419
496
  * @param emailFlowId - Primary key of EmailFlow
420
497
  * @param personIds - Array of Person Ids
421
498
  * @returns True if the corresponding participant was successfully added, false if it could not be added because of filter criteria or other reason
@@ -667,6 +744,172 @@ export class WorkflowAgent extends base.WebApiBase implements IWorkflowAgent {
667
744
  }
668
745
 
669
746
 
747
+ private async _updateFormSubmissionsAsync(request: carriers.Workflow_UpdateFormSubmissionsRequest, options?:base.WebApiRequestOptions) : Promise< number > {
748
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
749
+ base.WebApiBase.SetPending(options);
750
+ return new Promise< number >(async (resolve, reject) => {
751
+ try {
752
+ config.baseURL = this._options.baseUrl;
753
+ const response = await this._axios.post("UpdateFormSubmissions", request , config);
754
+ base.WebApiBase.SetCompleted(options);
755
+ const res : number = response.data as number;
756
+ resolve(res);
757
+ }
758
+ catch( err ) {
759
+ base.WebApiBase.HandleError(options, config, err);
760
+ reject(err);
761
+ }
762
+ });
763
+ }
764
+
765
+
766
+
767
+ /**
768
+ * Attempt to update stored field values for up to the given number of form submissions
769
+ * @param request - MaxCount
770
+ * @returns Number of form submissions converted
771
+ */
772
+ public async updateFormSubmissionsAsync(request: carriers.Workflow_UpdateFormSubmissionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
773
+
774
+ /**
775
+ * Attempt to update stored field values for up to the given number of form submissions
776
+ * @param maxCount - The maximum number of form submissions to attempt to save as form field values.
777
+ * @returns Number of form submissions converted
778
+ */
779
+ public async updateFormSubmissionsAsync(maxCount: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
780
+
781
+ public async updateFormSubmissionsAsync(maxCount:number|carriers.Workflow_UpdateFormSubmissionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
782
+ let _request : carriers.Workflow_UpdateFormSubmissionsRequest = null;
783
+ let _options : base.WebApiRequestOptions = null;
784
+ const first : any = maxCount;
785
+ if( typeof( first ) === "object" && first && ( typeof(first.maxCount)!='undefined' ) )
786
+ {
787
+ _request = maxCount as carriers.Workflow_UpdateFormSubmissionsRequest;
788
+ _options = webapi_options as base.WebApiRequestOptions;
789
+ }
790
+ else
791
+ {
792
+ _request = {
793
+ maxCount: maxCount as number,
794
+ };
795
+ _options = webapi_options;
796
+ }
797
+ return this._updateFormSubmissionsAsync( _request, _options );
798
+ }
799
+
800
+
801
+ private async _setStatusOnWorkflowAsync(request: carriers.Workflow_SetStatusOnWorkflowRequest, options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus > {
802
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
803
+ base.WebApiBase.SetPending(options);
804
+ return new Promise< enums.WorkflowDefinitionStatus >(async (resolve, reject) => {
805
+ try {
806
+ config.baseURL = this._options.baseUrl;
807
+ const response = await this._axios.post("SetStatusOnWorkflow", request , config);
808
+ base.WebApiBase.SetCompleted(options);
809
+ const res : enums.WorkflowDefinitionStatus = response.data as enums.WorkflowDefinitionStatus;
810
+ resolve(res);
811
+ }
812
+ catch( err ) {
813
+ base.WebApiBase.HandleError(options, config, err);
814
+ reject(err);
815
+ }
816
+ });
817
+ }
818
+
819
+
820
+
821
+ /**
822
+ * Set status on workflow, Run or pause flow
823
+ * @param request - EmailFlowId, Status
824
+ * @returns The new status
825
+ */
826
+ public async setStatusOnWorkflowAsync(request: carriers.Workflow_SetStatusOnWorkflowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus >;
827
+
828
+ /**
829
+ * Set status on workflow, Run or pause flow
830
+ * @param emailFlowId - The id of the email flow to run or pause
831
+ * @param status - The new status
832
+ * @returns The new status
833
+ */
834
+ public async setStatusOnWorkflowAsync(emailFlowId: number, status: enums.WorkflowDefinitionStatus, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus >;
835
+
836
+ public async setStatusOnWorkflowAsync(emailFlowId:number|carriers.Workflow_SetStatusOnWorkflowRequest, status?:enums.WorkflowDefinitionStatus|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus > {
837
+ let _request : carriers.Workflow_SetStatusOnWorkflowRequest = null;
838
+ let _options : base.WebApiRequestOptions = null;
839
+ const first : any = emailFlowId;
840
+ if( typeof( first ) === "object" && first && ( typeof(first.emailFlowId)!='undefined' || typeof(first.status)!='undefined' ) )
841
+ {
842
+ _request = emailFlowId as carriers.Workflow_SetStatusOnWorkflowRequest;
843
+ _options = status as base.WebApiRequestOptions;
844
+ }
845
+ else
846
+ {
847
+ _request = {
848
+ emailFlowId: emailFlowId as number,
849
+ status: status as enums.WorkflowDefinitionStatus,
850
+ };
851
+ _options = webapi_options;
852
+ }
853
+ return this._setStatusOnWorkflowAsync( _request, _options );
854
+ }
855
+
856
+
857
+ private async _copyEmailFlowAsync(request: carriers.Workflow_CopyEmailFlowRequest, options?:base.WebApiRequestOptions) : Promise< number > {
858
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
859
+ base.WebApiBase.SetPending(options);
860
+ return new Promise< number >(async (resolve, reject) => {
861
+ try {
862
+ config.baseURL = this._options.baseUrl;
863
+ const response = await this._axios.post("CopyEmailFlow", request , config);
864
+ base.WebApiBase.SetCompleted(options);
865
+ const res : number = response.data as number;
866
+ resolve(res);
867
+ }
868
+ catch( err ) {
869
+ base.WebApiBase.HandleError(options, config, err);
870
+ reject(err);
871
+ }
872
+ });
873
+ }
874
+
875
+
876
+
877
+ /**
878
+ * Copy an email flow.
879
+ * @param request - EmailFlowId, NewName
880
+ * @returns Newly created email flow id for this content
881
+ */
882
+ public async copyEmailFlowAsync(request: carriers.Workflow_CopyEmailFlowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
883
+
884
+ /**
885
+ * Copy an email flow.
886
+ * @param emailFlowId - The EmailFlow to copy.
887
+ * @param newName - The name of the new email flow
888
+ * @returns Newly created email flow id for this content
889
+ */
890
+ public async copyEmailFlowAsync(emailFlowId: number, newName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
891
+
892
+ public async copyEmailFlowAsync(emailFlowId:number|carriers.Workflow_CopyEmailFlowRequest, newName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
893
+ let _request : carriers.Workflow_CopyEmailFlowRequest = null;
894
+ let _options : base.WebApiRequestOptions = null;
895
+ const first : any = emailFlowId;
896
+ if( typeof( first ) === "object" && first && ( typeof(first.emailFlowId)!='undefined' || typeof(first.newName)!='undefined' ) )
897
+ {
898
+ _request = emailFlowId as carriers.Workflow_CopyEmailFlowRequest;
899
+ _options = newName as base.WebApiRequestOptions;
900
+ }
901
+ else
902
+ {
903
+ _request = {
904
+ emailFlowId: emailFlowId as number,
905
+ newName: newName as string,
906
+ };
907
+ _options = webapi_options;
908
+ }
909
+ return this._copyEmailFlowAsync( _request, _options );
910
+ }
911
+
912
+
670
913
  private async _runAsync( options?:base.WebApiRequestOptions) : Promise< Date > {
671
914
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
672
915
  base.WebApiBase.SetPending(options);
@@ -1067,6 +1310,29 @@ export class WorkflowAgent extends base.WebApiBase implements IWorkflowAgent {
1067
1310
  });
1068
1311
  }
1069
1312
 
1313
+ /**
1314
+ * Gets a WorkflowWaitForAction object.
1315
+ * @param workflowWaitForActionId - The primary key.
1316
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1317
+ * @returns A single WorkflowWaitForAction
1318
+ */
1319
+ public async getWorkflowWaitForActionAsync(workflowWaitForActionId: number, options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowWaitForAction > {
1320
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1321
+ base.WebApiBase.SetPending(options);
1322
+ return new Promise< carriers.WorkflowWaitForAction >(async (resolve, reject) => {
1323
+ try {
1324
+ const response = await this._axios.post("GetWorkflowWaitForAction?workflowWaitForActionId=" + workflowWaitForActionId, null, config);
1325
+ base.WebApiBase.SetCompleted(options);
1326
+ const res = converters.Create_WorkflowWaitForAction_From( response.data );
1327
+ resolve(res);
1328
+ }
1329
+ catch( err ) {
1330
+ base.WebApiBase.HandleError(options, config, err);
1331
+ reject(err);
1332
+ }
1333
+ });
1334
+ }
1335
+
1070
1336
  } // class v1WorkflowAgentController
1071
1337
 
1072
1338