@superoffice/webapi 10.5.4 → 11.1.447
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/BLOBAgent.d.ts +0 -31
- package/dist/cjs/BLOBAgent.d.ts.map +1 -1
- package/dist/cjs/BLOBAgent.js +0 -67
- package/dist/cjs/BLOBAgent.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 +1357 -1103
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +14 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +48 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +33 -39
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +664 -595
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomerServiceAgent.d.ts +30 -16
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +66 -44
- 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 +38 -5
- package/dist/cjs/EMailAgent.d.ts.map +1 -1
- package/dist/cjs/EMailAgent.js +70 -1
- package/dist/cjs/EMailAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +297 -246
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +308 -253
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/FreeTextAgent.d.ts +0 -67
- package/dist/cjs/FreeTextAgent.d.ts.map +1 -1
- package/dist/cjs/FreeTextAgent.js +0 -156
- package/dist/cjs/FreeTextAgent.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +37 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +90 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +41 -40
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +51 -63
- 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/NavigatorAgent.d.ts +0 -8
- package/dist/cjs/NavigatorAgent.d.ts.map +1 -1
- package/dist/cjs/NavigatorAgent.js +0 -22
- package/dist/cjs/NavigatorAgent.js.map +1 -1
- package/dist/cjs/PersonAgent.d.ts +53 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +107 -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 -48
- package/dist/cjs/QuoteAgent.d.ts.map +1 -1
- package/dist/cjs/QuoteAgent.js +21 -105
- package/dist/cjs/QuoteAgent.js.map +1 -1
- package/dist/cjs/ReportAgent.d.ts +0 -121
- package/dist/cjs/ReportAgent.d.ts.map +1 -1
- package/dist/cjs/ReportAgent.js +0 -271
- package/dist/cjs/ReportAgent.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 -53
- package/dist/cjs/SelectionAgent.d.ts.map +1 -1
- package/dist/cjs/SelectionAgent.js +33 -131
- 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/ViewStateAgent.d.ts +22 -22
- package/dist/cjs/ViewStateAgent.d.ts.map +1 -1
- package/dist/cjs/ViewStateAgent.js +57 -57
- package/dist/cjs/ViewStateAgent.js.map +1 -1
- package/dist/cjs/WebApi.d.ts +0 -18
- package/dist/cjs/WebApi.d.ts.map +1 -1
- package/dist/cjs/WebApi.js +2 -29
- package/dist/cjs/WebApi.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/BLOBAgent.d.ts +0 -31
- package/dist/esm/BLOBAgent.d.ts.map +1 -1
- package/dist/esm/BLOBAgent.js +0 -67
- package/dist/esm/BLOBAgent.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 +1357 -1103
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +14 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +48 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +33 -39
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +604 -529
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomerServiceAgent.d.ts +30 -16
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +66 -44
- 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 +38 -5
- package/dist/esm/EMailAgent.d.ts.map +1 -1
- package/dist/esm/EMailAgent.js +70 -1
- package/dist/esm/EMailAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +297 -246
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +304 -249
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/FreeTextAgent.d.ts +0 -67
- package/dist/esm/FreeTextAgent.d.ts.map +1 -1
- package/dist/esm/FreeTextAgent.js +0 -156
- package/dist/esm/FreeTextAgent.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +37 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +90 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +41 -40
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +51 -63
- 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/NavigatorAgent.d.ts +0 -8
- package/dist/esm/NavigatorAgent.d.ts.map +1 -1
- package/dist/esm/NavigatorAgent.js +0 -22
- package/dist/esm/NavigatorAgent.js.map +1 -1
- package/dist/esm/PersonAgent.d.ts +53 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +107 -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 -48
- package/dist/esm/QuoteAgent.d.ts.map +1 -1
- package/dist/esm/QuoteAgent.js +21 -105
- package/dist/esm/QuoteAgent.js.map +1 -1
- package/dist/esm/ReportAgent.d.ts +0 -121
- package/dist/esm/ReportAgent.d.ts.map +1 -1
- package/dist/esm/ReportAgent.js +0 -271
- package/dist/esm/ReportAgent.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 -53
- package/dist/esm/SelectionAgent.d.ts.map +1 -1
- package/dist/esm/SelectionAgent.js +33 -131
- 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/ViewStateAgent.d.ts +22 -22
- package/dist/esm/ViewStateAgent.d.ts.map +1 -1
- package/dist/esm/ViewStateAgent.js +57 -57
- package/dist/esm/ViewStateAgent.js.map +1 -1
- package/dist/esm/WebApi.d.ts +0 -18
- package/dist/esm/WebApi.d.ts.map +1 -1
- package/dist/esm/WebApi.js +0 -27
- package/dist/esm/WebApi.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/BLOBAgent.ts +0 -114
- package/src/CRMScriptAgent.ts +114 -0
- package/src/Carriers.ts +1874 -1605
- package/src/ConfigurationAgent.ts +60 -0
- package/src/Converters.ts +704 -643
- package/src/CustomerServiceAgent.ts +112 -47
- package/src/DiagnosticsAgent.ts +380 -0
- package/src/DocumentAgent.ts +61 -0
- package/src/DocumentMigrationAgent.ts +30 -0
- package/src/EMailAgent.ts +123 -5
- package/src/Enums.ts +314 -255
- package/src/FreeTextAgent.ts +0 -254
- package/src/LicenseAgent.ts +142 -0
- package/src/ListAgent.ts +103 -99
- package/src/MDOAgent.ts +1 -1
- package/src/MarketingAgent.ts +114 -0
- package/src/NavigatorAgent.ts +0 -24
- package/src/PersonAgent.ts +184 -0
- package/src/ProjectAgent.ts +58 -0
- package/src/QuoteAgent.ts +44 -179
- package/src/ReportAgent.ts +0 -421
- package/src/SaleAgent.ts +172 -0
- package/src/SelectionAgent.ts +56 -183
- package/src/SentryAgent.ts +56 -0
- package/src/TicketAgent.ts +432 -2
- package/src/ViewStateAgent.ts +86 -86
- package/src/WebApi.ts +0 -36
- package/src/WorkflowAgent.ts +268 -2
- package/dist/cjs/AudienceAgent.d.ts +0 -376
- package/dist/cjs/AudienceAgent.d.ts.map +0 -1
- package/dist/cjs/AudienceAgent.js +0 -888
- package/dist/cjs/AudienceAgent.js.map +0 -1
- package/dist/cjs/DashboardAgent.d.ts +0 -197
- package/dist/cjs/DashboardAgent.d.ts.map +0 -1
- package/dist/cjs/DashboardAgent.js +0 -436
- package/dist/cjs/DashboardAgent.js.map +0 -1
- package/dist/cjs/ReplicationAgent.d.ts +0 -101
- package/dist/cjs/ReplicationAgent.d.ts.map +0 -1
- package/dist/cjs/ReplicationAgent.js +0 -223
- package/dist/cjs/ReplicationAgent.js.map +0 -1
- package/dist/esm/AudienceAgent.d.ts +0 -376
- package/dist/esm/AudienceAgent.d.ts.map +0 -1
- package/dist/esm/AudienceAgent.js +0 -883
- package/dist/esm/AudienceAgent.js.map +0 -1
- package/dist/esm/DashboardAgent.d.ts +0 -197
- package/dist/esm/DashboardAgent.d.ts.map +0 -1
- package/dist/esm/DashboardAgent.js +0 -431
- package/dist/esm/DashboardAgent.js.map +0 -1
- package/dist/esm/ReplicationAgent.d.ts +0 -101
- package/dist/esm/ReplicationAgent.d.ts.map +0 -1
- package/dist/esm/ReplicationAgent.js +0 -218
- package/dist/esm/ReplicationAgent.js.map +0 -1
- package/src/AudienceAgent.ts +0 -1430
- package/src/DashboardAgent.ts +0 -658
- package/src/ReplicationAgent.ts +0 -325
package/src/ViewStateAgent.ts
CHANGED
|
@@ -39,6 +39,9 @@ export interface IViewStateAgent {
|
|
|
39
39
|
getPreviousCurrentAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History >;
|
|
40
40
|
deleteHistoryAsync(request: carriers.ViewState_DeleteHistoryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
41
41
|
deleteHistoryAsync(historyName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
42
|
+
getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
43
|
+
setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
44
|
+
setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
42
45
|
getHistoriesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
43
46
|
getHistoriesByNameAsync(request: carriers.ViewState_GetHistoriesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
44
47
|
getHistoriesByNameAsync(historyName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
@@ -46,9 +49,6 @@ export interface IViewStateAgent {
|
|
|
46
49
|
getHistoriesByNamesAsync(historyNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
47
50
|
saveHistoriesAsync(request: carriers.ViewState_SaveHistoriesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
48
51
|
saveHistoriesAsync(historyName: string, history: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
49
|
-
getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
50
|
-
setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
51
|
-
setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
52
52
|
saveCurrentsAsync(request: carriers.ViewState_SaveCurrentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
53
53
|
saveCurrentsAsync(currents: carriers.History[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
54
54
|
getHistoriesByNamesAndIdsAsync(request: carriers.ViewState_GetHistoriesByNamesAndIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.History[] >;
|
|
@@ -412,6 +412,89 @@ export class ViewStateAgent extends base.WebApiBase implements IViewStateAgent {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
|
|
415
|
+
private async _getHistoryLengthPrefValueAsync( options?:base.WebApiRequestOptions) : Promise< number > {
|
|
416
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
417
|
+
base.WebApiBase.SetPending(options);
|
|
418
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
419
|
+
try {
|
|
420
|
+
config.baseURL = this._options.baseUrl;
|
|
421
|
+
const response = await this._axios.post("GetHistoryLengthPrefValue", undefined , config);
|
|
422
|
+
base.WebApiBase.SetCompleted(options);
|
|
423
|
+
const res : number = response.data as number;
|
|
424
|
+
resolve(res);
|
|
425
|
+
}
|
|
426
|
+
catch( err ) {
|
|
427
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
428
|
+
reject(err);
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Get the logged on user's preferred history list length. Will return the system preference if no user preferences are available.
|
|
436
|
+
* @returns The history list lenght
|
|
437
|
+
*/
|
|
438
|
+
public async getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >
|
|
439
|
+
{
|
|
440
|
+
return this._getHistoryLengthPrefValueAsync(webapi_options);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
private async _setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
445
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
446
|
+
base.WebApiBase.SetPending(options);
|
|
447
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
448
|
+
try {
|
|
449
|
+
config.baseURL = this._options.baseUrl;
|
|
450
|
+
const response = await this._axios.post("SetHistoryLengthPrefValue", request , config);
|
|
451
|
+
base.WebApiBase.SetCompleted(options);
|
|
452
|
+
const res = response.data;
|
|
453
|
+
resolve(res);
|
|
454
|
+
}
|
|
455
|
+
catch( err ) {
|
|
456
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
457
|
+
reject(err);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Set the logged on user's preferred history list length.
|
|
466
|
+
* @param request - Length
|
|
467
|
+
* @returns
|
|
468
|
+
*/
|
|
469
|
+
public async setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Set the logged on user's preferred history list length.
|
|
473
|
+
* @param length - The new history list lenght
|
|
474
|
+
* @returns
|
|
475
|
+
*/
|
|
476
|
+
public async setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
477
|
+
|
|
478
|
+
public async setHistoryLengthPrefValueAsync(length:number|carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
479
|
+
let _request : carriers.ViewState_SetHistoryLengthPrefValueRequest = null;
|
|
480
|
+
let _options : base.WebApiRequestOptions = null;
|
|
481
|
+
const first : any = length;
|
|
482
|
+
if( typeof( first ) === "object" && first && ( typeof(first.length)!='undefined' ) )
|
|
483
|
+
{
|
|
484
|
+
_request = length as carriers.ViewState_SetHistoryLengthPrefValueRequest;
|
|
485
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
486
|
+
}
|
|
487
|
+
else
|
|
488
|
+
{
|
|
489
|
+
_request = {
|
|
490
|
+
length: length as number,
|
|
491
|
+
};
|
|
492
|
+
_options = webapi_options;
|
|
493
|
+
}
|
|
494
|
+
return this._setHistoryLengthPrefValueAsync( _request, _options );
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
|
|
415
498
|
private async _getHistoriesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
|
|
416
499
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
417
500
|
base.WebApiBase.SetPending(options);
|
|
@@ -605,89 +688,6 @@ export class ViewStateAgent extends base.WebApiBase implements IViewStateAgent {
|
|
|
605
688
|
}
|
|
606
689
|
|
|
607
690
|
|
|
608
|
-
private async _getHistoryLengthPrefValueAsync( options?:base.WebApiRequestOptions) : Promise< number > {
|
|
609
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
610
|
-
base.WebApiBase.SetPending(options);
|
|
611
|
-
return new Promise< number >(async (resolve, reject) => {
|
|
612
|
-
try {
|
|
613
|
-
config.baseURL = this._options.baseUrl;
|
|
614
|
-
const response = await this._axios.post("GetHistoryLengthPrefValue", undefined , config);
|
|
615
|
-
base.WebApiBase.SetCompleted(options);
|
|
616
|
-
const res : number = response.data as number;
|
|
617
|
-
resolve(res);
|
|
618
|
-
}
|
|
619
|
-
catch( err ) {
|
|
620
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
621
|
-
reject(err);
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* Get the logged on user's preferred history list length. Will return the system preference if no user preferences are available.
|
|
629
|
-
* @returns The history list lenght
|
|
630
|
-
*/
|
|
631
|
-
public async getHistoryLengthPrefValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >
|
|
632
|
-
{
|
|
633
|
-
return this._getHistoryLengthPrefValueAsync(webapi_options);
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
private async _setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
638
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
639
|
-
base.WebApiBase.SetPending(options);
|
|
640
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
641
|
-
try {
|
|
642
|
-
config.baseURL = this._options.baseUrl;
|
|
643
|
-
const response = await this._axios.post("SetHistoryLengthPrefValue", request , config);
|
|
644
|
-
base.WebApiBase.SetCompleted(options);
|
|
645
|
-
const res = response.data;
|
|
646
|
-
resolve(res);
|
|
647
|
-
}
|
|
648
|
-
catch( err ) {
|
|
649
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
650
|
-
reject(err);
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Set the logged on user's preferred history list length.
|
|
659
|
-
* @param request - Length
|
|
660
|
-
* @returns
|
|
661
|
-
*/
|
|
662
|
-
public async setHistoryLengthPrefValueAsync(request: carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Set the logged on user's preferred history list length.
|
|
666
|
-
* @param length - The new history list lenght
|
|
667
|
-
* @returns
|
|
668
|
-
*/
|
|
669
|
-
public async setHistoryLengthPrefValueAsync(length: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
670
|
-
|
|
671
|
-
public async setHistoryLengthPrefValueAsync(length:number|carriers.ViewState_SetHistoryLengthPrefValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
672
|
-
let _request : carriers.ViewState_SetHistoryLengthPrefValueRequest = null;
|
|
673
|
-
let _options : base.WebApiRequestOptions = null;
|
|
674
|
-
const first : any = length;
|
|
675
|
-
if( typeof( first ) === "object" && first && ( typeof(first.length)!='undefined' ) )
|
|
676
|
-
{
|
|
677
|
-
_request = length as carriers.ViewState_SetHistoryLengthPrefValueRequest;
|
|
678
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
679
|
-
}
|
|
680
|
-
else
|
|
681
|
-
{
|
|
682
|
-
_request = {
|
|
683
|
-
length: length as number,
|
|
684
|
-
};
|
|
685
|
-
_options = webapi_options;
|
|
686
|
-
}
|
|
687
|
-
return this._setHistoryLengthPrefValueAsync( _request, _options );
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
691
691
|
private async _saveCurrentsAsync(request: carriers.ViewState_SaveCurrentsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.History[] > {
|
|
692
692
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
693
693
|
base.WebApiBase.SetPending(options);
|
package/src/WebApi.ts
CHANGED
|
@@ -87,16 +87,12 @@ import { IRelationAgent, RelationAgent } from './RelationAgent.js';
|
|
|
87
87
|
export { RelationAgent };
|
|
88
88
|
import { IArchiveAgent, ArchiveAgent } from './ArchiveAgent.js';
|
|
89
89
|
export { ArchiveAgent };
|
|
90
|
-
import { IAudienceAgent, AudienceAgent } from './AudienceAgent.js';
|
|
91
|
-
export { AudienceAgent };
|
|
92
90
|
import { IPreferenceAgent, PreferenceAgent } from './PreferenceAgent.js';
|
|
93
91
|
export { PreferenceAgent };
|
|
94
92
|
import { ILicenseAgent, LicenseAgent } from './LicenseAgent.js';
|
|
95
93
|
export { LicenseAgent };
|
|
96
94
|
import { IUserAgent, UserAgent } from './UserAgent.js';
|
|
97
95
|
export { UserAgent };
|
|
98
|
-
import { IReplicationAgent, ReplicationAgent } from './ReplicationAgent.js';
|
|
99
|
-
export { ReplicationAgent };
|
|
100
96
|
import { ITimeZoneAgent, TimeZoneAgent } from './TimeZoneAgent.js';
|
|
101
97
|
export { TimeZoneAgent };
|
|
102
98
|
import { IMessagingAgent, MessagingAgent } from './MessagingAgent.js';
|
|
@@ -111,8 +107,6 @@ import { ICustomerServiceAgent, CustomerServiceAgent } from './CustomerServiceAg
|
|
|
111
107
|
export { CustomerServiceAgent };
|
|
112
108
|
import { IPocketAgent, PocketAgent } from './PocketAgent.js';
|
|
113
109
|
export { PocketAgent };
|
|
114
|
-
import { IDashboardAgent, DashboardAgent } from './DashboardAgent.js';
|
|
115
|
-
export { DashboardAgent };
|
|
116
110
|
import { IDashAgent, DashAgent } from './DashAgent.js';
|
|
117
111
|
export { DashAgent };
|
|
118
112
|
import { ITargetsAgent, TargetsAgent } from './TargetsAgent.js';
|
|
@@ -257,16 +251,12 @@ export interface IAgentsApi extends base.WebApiBase {
|
|
|
257
251
|
getRelationAgent(resourceParsing?: base.ResourceParsing) : IRelationAgent;
|
|
258
252
|
/** ArchiveList functions of all kinds */
|
|
259
253
|
getArchiveAgent(resourceParsing?: base.ResourceParsing) : IArchiveAgent;
|
|
260
|
-
/** Services specific to the Audience client */
|
|
261
|
-
getAudienceAgent(resourceParsing?: base.ResourceParsing) : IAudienceAgent;
|
|
262
254
|
/** Preferences, user interface tab configuration */
|
|
263
255
|
getPreferenceAgent(resourceParsing?: base.ResourceParsing) : IPreferenceAgent;
|
|
264
256
|
/** License query, download, activation */
|
|
265
257
|
getLicenseAgent(resourceParsing?: base.ResourceParsing) : ILicenseAgent;
|
|
266
258
|
/** User administration */
|
|
267
259
|
getUserAgent(resourceParsing?: base.ResourceParsing) : IUserAgent;
|
|
268
|
-
/** Replication/Travel administration */
|
|
269
|
-
getReplicationAgent(resourceParsing?: base.ResourceParsing) : IReplicationAgent;
|
|
270
260
|
/** TimeZone maintenance */
|
|
271
261
|
getTimeZoneAgent(resourceParsing?: base.ResourceParsing) : ITimeZoneAgent;
|
|
272
262
|
/** SMS and other external messaging systems */
|
|
@@ -281,8 +271,6 @@ export interface IAgentsApi extends base.WebApiBase {
|
|
|
281
271
|
getCustomerServiceAgent(resourceParsing?: base.ResourceParsing) : ICustomerServiceAgent;
|
|
282
272
|
/** Agent with Pocket specific functionality */
|
|
283
273
|
getPocketAgent(resourceParsing?: base.ResourceParsing) : IPocketAgent;
|
|
284
|
-
/** Agent lets you configure dashboard tiles and retrieve dashboard data */
|
|
285
|
-
getDashboardAgent(resourceParsing?: base.ResourceParsing) : IDashboardAgent;
|
|
286
274
|
/** Agent that lets you configure dashboard tiles and retrieve dashboard data */
|
|
287
275
|
getDashAgent(resourceParsing?: base.ResourceParsing) : IDashAgent;
|
|
288
276
|
/** Agent lets you configure targets, and retrieve targets */
|
|
@@ -695,14 +683,6 @@ export class WebApi extends base.WebApiBase implements IAgentsApi, IRestApi {
|
|
|
695
683
|
return new ArchiveAgent( options );
|
|
696
684
|
}
|
|
697
685
|
|
|
698
|
-
/** Services specific to the Audience client */
|
|
699
|
-
public getAudienceAgent(resourceParsing?: base.ResourceParsing) : IAudienceAgent {
|
|
700
|
-
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
701
|
-
if( typeof(resourceParsing) == "number" )
|
|
702
|
-
options.resourceParsing = resourceParsing;
|
|
703
|
-
return new AudienceAgent( options );
|
|
704
|
-
}
|
|
705
|
-
|
|
706
686
|
/** Preferences, user interface tab configuration */
|
|
707
687
|
public getPreferenceAgent(resourceParsing?: base.ResourceParsing) : IPreferenceAgent {
|
|
708
688
|
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
@@ -727,14 +707,6 @@ export class WebApi extends base.WebApiBase implements IAgentsApi, IRestApi {
|
|
|
727
707
|
return new UserAgent( options );
|
|
728
708
|
}
|
|
729
709
|
|
|
730
|
-
/** Replication/Travel administration */
|
|
731
|
-
public getReplicationAgent(resourceParsing?: base.ResourceParsing) : IReplicationAgent {
|
|
732
|
-
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
733
|
-
if( typeof(resourceParsing) == "number" )
|
|
734
|
-
options.resourceParsing = resourceParsing;
|
|
735
|
-
return new ReplicationAgent( options );
|
|
736
|
-
}
|
|
737
|
-
|
|
738
710
|
/** TimeZone maintenance */
|
|
739
711
|
public getTimeZoneAgent(resourceParsing?: base.ResourceParsing) : ITimeZoneAgent {
|
|
740
712
|
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
@@ -791,14 +763,6 @@ export class WebApi extends base.WebApiBase implements IAgentsApi, IRestApi {
|
|
|
791
763
|
return new PocketAgent( options );
|
|
792
764
|
}
|
|
793
765
|
|
|
794
|
-
/** Agent lets you configure dashboard tiles and retrieve dashboard data */
|
|
795
|
-
public getDashboardAgent(resourceParsing?: base.ResourceParsing) : IDashboardAgent {
|
|
796
|
-
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
797
|
-
if( typeof(resourceParsing) == "number" )
|
|
798
|
-
options.resourceParsing = resourceParsing;
|
|
799
|
-
return new DashboardAgent( options );
|
|
800
|
-
}
|
|
801
|
-
|
|
802
766
|
/** Agent that lets you configure dashboard tiles and retrieve dashboard data */
|
|
803
767
|
public getDashAgent(resourceParsing?: base.ResourceParsing) : IDashAgent {
|
|
804
768
|
const options = base.WebApiBase.FigureOutOptions(this._options);
|
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
|
|