@opens/gateways 1.11.5 → 1.11.6
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/call-report/contracts/index.d.mts +126 -0
- package/dist/call-report/contracts/index.d.ts +126 -0
- package/dist/{integrations → call-report}/contracts/index.js +1 -1
- package/dist/call-report/contracts/index.js.map +1 -0
- package/dist/chat-config/contracts/index.d.mts +8 -1
- package/dist/chat-config/contracts/index.d.ts +8 -1
- package/dist/chat-webservice/contracts/index.d.mts +97 -0
- package/dist/chat-webservice/contracts/index.d.ts +97 -0
- package/dist/chat-webservice/contracts/index.js +19 -0
- package/dist/chat-webservice/contracts/index.js.map +1 -0
- package/dist/chat-webservice/contracts/index.mjs +1 -0
- package/dist/chat-webservice/contracts/index.mjs.map +1 -0
- package/dist/index.d.mts +45 -67
- package/dist/index.d.ts +45 -67
- package/dist/index.js +64 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/integrations/contracts/index.d.mts +0 -98
- package/dist/integrations/contracts/index.d.ts +0 -98
- package/dist/integrations/contracts/index.js.map +0 -1
- /package/dist/{integrations → call-report}/contracts/index.mjs +0 -0
- /package/dist/{integrations → call-report}/contracts/index.mjs.map +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { CompanyResponse, WorkGroupListResponse, WorkGroupResponse, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse } from './customer-service/contracts/index.mjs';
|
|
3
3
|
export { CompanyData, ManagedUser, User, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.mjs';
|
|
4
|
-
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
|
|
5
|
-
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse,
|
|
4
|
+
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
|
|
5
|
+
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse, Rule } from './chat-config/contracts/index.mjs';
|
|
6
6
|
import { CampaignQueryParams, CampaignPaginatedResponse, Campaign, CreateCampaignRequest, PatchCampaignRequest, CampaignContactQueryParams, CampaignContactPaginatedResponse, CampaignContactResponse, CreateCampaignContactRequest, PatchCampaignContactRequest, CampaignContactsDashboardQueryParams, CampaignContactsDashboardData, CampaignUser, CampaignWorkGroupQueryParams, CampaignWorkGroupPaginatedResponse, CreateCampaignWorkGroupRequest, CampaignWorkGroup } from './campaigns/contracts/index.mjs';
|
|
7
7
|
export { CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactQueryOperators, CampaignContactQueryValue, CampaignContactSortDirection, CampaignContactSortParams, CampaignContactsDashboardChannelPerformance, CampaignContactsDashboardEvolutionItem, CampaignContactsDashboardExactQueryOperators, CampaignContactsDashboardFunnelItem, CampaignContactsDashboardInterval, CampaignContactsDashboardMetrics, CampaignContactsDashboardQueryValue, CampaignContactsDashboardRangeQueryOperators, CampaignContactsDashboardStatusDistribution, CampaignContactsDashboardStatusMetrics, CampaignContactsDashboardSummary, CampaignContactsDashboardTopCampaign, CampaignProvider, CampaignRetryConfig, CampaignSchedule, CampaignStatus, WhatsAppPayload, WhatsAppTemplateComponent } from './campaigns/contracts/index.mjs';
|
|
8
8
|
import { GetConfigTemplatesParams, GetConfigTemplatesResponse } from './chat-adapter/contracts/index.mjs';
|
|
@@ -11,8 +11,10 @@ import { GetPresignedUrlRequest, UploadPresignedUrlResponse, AudioConvertRespons
|
|
|
11
11
|
export { IUploadPresignedUrlResponse } from './assets/contracts/index.mjs';
|
|
12
12
|
import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResponse } from './contact-list/contracts/index.mjs';
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.mjs';
|
|
14
|
-
import {
|
|
15
|
-
export {
|
|
14
|
+
import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.mjs';
|
|
15
|
+
export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
|
|
16
|
+
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
|
|
17
|
+
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -78,6 +80,12 @@ declare class ChatConfigGateway {
|
|
|
78
80
|
*/
|
|
79
81
|
getQueueById(queueId: string): Promise<Queue>;
|
|
80
82
|
getQueues(): Promise<Queue[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists queue memberships for a member.
|
|
85
|
+
* @param params - The member identifier and optional association filter.
|
|
86
|
+
* @returns The queue memberships for the given member.
|
|
87
|
+
*/
|
|
88
|
+
getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
|
|
81
89
|
/**
|
|
82
90
|
* Retrieves a Meta template configuration by its ID.
|
|
83
91
|
* @param templateId - The unique identifier of the template.
|
|
@@ -255,74 +263,40 @@ declare class ContactListGateway {
|
|
|
255
263
|
}
|
|
256
264
|
|
|
257
265
|
/**
|
|
258
|
-
* Gateway for interacting with the
|
|
266
|
+
* Gateway for interacting with the Chat Webservice API.
|
|
259
267
|
*/
|
|
260
|
-
declare class
|
|
268
|
+
declare class ChatWebserviceGateway {
|
|
261
269
|
private readonly httpClient;
|
|
262
270
|
private readonly baseUrl;
|
|
263
271
|
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
264
272
|
/**
|
|
265
|
-
*
|
|
266
|
-
* @param
|
|
267
|
-
* @returns The
|
|
268
|
-
*/
|
|
269
|
-
getPartnersByCompany({ companyId, name }: GetIntegrationPartnersByCompanyRequest): Promise<IntegrationPartner[]>;
|
|
270
|
-
/**
|
|
271
|
-
* Retrieves the hook catalog, optionally scoped by module.
|
|
272
|
-
* @param module - The optional module identifier used by the Integrations API filter.
|
|
273
|
-
* @returns The hook catalog items, filtered by module when provided.
|
|
273
|
+
* Lists live rooms assigned to a user.
|
|
274
|
+
* @param params - The recipient, company, and open-status filters.
|
|
275
|
+
* @returns The live room entries for the user.
|
|
274
276
|
*/
|
|
275
|
-
|
|
277
|
+
listLiveUserRooms(params: ListLiveUserRoomsRequest): Promise<LiveUserRoomResponse[]>;
|
|
276
278
|
/**
|
|
277
|
-
*
|
|
278
|
-
* @param
|
|
279
|
-
* @
|
|
279
|
+
* Retrieves a chat room by its identifier.
|
|
280
|
+
* @param id - The unique identifier of the room.
|
|
281
|
+
* @param params - Optional query parameters for scoping and member inclusion.
|
|
282
|
+
* @returns The chat room data.
|
|
280
283
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
* @returns The created integration action.
|
|
292
|
-
*/
|
|
293
|
-
createAction(payload: CreateIntegrationActionRequest): Promise<IntegrationAction>;
|
|
294
|
-
/**
|
|
295
|
-
* Updates an integration action.
|
|
296
|
-
* @param actionId - The action identifier.
|
|
297
|
-
* @param payload - The action update payload.
|
|
298
|
-
* @returns The updated integration action.
|
|
299
|
-
*/
|
|
300
|
-
updateAction({ actionId, payload }: UpdateIntegrationActionParams): Promise<IntegrationAction>;
|
|
301
|
-
/**
|
|
302
|
-
* Creates an integration action field/header.
|
|
303
|
-
* @param payload - The field creation payload.
|
|
304
|
-
* @returns The created integration field.
|
|
305
|
-
*/
|
|
306
|
-
createField(payload: CreateIntegrationFieldRequest): Promise<IntegrationField>;
|
|
307
|
-
/**
|
|
308
|
-
* Updates an integration action field/header.
|
|
309
|
-
* @param fieldId - The field identifier.
|
|
310
|
-
* @param payload - The field update payload.
|
|
311
|
-
* @returns The updated integration field response.
|
|
312
|
-
*/
|
|
313
|
-
updateField({ fieldId, payload }: UpdateIntegrationFieldParams): Promise<IntegrationField | number[]>;
|
|
314
|
-
/**
|
|
315
|
-
* Deletes an integration action field/header.
|
|
316
|
-
* @param fieldId - The field identifier.
|
|
317
|
-
* @returns A promise that resolves when the field is deleted.
|
|
318
|
-
*/
|
|
319
|
-
deleteField({ fieldId }: DeleteIntegrationFieldParams): Promise<void>;
|
|
284
|
+
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Gateway for interacting with the Call Report API.
|
|
289
|
+
*/
|
|
290
|
+
declare class CallReportGateway {
|
|
291
|
+
private readonly httpClient;
|
|
292
|
+
private readonly baseUrl;
|
|
293
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
320
294
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @param
|
|
323
|
-
* @returns
|
|
295
|
+
* Lists contact interaction history across chat and CDR indexes.
|
|
296
|
+
* @param params - Optional filters, pagination, and index selection.
|
|
297
|
+
* @returns The paginated contact history response.
|
|
324
298
|
*/
|
|
325
|
-
|
|
299
|
+
listContactHistory(params?: ListContactHistoryRequest): Promise<ContactHistoryResponse>;
|
|
326
300
|
}
|
|
327
301
|
|
|
328
302
|
/**
|
|
@@ -336,11 +310,12 @@ declare class IntegrationsGateway {
|
|
|
336
310
|
type GatewayMap = {
|
|
337
311
|
'customer-service': CustomerServiceGateway;
|
|
338
312
|
'chat-config': ChatConfigGateway;
|
|
339
|
-
|
|
313
|
+
campaigns: CampaignsGateway;
|
|
340
314
|
'chat-adapter': ChatAdapterGateway;
|
|
341
|
-
|
|
315
|
+
assets: AssetsGateway;
|
|
342
316
|
'contact-list': ContactListGateway;
|
|
343
|
-
'
|
|
317
|
+
'chat-webservice': ChatWebserviceGateway;
|
|
318
|
+
'call-report': CallReportGateway;
|
|
344
319
|
};
|
|
345
320
|
/**
|
|
346
321
|
* Parameters required to configure the SDK client.
|
|
@@ -371,7 +346,10 @@ interface GatewayClientParams {
|
|
|
371
346
|
contactList?: {
|
|
372
347
|
baseUrl: string;
|
|
373
348
|
};
|
|
374
|
-
|
|
349
|
+
chatWebservice?: {
|
|
350
|
+
baseUrl: string;
|
|
351
|
+
};
|
|
352
|
+
callReport?: {
|
|
375
353
|
baseUrl: string;
|
|
376
354
|
};
|
|
377
355
|
};
|
|
@@ -400,4 +378,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
400
378
|
*/
|
|
401
379
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
402
380
|
|
|
403
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest,
|
|
381
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetRoomByIdRequest, GetRootRulesRequest, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { CompanyResponse, WorkGroupListResponse, WorkGroupResponse, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse } from './customer-service/contracts/index.js';
|
|
3
3
|
export { CompanyData, ManagedUser, User, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.js';
|
|
4
|
-
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.js';
|
|
5
|
-
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse,
|
|
4
|
+
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.js';
|
|
5
|
+
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse, Rule } from './chat-config/contracts/index.js';
|
|
6
6
|
import { CampaignQueryParams, CampaignPaginatedResponse, Campaign, CreateCampaignRequest, PatchCampaignRequest, CampaignContactQueryParams, CampaignContactPaginatedResponse, CampaignContactResponse, CreateCampaignContactRequest, PatchCampaignContactRequest, CampaignContactsDashboardQueryParams, CampaignContactsDashboardData, CampaignUser, CampaignWorkGroupQueryParams, CampaignWorkGroupPaginatedResponse, CreateCampaignWorkGroupRequest, CampaignWorkGroup } from './campaigns/contracts/index.js';
|
|
7
7
|
export { CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactQueryOperators, CampaignContactQueryValue, CampaignContactSortDirection, CampaignContactSortParams, CampaignContactsDashboardChannelPerformance, CampaignContactsDashboardEvolutionItem, CampaignContactsDashboardExactQueryOperators, CampaignContactsDashboardFunnelItem, CampaignContactsDashboardInterval, CampaignContactsDashboardMetrics, CampaignContactsDashboardQueryValue, CampaignContactsDashboardRangeQueryOperators, CampaignContactsDashboardStatusDistribution, CampaignContactsDashboardStatusMetrics, CampaignContactsDashboardSummary, CampaignContactsDashboardTopCampaign, CampaignProvider, CampaignRetryConfig, CampaignSchedule, CampaignStatus, WhatsAppPayload, WhatsAppTemplateComponent } from './campaigns/contracts/index.js';
|
|
8
8
|
import { GetConfigTemplatesParams, GetConfigTemplatesResponse } from './chat-adapter/contracts/index.js';
|
|
@@ -11,8 +11,10 @@ import { GetPresignedUrlRequest, UploadPresignedUrlResponse, AudioConvertRespons
|
|
|
11
11
|
export { IUploadPresignedUrlResponse } from './assets/contracts/index.js';
|
|
12
12
|
import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResponse } from './contact-list/contracts/index.js';
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.js';
|
|
14
|
-
import {
|
|
15
|
-
export {
|
|
14
|
+
import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.js';
|
|
15
|
+
export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.js';
|
|
16
|
+
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.js';
|
|
17
|
+
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.js';
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -78,6 +80,12 @@ declare class ChatConfigGateway {
|
|
|
78
80
|
*/
|
|
79
81
|
getQueueById(queueId: string): Promise<Queue>;
|
|
80
82
|
getQueues(): Promise<Queue[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists queue memberships for a member.
|
|
85
|
+
* @param params - The member identifier and optional association filter.
|
|
86
|
+
* @returns The queue memberships for the given member.
|
|
87
|
+
*/
|
|
88
|
+
getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
|
|
81
89
|
/**
|
|
82
90
|
* Retrieves a Meta template configuration by its ID.
|
|
83
91
|
* @param templateId - The unique identifier of the template.
|
|
@@ -255,74 +263,40 @@ declare class ContactListGateway {
|
|
|
255
263
|
}
|
|
256
264
|
|
|
257
265
|
/**
|
|
258
|
-
* Gateway for interacting with the
|
|
266
|
+
* Gateway for interacting with the Chat Webservice API.
|
|
259
267
|
*/
|
|
260
|
-
declare class
|
|
268
|
+
declare class ChatWebserviceGateway {
|
|
261
269
|
private readonly httpClient;
|
|
262
270
|
private readonly baseUrl;
|
|
263
271
|
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
264
272
|
/**
|
|
265
|
-
*
|
|
266
|
-
* @param
|
|
267
|
-
* @returns The
|
|
268
|
-
*/
|
|
269
|
-
getPartnersByCompany({ companyId, name }: GetIntegrationPartnersByCompanyRequest): Promise<IntegrationPartner[]>;
|
|
270
|
-
/**
|
|
271
|
-
* Retrieves the hook catalog, optionally scoped by module.
|
|
272
|
-
* @param module - The optional module identifier used by the Integrations API filter.
|
|
273
|
-
* @returns The hook catalog items, filtered by module when provided.
|
|
273
|
+
* Lists live rooms assigned to a user.
|
|
274
|
+
* @param params - The recipient, company, and open-status filters.
|
|
275
|
+
* @returns The live room entries for the user.
|
|
274
276
|
*/
|
|
275
|
-
|
|
277
|
+
listLiveUserRooms(params: ListLiveUserRoomsRequest): Promise<LiveUserRoomResponse[]>;
|
|
276
278
|
/**
|
|
277
|
-
*
|
|
278
|
-
* @param
|
|
279
|
-
* @
|
|
279
|
+
* Retrieves a chat room by its identifier.
|
|
280
|
+
* @param id - The unique identifier of the room.
|
|
281
|
+
* @param params - Optional query parameters for scoping and member inclusion.
|
|
282
|
+
* @returns The chat room data.
|
|
280
283
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
* @returns The created integration action.
|
|
292
|
-
*/
|
|
293
|
-
createAction(payload: CreateIntegrationActionRequest): Promise<IntegrationAction>;
|
|
294
|
-
/**
|
|
295
|
-
* Updates an integration action.
|
|
296
|
-
* @param actionId - The action identifier.
|
|
297
|
-
* @param payload - The action update payload.
|
|
298
|
-
* @returns The updated integration action.
|
|
299
|
-
*/
|
|
300
|
-
updateAction({ actionId, payload }: UpdateIntegrationActionParams): Promise<IntegrationAction>;
|
|
301
|
-
/**
|
|
302
|
-
* Creates an integration action field/header.
|
|
303
|
-
* @param payload - The field creation payload.
|
|
304
|
-
* @returns The created integration field.
|
|
305
|
-
*/
|
|
306
|
-
createField(payload: CreateIntegrationFieldRequest): Promise<IntegrationField>;
|
|
307
|
-
/**
|
|
308
|
-
* Updates an integration action field/header.
|
|
309
|
-
* @param fieldId - The field identifier.
|
|
310
|
-
* @param payload - The field update payload.
|
|
311
|
-
* @returns The updated integration field response.
|
|
312
|
-
*/
|
|
313
|
-
updateField({ fieldId, payload }: UpdateIntegrationFieldParams): Promise<IntegrationField | number[]>;
|
|
314
|
-
/**
|
|
315
|
-
* Deletes an integration action field/header.
|
|
316
|
-
* @param fieldId - The field identifier.
|
|
317
|
-
* @returns A promise that resolves when the field is deleted.
|
|
318
|
-
*/
|
|
319
|
-
deleteField({ fieldId }: DeleteIntegrationFieldParams): Promise<void>;
|
|
284
|
+
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Gateway for interacting with the Call Report API.
|
|
289
|
+
*/
|
|
290
|
+
declare class CallReportGateway {
|
|
291
|
+
private readonly httpClient;
|
|
292
|
+
private readonly baseUrl;
|
|
293
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
320
294
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @param
|
|
323
|
-
* @returns
|
|
295
|
+
* Lists contact interaction history across chat and CDR indexes.
|
|
296
|
+
* @param params - Optional filters, pagination, and index selection.
|
|
297
|
+
* @returns The paginated contact history response.
|
|
324
298
|
*/
|
|
325
|
-
|
|
299
|
+
listContactHistory(params?: ListContactHistoryRequest): Promise<ContactHistoryResponse>;
|
|
326
300
|
}
|
|
327
301
|
|
|
328
302
|
/**
|
|
@@ -336,11 +310,12 @@ declare class IntegrationsGateway {
|
|
|
336
310
|
type GatewayMap = {
|
|
337
311
|
'customer-service': CustomerServiceGateway;
|
|
338
312
|
'chat-config': ChatConfigGateway;
|
|
339
|
-
|
|
313
|
+
campaigns: CampaignsGateway;
|
|
340
314
|
'chat-adapter': ChatAdapterGateway;
|
|
341
|
-
|
|
315
|
+
assets: AssetsGateway;
|
|
342
316
|
'contact-list': ContactListGateway;
|
|
343
|
-
'
|
|
317
|
+
'chat-webservice': ChatWebserviceGateway;
|
|
318
|
+
'call-report': CallReportGateway;
|
|
344
319
|
};
|
|
345
320
|
/**
|
|
346
321
|
* Parameters required to configure the SDK client.
|
|
@@ -371,7 +346,10 @@ interface GatewayClientParams {
|
|
|
371
346
|
contactList?: {
|
|
372
347
|
baseUrl: string;
|
|
373
348
|
};
|
|
374
|
-
|
|
349
|
+
chatWebservice?: {
|
|
350
|
+
baseUrl: string;
|
|
351
|
+
};
|
|
352
|
+
callReport?: {
|
|
375
353
|
baseUrl: string;
|
|
376
354
|
};
|
|
377
355
|
};
|
|
@@ -400,4 +378,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
400
378
|
*/
|
|
401
379
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
402
380
|
|
|
403
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest,
|
|
381
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetRoomByIdRequest, GetRootRulesRequest, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
package/dist/index.js
CHANGED
|
@@ -152,6 +152,15 @@ var ChatConfigGateway = class {
|
|
|
152
152
|
const { data } = await this.httpClient.get(`${this.baseUrl}/queues`);
|
|
153
153
|
return data;
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Lists queue memberships for a member.
|
|
157
|
+
* @param params - The member identifier and optional association filter.
|
|
158
|
+
* @returns The queue memberships for the given member.
|
|
159
|
+
*/
|
|
160
|
+
async getMemberQueues(params) {
|
|
161
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/queue-members`, { params });
|
|
162
|
+
return data;
|
|
163
|
+
}
|
|
155
164
|
/**
|
|
156
165
|
* Retrieves a Meta template configuration by its ID.
|
|
157
166
|
* @param templateId - The unique identifier of the template.
|
|
@@ -467,8 +476,8 @@ var ContactListGateway = class {
|
|
|
467
476
|
}
|
|
468
477
|
};
|
|
469
478
|
|
|
470
|
-
// src/
|
|
471
|
-
var
|
|
479
|
+
// src/chat-webservice/index.ts
|
|
480
|
+
var ChatWebserviceGateway = class {
|
|
472
481
|
constructor(httpClient, baseUrl) {
|
|
473
482
|
this.httpClient = httpClient;
|
|
474
483
|
this.baseUrl = baseUrl;
|
|
@@ -476,101 +485,45 @@ var IntegrationsGateway = class {
|
|
|
476
485
|
httpClient;
|
|
477
486
|
baseUrl;
|
|
478
487
|
/**
|
|
479
|
-
*
|
|
480
|
-
* @param
|
|
481
|
-
* @returns The
|
|
482
|
-
*/
|
|
483
|
-
async getPartnersByCompany({ companyId, name }) {
|
|
484
|
-
const { data } = await this.httpClient.get(`${this.baseUrl}/partner/company/${companyId}`, {
|
|
485
|
-
params: name ? { name } : void 0
|
|
486
|
-
});
|
|
487
|
-
return data;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Retrieves the hook catalog, optionally scoped by module.
|
|
491
|
-
* @param module - The optional module identifier used by the Integrations API filter.
|
|
492
|
-
* @returns The hook catalog items, filtered by module when provided.
|
|
488
|
+
* Lists live rooms assigned to a user.
|
|
489
|
+
* @param params - The recipient, company, and open-status filters.
|
|
490
|
+
* @returns The live room entries for the user.
|
|
493
491
|
*/
|
|
494
|
-
async
|
|
495
|
-
const { data } = await this.httpClient.get(`${this.baseUrl}/
|
|
496
|
-
params: module2 ? { module: module2 } : void 0
|
|
497
|
-
});
|
|
492
|
+
async listLiveUserRooms(params) {
|
|
493
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/member/rooms/live`, { params });
|
|
498
494
|
return data;
|
|
499
495
|
}
|
|
500
496
|
/**
|
|
501
|
-
*
|
|
502
|
-
* @param
|
|
503
|
-
* @
|
|
497
|
+
* Retrieves a chat room by its identifier.
|
|
498
|
+
* @param id - The unique identifier of the room.
|
|
499
|
+
* @param params - Optional query parameters for scoping and member inclusion.
|
|
500
|
+
* @returns The chat room data.
|
|
504
501
|
*/
|
|
505
|
-
async
|
|
506
|
-
const { data } = await this.httpClient.
|
|
502
|
+
async getRoomById(id, params = {}) {
|
|
503
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/room/${id}`, { params });
|
|
507
504
|
return data;
|
|
508
505
|
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// src/call-report/index.ts
|
|
509
|
+
var CallReportGateway = class {
|
|
510
|
+
constructor(httpClient, baseUrl) {
|
|
511
|
+
this.httpClient = httpClient;
|
|
512
|
+
this.baseUrl = baseUrl;
|
|
516
513
|
}
|
|
514
|
+
httpClient;
|
|
515
|
+
baseUrl;
|
|
517
516
|
/**
|
|
518
|
-
*
|
|
519
|
-
* @param
|
|
520
|
-
* @returns The
|
|
517
|
+
* Lists contact interaction history across chat and CDR indexes.
|
|
518
|
+
* @param params - Optional filters, pagination, and index selection.
|
|
519
|
+
* @returns The paginated contact history response.
|
|
521
520
|
*/
|
|
522
|
-
async
|
|
523
|
-
const { data } = await this.httpClient.
|
|
524
|
-
|
|
525
|
-
actionName: payload.actionName ?? payload.hook
|
|
521
|
+
async listContactHistory(params = {}) {
|
|
522
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/history/index/multi`, {
|
|
523
|
+
params
|
|
526
524
|
});
|
|
527
525
|
return data;
|
|
528
526
|
}
|
|
529
|
-
/**
|
|
530
|
-
* Updates an integration action.
|
|
531
|
-
* @param actionId - The action identifier.
|
|
532
|
-
* @param payload - The action update payload.
|
|
533
|
-
* @returns The updated integration action.
|
|
534
|
-
*/
|
|
535
|
-
async updateAction({ actionId, payload }) {
|
|
536
|
-
const { data } = await this.httpClient.patch(`${this.baseUrl}/action/${actionId}`, payload);
|
|
537
|
-
return data;
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* Creates an integration action field/header.
|
|
541
|
-
* @param payload - The field creation payload.
|
|
542
|
-
* @returns The created integration field.
|
|
543
|
-
*/
|
|
544
|
-
async createField(payload) {
|
|
545
|
-
const { data } = await this.httpClient.post(`${this.baseUrl}/field`, payload);
|
|
546
|
-
return data;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Updates an integration action field/header.
|
|
550
|
-
* @param fieldId - The field identifier.
|
|
551
|
-
* @param payload - The field update payload.
|
|
552
|
-
* @returns The updated integration field response.
|
|
553
|
-
*/
|
|
554
|
-
async updateField({ fieldId, payload }) {
|
|
555
|
-
const { data } = await this.httpClient.put(`${this.baseUrl}/field/${fieldId}`, payload);
|
|
556
|
-
return data;
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
|
-
* Deletes an integration action field/header.
|
|
560
|
-
* @param fieldId - The field identifier.
|
|
561
|
-
* @returns A promise that resolves when the field is deleted.
|
|
562
|
-
*/
|
|
563
|
-
async deleteField({ fieldId }) {
|
|
564
|
-
await this.httpClient.delete(`${this.baseUrl}/field/${fieldId}`);
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Deletes an integration action.
|
|
568
|
-
* @param actionId - The action identifier.
|
|
569
|
-
* @returns A promise that resolves when the action is deleted.
|
|
570
|
-
*/
|
|
571
|
-
async deleteAction({ actionId }) {
|
|
572
|
-
await this.httpClient.delete(`${this.baseUrl}/action/${actionId}`);
|
|
573
|
-
}
|
|
574
527
|
};
|
|
575
528
|
|
|
576
529
|
// src/@common/client.ts
|
|
@@ -582,15 +535,17 @@ var SDKGateways = class {
|
|
|
582
535
|
chatAdapter;
|
|
583
536
|
assets;
|
|
584
537
|
contactList;
|
|
585
|
-
|
|
586
|
-
|
|
538
|
+
chatWebservice;
|
|
539
|
+
callReport;
|
|
540
|
+
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, chatWebservice, callReport) {
|
|
587
541
|
this.customerService = customerService;
|
|
588
542
|
this.chatConfig = chatConfig;
|
|
589
543
|
this.campaigns = campaigns;
|
|
590
544
|
this.chatAdapter = chatAdapter;
|
|
591
545
|
this.assets = assets;
|
|
592
546
|
this.contactList = contactList;
|
|
593
|
-
this.
|
|
547
|
+
this.chatWebservice = chatWebservice;
|
|
548
|
+
this.callReport = callReport;
|
|
594
549
|
}
|
|
595
550
|
};
|
|
596
551
|
function createClient(params) {
|
|
@@ -605,8 +560,18 @@ function createClient(params) {
|
|
|
605
560
|
const chatAdapter = params.services.chatAdapter ? new ChatAdapterGateway(httpClient, params.services.chatAdapter.baseUrl) : null;
|
|
606
561
|
const assets = params.services.assets ? new AssetsGateway(httpClient, params.services.assets.baseUrl) : null;
|
|
607
562
|
const contactList = params.services.contactList ? new ContactListGateway(httpClient, params.services.contactList.baseUrl) : null;
|
|
608
|
-
const
|
|
609
|
-
|
|
563
|
+
const chatWebservice = params.services.chatWebservice ? new ChatWebserviceGateway(httpClient, params.services.chatWebservice.baseUrl) : null;
|
|
564
|
+
const callReport = params.services.callReport ? new CallReportGateway(httpClient, params.services.callReport.baseUrl) : null;
|
|
565
|
+
return new SDKGateways(
|
|
566
|
+
customerService,
|
|
567
|
+
chatConfig,
|
|
568
|
+
campaigns,
|
|
569
|
+
chatAdapter,
|
|
570
|
+
assets,
|
|
571
|
+
contactList,
|
|
572
|
+
chatWebservice,
|
|
573
|
+
callReport
|
|
574
|
+
);
|
|
610
575
|
}
|
|
611
576
|
|
|
612
577
|
// src/@common/enums.ts
|
|
@@ -617,7 +582,8 @@ var SERVICE_GATEWAYS = {
|
|
|
617
582
|
CHAT_ADAPTER: "chat-adapter",
|
|
618
583
|
ASSETS: "assets",
|
|
619
584
|
CONTACT_LIST: "contact-list",
|
|
620
|
-
|
|
585
|
+
CHAT_WEBSERVICE: "chat-webservice",
|
|
586
|
+
CALL_REPORT: "call-report"
|
|
621
587
|
};
|
|
622
588
|
|
|
623
589
|
// src/index.ts
|
|
@@ -661,10 +627,14 @@ function gateway(service) {
|
|
|
661
627
|
if (!sdk.client.contactList)
|
|
662
628
|
throw new Error(`Service 'contact-list' is not configured. Provide its baseUrl in configure().`);
|
|
663
629
|
return sdk.client.contactList;
|
|
664
|
-
case SERVICE_GATEWAYS.
|
|
665
|
-
if (!sdk.client.
|
|
666
|
-
throw new Error(`Service '
|
|
667
|
-
return sdk.client.
|
|
630
|
+
case SERVICE_GATEWAYS.CHAT_WEBSERVICE:
|
|
631
|
+
if (!sdk.client.chatWebservice)
|
|
632
|
+
throw new Error(`Service 'chat-webservice' is not configured. Provide its baseUrl in configure().`);
|
|
633
|
+
return sdk.client.chatWebservice;
|
|
634
|
+
case SERVICE_GATEWAYS.CALL_REPORT:
|
|
635
|
+
if (!sdk.client.callReport)
|
|
636
|
+
throw new Error(`Service 'call-report' is not configured. Provide its baseUrl in configure().`);
|
|
637
|
+
return sdk.client.callReport;
|
|
668
638
|
default:
|
|
669
639
|
throw new Error(`Unknown service gateway: ${service}`);
|
|
670
640
|
}
|