@superoffice/webapi 11.11.589 → 11.13.921

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 (87) 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 +196 -3
  6. package/dist/cjs/Carriers.d.ts.map +1 -1
  7. package/dist/cjs/ContactAgent.d.ts +17 -0
  8. package/dist/cjs/ContactAgent.d.ts.map +1 -1
  9. package/dist/cjs/ContactAgent.js +35 -0
  10. package/dist/cjs/ContactAgent.js.map +1 -1
  11. package/dist/cjs/Converters.d.ts +9 -0
  12. package/dist/cjs/Converters.d.ts.map +1 -1
  13. package/dist/cjs/Converters.js +109 -17
  14. package/dist/cjs/Converters.js.map +1 -1
  15. package/dist/cjs/DiagnosticsAgent.d.ts +15 -0
  16. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  17. package/dist/cjs/DiagnosticsAgent.js +33 -0
  18. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  19. package/dist/cjs/Enums.d.ts +4 -0
  20. package/dist/cjs/Enums.d.ts.map +1 -1
  21. package/dist/cjs/Enums.js +4 -0
  22. package/dist/cjs/Enums.js.map +1 -1
  23. package/dist/cjs/PersonAgent.d.ts +17 -0
  24. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  25. package/dist/cjs/PersonAgent.js +35 -0
  26. package/dist/cjs/PersonAgent.js.map +1 -1
  27. package/dist/cjs/PreferenceAgent.d.ts +22 -0
  28. package/dist/cjs/PreferenceAgent.d.ts.map +1 -1
  29. package/dist/cjs/PreferenceAgent.js +57 -0
  30. package/dist/cjs/PreferenceAgent.js.map +1 -1
  31. package/dist/cjs/TicketAgent.d.ts +31 -0
  32. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  33. package/dist/cjs/TicketAgent.js +67 -0
  34. package/dist/cjs/TicketAgent.js.map +1 -1
  35. package/dist/cjs/UserAgent.d.ts +19 -0
  36. package/dist/cjs/UserAgent.d.ts.map +1 -1
  37. package/dist/cjs/UserAgent.js +37 -0
  38. package/dist/cjs/UserAgent.js.map +1 -1
  39. package/dist/esm/AIAgent.d.ts +19 -0
  40. package/dist/esm/AIAgent.d.ts.map +1 -1
  41. package/dist/esm/AIAgent.js +37 -0
  42. package/dist/esm/AIAgent.js.map +1 -1
  43. package/dist/esm/Carriers.d.ts +196 -3
  44. package/dist/esm/Carriers.d.ts.map +1 -1
  45. package/dist/esm/ContactAgent.d.ts +17 -0
  46. package/dist/esm/ContactAgent.d.ts.map +1 -1
  47. package/dist/esm/ContactAgent.js +35 -0
  48. package/dist/esm/ContactAgent.js.map +1 -1
  49. package/dist/esm/Converters.d.ts +9 -0
  50. package/dist/esm/Converters.d.ts.map +1 -1
  51. package/dist/esm/Converters.js +83 -0
  52. package/dist/esm/Converters.js.map +1 -1
  53. package/dist/esm/DiagnosticsAgent.d.ts +15 -0
  54. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  55. package/dist/esm/DiagnosticsAgent.js +33 -0
  56. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  57. package/dist/esm/Enums.d.ts +4 -0
  58. package/dist/esm/Enums.d.ts.map +1 -1
  59. package/dist/esm/Enums.js +4 -0
  60. package/dist/esm/Enums.js.map +1 -1
  61. package/dist/esm/PersonAgent.d.ts +17 -0
  62. package/dist/esm/PersonAgent.d.ts.map +1 -1
  63. package/dist/esm/PersonAgent.js +35 -0
  64. package/dist/esm/PersonAgent.js.map +1 -1
  65. package/dist/esm/PreferenceAgent.d.ts +22 -0
  66. package/dist/esm/PreferenceAgent.d.ts.map +1 -1
  67. package/dist/esm/PreferenceAgent.js +57 -0
  68. package/dist/esm/PreferenceAgent.js.map +1 -1
  69. package/dist/esm/TicketAgent.d.ts +31 -0
  70. package/dist/esm/TicketAgent.d.ts.map +1 -1
  71. package/dist/esm/TicketAgent.js +67 -0
  72. package/dist/esm/TicketAgent.js.map +1 -1
  73. package/dist/esm/UserAgent.d.ts +19 -0
  74. package/dist/esm/UserAgent.d.ts.map +1 -1
  75. package/dist/esm/UserAgent.js +37 -0
  76. package/dist/esm/UserAgent.js.map +1 -1
  77. package/package.json +4 -4
  78. package/src/AIAgent.ts +64 -0
  79. package/src/Carriers.ts +262 -3
  80. package/src/ContactAgent.ts +60 -0
  81. package/src/Converters.ts +105 -0
  82. package/src/DiagnosticsAgent.ts +56 -0
  83. package/src/Enums.ts +4 -0
  84. package/src/PersonAgent.ts +60 -0
  85. package/src/PreferenceAgent.ts +86 -0
  86. package/src/TicketAgent.ts +114 -0
  87. package/src/UserAgent.ts +64 -0
