@opens/gateways 1.11.6 → 1.12.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.
@@ -1,4 +1,3 @@
1
- /** A provider entity returned by the Chat Config API. */
2
1
  interface Provider {
3
2
  id: string;
4
3
  name: string;
@@ -8,8 +7,129 @@ interface Provider {
8
7
  createdAt: string;
9
8
  updatedAt: string;
10
9
  }
11
- /** Response returned by the Chat Config API when listing providers. */
12
10
  type ProviderListResponse = Provider[];
11
+ interface GetProviderConfigurationsParams {
12
+ id: string | string[];
13
+ }
14
+ interface WhatsAppProviderSettings {
15
+ pin: string;
16
+ csat: boolean;
17
+ phone: string;
18
+ wabaId: string;
19
+ csatTTL: number;
20
+ isEnabledMarketingMessagesAPI: boolean;
21
+ phoneId: string;
22
+ appToken: string;
23
+ csatAnswer: string;
24
+ debugToken: string;
25
+ accessToken: string;
26
+ alias: string;
27
+ }
28
+ interface WidgetProviderFunctionValues<TValue> {
29
+ chat: TValue;
30
+ voice: TValue;
31
+ whatsapp: TValue;
32
+ }
33
+ interface WidgetProviderFunctions extends WidgetProviderFunctionValues<boolean> {
34
+ voice_in_chat: boolean;
35
+ }
36
+ interface WidgetProviderAuthSettings {
37
+ name: boolean;
38
+ nameValidationQuestion: string;
39
+ phone: boolean;
40
+ phoneValidationQuestion: string;
41
+ email: boolean;
42
+ emailValidationQuestion: string;
43
+ company: boolean;
44
+ subject: boolean;
45
+ cpfValidationQuestion: string;
46
+ }
47
+ interface WidgetProviderVoiceConfiguration {
48
+ id: number;
49
+ attendanceGroupId: string;
50
+ voiceTimeout: number;
51
+ description: string;
52
+ surname: string;
53
+ icon: string;
54
+ }
55
+ interface WidgetProviderThemeColors {
56
+ primary: string;
57
+ secondary: string;
58
+ accent: string;
59
+ neutral: string;
60
+ }
61
+ interface WidgetProviderThemeSettings {
62
+ name: string;
63
+ hexColors: WidgetProviderThemeColors;
64
+ tailwindColors: WidgetProviderThemeColors;
65
+ textColor: string;
66
+ type: string;
67
+ }
68
+ interface WidgetProviderWhatsappSettings {
69
+ phone: string;
70
+ }
71
+ interface WidgetProviderSettings {
72
+ name: string;
73
+ type: string;
74
+ hidePoweredByOpens: boolean;
75
+ showToClientEndChatOption: boolean;
76
+ showToClientRecordAudioOption: boolean;
77
+ hideBottomNavigation: boolean;
78
+ hideCloseButton: boolean;
79
+ openYuniqueWidget: boolean;
80
+ fontChoice: string;
81
+ useLogoAsUserImage: boolean;
82
+ removeFileButton: boolean;
83
+ position: string;
84
+ positionMarginLeft: number;
85
+ positionMarginTop: number;
86
+ iconImage: string;
87
+ customIconImage: string;
88
+ functionsIcons: WidgetProviderFunctionValues<string>;
89
+ functionsIconsDisplays: WidgetProviderFunctionValues<boolean>;
90
+ functionsDescriptions: WidgetProviderFunctionValues<string>;
91
+ functionsNames: WidgetProviderFunctionValues<string>;
92
+ functionsColors: WidgetProviderFunctionValues<string>;
93
+ functions: WidgetProviderFunctions;
94
+ auth: WidgetProviderAuthSettings;
95
+ initialFlow: boolean;
96
+ initialFlowId: string | null;
97
+ textVoiceLines: string[];
98
+ voiceConfig: Record<string, WidgetProviderVoiceConfiguration>;
99
+ iconSize: string;
100
+ theme: WidgetProviderThemeSettings;
101
+ flow?: any;
102
+ locale: string;
103
+ voiceRemoteAddress: string;
104
+ voiceDevice: string;
105
+ voiceCode: string;
106
+ buttonType: string;
107
+ whatsapp: WidgetProviderWhatsappSettings;
108
+ customButtonIcon: string;
109
+ logoUrl: string;
110
+ }
111
+ /** A provider configuration entity returned by the Chat Config API. */
112
+ type ProviderConfiguration = {
113
+ id: string;
114
+ isAssistanceEnabled: boolean;
115
+ rewind: number;
116
+ companyId: string;
117
+ active: boolean;
118
+ priority: number | null;
119
+ providerId: string;
120
+ configurations: WhatsAppProviderSettings | WidgetProviderSettings;
121
+ inbound: boolean;
122
+ outbound: boolean;
123
+ deletedAt: string | null;
124
+ csatConditionalRulesEnabled: boolean;
125
+ csatFeedbackTTL: number | null;
126
+ createdAt: string;
127
+ updatedAt: string;
128
+ };
129
+ /** Response returned by the Chat Config API when listing provider configurations. */
130
+ interface ProviderConfigurationsResponse {
131
+ data: ProviderConfiguration[];
132
+ }
13
133
 
14
134
  /** A provider entity nested within a configuration response. */
15
135
  interface ConfigProvider {
@@ -106,10 +226,17 @@ interface Queue {
106
226
  members: QueueMember[];
107
227
  distributionType: DistributionType;
108
228
  }
109
- /** Response returned when listing queues. */
110
229
  interface QueueListResponse {
111
230
  queues: Queue[];
112
231
  }
232
+ interface GetServiceGroupsParams {
233
+ id: string | string[];
234
+ }
235
+ interface ServiceGroup extends Queue {
236
+ }
237
+ interface ServiceGroupsResponse {
238
+ data: ServiceGroup[];
239
+ }
113
240
 
114
241
  /** Representation of a button in a Meta template. */
115
242
  interface MetaTemplateButton {
@@ -225,4 +352,4 @@ type RootRulesResponse = {
225
352
  data: Rule[];
226
353
  };
227
354
 
228
- export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
355
+ export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetProviderConfigurationsParams, GetRootRulesRequest, GetServiceGroupsParams, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderConfiguration, ProviderConfigurationsResponse, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule, ServiceGroup, ServiceGroupsResponse, WhatsAppProviderSettings, WidgetProviderSettings };
@@ -1,4 +1,3 @@
1
- /** A provider entity returned by the Chat Config API. */
2
1
  interface Provider {
3
2
  id: string;
4
3
  name: string;
@@ -8,8 +7,129 @@ interface Provider {
8
7
  createdAt: string;
9
8
  updatedAt: string;
10
9
  }
11
- /** Response returned by the Chat Config API when listing providers. */
12
10
  type ProviderListResponse = Provider[];
11
+ interface GetProviderConfigurationsParams {
12
+ id: string | string[];
13
+ }
14
+ interface WhatsAppProviderSettings {
15
+ pin: string;
16
+ csat: boolean;
17
+ phone: string;
18
+ wabaId: string;
19
+ csatTTL: number;
20
+ isEnabledMarketingMessagesAPI: boolean;
21
+ phoneId: string;
22
+ appToken: string;
23
+ csatAnswer: string;
24
+ debugToken: string;
25
+ accessToken: string;
26
+ alias: string;
27
+ }
28
+ interface WidgetProviderFunctionValues<TValue> {
29
+ chat: TValue;
30
+ voice: TValue;
31
+ whatsapp: TValue;
32
+ }
33
+ interface WidgetProviderFunctions extends WidgetProviderFunctionValues<boolean> {
34
+ voice_in_chat: boolean;
35
+ }
36
+ interface WidgetProviderAuthSettings {
37
+ name: boolean;
38
+ nameValidationQuestion: string;
39
+ phone: boolean;
40
+ phoneValidationQuestion: string;
41
+ email: boolean;
42
+ emailValidationQuestion: string;
43
+ company: boolean;
44
+ subject: boolean;
45
+ cpfValidationQuestion: string;
46
+ }
47
+ interface WidgetProviderVoiceConfiguration {
48
+ id: number;
49
+ attendanceGroupId: string;
50
+ voiceTimeout: number;
51
+ description: string;
52
+ surname: string;
53
+ icon: string;
54
+ }
55
+ interface WidgetProviderThemeColors {
56
+ primary: string;
57
+ secondary: string;
58
+ accent: string;
59
+ neutral: string;
60
+ }
61
+ interface WidgetProviderThemeSettings {
62
+ name: string;
63
+ hexColors: WidgetProviderThemeColors;
64
+ tailwindColors: WidgetProviderThemeColors;
65
+ textColor: string;
66
+ type: string;
67
+ }
68
+ interface WidgetProviderWhatsappSettings {
69
+ phone: string;
70
+ }
71
+ interface WidgetProviderSettings {
72
+ name: string;
73
+ type: string;
74
+ hidePoweredByOpens: boolean;
75
+ showToClientEndChatOption: boolean;
76
+ showToClientRecordAudioOption: boolean;
77
+ hideBottomNavigation: boolean;
78
+ hideCloseButton: boolean;
79
+ openYuniqueWidget: boolean;
80
+ fontChoice: string;
81
+ useLogoAsUserImage: boolean;
82
+ removeFileButton: boolean;
83
+ position: string;
84
+ positionMarginLeft: number;
85
+ positionMarginTop: number;
86
+ iconImage: string;
87
+ customIconImage: string;
88
+ functionsIcons: WidgetProviderFunctionValues<string>;
89
+ functionsIconsDisplays: WidgetProviderFunctionValues<boolean>;
90
+ functionsDescriptions: WidgetProviderFunctionValues<string>;
91
+ functionsNames: WidgetProviderFunctionValues<string>;
92
+ functionsColors: WidgetProviderFunctionValues<string>;
93
+ functions: WidgetProviderFunctions;
94
+ auth: WidgetProviderAuthSettings;
95
+ initialFlow: boolean;
96
+ initialFlowId: string | null;
97
+ textVoiceLines: string[];
98
+ voiceConfig: Record<string, WidgetProviderVoiceConfiguration>;
99
+ iconSize: string;
100
+ theme: WidgetProviderThemeSettings;
101
+ flow?: any;
102
+ locale: string;
103
+ voiceRemoteAddress: string;
104
+ voiceDevice: string;
105
+ voiceCode: string;
106
+ buttonType: string;
107
+ whatsapp: WidgetProviderWhatsappSettings;
108
+ customButtonIcon: string;
109
+ logoUrl: string;
110
+ }
111
+ /** A provider configuration entity returned by the Chat Config API. */
112
+ type ProviderConfiguration = {
113
+ id: string;
114
+ isAssistanceEnabled: boolean;
115
+ rewind: number;
116
+ companyId: string;
117
+ active: boolean;
118
+ priority: number | null;
119
+ providerId: string;
120
+ configurations: WhatsAppProviderSettings | WidgetProviderSettings;
121
+ inbound: boolean;
122
+ outbound: boolean;
123
+ deletedAt: string | null;
124
+ csatConditionalRulesEnabled: boolean;
125
+ csatFeedbackTTL: number | null;
126
+ createdAt: string;
127
+ updatedAt: string;
128
+ };
129
+ /** Response returned by the Chat Config API when listing provider configurations. */
130
+ interface ProviderConfigurationsResponse {
131
+ data: ProviderConfiguration[];
132
+ }
13
133
 
14
134
  /** A provider entity nested within a configuration response. */
15
135
  interface ConfigProvider {
@@ -106,10 +226,17 @@ interface Queue {
106
226
  members: QueueMember[];
107
227
  distributionType: DistributionType;
108
228
  }
109
- /** Response returned when listing queues. */
110
229
  interface QueueListResponse {
111
230
  queues: Queue[];
112
231
  }
232
+ interface GetServiceGroupsParams {
233
+ id: string | string[];
234
+ }
235
+ interface ServiceGroup extends Queue {
236
+ }
237
+ interface ServiceGroupsResponse {
238
+ data: ServiceGroup[];
239
+ }
113
240
 
114
241
  /** Representation of a button in a Meta template. */
115
242
  interface MetaTemplateButton {
@@ -225,4 +352,4 @@ type RootRulesResponse = {
225
352
  data: Rule[];
226
353
  };
227
354
 
228
- export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
355
+ export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetProviderConfigurationsParams, GetRootRulesRequest, GetServiceGroupsParams, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderConfiguration, ProviderConfigurationsResponse, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule, ServiceGroup, ServiceGroupsResponse, WhatsAppProviderSettings, WidgetProviderSettings };
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, 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';
4
+ import { ProviderListResponse, GetProviderConfigurationsParams, ProviderConfigurationsResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, GetServiceGroupsParams, ServiceGroupsResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
5
+ export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, ProviderConfiguration, QueueListResponse, Rule, ServiceGroup, WhatsAppProviderSettings, WidgetProviderSettings } 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,6 +11,8 @@ 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 { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetIntegrationHooksCatalogRequest, HookCatalogItem, CreateIntegrationPartnerRequest, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.mjs';
15
+ export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.mjs';
14
16
  import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.mjs';
15
17
  export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
16
18
  import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
@@ -66,6 +68,12 @@ declare class ChatConfigGateway {
66
68
  * @returns The list of providers.
67
69
  */
68
70
  getProviders(): Promise<ProviderListResponse>;
71
+ /**
72
+ * Retrieves provider configurations filtered by configuration IDs.
73
+ * @param params - Query parameters containing one or more configuration IDs.
74
+ * @returns The provider configurations matching the given IDs.
75
+ */
76
+ getProviderConfigurations(params?: GetProviderConfigurationsParams): Promise<ProviderConfigurationsResponse>;
69
77
  /**
70
78
  * Retrieves configurations filtered by provider.
71
79
  * @param providerId - The unique identifier of the provider.
@@ -86,6 +94,12 @@ declare class ChatConfigGateway {
86
94
  * @returns The queue memberships for the given member.
87
95
  */
88
96
  getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
97
+ /**
98
+ * Retrieves service groups filtered by service group IDs.
99
+ * @param params - Query parameters containing one or more service group IDs.
100
+ * @returns The service groups matching the given IDs.
101
+ */
102
+ getServiceGroups(params?: GetServiceGroupsParams): Promise<ServiceGroupsResponse>;
89
103
  /**
90
104
  * Retrieves a Meta template configuration by its ID.
91
105
  * @param templateId - The unique identifier of the template.
@@ -262,6 +276,77 @@ declare class ContactListGateway {
262
276
  getCategoryList(): Promise<ContactCategoryResponse[]>;
263
277
  }
264
278
 
279
+ /**
280
+ * Gateway for interacting with the Integrations API.
281
+ */
282
+ declare class IntegrationsGateway {
283
+ private readonly httpClient;
284
+ private readonly baseUrl;
285
+ constructor(httpClient: AxiosInstance, baseUrl: string);
286
+ /**
287
+ * Retrieves all integration partners configured for a company.
288
+ * @param companyId - The company identifier.
289
+ * @returns The integration partners configured for the company.
290
+ */
291
+ getPartnersByCompany({ companyId, name }: GetIntegrationPartnersByCompanyRequest): Promise<IntegrationPartner[]>;
292
+ /**
293
+ * Retrieves the hook catalog, optionally scoped by module.
294
+ * @param module - The optional module identifier used by the Integrations API filter.
295
+ * @returns The hook catalog items, filtered by module when provided.
296
+ */
297
+ getHooksCatalog({ module }?: GetIntegrationHooksCatalogRequest): Promise<HookCatalogItem[]>;
298
+ /**
299
+ * Creates an integration partner.
300
+ * @param payload - The partner creation payload.
301
+ * @returns The created integration partner.
302
+ */
303
+ createPartner(payload: CreateIntegrationPartnerRequest): Promise<IntegrationPartner>;
304
+ /**
305
+ * Deletes an integration partner.
306
+ * @param partnerId - The partner identifier.
307
+ * @returns A promise that resolves when the partner is deleted.
308
+ */
309
+ deletePartner({ partnerId }: DeleteIntegrationPartnerParams): Promise<void>;
310
+ /**
311
+ * Creates an integration action.
312
+ * @param payload - The action creation payload.
313
+ * @returns The created integration action.
314
+ */
315
+ createAction(payload: CreateIntegrationActionRequest): Promise<IntegrationAction>;
316
+ /**
317
+ * Updates an integration action.
318
+ * @param actionId - The action identifier.
319
+ * @param payload - The action update payload.
320
+ * @returns The updated integration action.
321
+ */
322
+ updateAction({ actionId, payload }: UpdateIntegrationActionParams): Promise<IntegrationAction>;
323
+ /**
324
+ * Creates an integration action field/header.
325
+ * @param payload - The field creation payload.
326
+ * @returns The created integration field.
327
+ */
328
+ createField(payload: CreateIntegrationFieldRequest): Promise<IntegrationField>;
329
+ /**
330
+ * Updates an integration action field/header.
331
+ * @param fieldId - The field identifier.
332
+ * @param payload - The field update payload.
333
+ * @returns The updated integration field response.
334
+ */
335
+ updateField({ fieldId, payload }: UpdateIntegrationFieldParams): Promise<IntegrationField | number[]>;
336
+ /**
337
+ * Deletes an integration action field/header.
338
+ * @param fieldId - The field identifier.
339
+ * @returns A promise that resolves when the field is deleted.
340
+ */
341
+ deleteField({ fieldId }: DeleteIntegrationFieldParams): Promise<void>;
342
+ /**
343
+ * Deletes an integration action.
344
+ * @param actionId - The action identifier.
345
+ * @returns A promise that resolves when the action is deleted.
346
+ */
347
+ deleteAction({ actionId }: DeleteIntegrationActionParams): Promise<void>;
348
+ }
349
+
265
350
  /**
266
351
  * Gateway for interacting with the Chat Webservice API.
267
352
  */
@@ -314,6 +399,7 @@ type GatewayMap = {
314
399
  'chat-adapter': ChatAdapterGateway;
315
400
  assets: AssetsGateway;
316
401
  'contact-list': ContactListGateway;
402
+ integrations: IntegrationsGateway;
317
403
  'chat-webservice': ChatWebserviceGateway;
318
404
  'call-report': CallReportGateway;
319
405
  };
@@ -346,6 +432,9 @@ interface GatewayClientParams {
346
432
  contactList?: {
347
433
  baseUrl: string;
348
434
  };
435
+ integrations?: {
436
+ baseUrl: string;
437
+ };
349
438
  chatWebservice?: {
350
439
  baseUrl: string;
351
440
  };
@@ -378,4 +467,4 @@ declare const configure: (params: GatewayClientParams) => void;
378
467
  */
379
468
  declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
380
469
 
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 };
470
+ export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, ServiceGroupsResponse, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, 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, 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';
4
+ import { ProviderListResponse, GetProviderConfigurationsParams, ProviderConfigurationsResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, GetServiceGroupsParams, ServiceGroupsResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.js';
5
+ export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, ProviderConfiguration, QueueListResponse, Rule, ServiceGroup, WhatsAppProviderSettings, WidgetProviderSettings } 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,6 +11,8 @@ 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 { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetIntegrationHooksCatalogRequest, HookCatalogItem, CreateIntegrationPartnerRequest, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.js';
15
+ export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.js';
14
16
  import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.js';
15
17
  export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.js';
16
18
  import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.js';
@@ -66,6 +68,12 @@ declare class ChatConfigGateway {
66
68
  * @returns The list of providers.
67
69
  */
68
70
  getProviders(): Promise<ProviderListResponse>;
71
+ /**
72
+ * Retrieves provider configurations filtered by configuration IDs.
73
+ * @param params - Query parameters containing one or more configuration IDs.
74
+ * @returns The provider configurations matching the given IDs.
75
+ */
76
+ getProviderConfigurations(params?: GetProviderConfigurationsParams): Promise<ProviderConfigurationsResponse>;
69
77
  /**
70
78
  * Retrieves configurations filtered by provider.
71
79
  * @param providerId - The unique identifier of the provider.
@@ -86,6 +94,12 @@ declare class ChatConfigGateway {
86
94
  * @returns The queue memberships for the given member.
87
95
  */
88
96
  getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
97
+ /**
98
+ * Retrieves service groups filtered by service group IDs.
99
+ * @param params - Query parameters containing one or more service group IDs.
100
+ * @returns The service groups matching the given IDs.
101
+ */
102
+ getServiceGroups(params?: GetServiceGroupsParams): Promise<ServiceGroupsResponse>;
89
103
  /**
90
104
  * Retrieves a Meta template configuration by its ID.
91
105
  * @param templateId - The unique identifier of the template.
@@ -262,6 +276,77 @@ declare class ContactListGateway {
262
276
  getCategoryList(): Promise<ContactCategoryResponse[]>;
263
277
  }
264
278
 
279
+ /**
280
+ * Gateway for interacting with the Integrations API.
281
+ */
282
+ declare class IntegrationsGateway {
283
+ private readonly httpClient;
284
+ private readonly baseUrl;
285
+ constructor(httpClient: AxiosInstance, baseUrl: string);
286
+ /**
287
+ * Retrieves all integration partners configured for a company.
288
+ * @param companyId - The company identifier.
289
+ * @returns The integration partners configured for the company.
290
+ */
291
+ getPartnersByCompany({ companyId, name }: GetIntegrationPartnersByCompanyRequest): Promise<IntegrationPartner[]>;
292
+ /**
293
+ * Retrieves the hook catalog, optionally scoped by module.
294
+ * @param module - The optional module identifier used by the Integrations API filter.
295
+ * @returns The hook catalog items, filtered by module when provided.
296
+ */
297
+ getHooksCatalog({ module }?: GetIntegrationHooksCatalogRequest): Promise<HookCatalogItem[]>;
298
+ /**
299
+ * Creates an integration partner.
300
+ * @param payload - The partner creation payload.
301
+ * @returns The created integration partner.
302
+ */
303
+ createPartner(payload: CreateIntegrationPartnerRequest): Promise<IntegrationPartner>;
304
+ /**
305
+ * Deletes an integration partner.
306
+ * @param partnerId - The partner identifier.
307
+ * @returns A promise that resolves when the partner is deleted.
308
+ */
309
+ deletePartner({ partnerId }: DeleteIntegrationPartnerParams): Promise<void>;
310
+ /**
311
+ * Creates an integration action.
312
+ * @param payload - The action creation payload.
313
+ * @returns The created integration action.
314
+ */
315
+ createAction(payload: CreateIntegrationActionRequest): Promise<IntegrationAction>;
316
+ /**
317
+ * Updates an integration action.
318
+ * @param actionId - The action identifier.
319
+ * @param payload - The action update payload.
320
+ * @returns The updated integration action.
321
+ */
322
+ updateAction({ actionId, payload }: UpdateIntegrationActionParams): Promise<IntegrationAction>;
323
+ /**
324
+ * Creates an integration action field/header.
325
+ * @param payload - The field creation payload.
326
+ * @returns The created integration field.
327
+ */
328
+ createField(payload: CreateIntegrationFieldRequest): Promise<IntegrationField>;
329
+ /**
330
+ * Updates an integration action field/header.
331
+ * @param fieldId - The field identifier.
332
+ * @param payload - The field update payload.
333
+ * @returns The updated integration field response.
334
+ */
335
+ updateField({ fieldId, payload }: UpdateIntegrationFieldParams): Promise<IntegrationField | number[]>;
336
+ /**
337
+ * Deletes an integration action field/header.
338
+ * @param fieldId - The field identifier.
339
+ * @returns A promise that resolves when the field is deleted.
340
+ */
341
+ deleteField({ fieldId }: DeleteIntegrationFieldParams): Promise<void>;
342
+ /**
343
+ * Deletes an integration action.
344
+ * @param actionId - The action identifier.
345
+ * @returns A promise that resolves when the action is deleted.
346
+ */
347
+ deleteAction({ actionId }: DeleteIntegrationActionParams): Promise<void>;
348
+ }
349
+
265
350
  /**
266
351
  * Gateway for interacting with the Chat Webservice API.
267
352
  */
@@ -314,6 +399,7 @@ type GatewayMap = {
314
399
  'chat-adapter': ChatAdapterGateway;
315
400
  assets: AssetsGateway;
316
401
  'contact-list': ContactListGateway;
402
+ integrations: IntegrationsGateway;
317
403
  'chat-webservice': ChatWebserviceGateway;
318
404
  'call-report': CallReportGateway;
319
405
  };
@@ -346,6 +432,9 @@ interface GatewayClientParams {
346
432
  contactList?: {
347
433
  baseUrl: string;
348
434
  };
435
+ integrations?: {
436
+ baseUrl: string;
437
+ };
349
438
  chatWebservice?: {
350
439
  baseUrl: string;
351
440
  };
@@ -378,4 +467,4 @@ declare const configure: (params: GatewayClientParams) => void;
378
467
  */
379
468
  declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
380
469
 
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 };
470
+ export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, ServiceGroupsResponse, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };