@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.
- package/dist/cjs/AIAgent.d.ts +16 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +34 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/AppointmentAgent.d.ts +117 -0
- package/dist/cjs/AppointmentAgent.d.ts.map +1 -1
- package/dist/cjs/AppointmentAgent.js +242 -0
- package/dist/cjs/AppointmentAgent.js.map +1 -1
- package/dist/cjs/CRMScriptAgent.d.ts +31 -0
- package/dist/cjs/CRMScriptAgent.d.ts.map +1 -1
- package/dist/cjs/CRMScriptAgent.js +67 -0
- package/dist/cjs/CRMScriptAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +1289 -31
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/Converters.d.ts +30 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +635 -30
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomerServiceAgent.d.ts +30 -0
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +66 -0
- package/dist/cjs/CustomerServiceAgent.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +105 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +229 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/DocumentAgent.d.ts +17 -0
- package/dist/cjs/DocumentAgent.d.ts.map +1 -1
- package/dist/cjs/DocumentAgent.js +36 -0
- package/dist/cjs/DocumentAgent.js.map +1 -1
- package/dist/cjs/DocumentMigrationAgent.d.ts +7 -0
- package/dist/cjs/DocumentMigrationAgent.d.ts.map +1 -1
- package/dist/cjs/DocumentMigrationAgent.js +24 -0
- package/dist/cjs/DocumentMigrationAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +33 -0
- package/dist/cjs/EMailAgent.d.ts.map +1 -1
- package/dist/cjs/EMailAgent.js +69 -0
- package/dist/cjs/EMailAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +299 -5
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +309 -4
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +15 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +33 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +23 -22
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +36 -48
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/MDOAgent.d.ts +1 -1
- package/dist/cjs/MarketingAgent.d.ts +31 -0
- package/dist/cjs/MarketingAgent.d.ts.map +1 -1
- package/dist/cjs/MarketingAgent.js +67 -0
- package/dist/cjs/MarketingAgent.js.map +1 -1
- package/dist/cjs/PersonAgent.d.ts +35 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +71 -0
- package/dist/cjs/PersonAgent.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +16 -0
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +34 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/QuoteAgent.d.ts +16 -0
- package/dist/cjs/QuoteAgent.d.ts.map +1 -1
- package/dist/cjs/QuoteAgent.js +34 -0
- package/dist/cjs/QuoteAgent.js.map +1 -1
- package/dist/cjs/SaleAgent.d.ts +47 -0
- package/dist/cjs/SaleAgent.d.ts.map +1 -1
- package/dist/cjs/SaleAgent.js +101 -0
- package/dist/cjs/SaleAgent.js.map +1 -1
- package/dist/cjs/SelectionAgent.d.ts +15 -7
- package/dist/cjs/SelectionAgent.d.ts.map +1 -1
- package/dist/cjs/SelectionAgent.js +33 -21
- package/dist/cjs/SelectionAgent.js.map +1 -1
- package/dist/cjs/SentryAgent.d.ts +15 -0
- package/dist/cjs/SentryAgent.d.ts.map +1 -1
- package/dist/cjs/SentryAgent.js +33 -0
- package/dist/cjs/SentryAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +117 -2
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +255 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/cjs/WorkflowAgent.d.ts +80 -2
- package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
- package/dist/cjs/WorkflowAgent.js +188 -0
- package/dist/cjs/WorkflowAgent.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +16 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +34 -0
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/AppointmentAgent.d.ts +117 -0
- package/dist/esm/AppointmentAgent.d.ts.map +1 -1
- package/dist/esm/AppointmentAgent.js +242 -0
- package/dist/esm/AppointmentAgent.js.map +1 -1
- package/dist/esm/CRMScriptAgent.d.ts +31 -0
- package/dist/esm/CRMScriptAgent.d.ts.map +1 -1
- package/dist/esm/CRMScriptAgent.js +67 -0
- package/dist/esm/CRMScriptAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +1289 -31
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/Converters.d.ts +30 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +582 -8
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomerServiceAgent.d.ts +30 -0
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +66 -0
- package/dist/esm/CustomerServiceAgent.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +105 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +229 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/DocumentAgent.d.ts +17 -0
- package/dist/esm/DocumentAgent.d.ts.map +1 -1
- package/dist/esm/DocumentAgent.js +36 -0
- package/dist/esm/DocumentAgent.js.map +1 -1
- package/dist/esm/DocumentMigrationAgent.d.ts +7 -0
- package/dist/esm/DocumentMigrationAgent.d.ts.map +1 -1
- package/dist/esm/DocumentMigrationAgent.js +24 -0
- package/dist/esm/DocumentMigrationAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +33 -0
- package/dist/esm/EMailAgent.d.ts.map +1 -1
- package/dist/esm/EMailAgent.js +69 -0
- package/dist/esm/EMailAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +299 -5
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +305 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +15 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +33 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +23 -22
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +36 -48
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/MDOAgent.d.ts +1 -1
- package/dist/esm/MarketingAgent.d.ts +31 -0
- package/dist/esm/MarketingAgent.d.ts.map +1 -1
- package/dist/esm/MarketingAgent.js +67 -0
- package/dist/esm/MarketingAgent.js.map +1 -1
- package/dist/esm/PersonAgent.d.ts +35 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +71 -0
- package/dist/esm/PersonAgent.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +16 -0
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +34 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/QuoteAgent.d.ts +16 -0
- package/dist/esm/QuoteAgent.d.ts.map +1 -1
- package/dist/esm/QuoteAgent.js +34 -0
- package/dist/esm/QuoteAgent.js.map +1 -1
- package/dist/esm/SaleAgent.d.ts +47 -0
- package/dist/esm/SaleAgent.d.ts.map +1 -1
- package/dist/esm/SaleAgent.js +101 -0
- package/dist/esm/SaleAgent.js.map +1 -1
- package/dist/esm/SelectionAgent.d.ts +15 -7
- package/dist/esm/SelectionAgent.d.ts.map +1 -1
- package/dist/esm/SelectionAgent.js +33 -21
- package/dist/esm/SelectionAgent.js.map +1 -1
- package/dist/esm/SentryAgent.d.ts +15 -0
- package/dist/esm/SentryAgent.d.ts.map +1 -1
- package/dist/esm/SentryAgent.js +33 -0
- package/dist/esm/SentryAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +117 -2
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +255 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/dist/esm/WorkflowAgent.d.ts +80 -2
- package/dist/esm/WorkflowAgent.d.ts.map +1 -1
- package/dist/esm/WorkflowAgent.js +188 -0
- package/dist/esm/WorkflowAgent.js.map +1 -1
- package/package.json +5 -6
- package/src/AIAgent.ts +58 -0
- package/src/AppointmentAgent.ts +406 -0
- package/src/CRMScriptAgent.ts +114 -0
- package/src/Carriers.ts +1667 -34
- package/src/Converters.ts +677 -9
- package/src/CustomerServiceAgent.ts +112 -0
- package/src/DiagnosticsAgent.ts +380 -0
- package/src/DocumentAgent.ts +61 -0
- package/src/DocumentMigrationAgent.ts +30 -0
- package/src/EMailAgent.ts +118 -0
- package/src/Enums.ts +316 -0
- package/src/LicenseAgent.ts +56 -0
- package/src/ListAgent.ts +69 -65
- package/src/MDOAgent.ts +1 -1
- package/src/MarketingAgent.ts +114 -0
- package/src/PersonAgent.ts +122 -0
- package/src/ProjectAgent.ts +58 -0
- package/src/QuoteAgent.ts +58 -0
- package/src/SaleAgent.ts +172 -0
- package/src/SelectionAgent.ts +56 -23
- package/src/SentryAgent.ts +56 -0
- package/src/TicketAgent.ts +432 -2
- package/src/WorkflowAgent.ts +268 -2
package/src/WorkflowAgent.ts
CHANGED
|
@@ -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
|
|