@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
@@ -33,6 +33,9 @@ export interface IConfigurationAgent {
33
33
  createDefaultDiaryViewEntityAsync(): Promise< carriers.DiaryViewEntity >;
34
34
  saveDiaryViewEntityAsync(entity: carriers.DiaryViewEntity) : Promise< carriers.DiaryViewEntity >;
35
35
  deleteDiaryViewEntityAsync(DiaryViewEntityId: number) : Promise<void>;
36
+ createDefaultLandingPageEntityAsync(): Promise< carriers.LandingPageEntity >;
37
+ saveLandingPageEntityAsync(entity: carriers.LandingPageEntity) : Promise< carriers.LandingPageEntity >;
38
+ deleteLandingPageEntityAsync(LandingPageEntityId: number) : Promise<void>;
36
39
  createDefaultSystemEventEntityAsync(): Promise< carriers.SystemEventEntity >;
37
40
  saveSystemEventEntityAsync(entity: carriers.SystemEventEntity) : Promise< carriers.SystemEventEntity >;
38
41
  deleteSystemEventEntityAsync(SystemEventEntityId: number) : Promise<void>;
@@ -89,6 +92,11 @@ export interface IConfigurationAgent {
89
92
  getAllFeatureTogglesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringBoolDictionary >;
90
93
  getCsCgiUrlAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string >;
91
94
  getDiaryViewEntityAsync(diaryViewEntityId: number) : Promise< carriers.DiaryViewEntity >;
95
+ getLandingPageEntityAsync(landingPageEntityId: number) : Promise< carriers.LandingPageEntity >;
96
+ getLandingPageAsync(request: carriers.Configuration_GetLandingPageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity >;
97
+ getLandingPageAsync(associateId: number, tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity >;
98
+ setLandingPagePinForAssociateAsync(request: carriers.Configuration_SetLandingPagePinForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
99
+ setLandingPagePinForAssociateAsync(pin: boolean, associateId: number, entityTableName: string, pinTableName: string, recordId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
92
100
  getSystemEventEntityAsync(systemEventEntityId: number) : Promise< carriers.SystemEventEntity >;
93
101
  existsSystemEventAsync(request: carriers.Configuration_ExistsSystemEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
94
102
  existsSystemEventAsync(key: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
@@ -268,6 +276,73 @@ export class ConfigurationAgent extends base.WebApiBase implements IConfiguratio
268
276
  });
269
277
  }
270
278
 
279
+ /**
280
+ * Set default values into a new LandingPageEntity.
281
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
282
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
283
+ * @returns A blank entity.
284
+ */
285
+ public async createDefaultLandingPageEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity > {
286
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
287
+ base.WebApiBase.SetPending(options);
288
+ return new Promise< carriers.LandingPageEntity >(async (resolve, reject) => {
289
+ try {
290
+ const response = await this._axios.post("CreateDefaultLandingPageEntity", null, config);
291
+ base.WebApiBase.SetCompleted(options, response);
292
+ const res : carriers.LandingPageEntity = converters.Create_LandingPageEntity_From( response.data );
293
+ resolve(res);
294
+ }
295
+ catch( err ) {
296
+ base.WebApiBase.HandleError(options, config, err);
297
+ reject(err);
298
+ }
299
+ });
300
+ }
301
+ /**
302
+ * Replace the existing LandingPageEntity or creates a new LandingPageEntity if the id parameter is empty
303
+ * @param entity - The LandingPageEntity to be saved.
304
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
305
+ * @returns New or updated LandingPageEntity
306
+ */
307
+ public async saveLandingPageEntityAsync(entity: carriers.LandingPageEntity, options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity > {
308
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
309
+ base.WebApiBase.SetPending(options);
310
+ return new Promise< carriers.LandingPageEntity >(async (resolve, reject) => {
311
+ try {
312
+ const response = await this._axios.post("SaveLandingPageEntity", entity, config);
313
+ base.WebApiBase.SetCompleted(options, response);
314
+ const res : carriers.LandingPageEntity = converters.Create_LandingPageEntity_From( response.data );
315
+ resolve(res);
316
+ }
317
+ catch( err ) {
318
+ base.WebApiBase.HandleError(options, config, err);
319
+ reject(err);
320
+ }
321
+ });
322
+ }
323
+
324
+ /**
325
+ * Deletes the LandingPageEntity
326
+ * @param LandingPageEntityId - The id of the LandingPageEntity to be deleted.
327
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
328
+ */
329
+ public async deleteLandingPageEntityAsync(LandingPageEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
330
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
331
+ base.WebApiBase.SetPending(options);
332
+ return new Promise< void >(async (resolve, reject) => {
333
+ try {
334
+ const response = await this._axios.post("DeleteLandingPageEntity?LandingPageEntityId=" + LandingPageEntityId, null, config );
335
+ base.WebApiBase.SetCompleted(options, response);
336
+ const res = response.data;
337
+ resolve(res);
338
+ }
339
+ catch( err ) {
340
+ base.WebApiBase.HandleError(options, config, err);
341
+ reject(err);
342
+ }
343
+ });
344
+ }
345
+
271
346
  /**
272
347
  * Set default values into a new SystemEventEntity.
273
348
  * NetServer calculates default values on the entity, which is required when creating/storing a new instance
@@ -1831,6 +1906,147 @@ export class ConfigurationAgent extends base.WebApiBase implements IConfiguratio
1831
1906
  });
1832
1907
  }
1833
1908
 
1909
+ /**
1910
+ * Gets a LandingPageEntity object.
1911
+ * @param landingPageEntityId - The primary key.
1912
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1913
+ * @returns A single LandingPageEntity
1914
+ */
1915
+ public async getLandingPageEntityAsync(landingPageEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity > {
1916
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1917
+ base.WebApiBase.SetPending(options);
1918
+ return new Promise< carriers.LandingPageEntity >(async (resolve, reject) => {
1919
+ try {
1920
+ const response = await this._axios.post("GetLandingPageEntity?landingPageEntityId=" + landingPageEntityId, null, config);
1921
+ base.WebApiBase.SetCompleted(options, response);
1922
+ const res = converters.Create_LandingPageEntity_From( response.data );
1923
+ resolve(res);
1924
+ }
1925
+ catch( err ) {
1926
+ base.WebApiBase.HandleError(options, config, err);
1927
+ reject(err);
1928
+ }
1929
+ });
1930
+ }
1931
+
1932
+
1933
+ private async _getLandingPageAsync(request: carriers.Configuration_GetLandingPageRequest, options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity > {
1934
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1935
+ base.WebApiBase.SetPending(options);
1936
+ return new Promise< carriers.LandingPageEntity >(async (resolve, reject) => {
1937
+ try {
1938
+ config.baseURL = this._options.baseUrl;
1939
+ const response = await this._axios.post("GetLandingPage", request , config);
1940
+ base.WebApiBase.SetCompleted(options, response);
1941
+ const res : carriers.LandingPageEntity = converters.Create_LandingPageEntity_From( response.data );
1942
+ resolve(res);
1943
+ }
1944
+ catch( err ) {
1945
+ base.WebApiBase.HandleError(options, config, err);
1946
+ reject(err);
1947
+ }
1948
+ });
1949
+ }
1950
+
1951
+
1952
+
1953
+ /**
1954
+ * Get the landing page configuration for an associate and entity table. Creates the landing page row if it does not exist.
1955
+ * @param request - AssociateId, TableName
1956
+ * @returns The landing page for the given associate and entity table.
1957
+ */
1958
+ public async getLandingPageAsync(request: carriers.Configuration_GetLandingPageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity >;
1959
+
1960
+ /**
1961
+ * Get the landing page configuration for an associate and entity table. Creates the landing page row if it does not exist.
1962
+ * @param associateId - Id of the associate.
1963
+ * @param tableName - Entity table name (contact, person, sale, ...), transformed to and from the numeric table number by the service layer.
1964
+ * @returns The landing page for the given associate and entity table.
1965
+ */
1966
+ public async getLandingPageAsync(associateId: number, tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity >;
1967
+
1968
+ public async getLandingPageAsync(associateId:number|carriers.Configuration_GetLandingPageRequest, tableName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.LandingPageEntity > {
1969
+ let _request : carriers.Configuration_GetLandingPageRequest = null;
1970
+ let _options : base.WebApiRequestOptions = null;
1971
+ const first : any = associateId;
1972
+ if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.tableName)!='undefined' ) )
1973
+ {
1974
+ _request = associateId as carriers.Configuration_GetLandingPageRequest;
1975
+ _options = tableName as base.WebApiRequestOptions;
1976
+ }
1977
+ else
1978
+ {
1979
+ _request = {
1980
+ associateId: associateId as number,
1981
+ tableName: tableName as string,
1982
+ };
1983
+ _options = webapi_options;
1984
+ }
1985
+ return this._getLandingPageAsync( _request, _options );
1986
+ }
1987
+
1988
+
1989
+ private async _setLandingPagePinForAssociateAsync(request: carriers.Configuration_SetLandingPagePinForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1990
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1991
+ base.WebApiBase.SetPending(options);
1992
+ return new Promise< void >(async (resolve, reject) => {
1993
+ try {
1994
+ config.baseURL = this._options.baseUrl;
1995
+ const response = await this._axios.post("SetLandingPagePinForAssociate", request , config);
1996
+ base.WebApiBase.SetCompleted(options, response);
1997
+ const res = response.data;
1998
+ resolve(res);
1999
+ }
2000
+ catch( err ) {
2001
+ base.WebApiBase.HandleError(options, config, err);
2002
+ reject(err);
2003
+ }
2004
+ });
2005
+ }
2006
+
2007
+
2008
+
2009
+ /**
2010
+ * Pin or unpin an entity or selection on the landing page identified by associate and entity table. Creates the landing page row if it does not exist.
2011
+ * @param request - Pin, AssociateId, EntityTableName, PinTableName, RecordId
2012
+ * @returns This method has no return value
2013
+ */
2014
+ public async setLandingPagePinForAssociateAsync(request: carriers.Configuration_SetLandingPagePinForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2015
+
2016
+ /**
2017
+ * Pin or unpin an entity or selection on the landing page identified by associate and entity table. Creates the landing page row if it does not exist.
2018
+ * @param pin - True to pin the item, false to unpin it.
2019
+ * @param associateId - Id of the associate that owns the landing page.
2020
+ * @param entityTableName - Entity table name identifying which landing page (contact, person, sale, ...).
2021
+ * @param pinTableName - Table name of the record being pinned (selection, contact, person, sale, ...).
2022
+ * @param recordId - Id of the record to pin or unpin.
2023
+ * @returns This method has no return value
2024
+ */
2025
+ public async setLandingPagePinForAssociateAsync(pin: boolean, associateId: number, entityTableName: string, pinTableName: string, recordId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2026
+
2027
+ public async setLandingPagePinForAssociateAsync(pin:boolean|carriers.Configuration_SetLandingPagePinForAssociateRequest, associateId?:number|base.WebApiRequestOptions, entityTableName?:string, pinTableName?:string, recordId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
2028
+ let _request : carriers.Configuration_SetLandingPagePinForAssociateRequest = null;
2029
+ let _options : base.WebApiRequestOptions = null;
2030
+ const first : any = pin;
2031
+ if( typeof( first ) === "object" && first && ( typeof(first.pin)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.entityTableName)!='undefined' || typeof(first.pinTableName)!='undefined' || typeof(first.recordId)!='undefined' ) )
2032
+ {
2033
+ _request = pin as carriers.Configuration_SetLandingPagePinForAssociateRequest;
2034
+ _options = associateId as base.WebApiRequestOptions;
2035
+ }
2036
+ else
2037
+ {
2038
+ _request = {
2039
+ pin: pin as boolean,
2040
+ associateId: associateId as number,
2041
+ entityTableName: entityTableName as string,
2042
+ pinTableName: pinTableName as string,
2043
+ recordId: recordId as number,
2044
+ };
2045
+ _options = webapi_options;
2046
+ }
2047
+ return this._setLandingPagePinForAssociateAsync( _request, _options );
2048
+ }
2049
+
1834
2050
  /**
1835
2051
  * Gets a SystemEventEntity object.
1836
2052
  * @param systemEventEntityId - The primary key.
@@ -79,6 +79,8 @@ export interface IContactAgent {
79
79
  validateContactEntityAsync(contactEntity: carriers.ContactEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
80
80
  enrichContactEntityAsync(request: carriers.Contact_EnrichContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
81
81
  enrichContactEntityAsync(contactEntity: carriers.ContactEntity, enrichId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
82
+ updateInterestsAsync(request: carriers.Contact_UpdateInterestsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
83
+ updateInterestsAsync(contactId: number, enableInterestIds: number[], disableInterestIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
82
84
  getContactListAsync(contactIds: number[]) : Promise< carriers.Contact[] >;
83
85
  getMyContactsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
84
86
  getMyRecentContactsAsync(request: carriers.Contact_GetMyRecentContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
@@ -1537,6 +1539,64 @@ export class ContactAgent extends base.WebApiBase implements IContactAgent {
1537
1539
  return this._enrichContactEntityAsync( _request, _options );
1538
1540
  }
1539
1541
 
1542
+
1543
+ private async _updateInterestsAsync(request: carriers.Contact_UpdateInterestsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1544
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1545
+ base.WebApiBase.SetPending(options);
1546
+ return new Promise< void >(async (resolve, reject) => {
1547
+ try {
1548
+ config.baseURL = this._options.baseUrl;
1549
+ const response = await this._axios.post("UpdateInterests", request , config);
1550
+ base.WebApiBase.SetCompleted(options, response);
1551
+ const res = response.data;
1552
+ resolve(res);
1553
+ }
1554
+ catch( err ) {
1555
+ base.WebApiBase.HandleError(options, config, err);
1556
+ reject(err);
1557
+ }
1558
+ });
1559
+ }
1560
+
1561
+
1562
+
1563
+ /**
1564
+ * Update interests on contact. Will throw exception if id is in both arrays
1565
+ * @param request - ContactId, EnableInterestIds, DisableInterestIds
1566
+ * @returns This method has no return value
1567
+ */
1568
+ public async updateInterestsAsync(request: carriers.Contact_UpdateInterestsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1569
+
1570
+ /**
1571
+ * Update interests on contact. Will throw exception if id is in both arrays
1572
+ * @param contactId - Contact id to update interests for
1573
+ * @param enableInterestIds - The interest ids to set on the contact. This will set these interests to true and not touch any other interests.
1574
+ * @param disableInterestIds - The interest ids to diable on the contact. This will set these interests to false and not touch any other interests.
1575
+ * @returns This method has no return value
1576
+ */
1577
+ public async updateInterestsAsync(contactId: number, enableInterestIds: number[], disableInterestIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1578
+
1579
+ public async updateInterestsAsync(contactId:number|carriers.Contact_UpdateInterestsRequest, enableInterestIds?:number[]|base.WebApiRequestOptions, disableInterestIds?:number[], webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1580
+ let _request : carriers.Contact_UpdateInterestsRequest = null;
1581
+ let _options : base.WebApiRequestOptions = null;
1582
+ const first : any = contactId;
1583
+ if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.enableInterestIds)!='undefined' || typeof(first.disableInterestIds)!='undefined' ) )
1584
+ {
1585
+ _request = contactId as carriers.Contact_UpdateInterestsRequest;
1586
+ _options = enableInterestIds as base.WebApiRequestOptions;
1587
+ }
1588
+ else
1589
+ {
1590
+ _request = {
1591
+ contactId: contactId as number,
1592
+ enableInterestIds: enableInterestIds as number[],
1593
+ disableInterestIds: disableInterestIds as number[],
1594
+ };
1595
+ _options = webapi_options;
1596
+ }
1597
+ return this._updateInterestsAsync( _request, _options );
1598
+ }
1599
+
1540
1600
  /**
1541
1601
  * Gets an array of Contact objects.
1542
1602
  * @param contactIds - The primary keys.