-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlookup.ts
32 lines (26 loc) · 874 Bytes
/
lookup.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Conversation } from '@sinch/sdk-core';
import {
getAppIdFromConfig,
getContactIdFromConfig,
initConversationService,
printFullResponse,
} from '../../config';
(async () => {
console.log('******************************');
console.log('* Capability_QueryCapability *');
console.log('******************************');
const appId = getAppIdFromConfig();
const contactId = getContactIdFromConfig();
const requestData: Conversation.LookupCapabilityRequestData<Conversation.ContactId> = {
lookupCapabilityRequestBody: {
app_id: appId,
recipient: {
contact_id: contactId,
},
request_id: 'myPersonalId_' + new Date().getTime(),
},
};
const conversationService = initConversationService();
const response = await conversationService.capability.lookup(requestData);
printFullResponse(response);
})();