@superoffice/webapi 11.12.675 → 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/AIAgent.d.ts +19 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +37 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +759 -5
- 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/ContactAgent.d.ts +17 -0
- package/dist/cjs/ContactAgent.d.ts.map +1 -1
- package/dist/cjs/ContactAgent.js +35 -0
- package/dist/cjs/ContactAgent.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 +388 -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/DiagnosticsAgent.d.ts +15 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +33 -0
- package/dist/cjs/DiagnosticsAgent.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 +59 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +64 -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/PersonAgent.d.ts +17 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +35 -0
- package/dist/cjs/PersonAgent.js.map +1 -1
- package/dist/cjs/PreferenceAgent.d.ts +22 -0
- package/dist/cjs/PreferenceAgent.d.ts.map +1 -1
- package/dist/cjs/PreferenceAgent.js +57 -0
- package/dist/cjs/PreferenceAgent.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 +130 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +274 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/cjs/UserAgent.d.ts +19 -0
- package/dist/cjs/UserAgent.d.ts.map +1 -1
- package/dist/cjs/UserAgent.js +37 -0
- package/dist/cjs/UserAgent.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/AIAgent.d.ts +19 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +37 -0
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +759 -5
- 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/ContactAgent.d.ts +17 -0
- package/dist/esm/ContactAgent.d.ts.map +1 -1
- package/dist/esm/ContactAgent.js +35 -0
- package/dist/esm/ContactAgent.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 +343 -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/DiagnosticsAgent.d.ts +15 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +33 -0
- package/dist/esm/DiagnosticsAgent.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 +59 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +62 -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/PersonAgent.d.ts +17 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +35 -0
- package/dist/esm/PersonAgent.js.map +1 -1
- package/dist/esm/PreferenceAgent.d.ts +22 -0
- package/dist/esm/PreferenceAgent.d.ts.map +1 -1
- package/dist/esm/PreferenceAgent.js +57 -0
- package/dist/esm/PreferenceAgent.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 +130 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +274 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/dist/esm/UserAgent.d.ts +19 -0
- package/dist/esm/UserAgent.d.ts.map +1 -1
- package/dist/esm/UserAgent.js +37 -0
- package/dist/esm/UserAgent.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/AIAgent.ts +64 -0
- package/src/Carriers.ts +1002 -5
- package/src/ConfigurationAgent.ts +216 -0
- package/src/ContactAgent.ts +60 -0
- package/src/Converters.ts +417 -0
- package/src/DashAgent.ts +30 -0
- package/src/DiagnosticsAgent.ts +56 -0
- package/src/EMailAgent.ts +470 -30
- package/src/Enums.ts +65 -0
- package/src/LicenseAgent.ts +30 -0
- package/src/ListAgent.ts +62 -0
- package/src/PersonAgent.ts +60 -0
- package/src/PreferenceAgent.ts +86 -0
- package/src/ProjectAgent.ts +30 -0
- package/src/TicketAgent.ts +468 -0
- package/src/UserAgent.ts +64 -0
- package/src/WorkflowAgent.ts +30 -0
package/src/Enums.ts
CHANGED
|
@@ -2330,6 +2330,10 @@
|
|
|
2330
2330
|
* 5: Request has been merged with another request
|
|
2331
2331
|
*/
|
|
2332
2332
|
Merged = "Merged",
|
|
2333
|
+
/**
|
|
2334
|
+
* 6: Request has been marked as spam
|
|
2335
|
+
*/
|
|
2336
|
+
Spam = "Spam",
|
|
2333
2337
|
/**
|
|
2334
2338
|
* 1001: Should only be used for UI, when saved to DB it will be converted to Postponed
|
|
2335
2339
|
*/
|
|
@@ -4743,6 +4747,48 @@
|
|
|
4743
4747
|
}
|
|
4744
4748
|
|
|
4745
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
|
+
|
|
4746
4792
|
/**
|
|
4747
4793
|
* Command action
|
|
4748
4794
|
*/
|
|
@@ -6647,6 +6693,25 @@
|
|
|
6647
6693
|
}
|
|
6648
6694
|
|
|
6649
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
|
+
|
|
6650
6715
|
/**
|
|
6651
6716
|
* Value for field 'Type' in table 'notify'. Defines the notification type.
|
|
6652
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/PersonAgent.ts
CHANGED
|
@@ -119,6 +119,8 @@ export interface IPersonAgent {
|
|
|
119
119
|
getUtmParametersAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
|
|
120
120
|
setUtmCreatedPersonContactForFormSubmissionAsync(request: carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
121
121
|
setUtmCreatedPersonContactForFormSubmissionAsync(formSubmissionId: number, personId: number, contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
122
|
+
updateInterestsAsync(request: carriers.Person_UpdateInterestsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
123
|
+
updateInterestsAsync(personId: number, enableInterestIds: number[], disableInterestIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
122
124
|
getPersonListAsync(personIds: number[]) : Promise< carriers.Person[] >;
|
|
123
125
|
getPersonsFromContactAsync(request: carriers.Person_GetPersonsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
|
|
124
126
|
getPersonsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
|
|
@@ -2763,6 +2765,64 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
|
|
|
2763
2765
|
return this._setUtmCreatedPersonContactForFormSubmissionAsync( _request, _options );
|
|
2764
2766
|
}
|
|
2765
2767
|
|
|
2768
|
+
|
|
2769
|
+
private async _updateInterestsAsync(request: carriers.Person_UpdateInterestsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2770
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2771
|
+
base.WebApiBase.SetPending(options);
|
|
2772
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2773
|
+
try {
|
|
2774
|
+
config.baseURL = this._options.baseUrl;
|
|
2775
|
+
const response = await this._axios.post("UpdateInterests", request , config);
|
|
2776
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2777
|
+
const res = response.data;
|
|
2778
|
+
resolve(res);
|
|
2779
|
+
}
|
|
2780
|
+
catch( err ) {
|
|
2781
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2782
|
+
reject(err);
|
|
2783
|
+
}
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Update interests on person. Will throw exception if id is in both arrays
|
|
2791
|
+
* @param request - PersonId, EnableInterestIds, DisableInterestIds
|
|
2792
|
+
* @returns This method has no return value
|
|
2793
|
+
*/
|
|
2794
|
+
public async updateInterestsAsync(request: carriers.Person_UpdateInterestsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2795
|
+
|
|
2796
|
+
/**
|
|
2797
|
+
* Update interests on person. Will throw exception if id is in both arrays
|
|
2798
|
+
* @param personId - Person id to update interests for
|
|
2799
|
+
* @param enableInterestIds - The interest ids to set on the person. This will set these interests to true and not touch any other interests.
|
|
2800
|
+
* @param disableInterestIds - The interest ids to diable on the person. This will set these interests to false and not touch any other interests.
|
|
2801
|
+
* @returns This method has no return value
|
|
2802
|
+
*/
|
|
2803
|
+
public async updateInterestsAsync(personId: number, enableInterestIds: number[], disableInterestIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2804
|
+
|
|
2805
|
+
public async updateInterestsAsync(personId:number|carriers.Person_UpdateInterestsRequest, enableInterestIds?:number[]|base.WebApiRequestOptions, disableInterestIds?:number[], webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2806
|
+
let _request : carriers.Person_UpdateInterestsRequest = null;
|
|
2807
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2808
|
+
const first : any = personId;
|
|
2809
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' || typeof(first.enableInterestIds)!='undefined' || typeof(first.disableInterestIds)!='undefined' ) )
|
|
2810
|
+
{
|
|
2811
|
+
_request = personId as carriers.Person_UpdateInterestsRequest;
|
|
2812
|
+
_options = enableInterestIds as base.WebApiRequestOptions;
|
|
2813
|
+
}
|
|
2814
|
+
else
|
|
2815
|
+
{
|
|
2816
|
+
_request = {
|
|
2817
|
+
personId: personId as number,
|
|
2818
|
+
enableInterestIds: enableInterestIds as number[],
|
|
2819
|
+
disableInterestIds: disableInterestIds as number[],
|
|
2820
|
+
};
|
|
2821
|
+
_options = webapi_options;
|
|
2822
|
+
}
|
|
2823
|
+
return this._updateInterestsAsync( _request, _options );
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2766
2826
|
/**
|
|
2767
2827
|
* Gets an array of Person objects.
|
|
2768
2828
|
* @param personIds - The primary keys.
|
package/src/PreferenceAgent.ts
CHANGED
|
@@ -59,6 +59,9 @@ export interface IPreferenceAgent {
|
|
|
59
59
|
getXsrfPathsAsync(hostname: string, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
60
60
|
setXsrfPathsAsync(request: carriers.Preference_SetXsrfPathsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
61
61
|
setXsrfPathsAsync(hostname: string, paths: string[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
62
|
+
getXsrfValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.XsrfValue >;
|
|
63
|
+
setXsrfValueAsync(request: carriers.Preference_SetXsrfValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
64
|
+
setXsrfValueAsync(xsrfValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
62
65
|
getPreferenceDescriptionAsync(preferenceDescriptionId: number) : Promise< carriers.PreferenceDescription >;
|
|
63
66
|
getFromSectionAndKeyAsync(request: carriers.Preference_GetFromSectionAndKeyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreferenceDescription >;
|
|
64
67
|
getFromSectionAndKeyAsync(section: string, key: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreferenceDescription >;
|
|
@@ -969,6 +972,89 @@ export class PreferenceAgent extends base.WebApiBase implements IPreferenceAgent
|
|
|
969
972
|
return this._setXsrfPathsAsync( _request, _options );
|
|
970
973
|
}
|
|
971
974
|
|
|
975
|
+
|
|
976
|
+
private async _getXsrfValueAsync( options?:base.WebApiRequestOptions) : Promise< carriers.XsrfValue > {
|
|
977
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
978
|
+
base.WebApiBase.SetPending(options);
|
|
979
|
+
return new Promise< carriers.XsrfValue >(async (resolve, reject) => {
|
|
980
|
+
try {
|
|
981
|
+
config.baseURL = this._options.baseUrl;
|
|
982
|
+
const response = await this._axios.post("GetXsrfValue", undefined , config);
|
|
983
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
984
|
+
const res : carriers.XsrfValue = converters.Create_XsrfValue_From( response.data );
|
|
985
|
+
resolve(res);
|
|
986
|
+
}
|
|
987
|
+
catch( err ) {
|
|
988
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
989
|
+
reject(err);
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Returns the XSRF token value and last update time for the current user
|
|
997
|
+
* @returns The XSRF token value and timestamp
|
|
998
|
+
*/
|
|
999
|
+
public async getXsrfValueAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.XsrfValue >
|
|
1000
|
+
{
|
|
1001
|
+
return this._getXsrfValueAsync(webapi_options);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
private async _setXsrfValueAsync(request: carriers.Preference_SetXsrfValueRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1006
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1007
|
+
base.WebApiBase.SetPending(options);
|
|
1008
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1009
|
+
try {
|
|
1010
|
+
config.baseURL = this._options.baseUrl;
|
|
1011
|
+
const response = await this._axios.post("SetXsrfValue", request , config);
|
|
1012
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1013
|
+
const res = response.data;
|
|
1014
|
+
resolve(res);
|
|
1015
|
+
}
|
|
1016
|
+
catch( err ) {
|
|
1017
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1018
|
+
reject(err);
|
|
1019
|
+
}
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Sets the XSRF token value for the current user
|
|
1027
|
+
* @param request - XsrfValue
|
|
1028
|
+
* @returns This method has no return value
|
|
1029
|
+
*/
|
|
1030
|
+
public async setXsrfValueAsync(request: carriers.Preference_SetXsrfValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Sets the XSRF token value for the current user
|
|
1034
|
+
* @param xsrfValue - The XSRF value to store
|
|
1035
|
+
* @returns This method has no return value
|
|
1036
|
+
*/
|
|
1037
|
+
public async setXsrfValueAsync(xsrfValue: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1038
|
+
|
|
1039
|
+
public async setXsrfValueAsync(xsrfValue:string|carriers.Preference_SetXsrfValueRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1040
|
+
let _request : carriers.Preference_SetXsrfValueRequest = null;
|
|
1041
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1042
|
+
const first : any = xsrfValue;
|
|
1043
|
+
if( typeof( first ) === "object" && first && ( typeof(first.xsrfValue)!='undefined' ) )
|
|
1044
|
+
{
|
|
1045
|
+
_request = xsrfValue as carriers.Preference_SetXsrfValueRequest;
|
|
1046
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1047
|
+
}
|
|
1048
|
+
else
|
|
1049
|
+
{
|
|
1050
|
+
_request = {
|
|
1051
|
+
xsrfValue: xsrfValue as string,
|
|
1052
|
+
};
|
|
1053
|
+
_options = webapi_options;
|
|
1054
|
+
}
|
|
1055
|
+
return this._setXsrfValueAsync( _request, _options );
|
|
1056
|
+
}
|
|
1057
|
+
|
|
972
1058
|
/**
|
|
973
1059
|
* Gets a PreferenceDescription object.
|
|
974
1060
|
* @param preferenceDescriptionId - 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.
|