@superoffice/webapi 12.4.1514 → 12.6.1407
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AIAgent.d.ts +4 -4
- package/dist/cjs/Carriers.d.ts +625 -19
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +38 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +91 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +27 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +414 -26
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +5 -5
- package/dist/cjs/DiagnosticsAgent.js +5 -5
- package/dist/cjs/Enums.d.ts +121 -3
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +128 -6
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/FreeTextAgent.d.ts +2 -2
- package/dist/cjs/ImportAgent.d.ts +5 -5
- package/dist/cjs/ListAgent.d.ts +31 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +67 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/MentionAgent.d.ts +96 -0
- package/dist/cjs/MentionAgent.d.ts.map +1 -0
- package/dist/cjs/MentionAgent.js +203 -0
- package/dist/cjs/MentionAgent.js.map +1 -0
- package/dist/cjs/NewsFeedAgent.d.ts +45 -0
- package/dist/cjs/NewsFeedAgent.d.ts.map +1 -1
- package/dist/cjs/NewsFeedAgent.js +99 -0
- package/dist/cjs/NewsFeedAgent.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +48 -0
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +102 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/ProjectRestApi.d.ts.map +1 -1
- package/dist/cjs/ProjectRestApi.js.map +1 -1
- package/dist/cjs/SaleAgent.d.ts +79 -0
- package/dist/cjs/SaleAgent.d.ts.map +1 -1
- package/dist/cjs/SaleAgent.js +169 -0
- package/dist/cjs/SaleAgent.js.map +1 -1
- package/dist/cjs/SaleRestApi.d.ts.map +1 -1
- package/dist/cjs/SaleRestApi.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 +11 -2
- package/dist/cjs/WebApi.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +4 -4
- package/dist/esm/Carriers.d.ts +625 -19
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +38 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +91 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +27 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +360 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +5 -5
- package/dist/esm/DiagnosticsAgent.js +5 -5
- package/dist/esm/Enums.d.ts +121 -3
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +123 -1
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/FreeTextAgent.d.ts +2 -2
- package/dist/esm/ImportAgent.d.ts +5 -5
- package/dist/esm/ListAgent.d.ts +31 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +67 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/MentionAgent.d.ts +96 -0
- package/dist/esm/MentionAgent.d.ts.map +1 -0
- package/dist/esm/MentionAgent.js +198 -0
- package/dist/esm/MentionAgent.js.map +1 -0
- package/dist/esm/NewsFeedAgent.d.ts +45 -0
- package/dist/esm/NewsFeedAgent.d.ts.map +1 -1
- package/dist/esm/NewsFeedAgent.js +99 -0
- package/dist/esm/NewsFeedAgent.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +48 -0
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +102 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/ProjectRestApi.d.ts.map +1 -1
- package/dist/esm/ProjectRestApi.js.map +1 -1
- package/dist/esm/SaleAgent.d.ts +79 -0
- package/dist/esm/SaleAgent.d.ts.map +1 -1
- package/dist/esm/SaleAgent.js +169 -0
- package/dist/esm/SaleAgent.js.map +1 -1
- package/dist/esm/SaleRestApi.d.ts.map +1 -1
- package/dist/esm/SaleRestApi.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/package.json +4 -4
- package/src/AIAgent.ts +4 -4
- package/src/Carriers.ts +821 -19
- package/src/ConfigurationAgent.ts +144 -0
- package/src/Converters.ts +418 -0
- package/src/DiagnosticsAgent.ts +5 -5
- package/src/Enums.ts +127 -1
- package/src/FreeTextAgent.ts +2 -2
- package/src/ImportAgent.ts +5 -5
- package/src/ListAgent.ts +114 -0
- package/src/MentionAgent.ts +346 -0
- package/src/NewsFeedAgent.ts +168 -0
- package/src/ProjectAgent.ts +174 -0
- package/src/ProjectRestApi.ts +2 -0
- package/src/SaleAgent.ts +288 -0
- package/src/SaleRestApi.ts +2 -0
- package/src/WebApi.ts +12 -0
package/src/Enums.ts
CHANGED
|
@@ -929,6 +929,52 @@
|
|
|
929
929
|
}
|
|
930
930
|
|
|
931
931
|
|
|
932
|
+
/**
|
|
933
|
+
* Outcome of one optional part of a copy operation. Not a stored field: this only ever travels in the copy result objects on carriers returned by copy operations.
|
|
934
|
+
*/
|
|
935
|
+
export enum CopyPartResult {
|
|
936
|
+
/**
|
|
937
|
+
* 0: The caller did not ask for this part, so nothing was attempted
|
|
938
|
+
*/
|
|
939
|
+
NotRequested = "NotRequested",
|
|
940
|
+
/**
|
|
941
|
+
* 1: The part was requested and copied to the new record
|
|
942
|
+
*/
|
|
943
|
+
Success = "Success",
|
|
944
|
+
/**
|
|
945
|
+
* 2: The part was requested and attempted, but failed.
|
|
946
|
+
*/
|
|
947
|
+
Failure = "Failure",
|
|
948
|
+
/**
|
|
949
|
+
* 3: The part was requested, but the source record had nothing to copy
|
|
950
|
+
*/
|
|
951
|
+
NothingToCopy = "NothingToCopy",
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Whether one optional part of a copy can be copied, as checked before the copy is saved. Not a stored field: this only travels in the copy check carriers returned by the copy check operations.
|
|
957
|
+
*/
|
|
958
|
+
export enum CopyPartAvailability {
|
|
959
|
+
/**
|
|
960
|
+
* 0: The part can be copied
|
|
961
|
+
*/
|
|
962
|
+
Available = "Available",
|
|
963
|
+
/**
|
|
964
|
+
* 1: The source record has nothing to copy for this part
|
|
965
|
+
*/
|
|
966
|
+
NothingToCopy = "NothingToCopy",
|
|
967
|
+
/**
|
|
968
|
+
* 2: The part isn't offered, because the user's licences or the system's settings don't include it
|
|
969
|
+
*/
|
|
970
|
+
NotLicensed = "NotLicensed",
|
|
971
|
+
/**
|
|
972
|
+
* 3: The source record has something to copy, but it can't be copied, for instance because of the user's rights. The check's Reason says why.
|
|
973
|
+
*/
|
|
974
|
+
NotAvailable = "NotAvailable",
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
|
|
932
978
|
/**
|
|
933
979
|
* Value for the showState field in table externalapplication
|
|
934
980
|
* This Enum is used by: ExtApp.showState
|
|
@@ -1104,7 +1150,7 @@
|
|
|
1104
1150
|
|
|
1105
1151
|
/**
|
|
1106
1152
|
* Units of duration - from seconds to centuries
|
|
1107
|
-
* This Enum is used by: ProjType.durationUnit; SaleType.durationUnit
|
|
1153
|
+
* This Enum is used by: ProjType.durationUnit; SaleType.durationUnit; ticket_status_postpone.unit
|
|
1108
1154
|
*/
|
|
1109
1155
|
export enum DurationUnit {
|
|
1110
1156
|
/**
|
|
@@ -1410,6 +1456,66 @@
|
|
|
1410
1456
|
}
|
|
1411
1457
|
|
|
1412
1458
|
|
|
1459
|
+
/**
|
|
1460
|
+
* Built-in postpone option a ticket_status_postpone row represents
|
|
1461
|
+
* This Enum is used by: ticket_status_postpone.standard_kind
|
|
1462
|
+
*/
|
|
1463
|
+
export enum TicketPostponeStandard {
|
|
1464
|
+
/**
|
|
1465
|
+
* 0: Option defined by an administrator
|
|
1466
|
+
*/
|
|
1467
|
+
Custom = "Custom",
|
|
1468
|
+
/**
|
|
1469
|
+
* 1: 1 hour
|
|
1470
|
+
*/
|
|
1471
|
+
OneHour = "OneHour",
|
|
1472
|
+
/**
|
|
1473
|
+
* 2: 24 hours
|
|
1474
|
+
*/
|
|
1475
|
+
TwentyFourHours = "TwentyFourHours",
|
|
1476
|
+
/**
|
|
1477
|
+
* 3: Next working day
|
|
1478
|
+
*/
|
|
1479
|
+
NextWorkingDay = "NextWorkingDay",
|
|
1480
|
+
/**
|
|
1481
|
+
* 4: Monday next week
|
|
1482
|
+
*/
|
|
1483
|
+
NextWeek = "NextWeek",
|
|
1484
|
+
/**
|
|
1485
|
+
* 5: 1 week
|
|
1486
|
+
*/
|
|
1487
|
+
OneWeek = "OneWeek",
|
|
1488
|
+
/**
|
|
1489
|
+
* 6: 1 month
|
|
1490
|
+
*/
|
|
1491
|
+
OneMonth = "OneMonth",
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* How the activation time of a postponed ticket is calculated
|
|
1497
|
+
* This Enum is used by: ticket_status_postpone.rule
|
|
1498
|
+
*/
|
|
1499
|
+
export enum TicketPostponeRule {
|
|
1500
|
+
/**
|
|
1501
|
+
* 0: Unknown / uninitialized
|
|
1502
|
+
*/
|
|
1503
|
+
Unknown = "Unknown",
|
|
1504
|
+
/**
|
|
1505
|
+
* 1: After an amount of time units
|
|
1506
|
+
*/
|
|
1507
|
+
Interval = "Interval",
|
|
1508
|
+
/**
|
|
1509
|
+
* 2: The next working day, at a time of day
|
|
1510
|
+
*/
|
|
1511
|
+
NextWorkingDay = "NextWorkingDay",
|
|
1512
|
+
/**
|
|
1513
|
+
* 3: A weekday next week, at a time of day
|
|
1514
|
+
*/
|
|
1515
|
+
WeekdayNextWeek = "WeekdayNextWeek",
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
|
|
1413
1519
|
/**
|
|
1414
1520
|
* State of a Quote Version
|
|
1415
1521
|
* This Enum is used by: QuoteVersion.State; QuoteVersion.ArchivedState
|
|
@@ -2366,6 +2472,14 @@
|
|
|
2366
2472
|
* 1008: Should only be used for UI, when saved to DB it will be converted to Postponed
|
|
2367
2473
|
*/
|
|
2368
2474
|
PostponedMonth = "PostponedMonth",
|
|
2475
|
+
/**
|
|
2476
|
+
* 1009: Should only be used for UI, when saved to DB it will be converted to Postponed
|
|
2477
|
+
*/
|
|
2478
|
+
PostponedNextWorkingDay = "PostponedNextWorkingDay",
|
|
2479
|
+
/**
|
|
2480
|
+
* 1010: Should only be used for UI, when saved to DB it will be converted to Postponed
|
|
2481
|
+
*/
|
|
2482
|
+
PostponedNextWeek = "PostponedNextWeek",
|
|
2369
2483
|
}
|
|
2370
2484
|
|
|
2371
2485
|
|
|
@@ -5289,6 +5403,18 @@
|
|
|
5289
5403
|
* 11: Invitation or assignment declined
|
|
5290
5404
|
*/
|
|
5291
5405
|
AppointmentDeclined = "AppointmentDeclined",
|
|
5406
|
+
/**
|
|
5407
|
+
* 12: Custom message sent to a ticket's followers
|
|
5408
|
+
*/
|
|
5409
|
+
TicketCustomMessage = "TicketCustomMessage",
|
|
5410
|
+
/**
|
|
5411
|
+
* 13: A favourited ticket was updated
|
|
5412
|
+
*/
|
|
5413
|
+
TicketFavouriteUpdated = "TicketFavouriteUpdated",
|
|
5414
|
+
/**
|
|
5415
|
+
* 14: A ticket was taken over by someone else
|
|
5416
|
+
*/
|
|
5417
|
+
TicketTakenOver = "TicketTakenOver",
|
|
5292
5418
|
}
|
|
5293
5419
|
|
|
5294
5420
|
|
package/src/FreeTextAgent.ts
CHANGED
|
@@ -279,14 +279,14 @@ export class FreeTextAgent extends base.WebApiBase implements IFreeTextAgent {
|
|
|
279
279
|
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
|
-
*
|
|
282
|
+
* Regenerate the freetext index by scanning the database. Freetext search may be unavailable while this operation runs, for instance when the index is built from scratch.
|
|
283
283
|
* @param request - RunAsBatch
|
|
284
284
|
* @returns Information about the batch task, if batch execution was requested. Otherwise null
|
|
285
285
|
*/
|
|
286
286
|
public async regenerateIndexAsync(request: carriers.FreeText_RegenerateIndexRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BatchTaskInfo >;
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
|
-
*
|
|
289
|
+
* Regenerate the freetext index by scanning the database. Freetext search may be unavailable while this operation runs, for instance when the index is built from scratch.
|
|
290
290
|
* @param runAsBatch - If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service
|
|
291
291
|
* @returns Information about the batch task, if batch execution was requested. Otherwise null
|
|
292
292
|
*/
|
package/src/ImportAgent.ts
CHANGED
|
@@ -94,9 +94,9 @@ export class ImportAgent extends base.WebApiBase implements IImportAgent {
|
|
|
94
94
|
/**
|
|
95
95
|
* Preview the import
|
|
96
96
|
* @param importLines - The rows that will be manipulated and according to Import rules
|
|
97
|
-
* @param columnDefinition - An array of the columndefinitions, like firstname, lastname, ...
|
|
97
|
+
* @param columnDefinition - An array of the columndefinitions, like person.firstname, person.lastname, ... - see ImportColumnDef for names
|
|
98
98
|
* @param culture - The current culture used in the import. Used to match language specific strings
|
|
99
|
-
* @param context - Optional context for the import.
|
|
99
|
+
* @param context - Optional context for the import. (sourcedFrom=yyy&fileName=xxx&pricelistId=123)
|
|
100
100
|
* @returns An array of the the rows that can be imported, manipulated according to Import rules given
|
|
101
101
|
*/
|
|
102
102
|
public async previewImportAsync(importLines: carriers.ImportLine[], columnDefinition: string[], culture: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ImportLine[] >;
|
|
@@ -153,11 +153,11 @@ export class ImportAgent extends base.WebApiBase implements IImportAgent {
|
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Do the actual import
|
|
156
|
-
* @param importLines - The rows that will be imported
|
|
157
|
-
* @param columnDefinition - An array of the columndefinitions, like firstname, lastname, ...
|
|
156
|
+
* @param importLines - The rows that will be imported - only selected rows are saved.
|
|
157
|
+
* @param columnDefinition - An array of the columndefinitions, like person.firstname, person.lastname, ... - see ImportColumnDef for names
|
|
158
158
|
* @param createSelection - true if a selection of the imported entities shall be made
|
|
159
159
|
* @param culture - The current culture used in the import. Used to match language specific strings
|
|
160
|
-
* @param context - Optional context for the import.
|
|
160
|
+
* @param context - Optional context for the import. (sourcedFrom=yyy&fileName=xxx&pricelistId=123)
|
|
161
161
|
* @returns First part: the id of the selection created after the import, 0 if no selection is created. Second part: The number of rows actually imported
|
|
162
162
|
*/
|
|
163
163
|
public async saveImportAsync(importLines: carriers.ImportLine[], columnDefinition: string[], createSelection: boolean, culture: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
|
package/src/ListAgent.ts
CHANGED
|
@@ -431,6 +431,10 @@ export interface IListAgent {
|
|
|
431
431
|
globalChangeTicketStatusAsync(fromTicketStatusId: number, toTicketStatusId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
432
432
|
setTicketStatusSortOrderAsync(request: carriers.List_SetTicketStatusSortOrderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
433
433
|
setTicketStatusSortOrderAsync(ticketStatusId: number, sortOrder: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
434
|
+
getTicketStatusPostponeOptionsAsync(request: carriers.List_GetTicketStatusPostponeOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
435
|
+
getTicketStatusPostponeOptionsAsync(ticketStatusId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
436
|
+
saveTicketStatusPostponeOptionsAsync(request: carriers.List_SaveTicketStatusPostponeOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
437
|
+
saveTicketStatusPostponeOptionsAsync(ticketStatusId: number, postponeOptions: carriers.TicketPostponeOption[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
434
438
|
getTicketStatusListAsync(ticketStatusEntityIds: number[]) : Promise< carriers.TicketStatusEntity[] >;
|
|
435
439
|
getTicketStatusesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketStatusEntity[] >;
|
|
436
440
|
getTicketTypeEntityAsync(ticketTypeEntityId: number) : Promise< carriers.TicketTypeEntity >;
|
|
@@ -11119,6 +11123,116 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
11119
11123
|
return this._setTicketStatusSortOrderAsync( _request, _options );
|
|
11120
11124
|
}
|
|
11121
11125
|
|
|
11126
|
+
|
|
11127
|
+
private async _getTicketStatusPostponeOptionsAsync(request: carriers.List_GetTicketStatusPostponeOptionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] > {
|
|
11128
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
11129
|
+
base.WebApiBase.SetPending(options);
|
|
11130
|
+
return new Promise< carriers.TicketPostponeOption[] >(async (resolve, reject) => {
|
|
11131
|
+
try {
|
|
11132
|
+
config.baseURL = this._options.baseUrl;
|
|
11133
|
+
const response = await this._axios.post("GetTicketStatusPostponeOptions", request , config);
|
|
11134
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
11135
|
+
const res : carriers.TicketPostponeOption[] = converters.Create_TicketPostponeOptionArray_From( response.data );
|
|
11136
|
+
resolve(res);
|
|
11137
|
+
}
|
|
11138
|
+
catch( err ) {
|
|
11139
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
11140
|
+
reject(err);
|
|
11141
|
+
}
|
|
11142
|
+
});
|
|
11143
|
+
}
|
|
11144
|
+
|
|
11145
|
+
|
|
11146
|
+
|
|
11147
|
+
/**
|
|
11148
|
+
* Returns the postpone options of a Postponed ticket status, in menu order. A status without saved options returns the standard options. Returns an empty array for a status that is not Postponed.
|
|
11149
|
+
* @param request - TicketStatusId
|
|
11150
|
+
* @returns The postpone options, including inactive ones
|
|
11151
|
+
*/
|
|
11152
|
+
public async getTicketStatusPostponeOptionsAsync(request: carriers.List_GetTicketStatusPostponeOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
11153
|
+
|
|
11154
|
+
/**
|
|
11155
|
+
* Returns the postpone options of a Postponed ticket status, in menu order. A status without saved options returns the standard options. Returns an empty array for a status that is not Postponed.
|
|
11156
|
+
* @param ticketStatusId - Id of the ticket status
|
|
11157
|
+
* @returns The postpone options, including inactive ones
|
|
11158
|
+
*/
|
|
11159
|
+
public async getTicketStatusPostponeOptionsAsync(ticketStatusId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
11160
|
+
|
|
11161
|
+
public async getTicketStatusPostponeOptionsAsync(ticketStatusId:number|carriers.List_GetTicketStatusPostponeOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] > {
|
|
11162
|
+
let _request : carriers.List_GetTicketStatusPostponeOptionsRequest = null;
|
|
11163
|
+
let _options : base.WebApiRequestOptions = null;
|
|
11164
|
+
const first : any = ticketStatusId;
|
|
11165
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketStatusId)!='undefined' ) )
|
|
11166
|
+
{
|
|
11167
|
+
_request = ticketStatusId as carriers.List_GetTicketStatusPostponeOptionsRequest;
|
|
11168
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
11169
|
+
}
|
|
11170
|
+
else
|
|
11171
|
+
{
|
|
11172
|
+
_request = {
|
|
11173
|
+
ticketStatusId: ticketStatusId as number,
|
|
11174
|
+
};
|
|
11175
|
+
_options = webapi_options;
|
|
11176
|
+
}
|
|
11177
|
+
return this._getTicketStatusPostponeOptionsAsync( _request, _options );
|
|
11178
|
+
}
|
|
11179
|
+
|
|
11180
|
+
|
|
11181
|
+
private async _saveTicketStatusPostponeOptionsAsync(request: carriers.List_SaveTicketStatusPostponeOptionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] > {
|
|
11182
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
11183
|
+
base.WebApiBase.SetPending(options);
|
|
11184
|
+
return new Promise< carriers.TicketPostponeOption[] >(async (resolve, reject) => {
|
|
11185
|
+
try {
|
|
11186
|
+
config.baseURL = this._options.baseUrl;
|
|
11187
|
+
const response = await this._axios.post("SaveTicketStatusPostponeOptions", request , config);
|
|
11188
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
11189
|
+
const res : carriers.TicketPostponeOption[] = converters.Create_TicketPostponeOptionArray_From( response.data );
|
|
11190
|
+
resolve(res);
|
|
11191
|
+
}
|
|
11192
|
+
catch( err ) {
|
|
11193
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
11194
|
+
reject(err);
|
|
11195
|
+
}
|
|
11196
|
+
});
|
|
11197
|
+
}
|
|
11198
|
+
|
|
11199
|
+
|
|
11200
|
+
|
|
11201
|
+
/**
|
|
11202
|
+
* Replaces the postpone options of a Postponed ticket status. Standard options can only change rank and active state.
|
|
11203
|
+
* @param request - TicketStatusId, PostponeOptions
|
|
11204
|
+
* @returns The saved postpone options, in menu order
|
|
11205
|
+
*/
|
|
11206
|
+
public async saveTicketStatusPostponeOptionsAsync(request: carriers.List_SaveTicketStatusPostponeOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
11207
|
+
|
|
11208
|
+
/**
|
|
11209
|
+
* Replaces the postpone options of a Postponed ticket status. Standard options can only change rank and active state.
|
|
11210
|
+
* @param ticketStatusId - Id of the ticket status
|
|
11211
|
+
* @param postponeOptions - All postpone options of the status, in menu order
|
|
11212
|
+
* @returns The saved postpone options, in menu order
|
|
11213
|
+
*/
|
|
11214
|
+
public async saveTicketStatusPostponeOptionsAsync(ticketStatusId: number, postponeOptions: carriers.TicketPostponeOption[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] >;
|
|
11215
|
+
|
|
11216
|
+
public async saveTicketStatusPostponeOptionsAsync(ticketStatusId:number|carriers.List_SaveTicketStatusPostponeOptionsRequest, postponeOptions?:carriers.TicketPostponeOption[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketPostponeOption[] > {
|
|
11217
|
+
let _request : carriers.List_SaveTicketStatusPostponeOptionsRequest = null;
|
|
11218
|
+
let _options : base.WebApiRequestOptions = null;
|
|
11219
|
+
const first : any = ticketStatusId;
|
|
11220
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketStatusId)!='undefined' || typeof(first.postponeOptions)!='undefined' ) )
|
|
11221
|
+
{
|
|
11222
|
+
_request = ticketStatusId as carriers.List_SaveTicketStatusPostponeOptionsRequest;
|
|
11223
|
+
_options = postponeOptions as base.WebApiRequestOptions;
|
|
11224
|
+
}
|
|
11225
|
+
else
|
|
11226
|
+
{
|
|
11227
|
+
_request = {
|
|
11228
|
+
ticketStatusId: ticketStatusId as number,
|
|
11229
|
+
postponeOptions: postponeOptions as carriers.TicketPostponeOption[],
|
|
11230
|
+
};
|
|
11231
|
+
_options = webapi_options;
|
|
11232
|
+
}
|
|
11233
|
+
return this._saveTicketStatusPostponeOptionsAsync( _request, _options );
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11122
11236
|
/**
|
|
11123
11237
|
* Gets an array of TicketStatusEntity objects.
|
|
11124
11238
|
* @param ticketStatusEntityIds - The primary keys.
|