package/src/Carriers.ts CHANGED
@@ -7123,6 +7123,26 @@ export interface Contact_EnrichContactEntityRequest {
7123
7123
 
7124
7124
  // response object: ContactEntity
7125
7125
 
7126
+ /**
7127
+ * Update interests on contact. Will throw exception if id is in both arrays
7128
+ */
7129
+ export interface Contact_UpdateInterestsRequest {
7130
+ /**
7131
+ * Contact id to update interests for
7132
+ */
7133
+ contactId: number;
7134
+ /**
7135
+ * The interest ids to set on the contact. This will set these interests to true and not touch any other interests.
7136
+ */
7137
+ enableInterestIds: number[];
7138
+ /**
7139
+ * The interest ids to diable on the contact. This will set these interests to false and not touch any other interests.
7140
+ */
7141
+ disableInterestIds: number[];
7142
+ }
7143
+
7144
+ // Void response...
7145
+
7126
7146
 
7127
7147
  /**
7128
7148
  * Getting the contacts where the user currently logged in is set as contact owner.
@@ -8796,6 +8816,26 @@ export interface Person_SetUtmCreatedPersonContactForFormSubmissionRequest {
8796
8816
 
8797
8817
  // Void response...
8798
8818
 
8819
+ /**
8820
+ * Update interests on person. Will throw exception if id is in both arrays
8821
+ */
8822
+ export interface Person_UpdateInterestsRequest {
8823
+ /**
8824
+ * Person id to update interests for
8825
+ */
8826
+ personId: number;
8827
+ /**
8828
+ * The interest ids to set on the person. This will set these interests to true and not touch any other interests.
8829
+ */
8830
+ enableInterestIds: number[];
8831
+ /**
8832
+ * The interest ids to diable on the person. This will set these interests to false and not touch any other interests.
8833
+ */
8834
+ disableInterestIds: number[];
8835
+ }
8836
+
8837
+ // Void response...
8838
+
8799
8839
 
8800
8840
  /**
8801
8841
  * Scaled person image
@@ -28326,6 +28366,32 @@ export interface Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest {
28326
28366
  // Void response...
28327
28367
 
28328
28368
 
28369
+ /**
28370
+ * Operations related to ticket usage
28371
+ */
28372
+ export interface TicketUsage extends Carrier {
28373
+
28374
+
28375
+ }
28376
+
28377
+
28378
+
28379
+
28380
+
28381
+
28382
+ /**
28383
+ * Logs and registers resolved ticket count to the metering service
28384
+ */
28385
+ export interface Diagnostics_RegisterClosedTicketsUsageRequest {
28386
+ /**
28387
+ * IDs of closed tickets
28388
+ */
28389
+ ticketIds: number[];
28390
+ }
28391
+
28392
+ // Void response...
28393
+
28394
+
28329
28395
  /**
28330
28396
  *
28331
28397
  */
@@ -36669,6 +36735,7 @@ export interface Archive_GetRelatedData2Request {
36669
36735
 
36670
36736
 
36671
36737
 
36738
+
36672
36739
 
36673
36740
 
36674
36741
  /**
@@ -36926,6 +36993,27 @@ export interface Preference_SetXsrfPathsRequest {
36926
36993
 
36927
36994
  // Void response...
36928
36995
 
36996
+ /**
36997
+ * Returns the XSRF token value and last update time for the current user
36998
+ * Returns XsrfValue
36999
+ */
37000
+ export interface Preference_GetXsrfValueRequest {
37001
+ }
37002
+
37003
+ // response object: XsrfValue
37004
+
37005
+ /**
37006
+ * Sets the XSRF token value for the current user
37007
+ */
37008
+ export interface Preference_SetXsrfValueRequest {
37009
+ /**
37010
+ * The XSRF value to store
37011
+ */
37012
+ xsrfValue: string;
37013
+ }
37014
+
37015
+ // Void response...
37016
+
36929
37017
 
36930
37018
  /**
36931
37019
  * Preference description, drives the Preference GUI. Maintenance client - controls all preferences in SuperOffice.
@@ -37364,6 +37452,30 @@ export interface TabOrder extends Carrier {
37364
37452
 
37365
37453
 
37366
37454
 
37455
+ /**
37456
+ * XSRF token value and last update time
37457
+ */
37458
+ export interface XsrfValue {
37459
+
37460
+
37461
+ /**
37462
+ * The XSRF token value
37463
+ */
37464
+ value?: string;
37465
+
37466
+ /**
37467
+ * When the XSRF value was last updated (UTC)
37468
+ */
37469
+ lastUpdated?: Date;
37470
+
37471
+ }
37472
+
37473
+
37474
+
37475
+
37476
+
37477
+
37478
+
37367
37479
 
37368
37480
 
37369
37481
 
@@ -38324,6 +38436,35 @@ export interface User_CheckAccessGatewayRegistrationRequest {
38324
38436
 
38325
38437
  // response object: boolean
38326
38438
 
38439
+ /**
38440
+ * Exchanges an authorization code for tokens.
38441
+ * Returns string
38442
+ */
38443
+ export interface User_ExchangeCodeAndSaveTokensRequest {
38444
+ /**
38445
+ * The provider of the underlying data.
38446
+ */
38447
+ provider: string;
38448
+ /**
38449
+ * The authorization code to exchange for a token.
38450
+ */
38451
+ authorizationCode: string;
38452
+ /**
38453
+ * The nonce to verify against the id_token's nonce if present.
38454
+ */
38455
+ nonce: string;
38456
+ /**
38457
+ * The cryptographic proof for the client to verify.
38458
+ */
38459
+ pkceVerifier: string;
38460
+ /**
38461
+ * We need to be able to dynamically inject the redirect based on location(app.superoffice.com vs online2.superoffice.com)
38462
+ */
38463
+ redirectUri: string;
38464
+ }
38465
+
38466
+ // response object: string
38467
+
38327
38468
 
38328
38469
  /**
38329
38470
  * Credentials supported for authentication
@@ -39057,20 +39198,25 @@ export interface TokenManagementInfo extends Carrier {
39057
39198
 
39058
39199
 
39059
39200
  /**
39060
- * The provider these tokens belong to
39201
+ * The provider the access and refresh token belong to.
39061
39202
  */
39062
39203
  provider?: string;
39063
39204
 
39064
39205
  /**
39065
- * Access token
39206
+ * Access token (Provider)
39066
39207
  */
39067
39208
  accessToken?: string;
39068
39209
 
39069
39210
  /**
39070
- * Refresh token
39211
+ * Refresh token (Provider)
39071
39212
  */
39072
39213
  refreshToken?: string;
39073
39214
 
39215
+ /**
39216
+ * JSON serialized dictionary of claims from the AG id_token
39217
+ */
39218
+ claims?: string;
39219
+
39074
39220
  }
39075
39221
 
39076
39222
 
@@ -47975,6 +48121,36 @@ export interface Ticket_AcceptTicketsRequest {
47975
48121
 
47976
48122
  // Void response...
47977
48123
 
48124
+ /**
48125
+ * Sets tickets' status to SPAM. After a grace period these tickets will be deleted by a background job.
48126
+ * Returns number[]
48127
+ */
48128
+ export interface Ticket_SetSpamStatusByIdsRequest {
48129
+ /**
48130
+ * Ids of tickets to be set for SPAM.
48131
+ */
48132
+ ticketIds: number[];
48133
+ }
48134
+
48135
+ // response object: number[]
48136
+
48137
+ /**
48138
+ * Sets tickets' status to SPAM. After a grace period these tickets will be deleted by a background job.
48139
+ * Returns number[]
48140
+ */
48141
+ export interface Ticket_SetSpamStatusByProviderRequest {
48142
+ /**
48143
+ * Name of the provider that returns ticket rows.
48144
+ */
48145
+ providerName: string;
48146
+ /**
48147
+ * Query restrictions to be added to provider. Fixed providers, such as LastTicketsProvider, FavouriteTicketsProvider etc. already have mandatory restrictions setup - in such case extra restrictions will be combined, however for general use case for fixed providers you can pass an empty array and provider will return default results. For selection providers generally you should pass selectionId as a restriction.
48148
+ */
48149
+ restrictions: ArchiveRestrictionInfo[];
48150
+ }
48151
+
48152
+ // response object: number[]
48153
+
47978
48154
 
47979
48155
  /**
47980
48156
  * The TicketMessage carrier is used for representing a service ticket message
@@ -51185,6 +51361,89 @@ export interface AI_AnswerAcceptedRequest {
51185
51361
 
51186
51362
  // Void response...
51187
51363
 
51364
+ /**
51365
+ * Returns an answer based on the query, and provided context.
51366
+ * Returns RagAnswer
51367
+ */
51368
+ export interface AI_AnswerUsingContextRequest {
51369
+ /**
51370
+ * Defines the search domain used for generating answer. e.g. 'ServiceCopilot'
51371
+ */
51372
+ namespaceName: string;
51373
+ /**
51374
+ * Question. The search query to answer.
51375
+ */
51376
+ query: string;
51377
+ /**
51378
+ * The IDs of the current context for contact, person, project, sale, and ticket.
51379
+ */
51380
+ contextIds: RagContextIds;
51381
+ /**
51382
+ * Filter results based on content type. Default: None = no filtering
51383
+ */
51384
+ type: enums.RagType;
51385
+ /**
51386
+ * Max Number of results to use in generating answer.
51387
+ */
51388
+ top: number;
51389
+ }
51390
+
51391
+ // response object: RagAnswer
51392
+
51393
+
51394
+ /**
51395
+ * Parameters specifying contact/person/project/sale/ticket ids for populating context.
51396
+ */
51397
+ export interface RagContextIds {
51398
+
51399
+
51400
+ /**
51401
+ * Identifier for a contact
51402
+ */
51403
+ contactId?: number;
51404
+
51405
+ /**
51406
+ * Identifier for a person
51407
+ */
51408
+ personId?: number;
51409
+
51410
+ /**
51411
+ * Identifier for a project
51412
+ */
51413
+ projectId?: number;
51414
+
51415
+ /**
51416
+ * Identifier for a selection
51417
+ */
51418
+ selectionId?: number;
51419
+
51420
+ /**
51421
+ * Identifier for an appointment
51422
+ */
51423
+ appointmentId?: number;
51424
+
51425
+ /**
51426
+ * Identifier for a document
51427
+ */
51428
+ documentId?: number;
51429
+
51430
+ /**
51431
+ * Identifier for a sale
51432
+ */
51433
+ saleId?: number;
51434
+
51435
+ /**
51436
+ * Identifier for ticket/request
51437
+ */
51438
+ ticketId?: number;
51439
+
51440
+ }
51441
+
51442
+
51443
+
51444
+
51445
+
51446
+
51188
51447
 
51189
51448
  /**
51190
51449
  * Contains the result of an AI search, with relevance score, document refernce, relevant text chunk.
@@ -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.
package/src/Converters.ts CHANGED
@@ -9892,6 +9892,37 @@ export function Create_InstallationArrayArray_From(src:any) : carriers.Installat
9892
9892
 
9893
9893
 
9894
9894
 
9895
+ export function Create_TicketUsage_From(src:any) : carriers.TicketUsage {
9896
+ if( src === null || src === undefined )
9897
+ return null;
9898
+ let res : carriers.TicketUsage = Create_Carrier_From(src) as carriers.TicketUsage;
9899
+
9900
+ return res as carriers.TicketUsage;
9901
+ }
9902
+
9903
+ export function Create_TicketUsageArray_From(src:any) : carriers.TicketUsage[] {
9904
+ let res : carriers.TicketUsage[] = [];
9905
+ if( Array.isArray(src) ) {
9906
+ for(let i in src) {
9907
+ res[i] = Create_TicketUsage_From(src[i]);
9908
+ }
9909
+ }
9910
+ return res;
9911
+ }
9912
+
9913
+ export function Create_TicketUsageArrayArray_From(src:any) : carriers.TicketUsage[][] {
9914
+ let res : carriers.TicketUsage[][] = [];
9915
+ if( Array.isArray(src) ) {
9916
+ for(let i in src) {
9917
+ res[i] = Create_TicketUsageArray_From(src[i]);
9918
+ }
9919
+ }
9920
+ return res;
9921
+ }
9922
+
9923
+
9924
+
9925
+
9895
9926
  export function Create_WebAppUsage_From(src:any) : carriers.WebAppUsage {
9896
9927
  if( src === null || src === undefined )
9897
9928
  return null;
@@ -12567,6 +12598,7 @@ export function Create_RelatedDataArrayArray_From(src:any) : carriers.RelatedDat
12567
12598
 
12568
12599
 
12569
12600
 
12601
+
12570
12602
 
12571
12603
 
12572
12604
  export function Create_Preference_From(src:any) : carriers.Preference {
@@ -12766,6 +12798,39 @@ export function Create_TabOrderArrayArray_From(src:any) : carriers.TabOrder[][]
12766
12798
 
12767
12799
 
12768
12800
 
12801
+ export function Create_XsrfValue_From(src:any) : carriers.XsrfValue {
12802
+ if( src === null || src === undefined )
12803
+ return null;
12804
+ let res : any = { };
12805
+
12806
+ res.value= src.Value as string;
12807
+ res.lastUpdated= Create_Date_From(src.LastUpdated);
12808
+ return res as carriers.XsrfValue;
12809
+ }
12810
+
12811
+ export function Create_XsrfValueArray_From(src:any) : carriers.XsrfValue[] {
12812
+ let res : carriers.XsrfValue[] = [];
12813
+ if( Array.isArray(src) ) {
12814
+ for(let i in src) {
12815
+ res[i] = Create_XsrfValue_From(src[i]);
12816
+ }
12817
+ }
12818
+ return res;
12819
+ }
12820
+
12821
+ export function Create_XsrfValueArrayArray_From(src:any) : carriers.XsrfValue[][] {
12822
+ let res : carriers.XsrfValue[][] = [];
12823
+ if( Array.isArray(src) ) {
12824
+ for(let i in src) {
12825
+ res[i] = Create_XsrfValueArray_From(src[i]);
12826
+ }
12827
+ }
12828
+ return res;
12829
+ }
12830
+
12831
+
12832
+
12833
+
12769
12834
 
12770
12835
 
12771
12836
 
@@ -13716,6 +13781,7 @@ export function Create_TokenManagementInfo_From(src:any) : carriers.TokenManagem
13716
13781
  res.provider= src.Provider as string;
13717
13782
  res.accessToken= src.AccessToken as string;
13718
13783
  res.refreshToken= src.RefreshToken as string;
13784
+ res.claims= src.Claims as string;
13719
13785
  return res as carriers.TokenManagementInfo;
13720
13786
  }
13721
13787
 
@@ -18599,6 +18665,45 @@ export function Create_RagAnswerArrayArray_From(src:any) : carriers.RagAnswer[][
18599
18665
 
18600
18666
 
18601
18667
 
18668
+ export function Create_RagContextIds_From(src:any) : carriers.RagContextIds {
18669
+ if( src === null || src === undefined )
18670
+ return null;
18671
+ let res : any = { };
18672
+
18673
+ res.contactId= src.ContactId as number;
18674
+ res.personId= src.PersonId as number;
18675
+ res.projectId= src.ProjectId as number;
18676
+ res.selectionId= src.SelectionId as number;
18677
+ res.appointmentId= src.AppointmentId as number;
18678
+ res.documentId= src.DocumentId as number;
18679
+ res.saleId= src.SaleId as number;
18680
+ res.ticketId= src.TicketId as number;
18681
+ return res as carriers.RagContextIds;
18682
+ }
18683
+
18684
+ export function Create_RagContextIdsArray_From(src:any) : carriers.RagContextIds[] {
18685
+ let res : carriers.RagContextIds[] = [];
18686
+ if( Array.isArray(src) ) {
18687
+ for(let i in src) {
18688
+ res[i] = Create_RagContextIds_From(src[i]);
18689
+ }
18690
+ }
18691
+ return res;
18692
+ }
18693
+
18694
+ export function Create_RagContextIdsArrayArray_From(src:any) : carriers.RagContextIds[][] {
18695
+ let res : carriers.RagContextIds[][] = [];
18696
+ if( Array.isArray(src) ) {
18697
+ for(let i in src) {
18698
+ res[i] = Create_RagContextIdsArray_From(src[i]);
18699
+ }
18700
+ }
18701
+ return res;
18702
+ }
18703
+
18704
+
18705
+
18706
+
18602
18707
  export function Create_RagResult_From(src:any) : carriers.RagResult {
18603
18708
  if( src === null || src === undefined )
18604
18709
  return null;
@@ -66,6 +66,8 @@ export interface IDiagnosticsAgent {
66
66
  performTasksAfterCustomObjectTableCreatedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
67
67
  performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
68
68
  performTasksAfterCustomObjectTableDeletedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
69
+ registerClosedTicketsUsageAsync(request: carriers.Diagnostics_RegisterClosedTicketsUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
70
+ registerClosedTicketsUsageAsync(ticketIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
69
71
  addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
70
72
  addWebAppUsageAsync(webAppUsages: carriers.WebAppUsage[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
71
73
  webAppUsageExistsInPeriodAsync(request: carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
@@ -1210,6 +1212,60 @@ export class DiagnosticsAgent extends base.WebApiBase implements IDiagnosticsAge
1210
1212
  }
1211
1213
 
1212
1214
 
1215
+ private async _registerClosedTicketsUsageAsync(request: carriers.Diagnostics_RegisterClosedTicketsUsageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1216
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1217
+ base.WebApiBase.SetPending(options);
1218
+ return new Promise< void >(async (resolve, reject) => {
1219
+ try {
1220
+ config.baseURL = this._options.baseUrl;
1221
+ const response = await this._axios.post("RegisterClosedTicketsUsage", request , config);
1222
+ base.WebApiBase.SetCompleted(options, response);
1223
+ const res = response.data;
1224
+ resolve(res);
1225
+ }
1226
+ catch( err ) {
1227
+ base.WebApiBase.HandleError(options, config, err);
1228
+ reject(err);
1229
+ }
1230
+ });
1231
+ }
1232
+
1233
+
1234
+
1235
+ /**
1236
+ * Logs and registers resolved ticket count to the metering service
1237
+ * @param request - TicketIds
1238
+ * @returns This method has no return value
1239
+ */
1240
+ public async registerClosedTicketsUsageAsync(request: carriers.Diagnostics_RegisterClosedTicketsUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1241
+
1242
+ /**
1243
+ * Logs and registers resolved ticket count to the metering service
1244
+ * @param ticketIds - IDs of closed tickets
1245
+ * @returns This method has no return value
1246
+ */
1247
+ public async registerClosedTicketsUsageAsync(ticketIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1248
+
1249
+ public async registerClosedTicketsUsageAsync(ticketIds:number[]|carriers.Diagnostics_RegisterClosedTicketsUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1250
+ let _request : carriers.Diagnostics_RegisterClosedTicketsUsageRequest = null;
1251
+ let _options : base.WebApiRequestOptions = null;
1252
+ const first : any = ticketIds;
1253
+ if( typeof( first ) === "object" && first && ( typeof(first.ticketIds)!='undefined' ) )
1254
+ {
1255
+ _request = ticketIds as carriers.Diagnostics_RegisterClosedTicketsUsageRequest;
1256
+ _options = webapi_options as base.WebApiRequestOptions;
1257
+ }
1258
+ else
1259
+ {
1260
+ _request = {
1261
+ ticketIds: ticketIds as number[],
1262
+ };
1263
+ _options = webapi_options;
1264
+ }
1265
+ return this._registerClosedTicketsUsageAsync( _request, _options );
1266
+ }
1267
+
1268
+
1213
1269
  private async _addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
1214
1270
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1215
1271
  base.WebApiBase.SetPending(options);
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
  */