@sinch/conversation 1.3.0 → 1.4.0
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/models/v1/audit-record/audit-record.d.ts +18 -0
- package/dist/models/v1/audit-record/audit-record.js +3 -0
- package/dist/models/v1/audit-record/audit-record.js.map +1 -0
- package/dist/models/v1/audit-record/index.d.ts +1 -0
- package/dist/models/v1/audit-record/index.js +3 -0
- package/dist/models/v1/audit-record/index.js.map +1 -0
- package/dist/models/v1/audit-records-list/audit-records-list.d.ts +8 -0
- package/dist/models/v1/audit-records-list/audit-records-list.js +3 -0
- package/dist/models/v1/audit-records-list/audit-records-list.js.map +1 -0
- package/dist/models/v1/audit-records-list/index.d.ts +1 -0
- package/dist/models/v1/audit-records-list/index.js +3 -0
- package/dist/models/v1/audit-records-list/index.js.map +1 -0
- package/dist/models/v1/calendar-message/calendar-message.d.ts +14 -0
- package/dist/models/v1/calendar-message/calendar-message.js +3 -0
- package/dist/models/v1/calendar-message/calendar-message.js.map +1 -0
- package/dist/models/v1/calendar-message/index.d.ts +1 -0
- package/dist/models/v1/calendar-message/index.js +3 -0
- package/dist/models/v1/calendar-message/index.js.map +1 -0
- package/dist/models/v1/card-message/card-message.d.ts +7 -1
- package/dist/models/v1/card-message/index.d.ts +1 -1
- package/dist/models/v1/channel-identity/channel-identity.d.ts +1 -1
- package/dist/models/v1/channel-specific-message/channel-specific-message.d.ts +22 -1
- package/dist/models/v1/channel-specific-message/index.d.ts +1 -1
- package/dist/models/v1/choice/choice.d.ts +47 -1
- package/dist/models/v1/choice-item/choice-item.d.ts +1 -1
- package/dist/models/v1/choice-message/choice-message.d.ts +2 -2
- package/dist/models/v1/client-credentials/client-credentials.d.ts +6 -0
- package/dist/models/v1/consent-identity/consent-identity.d.ts +7 -0
- package/dist/models/v1/consent-identity/consent-identity.js +3 -0
- package/dist/models/v1/consent-identity/consent-identity.js.map +1 -0
- package/dist/models/v1/consent-identity/index.d.ts +1 -0
- package/dist/models/v1/consent-identity/index.js +3 -0
- package/dist/models/v1/consent-identity/index.js.map +1 -0
- package/dist/models/v1/contact-settings/contact-settings.d.ts +7 -0
- package/dist/models/v1/contact-settings/contact-settings.js +3 -0
- package/dist/models/v1/contact-settings/contact-settings.js.map +1 -0
- package/dist/models/v1/contact-settings/index.d.ts +1 -0
- package/dist/models/v1/contact-settings/index.js +3 -0
- package/dist/models/v1/contact-settings/index.js.map +1 -0
- package/dist/models/v1/conversation-channel/conversation-channel.d.ts +2 -2
- package/dist/models/v1/conversation-channel-credential/conversation-channel-credential.d.ts +3 -2
- package/dist/models/v1/conversation-message/conversation-message.d.ts +1 -1
- package/dist/models/v1/enums.d.ts +7 -1
- package/dist/models/v1/identity-conflict/identity-conflict.d.ts +8 -0
- package/dist/models/v1/identity-conflict/identity-conflict.js +3 -0
- package/dist/models/v1/identity-conflict/identity-conflict.js.map +1 -0
- package/dist/models/v1/identity-conflict/index.d.ts +1 -0
- package/dist/models/v1/identity-conflict/index.js +3 -0
- package/dist/models/v1/identity-conflict/index.js.map +1 -0
- package/dist/models/v1/index.d.ts +25 -3
- package/dist/models/v1/index.js +25 -3
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/inject-message-request/inject-message-request.d.ts +1 -1
- package/dist/models/v1/kakaotalk-button/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-button/index.js +3 -0
- package/dist/models/v1/kakaotalk-button/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.d.ts +27 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.js +3 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-carousel/index.js +3 -0
- package/dist/models/v1/kakaotalk-carousel/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.d.ts +38 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.js +3 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/index.js +3 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.d.ts +12 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.js +3 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.js.map +1 -0
- package/dist/models/v1/kakaotalk-commerce/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-commerce/index.js +3 -0
- package/dist/models/v1/kakaotalk-commerce/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.d.ts +7 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.js +3 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.js.map +1 -0
- package/dist/models/v1/kakaotalk-coupon/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-coupon/index.js +3 -0
- package/dist/models/v1/kakaotalk-coupon/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.d.ts +79 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.js +3 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.js.map +1 -0
- package/dist/models/v1/kakaotalk-image/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-image/index.js +3 -0
- package/dist/models/v1/kakaotalk-image/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.d.ts +6 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.js +3 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.js.map +1 -0
- package/dist/models/v1/kakaotalk-message/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-message/index.js +3 -0
- package/dist/models/v1/kakaotalk-message/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.d.ts +16 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.js +3 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.js.map +1 -0
- package/dist/models/v1/kakaotalk-pricing/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-pricing/index.js +3 -0
- package/dist/models/v1/kakaotalk-pricing/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.d.ts +33 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.js +3 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.js.map +1 -0
- package/dist/models/v1/line-notification-template/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template/index.js +3 -0
- package/dist/models/v1/line-notification-template/index.js.map +1 -0
- package/dist/models/v1/line-notification-template/line-notification-template.d.ts +10 -0
- package/dist/models/v1/line-notification-template/line-notification-template.js +3 -0
- package/dist/models/v1/line-notification-template/line-notification-template.js.map +1 -0
- package/dist/models/v1/line-notification-template-body/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-body/index.js +3 -0
- package/dist/models/v1/line-notification-template-body/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.d.ts +13 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.js +3 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.js.map +1 -0
- package/dist/models/v1/line-notification-template-button/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-button/index.js +3 -0
- package/dist/models/v1/line-notification-template-button/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.d.ts +9 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.js +3 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.js.map +1 -0
- package/dist/models/v1/line-notification-template-item/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-item/index.js +3 -0
- package/dist/models/v1/line-notification-template-item/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.d.ts +9 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.js +3 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.js.map +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.d.ts +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.js +3 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.js.map +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.d.ts +29 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.js +3 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.js.map +1 -0
- package/dist/models/v1/mod-callback-events/conversation-callback-event/conversation-callback-event.d.ts +2 -2
- package/dist/models/v1/project-settings/index.d.ts +1 -0
- package/dist/models/v1/project-settings/index.js +3 -0
- package/dist/models/v1/project-settings/index.js.map +1 -0
- package/dist/models/v1/project-settings/project-settings.d.ts +10 -0
- package/dist/models/v1/project-settings/project-settings.js +3 -0
- package/dist/models/v1/project-settings/project-settings.js.map +1 -0
- package/dist/models/v1/project-settings-request/index.d.ts +1 -0
- package/dist/models/v1/project-settings-request/index.js +3 -0
- package/dist/models/v1/project-settings-request/index.js.map +1 -0
- package/dist/models/v1/project-settings-request/project-settings-request.d.ts +10 -0
- package/dist/models/v1/project-settings-request/project-settings-request.js +3 -0
- package/dist/models/v1/project-settings-request/project-settings-request.js.map +1 -0
- package/dist/models/v1/requests/consents/consents-request-data.d.ts +17 -0
- package/dist/models/v1/requests/consents/consents-request-data.js +3 -0
- package/dist/models/v1/requests/consents/consents-request-data.js.map +1 -0
- package/dist/models/v1/requests/contact/contact-request-data.d.ts +6 -0
- package/dist/models/v1/requests/index.d.ts +2 -0
- package/dist/models/v1/requests/index.js +2 -0
- package/dist/models/v1/requests/index.js.map +1 -1
- package/dist/models/v1/requests/messages/messages-request-data.d.ts +8 -1
- package/dist/models/v1/requests/project-settings/project-settings-request-data.d.ts +13 -0
- package/dist/models/v1/requests/project-settings/project-settings-request-data.js +3 -0
- package/dist/models/v1/requests/project-settings/project-settings-request-data.js.map +1 -0
- package/dist/models/v1/send-message-request/send-message-request.d.ts +2 -2
- package/dist/models/v1/share-location-message/index.d.ts +1 -0
- package/dist/models/v1/share-location-message/index.js +3 -0
- package/dist/models/v1/share-location-message/index.js.map +1 -0
- package/dist/models/v1/share-location-message/share-location-message.d.ts +6 -0
- package/dist/models/v1/share-location-message/share-location-message.js +3 -0
- package/dist/models/v1/share-location-message/share-location-message.js.map +1 -0
- package/dist/models/v1/smart-conversation/smart-conversation.d.ts +1 -1
- package/dist/models/v1/whatsapp-payment-order-details/index.d.ts +1 -1
- package/dist/models/v1/whatsapp-payment-order-details/whatsapp-payment-order-details.d.ts +25 -6
- package/dist/rest/v1/app/app-api.d.ts +3 -8
- package/dist/rest/v1/app/app-api.js +3 -13
- package/dist/rest/v1/app/app-api.js.map +1 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +7 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js +10 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/capability/capability-api.d.ts +2 -7
- package/dist/rest/v1/capability/capability-api.js +2 -8
- package/dist/rest/v1/capability/capability-api.js.map +1 -1
- package/dist/rest/v1/consents/consents-api.d.ts +20 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.d.ts +13 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.js +17 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/consents/consents-api.js +61 -0
- package/dist/rest/v1/consents/consents-api.js.map +1 -0
- package/dist/rest/v1/consents/index.d.ts +2 -0
- package/dist/rest/v1/consents/index.js +19 -0
- package/dist/rest/v1/consents/index.js.map +1 -0
- package/dist/rest/v1/contact/contact-api.d.ts +12 -9
- package/dist/rest/v1/contact/contact-api.jest.fixture.d.ts +5 -1
- package/dist/rest/v1/contact/contact-api.jest.fixture.js +4 -0
- package/dist/rest/v1/contact/contact-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/contact/contact-api.js +30 -15
- package/dist/rest/v1/contact/contact-api.js.map +1 -1
- package/dist/rest/v1/conversation/conversation-api.d.ts +4 -8
- package/dist/rest/v1/conversation/conversation-api.js +3 -17
- package/dist/rest/v1/conversation/conversation-api.js.map +1 -1
- package/dist/rest/v1/conversation-domain-api.d.ts +12 -14
- package/dist/rest/v1/conversation-domain-api.js +25 -69
- package/dist/rest/v1/conversation-domain-api.js.map +1 -1
- package/dist/rest/v1/conversation-service.d.ts +31 -2
- package/dist/rest/v1/conversation-service.js +126 -32
- package/dist/rest/v1/conversation-service.js.map +1 -1
- package/dist/rest/v1/events/events-api.d.ts +4 -8
- package/dist/rest/v1/events/events-api.js +3 -12
- package/dist/rest/v1/events/events-api.js.map +1 -1
- package/dist/rest/v1/index.d.ts +3 -0
- package/dist/rest/v1/index.js +3 -0
- package/dist/rest/v1/index.js.map +1 -1
- package/dist/rest/v1/messages/messages-api.d.ts +12 -10
- package/dist/rest/v1/messages/messages-api.jest.fixture.d.ts +7 -1
- package/dist/rest/v1/messages/messages-api.jest.fixture.js +4 -0
- package/dist/rest/v1/messages/messages-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/messages/messages-api.js +32 -15
- package/dist/rest/v1/messages/messages-api.js.map +1 -1
- package/dist/rest/v1/project-settings/index.d.ts +2 -0
- package/dist/rest/v1/project-settings/index.js +19 -0
- package/dist/rest/v1/project-settings/index.js.map +1 -0
- package/dist/rest/v1/project-settings/project-settings-api.d.ts +30 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.d.ts +20 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.js +25 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/project-settings/project-settings-api.js +101 -0
- package/dist/rest/v1/project-settings/project-settings-api.js.map +1 -0
- package/dist/rest/v1/templates-v1/templates-v1-api.d.ts +8 -8
- package/dist/rest/v1/templates-v1/templates-v1-api.js +8 -13
- package/dist/rest/v1/templates-v1/templates-v1-api.js.map +1 -1
- package/dist/rest/v1/templates-v2/templates-v2-api.d.ts +3 -8
- package/dist/rest/v1/templates-v2/templates-v2-api.js +3 -14
- package/dist/rest/v1/templates-v2/templates-v2-api.js.map +1 -1
- package/dist/rest/v1/transcoding/transcoding-api.d.ts +2 -7
- package/dist/rest/v1/transcoding/transcoding-api.js +2 -8
- package/dist/rest/v1/transcoding/transcoding-api.js.map +1 -1
- package/dist/rest/v1/webhooks/webhooks-api.d.ts +2 -7
- package/dist/rest/v1/webhooks/webhooks-api.js +2 -12
- package/dist/rest/v1/webhooks/webhooks-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsentsApi = void 0;
|
|
4
|
+
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
|
+
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
|
+
class ConsentsApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ConsentsApi');
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get identities from consent list
|
|
12
|
+
* Get all identities contained within a consent list for a given project id, app id, and list type.
|
|
13
|
+
* @param { ListIdentitiesRequestData } data - The data to provide to the API call.
|
|
14
|
+
* @return {ApiListPromise<ConsentIdentity>}
|
|
15
|
+
*/
|
|
16
|
+
listIdentities(data) {
|
|
17
|
+
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token']);
|
|
18
|
+
const headers = {
|
|
19
|
+
'Content-Type': 'application/json',
|
|
20
|
+
'Accept': 'application/json',
|
|
21
|
+
};
|
|
22
|
+
const body = '';
|
|
23
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/apps/${data['app_id']}/consents/${data['list_type']}`;
|
|
24
|
+
const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
25
|
+
const operationProperties = {
|
|
26
|
+
pagination: sdk_client_1.PaginationEnum.TOKEN2,
|
|
27
|
+
apiName: this.apiName,
|
|
28
|
+
operationId: 'ListIdentitiesFromConsentsList',
|
|
29
|
+
dataKey: 'identities',
|
|
30
|
+
};
|
|
31
|
+
// Create the promise containing the response wrapped as a PageResult
|
|
32
|
+
const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
|
|
33
|
+
// Add properties to the Promise to offer the possibility to use it as an iterator
|
|
34
|
+
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
35
|
+
return listPromise;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get audit records from consent lists
|
|
39
|
+
* Get all audit records associated with the given identity from the consent lists within the specified project and app.
|
|
40
|
+
* @param { ListAuditRecordsRequestData } data - The data to provide to the API call.
|
|
41
|
+
*/
|
|
42
|
+
async listAuditRecords(data) {
|
|
43
|
+
const getParams = this.client.extractQueryParams(data, []);
|
|
44
|
+
const headers = {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
'Accept': 'application/json',
|
|
47
|
+
};
|
|
48
|
+
const body = '';
|
|
49
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/apps/${data['app_id']}/consents/identities/${data['identity']}`;
|
|
50
|
+
const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
51
|
+
const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
|
|
52
|
+
return this.client.processCall({
|
|
53
|
+
url,
|
|
54
|
+
requestOptions,
|
|
55
|
+
apiName: this.apiName,
|
|
56
|
+
operationId: 'ListAuditRecordsFromConsentsList',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ConsentsApi = ConsentsApi;
|
|
61
|
+
//# sourceMappingURL=consents-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consents-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/consents/consents-api.ts"],"names":[],"mappings":";;;AAAA,kDAO2B;AAO3B,wEAAmE;AAGnE,MAAa,WAAY,SAAQ,+CAAqB;IAEpD,YAAY,aAAwC;QAClD,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACI,cAAc,CAAC,IAA+B;QACnD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA4B,IAAI,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;QAC/G,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,SAAS,IAAI,CAAC,QAAQ,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAE1K,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAEpH,MAAM,mBAAmB,GAA2B;YAClD,UAAU,EAAE,2BAAc,CAAC,MAAM;YACjC,OAAO,EAAE,I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AC,OAAO;YACrB,WAAW,EAAE,kCAAkC;SAChD,CAAC,CAAC;IACL,CAAC;CAEF;AA1ED,kCA0EC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./consents-api"), exports);
|
|
18
|
+
__exportStar(require("./consents-api.jest.fixture"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/consents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8DAA4C"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { ApiListPromise
|
|
2
|
-
import { Contact, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetChannelProfileResponse, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, Recipient, UpdateContactRequestData } from '../../../models';
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
|
+
import { Contact, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetChannelProfileResponse, GetContactRequestData, IdentityConflict, ListContactsRequestData, ListIdentityConflictsRequestData, MergeContactRequestData, Recipient, UpdateContactRequestData } from '../../../models';
|
|
3
3
|
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
4
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
4
5
|
export declare class ContactApi extends ConversationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
6
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
11
7
|
/**
|
|
12
8
|
* Create a Contact
|
|
13
9
|
* Most Conversation API contacts are [created automatically](https://developers.sinch.com/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.
|
|
@@ -41,7 +37,14 @@ export declare class ContactApi extends ConversationDomainApi {
|
|
|
41
37
|
* @param { ListContactsRequestData } data - The data to provide to the API call.
|
|
42
38
|
* @return {ApiListPromise<Contact>}
|
|
43
39
|
*/
|
|
44
|
-
list(data
|
|
40
|
+
list(data?: ListContactsRequestData): ApiListPromise<Contact>;
|
|
41
|
+
/**
|
|
42
|
+
* Lists Contact Identity Conflicts
|
|
43
|
+
* Lists contact identity conflicts across supported SIM-based channels (SMS, MMS, RCS). Use this to identify contact records sharing the same identity (e.g., phone number), which must be resolved before enabling the Unified Contact ID feature.
|
|
44
|
+
* @param { ListIdentityConflictsRequestData } data - The data to provide to the API call.
|
|
45
|
+
* @return {ApiListPromise<IdentityConflict>}
|
|
46
|
+
*/
|
|
47
|
+
listIdentityConflicts(data: ListIdentityConflictsRequestData): ApiListPromise<IdentityConflict>;
|
|
45
48
|
/**
|
|
46
49
|
* Merge two Contacts
|
|
47
50
|
* The remaining contact will contain all conversations that the removed contact did. If both contacts had conversations within the same App, messages from the removed contact will be merged into corresponding active conversations in the destination contact. Channel identities will be moved from the source contact to the destination contact only for channels that weren\'t present there before. Moved channel identities will be placed at the bottom of the channel priority list. Optional fields from the source contact will be copied only if corresponding fields in the destination contact are empty The contact being removed cannot be referenced after this call.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
2
|
import { ContactApi } from './contact-api';
|
|
3
|
-
import { Contact, Recipient, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, UpdateContactRequestData, GetChannelProfileResponse } from '../../../models';
|
|
3
|
+
import { Contact, Recipient, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, UpdateContactRequestData, GetChannelProfileResponse, IdentityConflict, ListIdentityConflictsRequestData } from '../../../models';
|
|
4
4
|
export declare class ContactApiFixture implements Partial<Readonly<ContactApi>> {
|
|
5
5
|
/**
|
|
6
6
|
* Fixture associated to function create
|
|
@@ -24,6 +24,10 @@ export declare class ContactApiFixture implements Partial<Readonly<ContactApi>>
|
|
|
24
24
|
* Fixture associated to function list
|
|
25
25
|
*/
|
|
26
26
|
list: jest.Mock<ApiListPromise<Contact>, [ListContactsRequestData]>;
|
|
27
|
+
/**
|
|
28
|
+
* Fixture associated to function listIdentityConflicts
|
|
29
|
+
*/
|
|
30
|
+
listIdentityConflicts: jest.Mock<ApiListPromise<IdentityConflict>, [ListIdentityConflictsRequestData]>;
|
|
27
31
|
/**
|
|
28
32
|
* Fixture associated to function mergeContact
|
|
29
33
|
*/
|
|
@@ -23,6 +23,10 @@ class ContactApiFixture {
|
|
|
23
23
|
* Fixture associated to function list
|
|
24
24
|
*/
|
|
25
25
|
this.list = jest.fn();
|
|
26
|
+
/**
|
|
27
|
+
* Fixture associated to function listIdentityConflicts
|
|
28
|
+
*/
|
|
29
|
+
this.listIdentityConflicts = jest.fn();
|
|
26
30
|
/**
|
|
27
31
|
* Fixture associated to function mergeContact
|
|
28
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;AAiBA,MAAa,iBAAiB;IAA9B;QAEE;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;QACnF;;WAEG;QACI,WAAM,GAAwD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/E;;WAEG;QACI,sBAAiB,GAGpB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,QAAG,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,SAAI,GAAkE,IAAI,CAAC,EAAE,EAAE,CAAC;QACvF;;WAEG;QACI,0BAAqB,GAC8C,IAAI,CAAC,EAAE,EAAE,CAAC;QACpF;;WAEG;QACI,iBAAY,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QACxF;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;IACrF,CAAC;CAAA;AAtCD,8CAsCC"}
|
|
@@ -4,13 +4,8 @@ exports.ContactApi = void 0;
|
|
|
4
4
|
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
5
|
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
6
|
class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
11
|
-
*/
|
|
12
|
-
constructor(sinchClientParameters) {
|
|
13
|
-
super(sinchClientParameters, 'ContactApi');
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ContactApi');
|
|
14
9
|
}
|
|
15
10
|
/**
|
|
16
11
|
* Create a Contact
|
|
@@ -18,7 +13,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
18
13
|
* @param { CreateContactRequestData } data - The data to provide to the API call.
|
|
19
14
|
*/
|
|
20
15
|
async create(data) {
|
|
21
|
-
this.client = this.getSinchClient();
|
|
22
16
|
const getParams = this.client.extractQueryParams(data, []);
|
|
23
17
|
const headers = {
|
|
24
18
|
'Content-Type': 'application/json',
|
|
@@ -41,7 +35,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
41
35
|
* @param { DeleteContactRequestData } data - The data to provide to the API call.
|
|
42
36
|
*/
|
|
43
37
|
async delete(data) {
|
|
44
|
-
this.client = this.getSinchClient();
|
|
45
38
|
const getParams = this.client.extractQueryParams(data, []);
|
|
46
39
|
const headers = {
|
|
47
40
|
'Content-Type': 'application/json',
|
|
@@ -65,7 +58,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
65
58
|
* @param { GetChannelProfileRequestData<Recipient> } data - The data to provide to the API call.
|
|
66
59
|
*/
|
|
67
60
|
async getChannelProfile(data) {
|
|
68
|
-
this.client = this.getSinchClient();
|
|
69
61
|
const getParams = this.client.extractQueryParams(data, []);
|
|
70
62
|
const headers = {
|
|
71
63
|
'Content-Type': 'application/json',
|
|
@@ -90,7 +82,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
90
82
|
* @param { GetContactRequestData } data - The data to provide to the API call.
|
|
91
83
|
*/
|
|
92
84
|
async get(data) {
|
|
93
|
-
this.client = this.getSinchClient();
|
|
94
85
|
const getParams = this.client.extractQueryParams(data, []);
|
|
95
86
|
const headers = {
|
|
96
87
|
'Content-Type': 'application/json',
|
|
@@ -114,8 +105,7 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
114
105
|
* @return {ApiListPromise<Contact>}
|
|
115
106
|
*/
|
|
116
107
|
list(data) {
|
|
117
|
-
|
|
118
|
-
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token', 'external_id', 'channel', 'identity']);
|
|
108
|
+
const getParams = this.client.extractQueryParams(data ?? {}, ['page_size', 'page_token', 'external_id', 'channel', 'identity']);
|
|
119
109
|
const headers = {
|
|
120
110
|
'Content-Type': 'application/json',
|
|
121
111
|
'Accept': 'application/json',
|
|
@@ -135,13 +125,39 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
135
125
|
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
136
126
|
return listPromise;
|
|
137
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Lists Contact Identity Conflicts
|
|
130
|
+
* Lists contact identity conflicts across supported SIM-based channels (SMS, MMS, RCS). Use this to identify contact records sharing the same identity (e.g., phone number), which must be resolved before enabling the Unified Contact ID feature.
|
|
131
|
+
* @param { ListIdentityConflictsRequestData } data - The data to provide to the API call.
|
|
132
|
+
* @return {ApiListPromise<IdentityConflict>}
|
|
133
|
+
*/
|
|
134
|
+
listIdentityConflicts(data) {
|
|
135
|
+
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token']);
|
|
136
|
+
const headers = {
|
|
137
|
+
'Content-Type': 'application/json',
|
|
138
|
+
'Accept': 'application/json',
|
|
139
|
+
};
|
|
140
|
+
const body = '';
|
|
141
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/contacts:identityConflicts`;
|
|
142
|
+
const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
143
|
+
const operationProperties = {
|
|
144
|
+
pagination: sdk_client_1.PaginationEnum.TOKEN2,
|
|
145
|
+
apiName: this.apiName,
|
|
146
|
+
operationId: 'ListIdentityConflicts',
|
|
147
|
+
dataKey: 'conflicts',
|
|
148
|
+
};
|
|
149
|
+
// Create the promise containing the response wrapped as a PageResult
|
|
150
|
+
const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
|
|
151
|
+
// Add properties to the Promise to offer the possibility to use it as an iterator
|
|
152
|
+
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
153
|
+
return listPromise;
|
|
154
|
+
}
|
|
138
155
|
/**
|
|
139
156
|
* Merge two Contacts
|
|
140
157
|
* The remaining contact will contain all conversations that the removed contact did. If both contacts had conversations within the same App, messages from the removed contact will be merged into corresponding active conversations in the destination contact. Channel identities will be moved from the source contact to the destination contact only for channels that weren\'t present there before. Moved channel identities will be placed at the bottom of the channel priority list. Optional fields from the source contact will be copied only if corresponding fields in the destination contact are empty The contact being removed cannot be referenced after this call.
|
|
141
158
|
* @param { MergeContactRequestData } data - The data to provide to the API call.
|
|
142
159
|
*/
|
|
143
160
|
async mergeContact(data) {
|
|
144
|
-
this.client = this.getSinchClient();
|
|
145
161
|
const getParams = this.client.extractQueryParams(data, []);
|
|
146
162
|
const headers = {
|
|
147
163
|
'Content-Type': 'application/json',
|
|
@@ -164,7 +180,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
164
180
|
* @param { UpdateContactRequestData } data - The data to provide to the API call.
|
|
165
181
|
*/
|
|
166
182
|
async update(data) {
|
|
167
|
-
this.client = this.getSinchClient();
|
|
168
183
|
const getParams = this.client.extractQueryParams(data, ['update_mask']);
|
|
169
184
|
const headers = {
|
|
170
185
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"contact-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.ts"],"names":[],"mappings":";;;A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,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,aAAa,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAEpJ,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAClG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAU;YACtC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;IACL,CAAC;CAEF;AAlQD,gCAkQC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { ApiListPromise
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
2
|
import { Conversation, ConversationRecentMessage, CreateConversationRequestData, DeleteConversationRequestData, GetConversationRequestData, InjectEventRequestData, InjectEventResponse, InjectMessageRequestData, ListConversationsRequestData, ListRecentConversationsRequestData, StopActiveConversationRequestData, UpdateConversationRequestData } from '../../../models';
|
|
3
3
|
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
4
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
4
5
|
export declare class ConversationApi extends ConversationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
6
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
11
7
|
/**
|
|
12
8
|
* Create a conversation
|
|
13
9
|
* Creates a new empty conversation. It is generally not needed to create a conversation explicitly since sending or receiving a message automatically creates a new conversation if it does not already exist between the given app and contact. Creating empty conversation is useful if the metadata of the conversation should be populated when the first message in the conversation is a contact message or the first message in the conversation comes out-of-band and needs to be injected with InjectMessage endpoint.
|
|
@@ -44,7 +40,7 @@ export declare class ConversationApi extends ConversationDomainApi {
|
|
|
44
40
|
* @param { ListConversationsRequestData } data - The data to provide to the API call.
|
|
45
41
|
* @return {ApiListPromise<Conversation>}
|
|
46
42
|
*/
|
|
47
|
-
list(data
|
|
43
|
+
list(data?: ListConversationsRequestData): ApiListPromise<Conversation>;
|
|
48
44
|
/**
|
|
49
45
|
* List recent conversations
|
|
50
46
|
* This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation.
|
|
@@ -4,13 +4,8 @@ exports.ConversationApi = void 0;
|
|
|
4
4
|
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
5
|
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
6
|
class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
11
|
-
*/
|
|
12
|
-
constructor(sinchClientParameters) {
|
|
13
|
-
super(sinchClientParameters, 'ConversationApi');
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ConversationApi');
|
|
14
9
|
}
|
|
15
10
|
/**
|
|
16
11
|
* Create a conversation
|
|
@@ -18,7 +13,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
18
13
|
* @param { CreateConversationRequestData } data - The data to provide to the API call.
|
|
19
14
|
*/
|
|
20
15
|
async create(data) {
|
|
21
|
-
this.client = this.getSinchClient();
|
|
22
16
|
const getParams = this.client.extractQueryParams(data, []);
|
|
23
17
|
const headers = {
|
|
24
18
|
'Content-Type': 'application/json',
|
|
@@ -41,7 +35,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
41
35
|
* @param { DeleteConversationRequestData } data - The data to provide to the API call.
|
|
42
36
|
*/
|
|
43
37
|
async delete(data) {
|
|
44
|
-
this.client = this.getSinchClient();
|
|
45
38
|
const getParams = this.client.extractQueryParams(data, []);
|
|
46
39
|
const headers = {
|
|
47
40
|
'Content-Type': 'application/json',
|
|
@@ -64,7 +57,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
64
57
|
* @param { GetConversationRequestData } data - The data to provide to the API call.
|
|
65
58
|
*/
|
|
66
59
|
async get(data) {
|
|
67
|
-
this.client = this.getSinchClient();
|
|
68
60
|
const getParams = this.client.extractQueryParams(data, []);
|
|
69
61
|
const headers = {
|
|
70
62
|
'Content-Type': 'application/json',
|
|
@@ -87,7 +79,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
87
79
|
* @param { InjectEventRequestData } data - The data to provide to the API call.
|
|
88
80
|
*/
|
|
89
81
|
async injectEvent(data) {
|
|
90
|
-
this.client = this.getSinchClient();
|
|
91
82
|
const getParams = this.client.extractQueryParams(data, []);
|
|
92
83
|
const headers = {
|
|
93
84
|
'Content-Type': 'application/json',
|
|
@@ -112,7 +103,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
112
103
|
* @param { InjectMessageRequestData } data - The data to provide to the API call.
|
|
113
104
|
*/
|
|
114
105
|
async injectMessage(data) {
|
|
115
|
-
this.client = this.getSinchClient();
|
|
116
106
|
const getParams = this.client.extractQueryParams(data, []);
|
|
117
107
|
const headers = {
|
|
118
108
|
'Content-Type': 'application/json',
|
|
@@ -136,8 +126,7 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
136
126
|
* @return {ApiListPromise<Conversation>}
|
|
137
127
|
*/
|
|
138
128
|
list(data) {
|
|
139
|
-
|
|
140
|
-
const getParams = this.client.extractQueryParams(data, [
|
|
129
|
+
const getParams = this.client.extractQueryParams(data ?? {}, [
|
|
141
130
|
'app_id',
|
|
142
131
|
'contact_id',
|
|
143
132
|
'only_active',
|
|
@@ -171,7 +160,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
171
160
|
* @return {ApiListPromise<ConversationRecentMessage>}
|
|
172
161
|
*/
|
|
173
162
|
listRecent(data) {
|
|
174
|
-
this.client = this.getSinchClient();
|
|
175
163
|
const getParams = this.client.extractQueryParams(data, [
|
|
176
164
|
'app_id',
|
|
177
165
|
'only_active',
|
|
@@ -206,7 +194,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
206
194
|
* @param { StopActiveConversationRequestData } data - The data to provide to the API call.
|
|
207
195
|
*/
|
|
208
196
|
async stopActive(data) {
|
|
209
|
-
this.client = this.getSinchClient();
|
|
210
197
|
const getParams = this.client.extractQueryParams(data, []);
|
|
211
198
|
const headers = {
|
|
212
199
|
'Content-Type': 'application/json',
|
|
@@ -229,7 +216,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
229
216
|
* @param { UpdateConversationRequestData } data - The data to provide to the API call.
|
|
230
217
|
*/
|
|
231
218
|
async update(data) {
|
|
232
|
-
this.client = this.getSinchClient();
|
|
233
219
|
data['metadata_update_strategy'] = data['metadata_update_strategy'] !== undefined
|
|
234
220
|
? data['metadata_update_strategy']
|
|
235
221
|
: 'REPLACE';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/conversation/conversation-api.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"conversation-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/conversation/conversation-api.ts"],"names":[],"mappings":";;;AAAA,kDAO2B;AAe3B,wEAAmE;AAGnE,MAAa,eAAgB,SAAQ,+CAAqB;IAExD,YAAY,aAAwC;QAClD,KAAK,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAC1C,CAAC;IAED;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E,CAAC;QAE9J,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAClG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAe;YAC3C,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,oBAAoB;SAClC,CAAC,CAAC;IACL,CAAC;CAEF;AA3SD,0CA2SC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { Api, ApiClient, ConversationRegion,
|
|
1
|
+
import { Api, ApiClient, ConversationRegion, UnifiedCredentials } from '@sinch/sdk-client';
|
|
2
|
+
import { LazyConversationApiClient, LazyConversationTemplateApiClient } from './conversation-service';
|
|
2
3
|
export declare const DEFAULT_CONVERSATION_REGION_DEPRECATION_WARNING: string;
|
|
3
4
|
export declare class ConversationDomainApi implements Api {
|
|
5
|
+
readonly lazyClient: LazyConversationApiClient | LazyConversationTemplateApiClient;
|
|
4
6
|
readonly apiName: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
constructor(lazyClient: LazyConversationApiClient | LazyConversationTemplateApiClient, apiName: string);
|
|
8
|
+
get client(): ApiClient;
|
|
9
|
+
/**
|
|
10
|
+
* Kept for backward compatibility - TODO: remove in future major release
|
|
11
|
+
* @return {ApiClient}
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
14
|
+
getSinchClient(): ApiClient;
|
|
8
15
|
/**
|
|
9
16
|
* Update the default hostname for the API
|
|
10
17
|
* @param {string} hostname - The new hostname to use for the APIs.
|
|
@@ -19,14 +26,5 @@ export declare class ConversationDomainApi implements Api {
|
|
|
19
26
|
* Updates the credentials used to authenticate API requests
|
|
20
27
|
* @param {UnifiedCredentials} credentials
|
|
21
28
|
*/
|
|
22
|
-
setCredentials(credentials: UnifiedCredentials): void;
|
|
23
|
-
private resetApiClient;
|
|
24
|
-
/**
|
|
25
|
-
* Checks the configuration parameters are ok and initialize the API client. Once initialized, the same instance will
|
|
26
|
-
* be returned for the subsequent API calls (singleton pattern)
|
|
27
|
-
* @return {ApiClient} the API Client or throws an error in case the configuration parameters are not ok
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
getSinchClient(): ApiClient;
|
|
31
|
-
private buildHostname;
|
|
29
|
+
setCredentials(credentials: Partial<UnifiedCredentials>): void;
|
|
32
30
|
}
|