@superoffice/webapi 11.13.921 → 12.1.1412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Carriers.d.ts +836 -9
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +66 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +158 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +33 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +484 -18
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomObjectAgent.d.ts +137 -0
- package/dist/cjs/CustomObjectAgent.d.ts.map +1 -0
- package/dist/cjs/CustomObjectAgent.js +294 -0
- package/dist/cjs/CustomObjectAgent.js.map +1 -0
- package/dist/cjs/CustomerServiceAgent.d.ts +4 -3
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +3 -2
- package/dist/cjs/CustomerServiceAgent.js.map +1 -1
- package/dist/cjs/DashAgent.d.ts +7 -0
- package/dist/cjs/DashAgent.d.ts.map +1 -1
- package/dist/cjs/DashAgent.js +24 -0
- package/dist/cjs/DashAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +150 -30
- package/dist/cjs/EMailAgent.d.ts.map +1 -1
- package/dist/cjs/EMailAgent.js +260 -0
- package/dist/cjs/EMailAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +76 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +82 -2
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +7 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +24 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +25 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +60 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +10 -3
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +24 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +99 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +207 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/cjs/WebApi.d.ts +6 -0
- package/dist/cjs/WebApi.d.ts.map +1 -1
- package/dist/cjs/WebApi.js +10 -1
- package/dist/cjs/WebApi.js.map +1 -1
- package/dist/cjs/WorkflowAgent.d.ts +7 -0
- package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
- package/dist/cjs/WorkflowAgent.js +24 -0
- package/dist/cjs/WorkflowAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +836 -9
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +66 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +158 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +33 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +432 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomObjectAgent.d.ts +137 -0
- package/dist/esm/CustomObjectAgent.d.ts.map +1 -0
- package/dist/esm/CustomObjectAgent.js +289 -0
- package/dist/esm/CustomObjectAgent.js.map +1 -0
- package/dist/esm/CustomerServiceAgent.d.ts +4 -3
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +3 -2
- package/dist/esm/CustomerServiceAgent.js.map +1 -1
- package/dist/esm/DashAgent.d.ts +7 -0
- package/dist/esm/DashAgent.d.ts.map +1 -1
- package/dist/esm/DashAgent.js +24 -0
- package/dist/esm/DashAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +150 -30
- package/dist/esm/EMailAgent.d.ts.map +1 -1
- package/dist/esm/EMailAgent.js +260 -0
- package/dist/esm/EMailAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +76 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +80 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +7 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +24 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +25 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +60 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +10 -3
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +24 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +99 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +207 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/dist/esm/WebApi.d.ts +6 -0
- package/dist/esm/WebApi.d.ts.map +1 -1
- package/dist/esm/WebApi.js +9 -0
- package/dist/esm/WebApi.js.map +1 -1
- package/dist/esm/WorkflowAgent.d.ts +7 -0
- package/dist/esm/WorkflowAgent.d.ts.map +1 -1
- package/dist/esm/WorkflowAgent.js +24 -0
- package/dist/esm/WorkflowAgent.js.map +1 -1
- package/package.json +4 -4
- package/src/Carriers.ts +1119 -3
- package/src/ConfigurationAgent.ts +216 -0
- package/src/Converters.ts +524 -0
- package/src/CustomObjectAgent.ts +489 -0
- package/src/CustomerServiceAgent.ts +7 -5
- package/src/DashAgent.ts +30 -0
- package/src/EMailAgent.ts +470 -30
- package/src/Enums.ts +84 -0
- package/src/LicenseAgent.ts +30 -0
- package/src/ListAgent.ts +92 -0
- package/src/ProjectAgent.ts +33 -3
- package/src/TicketAgent.ts +354 -0
- package/src/WebApi.ts +12 -0
- package/src/WorkflowAgent.ts +30 -0
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/WebApi.ts
CHANGED
|
@@ -125,6 +125,8 @@ import { ITicketAgent, TicketAgent } from './TicketAgent';
|
|
|
125
125
|
export { TicketAgent };
|
|
126
126
|
import { IDatabaseTableAgent, DatabaseTableAgent } from './DatabaseTableAgent';
|
|
127
127
|
export { DatabaseTableAgent };
|
|
128
|
+
import { ICustomObjectAgent, CustomObjectAgent } from './CustomObjectAgent';
|
|
129
|
+
export { CustomObjectAgent };
|
|
128
130
|
import { IChatAgent, ChatAgent } from './ChatAgent';
|
|
129
131
|
export { ChatAgent };
|
|
130
132
|
import { IAIAgent, AIAgent } from './AIAgent';
|
|
@@ -289,6 +291,8 @@ export interface IAgentsApi extends base.WebApiBase {
|
|
|
289
291
|
getTicketAgent(resourceParsing?: base.ResourceParsing) : ITicketAgent;
|
|
290
292
|
/** Agent used for CRUD operations on database tables. Read, add, update, delete rows in tables. */
|
|
291
293
|
getDatabaseTableAgent(resourceParsing?: base.ResourceParsing) : IDatabaseTableAgent;
|
|
294
|
+
/** Agent for working with Custom Objects (extra tables): read schema and full CRUD over rows. Purpose-built replacement for using DatabaseTableAgent against custom objects. */
|
|
295
|
+
getCustomObjectAgent(resourceParsing?: base.ResourceParsing) : ICustomObjectAgent;
|
|
292
296
|
/** Chat functions. Manage chat channels, sessions and messages. */
|
|
293
297
|
getChatAgent(resourceParsing?: base.ResourceParsing) : IChatAgent;
|
|
294
298
|
/** AI services, such as Translation, Statistics, Sentiment analysis, backed by calls to Public Cloud providers */
|
|
@@ -835,6 +839,14 @@ export class WebApi extends base.WebApiBase implements IAgentsApi, IRestApi {
|
|
|
835
839
|
return new DatabaseTableAgent( options );
|
|
836
840
|
}
|
|
837
841
|
|
|
842
|
+
/** Agent for working with Custom Objects (extra tables): read schema and full CRUD over rows. Purpose-built replacement for using DatabaseTableAgent against custom objects. */
|
|
843
|
+
public getCustomObjectAgent(resourceParsing?: base.ResourceParsing) : ICustomObjectAgent {
|
|
844
|
+
const options = base.WebApiBase.FigureOutOptions(this._options);
|
|
845
|
+
if( typeof(resourceParsing) == "number" )
|
|
846
|
+
options.resourceParsing = resourceParsing;
|
|
847
|
+
return new CustomObjectAgent( options );
|
|
848
|
+
}
|
|
849
|
+
|
|
838
850
|
/** Chat functions. Manage chat channels, sessions and messages. */
|
|
839
851
|
public getChatAgent(resourceParsing?: base.ResourceParsing) : IChatAgent {
|
|
840
852
|
const options = base.WebApiBase.FigureOutOptions(this._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);
|