@superoffice/webapi 11.13.921 → 12.0.342
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 +563 -2
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +66 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +158 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +18 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +296 -18
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DashAgent.d.ts +7 -0
- package/dist/cjs/DashAgent.d.ts.map +1 -1
- package/dist/cjs/DashAgent.js +24 -0
- package/dist/cjs/DashAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +150 -30
- package/dist/cjs/EMailAgent.d.ts.map +1 -1
- package/dist/cjs/EMailAgent.js +260 -0
- package/dist/cjs/EMailAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +55 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +60 -2
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +7 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +24 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +18 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +36 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +7 -0
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +24 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +99 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +207 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/cjs/WorkflowAgent.d.ts +7 -0
- package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
- package/dist/cjs/WorkflowAgent.js +24 -0
- package/dist/cjs/WorkflowAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +563 -2
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +66 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +158 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +18 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +260 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DashAgent.d.ts +7 -0
- package/dist/esm/DashAgent.d.ts.map +1 -1
- package/dist/esm/DashAgent.js +24 -0
- package/dist/esm/DashAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +150 -30
- package/dist/esm/EMailAgent.d.ts.map +1 -1
- package/dist/esm/EMailAgent.js +260 -0
- package/dist/esm/EMailAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +55 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +58 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +7 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +24 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +18 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +36 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +7 -0
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +24 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +99 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +207 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/dist/esm/WorkflowAgent.d.ts +7 -0
- package/dist/esm/WorkflowAgent.d.ts.map +1 -1
- package/dist/esm/WorkflowAgent.js +24 -0
- package/dist/esm/WorkflowAgent.js.map +1 -1
- package/package.json +4 -4
- package/src/Carriers.ts +740 -2
- package/src/ConfigurationAgent.ts +216 -0
- package/src/Converters.ts +312 -0
- package/src/DashAgent.ts +30 -0
- package/src/EMailAgent.ts +470 -30
- package/src/Enums.ts +61 -0
- package/src/LicenseAgent.ts +30 -0
- package/src/ListAgent.ts +62 -0
- package/src/ProjectAgent.ts +30 -0
- package/src/TicketAgent.ts +354 -0
- package/src/WorkflowAgent.ts +30 -0
package/src/Enums.ts
CHANGED
|
@@ -4747,6 +4747,48 @@
|
|
|
4747
4747
|
}
|
|
4748
4748
|
|
|
4749
4749
|
|
|
4750
|
+
/**
|
|
4751
|
+
* How to notify recipients when a webhook changes state
|
|
4752
|
+
* This Enum is used by: Webhook.notify_via
|
|
4753
|
+
* This Enum consists of flag values that can be combined.
|
|
4754
|
+
*/
|
|
4755
|
+
export enum WebhookNotifyVia {
|
|
4756
|
+
/**
|
|
4757
|
+
* 0: 0: No notification channels
|
|
4758
|
+
*/
|
|
4759
|
+
None = 0,
|
|
4760
|
+
/**
|
|
4761
|
+
* 1: 1: Send e-mail notification
|
|
4762
|
+
*/
|
|
4763
|
+
Email = 1,
|
|
4764
|
+
/**
|
|
4765
|
+
* 2: 2: Send in-app notification
|
|
4766
|
+
*/
|
|
4767
|
+
InApp = 2,
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
|
|
4771
|
+
/**
|
|
4772
|
+
* How to notify recipients when a webhook changes state
|
|
4773
|
+
* This Enum is used by: Webhook.notify_when
|
|
4774
|
+
* This Enum consists of flag values that can be combined.
|
|
4775
|
+
*/
|
|
4776
|
+
export enum WebhookNotifyWhen {
|
|
4777
|
+
/**
|
|
4778
|
+
* 0: 0: No notifications
|
|
4779
|
+
*/
|
|
4780
|
+
None = 0,
|
|
4781
|
+
/**
|
|
4782
|
+
* 1: 1: Notify on first failure
|
|
4783
|
+
*/
|
|
4784
|
+
FirstFailure = 1,
|
|
4785
|
+
/**
|
|
4786
|
+
* 2: 2: Notify when webhook is disabled due to too many errors
|
|
4787
|
+
*/
|
|
4788
|
+
Disabling = 2,
|
|
4789
|
+
}
|
|
4790
|
+
|
|
4791
|
+
|
|
4750
4792
|
/**
|
|
4751
4793
|
* Command action
|
|
4752
4794
|
*/
|
|
@@ -6651,6 +6693,25 @@
|
|
|
6651
6693
|
}
|
|
6652
6694
|
|
|
6653
6695
|
|
|
6696
|
+
/**
|
|
6697
|
+
* Describes why a ticket relation is invalid.
|
|
6698
|
+
*/
|
|
6699
|
+
export enum TicketRelationError {
|
|
6700
|
+
/**
|
|
6701
|
+
* 0: The source ticket already has a parent.
|
|
6702
|
+
*/
|
|
6703
|
+
ParentExists = "ParentExists",
|
|
6704
|
+
/**
|
|
6705
|
+
* 1: A relation between the source and destination tickets already exists.
|
|
6706
|
+
*/
|
|
6707
|
+
RelationExists = "RelationExists",
|
|
6708
|
+
/**
|
|
6709
|
+
* 2: Source and destination tickets are the same.
|
|
6710
|
+
*/
|
|
6711
|
+
SameTicket = "SameTicket",
|
|
6712
|
+
}
|
|
6713
|
+
|
|
6714
|
+
|
|
6654
6715
|
/**
|
|
6655
6716
|
* Value for field 'Type' in table 'notify'. Defines the notification type.
|
|
6656
6717
|
* This Enum consists of flag values that can be combined.
|
package/src/LicenseAgent.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface ILicenseAgent {
|
|
|
68
68
|
getCentralLicenseAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
69
69
|
saveCentralLicenseAsync(request: carriers.License_SaveCentralLicenseRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
70
70
|
saveCentralLicenseAsync(license: carriers.LicenseOwner[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LicenseOwner[] >;
|
|
71
|
+
getFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >;
|
|
71
72
|
} // interface ILicenseAgent
|
|
72
73
|
|
|
73
74
|
|
|
@@ -1225,6 +1226,35 @@ export class LicenseAgent extends base.WebApiBase implements ILicenseAgent {
|
|
|
1225
1226
|
return this._saveCentralLicenseAsync( _request, _options );
|
|
1226
1227
|
}
|
|
1227
1228
|
|
|
1229
|
+
|
|
1230
|
+
private async _getFencingInfoAsync( options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo > {
|
|
1231
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1232
|
+
base.WebApiBase.SetPending(options);
|
|
1233
|
+
return new Promise< carriers.FencingInfo >(async (resolve, reject) => {
|
|
1234
|
+
try {
|
|
1235
|
+
config.baseURL = this._options.baseUrl;
|
|
1236
|
+
const response = await this._axios.post("GetFencingInfo", undefined , config);
|
|
1237
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1238
|
+
const res : carriers.FencingInfo = converters.Create_FencingInfo_From( response.data );
|
|
1239
|
+
resolve(res);
|
|
1240
|
+
}
|
|
1241
|
+
catch( err ) {
|
|
1242
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1243
|
+
reject(err);
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Returns fencinginfo if license fence is near or reached
|
|
1251
|
+
* @returns The info of which license fence that is reached or near
|
|
1252
|
+
*/
|
|
1253
|
+
public async getFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >
|
|
1254
|
+
{
|
|
1255
|
+
return this._getFencingInfoAsync(webapi_options);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1228
1258
|
} // class v1LicenseAgentController
|
|
1229
1259
|
|
|
1230
1260
|
|
package/src/ListAgent.ts
CHANGED
|
@@ -419,6 +419,8 @@ export interface IListAgent {
|
|
|
419
419
|
getTicketRelationDefinitionEntityAsync(ticketRelationDefinitionEntityId: number) : Promise< carriers.TicketRelationDefinitionEntity >;
|
|
420
420
|
setTicketRelationDefinitionSortOrderAsync(request: carriers.List_SetTicketRelationDefinitionSortOrderRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
421
421
|
setTicketRelationDefinitionSortOrderAsync(ticketRelationDefId: number, sortOrder: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
422
|
+
validateTicketRelationDefinitionAsync(request: carriers.List_ValidateTicketRelationDefinitionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] >;
|
|
423
|
+
validateTicketRelationDefinitionAsync(ticketRelationDefinitionId: number, sourceTicketTypeIds: number[], destinationTicketTypeIds: number[], relationType: enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] >;
|
|
422
424
|
getTicketStatusEntityAsync(ticketStatusEntityId: number) : Promise< carriers.TicketStatusEntity >;
|
|
423
425
|
globalChangeTicketStatusAsync(request: carriers.List_GlobalChangeTicketStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
424
426
|
globalChangeTicketStatusAsync(fromTicketStatusId: number, toTicketStatusId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
@@ -10798,6 +10800,66 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
|
|
|
10798
10800
|
return this._setTicketRelationDefinitionSortOrderAsync( _request, _options );
|
|
10799
10801
|
}
|
|
10800
10802
|
|
|
10803
|
+
|
|
10804
|
+
private async _validateTicketRelationDefinitionAsync(request: carriers.List_ValidateTicketRelationDefinitionRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] > {
|
|
10805
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
10806
|
+
base.WebApiBase.SetPending(options);
|
|
10807
|
+
return new Promise< carriers.TicketRelationDefinitionResult[] >(async (resolve, reject) => {
|
|
10808
|
+
try {
|
|
10809
|
+
config.baseURL = this._options.baseUrl;
|
|
10810
|
+
const response = await this._axios.post("ValidateTicketRelationDefinition", request , config);
|
|
10811
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
10812
|
+
const res : carriers.TicketRelationDefinitionResult[] = converters.Create_TicketRelationDefinitionResultArray_From( response.data );
|
|
10813
|
+
resolve(res);
|
|
10814
|
+
}
|
|
10815
|
+
catch( err ) {
|
|
10816
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
10817
|
+
reject(err);
|
|
10818
|
+
}
|
|
10819
|
+
});
|
|
10820
|
+
}
|
|
10821
|
+
|
|
10822
|
+
|
|
10823
|
+
|
|
10824
|
+
/**
|
|
10825
|
+
* Validate a ticket relation definition against combinations of source and destination ticket types. Returns one result per source/destination pair.
|
|
10826
|
+
* @param request - TicketRelationDefinitionId, SourceTicketTypeIds, DestinationTicketTypeIds, RelationType
|
|
10827
|
+
* @returns Validation results, one per source/destination ticket type combination.
|
|
10828
|
+
*/
|
|
10829
|
+
public async validateTicketRelationDefinitionAsync(request: carriers.List_ValidateTicketRelationDefinitionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] >;
|
|
10830
|
+
|
|
10831
|
+
/**
|
|
10832
|
+
* Validate a ticket relation definition against combinations of source and destination ticket types. Returns one result per source/destination pair.
|
|
10833
|
+
* @param ticketRelationDefinitionId - The id of the relation definition being validated. Pass 0 when creating a new definition.
|
|
10834
|
+
* @param sourceTicketTypeIds - The ticket type ids to use as source in the validation.
|
|
10835
|
+
* @param destinationTicketTypeIds - The ticket type ids to use as destination in the validation.
|
|
10836
|
+
* @param relationType - The relation type to validate.
|
|
10837
|
+
* @returns Validation results, one per source/destination ticket type combination.
|
|
10838
|
+
*/
|
|
10839
|
+
public async validateTicketRelationDefinitionAsync(ticketRelationDefinitionId: number, sourceTicketTypeIds: number[], destinationTicketTypeIds: number[], relationType: enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] >;
|
|
10840
|
+
|
|
10841
|
+
public async validateTicketRelationDefinitionAsync(ticketRelationDefinitionId:number|carriers.List_ValidateTicketRelationDefinitionRequest, sourceTicketTypeIds?:number[]|base.WebApiRequestOptions, destinationTicketTypeIds?:number[], relationType?:enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationDefinitionResult[] > {
|
|
10842
|
+
let _request : carriers.List_ValidateTicketRelationDefinitionRequest = null;
|
|
10843
|
+
let _options : base.WebApiRequestOptions = null;
|
|
10844
|
+
const first : any = ticketRelationDefinitionId;
|
|
10845
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketRelationDefinitionId)!='undefined' || typeof(first.sourceTicketTypeIds)!='undefined' || typeof(first.destinationTicketTypeIds)!='undefined' || typeof(first.relationType)!='undefined' ) )
|
|
10846
|
+
{
|
|
10847
|
+
_request = ticketRelationDefinitionId as carriers.List_ValidateTicketRelationDefinitionRequest;
|
|
10848
|
+
_options = sourceTicketTypeIds as base.WebApiRequestOptions;
|
|
10849
|
+
}
|
|
10850
|
+
else
|
|
10851
|
+
{
|
|
10852
|
+
_request = {
|
|
10853
|
+
ticketRelationDefinitionId: ticketRelationDefinitionId as number,
|
|
10854
|
+
sourceTicketTypeIds: sourceTicketTypeIds as number[],
|
|
10855
|
+
destinationTicketTypeIds: destinationTicketTypeIds as number[],
|
|
10856
|
+
relationType: relationType as enums.TicketRelationType,
|
|
10857
|
+
};
|
|
10858
|
+
_options = webapi_options;
|
|
10859
|
+
}
|
|
10860
|
+
return this._validateTicketRelationDefinitionAsync( _request, _options );
|
|
10861
|
+
}
|
|
10862
|
+
|
|
10801
10863
|
/**
|
|
10802
10864
|
* Gets a TicketStatusEntity object.
|
|
10803
10865
|
* @param ticketStatusEntityId - The primary key.
|
package/src/ProjectAgent.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface IProjectAgent {
|
|
|
77
77
|
getProjectEntityWithoutMembersAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity >;
|
|
78
78
|
saveProjectEntityWithoutMembersAsync(request: carriers.Project_SaveProjectEntityWithoutMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity >;
|
|
79
79
|
saveProjectEntityWithoutMembersAsync(projectEntity: carriers.ProjectEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity >;
|
|
80
|
+
getProjectFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >;
|
|
80
81
|
getProjectEventAsync(projectEventId: number) : Promise< carriers.ProjectEvent >;
|
|
81
82
|
getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
82
83
|
getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
@@ -1478,6 +1479,35 @@ export class ProjectAgent extends base.WebApiBase implements IProjectAgent {
|
|
|
1478
1479
|
return this._saveProjectEntityWithoutMembersAsync( _request, _options );
|
|
1479
1480
|
}
|
|
1480
1481
|
|
|
1482
|
+
|
|
1483
|
+
private async _getProjectFencingInfoAsync( options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo > {
|
|
1484
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1485
|
+
base.WebApiBase.SetPending(options);
|
|
1486
|
+
return new Promise< carriers.FencingInfo >(async (resolve, reject) => {
|
|
1487
|
+
try {
|
|
1488
|
+
config.baseURL = this._options.baseUrl;
|
|
1489
|
+
const response = await this._axios.post("GetProjectFencingInfo", undefined , config);
|
|
1490
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1491
|
+
const res : carriers.FencingInfo = converters.Create_FencingInfo_From( response.data );
|
|
1492
|
+
resolve(res);
|
|
1493
|
+
}
|
|
1494
|
+
catch( err ) {
|
|
1495
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1496
|
+
reject(err);
|
|
1497
|
+
}
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Get the current project fencing status for the tenant
|
|
1504
|
+
* @returns Current fencing status including count, maximum, and warning state
|
|
1505
|
+
*/
|
|
1506
|
+
public async getProjectFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >
|
|
1507
|
+
{
|
|
1508
|
+
return this._getProjectFencingInfoAsync(webapi_options);
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1481
1511
|
/**
|
|
1482
1512
|
* Gets a ProjectEvent object.
|
|
1483
1513
|
* @param projectEventId - The primary key.
|
package/src/TicketAgent.ts
CHANGED
|
@@ -157,6 +157,18 @@ export interface ITicketAgent {
|
|
|
157
157
|
getTicketMessageWithOptionsAsync(request: carriers.Ticket_GetTicketMessageWithOptionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketMessageEntity >;
|
|
158
158
|
getTicketMessageWithOptionsAsync(ticketMessageEntityId: number, includeNonInlineAttachmentsInfo: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketMessageEntity >;
|
|
159
159
|
getTicketRelationEntityAsync(ticketRelationEntityId: number) : Promise< carriers.TicketRelationEntity >;
|
|
160
|
+
getTicketRelationsAsync(request: carriers.Ticket_GetTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] >;
|
|
161
|
+
getTicketRelationsAsync(ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] >;
|
|
162
|
+
getTicketParentIdAsync(request: carriers.Ticket_GetTicketParentIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
163
|
+
getTicketParentIdAsync(ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
164
|
+
setTicketParentAsync(request: carriers.Ticket_SetTicketParentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
165
|
+
setTicketParentAsync(ticketId: number, parentTicketId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
166
|
+
validateTicketRelationsAsync(request: carriers.Ticket_ValidateTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
167
|
+
validateTicketRelationsAsync(sourceTicketIds: number[], destinationTicketId: number, relationType: enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
168
|
+
createTicketRelationsAsync(request: carriers.Ticket_CreateTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
169
|
+
createTicketRelationsAsync(sourceTicketIds: number[], destinationTicketId: number, relationType: enums.TicketRelationType, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
170
|
+
getTicketRelationActionsAsync(request: carriers.Ticket_GetTicketRelationActionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction >;
|
|
171
|
+
getTicketRelationActionsAsync(ticketId: number, parentTicketId: number, ticketTypeId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction >;
|
|
160
172
|
getTicketSummariesAsync(request: carriers.Ticket_GetTicketSummariesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketSummaryItem[] >;
|
|
161
173
|
getTicketSummariesAsync(ticketIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketSummaryItem[] >;
|
|
162
174
|
} // interface ITicketAgent
|
|
@@ -3788,6 +3800,348 @@ export class TicketAgent extends base.WebApiBase implements ITicketAgent {
|
|
|
3788
3800
|
}
|
|
3789
3801
|
|
|
3790
3802
|
|
|
3803
|
+
private async _getTicketRelationsAsync(request: carriers.Ticket_GetTicketRelationsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] > {
|
|
3804
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3805
|
+
base.WebApiBase.SetPending(options);
|
|
3806
|
+
return new Promise< carriers.TicketRelationItem[] >(async (resolve, reject) => {
|
|
3807
|
+
try {
|
|
3808
|
+
config.baseURL = this._options.baseUrl;
|
|
3809
|
+
const response = await this._axios.post("GetTicketRelations", request , config);
|
|
3810
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
3811
|
+
const res : carriers.TicketRelationItem[] = converters.Create_TicketRelationItemArray_From( response.data );
|
|
3812
|
+
resolve(res);
|
|
3813
|
+
}
|
|
3814
|
+
catch( err ) {
|
|
3815
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3816
|
+
reject(err);
|
|
3817
|
+
}
|
|
3818
|
+
});
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
|
|
3822
|
+
|
|
3823
|
+
/**
|
|
3824
|
+
* Get all relations for a ticket.
|
|
3825
|
+
* @param request - TicketId
|
|
3826
|
+
* @returns All relations for the ticket. Each item carries its RelationType (Parent, Child, or Related).
|
|
3827
|
+
*/
|
|
3828
|
+
public async getTicketRelationsAsync(request: carriers.Ticket_GetTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] >;
|
|
3829
|
+
|
|
3830
|
+
/**
|
|
3831
|
+
* Get all relations for a ticket.
|
|
3832
|
+
* @param ticketId - The id of the ticket to get relations for.
|
|
3833
|
+
* @returns All relations for the ticket. Each item carries its RelationType (Parent, Child, or Related).
|
|
3834
|
+
*/
|
|
3835
|
+
public async getTicketRelationsAsync(ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] >;
|
|
3836
|
+
|
|
3837
|
+
public async getTicketRelationsAsync(ticketId:number|carriers.Ticket_GetTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationItem[] > {
|
|
3838
|
+
let _request : carriers.Ticket_GetTicketRelationsRequest = null;
|
|
3839
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3840
|
+
const first : any = ticketId;
|
|
3841
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketId)!='undefined' ) )
|
|
3842
|
+
{
|
|
3843
|
+
_request = ticketId as carriers.Ticket_GetTicketRelationsRequest;
|
|
3844
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3845
|
+
}
|
|
3846
|
+
else
|
|
3847
|
+
{
|
|
3848
|
+
_request = {
|
|
3849
|
+
ticketId: ticketId as number,
|
|
3850
|
+
};
|
|
3851
|
+
_options = webapi_options;
|
|
3852
|
+
}
|
|
3853
|
+
return this._getTicketRelationsAsync( _request, _options );
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
private async _getTicketParentIdAsync(request: carriers.Ticket_GetTicketParentIdRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
3858
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3859
|
+
base.WebApiBase.SetPending(options);
|
|
3860
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
3861
|
+
try {
|
|
3862
|
+
config.baseURL = this._options.baseUrl;
|
|
3863
|
+
const response = await this._axios.post("GetTicketParentId", request , config);
|
|
3864
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
3865
|
+
const res : number = response.data as number;
|
|
3866
|
+
resolve(res);
|
|
3867
|
+
}
|
|
3868
|
+
catch( err ) {
|
|
3869
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3870
|
+
reject(err);
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
|
|
3876
|
+
|
|
3877
|
+
/**
|
|
3878
|
+
* Get the parent ticket id. Returns 0 if the ticket has no parent.
|
|
3879
|
+
* @param request - TicketId
|
|
3880
|
+
* @returns The id of the parent ticket, or 0 if there is no parent.
|
|
3881
|
+
*/
|
|
3882
|
+
public async getTicketParentIdAsync(request: carriers.Ticket_GetTicketParentIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
3883
|
+
|
|
3884
|
+
/**
|
|
3885
|
+
* Get the parent ticket id. Returns 0 if the ticket has no parent.
|
|
3886
|
+
* @param ticketId - The id of the ticket to get the parent for.
|
|
3887
|
+
* @returns The id of the parent ticket, or 0 if there is no parent.
|
|
3888
|
+
*/
|
|
3889
|
+
public async getTicketParentIdAsync(ticketId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
3890
|
+
|
|
3891
|
+
public async getTicketParentIdAsync(ticketId:number|carriers.Ticket_GetTicketParentIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
3892
|
+
let _request : carriers.Ticket_GetTicketParentIdRequest = null;
|
|
3893
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3894
|
+
const first : any = ticketId;
|
|
3895
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketId)!='undefined' ) )
|
|
3896
|
+
{
|
|
3897
|
+
_request = ticketId as carriers.Ticket_GetTicketParentIdRequest;
|
|
3898
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
3899
|
+
}
|
|
3900
|
+
else
|
|
3901
|
+
{
|
|
3902
|
+
_request = {
|
|
3903
|
+
ticketId: ticketId as number,
|
|
3904
|
+
};
|
|
3905
|
+
_options = webapi_options;
|
|
3906
|
+
}
|
|
3907
|
+
return this._getTicketParentIdAsync( _request, _options );
|
|
3908
|
+
}
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
private async _setTicketParentAsync(request: carriers.Ticket_SetTicketParentRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3912
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3913
|
+
base.WebApiBase.SetPending(options);
|
|
3914
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
3915
|
+
try {
|
|
3916
|
+
config.baseURL = this._options.baseUrl;
|
|
3917
|
+
const response = await this._axios.post("SetTicketParent", request , config);
|
|
3918
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
3919
|
+
const res = response.data;
|
|
3920
|
+
resolve(res);
|
|
3921
|
+
}
|
|
3922
|
+
catch( err ) {
|
|
3923
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3924
|
+
reject(err);
|
|
3925
|
+
}
|
|
3926
|
+
});
|
|
3927
|
+
}
|
|
3928
|
+
|
|
3929
|
+
|
|
3930
|
+
|
|
3931
|
+
/**
|
|
3932
|
+
* Set the parent of a ticket. If the ticket already has a parent, it will be overwritten.
|
|
3933
|
+
* @param request - TicketId, ParentTicketId, Comment
|
|
3934
|
+
* @returns This method has no return value
|
|
3935
|
+
*/
|
|
3936
|
+
public async setTicketParentAsync(request: carriers.Ticket_SetTicketParentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3937
|
+
|
|
3938
|
+
/**
|
|
3939
|
+
* Set the parent of a ticket. If the ticket already has a parent, it will be overwritten.
|
|
3940
|
+
* @param ticketId - The id of the ticket to set the parent on.
|
|
3941
|
+
* @param parentTicketId - The id of the ticket to set as parent.
|
|
3942
|
+
* @param comment - Optional comment to store on the relation.
|
|
3943
|
+
* @returns This method has no return value
|
|
3944
|
+
*/
|
|
3945
|
+
public async setTicketParentAsync(ticketId: number, parentTicketId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
3946
|
+
|
|
3947
|
+
public async setTicketParentAsync(ticketId:number|carriers.Ticket_SetTicketParentRequest, parentTicketId?:number|base.WebApiRequestOptions, comment?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
3948
|
+
let _request : carriers.Ticket_SetTicketParentRequest = null;
|
|
3949
|
+
let _options : base.WebApiRequestOptions = null;
|
|
3950
|
+
const first : any = ticketId;
|
|
3951
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketId)!='undefined' || typeof(first.parentTicketId)!='undefined' || typeof(first.comment)!='undefined' ) )
|
|
3952
|
+
{
|
|
3953
|
+
_request = ticketId as carriers.Ticket_SetTicketParentRequest;
|
|
3954
|
+
_options = parentTicketId as base.WebApiRequestOptions;
|
|
3955
|
+
}
|
|
3956
|
+
else
|
|
3957
|
+
{
|
|
3958
|
+
_request = {
|
|
3959
|
+
ticketId: ticketId as number,
|
|
3960
|
+
parentTicketId: parentTicketId as number,
|
|
3961
|
+
comment: comment as string,
|
|
3962
|
+
};
|
|
3963
|
+
_options = webapi_options;
|
|
3964
|
+
}
|
|
3965
|
+
return this._setTicketParentAsync( _request, _options );
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3968
|
+
|
|
3969
|
+
private async _validateTicketRelationsAsync(request: carriers.Ticket_ValidateTicketRelationsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] > {
|
|
3970
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3971
|
+
base.WebApiBase.SetPending(options);
|
|
3972
|
+
return new Promise< carriers.TicketRelationResult[] >(async (resolve, reject) => {
|
|
3973
|
+
try {
|
|
3974
|
+
config.baseURL = this._options.baseUrl;
|
|
3975
|
+
const response = await this._axios.post("ValidateTicketRelations", request , config);
|
|
3976
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
3977
|
+
const res : carriers.TicketRelationResult[] = converters.Create_TicketRelationResultArray_From( response.data );
|
|
3978
|
+
resolve(res);
|
|
3979
|
+
}
|
|
3980
|
+
catch( err ) {
|
|
3981
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
3982
|
+
reject(err);
|
|
3983
|
+
}
|
|
3984
|
+
});
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
|
|
3988
|
+
|
|
3989
|
+
/**
|
|
3990
|
+
* Validate proposed ticket relations without saving them. Returns a result per source ticket indicating whether the relation is valid.
|
|
3991
|
+
* @param request - SourceTicketIds, DestinationTicketId, RelationType
|
|
3992
|
+
* @returns Validation results, one per source ticket id.
|
|
3993
|
+
*/
|
|
3994
|
+
public async validateTicketRelationsAsync(request: carriers.Ticket_ValidateTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
3995
|
+
|
|
3996
|
+
/**
|
|
3997
|
+
* Validate proposed ticket relations without saving them. Returns a result per source ticket indicating whether the relation is valid.
|
|
3998
|
+
* @param sourceTicketIds - The ids of the tickets to relate to the destination ticket.
|
|
3999
|
+
* @param destinationTicketId - The id of the ticket that the source tickets will be related to.
|
|
4000
|
+
* @param relationType - The type of relation to create.
|
|
4001
|
+
* @returns Validation results, one per source ticket id.
|
|
4002
|
+
*/
|
|
4003
|
+
public async validateTicketRelationsAsync(sourceTicketIds: number[], destinationTicketId: number, relationType: enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
4004
|
+
|
|
4005
|
+
public async validateTicketRelationsAsync(sourceTicketIds:number[]|carriers.Ticket_ValidateTicketRelationsRequest, destinationTicketId?:number|base.WebApiRequestOptions, relationType?:enums.TicketRelationType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] > {
|
|
4006
|
+
let _request : carriers.Ticket_ValidateTicketRelationsRequest = null;
|
|
4007
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4008
|
+
const first : any = sourceTicketIds;
|
|
4009
|
+
if( typeof( first ) === "object" && first && ( typeof(first.sourceTicketIds)!='undefined' || typeof(first.destinationTicketId)!='undefined' || typeof(first.relationType)!='undefined' ) )
|
|
4010
|
+
{
|
|
4011
|
+
_request = sourceTicketIds as carriers.Ticket_ValidateTicketRelationsRequest;
|
|
4012
|
+
_options = destinationTicketId as base.WebApiRequestOptions;
|
|
4013
|
+
}
|
|
4014
|
+
else
|
|
4015
|
+
{
|
|
4016
|
+
_request = {
|
|
4017
|
+
sourceTicketIds: sourceTicketIds as number[],
|
|
4018
|
+
destinationTicketId: destinationTicketId as number,
|
|
4019
|
+
relationType: relationType as enums.TicketRelationType,
|
|
4020
|
+
};
|
|
4021
|
+
_options = webapi_options;
|
|
4022
|
+
}
|
|
4023
|
+
return this._validateTicketRelationsAsync( _request, _options );
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
|
|
4027
|
+
private async _createTicketRelationsAsync(request: carriers.Ticket_CreateTicketRelationsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] > {
|
|
4028
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4029
|
+
base.WebApiBase.SetPending(options);
|
|
4030
|
+
return new Promise< carriers.TicketRelationResult[] >(async (resolve, reject) => {
|
|
4031
|
+
try {
|
|
4032
|
+
config.baseURL = this._options.baseUrl;
|
|
4033
|
+
const response = await this._axios.post("CreateTicketRelations", request , config);
|
|
4034
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
4035
|
+
const res : carriers.TicketRelationResult[] = converters.Create_TicketRelationResultArray_From( response.data );
|
|
4036
|
+
resolve(res);
|
|
4037
|
+
}
|
|
4038
|
+
catch( err ) {
|
|
4039
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4040
|
+
reject(err);
|
|
4041
|
+
}
|
|
4042
|
+
});
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
/**
|
|
4048
|
+
* Create multiple ticket relations in a single call. Returns a result per source ticket indicating success or failure.
|
|
4049
|
+
* @param request - SourceTicketIds, DestinationTicketId, RelationType, Comment
|
|
4050
|
+
* @returns Creation results, one per source ticket id.
|
|
4051
|
+
*/
|
|
4052
|
+
public async createTicketRelationsAsync(request: carriers.Ticket_CreateTicketRelationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
4053
|
+
|
|
4054
|
+
/**
|
|
4055
|
+
* Create multiple ticket relations in a single call. Returns a result per source ticket indicating success or failure.
|
|
4056
|
+
* @param sourceTicketIds - The ids of the tickets to relate to the destination ticket.
|
|
4057
|
+
* @param destinationTicketId - The id of the ticket that the source tickets will be related to.
|
|
4058
|
+
* @param relationType - The type of relation to create.
|
|
4059
|
+
* @param comment - Optional comment to store on each relation.
|
|
4060
|
+
* @returns Creation results, one per source ticket id.
|
|
4061
|
+
*/
|
|
4062
|
+
public async createTicketRelationsAsync(sourceTicketIds: number[], destinationTicketId: number, relationType: enums.TicketRelationType, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] >;
|
|
4063
|
+
|
|
4064
|
+
public async createTicketRelationsAsync(sourceTicketIds:number[]|carriers.Ticket_CreateTicketRelationsRequest, destinationTicketId?:number|base.WebApiRequestOptions, relationType?:enums.TicketRelationType, comment?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationResult[] > {
|
|
4065
|
+
let _request : carriers.Ticket_CreateTicketRelationsRequest = null;
|
|
4066
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4067
|
+
const first : any = sourceTicketIds;
|
|
4068
|
+
if( typeof( first ) === "object" && first && ( typeof(first.sourceTicketIds)!='undefined' || typeof(first.destinationTicketId)!='undefined' || typeof(first.relationType)!='undefined' || typeof(first.comment)!='undefined' ) )
|
|
4069
|
+
{
|
|
4070
|
+
_request = sourceTicketIds as carriers.Ticket_CreateTicketRelationsRequest;
|
|
4071
|
+
_options = destinationTicketId as base.WebApiRequestOptions;
|
|
4072
|
+
}
|
|
4073
|
+
else
|
|
4074
|
+
{
|
|
4075
|
+
_request = {
|
|
4076
|
+
sourceTicketIds: sourceTicketIds as number[],
|
|
4077
|
+
destinationTicketId: destinationTicketId as number,
|
|
4078
|
+
relationType: relationType as enums.TicketRelationType,
|
|
4079
|
+
comment: comment as string,
|
|
4080
|
+
};
|
|
4081
|
+
_options = webapi_options;
|
|
4082
|
+
}
|
|
4083
|
+
return this._createTicketRelationsAsync( _request, _options );
|
|
4084
|
+
}
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
private async _getTicketRelationActionsAsync(request: carriers.Ticket_GetTicketRelationActionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction > {
|
|
4088
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
4089
|
+
base.WebApiBase.SetPending(options);
|
|
4090
|
+
return new Promise< carriers.TicketRelationAction >(async (resolve, reject) => {
|
|
4091
|
+
try {
|
|
4092
|
+
config.baseURL = this._options.baseUrl;
|
|
4093
|
+
const response = await this._axios.post("GetTicketRelationActions", request , config);
|
|
4094
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
4095
|
+
const res : carriers.TicketRelationAction = converters.Create_TicketRelationAction_From( response.data );
|
|
4096
|
+
resolve(res);
|
|
4097
|
+
}
|
|
4098
|
+
catch( err ) {
|
|
4099
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
4100
|
+
reject(err);
|
|
4101
|
+
}
|
|
4102
|
+
});
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
|
|
4106
|
+
|
|
4107
|
+
/**
|
|
4108
|
+
* Get the relation-driven actions that apply to a ticket, such as whether to offer closing the parent or whether open children are blocking the ticket from being closed.
|
|
4109
|
+
* @param request - TicketId, ParentTicketId, TicketTypeId
|
|
4110
|
+
* @returns The relation-driven actions applicable to the ticket.
|
|
4111
|
+
*/
|
|
4112
|
+
public async getTicketRelationActionsAsync(request: carriers.Ticket_GetTicketRelationActionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction >;
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* Get the relation-driven actions that apply to a ticket, such as whether to offer closing the parent or whether open children are blocking the ticket from being closed.
|
|
4116
|
+
* @param ticketId - The id of the ticket being evaluated.
|
|
4117
|
+
* @param parentTicketId - The id of the parent ticket, if any. Pass 0 if there is no parent.
|
|
4118
|
+
* @param ticketTypeId - The id of the ticket type.
|
|
4119
|
+
* @returns The relation-driven actions applicable to the ticket.
|
|
4120
|
+
*/
|
|
4121
|
+
public async getTicketRelationActionsAsync(ticketId: number, parentTicketId: number, ticketTypeId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction >;
|
|
4122
|
+
|
|
4123
|
+
public async getTicketRelationActionsAsync(ticketId:number|carriers.Ticket_GetTicketRelationActionsRequest, parentTicketId?:number|base.WebApiRequestOptions, ticketTypeId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TicketRelationAction > {
|
|
4124
|
+
let _request : carriers.Ticket_GetTicketRelationActionsRequest = null;
|
|
4125
|
+
let _options : base.WebApiRequestOptions = null;
|
|
4126
|
+
const first : any = ticketId;
|
|
4127
|
+
if( typeof( first ) === "object" && first && ( typeof(first.ticketId)!='undefined' || typeof(first.parentTicketId)!='undefined' || typeof(first.ticketTypeId)!='undefined' ) )
|
|
4128
|
+
{
|
|
4129
|
+
_request = ticketId as carriers.Ticket_GetTicketRelationActionsRequest;
|
|
4130
|
+
_options = parentTicketId as base.WebApiRequestOptions;
|
|
4131
|
+
}
|
|
4132
|
+
else
|
|
4133
|
+
{
|
|
4134
|
+
_request = {
|
|
4135
|
+
ticketId: ticketId as number,
|
|
4136
|
+
parentTicketId: parentTicketId as number,
|
|
4137
|
+
ticketTypeId: ticketTypeId as number,
|
|
4138
|
+
};
|
|
4139
|
+
_options = webapi_options;
|
|
4140
|
+
}
|
|
4141
|
+
return this._getTicketRelationActionsAsync( _request, _options );
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4144
|
+
|
|
3791
4145
|
private async _getTicketSummariesAsync(request: carriers.Ticket_GetTicketSummariesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.TicketSummaryItem[] > {
|
|
3792
4146
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
3793
4147
|
base.WebApiBase.SetPending(options);
|
package/src/WorkflowAgent.ts
CHANGED
|
@@ -59,6 +59,7 @@ export interface IWorkflowAgent {
|
|
|
59
59
|
setStatusOnWorkflowAsync(emailFlowId: number, status: enums.WorkflowDefinitionStatus, webapi_options?:base.WebApiRequestOptions) : Promise< enums.WorkflowDefinitionStatus >;
|
|
60
60
|
copyEmailFlowAsync(request: carriers.Workflow_CopyEmailFlowRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
61
61
|
copyEmailFlowAsync(emailFlowId: number, newName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
62
|
+
getWorkflowFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >;
|
|
62
63
|
runAsync(webapi_options?:base.WebApiRequestOptions) : Promise< Date >;
|
|
63
64
|
sendEventAsync(request: carriers.Workflow_SendEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowEventResult >;
|
|
64
65
|
sendEventAsync(workflowEvent: carriers.WorkflowEvent, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WorkflowEventResult >;
|
|
@@ -910,6 +911,35 @@ export class WorkflowAgent extends base.WebApiBase implements IWorkflowAgent {
|
|
|
910
911
|
}
|
|
911
912
|
|
|
912
913
|
|
|
914
|
+
private async _getWorkflowFencingInfoAsync( options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo > {
|
|
915
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
916
|
+
base.WebApiBase.SetPending(options);
|
|
917
|
+
return new Promise< carriers.FencingInfo >(async (resolve, reject) => {
|
|
918
|
+
try {
|
|
919
|
+
config.baseURL = this._options.baseUrl;
|
|
920
|
+
const response = await this._axios.post("GetWorkflowFencingInfo", undefined , config);
|
|
921
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
922
|
+
const res : carriers.FencingInfo = converters.Create_FencingInfo_From( response.data );
|
|
923
|
+
resolve(res);
|
|
924
|
+
}
|
|
925
|
+
catch( err ) {
|
|
926
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
927
|
+
reject(err);
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Get the current Workflow fencing status for the tenant
|
|
935
|
+
* @returns Current fencing status including count, maximum, and warning state
|
|
936
|
+
*/
|
|
937
|
+
public async getWorkflowFencingInfoAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FencingInfo >
|
|
938
|
+
{
|
|
939
|
+
return this._getWorkflowFencingInfoAsync(webapi_options);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
|
|
913
943
|
private async _runAsync( options?:base.WebApiRequestOptions) : Promise< Date > {
|
|
914
944
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
915
945
|
base.WebApiBase.SetPending(options);
|