@superoffice/webapi 12.2.2072 → 12.3.2570
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 +367 -20
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +17 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +35 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +24 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +317 -32
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +7 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +24 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +22 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +25 -1
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +31 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +87 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/MarketingAgent.d.ts +94 -16
- package/dist/cjs/MarketingAgent.d.ts.map +1 -1
- package/dist/cjs/MarketingAgent.js +222 -34
- package/dist/cjs/MarketingAgent.js.map +1 -1
- package/dist/cjs/ViewStateAgent.d.ts +34 -0
- package/dist/cjs/ViewStateAgent.d.ts.map +1 -1
- package/dist/cjs/ViewStateAgent.js +70 -0
- package/dist/cjs/ViewStateAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +367 -20
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +17 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +35 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +24 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +262 -1
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +7 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +24 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +22 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +23 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +31 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +87 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/MarketingAgent.d.ts +94 -16
- package/dist/esm/MarketingAgent.d.ts.map +1 -1
- package/dist/esm/MarketingAgent.js +222 -34
- package/dist/esm/MarketingAgent.js.map +1 -1
- package/dist/esm/ViewStateAgent.d.ts +34 -0
- package/dist/esm/ViewStateAgent.d.ts.map +1 -1
- package/dist/esm/ViewStateAgent.js +70 -0
- package/dist/esm/ViewStateAgent.js.map +1 -1
- package/package.json +3 -3
- package/src/Carriers.ts +524 -24
- package/src/ConfigurationAgent.ts +60 -0
- package/src/Converters.ts +326 -1
- package/src/DiagnosticsAgent.ts +30 -0
- package/src/Enums.ts +24 -0
- package/src/ListAgent.ts +94 -0
- package/src/MarketingAgent.ts +324 -58
- package/src/ViewStateAgent.ts +120 -0
package/src/ListAgent.ts
CHANGED
|
@@ -49,6 +49,9 @@ export interface IListAgent {
|
|
|
49
49
|
saveListEntityAsync(entity: carriers.ListEntity) : Promise< carriers.ListEntity >;
|
|
50
50
|
deleteListEntityAsync(ListEntityId: number) : Promise<void>;
|
|
51
51
|
createDefaultListItemEntityAsync(): Promise< carriers.ListItemEntity >;
|
|
52
|
+
createDefaultPictureFolderEntityAsync(): Promise< carriers.PictureFolderEntity >;
|
|
53
|
+
savePictureFolderEntityAsync(entity: carriers.PictureFolderEntity) : Promise< carriers.PictureFolderEntity >;
|
|
54
|
+
deletePictureFolderEntityAsync(PictureFolderEntityId: number) : Promise<void>;
|
|
52
55
|
createDefaultProjectTypeEntityAsync(): Promise< carriers.ProjectTypeEntity >;
|
|
53
56
|
saveProjectTypeEntityAsync(entity: carriers.ProjectTypeEntity) : Promise< carriers.ProjectTypeEntity >;
|
|
54
57
|
createDefaultRelationDefinitionEntityAsync(): Promise< carriers.RelationDefinitionEntity >;
|
|
@@ -331,6 +334,7 @@ export interface IListAgent {
|
|
|
331
334
|
getPaymentTermsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PaymentTerm[] >;
|
|
332
335
|
getPaymentTypeAsync(paymentTypeId: number) : Promise< carriers.PaymentType >;
|
|
333
336
|
getPaymentTypesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PaymentType[] >;
|
|
337
|
+
getPictureFolderEntityAsync(pictureFolderEntityId: number) : Promise< carriers.PictureFolderEntity >;
|
|
334
338
|
getPositionAsync(positionId: number) : Promise< carriers.Position >;
|
|
335
339
|
getPositionListAsync(positionIds: number[]) : Promise< carriers.Position[] >;
|
|
336
340
|
getPositionsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Position[] >;
|
|
@@ -969,6 +973,73 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
969
973
|
});
|
|
970
974
|
}
|
|
971
975
|
|
|
976
|
+
/**
|
|
977
|
+
* Set default values into a new PictureFolderEntity.
|
|
978
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
979
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
980
|
+
* @returns A blank entity.
|
|
981
|
+
*/
|
|
982
|
+
public async createDefaultPictureFolderEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PictureFolderEntity > {
|
|
983
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
984
|
+
base.WebApiBase.SetPending(options);
|
|
985
|
+
return new Promise< carriers.PictureFolderEntity >(async (resolve, reject) => {
|
|
986
|
+
try {
|
|
987
|
+
const response = await this._axios.post("CreateDefaultPictureFolderEntity", null, config);
|
|
988
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
989
|
+
const res : carriers.PictureFolderEntity = converters.Create_PictureFolderEntity_From( response.data );
|
|
990
|
+
resolve(res);
|
|
991
|
+
}
|
|
992
|
+
catch( err ) {
|
|
993
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
994
|
+
reject(err);
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Replace the existing PictureFolderEntity or creates a new PictureFolderEntity if the id parameter is empty
|
|
1000
|
+
* @param entity - The PictureFolderEntity to be saved.
|
|
1001
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1002
|
+
* @returns New or updated PictureFolderEntity
|
|
1003
|
+
*/
|
|
1004
|
+
public async savePictureFolderEntityAsync(entity: carriers.PictureFolderEntity, options?:base.WebApiRequestOptions) : Promise< carriers.PictureFolderEntity > {
|
|
1005
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1006
|
+
base.WebApiBase.SetPending(options);
|
|
1007
|
+
return new Promise< carriers.PictureFolderEntity >(async (resolve, reject) => {
|
|
1008
|
+
try {
|
|
1009
|
+
const response = await this._axios.post("SavePictureFolderEntity", entity, config);
|
|
1010
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1011
|
+
const res : carriers.PictureFolderEntity = converters.Create_PictureFolderEntity_From( response.data );
|
|
1012
|
+
resolve(res);
|
|
1013
|
+
}
|
|
1014
|
+
catch( err ) {
|
|
1015
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1016
|
+
reject(err);
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Deletes the PictureFolderEntity
|
|
1023
|
+
* @param PictureFolderEntityId - The id of the PictureFolderEntity to be deleted.
|
|
1024
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1025
|
+
*/
|
|
1026
|
+
public async deletePictureFolderEntityAsync(PictureFolderEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1027
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1028
|
+
base.WebApiBase.SetPending(options);
|
|
1029
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1030
|
+
try {
|
|
1031
|
+
const response = await this._axios.post("DeletePictureFolderEntity?PictureFolderEntityId=" + PictureFolderEntityId, null, config );
|
|
1032
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1033
|
+
const res = response.data;
|
|
1034
|
+
resolve(res);
|
|
1035
|
+
}
|
|
1036
|
+
catch( err ) {
|
|
1037
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1038
|
+
reject(err);
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
|
|
972
1043
|
/**
|
|
973
1044
|
* Set default values into a new ProjectTypeEntity.
|
|
974
1045
|
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
@@ -8545,6 +8616,29 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
8545
8616
|
return this._getPaymentTypesAsync(webapi_options);
|
|
8546
8617
|
}
|
|
8547
8618
|
|
|
8619
|
+
/**
|
|
8620
|
+
* Gets a PictureFolderEntity object.
|
|
8621
|
+
* @param pictureFolderEntityId - The primary key.
|
|
8622
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
8623
|
+
* @returns A single PictureFolderEntity
|
|
8624
|
+
*/
|
|
8625
|
+
public async getPictureFolderEntityAsync(pictureFolderEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.PictureFolderEntity > {
|
|
8626
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
8627
|
+
base.WebApiBase.SetPending(options);
|
|
8628
|
+
return new Promise< carriers.PictureFolderEntity >(async (resolve, reject) => {
|
|
8629
|
+
try {
|
|
8630
|
+
const response = await this._axios.post("GetPictureFolderEntity?pictureFolderEntityId=" + pictureFolderEntityId, null, config);
|
|
8631
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
8632
|
+
const res = converters.Create_PictureFolderEntity_From( response.data );
|
|
8633
|
+
resolve(res);
|
|
8634
|
+
}
|
|
8635
|
+
catch( err ) {
|
|
8636
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
8637
|
+
reject(err);
|
|
8638
|
+
}
|
|
8639
|
+
});
|
|
8640
|
+
}
|
|
8641
|
+
|
|
8548
8642
|
/**
|
|
8549
8643
|
* Gets a Position object.
|
|
8550
8644
|
* @param positionId - The primary key.
|
package/src/MarketingAgent.ts
CHANGED
|
@@ -33,6 +33,9 @@ export interface IMarketingAgent {
|
|
|
33
33
|
createDefaultFormSubmissionEntityAsync(): Promise< carriers.FormSubmissionEntity >;
|
|
34
34
|
saveFormSubmissionEntityAsync(entity: carriers.FormSubmissionEntity) : Promise< carriers.FormSubmissionEntity >;
|
|
35
35
|
deleteFormSubmissionEntityAsync(FormSubmissionEntityId: number) : Promise<void>;
|
|
36
|
+
createDefaultMailingEntityAsync(): Promise< carriers.MailingEntity >;
|
|
37
|
+
saveMailingEntityAsync(entity: carriers.MailingEntity) : Promise< carriers.MailingEntity >;
|
|
38
|
+
deleteMailingEntityAsync(MailingEntityId: number) : Promise<void>;
|
|
36
39
|
createDefaultShipmentMessageBlockEntityAsync(): Promise< carriers.ShipmentMessageBlockEntity >;
|
|
37
40
|
saveShipmentMessageBlockEntityAsync(entity: carriers.ShipmentMessageBlockEntity) : Promise< carriers.ShipmentMessageBlockEntity >;
|
|
38
41
|
deleteShipmentMessageBlockEntityAsync(ShipmentMessageBlockEntityId: number) : Promise<void>;
|
|
@@ -49,11 +52,20 @@ export interface IMarketingAgent {
|
|
|
49
52
|
setFontRankAsync(request: carriers.Marketing_SetFontRankRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
50
53
|
setFontRankAsync(availableFontId: number, rank: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
51
54
|
getFormEntityAsync(formEntityId: number) : Promise< carriers.FormEntity >;
|
|
55
|
+
moveFormsToFolderAsync(request: carriers.Marketing_MoveFormsToFolderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
56
|
+
moveFormsToFolderAsync(formIds: number[], folderId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
52
57
|
verifyGoogleRecaptchaAsync(request: carriers.Marketing_VerifyGoogleRecaptchaRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
53
58
|
verifyGoogleRecaptchaAsync(token: string, optionalSecretKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
54
59
|
setAllFormFieldRestrictionsAsync(request: carriers.Marketing_SetAllFormFieldRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
55
60
|
setAllFormFieldRestrictionsAsync(formFieldRestrictions: carriers.FormFieldRestriction[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
56
61
|
getFormSubmissionEntityAsync(formSubmissionEntityId: number) : Promise< carriers.FormSubmissionEntity >;
|
|
62
|
+
getMailingEntityAsync(mailingEntityId: number) : Promise< carriers.MailingEntity >;
|
|
63
|
+
moveMailingsToFolderAsync(request: carriers.Marketing_MoveMailingsToFolderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
64
|
+
moveMailingsToFolderAsync(mailingIds: number[], folderId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
65
|
+
renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
66
|
+
renameMailingByMessageIdAsync(messageId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
67
|
+
reloadAndSendMailingAsync(request: carriers.Marketing_ReloadAndSendMailingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
68
|
+
reloadAndSendMailingAsync(mailingId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
57
69
|
calculateMailingStatisticsAsync(request: carriers.Marketing_CalculateMailingStatisticsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
58
70
|
calculateMailingStatisticsAsync(shipmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
59
71
|
getFormSubmissionsCountAsync(request: carriers.Marketing_GetFormSubmissionsCountRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
@@ -66,8 +78,6 @@ export interface IMarketingAgent {
|
|
|
66
78
|
getUserBlocksAsync(request: carriers.Marketing_GetUserBlocksRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ShipmentMessageBlockEntity[] >;
|
|
67
79
|
getUserBlocksAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ShipmentMessageBlockEntity[] >;
|
|
68
80
|
getShipmentMessageEntityAsync(shipmentMessageEntityId: number) : Promise< carriers.ShipmentMessageEntity >;
|
|
69
|
-
renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
70
|
-
renameMailingByMessageIdAsync(messageId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
71
81
|
deleteMessageAndShipmentAsync(request: carriers.Marketing_DeleteMessageAndShipmentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
72
82
|
deleteMessageAndShipmentAsync(messageId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
73
83
|
} // interface IMarketingAgent
|
|
@@ -233,6 +243,73 @@ export class MarketingAgent extends base.WebApiBase implements IMarketingAgent {
|
|
|
233
243
|
});
|
|
234
244
|
}
|
|
235
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Set default values into a new MailingEntity.
|
|
248
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
249
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
250
|
+
* @returns A blank entity.
|
|
251
|
+
*/
|
|
252
|
+
public async createDefaultMailingEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.MailingEntity > {
|
|
253
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
254
|
+
base.WebApiBase.SetPending(options);
|
|
255
|
+
return new Promise< carriers.MailingEntity >(async (resolve, reject) => {
|
|
256
|
+
try {
|
|
257
|
+
const response = await this._axios.post("CreateDefaultMailingEntity", null, config);
|
|
258
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
259
|
+
const res : carriers.MailingEntity = converters.Create_MailingEntity_From( response.data );
|
|
260
|
+
resolve(res);
|
|
261
|
+
}
|
|
262
|
+
catch( err ) {
|
|
263
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
264
|
+
reject(err);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Replace the existing MailingEntity or creates a new MailingEntity if the id parameter is empty
|
|
270
|
+
* @param entity - The MailingEntity to be saved.
|
|
271
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
272
|
+
* @returns New or updated MailingEntity
|
|
273
|
+
*/
|
|
274
|
+
public async saveMailingEntityAsync(entity: carriers.MailingEntity, options?:base.WebApiRequestOptions) : Promise< carriers.MailingEntity > {
|
|
275
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
276
|
+
base.WebApiBase.SetPending(options);
|
|
277
|
+
return new Promise< carriers.MailingEntity >(async (resolve, reject) => {
|
|
278
|
+
try {
|
|
279
|
+
const response = await this._axios.post("SaveMailingEntity", entity, config);
|
|
280
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
281
|
+
const res : carriers.MailingEntity = converters.Create_MailingEntity_From( response.data );
|
|
282
|
+
resolve(res);
|
|
283
|
+
}
|
|
284
|
+
catch( err ) {
|
|
285
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
286
|
+
reject(err);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Deletes the MailingEntity
|
|
293
|
+
* @param MailingEntityId - The id of the MailingEntity to be deleted.
|
|
294
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
295
|
+
*/
|
|
296
|
+
public async deleteMailingEntityAsync(MailingEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
297
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
298
|
+
base.WebApiBase.SetPending(options);
|
|
299
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
300
|
+
try {
|
|
301
|
+
const response = await this._axios.post("DeleteMailingEntity?MailingEntityId=" + MailingEntityId, null, config );
|
|
302
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
303
|
+
const res = response.data;
|
|
304
|
+
resolve(res);
|
|
305
|
+
}
|
|
306
|
+
catch( err ) {
|
|
307
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
308
|
+
reject(err);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
|
|
236
313
|
/**
|
|
237
314
|
* Set default values into a new ShipmentMessageBlockEntity.
|
|
238
315
|
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
@@ -637,6 +714,62 @@ export class MarketingAgent extends base.WebApiBase implements IMarketingAgent {
|
|
|
637
714
|
}
|
|
638
715
|
|
|
639
716
|
|
|
717
|
+
private async _moveFormsToFolderAsync(request: carriers.Marketing_MoveFormsToFolderRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
718
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
719
|
+
base.WebApiBase.SetPending(options);
|
|
720
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
721
|
+
try {
|
|
722
|
+
config.baseURL = this._options.baseUrl;
|
|
723
|
+
const response = await this._axios.post("MoveFormsToFolder", request , config);
|
|
724
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
725
|
+
const res = response.data;
|
|
726
|
+
resolve(res);
|
|
727
|
+
}
|
|
728
|
+
catch( err ) {
|
|
729
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
730
|
+
reject(err);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Move one or more forms into the given folder. FolderId -1 = root. Only the folder reference is written - Save would rewrite the whole form, including a re-sanitized Config, and would bump Updated (the thumbnail cache-buster).
|
|
739
|
+
* @param request - FormIds, FolderId
|
|
740
|
+
* @returns
|
|
741
|
+
*/
|
|
742
|
+
public async moveFormsToFolderAsync(request: carriers.Marketing_MoveFormsToFolderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Move one or more forms into the given folder. FolderId -1 = root. Only the folder reference is written - Save would rewrite the whole form, including a re-sanitized Config, and would bump Updated (the thumbnail cache-buster).
|
|
746
|
+
* @param formIds - Ids of the forms to move (form.form_id)
|
|
747
|
+
* @param folderId - Target folder id (s_picture_folder.id, formFolder type); -1 = root
|
|
748
|
+
* @returns
|
|
749
|
+
*/
|
|
750
|
+
public async moveFormsToFolderAsync(formIds: number[], folderId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
751
|
+
|
|
752
|
+
public async moveFormsToFolderAsync(formIds:number[]|carriers.Marketing_MoveFormsToFolderRequest, folderId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
753
|
+
let _request : carriers.Marketing_MoveFormsToFolderRequest = null;
|
|
754
|
+
let _options : base.WebApiRequestOptions = null;
|
|
755
|
+
const first : any = formIds;
|
|
756
|
+
if( typeof( first ) === "object" && first && ( typeof(first.formIds)!='undefined' || typeof(first.folderId)!='undefined' ) )
|
|
757
|
+
{
|
|
758
|
+
_request = formIds as carriers.Marketing_MoveFormsToFolderRequest;
|
|
759
|
+
_options = folderId as base.WebApiRequestOptions;
|
|
760
|
+
}
|
|
761
|
+
else
|
|
762
|
+
{
|
|
763
|
+
_request = {
|
|
764
|
+
formIds: formIds as number[],
|
|
765
|
+
folderId: folderId as number,
|
|
766
|
+
};
|
|
767
|
+
_options = webapi_options;
|
|
768
|
+
}
|
|
769
|
+
return this._moveFormsToFolderAsync( _request, _options );
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
|
|
640
773
|
private async _verifyGoogleRecaptchaAsync(request: carriers.Marketing_VerifyGoogleRecaptchaRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
641
774
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
642
775
|
base.WebApiBase.SetPending(options);
|
|
@@ -769,6 +902,195 @@ export class MarketingAgent extends base.WebApiBase implements IMarketingAgent {
|
|
|
769
902
|
});
|
|
770
903
|
}
|
|
771
904
|
|
|
905
|
+
/**
|
|
906
|
+
* Gets a MailingEntity object.
|
|
907
|
+
* @param mailingEntityId - The primary key.
|
|
908
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
909
|
+
* @returns A single MailingEntity
|
|
910
|
+
*/
|
|
911
|
+
public async getMailingEntityAsync(mailingEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.MailingEntity > {
|
|
912
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
913
|
+
base.WebApiBase.SetPending(options);
|
|
914
|
+
return new Promise< carriers.MailingEntity >(async (resolve, reject) => {
|
|
915
|
+
try {
|
|
916
|
+
const response = await this._axios.post("GetMailingEntity?mailingEntityId=" + mailingEntityId, null, config);
|
|
917
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
918
|
+
const res = converters.Create_MailingEntity_From( response.data );
|
|
919
|
+
resolve(res);
|
|
920
|
+
}
|
|
921
|
+
catch( err ) {
|
|
922
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
923
|
+
reject(err);
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
private async _moveMailingsToFolderAsync(request: carriers.Marketing_MoveMailingsToFolderRequest, 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("MoveMailingsToFolder", request , config);
|
|
936
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
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
|
+
* Move one or more mailings (shipments) into the given folder. FolderId -1 = root.
|
|
951
|
+
* @param request - MailingIds, FolderId
|
|
952
|
+
* @returns
|
|
953
|
+
*/
|
|
954
|
+
public async moveMailingsToFolderAsync(request: carriers.Marketing_MoveMailingsToFolderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Move one or more mailings (shipments) into the given folder. FolderId -1 = root.
|
|
958
|
+
* @param mailingIds - Shipment ids of the mailings to move (s_shipment.id)
|
|
959
|
+
* @param folderId - Target folder id (s_picture_folder.id, shipmentFolder type); -1 = root
|
|
960
|
+
* @returns
|
|
961
|
+
*/
|
|
962
|
+
public async moveMailingsToFolderAsync(mailingIds: number[], folderId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
963
|
+
|
|
964
|
+
public async moveMailingsToFolderAsync(mailingIds:number[]|carriers.Marketing_MoveMailingsToFolderRequest, folderId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
965
|
+
let _request : carriers.Marketing_MoveMailingsToFolderRequest = null;
|
|
966
|
+
let _options : base.WebApiRequestOptions = null;
|
|
967
|
+
const first : any = mailingIds;
|
|
968
|
+
if( typeof( first ) === "object" && first && ( typeof(first.mailingIds)!='undefined' || typeof(first.folderId)!='undefined' ) )
|
|
969
|
+
{
|
|
970
|
+
_request = mailingIds as carriers.Marketing_MoveMailingsToFolderRequest;
|
|
971
|
+
_options = folderId as base.WebApiRequestOptions;
|
|
972
|
+
}
|
|
973
|
+
else
|
|
974
|
+
{
|
|
975
|
+
_request = {
|
|
976
|
+
mailingIds: mailingIds as number[],
|
|
977
|
+
folderId: folderId as number,
|
|
978
|
+
};
|
|
979
|
+
_options = webapi_options;
|
|
980
|
+
}
|
|
981
|
+
return this._moveMailingsToFolderAsync( _request, _options );
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
private async _renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
986
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
987
|
+
base.WebApiBase.SetPending(options);
|
|
988
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
989
|
+
try {
|
|
990
|
+
config.baseURL = this._options.baseUrl;
|
|
991
|
+
const response = await this._axios.post("RenameMailingByMessageId", request , config);
|
|
992
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
993
|
+
const res = response.data;
|
|
994
|
+
resolve(res);
|
|
995
|
+
}
|
|
996
|
+
catch( err ) {
|
|
997
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
998
|
+
reject(err);
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Change the mailing name (shipment description) that the given message (MessageId) belongs to
|
|
1007
|
+
* @param request - MessageId, Name
|
|
1008
|
+
* @returns
|
|
1009
|
+
*/
|
|
1010
|
+
public async renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Change the mailing name (shipment description) that the given message (MessageId) belongs to
|
|
1014
|
+
* @param messageId - Message id
|
|
1015
|
+
* @param name - The new name
|
|
1016
|
+
* @returns
|
|
1017
|
+
*/
|
|
1018
|
+
public async renameMailingByMessageIdAsync(messageId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1019
|
+
|
|
1020
|
+
public async renameMailingByMessageIdAsync(messageId:number|carriers.Marketing_RenameMailingByMessageIdRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1021
|
+
let _request : carriers.Marketing_RenameMailingByMessageIdRequest = null;
|
|
1022
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1023
|
+
const first : any = messageId;
|
|
1024
|
+
if( typeof( first ) === "object" && first && ( typeof(first.messageId)!='undefined' || typeof(first.name)!='undefined' ) )
|
|
1025
|
+
{
|
|
1026
|
+
_request = messageId as carriers.Marketing_RenameMailingByMessageIdRequest;
|
|
1027
|
+
_options = name as base.WebApiRequestOptions;
|
|
1028
|
+
}
|
|
1029
|
+
else
|
|
1030
|
+
{
|
|
1031
|
+
_request = {
|
|
1032
|
+
messageId: messageId as number,
|
|
1033
|
+
name: name as string,
|
|
1034
|
+
};
|
|
1035
|
+
_options = webapi_options;
|
|
1036
|
+
}
|
|
1037
|
+
return this._renameMailingByMessageIdAsync( _request, _options );
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
private async _reloadAndSendMailingAsync(request: carriers.Marketing_ReloadAndSendMailingRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1042
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1043
|
+
base.WebApiBase.SetPending(options);
|
|
1044
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1045
|
+
try {
|
|
1046
|
+
config.baseURL = this._options.baseUrl;
|
|
1047
|
+
const response = await this._axios.post("ReloadAndSendMailing", request , config);
|
|
1048
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1049
|
+
const res : boolean = response.data as boolean;
|
|
1050
|
+
resolve(res);
|
|
1051
|
+
}
|
|
1052
|
+
catch( err ) {
|
|
1053
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1054
|
+
reject(err);
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Reload and send a mailing
|
|
1063
|
+
* @param request - MailingId
|
|
1064
|
+
* @returns Did the operation succeed?
|
|
1065
|
+
*/
|
|
1066
|
+
public async reloadAndSendMailingAsync(request: carriers.Marketing_ReloadAndSendMailingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Reload and send a mailing
|
|
1070
|
+
* @param mailingId - Mailing id
|
|
1071
|
+
* @returns Did the operation succeed?
|
|
1072
|
+
*/
|
|
1073
|
+
public async reloadAndSendMailingAsync(mailingId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1074
|
+
|
|
1075
|
+
public async reloadAndSendMailingAsync(mailingId:number|carriers.Marketing_ReloadAndSendMailingRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1076
|
+
let _request : carriers.Marketing_ReloadAndSendMailingRequest = null;
|
|
1077
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1078
|
+
const first : any = mailingId;
|
|
1079
|
+
if( typeof( first ) === "object" && first && ( typeof(first.mailingId)!='undefined' ) )
|
|
1080
|
+
{
|
|
1081
|
+
_request = mailingId as carriers.Marketing_ReloadAndSendMailingRequest;
|
|
1082
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1083
|
+
}
|
|
1084
|
+
else
|
|
1085
|
+
{
|
|
1086
|
+
_request = {
|
|
1087
|
+
mailingId: mailingId as number,
|
|
1088
|
+
};
|
|
1089
|
+
_options = webapi_options;
|
|
1090
|
+
}
|
|
1091
|
+
return this._reloadAndSendMailingAsync( _request, _options );
|
|
1092
|
+
}
|
|
1093
|
+
|
|
772
1094
|
|
|
773
1095
|
private async _calculateMailingStatisticsAsync(request: carriers.Marketing_CalculateMailingStatisticsRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
774
1096
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
@@ -1088,62 +1410,6 @@ export class MarketingAgent extends base.WebApiBase implements IMarketingAgent {
|
|
|
1088
1410
|
}
|
|
1089
1411
|
|
|
1090
1412
|
|
|
1091
|
-
private async _renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1092
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1093
|
-
base.WebApiBase.SetPending(options);
|
|
1094
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1095
|
-
try {
|
|
1096
|
-
config.baseURL = this._options.baseUrl;
|
|
1097
|
-
const response = await this._axios.post("RenameMailingByMessageId", request , config);
|
|
1098
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1099
|
-
const res = response.data;
|
|
1100
|
-
resolve(res);
|
|
1101
|
-
}
|
|
1102
|
-
catch( err ) {
|
|
1103
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1104
|
-
reject(err);
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
/**
|
|
1112
|
-
* Change the mailing name (shipment description) that the given message (MessageId) belongs to
|
|
1113
|
-
* @param request - MessageId, Name
|
|
1114
|
-
* @returns
|
|
1115
|
-
*/
|
|
1116
|
-
public async renameMailingByMessageIdAsync(request: carriers.Marketing_RenameMailingByMessageIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1117
|
-
|
|
1118
|
-
/**
|
|
1119
|
-
* Change the mailing name (shipment description) that the given message (MessageId) belongs to
|
|
1120
|
-
* @param messageId - Message id
|
|
1121
|
-
* @param name - The new name
|
|
1122
|
-
* @returns
|
|
1123
|
-
*/
|
|
1124
|
-
public async renameMailingByMessageIdAsync(messageId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1125
|
-
|
|
1126
|
-
public async renameMailingByMessageIdAsync(messageId:number|carriers.Marketing_RenameMailingByMessageIdRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1127
|
-
let _request : carriers.Marketing_RenameMailingByMessageIdRequest = null;
|
|
1128
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1129
|
-
const first : any = messageId;
|
|
1130
|
-
if( typeof( first ) === "object" && first && ( typeof(first.messageId)!='undefined' || typeof(first.name)!='undefined' ) )
|
|
1131
|
-
{
|
|
1132
|
-
_request = messageId as carriers.Marketing_RenameMailingByMessageIdRequest;
|
|
1133
|
-
_options = name as base.WebApiRequestOptions;
|
|
1134
|
-
}
|
|
1135
|
-
else
|
|
1136
|
-
{
|
|
1137
|
-
_request = {
|
|
1138
|
-
messageId: messageId as number,
|
|
1139
|
-
name: name as string,
|
|
1140
|
-
};
|
|
1141
|
-
_options = webapi_options;
|
|
1142
|
-
}
|
|
1143
|
-
return this._renameMailingByMessageIdAsync( _request, _options );
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
1413
|
private async _deleteMessageAndShipmentAsync(request: carriers.Marketing_DeleteMessageAndShipmentRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1148
1414
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1149
1415
|
base.WebApiBase.SetPending(options);
|