@opens/gateways 1.15.14 → 1.15.16

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
- import { CompanyResponse, StrongPasswordOptionsResponse, User, WorkGroupListResponse, WorkGroupResponse, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetUserByIdResponse, UpdateCompanyUserRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UpdateCompanyUserAvatarResponse, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, AnnouncementListFilters, AnnouncementListResponse, Announcement, CreateAnnouncementRequest, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, AnnouncementType, ActiveAnnouncementQuery, ActiveAnnouncement } from './customer-service/contracts/index.js';
3
- export { AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementVisualStatus, CompanyData, ManagedUser, StrongPasswordOptions, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.js';
2
+ import { CompanyResponse, UpdateCompanyRequest, GetSupportWidgetIdResponse, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, CompanyQueue, CompanyWithConfigsResponse, StrongPasswordOptionsResponse, CompanyConfigKey, CompanyConfigResponse, StrongPasswordOptions, CompanyBooleanConfigKey, UpdateCompanyBooleanConfigRequest, CompanyStringConfigKey, UpdateCompanyStringConfigRequest, User, WorkGroupListResponse, WorkGroupResponse, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetUserByIdResponse, UpdateCompanyUserRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UpdateCompanyUserAvatarResponse, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, AnnouncementListFilters, AnnouncementListResponse, Announcement, CreateAnnouncementRequest, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, AnnouncementType, ActiveAnnouncementQuery, ActiveAnnouncement } from './customer-service/contracts/index.js';
3
+ export { AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementVisualStatus, CompanyData, ManagedUser, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.js';
4
4
  import { ProviderListResponse, Config, GetProviderConfigurationsParams, ProviderConfigurationsResponse, GetProviderDisplayInfoParams, ProviderDisplayInfoResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, GetServiceGroupsParams, ServiceGroupsResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.js';
5
5
  export { ConfigProvider, DistributionType, MetaTemplateButton, Provider, ProviderConfiguration, ProviderName, 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, CampaignCompanyQueryParams, CampaignCompanyPaginatedResponse, CampaignCompanyResponse, EnableCampaignCompanyRequest, CampaignAccessResponse } from './campaigns/contracts/index.js';
@@ -17,6 +17,8 @@ import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, Can
17
17
  export { ForwardMessageDestination, ForwardMessageForwardingMetadata, ForwardMessageMetadata, MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.js';
18
18
  import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.js';
19
19
  export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.js';
20
+ import { CallEndpoint } from './calls/contracts/index.js';
21
+ export { CallEndpointStatus } from './calls/contracts/index.js';
20
22
  import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem, ListCasesRequest, ListCasesResponse, CreateTimeEntryRequest, CaseTimeEntry, ListTimeEntriesRequest, ListTimeEntriesPage, UpdateTimeEntryRequest, DeleteTimeEntryRequest } from './cases/contracts/index.js';
21
23
  export { CaseListItem, CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, ListCasesCursor, TimeEntryCursor } from './cases/contracts/index.js';
22
24
  import { GetAccessPackagesParams, PaginatedResult, AccessPackage, GetCompanyAccessPackagesParams, CompanyAccessPackageItem, CreateCompanyAccessPackagePayload, UpdateCompanyAccessPackagePayload, GetCompanyResourcesParams, CompanyResource } from './access-hub/contracts/index.js';
@@ -36,12 +38,66 @@ declare class CustomerServiceGateway {
36
38
  * @returns The company data wrapped in a {@link CompanyResponse}.
37
39
  */
38
40
  getCompanyById(companyId: string): Promise<CompanyResponse>;
41
+ /**
42
+ * Updates the current company settings.
43
+ * @param payload - The company fields to update.
44
+ * @returns The updated company data wrapped in a {@link CompanyResponse}.
45
+ */
46
+ updateCompany(payload: UpdateCompanyRequest): Promise<CompanyResponse>;
47
+ /**
48
+ * Retrieves the support widget identifier for the current company.
49
+ * @returns The support widget identifier.
50
+ */
51
+ getSupportWidgetId(): Promise<GetSupportWidgetIdResponse>;
52
+ /**
53
+ * Updates the support widget identifier for the current company.
54
+ * @param payload - The support widget identifier to set.
55
+ * @returns The updated company support widget data.
56
+ */
57
+ updateSupportWidgetId(payload: UpdateSupportWidgetIdRequest): Promise<UpdateSupportWidgetIdResponse>;
58
+ /**
59
+ * Retrieves the list of queues configured for the current company.
60
+ * @returns The company queues.
61
+ */
62
+ getCompanyQueues(): Promise<CompanyQueue[]>;
63
+ /**
64
+ * Retrieves the current company data along with all its config entries.
65
+ * @returns The company data with its configs.
66
+ */
67
+ getCompanyConfigs(): Promise<CompanyWithConfigsResponse>;
68
+ /**
69
+ * Retrieves a company config entry by key.
70
+ * @param key - The config key to fetch.
71
+ * @returns The company config entry.
72
+ */
73
+ getCompanyConfig(key: 'strong-password-options'): Promise<StrongPasswordOptionsResponse>;
74
+ getCompanyConfig(key: CompanyConfigKey): Promise<CompanyConfigResponse>;
39
75
  /**
40
76
  * Retrieves the strong password options config for a company.
41
77
  * @param companyId - The unique identifier of the company.
42
78
  * @returns The strong password options company config.
43
79
  */
44
80
  getStrongPasswordOptions(companyId: string): Promise<StrongPasswordOptionsResponse>;
81
+ /**
82
+ * Updates the strong password options config for the current company.
83
+ * @param payload - The strong password policy rules to apply.
84
+ * @returns The updated strong password options company config.
85
+ */
86
+ updateStrongPasswordOptions(payload: StrongPasswordOptions): Promise<StrongPasswordOptionsResponse>;
87
+ /**
88
+ * Updates a boolean company config by key.
89
+ * @param key - The config key to update.
90
+ * @param payload - The boolean value to set.
91
+ * @returns The updated company config entry.
92
+ */
93
+ updateCompanyBooleanConfig(key: CompanyBooleanConfigKey, payload: UpdateCompanyBooleanConfigRequest): Promise<CompanyConfigResponse>;
94
+ /**
95
+ * Updates a string company config by key.
96
+ * @param key - The config key to update.
97
+ * @param payload - The string value to set.
98
+ * @returns The updated company config entry.
99
+ */
100
+ updateCompanyStringConfig(key: CompanyStringConfigKey, payload: UpdateCompanyStringConfigRequest): Promise<CompanyConfigResponse>;
45
101
  /**
46
102
  * Retrieves a user by login email.
47
103
  * @param email - The user email used as login identifier.
@@ -627,6 +683,20 @@ declare class CallReportGateway {
627
683
  listContactHistory(params?: ListContactHistoryRequest): Promise<ContactHistoryResponse>;
628
684
  }
629
685
 
686
+ /**
687
+ * Gateway for interacting with the Calls API.
688
+ */
689
+ declare class CallsGateway {
690
+ private readonly httpClient;
691
+ private readonly baseUrl;
692
+ constructor(httpClient: AxiosInstance, baseUrl: string);
693
+ /**
694
+ * Retrieves all call endpoints and their current status.
695
+ * @returns The list of call endpoints.
696
+ */
697
+ getEndpoints(): Promise<CallEndpoint[]>;
698
+ }
699
+
630
700
  /** Request parameters for retrieving the webhooks scenario for a company. */
631
701
  interface GetWebhooksByCompanyRequest {
632
702
  companyId: string;
@@ -738,6 +808,7 @@ type GatewayMap = {
738
808
  integrations: IntegrationsGateway;
739
809
  'chat-webservice': ChatWebserviceGateway;
740
810
  'call-report': CallReportGateway;
811
+ calls: CallsGateway;
741
812
  cases: CasesGateway;
742
813
  rh: RhGateway;
743
814
  'access-hub': AccessHubGateway;
@@ -780,6 +851,9 @@ interface GatewayClientParams {
780
851
  callReport?: {
781
852
  baseUrl: string;
782
853
  };
854
+ calls?: {
855
+ baseUrl: string;
856
+ };
783
857
  cases?: {
784
858
  baseUrl: string;
785
859
  };
@@ -802,6 +876,7 @@ declare const SERVICE_GATEWAYS: {
802
876
  readonly INTEGRATIONS: "integrations";
803
877
  readonly CHAT_WEBSERVICE: "chat-webservice";
804
878
  readonly CALL_REPORT: "call-report";
879
+ readonly CALLS: "calls";
805
880
  readonly CASES: "cases";
806
881
  readonly RH: "rh";
807
882
  readonly ACCESS_HUB: "access-hub";
@@ -831,4 +906,4 @@ declare const configure: (params: GatewayClientParams) => void;
831
906
  */
832
907
  declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
833
908
 
834
- export { AccessPackage, ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementListFilters, AnnouncementListResponse, AnnouncementType, AttachmentByIdResponse, AudioConvertResponse, AutomationPartner, AutomationPartnerAction, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, CommentHistoryPage, CompanyAccessPackageItem, CompanyResource, CompanyResponse, Config, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, ContactResponse, CreateAnnouncementRequest, CreateAutomationPartnerRequest, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateTimeEntryRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, EnableCampaignCompanyRequest, FindOrCreateContactRequest, FindOrCreateQueueRuleRequest, FlowCatalogParams, FlowCatalogResponse, FlowDefinition, FlowReadiness, ForwardMessageRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetAutomationPartnerRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetUserByIdResponse, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListAutomationActionsRequest, ListAutomationPartnersRequest, ListCasesRequest, ListCasesResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, ListTimeEntriesPage, ListTimeEntriesRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, StrongPasswordOptionsResponse, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UpdateTimeEntryRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UploadPresignedUrlResponse, User, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
909
+ export { AccessPackage, ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementListFilters, AnnouncementListResponse, AnnouncementType, AttachmentByIdResponse, AudioConvertResponse, AutomationPartner, AutomationPartnerAction, CallEndpoint, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, CommentHistoryPage, CompanyAccessPackageItem, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyQueue, CompanyResource, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, Config, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, ContactResponse, CreateAnnouncementRequest, CreateAutomationPartnerRequest, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateTimeEntryRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, EnableCampaignCompanyRequest, FindOrCreateContactRequest, FindOrCreateQueueRuleRequest, FlowCatalogParams, FlowCatalogResponse, FlowDefinition, FlowReadiness, ForwardMessageRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetAutomationPartnerRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetSupportWidgetIdResponse, GetUserByIdResponse, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListAutomationActionsRequest, ListAutomationPartnersRequest, ListCasesRequest, ListCasesResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, ListTimeEntriesPage, ListTimeEntriesRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, StrongPasswordOptions, StrongPasswordOptionsResponse, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateCompanyBooleanConfigRequest, UpdateCompanyRequest, UpdateCompanyStringConfigRequest, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, UpdateTimeEntryRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UploadPresignedUrlResponse, User, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
package/dist/index.js CHANGED
@@ -53,6 +53,59 @@ var CustomerServiceGateway = class {
53
53
  const { data } = await this.httpClient.get(`${this.baseUrl}/companies/search/${companyId}`);
54
54
  return data;
55
55
  }
56
+ /**
57
+ * Updates the current company settings.
58
+ * @param payload - The company fields to update.
59
+ * @returns The updated company data wrapped in a {@link CompanyResponse}.
60
+ */
61
+ async updateCompany(payload) {
62
+ const { data } = await this.httpClient.put(`${this.baseUrl}/companies`, payload);
63
+ return data;
64
+ }
65
+ /**
66
+ * Retrieves the support widget identifier for the current company.
67
+ * @returns The support widget identifier.
68
+ */
69
+ async getSupportWidgetId() {
70
+ const { data } = await this.httpClient.get(
71
+ `${this.baseUrl}/companies/support-widget-id`
72
+ );
73
+ return data;
74
+ }
75
+ /**
76
+ * Updates the support widget identifier for the current company.
77
+ * @param payload - The support widget identifier to set.
78
+ * @returns The updated company support widget data.
79
+ */
80
+ async updateSupportWidgetId(payload) {
81
+ const { data } = await this.httpClient.put(
82
+ `${this.baseUrl}/companies/support-widget-id`,
83
+ payload
84
+ );
85
+ return data;
86
+ }
87
+ /**
88
+ * Retrieves the list of queues configured for the current company.
89
+ * @returns The company queues.
90
+ */
91
+ async getCompanyQueues() {
92
+ const { data } = await this.httpClient.get(`${this.baseUrl}/companies/queues`);
93
+ return data;
94
+ }
95
+ /**
96
+ * Retrieves the current company data along with all its config entries.
97
+ * @returns The company data with its configs.
98
+ */
99
+ async getCompanyConfigs() {
100
+ const { data } = await this.httpClient.get(`${this.baseUrl}/companies/configs`);
101
+ return data;
102
+ }
103
+ async getCompanyConfig(key) {
104
+ const { data } = await this.httpClient.get(
105
+ `${this.baseUrl}/companies/configs/${key}`
106
+ );
107
+ return data;
108
+ }
56
109
  /**
57
110
  * Retrieves the strong password options config for a company.
58
111
  * @param companyId - The unique identifier of the company.
@@ -65,6 +118,44 @@ var CustomerServiceGateway = class {
65
118
  );
66
119
  return data;
67
120
  }
121
+ /**
122
+ * Updates the strong password options config for the current company.
123
+ * @param payload - The strong password policy rules to apply.
124
+ * @returns The updated strong password options company config.
125
+ */
126
+ async updateStrongPasswordOptions(payload) {
127
+ const { data } = await this.httpClient.put(
128
+ `${this.baseUrl}/companies/configs/strong-password-options`,
129
+ payload
130
+ );
131
+ return data;
132
+ }
133
+ /**
134
+ * Updates a boolean company config by key.
135
+ * @param key - The config key to update.
136
+ * @param payload - The boolean value to set.
137
+ * @returns The updated company config entry.
138
+ */
139
+ async updateCompanyBooleanConfig(key, payload) {
140
+ const { data } = await this.httpClient.put(
141
+ `${this.baseUrl}/companies/configs/${key}`,
142
+ payload
143
+ );
144
+ return data;
145
+ }
146
+ /**
147
+ * Updates a string company config by key.
148
+ * @param key - The config key to update.
149
+ * @param payload - The string value to set.
150
+ * @returns The updated company config entry.
151
+ */
152
+ async updateCompanyStringConfig(key, payload) {
153
+ const { data } = await this.httpClient.put(
154
+ `${this.baseUrl}/companies/configs/${key}`,
155
+ payload
156
+ );
157
+ return data;
158
+ }
68
159
  /**
69
160
  * Retrieves a user by login email.
70
161
  * @param email - The user email used as login identifier.
@@ -1096,6 +1187,24 @@ var CallReportGateway = class {
1096
1187
  }
1097
1188
  };
1098
1189
 
1190
+ // src/calls/index.ts
1191
+ var CallsGateway = class {
1192
+ constructor(httpClient, baseUrl) {
1193
+ this.httpClient = httpClient;
1194
+ this.baseUrl = baseUrl;
1195
+ }
1196
+ httpClient;
1197
+ baseUrl;
1198
+ /**
1199
+ * Retrieves all call endpoints and their current status.
1200
+ * @returns The list of call endpoints.
1201
+ */
1202
+ async getEndpoints() {
1203
+ const { data } = await this.httpClient.get(`${this.baseUrl}/endpoints`);
1204
+ return data;
1205
+ }
1206
+ };
1207
+
1099
1208
  // src/cases/index.ts
1100
1209
  var CasesGateway = class {
1101
1210
  constructor(httpClient, baseUrl) {
@@ -1279,10 +1388,11 @@ var SDKGateways = class {
1279
1388
  integrations;
1280
1389
  chatWebservice;
1281
1390
  callReport;
1391
+ calls;
1282
1392
  cases;
1283
1393
  rh;
1284
1394
  accessHub;
1285
- constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, cases, rh, accessHub) {
1395
+ constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, calls, cases, rh, accessHub) {
1286
1396
  this.customerService = customerService;
1287
1397
  this.chatConfig = chatConfig;
1288
1398
  this.campaigns = campaigns;
@@ -1292,6 +1402,7 @@ var SDKGateways = class {
1292
1402
  this.integrations = integrations;
1293
1403
  this.chatWebservice = chatWebservice;
1294
1404
  this.callReport = callReport;
1405
+ this.calls = calls;
1295
1406
  this.cases = cases;
1296
1407
  this.rh = rh;
1297
1408
  this.accessHub = accessHub;
@@ -1312,6 +1423,7 @@ function createClient(params) {
1312
1423
  const integrations = params.services.integrations ? new IntegrationsGateway(httpClient, params.services.integrations.baseUrl) : null;
1313
1424
  const chatWebservice = params.services.chatWebservice ? new ChatWebserviceGateway(httpClient, params.services.chatWebservice.baseUrl) : null;
1314
1425
  const callReport = params.services.callReport ? new CallReportGateway(httpClient, params.services.callReport.baseUrl) : null;
1426
+ const calls = params.services.calls ? new CallsGateway(httpClient, params.services.calls.baseUrl) : null;
1315
1427
  const cases = params.services.cases ? new CasesGateway(httpClient, params.services.cases.baseUrl) : null;
1316
1428
  const rh = params.services.rh ? new RhGateway(httpClient, params.services.rh.baseUrl) : null;
1317
1429
  const accessHub = params.services.accessHub ? new AccessHubGateway(httpClient, params.services.accessHub.baseUrl) : null;
@@ -1325,6 +1437,7 @@ function createClient(params) {
1325
1437
  integrations,
1326
1438
  chatWebservice,
1327
1439
  callReport,
1440
+ calls,
1328
1441
  cases,
1329
1442
  rh,
1330
1443
  accessHub
@@ -1342,6 +1455,7 @@ var SERVICE_GATEWAYS = {
1342
1455
  INTEGRATIONS: "integrations",
1343
1456
  CHAT_WEBSERVICE: "chat-webservice",
1344
1457
  CALL_REPORT: "call-report",
1458
+ CALLS: "calls",
1345
1459
  CASES: "cases",
1346
1460
  RH: "rh",
1347
1461
  ACCESS_HUB: "access-hub"
@@ -1400,6 +1514,9 @@ function gateway(service) {
1400
1514
  if (!sdk.client.callReport)
1401
1515
  throw new Error(`Service 'call-report' is not configured. Provide its baseUrl in configure().`);
1402
1516
  return sdk.client.callReport;
1517
+ case SERVICE_GATEWAYS.CALLS:
1518
+ if (!sdk.client.calls) throw new Error(`Service 'calls' is not configured. Provide its baseUrl in configure().`);
1519
+ return sdk.client.calls;
1403
1520
  case SERVICE_GATEWAYS.CASES:
1404
1521
  if (!sdk.client.cases) throw new Error(`Service 'cases' is not configured. Provide its baseUrl in configure().`);
1405
1522
  return sdk.client.cases;