@superoffice/webapi 10.5.5 → 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/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/Carriers.d.ts +107 -1111
- 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 +3 -39
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +34 -570
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomerServiceAgent.d.ts +0 -16
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +0 -44
- package/dist/cjs/CustomerServiceAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +5 -5
- package/dist/cjs/EMailAgent.js +1 -1
- package/dist/cjs/Enums.d.ts +0 -243
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +4 -254
- 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 +22 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +57 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +18 -18
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +15 -15
- package/dist/cjs/ListAgent.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 +18 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +36 -0
- package/dist/cjs/PersonAgent.js.map +1 -1
- package/dist/cjs/QuoteAgent.d.ts +0 -48
- package/dist/cjs/QuoteAgent.d.ts.map +1 -1
- package/dist/cjs/QuoteAgent.js +0 -118
- 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/SelectionAgent.d.ts +0 -46
- package/dist/cjs/SelectionAgent.d.ts.map +1 -1
- package/dist/cjs/SelectionAgent.js +0 -110
- package/dist/cjs/SelectionAgent.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/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/Carriers.d.ts +107 -1111
- 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 +3 -39
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +6 -505
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomerServiceAgent.d.ts +0 -16
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +0 -44
- package/dist/esm/CustomerServiceAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +5 -5
- package/dist/esm/EMailAgent.js +1 -1
- package/dist/esm/Enums.d.ts +0 -243
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +0 -250
- 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 +22 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +57 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +18 -18
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +15 -15
- package/dist/esm/ListAgent.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 +18 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +36 -0
- package/dist/esm/PersonAgent.js.map +1 -1
- package/dist/esm/QuoteAgent.d.ts +0 -48
- package/dist/esm/QuoteAgent.d.ts.map +1 -1
- package/dist/esm/QuoteAgent.js +0 -118
- 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/SelectionAgent.d.ts +0 -46
- package/dist/esm/SelectionAgent.d.ts.map +1 -1
- package/dist/esm/SelectionAgent.js +0 -110
- package/dist/esm/SelectionAgent.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/package.json +3 -3
- package/src/BLOBAgent.ts +0 -114
- package/src/Carriers.ts +94 -1458
- package/src/ConfigurationAgent.ts +60 -0
- package/src/Converters.ts +10 -617
- package/src/CustomerServiceAgent.ts +0 -47
- package/src/EMailAgent.ts +5 -5
- package/src/Enums.ts +0 -257
- package/src/FreeTextAgent.ts +0 -254
- package/src/LicenseAgent.ts +86 -0
- package/src/ListAgent.ts +34 -34
- package/src/NavigatorAgent.ts +0 -24
- package/src/PersonAgent.ts +62 -0
- package/src/QuoteAgent.ts +0 -193
- package/src/ReportAgent.ts +0 -421
- package/src/SelectionAgent.ts +0 -160
- package/src/ViewStateAgent.ts +86 -86
- package/src/WebApi.ts +0 -36
- 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/LicenseAgent.ts
CHANGED
|
@@ -65,6 +65,9 @@ export interface ILicenseAgent {
|
|
|
65
65
|
assignThirdPartyLicensesAsync(associateId: number, moduleOwner: string, moduleLicenseNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ModuleLicenseLink[] >;
|
|
66
66
|
unassignThirdPartyLicensesAsync(request: carriers.License_UnassignThirdPartyLicensesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ModuleLicenseLink[] >;
|
|
67
67
|
unassignThirdPartyLicensesAsync(associateId: number, moduleOwner: string, moduleLicenseNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ModuleLicenseLink[] >;
|
|
68
|
+
getCentralLicenseAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
69
|
+
saveCentralLicenseAsync(request: carriers.License_SaveCentralLicenseRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
70
|
+
saveCentralLicenseAsync(license: carriers.LicenseOwner[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
68
71
|
} // interface ILicenseAgent
|
|
69
72
|
|
|
70
73
|
|
|
@@ -1139,6 +1142,89 @@ export class LicenseAgent extends base.WebApiBase implements ILicenseAgent {
|
|
|
1139
1142
|
return this._unassignThirdPartyLicensesAsync( _request, _options );
|
|
1140
1143
|
}
|
|
1141
1144
|
|
|
1145
|
+
|
|
1146
|
+
private async _getCentralLicenseAsync( options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] > {
|
|
1147
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1148
|
+
base.WebApiBase.SetPending(options);
|
|
1149
|
+
return new Promise< carriers.LicenseOwner[] >(async (resolve, reject) => {
|
|
1150
|
+
try {
|
|
1151
|
+
config.baseURL = this._options.baseUrl;
|
|
1152
|
+
const response = await this._axios.post("GetCentralLicense", undefined , config);
|
|
1153
|
+
base.WebApiBase.SetCompleted(options);
|
|
1154
|
+
const res : carriers.LicenseOwner[] = converters.Create_LicenseOwnerArray_From( response.data );
|
|
1155
|
+
resolve(res);
|
|
1156
|
+
}
|
|
1157
|
+
catch( err ) {
|
|
1158
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1159
|
+
reject(err);
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
*
|
|
1167
|
+
* @returns
|
|
1168
|
+
*/
|
|
1169
|
+
public async getCentralLicenseAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >
|
|
1170
|
+
{
|
|
1171
|
+
return this._getCentralLicenseAsync(webapi_options);
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
private async _saveCentralLicenseAsync(request: carriers.License_SaveCentralLicenseRequest, options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] > {
|
|
1176
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1177
|
+
base.WebApiBase.SetPending(options);
|
|
1178
|
+
return new Promise< carriers.LicenseOwner[] >(async (resolve, reject) => {
|
|
1179
|
+
try {
|
|
1180
|
+
config.baseURL = this._options.baseUrl;
|
|
1181
|
+
const response = await this._axios.post("SaveCentralLicense", request , config);
|
|
1182
|
+
base.WebApiBase.SetCompleted(options);
|
|
1183
|
+
const res : carriers.LicenseOwner[] = converters.Create_LicenseOwnerArray_From( response.data );
|
|
1184
|
+
resolve(res);
|
|
1185
|
+
}
|
|
1186
|
+
catch( err ) {
|
|
1187
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1188
|
+
reject(err);
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
*
|
|
1197
|
+
* @param request - License
|
|
1198
|
+
* @returns
|
|
1199
|
+
*/
|
|
1200
|
+
public async saveCentralLicenseAsync(request: carriers.License_SaveCentralLicenseRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
*
|
|
1204
|
+
* @param license -
|
|
1205
|
+
* @returns
|
|
1206
|
+
*/
|
|
1207
|
+
public async saveCentralLicenseAsync(license: carriers.LicenseOwner[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
1208
|
+
|
|
1209
|
+
public async saveCentralLicenseAsync(license:carriers.LicenseOwner[]|carriers.License_SaveCentralLicenseRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] > {
|
|
1210
|
+
let _request : carriers.License_SaveCentralLicenseRequest = null;
|
|
1211
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1212
|
+
const first : any = license;
|
|
1213
|
+
if( typeof( first ) === "object" && first && ( typeof(first.license)!='undefined' ) )
|
|
1214
|
+
{
|
|
1215
|
+
_request = license as carriers.License_SaveCentralLicenseRequest;
|
|
1216
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1217
|
+
}
|
|
1218
|
+
else
|
|
1219
|
+
{
|
|
1220
|
+
_request = {
|
|
1221
|
+
license: license as carriers.LicenseOwner[],
|
|
1222
|
+
};
|
|
1223
|
+
_options = webapi_options;
|
|
1224
|
+
}
|
|
1225
|
+
return this._saveCentralLicenseAsync( _request, _options );
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1142
1228
|
} // class v1LicenseAgentController
|
|
1143
1229
|
|
|
1144
1230
|
|
package/src/ListAgent.ts
CHANGED
|
@@ -372,12 +372,12 @@ export interface IListAgent {
|
|
|
372
372
|
getSourceAsync(sourceId: number) : Promise< carriers.Source >;
|
|
373
373
|
getSourceListAsync(sourceIds: number[]) : Promise< carriers.Source[] >;
|
|
374
374
|
getSourcesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Source[] >;
|
|
375
|
-
|
|
376
|
-
getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
377
|
-
getDocumentTemplateTaskAsync(documentTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
378
|
-
getTaskListAsync(
|
|
379
|
-
getTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
380
|
-
getDocumentTemplatesTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
375
|
+
getSoTaskAsync(soTaskId: number) : Promise< carriers.SoTask >;
|
|
376
|
+
getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask >;
|
|
377
|
+
getDocumentTemplateTaskAsync(documentTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask >;
|
|
378
|
+
getTaskListAsync(soTaskIds: number[]) : Promise< carriers.SoTask[] >;
|
|
379
|
+
getTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] >;
|
|
380
|
+
getDocumentTemplatesTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] >;
|
|
381
381
|
getAllTasksAsync(request: carriers.List_GetAllTasksRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TaskListItem[] >;
|
|
382
382
|
getAllTasksAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TaskListItem[] >;
|
|
383
383
|
getTicketCategoryAsync(ticketCategoryId: number) : Promise< carriers.TicketCategory >;
|
|
@@ -9531,19 +9531,19 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9531
9531
|
}
|
|
9532
9532
|
|
|
9533
9533
|
/**
|
|
9534
|
-
* Gets a
|
|
9535
|
-
* @param
|
|
9534
|
+
* Gets a SoTask object.
|
|
9535
|
+
* @param soTaskId - The primary key.
|
|
9536
9536
|
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
9537
|
-
* @returns A single
|
|
9537
|
+
* @returns A single SoTask
|
|
9538
9538
|
*/
|
|
9539
|
-
public async
|
|
9539
|
+
public async getSoTaskAsync(soTaskId: number, options?:base.WebApiRequestOptions) : Promise< carriers.SoTask > {
|
|
9540
9540
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
9541
9541
|
base.WebApiBase.SetPending(options);
|
|
9542
|
-
return new Promise< carriers.
|
|
9542
|
+
return new Promise< carriers.SoTask >(async (resolve, reject) => {
|
|
9543
9543
|
try {
|
|
9544
|
-
const response = await this._axios.post("
|
|
9544
|
+
const response = await this._axios.post("GetSoTask?soTaskId=" + soTaskId, null, config);
|
|
9545
9545
|
base.WebApiBase.SetCompleted(options);
|
|
9546
|
-
const res = converters.
|
|
9546
|
+
const res = converters.Create_SoTask_From( response.data );
|
|
9547
9547
|
resolve(res);
|
|
9548
9548
|
}
|
|
9549
9549
|
catch( err ) {
|
|
@@ -9554,15 +9554,15 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9554
9554
|
}
|
|
9555
9555
|
|
|
9556
9556
|
|
|
9557
|
-
private async _getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9557
|
+
private async _getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SoTask > {
|
|
9558
9558
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
9559
9559
|
base.WebApiBase.SetPending(options);
|
|
9560
|
-
return new Promise< carriers.
|
|
9560
|
+
return new Promise< carriers.SoTask >(async (resolve, reject) => {
|
|
9561
9561
|
try {
|
|
9562
9562
|
config.baseURL = this._options.baseUrl;
|
|
9563
9563
|
const response = await this._axios.post("GetDocumentTemplateTask", request , config);
|
|
9564
9564
|
base.WebApiBase.SetCompleted(options);
|
|
9565
|
-
const res : carriers.
|
|
9565
|
+
const res : carriers.SoTask = converters.Create_SoTask_From( response.data );
|
|
9566
9566
|
resolve(res);
|
|
9567
9567
|
}
|
|
9568
9568
|
catch( err ) {
|
|
@@ -9579,16 +9579,16 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9579
9579
|
* @param request - DocumentTemplateId
|
|
9580
9580
|
* @returns Document Template item as TaskListItem.
|
|
9581
9581
|
*/
|
|
9582
|
-
public async getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9582
|
+
public async getDocumentTemplateTaskAsync(request: carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask >;
|
|
9583
9583
|
|
|
9584
9584
|
/**
|
|
9585
9585
|
* Returns a Document Template list item as a TaskListItem. The appointment's task is a Document template item when the appointment is a document.
|
|
9586
9586
|
* @param documentTemplateId - Id of the document template, i.e. the Appointment.TaskIdx
|
|
9587
9587
|
* @returns Document Template item as TaskListItem.
|
|
9588
9588
|
*/
|
|
9589
|
-
public async getDocumentTemplateTaskAsync(documentTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9589
|
+
public async getDocumentTemplateTaskAsync(documentTemplateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask >;
|
|
9590
9590
|
|
|
9591
|
-
public async getDocumentTemplateTaskAsync(documentTemplateId:number|carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9591
|
+
public async getDocumentTemplateTaskAsync(documentTemplateId:number|carriers.List_GetDocumentTemplateTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask > {
|
|
9592
9592
|
let _request : carriers.List_GetDocumentTemplateTaskRequest = null;
|
|
9593
9593
|
let _options : base.WebApiRequestOptions = null;
|
|
9594
9594
|
const first : any = documentTemplateId;
|
|
@@ -9608,19 +9608,19 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9608
9608
|
}
|
|
9609
9609
|
|
|
9610
9610
|
/**
|
|
9611
|
-
* Gets an array of
|
|
9612
|
-
* @param
|
|
9611
|
+
* Gets an array of SoTask objects.
|
|
9612
|
+
* @param soTaskIds - The primary keys.
|
|
9613
9613
|
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
9614
|
-
* @returns An array of
|
|
9614
|
+
* @returns An array of SoTask
|
|
9615
9615
|
*/
|
|
9616
|
-
public async getTaskListAsync(
|
|
9616
|
+
public async getTaskListAsync(soTaskIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] > {
|
|
9617
9617
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
9618
9618
|
base.WebApiBase.SetPending(options);
|
|
9619
|
-
return new Promise< carriers.
|
|
9619
|
+
return new Promise< carriers.SoTask[] >(async (resolve, reject) => {
|
|
9620
9620
|
try {
|
|
9621
|
-
const response = await this._axios.post("GetTaskList",
|
|
9621
|
+
const response = await this._axios.post("GetTaskList", soTaskIds, config);
|
|
9622
9622
|
base.WebApiBase.SetCompleted(options);
|
|
9623
|
-
const res = converters.
|
|
9623
|
+
const res = converters.Create_SoTaskArray_From( response.data );
|
|
9624
9624
|
resolve(res);
|
|
9625
9625
|
}
|
|
9626
9626
|
catch( err ) {
|
|
@@ -9631,15 +9631,15 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9631
9631
|
}
|
|
9632
9632
|
|
|
9633
9633
|
|
|
9634
|
-
private async _getTasksAsync( options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9634
|
+
private async _getTasksAsync( options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] > {
|
|
9635
9635
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
9636
9636
|
base.WebApiBase.SetPending(options);
|
|
9637
|
-
return new Promise< carriers.
|
|
9637
|
+
return new Promise< carriers.SoTask[] >(async (resolve, reject) => {
|
|
9638
9638
|
try {
|
|
9639
9639
|
config.baseURL = this._options.baseUrl;
|
|
9640
9640
|
const response = await this._axios.post("GetTasks", undefined , config);
|
|
9641
9641
|
base.WebApiBase.SetCompleted(options);
|
|
9642
|
-
const res : carriers.
|
|
9642
|
+
const res : carriers.SoTask[] = converters.Create_SoTaskArray_From( response.data );
|
|
9643
9643
|
resolve(res);
|
|
9644
9644
|
}
|
|
9645
9645
|
catch( err ) {
|
|
@@ -9654,21 +9654,21 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9654
9654
|
* Returns all appointment tasks
|
|
9655
9655
|
* @returns An array of all available tasks
|
|
9656
9656
|
*/
|
|
9657
|
-
public async getTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9657
|
+
public async getTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] >
|
|
9658
9658
|
{
|
|
9659
9659
|
return this._getTasksAsync(webapi_options);
|
|
9660
9660
|
}
|
|
9661
9661
|
|
|
9662
9662
|
|
|
9663
|
-
private async _getDocumentTemplatesTasksAsync( options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9663
|
+
private async _getDocumentTemplatesTasksAsync( options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] > {
|
|
9664
9664
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
9665
9665
|
base.WebApiBase.SetPending(options);
|
|
9666
|
-
return new Promise< carriers.
|
|
9666
|
+
return new Promise< carriers.SoTask[] >(async (resolve, reject) => {
|
|
9667
9667
|
try {
|
|
9668
9668
|
config.baseURL = this._options.baseUrl;
|
|
9669
9669
|
const response = await this._axios.post("GetDocumentTemplatesTasks", undefined , config);
|
|
9670
9670
|
base.WebApiBase.SetCompleted(options);
|
|
9671
|
-
const res : carriers.
|
|
9671
|
+
const res : carriers.SoTask[] = converters.Create_SoTaskArray_From( response.data );
|
|
9672
9672
|
resolve(res);
|
|
9673
9673
|
}
|
|
9674
9674
|
catch( err ) {
|
|
@@ -9683,7 +9683,7 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
9683
9683
|
* The appointment's task is a Document template item when the appointment is a document.
|
|
9684
9684
|
* @returns Document Template list as a array of Tasks
|
|
9685
9685
|
*/
|
|
9686
|
-
public async getDocumentTemplatesTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.
|
|
9686
|
+
public async getDocumentTemplatesTasksAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SoTask[] >
|
|
9687
9687
|
{
|
|
9688
9688
|
return this._getDocumentTemplatesTasksAsync(webapi_options);
|
|
9689
9689
|
}
|
package/src/NavigatorAgent.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { FromBase64ToString, ToBase64 } from './Base64.js';
|
|
|
27
27
|
* Navigator stuff.
|
|
28
28
|
*/
|
|
29
29
|
export interface INavigatorAgent {
|
|
30
|
-
getNavigatorCompanyAsync(navigatorCompanyId: number) : Promise< carriers.NavigatorCompany >;
|
|
31
30
|
getNavigatorCompanyListAsync(navigatorCompanyIds: number[]) : Promise< carriers.NavigatorCompany[] >;
|
|
32
31
|
getNavigatorCompaniesAsync(request: carriers.Navigator_GetNavigatorCompaniesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.NavigatorCompany[] >;
|
|
33
32
|
getNavigatorCompaniesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.NavigatorCompany[] >;
|
|
@@ -59,29 +58,6 @@ export class NavigatorAgent extends base.WebApiBase implements INavigatorAgent {
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
|
|
62
|
-
/**
|
|
63
|
-
* Gets a NavigatorCompany object.
|
|
64
|
-
* @param navigatorCompanyId - The primary key.
|
|
65
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
66
|
-
* @returns A single NavigatorCompany
|
|
67
|
-
*/
|
|
68
|
-
public async getNavigatorCompanyAsync(navigatorCompanyId: number, options?:base.WebApiRequestOptions) : Promise< carriers.NavigatorCompany > {
|
|
69
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
70
|
-
base.WebApiBase.SetPending(options);
|
|
71
|
-
return new Promise< carriers.NavigatorCompany >(async (resolve, reject) => {
|
|
72
|
-
try {
|
|
73
|
-
const response = await this._axios.post("GetNavigatorCompany?navigatorCompanyId=" + navigatorCompanyId, null, config);
|
|
74
|
-
base.WebApiBase.SetCompleted(options);
|
|
75
|
-
const res = converters.Create_NavigatorCompany_From( response.data );
|
|
76
|
-
resolve(res);
|
|
77
|
-
}
|
|
78
|
-
catch( err ) {
|
|
79
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
80
|
-
reject(err);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
61
|
/**
|
|
86
62
|
* Gets an array of NavigatorCompany objects.
|
|
87
63
|
* @param navigatorCompanyIds - The primary keys.
|
package/src/PersonAgent.ts
CHANGED
|
@@ -109,6 +109,8 @@ export interface IPersonAgent {
|
|
|
109
109
|
getUserCandidateByPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UserCandidate >;
|
|
110
110
|
getCustomerCentrePasswordReplyTemplateAsync(request: carriers.Person_GetCustomerCentrePasswordReplyTemplateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
|
|
111
111
|
getCustomerCentrePasswordReplyTemplateAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ReplyTemplateParsed >;
|
|
112
|
+
sendCustomerCentrePasswordEmailAsync(request: carriers.Person_SendCustomerCentrePasswordEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
113
|
+
sendCustomerCentrePasswordEmailAsync(personId: number, from: string, to: string, subject: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
112
114
|
sendEmailAsync(request: carriers.Person_SendEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
113
115
|
sendEmailAsync(from: string, to: string, subject: string, plainBody: string, htmlBody: string, attachmentIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
114
116
|
sendEmailWithEventNameAsync(request: carriers.Person_SendEmailWithEventNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
@@ -2456,6 +2458,66 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
|
|
|
2456
2458
|
}
|
|
2457
2459
|
|
|
2458
2460
|
|
|
2461
|
+
private async _sendCustomerCentrePasswordEmailAsync(request: carriers.Person_SendCustomerCentrePasswordEmailRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2462
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2463
|
+
base.WebApiBase.SetPending(options);
|
|
2464
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2465
|
+
try {
|
|
2466
|
+
config.baseURL = this._options.baseUrl;
|
|
2467
|
+
const response = await this._axios.post("SendCustomerCentrePasswordEmail", request , config);
|
|
2468
|
+
base.WebApiBase.SetCompleted(options);
|
|
2469
|
+
const res = response.data;
|
|
2470
|
+
resolve(res);
|
|
2471
|
+
}
|
|
2472
|
+
catch( err ) {
|
|
2473
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2474
|
+
reject(err);
|
|
2475
|
+
}
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
|
|
2480
|
+
|
|
2481
|
+
/**
|
|
2482
|
+
* Sends a Customer Centre password email based on the reply template.
|
|
2483
|
+
* @param request - PersonId, From, To, Subject
|
|
2484
|
+
* @returns This method has no return value
|
|
2485
|
+
*/
|
|
2486
|
+
public async sendCustomerCentrePasswordEmailAsync(request: carriers.Person_SendCustomerCentrePasswordEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* Sends a Customer Centre password email based on the reply template.
|
|
2490
|
+
* @param personId - Person id associated to email's reply template.
|
|
2491
|
+
* @param from - Sender's email address.
|
|
2492
|
+
* @param to - Recipient's email address.
|
|
2493
|
+
* @param subject - Email's subject.
|
|
2494
|
+
* @returns This method has no return value
|
|
2495
|
+
*/
|
|
2496
|
+
public async sendCustomerCentrePasswordEmailAsync(personId: number, from: string, to: string, subject: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2497
|
+
|
|
2498
|
+
public async sendCustomerCentrePasswordEmailAsync(personId:number|carriers.Person_SendCustomerCentrePasswordEmailRequest, from?:string|base.WebApiRequestOptions, to?:string, subject?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2499
|
+
let _request : carriers.Person_SendCustomerCentrePasswordEmailRequest = null;
|
|
2500
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2501
|
+
const first : any = personId;
|
|
2502
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' || typeof(first.from)!='undefined' || typeof(first.to)!='undefined' || typeof(first.subject)!='undefined' ) )
|
|
2503
|
+
{
|
|
2504
|
+
_request = personId as carriers.Person_SendCustomerCentrePasswordEmailRequest;
|
|
2505
|
+
_options = from as base.WebApiRequestOptions;
|
|
2506
|
+
}
|
|
2507
|
+
else
|
|
2508
|
+
{
|
|
2509
|
+
_request = {
|
|
2510
|
+
personId: personId as number,
|
|
2511
|
+
from: from as string,
|
|
2512
|
+
to: to as string,
|
|
2513
|
+
subject: subject as string,
|
|
2514
|
+
};
|
|
2515
|
+
_options = webapi_options;
|
|
2516
|
+
}
|
|
2517
|
+
return this._sendCustomerCentrePasswordEmailAsync( _request, _options );
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
|
|
2459
2521
|
private async _sendEmailAsync(request: carriers.Person_SendEmailRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2460
2522
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2461
2523
|
base.WebApiBase.SetPending(options);
|
package/src/QuoteAgent.ts
CHANGED
|
@@ -144,10 +144,6 @@ export interface IQuoteAgent {
|
|
|
144
144
|
deleteQuoteLinesAsync(quoteLineIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
145
145
|
recalculateQuoteLineAsync(request: carriers.Quote_RecalculateQuoteLineRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteLine >;
|
|
146
146
|
recalculateQuoteLineAsync(quoteLine: carriers.QuoteLine, changedFields: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteLine >;
|
|
147
|
-
getQuoteLineImageAsync(request: carriers.Quote_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
148
|
-
getQuoteLineImageAsync(quoteLineId: number, rank: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
149
|
-
saveQuoteLineImageAsync(request: carriers.Quote_SaveQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
150
|
-
saveQuoteLineImageAsync(quoteLineId: number, image: ArrayBuffer|string, rank: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
151
147
|
getExtraInfoAsync(request: carriers.Quote_GetExtraInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProductExtraDataField[] >;
|
|
152
148
|
getExtraInfoAsync(quoteLineExtraData: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProductExtraDataField[] >;
|
|
153
149
|
createAndSaveQuoteLinesAsync(request: carriers.Quote_CreateAndSaveQuoteLinesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
@@ -162,8 +158,6 @@ export interface IQuoteAgent {
|
|
|
162
158
|
saveQuoteLineConfigurationAsync(quoteLineConfiguration: carriers.QuoteLineConfiguration, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteLineConfiguration >;
|
|
163
159
|
saveQuoteLineConfigurationsAsync(request: carriers.Quote_SaveQuoteLineConfigurationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteLineConfiguration[] >;
|
|
164
160
|
saveQuoteLineConfigurationsAsync(quoteLineConfigurations: carriers.QuoteLineConfiguration[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteLineConfiguration[] >;
|
|
165
|
-
getQuoteListAsync(request: carriers.Quote_GetQuoteListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] >;
|
|
166
|
-
getQuoteListAsync(quoteListType: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] >;
|
|
167
161
|
validateQuoteVersionAsync(request: carriers.Quote_ValidateQuoteVersionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteVersionValidated >;
|
|
168
162
|
validateQuoteVersionAsync(quoteVersionId: number, action: enums.QuoteVersionButtonAction, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteVersionValidated >;
|
|
169
163
|
createAndSaveQuoteVersionAsync(request: carriers.Quote_CreateAndSaveQuoteVersionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteVersion >;
|
|
@@ -3431,139 +3425,6 @@ export class QuoteAgent extends base.WebApiBase implements IQuoteAgent {
|
|
|
3431
3425
|
}
|
|
3432
3426
|
|
|
3433
3427
|
|
|
3434
|
-
private async _getQuoteLineImageAsync(request: carriers.Quote_GetQuoteLineImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
3435
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
3436
|
-
base.WebApiBase.SetPending(options);
|
|
3437
|
-
return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
|
|
3438
|
-
try {
|
|
3439
|
-
if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
|
|
3440
|
-
config.responseType = "arraybuffer";
|
|
3441
|
-
config.headers = config.headers || {};
|
|
3442
|
-
config.headers["Accept"] = "application/octet-stream";
|
|
3443
|
-
}
|
|
3444
|
-
config.baseURL = this._options.baseUrl;
|
|
3445
|
-
const response = await this._axios.post("GetQuoteLineImage", request , config);
|
|
3446
|
-
base.WebApiBase.SetCompleted(options);
|
|
3447
|
-
let res : ArrayBuffer | string = null;
|
|
3448
|
-
if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
|
|
3449
|
-
{
|
|
3450
|
-
res = response.data as string;
|
|
3451
|
-
if( options.returnBlobAs == base.ReturnBlobType.AsString )
|
|
3452
|
-
{
|
|
3453
|
-
res = FromBase64ToString(res);
|
|
3454
|
-
}
|
|
3455
|
-
}
|
|
3456
|
-
else
|
|
3457
|
-
{
|
|
3458
|
-
res = response.data as ArrayBuffer;
|
|
3459
|
-
}
|
|
3460
|
-
|
|
3461
|
-
resolve(res);
|
|
3462
|
-
}
|
|
3463
|
-
catch( err ) {
|
|
3464
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
3465
|
-
reject(err);
|
|
3466
|
-
}
|
|
3467
|
-
});
|
|
3468
|
-
}
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
/**
|
|
3473
|
-
* Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
|
|
3474
|
-
* @param request - QuoteLineId, Rank
|
|
3475
|
-
* @returns The image. Returns null if no image available.
|
|
3476
|
-
*/
|
|
3477
|
-
public async getQuoteLineImageAsync(request: carriers.Quote_GetQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
3478
|
-
|
|
3479
|
-
/**
|
|
3480
|
-
* Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
|
|
3481
|
-
* @param quoteLineId - Primary key of the quoteline
|
|
3482
|
-
* @param rank - The rank of the image.
|
|
3483
|
-
* @returns The image. Returns null if no image available.
|
|
3484
|
-
*/
|
|
3485
|
-
public async getQuoteLineImageAsync(quoteLineId: number, rank: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
3486
|
-
|
|
3487
|
-
public async getQuoteLineImageAsync(quoteLineId:number|carriers.Quote_GetQuoteLineImageRequest, rank?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
3488
|
-
let _request : carriers.Quote_GetQuoteLineImageRequest = null;
|
|
3489
|
-
let _options : base.WebApiRequestOptions = null;
|
|
3490
|
-
const first : any = quoteLineId;
|
|
3491
|
-
if( typeof( first ) === "object" && first && ( typeof(first.quoteLineId)!='undefined' || typeof(first.rank)!='undefined' ) )
|
|
3492
|
-
{
|
|
3493
|
-
_request = quoteLineId as carriers.Quote_GetQuoteLineImageRequest;
|
|
3494
|
-
_options = rank as base.WebApiRequestOptions;
|
|
3495
|
-
}
|
|
3496
|
-
else
|
|
3497
|
-
{
|
|
3498
|
-
_request = {
|
|
3499
|
-
quoteLineId: quoteLineId as number,
|
|
3500
|
-
rank: rank as number,
|
|
3501
|
-
};
|
|
3502
|
-
_options = webapi_options;
|
|
3503
|
-
}
|
|
3504
|
-
return this._getQuoteLineImageAsync( _request, _options );
|
|
3505
|
-
}
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
private async _saveQuoteLineImageAsync(request: carriers.Quote_SaveQuoteLineImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3509
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3510
|
-
base.WebApiBase.SetPending(options);
|
|
3511
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
3512
|
-
try {
|
|
3513
|
-
config.baseURL = this._options.baseUrl;
|
|
3514
|
-
const response = await this._axios.post("SaveQuoteLineImage", request , config);
|
|
3515
|
-
base.WebApiBase.SetCompleted(options);
|
|
3516
|
-
const res = response.data;
|
|
3517
|
-
resolve(res);
|
|
3518
|
-
}
|
|
3519
|
-
catch( err ) {
|
|
3520
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
3521
|
-
reject(err);
|
|
3522
|
-
}
|
|
3523
|
-
});
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
/**
|
|
3529
|
-
* Saves the image connected to a quoteline in the SuperOffice database
|
|
3530
|
-
* @param request - QuoteLineId, Image, Rank
|
|
3531
|
-
* @returns Nothing
|
|
3532
|
-
*/
|
|
3533
|
-
public async saveQuoteLineImageAsync(request: carriers.Quote_SaveQuoteLineImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3534
|
-
|
|
3535
|
-
/**
|
|
3536
|
-
* Saves the image connected to a quoteline in the SuperOffice database
|
|
3537
|
-
* @param quoteLineId - Primary key of the quoteline
|
|
3538
|
-
* @param image - The image.
|
|
3539
|
-
* @param rank - The rank of the image.
|
|
3540
|
-
* @returns Nothing
|
|
3541
|
-
*/
|
|
3542
|
-
public async saveQuoteLineImageAsync(quoteLineId: number, image: ArrayBuffer|string, rank: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3543
|
-
|
|
3544
|
-
public async saveQuoteLineImageAsync(quoteLineId:number|carriers.Quote_SaveQuoteLineImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, rank?:number, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3545
|
-
let _request : carriers.Quote_SaveQuoteLineImageRequest = null;
|
|
3546
|
-
let _options : base.WebApiRequestOptions = null;
|
|
3547
|
-
const first : any = quoteLineId;
|
|
3548
|
-
if( typeof( first ) === "object" && first && ( typeof(first.quoteLineId)!='undefined' || typeof(first.image)!='undefined' || typeof(first.rank)!='undefined' ) )
|
|
3549
|
-
{
|
|
3550
|
-
_request = quoteLineId as carriers.Quote_SaveQuoteLineImageRequest;
|
|
3551
|
-
_options = image as base.WebApiRequestOptions;
|
|
3552
|
-
}
|
|
3553
|
-
else
|
|
3554
|
-
{
|
|
3555
|
-
_request = {
|
|
3556
|
-
quoteLineId: quoteLineId as number,
|
|
3557
|
-
image: image as ArrayBuffer|string,
|
|
3558
|
-
rank: rank as number,
|
|
3559
|
-
};
|
|
3560
|
-
_options = webapi_options;
|
|
3561
|
-
}
|
|
3562
|
-
_request.image = ToBase64(_request.image);
|
|
3563
|
-
return this._saveQuoteLineImageAsync( _request, _options );
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
3428
|
private async _getExtraInfoAsync(request: carriers.Quote_GetExtraInfoRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProductExtraDataField[] > {
|
|
3568
3429
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3569
3430
|
base.WebApiBase.SetPending(options);
|
|
@@ -3948,60 +3809,6 @@ export class QuoteAgent extends base.WebApiBase implements IQuoteAgent {
|
|
|
3948
3809
|
}
|
|
3949
3810
|
|
|
3950
3811
|
|
|
3951
|
-
private async _getQuoteListAsync(request: carriers.Quote_GetQuoteListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] > {
|
|
3952
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3953
|
-
base.WebApiBase.SetPending(options);
|
|
3954
|
-
return new Promise< carriers.QuoteListItem[] >(async (resolve, reject) => {
|
|
3955
|
-
try {
|
|
3956
|
-
config.baseURL = this._options.baseUrl;
|
|
3957
|
-
const response = await this._axios.post("GetQuoteList", request , config);
|
|
3958
|
-
base.WebApiBase.SetCompleted(options);
|
|
3959
|
-
const res : carriers.QuoteListItem[] = converters.Create_QuoteListItemArray_From( response.data );
|
|
3960
|
-
resolve(res);
|
|
3961
|
-
}
|
|
3962
|
-
catch( err ) {
|
|
3963
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
3964
|
-
reject(err);
|
|
3965
|
-
}
|
|
3966
|
-
});
|
|
3967
|
-
}
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
/**
|
|
3972
|
-
* Gets a named list from the connector Return array of QuoteListItems. Return NULL if the given list is not supported.
|
|
3973
|
-
* @param request - QuoteListType
|
|
3974
|
-
* @returns The list items
|
|
3975
|
-
*/
|
|
3976
|
-
public async getQuoteListAsync(request: carriers.Quote_GetQuoteListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] >;
|
|
3977
|
-
|
|
3978
|
-
/**
|
|
3979
|
-
* Gets a named list from the connector Return array of QuoteListItems. Return NULL if the given list is not supported.
|
|
3980
|
-
* @param quoteListType - The name of the requested list, for instance: ProductCategory, ProductFamily, ProductType, PaymentTerms, PaymentType, DeliveryTerms, DeliveryType.
|
|
3981
|
-
* @returns The list items
|
|
3982
|
-
*/
|
|
3983
|
-
public async getQuoteListAsync(quoteListType: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] >;
|
|
3984
|
-
|
|
3985
|
-
public async getQuoteListAsync(quoteListType:string|carriers.Quote_GetQuoteListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuoteListItem[] > {
|
|
3986
|
-
let _request : carriers.Quote_GetQuoteListRequest = null;
|
|
3987
|
-
let _options : base.WebApiRequestOptions = null;
|
|
3988
|
-
const first : any = quoteListType;
|
|
3989
|
-
if( typeof( first ) === "object" && first && ( typeof(first.quoteListType)!='undefined' ) )
|
|
3990
|
-
{
|
|
3991
|
-
_request = quoteListType as carriers.Quote_GetQuoteListRequest;
|
|
3992
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
3993
|
-
}
|
|
3994
|
-
else
|
|
3995
|
-
{
|
|
3996
|
-
_request = {
|
|
3997
|
-
quoteListType: quoteListType as string,
|
|
3998
|
-
};
|
|
3999
|
-
_options = webapi_options;
|
|
4000
|
-
}
|
|
4001
|
-
return this._getQuoteListAsync( _request, _options );
|
|
4002
|
-
}
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
3812
|
private async _validateQuoteVersionAsync(request: carriers.Quote_ValidateQuoteVersionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuoteVersionValidated > {
|
|
4006
3813
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4007
3814
|
base.WebApiBase.SetPending(options);
|