@superoffice/webapi 10.5.4 → 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
|
@@ -38,6 +38,8 @@ export interface ICustomerServiceAgent {
|
|
|
38
38
|
updateFeatureTogglesAsync(featureToggles: carriers.CsFeatureToggle[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
39
39
|
eventHandlerExistsAsync(request: carriers.CustomerService_EventHandlerExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
40
40
|
eventHandlerExistsAsync(eventHandlerType: enums.EventHandlerType, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
41
|
+
eventHandlersExistsAsync(request: carriers.CustomerService_EventHandlersExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] >;
|
|
42
|
+
eventHandlersExistsAsync(eventHandlerTypes: enums.EventHandlerType[], webapi_options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] >;
|
|
41
43
|
createSessionAsync(request: carriers.CustomerService_CreateSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
|
|
42
44
|
createSessionAsync(remoteIp: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey >;
|
|
43
45
|
removeSessionAsync(request: carriers.CustomerService_RemoveSessionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
@@ -59,6 +61,8 @@ export interface ICustomerServiceAgent {
|
|
|
59
61
|
getFaqForCustomerAsync(request: carriers.CustomerService_GetFaqForCustomerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
60
62
|
getFaqForCustomerAsync(faqEntryId: number, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
61
63
|
getCustomerServiceStartupAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
|
|
64
|
+
getCustomerServiceStartupByOwnerAsync(request: carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
|
|
65
|
+
getCustomerServiceStartupByOwnerAsync(userId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
|
|
62
66
|
executeEventHandlersAsync(request: carriers.CustomerService_ExecuteEventHandlersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
|
|
63
67
|
executeEventHandlersAsync(eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EventData >;
|
|
64
68
|
getMailboxesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Mailbox[] >;
|
|
@@ -381,6 +385,60 @@ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerSe
|
|
|
381
385
|
}
|
|
382
386
|
|
|
383
387
|
|
|
388
|
+
private async _eventHandlersExistsAsync(request: carriers.CustomerService_EventHandlersExistsRequest, options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] > {
|
|
389
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
390
|
+
base.WebApiBase.SetPending(options);
|
|
391
|
+
return new Promise< enums.EventHandlerType[] >(async (resolve, reject) => {
|
|
392
|
+
try {
|
|
393
|
+
config.baseURL = this._options.baseUrl;
|
|
394
|
+
const response = await this._axios.post("EventHandlersExists", request , config);
|
|
395
|
+
base.WebApiBase.SetCompleted(options);
|
|
396
|
+
const res : enums.EventHandlerType[] = response.data as enums.EventHandlerType[];
|
|
397
|
+
resolve(res);
|
|
398
|
+
}
|
|
399
|
+
catch( err ) {
|
|
400
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
401
|
+
reject(err);
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Check if any given eventhandler exists
|
|
410
|
+
* @param request - EventHandlerTypes
|
|
411
|
+
* @returns The existing event handlers
|
|
412
|
+
*/
|
|
413
|
+
public async eventHandlersExistsAsync(request: carriers.CustomerService_EventHandlersExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] >;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Check if any given eventhandler exists
|
|
417
|
+
* @param eventHandlerTypes - The EventHandlerTypes we are checking
|
|
418
|
+
* @returns The existing event handlers
|
|
419
|
+
*/
|
|
420
|
+
public async eventHandlersExistsAsync(eventHandlerTypes: enums.EventHandlerType[], webapi_options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] >;
|
|
421
|
+
|
|
422
|
+
public async eventHandlersExistsAsync(eventHandlerTypes:enums.EventHandlerType[]|carriers.CustomerService_EventHandlersExistsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< enums.EventHandlerType[] > {
|
|
423
|
+
let _request : carriers.CustomerService_EventHandlersExistsRequest = null;
|
|
424
|
+
let _options : base.WebApiRequestOptions = null;
|
|
425
|
+
const first : any = eventHandlerTypes;
|
|
426
|
+
if( typeof( first ) === "object" && first && ( typeof(first.eventHandlerTypes)!='undefined' ) )
|
|
427
|
+
{
|
|
428
|
+
_request = eventHandlerTypes as carriers.CustomerService_EventHandlersExistsRequest;
|
|
429
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
430
|
+
}
|
|
431
|
+
else
|
|
432
|
+
{
|
|
433
|
+
_request = {
|
|
434
|
+
eventHandlerTypes: eventHandlerTypes as enums.EventHandlerType[],
|
|
435
|
+
};
|
|
436
|
+
_options = webapi_options;
|
|
437
|
+
}
|
|
438
|
+
return this._eventHandlersExistsAsync( _request, _options );
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
|
|
384
442
|
private async _createSessionAsync(request: carriers.CustomerService_CreateSessionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CsSessionKey > {
|
|
385
443
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
386
444
|
base.WebApiBase.SetPending(options);
|
|
@@ -954,6 +1012,60 @@ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerSe
|
|
|
954
1012
|
}
|
|
955
1013
|
|
|
956
1014
|
|
|
1015
|
+
private async _getCustomerServiceStartupByOwnerAsync(request: carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup > {
|
|
1016
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1017
|
+
base.WebApiBase.SetPending(options);
|
|
1018
|
+
return new Promise< carriers.CustomerServiceStartup >(async (resolve, reject) => {
|
|
1019
|
+
try {
|
|
1020
|
+
config.baseURL = this._options.baseUrl;
|
|
1021
|
+
const response = await this._axios.post("GetCustomerServiceStartupByOwner", request , config);
|
|
1022
|
+
base.WebApiBase.SetCompleted(options);
|
|
1023
|
+
const res : carriers.CustomerServiceStartup = converters.Create_CustomerServiceStartup_From( response.data );
|
|
1024
|
+
resolve(res);
|
|
1025
|
+
}
|
|
1026
|
+
catch( err ) {
|
|
1027
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1028
|
+
reject(err);
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Get the carrier with data that Service needs when starting up for a specific user
|
|
1037
|
+
* @param request - UserId
|
|
1038
|
+
* @returns The carrier containing the startup data
|
|
1039
|
+
*/
|
|
1040
|
+
public async getCustomerServiceStartupByOwnerAsync(request: carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Get the carrier with data that Service needs when starting up for a specific user
|
|
1044
|
+
* @param userId - The user for which we want to fetch the startup values for
|
|
1045
|
+
* @returns The carrier containing the startup data
|
|
1046
|
+
*/
|
|
1047
|
+
public async getCustomerServiceStartupByOwnerAsync(userId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup >;
|
|
1048
|
+
|
|
1049
|
+
public async getCustomerServiceStartupByOwnerAsync(userId:number|carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomerServiceStartup > {
|
|
1050
|
+
let _request : carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest = null;
|
|
1051
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1052
|
+
const first : any = userId;
|
|
1053
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userId)!='undefined' ) )
|
|
1054
|
+
{
|
|
1055
|
+
_request = userId as carriers.CustomerService_GetCustomerServiceStartupByOwnerRequest;
|
|
1056
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1057
|
+
}
|
|
1058
|
+
else
|
|
1059
|
+
{
|
|
1060
|
+
_request = {
|
|
1061
|
+
userId: userId as number,
|
|
1062
|
+
};
|
|
1063
|
+
_options = webapi_options;
|
|
1064
|
+
}
|
|
1065
|
+
return this._getCustomerServiceStartupByOwnerAsync( _request, _options );
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
|
|
957
1069
|
private async _executeEventHandlersAsync(request: carriers.CustomerService_ExecuteEventHandlersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.EventData > {
|
|
958
1070
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
959
1071
|
base.WebApiBase.SetPending(options);
|
package/src/DiagnosticsAgent.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface IDiagnosticsAgent {
|
|
|
33
33
|
flushCachesByNameAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
34
34
|
getCacheStateAsync(request: carriers.Diagnostics_GetCacheStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
35
35
|
getCacheStateAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
36
|
+
getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
37
|
+
getCacheInvalidationGenerationsAsync(names: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
36
38
|
getEntityCountsForCurrentUserAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >;
|
|
37
39
|
getEntityCountsForAllUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >;
|
|
38
40
|
logViewStateAsync(request: carriers.Diagnostics_LogViewStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
@@ -44,7 +46,18 @@ export interface IDiagnosticsAgent {
|
|
|
44
46
|
collectWebUsageAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
45
47
|
collectTableSizesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
46
48
|
resyncUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
|
+
sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
+
sendSystemMessageAsync(systemMessageId: string, associateId: number, markdownMessage: string, expire: Date, type: enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
51
|
+
removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
52
|
+
removeSystemMessageAsync(onlineappId: number, systemMessageId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
53
|
+
removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
54
|
+
removeSystemMessageForAssociateAsync(onlineappId: number, systemMessageId: string, associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
55
|
+
getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
56
|
+
getSystemMessagesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
57
|
+
removeExpiredSystemMessagesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
47
58
|
performTasksAfterUpgradeAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
59
|
+
performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
60
|
+
performTasksAfterCustomObjectTableDeletedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
48
61
|
addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
62
|
addWebAppUsageAsync(webAppUsages: carriers.WebAppUsage[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
63
|
webAppUsageExistsInPeriodAsync(request: carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
@@ -246,6 +259,60 @@ export class DiagnosticsAgent extends base.WebApiBase implements IDiagnosticsAge
|
|
|
246
259
|
}
|
|
247
260
|
|
|
248
261
|
|
|
262
|
+
private async _getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] > {
|
|
263
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
264
|
+
base.WebApiBase.SetPending(options);
|
|
265
|
+
return new Promise< carriers.CacheInvalidation[] >(async (resolve, reject) => {
|
|
266
|
+
try {
|
|
267
|
+
config.baseURL = this._options.baseUrl;
|
|
268
|
+
const response = await this._axios.post("GetCacheInvalidationGenerations", request , config);
|
|
269
|
+
base.WebApiBase.SetCompleted(options);
|
|
270
|
+
const res : carriers.CacheInvalidation[] = converters.Create_CacheInvalidationArray_From( response.data );
|
|
271
|
+
resolve(res);
|
|
272
|
+
}
|
|
273
|
+
catch( err ) {
|
|
274
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
275
|
+
reject(err);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Get generation for provided names
|
|
284
|
+
* @param request - Names
|
|
285
|
+
* @returns Array of caches with generation number
|
|
286
|
+
*/
|
|
287
|
+
public async getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Get generation for provided names
|
|
291
|
+
* @param names - Name of caches
|
|
292
|
+
* @returns Array of caches with generation number
|
|
293
|
+
*/
|
|
294
|
+
public async getCacheInvalidationGenerationsAsync(names: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
295
|
+
|
|
296
|
+
public async getCacheInvalidationGenerationsAsync(names:string[]|carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] > {
|
|
297
|
+
let _request : carriers.Diagnostics_GetCacheInvalidationGenerationsRequest = null;
|
|
298
|
+
let _options : base.WebApiRequestOptions = null;
|
|
299
|
+
const first : any = names;
|
|
300
|
+
if( typeof( first ) === "object" && first && ( typeof(first.names)!='undefined' ) )
|
|
301
|
+
{
|
|
302
|
+
_request = names as carriers.Diagnostics_GetCacheInvalidationGenerationsRequest;
|
|
303
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
304
|
+
}
|
|
305
|
+
else
|
|
306
|
+
{
|
|
307
|
+
_request = {
|
|
308
|
+
names: names as string[],
|
|
309
|
+
};
|
|
310
|
+
_options = webapi_options;
|
|
311
|
+
}
|
|
312
|
+
return this._getCacheInvalidationGenerationsAsync( _request, _options );
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
249
316
|
private async _getEntityCountsForCurrentUserAsync( options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] > {
|
|
250
317
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
251
318
|
base.WebApiBase.SetPending(options);
|
|
@@ -571,6 +638,265 @@ export class DiagnosticsAgent extends base.WebApiBase implements IDiagnosticsAge
|
|
|
571
638
|
}
|
|
572
639
|
|
|
573
640
|
|
|
641
|
+
private async _sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
642
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
643
|
+
base.WebApiBase.SetPending(options);
|
|
644
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
645
|
+
try {
|
|
646
|
+
config.baseURL = this._options.baseUrl;
|
|
647
|
+
const response = await this._axios.post("SendSystemMessage", request , config);
|
|
648
|
+
base.WebApiBase.SetCompleted(options);
|
|
649
|
+
const res = response.data;
|
|
650
|
+
resolve(res);
|
|
651
|
+
}
|
|
652
|
+
catch( err ) {
|
|
653
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
654
|
+
reject(err);
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Adds a system message for a specific associate.
|
|
663
|
+
* @param request - SystemMessageId, AssociateId, MarkdownMessage, Expire, Type
|
|
664
|
+
* @returns
|
|
665
|
+
*/
|
|
666
|
+
public async sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Adds a system message for a specific associate.
|
|
670
|
+
* @param systemMessageId - The message string id
|
|
671
|
+
* @param associateId - The associateId of the message target.
|
|
672
|
+
* @param markdownMessage - Markdown message to be displayed to the user
|
|
673
|
+
* @param expire - When the message will no longer be available
|
|
674
|
+
* @param type - Type of message, example: info, warning, error
|
|
675
|
+
* @returns
|
|
676
|
+
*/
|
|
677
|
+
public async sendSystemMessageAsync(systemMessageId: string, associateId: number, markdownMessage: string, expire: Date, type: enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
678
|
+
|
|
679
|
+
public async sendSystemMessageAsync(systemMessageId:string|carriers.Diagnostics_SendSystemMessageRequest, associateId?:number|base.WebApiRequestOptions, markdownMessage?:string, expire?:Date, type?:enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
680
|
+
let _request : carriers.Diagnostics_SendSystemMessageRequest = null;
|
|
681
|
+
let _options : base.WebApiRequestOptions = null;
|
|
682
|
+
const first : any = systemMessageId;
|
|
683
|
+
if( typeof( first ) === "object" && first && ( typeof(first.systemMessageId)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.markdownMessage)!='undefined' || typeof(first.expire)!='undefined' || typeof(first.type)!='undefined' ) )
|
|
684
|
+
{
|
|
685
|
+
_request = systemMessageId as carriers.Diagnostics_SendSystemMessageRequest;
|
|
686
|
+
_options = associateId as base.WebApiRequestOptions;
|
|
687
|
+
}
|
|
688
|
+
else
|
|
689
|
+
{
|
|
690
|
+
_request = {
|
|
691
|
+
systemMessageId: systemMessageId as string,
|
|
692
|
+
associateId: associateId as number,
|
|
693
|
+
markdownMessage: markdownMessage as string,
|
|
694
|
+
expire: expire as Date,
|
|
695
|
+
type: type as enums.SystemMessageType,
|
|
696
|
+
};
|
|
697
|
+
_options = webapi_options;
|
|
698
|
+
}
|
|
699
|
+
return this._sendSystemMessageAsync( _request, _options );
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
private async _removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
704
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
705
|
+
base.WebApiBase.SetPending(options);
|
|
706
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
707
|
+
try {
|
|
708
|
+
config.baseURL = this._options.baseUrl;
|
|
709
|
+
const response = await this._axios.post("RemoveSystemMessage", request , config);
|
|
710
|
+
base.WebApiBase.SetCompleted(options);
|
|
711
|
+
const res = response.data;
|
|
712
|
+
resolve(res);
|
|
713
|
+
}
|
|
714
|
+
catch( err ) {
|
|
715
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
716
|
+
reject(err);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Removes a system message for current associate
|
|
725
|
+
* @param request - OnlineappId, SystemMessageId
|
|
726
|
+
* @returns
|
|
727
|
+
*/
|
|
728
|
+
public async removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Removes a system message for current associate
|
|
732
|
+
* @param onlineappId - Id of the online app that owns this message
|
|
733
|
+
* @param systemMessageId - Message identifier, used for message removal
|
|
734
|
+
* @returns
|
|
735
|
+
*/
|
|
736
|
+
public async removeSystemMessageAsync(onlineappId: number, systemMessageId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
737
|
+
|
|
738
|
+
public async removeSystemMessageAsync(onlineappId:number|carriers.Diagnostics_RemoveSystemMessageRequest, systemMessageId?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
739
|
+
let _request : carriers.Diagnostics_RemoveSystemMessageRequest = null;
|
|
740
|
+
let _options : base.WebApiRequestOptions = null;
|
|
741
|
+
const first : any = onlineappId;
|
|
742
|
+
if( typeof( first ) === "object" && first && ( typeof(first.onlineappId)!='undefined' || typeof(first.systemMessageId)!='undefined' ) )
|
|
743
|
+
{
|
|
744
|
+
_request = onlineappId as carriers.Diagnostics_RemoveSystemMessageRequest;
|
|
745
|
+
_options = systemMessageId as base.WebApiRequestOptions;
|
|
746
|
+
}
|
|
747
|
+
else
|
|
748
|
+
{
|
|
749
|
+
_request = {
|
|
750
|
+
onlineappId: onlineappId as number,
|
|
751
|
+
systemMessageId: systemMessageId as string,
|
|
752
|
+
};
|
|
753
|
+
_options = webapi_options;
|
|
754
|
+
}
|
|
755
|
+
return this._removeSystemMessageAsync( _request, _options );
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
private async _removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
760
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
761
|
+
base.WebApiBase.SetPending(options);
|
|
762
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
763
|
+
try {
|
|
764
|
+
config.baseURL = this._options.baseUrl;
|
|
765
|
+
const response = await this._axios.post("RemoveSystemMessageForAssociate", request , config);
|
|
766
|
+
base.WebApiBase.SetCompleted(options);
|
|
767
|
+
const res = response.data;
|
|
768
|
+
resolve(res);
|
|
769
|
+
}
|
|
770
|
+
catch( err ) {
|
|
771
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
772
|
+
reject(err);
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Removes a system message for specific associate.
|
|
781
|
+
* @param request - OnlineappId, SystemMessageId, AssociateId
|
|
782
|
+
* @returns
|
|
783
|
+
*/
|
|
784
|
+
public async removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Removes a system message for specific associate.
|
|
788
|
+
* @param onlineappId - Id of the online app that owns this message
|
|
789
|
+
* @param systemMessageId - Message identifier, used for message update or removal
|
|
790
|
+
* @param associateId - The associateId of the message target.
|
|
791
|
+
* @returns
|
|
792
|
+
*/
|
|
793
|
+
public async removeSystemMessageForAssociateAsync(onlineappId: number, systemMessageId: string, associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
794
|
+
|
|
795
|
+
public async removeSystemMessageForAssociateAsync(onlineappId:number|carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, systemMessageId?:string|base.WebApiRequestOptions, associateId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
796
|
+
let _request : carriers.Diagnostics_RemoveSystemMessageForAssociateRequest = null;
|
|
797
|
+
let _options : base.WebApiRequestOptions = null;
|
|
798
|
+
const first : any = onlineappId;
|
|
799
|
+
if( typeof( first ) === "object" && first && ( typeof(first.onlineappId)!='undefined' || typeof(first.systemMessageId)!='undefined' || typeof(first.associateId)!='undefined' ) )
|
|
800
|
+
{
|
|
801
|
+
_request = onlineappId as carriers.Diagnostics_RemoveSystemMessageForAssociateRequest;
|
|
802
|
+
_options = systemMessageId as base.WebApiRequestOptions;
|
|
803
|
+
}
|
|
804
|
+
else
|
|
805
|
+
{
|
|
806
|
+
_request = {
|
|
807
|
+
onlineappId: onlineappId as number,
|
|
808
|
+
systemMessageId: systemMessageId as string,
|
|
809
|
+
associateId: associateId as number,
|
|
810
|
+
};
|
|
811
|
+
_options = webapi_options;
|
|
812
|
+
}
|
|
813
|
+
return this._removeSystemMessageForAssociateAsync( _request, _options );
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
private async _getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] > {
|
|
818
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
819
|
+
base.WebApiBase.SetPending(options);
|
|
820
|
+
return new Promise< carriers.SystemMessage[] >(async (resolve, reject) => {
|
|
821
|
+
try {
|
|
822
|
+
config.baseURL = this._options.baseUrl;
|
|
823
|
+
const response = await this._axios.post("GetSystemMessages", request , config);
|
|
824
|
+
base.WebApiBase.SetCompleted(options);
|
|
825
|
+
const res : carriers.SystemMessage[] = converters.Create_SystemMessageArray_From( response.data );
|
|
826
|
+
resolve(res);
|
|
827
|
+
}
|
|
828
|
+
catch( err ) {
|
|
829
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
830
|
+
reject(err);
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Retrieves a list of system messages for a specific associate.
|
|
839
|
+
* @param request - AssociateId
|
|
840
|
+
* @returns List of SystemMessages for desired associate
|
|
841
|
+
*/
|
|
842
|
+
public async getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Retrieves a list of system messages for a specific associate.
|
|
846
|
+
* @param associateId - The associateId of the message target.
|
|
847
|
+
* @returns List of SystemMessages for desired associate
|
|
848
|
+
*/
|
|
849
|
+
public async getSystemMessagesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
850
|
+
|
|
851
|
+
public async getSystemMessagesAsync(associateId:number|carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] > {
|
|
852
|
+
let _request : carriers.Diagnostics_GetSystemMessagesRequest = null;
|
|
853
|
+
let _options : base.WebApiRequestOptions = null;
|
|
854
|
+
const first : any = associateId;
|
|
855
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
856
|
+
{
|
|
857
|
+
_request = associateId as carriers.Diagnostics_GetSystemMessagesRequest;
|
|
858
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
859
|
+
}
|
|
860
|
+
else
|
|
861
|
+
{
|
|
862
|
+
_request = {
|
|
863
|
+
associateId: associateId as number,
|
|
864
|
+
};
|
|
865
|
+
_options = webapi_options;
|
|
866
|
+
}
|
|
867
|
+
return this._getSystemMessagesAsync( _request, _options );
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
private async _removeExpiredSystemMessagesAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
872
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
873
|
+
base.WebApiBase.SetPending(options);
|
|
874
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
875
|
+
try {
|
|
876
|
+
config.baseURL = this._options.baseUrl;
|
|
877
|
+
const response = await this._axios.post("RemoveExpiredSystemMessages", undefined , config);
|
|
878
|
+
base.WebApiBase.SetCompleted(options);
|
|
879
|
+
const res = response.data;
|
|
880
|
+
resolve(res);
|
|
881
|
+
}
|
|
882
|
+
catch( err ) {
|
|
883
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
884
|
+
reject(err);
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Deletes expired system messages.
|
|
892
|
+
* @returns
|
|
893
|
+
*/
|
|
894
|
+
public async removeExpiredSystemMessagesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
895
|
+
{
|
|
896
|
+
return this._removeExpiredSystemMessagesAsync(webapi_options);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
|
|
574
900
|
private async _performTasksAfterUpgradeAsync( options?:base.WebApiRequestOptions) : Promise< string > {
|
|
575
901
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
576
902
|
base.WebApiBase.SetPending(options);
|
|
@@ -600,6 +926,60 @@ export class DiagnosticsAgent extends base.WebApiBase implements IDiagnosticsAge
|
|
|
600
926
|
}
|
|
601
927
|
|
|
602
928
|
|
|
929
|
+
private async _performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
930
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
931
|
+
base.WebApiBase.SetPending(options);
|
|
932
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
933
|
+
try {
|
|
934
|
+
config.baseURL = this._options.baseUrl;
|
|
935
|
+
const response = await this._axios.post("PerformTasksAfterCustomObjectTableDeleted", request , config);
|
|
936
|
+
base.WebApiBase.SetCompleted(options);
|
|
937
|
+
const res = response.data;
|
|
938
|
+
resolve(res);
|
|
939
|
+
}
|
|
940
|
+
catch( err ) {
|
|
941
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
942
|
+
reject(err);
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.DeleteTable implemented in NetServer
|
|
951
|
+
* @param request - TableName
|
|
952
|
+
* @returns This method has no return value
|
|
953
|
+
*/
|
|
954
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.DeleteTable implemented in NetServer
|
|
958
|
+
* @param tableName - Name of DB table of the custom object that was deleted. E.g., 'y_car'
|
|
959
|
+
* @returns This method has no return value
|
|
960
|
+
*/
|
|
961
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
962
|
+
|
|
963
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(tableName:string|carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
964
|
+
let _request : carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest = null;
|
|
965
|
+
let _options : base.WebApiRequestOptions = null;
|
|
966
|
+
const first : any = tableName;
|
|
967
|
+
if( typeof( first ) === "object" && first && ( typeof(first.tableName)!='undefined' ) )
|
|
968
|
+
{
|
|
969
|
+
_request = tableName as carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest;
|
|
970
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
971
|
+
}
|
|
972
|
+
else
|
|
973
|
+
{
|
|
974
|
+
_request = {
|
|
975
|
+
tableName: tableName as string,
|
|
976
|
+
};
|
|
977
|
+
_options = webapi_options;
|
|
978
|
+
}
|
|
979
|
+
return this._performTasksAfterCustomObjectTableDeletedAsync( _request, _options );
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
|
|
603
983
|
private async _addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
604
984
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
605
985
|
base.WebApiBase.SetPending(options);
|
package/src/DocumentAgent.ts
CHANGED
|
@@ -131,6 +131,8 @@ export interface IDocumentAgent {
|
|
|
131
131
|
getDocumentLengthAsync(documentId: number, versionId: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
132
132
|
copyDocumentToCsAttachmentAsync(request: carriers.Document_CopyDocumentToCsAttachmentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
133
133
|
copyDocumentToCsAttachmentAsync(documentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
134
|
+
savePrivacyReportPdfAsync(request: carriers.Document_SavePrivacyReportPdfRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
135
|
+
savePrivacyReportPdfAsync(stream: ArrayBuffer|string, title: string, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
134
136
|
getDocumentListAsync(documentIds: number[]) : Promise< carriers.Document[] >;
|
|
135
137
|
getAppointmentDocumentsAsync(request: carriers.Document_GetAppointmentDocumentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Document[] >;
|
|
136
138
|
getAppointmentDocumentsAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Document[] >;
|
|
@@ -3444,6 +3446,65 @@ export class DocumentAgent extends base.WebApiBase implements IDocumentAgent {
|
|
|
3444
3446
|
return this._copyDocumentToCsAttachmentAsync( _request, _options );
|
|
3445
3447
|
}
|
|
3446
3448
|
|
|
3449
|
+
|
|
3450
|
+
private async _savePrivacyReportPdfAsync(request: carriers.Document_SavePrivacyReportPdfRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
3451
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3452
|
+
base.WebApiBase.SetPending(options);
|
|
3453
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
3454
|
+
try {
|
|
3455
|
+
config.baseURL = this._options.baseUrl;
|
|
3456
|
+
const response = await this._axios.post("SavePrivacyReportPdf", request , config);
|
|
3457
|
+
base.WebApiBase.SetCompleted(options);
|
|
3458
|
+
const res : number = response.data as number;
|
|
3459
|
+
resolve(res);
|
|
3460
|
+
}
|
|
3461
|
+
catch( err ) {
|
|
3462
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3463
|
+
reject(err);
|
|
3464
|
+
}
|
|
3465
|
+
});
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
|
|
3469
|
+
|
|
3470
|
+
/**
|
|
3471
|
+
* Saves a pdf stream, assigns file name, connects to given contact etc.
|
|
3472
|
+
* @param request - Stream, Title, PersonId
|
|
3473
|
+
* @returns Document id of saved report
|
|
3474
|
+
*/
|
|
3475
|
+
public async savePrivacyReportPdfAsync(request: carriers.Document_SavePrivacyReportPdfRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
3476
|
+
|
|
3477
|
+
/**
|
|
3478
|
+
* Saves a pdf stream, assigns file name, connects to given contact etc.
|
|
3479
|
+
* @param stream - The pdf document as a stream.
|
|
3480
|
+
* @param title - Title of report
|
|
3481
|
+
* @param personId - Person id associated with the report
|
|
3482
|
+
* @returns Document id of saved report
|
|
3483
|
+
*/
|
|
3484
|
+
public async savePrivacyReportPdfAsync(stream: ArrayBuffer|string, title: string, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
3485
|
+
|
|
3486
|
+
public async savePrivacyReportPdfAsync(stream:ArrayBuffer|string|carriers.Document_SavePrivacyReportPdfRequest, title?:string|base.WebApiRequestOptions, personId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
3487
|
+
let _request : carriers.Document_SavePrivacyReportPdfRequest = null;
|
|
3488
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3489
|
+
const first : any = stream;
|
|
3490
|
+
if( typeof( first ) === "object" && first && ( typeof(first.stream)!='undefined' || typeof(first.title)!='undefined' || typeof(first.personId)!='undefined' ) )
|
|
3491
|
+
{
|
|
3492
|
+
_request = stream as carriers.Document_SavePrivacyReportPdfRequest;
|
|
3493
|
+
_options = title as base.WebApiRequestOptions;
|
|
3494
|
+
}
|
|
3495
|
+
else
|
|
3496
|
+
{
|
|
3497
|
+
_request = {
|
|
3498
|
+
stream: stream as ArrayBuffer|string,
|
|
3499
|
+
title: title as string,
|
|
3500
|
+
personId: personId as number,
|
|
3501
|
+
};
|
|
3502
|
+
_options = webapi_options;
|
|
3503
|
+
}
|
|
3504
|
+
_request.stream = ToBase64(_request.stream);
|
|
3505
|
+
return this._savePrivacyReportPdfAsync( _request, _options );
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3447
3508
|
/**
|
|
3448
3509
|
* Gets an array of Document objects.
|
|
3449
3510
|
* @param documentIds - The primary keys.
|