@superoffice/webapi 10.5.5 → 11.2.694
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AIAgent.d.ts +83 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +173 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/BLOBAgent.d.ts +0 -31
- package/dist/cjs/BLOBAgent.d.ts.map +1 -1
- package/dist/cjs/BLOBAgent.js +0 -67
- package/dist/cjs/BLOBAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +257 -1075
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.d.ts +14 -0
- package/dist/cjs/ConfigurationAgent.d.ts.map +1 -1
- package/dist/cjs/ConfigurationAgent.js +48 -0
- package/dist/cjs/ConfigurationAgent.js.map +1 -1
- package/dist/cjs/ContactAgent.d.ts +33 -2
- package/dist/cjs/ContactAgent.d.ts.map +1 -1
- package/dist/cjs/ContactAgent.js +67 -0
- package/dist/cjs/ContactAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +15 -39
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +174 -570
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/CustomerServiceAgent.d.ts +0 -16
- package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/cjs/CustomerServiceAgent.js +0 -44
- package/dist/cjs/CustomerServiceAgent.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +7 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +24 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/EMailAgent.d.ts +5 -5
- package/dist/cjs/EMailAgent.js +1 -1
- package/dist/cjs/Enums.d.ts +34 -244
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +38 -254
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/FreeTextAgent.d.ts +0 -67
- package/dist/cjs/FreeTextAgent.d.ts.map +1 -1
- package/dist/cjs/FreeTextAgent.js +0 -156
- package/dist/cjs/FreeTextAgent.js.map +1 -1
- package/dist/cjs/LicenseAgent.d.ts +22 -0
- package/dist/cjs/LicenseAgent.d.ts.map +1 -1
- package/dist/cjs/LicenseAgent.js +57 -0
- package/dist/cjs/LicenseAgent.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +18 -18
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +15 -15
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/NavigatorAgent.d.ts +0 -8
- package/dist/cjs/NavigatorAgent.d.ts.map +1 -1
- package/dist/cjs/NavigatorAgent.js +0 -22
- package/dist/cjs/NavigatorAgent.js.map +1 -1
- package/dist/cjs/PersonAgent.d.ts +18 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +36 -0
- package/dist/cjs/PersonAgent.js.map +1 -1
- package/dist/cjs/QuoteAgent.d.ts +0 -48
- package/dist/cjs/QuoteAgent.d.ts.map +1 -1
- package/dist/cjs/QuoteAgent.js +0 -118
- package/dist/cjs/QuoteAgent.js.map +1 -1
- package/dist/cjs/ReportAgent.d.ts +0 -121
- package/dist/cjs/ReportAgent.d.ts.map +1 -1
- package/dist/cjs/ReportAgent.js +0 -271
- package/dist/cjs/ReportAgent.js.map +1 -1
- package/dist/cjs/SelectionAgent.d.ts +0 -46
- package/dist/cjs/SelectionAgent.d.ts.map +1 -1
- package/dist/cjs/SelectionAgent.js +0 -110
- package/dist/cjs/SelectionAgent.js.map +1 -1
- package/dist/cjs/ViewStateAgent.d.ts +22 -22
- package/dist/cjs/ViewStateAgent.d.ts.map +1 -1
- package/dist/cjs/ViewStateAgent.js +57 -57
- package/dist/cjs/ViewStateAgent.js.map +1 -1
- package/dist/cjs/WebApi.d.ts +0 -18
- package/dist/cjs/WebApi.d.ts.map +1 -1
- package/dist/cjs/WebApi.js +2 -29
- package/dist/cjs/WebApi.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +83 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +173 -0
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/BLOBAgent.d.ts +0 -31
- package/dist/esm/BLOBAgent.d.ts.map +1 -1
- package/dist/esm/BLOBAgent.js +0 -67
- package/dist/esm/BLOBAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +257 -1075
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.d.ts +14 -0
- package/dist/esm/ConfigurationAgent.d.ts.map +1 -1
- package/dist/esm/ConfigurationAgent.js +48 -0
- package/dist/esm/ConfigurationAgent.js.map +1 -1
- package/dist/esm/ContactAgent.d.ts +33 -2
- package/dist/esm/ContactAgent.d.ts.map +1 -1
- package/dist/esm/ContactAgent.js +67 -0
- package/dist/esm/ContactAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +15 -39
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +134 -505
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/CustomerServiceAgent.d.ts +0 -16
- package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
- package/dist/esm/CustomerServiceAgent.js +0 -44
- package/dist/esm/CustomerServiceAgent.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +7 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +24 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/EMailAgent.d.ts +5 -5
- package/dist/esm/EMailAgent.js +1 -1
- package/dist/esm/Enums.d.ts +34 -244
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +34 -250
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/FreeTextAgent.d.ts +0 -67
- package/dist/esm/FreeTextAgent.d.ts.map +1 -1
- package/dist/esm/FreeTextAgent.js +0 -156
- package/dist/esm/FreeTextAgent.js.map +1 -1
- package/dist/esm/LicenseAgent.d.ts +22 -0
- package/dist/esm/LicenseAgent.d.ts.map +1 -1
- package/dist/esm/LicenseAgent.js +57 -0
- package/dist/esm/LicenseAgent.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +18 -18
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +15 -15
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/NavigatorAgent.d.ts +0 -8
- package/dist/esm/NavigatorAgent.d.ts.map +1 -1
- package/dist/esm/NavigatorAgent.js +0 -22
- package/dist/esm/NavigatorAgent.js.map +1 -1
- package/dist/esm/PersonAgent.d.ts +18 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +36 -0
- package/dist/esm/PersonAgent.js.map +1 -1
- package/dist/esm/QuoteAgent.d.ts +0 -48
- package/dist/esm/QuoteAgent.d.ts.map +1 -1
- package/dist/esm/QuoteAgent.js +0 -118
- package/dist/esm/QuoteAgent.js.map +1 -1
- package/dist/esm/ReportAgent.d.ts +0 -121
- package/dist/esm/ReportAgent.d.ts.map +1 -1
- package/dist/esm/ReportAgent.js +0 -271
- package/dist/esm/ReportAgent.js.map +1 -1
- package/dist/esm/SelectionAgent.d.ts +0 -46
- package/dist/esm/SelectionAgent.d.ts.map +1 -1
- package/dist/esm/SelectionAgent.js +0 -110
- package/dist/esm/SelectionAgent.js.map +1 -1
- package/dist/esm/ViewStateAgent.d.ts +22 -22
- package/dist/esm/ViewStateAgent.d.ts.map +1 -1
- package/dist/esm/ViewStateAgent.js +57 -57
- package/dist/esm/ViewStateAgent.js.map +1 -1
- package/dist/esm/WebApi.d.ts +0 -18
- package/dist/esm/WebApi.d.ts.map +1 -1
- package/dist/esm/WebApi.js +0 -27
- package/dist/esm/WebApi.js.map +1 -1
- package/package.json +3 -3
- package/src/AIAgent.ts +296 -0
- package/src/BLOBAgent.ts +0 -114
- package/src/Carriers.ts +357 -1459
- package/src/ConfigurationAgent.ts +60 -0
- package/src/ContactAgent.ts +116 -2
- package/src/Converters.ts +175 -622
- package/src/CustomerServiceAgent.ts +0 -47
- package/src/DiagnosticsAgent.ts +30 -0
- package/src/EMailAgent.ts +5 -5
- package/src/Enums.ts +35 -257
- package/src/FreeTextAgent.ts +0 -254
- package/src/LicenseAgent.ts +86 -0
- package/src/ListAgent.ts +34 -34
- package/src/NavigatorAgent.ts +0 -24
- package/src/PersonAgent.ts +62 -0
- package/src/QuoteAgent.ts +0 -193
- package/src/ReportAgent.ts +0 -421
- package/src/SelectionAgent.ts +0 -160
- package/src/ViewStateAgent.ts +86 -86
- package/src/WebApi.ts +0 -36
- package/dist/cjs/AudienceAgent.d.ts +0 -376
- package/dist/cjs/AudienceAgent.d.ts.map +0 -1
- package/dist/cjs/AudienceAgent.js +0 -888
- package/dist/cjs/AudienceAgent.js.map +0 -1
- package/dist/cjs/DashboardAgent.d.ts +0 -197
- package/dist/cjs/DashboardAgent.d.ts.map +0 -1
- package/dist/cjs/DashboardAgent.js +0 -436
- package/dist/cjs/DashboardAgent.js.map +0 -1
- package/dist/cjs/ReplicationAgent.d.ts +0 -101
- package/dist/cjs/ReplicationAgent.d.ts.map +0 -1
- package/dist/cjs/ReplicationAgent.js +0 -223
- package/dist/cjs/ReplicationAgent.js.map +0 -1
- package/dist/esm/AudienceAgent.d.ts +0 -376
- package/dist/esm/AudienceAgent.d.ts.map +0 -1
- package/dist/esm/AudienceAgent.js +0 -883
- package/dist/esm/AudienceAgent.js.map +0 -1
- package/dist/esm/DashboardAgent.d.ts +0 -197
- package/dist/esm/DashboardAgent.d.ts.map +0 -1
- package/dist/esm/DashboardAgent.js +0 -431
- package/dist/esm/DashboardAgent.js.map +0 -1
- package/dist/esm/ReplicationAgent.d.ts +0 -101
- package/dist/esm/ReplicationAgent.d.ts.map +0 -1
- package/dist/esm/ReplicationAgent.js +0 -218
- package/dist/esm/ReplicationAgent.js.map +0 -1
- package/src/AudienceAgent.ts +0 -1430
- package/src/DashboardAgent.ts +0 -658
- package/src/ReplicationAgent.ts +0 -325
|
@@ -51,6 +51,8 @@ export interface IConfigurationAgent {
|
|
|
51
51
|
setAppliesToKeyAsync(request: carriers.Configuration_SetAppliesToKeyRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
52
52
|
setAppliesToKeyAsync(recipeId: string, appliesToKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
53
53
|
getRecipeAppliesToMappingsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
54
|
+
rebuildCustomObjectArchivePanelDeltasAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
55
|
+
rebuildTaskMenuDeltasAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
54
56
|
getApplicationConfigurationAsync(request: carriers.Configuration_GetApplicationConfigurationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
55
57
|
getApplicationConfigurationAsync(application: string, instance: string, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
56
58
|
getPageConfigurationAsync(request: carriers.Configuration_GetPageConfigurationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
@@ -745,6 +747,64 @@ export class ConfigurationAgent extends base.WebApiBase implements IConfiguratio
|
|
|
745
747
|
}
|
|
746
748
|
|
|
747
749
|
|
|
750
|
+
private async _rebuildCustomObjectArchivePanelDeltasAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
751
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
752
|
+
base.WebApiBase.SetPending(options);
|
|
753
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
754
|
+
try {
|
|
755
|
+
config.baseURL = this._options.baseUrl;
|
|
756
|
+
const response = await this._axios.post("RebuildCustomObjectArchivePanelDeltas", undefined , config);
|
|
757
|
+
base.WebApiBase.SetCompleted(options);
|
|
758
|
+
const res = response.data;
|
|
759
|
+
resolve(res);
|
|
760
|
+
}
|
|
761
|
+
catch( err ) {
|
|
762
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
763
|
+
reject(err);
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Flush and rebuild CustomObjectArchivePanel deltas.
|
|
771
|
+
* @returns No return value
|
|
772
|
+
*/
|
|
773
|
+
public async rebuildCustomObjectArchivePanelDeltasAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
774
|
+
{
|
|
775
|
+
return this._rebuildCustomObjectArchivePanelDeltasAsync(webapi_options);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
private async _rebuildTaskMenuDeltasAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
780
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
781
|
+
base.WebApiBase.SetPending(options);
|
|
782
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
783
|
+
try {
|
|
784
|
+
config.baseURL = this._options.baseUrl;
|
|
785
|
+
const response = await this._axios.post("RebuildTaskMenuDeltas", undefined , config);
|
|
786
|
+
base.WebApiBase.SetCompleted(options);
|
|
787
|
+
const res = response.data;
|
|
788
|
+
resolve(res);
|
|
789
|
+
}
|
|
790
|
+
catch( err ) {
|
|
791
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
792
|
+
reject(err);
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Flush and rebuild TaskMenu deltas.
|
|
800
|
+
* @returns No return value
|
|
801
|
+
*/
|
|
802
|
+
public async rebuildTaskMenuDeltasAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
803
|
+
{
|
|
804
|
+
return this._rebuildTaskMenuDeltasAsync(webapi_options);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
|
|
748
808
|
private async _getApplicationConfigurationAsync(request: carriers.Configuration_GetApplicationConfigurationRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
749
809
|
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
750
810
|
base.WebApiBase.SetPending(options);
|
package/src/ContactAgent.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|