@superoffice/webapi 11.13.921 → 12.1.1412
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/Carriers.d.ts +836 -9
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +66 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +158 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +33 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +484 -18
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomObjectAgent.d.ts +137 -0
- package/dist/cjs/CustomObjectAgent.d.ts.map +1 -0
- package/dist/cjs/CustomObjectAgent.js +294 -0
- package/dist/cjs/CustomObjectAgent.js.map +1 -0
- package/dist/cjs/CustomerServiceAgent.d.ts +4 -3
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +3 -2
- package/dist/cjs/CustomerServiceAgent.js.map +1 -1
- package/dist/cjs/DashAgent.d.ts +7 -0
- package/dist/cjs/DashAgent.d.ts.map +1 -1
- package/dist/cjs/DashAgent.js +24 -0
- package/dist/cjs/DashAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +150 -30
- package/dist/cjs/EMailAgent.d.ts.map +1 -1
- package/dist/cjs/EMailAgent.js +260 -0
- package/dist/cjs/EMailAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +76 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +82 -2
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +7 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +24 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +25 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +60 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +10 -3
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +24 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +99 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +207 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/cjs/WebApi.d.ts +6 -0
- package/dist/cjs/WebApi.d.ts.map +1 -1
- package/dist/cjs/WebApi.js +10 -1
- package/dist/cjs/WebApi.js.map +1 -1
- package/dist/cjs/WorkflowAgent.d.ts +7 -0
- package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
- package/dist/cjs/WorkflowAgent.js +24 -0
- package/dist/cjs/WorkflowAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +836 -9
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +66 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +158 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +33 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +432 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomObjectAgent.d.ts +137 -0
- package/dist/esm/CustomObjectAgent.d.ts.map +1 -0
- package/dist/esm/CustomObjectAgent.js +289 -0
- package/dist/esm/CustomObjectAgent.js.map +1 -0
- package/dist/esm/CustomerServiceAgent.d.ts +4 -3
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +3 -2
- package/dist/esm/CustomerServiceAgent.js.map +1 -1
- package/dist/esm/DashAgent.d.ts +7 -0
- package/dist/esm/DashAgent.d.ts.map +1 -1
- package/dist/esm/DashAgent.js +24 -0
- package/dist/esm/DashAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +150 -30
- package/dist/esm/EMailAgent.d.ts.map +1 -1
- package/dist/esm/EMailAgent.js +260 -0
- package/dist/esm/EMailAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +76 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +80 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +7 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +24 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +25 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +60 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +10 -3
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +24 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +99 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +207 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/dist/esm/WebApi.d.ts +6 -0
- package/dist/esm/WebApi.d.ts.map +1 -1
- package/dist/esm/WebApi.js +9 -0
- package/dist/esm/WebApi.js.map +1 -1
- package/dist/esm/WorkflowAgent.d.ts +7 -0
- package/dist/esm/WorkflowAgent.d.ts.map +1 -1
- package/dist/esm/WorkflowAgent.js +24 -0
- package/dist/esm/WorkflowAgent.js.map +1 -1
- package/package.json +4 -4
- package/src/Carriers.ts +1119 -3
- package/src/ConfigurationAgent.ts +216 -0
- package/src/Converters.ts +524 -0
- package/src/CustomObjectAgent.ts +489 -0
- package/src/CustomerServiceAgent.ts +7 -5
- package/src/DashAgent.ts +30 -0
- package/src/EMailAgent.ts +470 -30
- package/src/Enums.ts +84 -0
- package/src/LicenseAgent.ts +30 -0
- package/src/ListAgent.ts +92 -0
- package/src/ProjectAgent.ts +33 -3
- package/src/TicketAgent.ts +354 -0
- package/src/WebApi.ts +12 -0
- package/src/WorkflowAgent.ts +30 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
// <auto-generated>
|
|
2
|
+
// SuperOffice Code Generator
|
|
3
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
+
// </auto-generated>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
//----------------------------------------------------------------------------
|
|
9
|
+
// G E N E R A T E D F I L E ! D O N O T E D I T !
|
|
10
|
+
//----------------------------------------------------------------------------
|
|
11
|
+
//
|
|
12
|
+
// File: WebApi/CustomObjectAgent.ts
|
|
13
|
+
//
|
|
14
|
+
//----------------------------------------------------------------------------
|
|
15
|
+
// Copyright (C) SuperOffice AS
|
|
16
|
+
//----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
import { AxiosRequestConfig } from 'axios';
|
|
19
|
+
import { Duration } from 'dayjs/plugin/duration';
|
|
20
|
+
import * as enums from './Enums';
|
|
21
|
+
import * as base from './WebApiBase';
|
|
22
|
+
import * as carriers from './Carriers';
|
|
23
|
+
import * as converters from './Converters';
|
|
24
|
+
import { FromBase64ToString, ToBase64 } from './Base64';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Agent for working with Custom Objects (extra tables): read schema and full CRUD over rows. Purpose-built replacement for using DatabaseTableAgent against custom objects.
|
|
28
|
+
*/
|
|
29
|
+
export interface ICustomObjectAgent {
|
|
30
|
+
createDefaultCustomObjectDefinitionAsync(): Promise< carriers.CustomObjectDefinition >;
|
|
31
|
+
createDefaultCustomObjectAsync(request: carriers.CustomObject_CreateDefaultCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
32
|
+
createDefaultCustomObjectAsync(definitionName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
33
|
+
getCustomObjectAsync(request: carriers.CustomObject_GetCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
34
|
+
getCustomObjectAsync(definitionName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
35
|
+
saveCustomObjectAsync(request: carriers.CustomObject_SaveCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
36
|
+
saveCustomObjectAsync(definitionName: string, row: carriers.CustomObject, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
37
|
+
deleteCustomObjectAsync(request: carriers.CustomObject_DeleteCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
38
|
+
deleteCustomObjectAsync(definitionName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
39
|
+
getCustomObjectDefinitionAsync(request: carriers.CustomObject_GetCustomObjectDefinitionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition >;
|
|
40
|
+
getCustomObjectDefinitionAsync(definitionName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition >;
|
|
41
|
+
hasScreenChooserAsync(request: carriers.CustomObject_HasScreenChooserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
42
|
+
hasScreenChooserAsync(definitionName: string, edit: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
43
|
+
getCustomObjectsMetadataAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectMetadata[] >;
|
|
44
|
+
getCustomObjectsIconsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
45
|
+
} // interface ICustomObjectAgent
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Agent for working with Custom Objects (extra tables): read schema and full CRUD over rows. Purpose-built replacement for using DatabaseTableAgent against custom objects.
|
|
52
|
+
*/
|
|
53
|
+
export class CustomObjectAgent extends base.WebApiBase implements ICustomObjectAgent {
|
|
54
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
55
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
56
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
57
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
58
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
59
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
60
|
+
constructor(options: base.WebApiOptions);
|
|
61
|
+
|
|
62
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
63
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
64
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
65
|
+
cultureCode?: string,
|
|
66
|
+
) {
|
|
67
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
68
|
+
options.basePath = "v1/Agents/CustomObject/";
|
|
69
|
+
super(options);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Set default values into a new CustomObjectDefinition.
|
|
77
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
78
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
79
|
+
* @returns A blank entity.
|
|
80
|
+
*/
|
|
81
|
+
public async createDefaultCustomObjectDefinitionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition > {
|
|
82
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
83
|
+
base.WebApiBase.SetPending(options);
|
|
84
|
+
return new Promise< carriers.CustomObjectDefinition >(async (resolve, reject) => {
|
|
85
|
+
try {
|
|
86
|
+
const response = await this._axios.post("CreateDefaultCustomObjectDefinition", null, config);
|
|
87
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
88
|
+
const res : carriers.CustomObjectDefinition = converters.Create_CustomObjectDefinition_From( response.data );
|
|
89
|
+
resolve(res);
|
|
90
|
+
}
|
|
91
|
+
catch( err ) {
|
|
92
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
93
|
+
reject(err);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private async _createDefaultCustomObjectAsync(request: carriers.CustomObject_CreateDefaultCustomObjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
99
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
100
|
+
base.WebApiBase.SetPending(options);
|
|
101
|
+
return new Promise< carriers.CustomObject >(async (resolve, reject) => {
|
|
102
|
+
try {
|
|
103
|
+
config.baseURL = this._options.baseUrl;
|
|
104
|
+
const response = await this._axios.post("CreateDefaultCustomObject", request , config);
|
|
105
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
106
|
+
const res : carriers.CustomObject = converters.Create_CustomObject_From( response.data );
|
|
107
|
+
resolve(res);
|
|
108
|
+
}
|
|
109
|
+
catch( err ) {
|
|
110
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
111
|
+
reject(err);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Returns a new Custom Object row pre-populated with the default values declared by the Custom Object Definition. The row is not yet persisted.
|
|
120
|
+
* @param request - DefinitionName
|
|
121
|
+
* @returns A new Custom Object row pre-populated with default values. Not yet persisted.
|
|
122
|
+
*/
|
|
123
|
+
public async createDefaultCustomObjectAsync(request: carriers.CustomObject_CreateDefaultCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns a new Custom Object row pre-populated with the default values declared by the Custom Object Definition. The row is not yet persisted.
|
|
127
|
+
* @param definitionName - Database table name of the Custom Object Definition, e.g. 'y_equipment'.
|
|
128
|
+
* @returns A new Custom Object row pre-populated with default values. Not yet persisted.
|
|
129
|
+
*/
|
|
130
|
+
public async createDefaultCustomObjectAsync(definitionName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
131
|
+
|
|
132
|
+
public async createDefaultCustomObjectAsync(definitionName:string|carriers.CustomObject_CreateDefaultCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
133
|
+
let _request : carriers.CustomObject_CreateDefaultCustomObjectRequest = null;
|
|
134
|
+
let _options : base.WebApiRequestOptions = null;
|
|
135
|
+
const first : any = definitionName;
|
|
136
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' ) )
|
|
137
|
+
{
|
|
138
|
+
_request = definitionName as carriers.CustomObject_CreateDefaultCustomObjectRequest;
|
|
139
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
140
|
+
}
|
|
141
|
+
else
|
|
142
|
+
{
|
|
143
|
+
_request = {
|
|
144
|
+
definitionName: definitionName as string,
|
|
145
|
+
};
|
|
146
|
+
_options = webapi_options;
|
|
147
|
+
}
|
|
148
|
+
return this._createDefaultCustomObjectAsync( _request, _options );
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
private async _getCustomObjectAsync(request: carriers.CustomObject_GetCustomObjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
153
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
154
|
+
base.WebApiBase.SetPending(options);
|
|
155
|
+
return new Promise< carriers.CustomObject >(async (resolve, reject) => {
|
|
156
|
+
try {
|
|
157
|
+
config.baseURL = this._options.baseUrl;
|
|
158
|
+
const response = await this._axios.post("GetCustomObject", request , config);
|
|
159
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
160
|
+
const res : carriers.CustomObject = converters.Create_CustomObject_From( response.data );
|
|
161
|
+
resolve(res);
|
|
162
|
+
}
|
|
163
|
+
catch( err ) {
|
|
164
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
165
|
+
reject(err);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Returns a single Custom Object row by definition name and primary key.
|
|
174
|
+
* @param request - DefinitionName, Id
|
|
175
|
+
* @returns The Custom Object row, or null if no row with that id exists.
|
|
176
|
+
*/
|
|
177
|
+
public async getCustomObjectAsync(request: carriers.CustomObject_GetCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Returns a single Custom Object row by definition name and primary key.
|
|
181
|
+
* @param definitionName - Database table name of the Custom Object Definition, e.g. 'y_equipment'.
|
|
182
|
+
* @param id - Primary key of the row to fetch.
|
|
183
|
+
* @returns The Custom Object row, or null if no row with that id exists.
|
|
184
|
+
*/
|
|
185
|
+
public async getCustomObjectAsync(definitionName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
186
|
+
|
|
187
|
+
public async getCustomObjectAsync(definitionName:string|carriers.CustomObject_GetCustomObjectRequest, id?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
188
|
+
let _request : carriers.CustomObject_GetCustomObjectRequest = null;
|
|
189
|
+
let _options : base.WebApiRequestOptions = null;
|
|
190
|
+
const first : any = definitionName;
|
|
191
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' || typeof(first.id)!='undefined' ) )
|
|
192
|
+
{
|
|
193
|
+
_request = definitionName as carriers.CustomObject_GetCustomObjectRequest;
|
|
194
|
+
_options = id as base.WebApiRequestOptions;
|
|
195
|
+
}
|
|
196
|
+
else
|
|
197
|
+
{
|
|
198
|
+
_request = {
|
|
199
|
+
definitionName: definitionName as string,
|
|
200
|
+
id: id as number,
|
|
201
|
+
};
|
|
202
|
+
_options = webapi_options;
|
|
203
|
+
}
|
|
204
|
+
return this._getCustomObjectAsync( _request, _options );
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
private async _saveCustomObjectAsync(request: carriers.CustomObject_SaveCustomObjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
209
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
210
|
+
base.WebApiBase.SetPending(options);
|
|
211
|
+
return new Promise< carriers.CustomObject >(async (resolve, reject) => {
|
|
212
|
+
try {
|
|
213
|
+
config.baseURL = this._options.baseUrl;
|
|
214
|
+
const response = await this._axios.post("SaveCustomObject", request , config);
|
|
215
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
216
|
+
const res : carriers.CustomObject = converters.Create_CustomObject_From( response.data );
|
|
217
|
+
resolve(res);
|
|
218
|
+
}
|
|
219
|
+
catch( err ) {
|
|
220
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
221
|
+
reject(err);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Saves a Custom Object row. If the row has a primary key set it will be updated, otherwise a new row is inserted.
|
|
230
|
+
* @param request - DefinitionName, Row
|
|
231
|
+
* @returns The saved Custom Object row, with any server-assigned values (e.g. primary key) filled in.
|
|
232
|
+
*/
|
|
233
|
+
public async saveCustomObjectAsync(request: carriers.CustomObject_SaveCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Saves a Custom Object row. If the row has a primary key set it will be updated, otherwise a new row is inserted.
|
|
237
|
+
* @param definitionName - Database table name of the Custom Object Definition, e.g. 'y_equipment'.
|
|
238
|
+
* @param row - The Custom Object row to save.
|
|
239
|
+
* @returns The saved Custom Object row, with any server-assigned values (e.g. primary key) filled in.
|
|
240
|
+
*/
|
|
241
|
+
public async saveCustomObjectAsync(definitionName: string, row: carriers.CustomObject, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject >;
|
|
242
|
+
|
|
243
|
+
public async saveCustomObjectAsync(definitionName:string|carriers.CustomObject_SaveCustomObjectRequest, row?:carriers.CustomObject|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObject > {
|
|
244
|
+
let _request : carriers.CustomObject_SaveCustomObjectRequest = null;
|
|
245
|
+
let _options : base.WebApiRequestOptions = null;
|
|
246
|
+
const first : any = definitionName;
|
|
247
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' || typeof(first.row)!='undefined' ) )
|
|
248
|
+
{
|
|
249
|
+
_request = definitionName as carriers.CustomObject_SaveCustomObjectRequest;
|
|
250
|
+
_options = row as base.WebApiRequestOptions;
|
|
251
|
+
}
|
|
252
|
+
else
|
|
253
|
+
{
|
|
254
|
+
_request = {
|
|
255
|
+
definitionName: definitionName as string,
|
|
256
|
+
row: row as carriers.CustomObject,
|
|
257
|
+
};
|
|
258
|
+
_options = webapi_options;
|
|
259
|
+
}
|
|
260
|
+
return this._saveCustomObjectAsync( _request, _options );
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
private async _deleteCustomObjectAsync(request: carriers.CustomObject_DeleteCustomObjectRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
265
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
266
|
+
base.WebApiBase.SetPending(options);
|
|
267
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
268
|
+
try {
|
|
269
|
+
config.baseURL = this._options.baseUrl;
|
|
270
|
+
const response = await this._axios.post("DeleteCustomObject", request , config);
|
|
271
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
272
|
+
const res = response.data;
|
|
273
|
+
resolve(res);
|
|
274
|
+
}
|
|
275
|
+
catch( err ) {
|
|
276
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
277
|
+
reject(err);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Deletes a single Custom Object row by primary key.
|
|
286
|
+
* @param request - DefinitionName, Id
|
|
287
|
+
* @returns This method has no return value
|
|
288
|
+
*/
|
|
289
|
+
public async deleteCustomObjectAsync(request: carriers.CustomObject_DeleteCustomObjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Deletes a single Custom Object row by primary key.
|
|
293
|
+
* @param definitionName - Database table name of the Custom Object Definition, e.g. 'y_equipment'.
|
|
294
|
+
* @param id - Primary key of the row to delete.
|
|
295
|
+
* @returns This method has no return value
|
|
296
|
+
*/
|
|
297
|
+
public async deleteCustomObjectAsync(definitionName: string, id: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
298
|
+
|
|
299
|
+
public async deleteCustomObjectAsync(definitionName:string|carriers.CustomObject_DeleteCustomObjectRequest, id?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
300
|
+
let _request : carriers.CustomObject_DeleteCustomObjectRequest = null;
|
|
301
|
+
let _options : base.WebApiRequestOptions = null;
|
|
302
|
+
const first : any = definitionName;
|
|
303
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' || typeof(first.id)!='undefined' ) )
|
|
304
|
+
{
|
|
305
|
+
_request = definitionName as carriers.CustomObject_DeleteCustomObjectRequest;
|
|
306
|
+
_options = id as base.WebApiRequestOptions;
|
|
307
|
+
}
|
|
308
|
+
else
|
|
309
|
+
{
|
|
310
|
+
_request = {
|
|
311
|
+
definitionName: definitionName as string,
|
|
312
|
+
id: id as number,
|
|
313
|
+
};
|
|
314
|
+
_options = webapi_options;
|
|
315
|
+
}
|
|
316
|
+
return this._deleteCustomObjectAsync( _request, _options );
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
private async _getCustomObjectDefinitionAsync(request: carriers.CustomObject_GetCustomObjectDefinitionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition > {
|
|
321
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
322
|
+
base.WebApiBase.SetPending(options);
|
|
323
|
+
return new Promise< carriers.CustomObjectDefinition >(async (resolve, reject) => {
|
|
324
|
+
try {
|
|
325
|
+
config.baseURL = this._options.baseUrl;
|
|
326
|
+
const response = await this._axios.post("GetCustomObjectDefinition", request , config);
|
|
327
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
328
|
+
const res : carriers.CustomObjectDefinition = converters.Create_CustomObjectDefinition_From( response.data );
|
|
329
|
+
resolve(res);
|
|
330
|
+
}
|
|
331
|
+
catch( err ) {
|
|
332
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
333
|
+
reject(err);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Returns the schema (table + field definitions) for a Custom Object Definition by its database table name.
|
|
342
|
+
* @param request - DefinitionName
|
|
343
|
+
* @returns The Custom Object Definition, or null if no definition with that name exists.
|
|
344
|
+
*/
|
|
345
|
+
public async getCustomObjectDefinitionAsync(request: carriers.CustomObject_GetCustomObjectDefinitionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition >;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Returns the schema (table + field definitions) for a Custom Object Definition by its database table name.
|
|
349
|
+
* @param definitionName - Database table name of the Custom Object Definition, e.g. 'y_equipment'.
|
|
350
|
+
* @returns The Custom Object Definition, or null if no definition with that name exists.
|
|
351
|
+
*/
|
|
352
|
+
public async getCustomObjectDefinitionAsync(definitionName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition >;
|
|
353
|
+
|
|
354
|
+
public async getCustomObjectDefinitionAsync(definitionName:string|carriers.CustomObject_GetCustomObjectDefinitionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectDefinition > {
|
|
355
|
+
let _request : carriers.CustomObject_GetCustomObjectDefinitionRequest = null;
|
|
356
|
+
let _options : base.WebApiRequestOptions = null;
|
|
357
|
+
const first : any = definitionName;
|
|
358
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' ) )
|
|
359
|
+
{
|
|
360
|
+
_request = definitionName as carriers.CustomObject_GetCustomObjectDefinitionRequest;
|
|
361
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
362
|
+
}
|
|
363
|
+
else
|
|
364
|
+
{
|
|
365
|
+
_request = {
|
|
366
|
+
definitionName: definitionName as string,
|
|
367
|
+
};
|
|
368
|
+
_options = webapi_options;
|
|
369
|
+
}
|
|
370
|
+
return this._getCustomObjectDefinitionAsync( _request, _options );
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
private async _hasScreenChooserAsync(request: carriers.CustomObject_HasScreenChooserRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
375
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
376
|
+
base.WebApiBase.SetPending(options);
|
|
377
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
378
|
+
try {
|
|
379
|
+
config.baseURL = this._options.baseUrl;
|
|
380
|
+
const response = await this._axios.post("HasScreenChooser", request , config);
|
|
381
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
382
|
+
const res : boolean = response.data as boolean;
|
|
383
|
+
resolve(res);
|
|
384
|
+
}
|
|
385
|
+
catch( err ) {
|
|
386
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
387
|
+
reject(err);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Returns true if a screen chooser is configured for the given Custom Object Definition and mode.
|
|
396
|
+
* @param request - DefinitionName, Edit
|
|
397
|
+
* @returns True if a screen chooser (view or edit) is configured for this Custom Object.
|
|
398
|
+
*/
|
|
399
|
+
public async hasScreenChooserAsync(request: carriers.CustomObject_HasScreenChooserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Returns true if a screen chooser is configured for the given Custom Object Definition and mode.
|
|
403
|
+
* @param definitionName - Database table name of the Custom Object Definition.
|
|
404
|
+
* @param edit - True to check for a custom edit screen; false to check for a custom view screen.
|
|
405
|
+
* @returns True if a screen chooser (view or edit) is configured for this Custom Object.
|
|
406
|
+
*/
|
|
407
|
+
public async hasScreenChooserAsync(definitionName: string, edit: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
408
|
+
|
|
409
|
+
public async hasScreenChooserAsync(definitionName:string|carriers.CustomObject_HasScreenChooserRequest, edit?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
410
|
+
let _request : carriers.CustomObject_HasScreenChooserRequest = null;
|
|
411
|
+
let _options : base.WebApiRequestOptions = null;
|
|
412
|
+
const first : any = definitionName;
|
|
413
|
+
if( typeof( first ) === "object" && first && ( typeof(first.definitionName)!='undefined' || typeof(first.edit)!='undefined' ) )
|
|
414
|
+
{
|
|
415
|
+
_request = definitionName as carriers.CustomObject_HasScreenChooserRequest;
|
|
416
|
+
_options = edit as base.WebApiRequestOptions;
|
|
417
|
+
}
|
|
418
|
+
else
|
|
419
|
+
{
|
|
420
|
+
_request = {
|
|
421
|
+
definitionName: definitionName as string,
|
|
422
|
+
edit: edit as boolean,
|
|
423
|
+
};
|
|
424
|
+
_options = webapi_options;
|
|
425
|
+
}
|
|
426
|
+
return this._hasScreenChooserAsync( _request, _options );
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
private async _getCustomObjectsMetadataAsync( options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectMetadata[] > {
|
|
431
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
432
|
+
base.WebApiBase.SetPending(options);
|
|
433
|
+
return new Promise< carriers.CustomObjectMetadata[] >(async (resolve, reject) => {
|
|
434
|
+
try {
|
|
435
|
+
config.baseURL = this._options.baseUrl;
|
|
436
|
+
const response = await this._axios.post("GetCustomObjectsMetadata", undefined , config);
|
|
437
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
438
|
+
const res : carriers.CustomObjectMetadata[] = converters.Create_CustomObjectMetadataArray_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
|
+
* Returns bootstrap metadata for all Custom Object tables.
|
|
451
|
+
* @returns Metadata for all custom object tables.
|
|
452
|
+
*/
|
|
453
|
+
public async getCustomObjectsMetadataAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CustomObjectMetadata[] >
|
|
454
|
+
{
|
|
455
|
+
return this._getCustomObjectsMetadataAsync(webapi_options);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
private async _getCustomObjectsIconsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
460
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
461
|
+
base.WebApiBase.SetPending(options);
|
|
462
|
+
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
463
|
+
try {
|
|
464
|
+
config.baseURL = this._options.baseUrl;
|
|
465
|
+
const response = await this._axios.post("GetCustomObjectsIcons", undefined , config);
|
|
466
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
467
|
+
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
468
|
+
resolve(res);
|
|
469
|
+
}
|
|
470
|
+
catch( err ) {
|
|
471
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
472
|
+
reject(err);
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Returns SVG icon data for all Custom Object tables, keyed by table name.
|
|
480
|
+
* @returns Map of table name to SVG icon data URI.
|
|
481
|
+
*/
|
|
482
|
+
public async getCustomObjectsIconsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >
|
|
483
|
+
{
|
|
484
|
+
return this._getCustomObjectsIconsAsync(webapi_options);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
} // class v1CustomObjectAgentController
|
|
488
|
+
|
|
489
|
+
|
|
@@ -84,7 +84,7 @@ export interface ICustomerServiceAgent {
|
|
|
84
84
|
saveSystemTemplateSettingsAsync(request: carriers.CustomerService_SaveSystemTemplateSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
|
|
85
85
|
saveSystemTemplateSettingsAsync(systemTemplateSettings: carriers.SystemTemplateSettings, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemTemplateSettings >;
|
|
86
86
|
createTicketFromMailDataAsync(request: carriers.CustomerService_CreateTicketFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
87
|
-
createTicketFromMailDataAsync(mailboxId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
87
|
+
createTicketFromMailDataAsync(mailboxId: number, data: string, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
88
88
|
addMessageFromMailDataAsync(request: carriers.CustomerService_AddMessageFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
89
89
|
addMessageFromMailDataAsync(ticketId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
90
90
|
findTicketsByTitleOrIdAsync(request: carriers.CustomerService_FindTicketsByTitleOrIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo[] >;
|
|
@@ -1649,7 +1649,7 @@ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerSe
|
|
|
1649
1649
|
|
|
1650
1650
|
/**
|
|
1651
1651
|
* This method create a new ticket in the same way as importMail would import an email. It accepts RFC822 formatted data
|
|
1652
|
-
* @param request - MailboxId, Data
|
|
1652
|
+
* @param request - MailboxId, Data, PersonId
|
|
1653
1653
|
* @returns An object containing some meta data for the created ticket
|
|
1654
1654
|
*/
|
|
1655
1655
|
public async createTicketFromMailDataAsync(request: carriers.CustomerService_CreateTicketFromMailDataRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
@@ -1658,15 +1658,16 @@ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerSe
|
|
|
1658
1658
|
* This method create a new ticket in the same way as importMail would import an email. It accepts RFC822 formatted data
|
|
1659
1659
|
* @param mailboxId - The id of the Service mailbox
|
|
1660
1660
|
* @param data - RFC822 formatted data to import as a ticket
|
|
1661
|
+
* @param personId - Optional. If greater than 0, the new ticket is attached to this person as the primary customer and the email's From header is not used to resolve the customer; the supplied person must exist and not be retired or the call throws a validation error. If 0 (default), the customer is resolved from the email as before.
|
|
1661
1662
|
* @returns An object containing some meta data for the created ticket
|
|
1662
1663
|
*/
|
|
1663
|
-
public async createTicketFromMailDataAsync(mailboxId: number, data: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
1664
|
+
public async createTicketFromMailDataAsync(mailboxId: number, data: string, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo >;
|
|
1664
1665
|
|
|
1665
|
-
public async createTicketFromMailDataAsync(mailboxId:number|carriers.CustomerService_CreateTicketFromMailDataRequest, data?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
|
|
1666
|
+
public async createTicketFromMailDataAsync(mailboxId:number|carriers.CustomerService_CreateTicketFromMailDataRequest, data?:string|base.WebApiRequestOptions, personId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketInfo > {
|
|
1666
1667
|
let _request : carriers.CustomerService_CreateTicketFromMailDataRequest = null;
|
|
1667
1668
|
let _options : base.WebApiRequestOptions = null;
|
|
1668
1669
|
const first : any = mailboxId;
|
|
1669
|
-
if( typeof( first ) === "object" && first && ( typeof(first.mailboxId)!='undefined' || typeof(first.data)!='undefined' ) )
|
|
1670
|
+
if( typeof( first ) === "object" && first && ( typeof(first.mailboxId)!='undefined' || typeof(first.data)!='undefined' || typeof(first.personId)!='undefined' ) )
|
|
1670
1671
|
{
|
|
1671
1672
|
_request = mailboxId as carriers.CustomerService_CreateTicketFromMailDataRequest;
|
|
1672
1673
|
_options = data as base.WebApiRequestOptions;
|
|
@@ -1676,6 +1677,7 @@ export class CustomerServiceAgent extends base.WebApiBase implements ICustomerSe
|
|
|
1676
1677
|
_request = {
|
|
1677
1678
|
mailboxId: mailboxId as number,
|
|
1678
1679
|
data: data as string,
|
|
1680
|
+
personId: personId as number,
|
|
1679
1681
|
};
|
|
1680
1682
|
_options = webapi_options;
|
|
1681
1683
|
}
|
package/src/DashAgent.ts
CHANGED
|
@@ -57,6 +57,7 @@ export interface IDashAgent {
|
|
|
57
57
|
saveDashQuickFiltersAsync(dashboardId: number, quickFilters: carriers.QuickFilterInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
|
|
58
58
|
getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
|
|
59
59
|
getPossibleDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
|
|
60
|
+
getDashboardFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >;
|
|
60
61
|
getDashCollectionAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection >;
|
|
61
62
|
getDashThemeAsync(dashThemeId: number) : Promise< carriers.DashTheme >;
|
|
62
63
|
getDashTileAsync(dashTileId: number) : Promise< carriers.DashTile >;
|
|
@@ -862,6 +863,35 @@ export class DashAgent extends base.WebApiBase implements IDashAgent {
|
|
|
862
863
|
}
|
|
863
864
|
|
|
864
865
|
|
|
866
|
+
private async _getDashboardFencingInfoAsync( options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo > {
|
|
867
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
868
|
+
base.WebApiBase.SetPending(options);
|
|
869
|
+
return new Promise< carriers.FencingInfo >(async (resolve, reject) => {
|
|
870
|
+
try {
|
|
871
|
+
config.baseURL = this._options.baseUrl;
|
|
872
|
+
const response = await this._axios.post("GetDashboardFencingInfo", undefined , config);
|
|
873
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
874
|
+
const res : carriers.FencingInfo = converters.Create_FencingInfo_From( response.data );
|
|
875
|
+
resolve(res);
|
|
876
|
+
}
|
|
877
|
+
catch( err ) {
|
|
878
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
879
|
+
reject(err);
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Get the current dashboard fencing status for the tenant
|
|
887
|
+
* @returns Current fencing status including count, maximum, and warning state
|
|
888
|
+
*/
|
|
889
|
+
public async getDashboardFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >
|
|
890
|
+
{
|
|
891
|
+
return this._getDashboardFencingInfoAsync(webapi_options);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
|
|
865
895
|
private async _getDashCollectionAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection > {
|
|
866
896
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
867
897
|
base.WebApiBase.SetPending(options);
|