@superoffice/webapi 11.1.447 → 11.3.1349

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 (92) hide show
  1. package/dist/cjs/AIAgent.d.ts +115 -0
  2. package/dist/cjs/AIAgent.d.ts.map +1 -1
  3. package/dist/cjs/AIAgent.js +243 -0
  4. package/dist/cjs/AIAgent.js.map +1 -1
  5. package/dist/cjs/Carriers.d.ts +586 -1
  6. package/dist/cjs/Carriers.d.ts.map +1 -1
  7. package/dist/cjs/ContactAgent.d.ts +33 -2
  8. package/dist/cjs/ContactAgent.d.ts.map +1 -1
  9. package/dist/cjs/ContactAgent.js +67 -0
  10. package/dist/cjs/ContactAgent.js.map +1 -1
  11. package/dist/cjs/Converters.d.ts +33 -0
  12. package/dist/cjs/Converters.d.ts.map +1 -1
  13. package/dist/cjs/Converters.js +477 -24
  14. package/dist/cjs/Converters.js.map +1 -1
  15. package/dist/cjs/DiagnosticsAgent.d.ts +7 -0
  16. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  17. package/dist/cjs/DiagnosticsAgent.js +24 -0
  18. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  19. package/dist/cjs/Enums.d.ts +156 -8
  20. package/dist/cjs/Enums.d.ts.map +1 -1
  21. package/dist/cjs/Enums.js +159 -7
  22. package/dist/cjs/Enums.js.map +1 -1
  23. package/dist/cjs/ListAgent.d.ts +24 -0
  24. package/dist/cjs/ListAgent.d.ts.map +1 -1
  25. package/dist/cjs/ListAgent.js +66 -0
  26. package/dist/cjs/ListAgent.js.map +1 -1
  27. package/dist/cjs/PersonAgent.d.ts +15 -0
  28. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  29. package/dist/cjs/PersonAgent.js +33 -0
  30. package/dist/cjs/PersonAgent.js.map +1 -1
  31. package/dist/cjs/PersonRestApi.d.ts.map +1 -1
  32. package/dist/cjs/PersonRestApi.js.map +1 -1
  33. package/dist/cjs/ProjectAgent.d.ts +16 -0
  34. package/dist/cjs/ProjectAgent.d.ts.map +1 -1
  35. package/dist/cjs/ProjectAgent.js +34 -0
  36. package/dist/cjs/ProjectAgent.js.map +1 -1
  37. package/dist/cjs/SelectionAgent.d.ts +76 -0
  38. package/dist/cjs/SelectionAgent.d.ts.map +1 -1
  39. package/dist/cjs/SelectionAgent.js +166 -0
  40. package/dist/cjs/SelectionAgent.js.map +1 -1
  41. package/dist/esm/AIAgent.d.ts +115 -0
  42. package/dist/esm/AIAgent.d.ts.map +1 -1
  43. package/dist/esm/AIAgent.js +243 -0
  44. package/dist/esm/AIAgent.js.map +1 -1
  45. package/dist/esm/Carriers.d.ts +586 -1
  46. package/dist/esm/Carriers.d.ts.map +1 -1
  47. package/dist/esm/ContactAgent.d.ts +33 -2
  48. package/dist/esm/ContactAgent.d.ts.map +1 -1
  49. package/dist/esm/ContactAgent.js +67 -0
  50. package/dist/esm/ContactAgent.js.map +1 -1
  51. package/dist/esm/Converters.d.ts +33 -0
  52. package/dist/esm/Converters.d.ts.map +1 -1
  53. package/dist/esm/Converters.js +419 -0
  54. package/dist/esm/Converters.js.map +1 -1
  55. package/dist/esm/DiagnosticsAgent.d.ts +7 -0
  56. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  57. package/dist/esm/DiagnosticsAgent.js +24 -0
  58. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  59. package/dist/esm/Enums.d.ts +156 -8
  60. package/dist/esm/Enums.d.ts.map +1 -1
  61. package/dist/esm/Enums.js +156 -4
  62. package/dist/esm/Enums.js.map +1 -1
  63. package/dist/esm/ListAgent.d.ts +24 -0
  64. package/dist/esm/ListAgent.d.ts.map +1 -1
  65. package/dist/esm/ListAgent.js +66 -0
  66. package/dist/esm/ListAgent.js.map +1 -1
  67. package/dist/esm/PersonAgent.d.ts +15 -0
  68. package/dist/esm/PersonAgent.d.ts.map +1 -1
  69. package/dist/esm/PersonAgent.js +33 -0
  70. package/dist/esm/PersonAgent.js.map +1 -1
  71. package/dist/esm/PersonRestApi.d.ts.map +1 -1
  72. package/dist/esm/PersonRestApi.js.map +1 -1
  73. package/dist/esm/ProjectAgent.d.ts +16 -0
  74. package/dist/esm/ProjectAgent.d.ts.map +1 -1
  75. package/dist/esm/ProjectAgent.js +34 -0
  76. package/dist/esm/ProjectAgent.js.map +1 -1
  77. package/dist/esm/SelectionAgent.d.ts +76 -0
  78. package/dist/esm/SelectionAgent.d.ts.map +1 -1
  79. package/dist/esm/SelectionAgent.js +166 -0
  80. package/dist/esm/SelectionAgent.js.map +1 -1
  81. package/package.json +3 -3
  82. package/src/AIAgent.ts +413 -0
  83. package/src/Carriers.ts +816 -1
  84. package/src/ContactAgent.ts +116 -2
  85. package/src/Converters.ts +505 -0
  86. package/src/DiagnosticsAgent.ts +30 -0
  87. package/src/Enums.ts +160 -4
  88. package/src/ListAgent.ts +71 -0
  89. package/src/PersonAgent.ts +56 -0
  90. package/src/PersonRestApi.ts +2 -0
  91. package/src/ProjectAgent.ts +58 -0
  92. package/src/SelectionAgent.ts +282 -0
