@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/BLOBAgent.ts
CHANGED
|
@@ -71,10 +71,6 @@ export interface IBLOBAgent {
|
|
|
71
71
|
changeProductImageAsync(productId: number, blobId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
72
72
|
getQuoteLineImageAsync(request: carriers.BLOB_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
73
73
|
getQuoteLineImageAsync(quoteLineId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
74
|
-
getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
75
|
-
getAppDataAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
76
|
-
setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
77
|
-
setAppDataAsync(key: string, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
78
74
|
getPersonImageWithSizeAsync(request: carriers.BLOB_GetPersonImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
79
75
|
getPersonImageWithSizeAsync(personId: number, width: number, height: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
80
76
|
getProjectImageWithSizeAsync(request: carriers.BLOB_GetProjectImageWithSizeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
@@ -1431,116 +1427,6 @@ export class BLOBAgent extends base.WebApiBase implements IBLOBAgent {
|
|
|
1431
1427
|
}
|
|
1432
1428
|
|
|
1433
1429
|
|
|
1434
|
-
private async _getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1435
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1436
|
-
base.WebApiBase.SetPending(options);
|
|
1437
|
-
return new Promise< string >(async (resolve, reject) => {
|
|
1438
|
-
try {
|
|
1439
|
-
config.baseURL = this._options.baseUrl;
|
|
1440
|
-
const response = await this._axios.post("GetAppData", request , config);
|
|
1441
|
-
base.WebApiBase.SetCompleted(options);
|
|
1442
|
-
const res : string = response.data as string;
|
|
1443
|
-
resolve(res);
|
|
1444
|
-
}
|
|
1445
|
-
catch( err ) {
|
|
1446
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1447
|
-
reject(err);
|
|
1448
|
-
}
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any
|
|
1456
|
-
* @param request - Key
|
|
1457
|
-
* @returns The applications value, suggested to be a JSON, XML or other readable structure
|
|
1458
|
-
*/
|
|
1459
|
-
public async getAppDataAsync(request: carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any
|
|
1463
|
-
* @param key - The key string, less than 200 characters. Must be unique within each application.
|
|
1464
|
-
* @returns The applications value, suggested to be a JSON, XML or other readable structure
|
|
1465
|
-
*/
|
|
1466
|
-
public async getAppDataAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
1467
|
-
|
|
1468
|
-
public async getAppDataAsync(key:string|carriers.BLOB_GetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1469
|
-
let _request : carriers.BLOB_GetAppDataRequest = null;
|
|
1470
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1471
|
-
const first : any = key;
|
|
1472
|
-
if( typeof( first ) === "object" && first && ( typeof(first.key)!='undefined' ) )
|
|
1473
|
-
{
|
|
1474
|
-
_request = key as carriers.BLOB_GetAppDataRequest;
|
|
1475
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1476
|
-
}
|
|
1477
|
-
else
|
|
1478
|
-
{
|
|
1479
|
-
_request = {
|
|
1480
|
-
key: key as string,
|
|
1481
|
-
};
|
|
1482
|
-
_options = webapi_options;
|
|
1483
|
-
}
|
|
1484
|
-
return this._getAppDataAsync( _request, _options );
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
private async _setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1489
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1490
|
-
base.WebApiBase.SetPending(options);
|
|
1491
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1492
|
-
try {
|
|
1493
|
-
config.baseURL = this._options.baseUrl;
|
|
1494
|
-
const response = await this._axios.post("SetAppData", request , config);
|
|
1495
|
-
base.WebApiBase.SetCompleted(options);
|
|
1496
|
-
const res = response.data;
|
|
1497
|
-
resolve(res);
|
|
1498
|
-
}
|
|
1499
|
-
catch( err ) {
|
|
1500
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1501
|
-
reject(err);
|
|
1502
|
-
}
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any. Existing data, if any, will be overwritten. Overwrite with a blank value to delete.
|
|
1510
|
-
* @param request - Key, Data
|
|
1511
|
-
* @returns This method has no return value
|
|
1512
|
-
*/
|
|
1513
|
-
public async setAppDataAsync(request: carriers.BLOB_SetAppDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* Get a CLOB (limited to a reasonable size by the mechanics of Web Services) according to a string key; ALSO limits to the current ApplicationToken if any. Existing data, if any, will be overwritten. Overwrite with a blank value to delete.
|
|
1517
|
-
* @param key - The key string, less than 200 characters. Must be unique within each application.
|
|
1518
|
-
* @param data - The applications value, suggested to be a JSON, XML or other readable structure
|
|
1519
|
-
* @returns This method has no return value
|
|
1520
|
-
*/
|
|
1521
|
-
public async setAppDataAsync(key: string, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1522
|
-
|
|
1523
|
-
public async setAppDataAsync(key:string|carriers.BLOB_SetAppDataRequest, data?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1524
|
-
let _request : carriers.BLOB_SetAppDataRequest = null;
|
|
1525
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1526
|
-
const first : any = key;
|
|
1527
|
-
if( typeof( first ) === "object" && first && ( typeof(first.key)!='undefined' || typeof(first.data)!='undefined' ) )
|
|
1528
|
-
{
|
|
1529
|
-
_request = key as carriers.BLOB_SetAppDataRequest;
|
|
1530
|
-
_options = data as base.WebApiRequestOptions;
|
|
1531
|
-
}
|
|
1532
|
-
else
|
|
1533
|
-
{
|
|
1534
|
-
_request = {
|
|
1535
|
-
key: key as string,
|
|
1536
|
-
data: data as string,
|
|
1537
|
-
};
|
|
1538
|
-
_options = webapi_options;
|
|
1539
|
-
}
|
|
1540
|
-
return this._setAppDataAsync( _request, _options );
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
1430
|
private async _getPersonImageWithSizeAsync(request: carriers.BLOB_GetPersonImageWithSizeRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
1545
1431
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
1546
1432
|
base.WebApiBase.SetPending(options);
|
package/src/CRMScriptAgent.ts
CHANGED
|
@@ -42,6 +42,8 @@ export interface ICRMScriptAgent {
|
|
|
42
42
|
deleteCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
43
43
|
deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
44
44
|
getCRMScriptEntityAsync(cRMScriptEntityId: number) : Promise< carriers.CRMScriptEntity >;
|
|
45
|
+
saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
|
|
46
|
+
saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity: carriers.CRMScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
|
|
45
47
|
executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
46
48
|
executeScriptAsync(crmScriptId: number, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
47
49
|
executeScriptByIncludeIdAsync(request: carriers.CRMScript_ExecuteScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
@@ -62,6 +64,8 @@ export interface ICRMScriptAgent {
|
|
|
62
64
|
executeScriptByStringAsync(script: string, parameters: carriers.StringDictionary, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
|
|
63
65
|
validateScriptByStringAsync(request: carriers.CRMScript_ValidateScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
|
|
64
66
|
validateScriptByStringAsync(script: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
|
|
67
|
+
resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
68
|
+
resolveIncludesAsync(script: string, ignoreErrors: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
65
69
|
getTriggerScriptEntityAsync(triggerScriptEntityId: number) : Promise< carriers.TriggerScriptEntity >;
|
|
66
70
|
getTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
|
|
67
71
|
getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
|
|
@@ -423,6 +427,60 @@ export class CRMScriptAgent extends base.WebApiBase implements ICRMScriptAgent {
|
|
|
423
427
|
}
|
|
424
428
|
|
|
425
429
|
|
|
430
|
+
private async _saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
|
|
431
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
432
|
+
base.WebApiBase.SetPending(options);
|
|
433
|
+
return new Promise< carriers.CRMScriptEntity >(async (resolve, reject) => {
|
|
434
|
+
try {
|
|
435
|
+
config.baseURL = this._options.baseUrl;
|
|
436
|
+
const response = await this._axios.post("SaveCRMScriptEntityWithoutCompile", request , config);
|
|
437
|
+
base.WebApiBase.SetCompleted(options);
|
|
438
|
+
const res : carriers.CRMScriptEntity = converters.Create_CRMScriptEntity_From( response.data );
|
|
439
|
+
resolve(res);
|
|
440
|
+
}
|
|
441
|
+
catch( err ) {
|
|
442
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
443
|
+
reject(err);
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Save the script directly without compiling TypeScript
|
|
452
|
+
* @param request - CrmScriptEntity
|
|
453
|
+
* @returns The saved entity
|
|
454
|
+
*/
|
|
455
|
+
public async saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Save the script directly without compiling TypeScript
|
|
459
|
+
* @param crmScriptEntity - The entity to save. Source and SourceCode should both be specified
|
|
460
|
+
* @returns The saved entity
|
|
461
|
+
*/
|
|
462
|
+
public async saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity: carriers.CRMScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
|
|
463
|
+
|
|
464
|
+
public async saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity:carriers.CRMScriptEntity|carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
|
|
465
|
+
let _request : carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest = null;
|
|
466
|
+
let _options : base.WebApiRequestOptions = null;
|
|
467
|
+
const first : any = crmScriptEntity;
|
|
468
|
+
if( typeof( first ) === "object" && first && ( typeof(first.crmScriptEntity)!='undefined' ) )
|
|
469
|
+
{
|
|
470
|
+
_request = crmScriptEntity as carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest;
|
|
471
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
472
|
+
}
|
|
473
|
+
else
|
|
474
|
+
{
|
|
475
|
+
_request = {
|
|
476
|
+
crmScriptEntity: crmScriptEntity as carriers.CRMScriptEntity,
|
|
477
|
+
};
|
|
478
|
+
_options = webapi_options;
|
|
479
|
+
}
|
|
480
|
+
return this._saveCRMScriptEntityWithoutCompileAsync( _request, _options );
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
426
484
|
private async _executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
427
485
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
428
486
|
base.WebApiBase.SetPending(options);
|
|
@@ -976,6 +1034,62 @@ export class CRMScriptAgent extends base.WebApiBase implements ICRMScriptAgent {
|
|
|
976
1034
|
return this._validateScriptByStringAsync( _request, _options );
|
|
977
1035
|
}
|
|
978
1036
|
|
|
1037
|
+
|
|
1038
|
+
private async _resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1039
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1040
|
+
base.WebApiBase.SetPending(options);
|
|
1041
|
+
return new Promise< number[] >(async (resolve, reject) => {
|
|
1042
|
+
try {
|
|
1043
|
+
config.baseURL = this._options.baseUrl;
|
|
1044
|
+
const response = await this._axios.post("ResolveIncludes", request , config);
|
|
1045
|
+
base.WebApiBase.SetCompleted(options);
|
|
1046
|
+
const res : number[] = response.data as number[];
|
|
1047
|
+
resolve(res);
|
|
1048
|
+
}
|
|
1049
|
+
catch( err ) {
|
|
1050
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1051
|
+
reject(err);
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Will resolve all includes for a TypeScript and return an array of the IDs
|
|
1060
|
+
* @param request - Script, IgnoreErrors
|
|
1061
|
+
* @returns The ids of all the included scripts
|
|
1062
|
+
*/
|
|
1063
|
+
public async resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Will resolve all includes for a TypeScript and return an array of the IDs
|
|
1067
|
+
* @param script - The script to resolve includes for
|
|
1068
|
+
* @param ignoreErrors - If true, then missing includes will be ignored
|
|
1069
|
+
* @returns The ids of all the included scripts
|
|
1070
|
+
*/
|
|
1071
|
+
public async resolveIncludesAsync(script: string, ignoreErrors: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
|
1072
|
+
|
|
1073
|
+
public async resolveIncludesAsync(script:string|carriers.CRMScript_ResolveIncludesRequest, ignoreErrors?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< number[] > {
|
|
1074
|
+
let _request : carriers.CRMScript_ResolveIncludesRequest = null;
|
|
1075
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1076
|
+
const first : any = script;
|
|
1077
|
+
if( typeof( first ) === "object" && first && ( typeof(first.script)!='undefined' || typeof(first.ignoreErrors)!='undefined' ) )
|
|
1078
|
+
{
|
|
1079
|
+
_request = script as carriers.CRMScript_ResolveIncludesRequest;
|
|
1080
|
+
_options = ignoreErrors as base.WebApiRequestOptions;
|
|
1081
|
+
}
|
|
1082
|
+
else
|
|
1083
|
+
{
|
|
1084
|
+
_request = {
|
|
1085
|
+
script: script as string,
|
|
1086
|
+
ignoreErrors: ignoreErrors as boolean,
|
|
1087
|
+
};
|
|
1088
|
+
_options = webapi_options;
|
|
1089
|
+
}
|
|
1090
|
+
return this._resolveIncludesAsync( _request, _options );
|
|
1091
|
+
}
|
|
1092
|
+
|
|
979
1093
|
/**
|
|
980
1094
|
* Gets a TriggerScriptEntity object.
|
|
981
1095
|
* @param triggerScriptEntityId - The primary key.
|