@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.
Files changed (150) hide show
  1. package/dist/cjs/AIAgent.d.ts +19 -0
  2. package/dist/cjs/AIAgent.d.ts.map +1 -1
  3. package/dist/cjs/AIAgent.js +37 -0
  4. package/dist/cjs/AIAgent.js.map +1 -1
  5. package/dist/cjs/Carriers.d.ts +759 -5
  6. package/dist/cjs/Carriers.d.ts.map +1 -1
  7. package/dist/cjs/ConfigurationAgent.d.ts +66 -0
  8. package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
  9. package/dist/cjs/ConfigurationAgent.js +158 -0
  10. package/dist/cjs/ConfigurationAgent.js.map +1 -1
  11. package/dist/cjs/ContactAgent.d.ts +17 -0
  12. package/dist/cjs/ContactAgent.d.ts.map +1 -1
  13. package/dist/cjs/ContactAgent.js +35 -0
  14. package/dist/cjs/ContactAgent.js.map +1 -1
  15. package/dist/cjs/Converters.d.ts +27 -0
  16. package/dist/cjs/Converters.d.ts.map +1 -1
  17. package/dist/cjs/Converters.js +388 -18
  18. package/dist/cjs/Converters.js.map +1 -1
  19. package/dist/cjs/DashAgent.d.ts +7 -0
  20. package/dist/cjs/DashAgent.d.ts.map +1 -1
  21. package/dist/cjs/DashAgent.js +24 -0
  22. package/dist/cjs/DashAgent.js.map +1 -1
  23. package/dist/cjs/DiagnosticsAgent.d.ts +15 -0
  24. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  25. package/dist/cjs/DiagnosticsAgent.js +33 -0
  26. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  27. package/dist/cjs/EMailAgent.d.ts +150 -30
  28. package/dist/cjs/EMailAgent.d.ts.map +1 -1
  29. package/dist/cjs/EMailAgent.js +260 -0
  30. package/dist/cjs/EMailAgent.js.map +1 -1
  31. package/dist/cjs/Enums.d.ts +59 -0
  32. package/dist/cjs/Enums.d.ts.map +1 -1
  33. package/dist/cjs/Enums.js +64 -2
  34. package/dist/cjs/Enums.js.map +1 -1
  35. package/dist/cjs/LicenseAgent.d.ts +7 -0
  36. package/dist/cjs/LicenseAgent.d.ts.map +1 -1
  37. package/dist/cjs/LicenseAgent.js +24 -0
  38. package/dist/cjs/LicenseAgent.js.map +1 -1
  39. package/dist/cjs/ListAgent.d.ts +18 -0
  40. package/dist/cjs/ListAgent.d.ts.map +1 -1
  41. package/dist/cjs/ListAgent.js +36 -0
  42. package/dist/cjs/ListAgent.js.map +1 -1
  43. package/dist/cjs/PersonAgent.d.ts +17 -0
  44. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  45. package/dist/cjs/PersonAgent.js +35 -0
  46. package/dist/cjs/PersonAgent.js.map +1 -1
  47. package/dist/cjs/PreferenceAgent.d.ts +22 -0
  48. package/dist/cjs/PreferenceAgent.d.ts.map +1 -1
  49. package/dist/cjs/PreferenceAgent.js +57 -0
  50. package/dist/cjs/PreferenceAgent.js.map +1 -1
  51. package/dist/cjs/ProjectAgent.d.ts +7 -0
  52. package/dist/cjs/ProjectAgent.d.ts.map +1 -1
  53. package/dist/cjs/ProjectAgent.js +24 -0
  54. package/dist/cjs/ProjectAgent.js.map +1 -1
  55. package/dist/cjs/TicketAgent.d.ts +130 -0
  56. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  57. package/dist/cjs/TicketAgent.js +274 -0
  58. package/dist/cjs/TicketAgent.js.map +1 -1
  59. package/dist/cjs/UserAgent.d.ts +19 -0
  60. package/dist/cjs/UserAgent.d.ts.map +1 -1
  61. package/dist/cjs/UserAgent.js +37 -0
  62. package/dist/cjs/UserAgent.js.map +1 -1
  63. package/dist/cjs/WorkflowAgent.d.ts +7 -0
  64. package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
  65. package/dist/cjs/WorkflowAgent.js +24 -0
  66. package/dist/cjs/WorkflowAgent.js.map +1 -1
  67. package/dist/esm/AIAgent.d.ts +19 -0
  68. package/dist/esm/AIAgent.d.ts.map +1 -1
  69. package/dist/esm/AIAgent.js +37 -0
  70. package/dist/esm/AIAgent.js.map +1 -1
  71. package/dist/esm/Carriers.d.ts +759 -5
  72. package/dist/esm/Carriers.d.ts.map +1 -1
  73. package/dist/esm/ConfigurationAgent.d.ts +66 -0
  74. package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
  75. package/dist/esm/ConfigurationAgent.js +158 -0
  76. package/dist/esm/ConfigurationAgent.js.map +1 -1
  77. package/dist/esm/ContactAgent.d.ts +17 -0
  78. package/dist/esm/ContactAgent.d.ts.map +1 -1
  79. package/dist/esm/ContactAgent.js +35 -0
  80. package/dist/esm/ContactAgent.js.map +1 -1
  81. package/dist/esm/Converters.d.ts +27 -0
  82. package/dist/esm/Converters.d.ts.map +1 -1
  83. package/dist/esm/Converters.js +343 -0
  84. package/dist/esm/Converters.js.map +1 -1
  85. package/dist/esm/DashAgent.d.ts +7 -0
  86. package/dist/esm/DashAgent.d.ts.map +1 -1
  87. package/dist/esm/DashAgent.js +24 -0
  88. package/dist/esm/DashAgent.js.map +1 -1
  89. package/dist/esm/DiagnosticsAgent.d.ts +15 -0
  90. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  91. package/dist/esm/DiagnosticsAgent.js +33 -0
  92. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  93. package/dist/esm/EMailAgent.d.ts +150 -30
  94. package/dist/esm/EMailAgent.d.ts.map +1 -1
  95. package/dist/esm/EMailAgent.js +260 -0
  96. package/dist/esm/EMailAgent.js.map +1 -1
  97. package/dist/esm/Enums.d.ts +59 -0
  98. package/dist/esm/Enums.d.ts.map +1 -1
  99. package/dist/esm/Enums.js +62 -0
  100. package/dist/esm/Enums.js.map +1 -1
  101. package/dist/esm/LicenseAgent.d.ts +7 -0
  102. package/dist/esm/LicenseAgent.d.ts.map +1 -1
  103. package/dist/esm/LicenseAgent.js +24 -0
  104. package/dist/esm/LicenseAgent.js.map +1 -1
  105. package/dist/esm/ListAgent.d.ts +18 -0
  106. package/dist/esm/ListAgent.d.ts.map +1 -1
  107. package/dist/esm/ListAgent.js +36 -0
  108. package/dist/esm/ListAgent.js.map +1 -1
  109. package/dist/esm/PersonAgent.d.ts +17 -0
  110. package/dist/esm/PersonAgent.d.ts.map +1 -1
  111. package/dist/esm/PersonAgent.js +35 -0
  112. package/dist/esm/PersonAgent.js.map +1 -1
  113. package/dist/esm/PreferenceAgent.d.ts +22 -0
  114. package/dist/esm/PreferenceAgent.d.ts.map +1 -1
  115. package/dist/esm/PreferenceAgent.js +57 -0
  116. package/dist/esm/PreferenceAgent.js.map +1 -1
  117. package/dist/esm/ProjectAgent.d.ts +7 -0
  118. package/dist/esm/ProjectAgent.d.ts.map +1 -1
  119. package/dist/esm/ProjectAgent.js +24 -0
  120. package/dist/esm/ProjectAgent.js.map +1 -1
  121. package/dist/esm/TicketAgent.d.ts +130 -0
  122. package/dist/esm/TicketAgent.d.ts.map +1 -1
  123. package/dist/esm/TicketAgent.js +274 -0
  124. package/dist/esm/TicketAgent.js.map +1 -1
  125. package/dist/esm/UserAgent.d.ts +19 -0
  126. package/dist/esm/UserAgent.d.ts.map +1 -1
  127. package/dist/esm/UserAgent.js +37 -0
  128. package/dist/esm/UserAgent.js.map +1 -1
  129. package/dist/esm/WorkflowAgent.d.ts +7 -0
  130. package/dist/esm/WorkflowAgent.d.ts.map +1 -1
  131. package/dist/esm/WorkflowAgent.js +24 -0
  132. package/dist/esm/WorkflowAgent.js.map +1 -1
  133. package/package.json +4 -4
  134. package/src/AIAgent.ts +64 -0
  135. package/src/Carriers.ts +1002 -5
  136. package/src/ConfigurationAgent.ts +216 -0
  137. package/src/ContactAgent.ts +60 -0
  138. package/src/Converters.ts +417 -0
  139. package/src/DashAgent.ts +30 -0
  140. package/src/DiagnosticsAgent.ts +56 -0
  141. package/src/EMailAgent.ts +470 -30
  142. package/src/Enums.ts +65 -0
  143. package/src/LicenseAgent.ts +30 -0
  144. package/src/ListAgent.ts +62 -0
  145. package/src/PersonAgent.ts +60 -0
  146. package/src/PreferenceAgent.ts +86 -0
  147. package/src/ProjectAgent.ts +30 -0
  148. package/src/TicketAgent.ts +468 -0
  149. package/src/UserAgent.ts +64 -0
  150. 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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.