@@ -77,12 +77,16 @@ export interface IContactAgent {
77
77
  getContactSummaryAsync(contactId: number, limit: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactSummary >;
78
78
  validateContactEntityAsync(request: carriers.Contact_ValidateContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
79
79
  validateContactEntityAsync(contactEntity: carriers.ContactEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
80
+ enrichContactEntityAsync(request: carriers.Contact_EnrichContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
81
+ enrichContactEntityAsync(contactEntity: carriers.ContactEntity, enrichId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
80
82
  getContactListAsync(contactIds: number[]) : Promise< carriers.Contact[] >;
81
83
  getMyContactsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
82
84
  getMyRecentContactsAsync(request: carriers.Contact_GetMyRecentContactsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
83
85
  getMyRecentContactsAsync(sourceType: enums.ContactSourceType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Contact[] >;
84
86
  getPreviewContactAsync(request: carriers.Contact_GetPreviewContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
85
87
  getPreviewContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
88
+ getPreviewEnrichContactAsync(request: carriers.Contact_GetPreviewEnrichContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
89
+ getPreviewEnrichContactAsync(enrichId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
86
90
  } // interface IContactAgent
87
91
 
88
92
 
@@ -1477,6 +1481,62 @@ export class ContactAgent extends base.WebApiBase implements IContactAgent {
1477
1481
  return this._validateContactEntityAsync( _request, _options );
1478
1482
  }
1479
1483
 
1484
+
1485
+ private async _enrichContactEntityAsync(request: carriers.Contact_EnrichContactEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
1486
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1487
+ base.WebApiBase.SetPending(options);
1488
+ return new Promise< carriers.ContactEntity >(async (resolve, reject) => {
1489
+ try {
1490
+ config.baseURL = this._options.baseUrl;
1491
+ const response = await this._axios.post("EnrichContactEntity", request , config);
1492
+ base.WebApiBase.SetCompleted(options);
1493
+ const res : carriers.ContactEntity = converters.Create_ContactEntity_From( response.data );
1494
+ resolve(res);
1495
+ }
1496
+ catch( err ) {
1497
+ base.WebApiBase.HandleError(options, config, err);
1498
+ reject(err);
1499
+ }
1500
+ });
1501
+ }
1502
+
1503
+
1504
+
1505
+ /**
1506
+ * Enrich a contact with data from the AI Enrichment service. This will update the contact with address, phone number, and email.
1507
+ * @param request - ContactEntity, EnrichId
1508
+ * @returns Enriched contact entity with address, phone number, and email updated.
1509
+ */
1510
+ public async enrichContactEntityAsync(request: carriers.Contact_EnrichContactEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
1511
+
1512
+ /**
1513
+ * Enrich a contact with data from the AI Enrichment service. This will update the contact with address, phone number, and email.
1514
+ * @param contactEntity - The contact entity to enrich.
1515
+ * @param enrichId - Id from the EnrichContact provider
1516
+ * @returns Enriched contact entity with address, phone number, and email updated.
1517
+ */
1518
+ public async enrichContactEntityAsync(contactEntity: carriers.ContactEntity, enrichId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity >;
1519
+
1520
+ public async enrichContactEntityAsync(contactEntity:carriers.ContactEntity|carriers.Contact_EnrichContactEntityRequest, enrichId?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ContactEntity > {
1521
+ let _request : carriers.Contact_EnrichContactEntityRequest = null;
1522
+ let _options : base.WebApiRequestOptions = null;
1523
+ const first : any = contactEntity;
1524
+ if( typeof( first ) === "object" && first && ( typeof(first.contactEntity)!='undefined' || typeof(first.enrichId)!='undefined' ) )
1525
+ {
1526
+ _request = contactEntity as carriers.Contact_EnrichContactEntityRequest;
1527
+ _options = enrichId as base.WebApiRequestOptions;
1528
+ }
1529
+ else
1530
+ {
1531
+ _request = {
1532
+ contactEntity: contactEntity as carriers.ContactEntity,
1533
+ enrichId: enrichId as string,
1534
+ };
1535
+ _options = webapi_options;
1536
+ }
1537
+ return this._enrichContactEntityAsync( _request, _options );
1538
+ }
1539
+
1480
1540
  /**
1481
1541
  * Gets an array of Contact objects.
1482
1542
  * @param contactIds - The primary keys.
@@ -1607,14 +1667,14 @@ export class ContactAgent extends base.WebApiBase implements IContactAgent {
1607
1667
  /**
1608
1668
  * Get a contact from its ID
1609
1669
  * @param request - ContactId
1610
- * @returns Contact minimal contact suitable for preview
1670
+ * @returns Minimal contact suitable for preview
1611
1671
  */
1612
1672
  public async getPreviewContactAsync(request: carriers.Contact_GetPreviewContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1613
1673
 
1614
1674
  /**
1615
1675
  * Get a contact from its ID
1616
1676
  * @param contactId - Contact ID
1617
- * @returns Contact minimal contact suitable for preview
1677
+ * @returns Minimal contact suitable for preview
1618
1678
  */
1619
1679
  public async getPreviewContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1620
1680
 
@@ -1637,6 +1697,60 @@ export class ContactAgent extends base.WebApiBase implements IContactAgent {
1637
1697
  return this._getPreviewContactAsync( _request, _options );
1638
1698
  }
1639
1699
 
1700
+
1701
+ private async _getPreviewEnrichContactAsync(request: carriers.Contact_GetPreviewEnrichContactRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact > {
1702
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1703
+ base.WebApiBase.SetPending(options);
1704
+ return new Promise< carriers.PreviewContact >(async (resolve, reject) => {
1705
+ try {
1706
+ config.baseURL = this._options.baseUrl;
1707
+ const response = await this._axios.post("GetPreviewEnrichContact", request , config);
1708
+ base.WebApiBase.SetCompleted(options);
1709
+ const res : carriers.PreviewContact = converters.Create_PreviewContact_From( response.data );
1710
+ resolve(res);
1711
+ }
1712
+ catch( err ) {
1713
+ base.WebApiBase.HandleError(options, config, err);
1714
+ reject(err);
1715
+ }
1716
+ });
1717
+ }
1718
+
1719
+
1720
+
1721
+ /**
1722
+ * Get a contact from its ID
1723
+ * @param request - EnrichId
1724
+ * @returns Minimal contact suitable for preview
1725
+ */
1726
+ public async getPreviewEnrichContactAsync(request: carriers.Contact_GetPreviewEnrichContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1727
+
1728
+ /**
1729
+ * Get a contact from its ID
1730
+ * @param enrichId - Enrich Contact ID from the EnrichContact MDO list provider
1731
+ * @returns Minimal contact suitable for preview
1732
+ */
1733
+ public async getPreviewEnrichContactAsync(enrichId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact >;
1734
+
1735
+ public async getPreviewEnrichContactAsync(enrichId:string|carriers.Contact_GetPreviewEnrichContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewContact > {
1736
+ let _request : carriers.Contact_GetPreviewEnrichContactRequest = null;
1737
+ let _options : base.WebApiRequestOptions = null;
1738
+ const first : any = enrichId;
1739
+ if( typeof( first ) === "object" && first && ( typeof(first.enrichId)!='undefined' ) )
1740
+ {
1741
+ _request = enrichId as carriers.Contact_GetPreviewEnrichContactRequest;
1742
+ _options = webapi_options as base.WebApiRequestOptions;
1743
+ }
1744
+ else
1745
+ {
1746
+ _request = {
1747
+ enrichId: enrichId as string,
1748
+ };
1749
+ _options = webapi_options;
1750
+ }
1751
+ return this._getPreviewEnrichContactAsync( _request, _options );
1752
+ }
1753
+
1640
1754
  } // class v1ContactAgentController
1641
1755
 
1642
1756