@opens/gateways 1.15.14 → 1.15.15
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/calls/contracts/index.d.mts +12 -0
- package/dist/calls/contracts/index.d.ts +12 -0
- package/dist/calls/contracts/index.js +19 -0
- package/dist/calls/contracts/index.js.map +1 -0
- package/dist/calls/contracts/index.mjs +1 -0
- package/dist/calls/contracts/index.mjs.map +1 -0
- package/dist/customer-service/contracts/index.d.mts +104 -12
- package/dist/customer-service/contracts/index.d.ts +104 -12
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +61 -3
- package/dist/index.d.ts +61 -3
- package/dist/index.js +94 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,6 +53,35 @@ 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
|
+
* Updates the support widget identifier for the current company.
|
|
67
|
+
* @param payload - The support widget identifier to set.
|
|
68
|
+
* @returns The updated company support widget data.
|
|
69
|
+
*/
|
|
70
|
+
async updateSupportWidgetId(payload) {
|
|
71
|
+
const { data } = await this.httpClient.put(
|
|
72
|
+
`${this.baseUrl}/companies/support-widget-id`,
|
|
73
|
+
payload
|
|
74
|
+
);
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves the list of queues configured for the current company.
|
|
79
|
+
* @returns The company queues.
|
|
80
|
+
*/
|
|
81
|
+
async getCompanyQueues() {
|
|
82
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/companies/queues`);
|
|
83
|
+
return data;
|
|
84
|
+
}
|
|
56
85
|
/**
|
|
57
86
|
* Retrieves the strong password options config for a company.
|
|
58
87
|
* @param companyId - The unique identifier of the company.
|
|
@@ -65,6 +94,44 @@ var CustomerServiceGateway = class {
|
|
|
65
94
|
);
|
|
66
95
|
return data;
|
|
67
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Updates the strong password options config for the current company.
|
|
99
|
+
* @param payload - The strong password policy rules to apply.
|
|
100
|
+
* @returns The updated strong password options company config.
|
|
101
|
+
*/
|
|
102
|
+
async updateStrongPasswordOptions(payload) {
|
|
103
|
+
const { data } = await this.httpClient.put(
|
|
104
|
+
`${this.baseUrl}/companies/configs/strong-password-options`,
|
|
105
|
+
payload
|
|
106
|
+
);
|
|
107
|
+
return data;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Updates a boolean company config by key.
|
|
111
|
+
* @param key - The config key to update.
|
|
112
|
+
* @param payload - The boolean value to set.
|
|
113
|
+
* @returns The updated company config entry.
|
|
114
|
+
*/
|
|
115
|
+
async updateCompanyBooleanConfig(key, payload) {
|
|
116
|
+
const { data } = await this.httpClient.put(
|
|
117
|
+
`${this.baseUrl}/companies/configs/${key}`,
|
|
118
|
+
payload
|
|
119
|
+
);
|
|
120
|
+
return data;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Updates a string company config by key.
|
|
124
|
+
* @param key - The config key to update.
|
|
125
|
+
* @param payload - The string value to set.
|
|
126
|
+
* @returns The updated company config entry.
|
|
127
|
+
*/
|
|
128
|
+
async updateCompanyStringConfig(key, payload) {
|
|
129
|
+
const { data } = await this.httpClient.put(
|
|
130
|
+
`${this.baseUrl}/companies/configs/${key}`,
|
|
131
|
+
payload
|
|
132
|
+
);
|
|
133
|
+
return data;
|
|
134
|
+
}
|
|
68
135
|
/**
|
|
69
136
|
* Retrieves a user by login email.
|
|
70
137
|
* @param email - The user email used as login identifier.
|
|
@@ -1096,6 +1163,24 @@ var CallReportGateway = class {
|
|
|
1096
1163
|
}
|
|
1097
1164
|
};
|
|
1098
1165
|
|
|
1166
|
+
// src/calls/index.ts
|
|
1167
|
+
var CallsGateway = class {
|
|
1168
|
+
constructor(httpClient, baseUrl) {
|
|
1169
|
+
this.httpClient = httpClient;
|
|
1170
|
+
this.baseUrl = baseUrl;
|
|
1171
|
+
}
|
|
1172
|
+
httpClient;
|
|
1173
|
+
baseUrl;
|
|
1174
|
+
/**
|
|
1175
|
+
* Retrieves all call endpoints and their current status.
|
|
1176
|
+
* @returns The list of call endpoints.
|
|
1177
|
+
*/
|
|
1178
|
+
async getEndpoints() {
|
|
1179
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/endpoints`);
|
|
1180
|
+
return data;
|
|
1181
|
+
}
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1099
1184
|
// src/cases/index.ts
|
|
1100
1185
|
var CasesGateway = class {
|
|
1101
1186
|
constructor(httpClient, baseUrl) {
|
|
@@ -1279,10 +1364,11 @@ var SDKGateways = class {
|
|
|
1279
1364
|
integrations;
|
|
1280
1365
|
chatWebservice;
|
|
1281
1366
|
callReport;
|
|
1367
|
+
calls;
|
|
1282
1368
|
cases;
|
|
1283
1369
|
rh;
|
|
1284
1370
|
accessHub;
|
|
1285
|
-
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, cases, rh, accessHub) {
|
|
1371
|
+
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, calls, cases, rh, accessHub) {
|
|
1286
1372
|
this.customerService = customerService;
|
|
1287
1373
|
this.chatConfig = chatConfig;
|
|
1288
1374
|
this.campaigns = campaigns;
|
|
@@ -1292,6 +1378,7 @@ var SDKGateways = class {
|
|
|
1292
1378
|
this.integrations = integrations;
|
|
1293
1379
|
this.chatWebservice = chatWebservice;
|
|
1294
1380
|
this.callReport = callReport;
|
|
1381
|
+
this.calls = calls;
|
|
1295
1382
|
this.cases = cases;
|
|
1296
1383
|
this.rh = rh;
|
|
1297
1384
|
this.accessHub = accessHub;
|
|
@@ -1312,6 +1399,7 @@ function createClient(params) {
|
|
|
1312
1399
|
const integrations = params.services.integrations ? new IntegrationsGateway(httpClient, params.services.integrations.baseUrl) : null;
|
|
1313
1400
|
const chatWebservice = params.services.chatWebservice ? new ChatWebserviceGateway(httpClient, params.services.chatWebservice.baseUrl) : null;
|
|
1314
1401
|
const callReport = params.services.callReport ? new CallReportGateway(httpClient, params.services.callReport.baseUrl) : null;
|
|
1402
|
+
const calls = params.services.calls ? new CallsGateway(httpClient, params.services.calls.baseUrl) : null;
|
|
1315
1403
|
const cases = params.services.cases ? new CasesGateway(httpClient, params.services.cases.baseUrl) : null;
|
|
1316
1404
|
const rh = params.services.rh ? new RhGateway(httpClient, params.services.rh.baseUrl) : null;
|
|
1317
1405
|
const accessHub = params.services.accessHub ? new AccessHubGateway(httpClient, params.services.accessHub.baseUrl) : null;
|
|
@@ -1325,6 +1413,7 @@ function createClient(params) {
|
|
|
1325
1413
|
integrations,
|
|
1326
1414
|
chatWebservice,
|
|
1327
1415
|
callReport,
|
|
1416
|
+
calls,
|
|
1328
1417
|
cases,
|
|
1329
1418
|
rh,
|
|
1330
1419
|
accessHub
|
|
@@ -1342,6 +1431,7 @@ var SERVICE_GATEWAYS = {
|
|
|
1342
1431
|
INTEGRATIONS: "integrations",
|
|
1343
1432
|
CHAT_WEBSERVICE: "chat-webservice",
|
|
1344
1433
|
CALL_REPORT: "call-report",
|
|
1434
|
+
CALLS: "calls",
|
|
1345
1435
|
CASES: "cases",
|
|
1346
1436
|
RH: "rh",
|
|
1347
1437
|
ACCESS_HUB: "access-hub"
|
|
@@ -1400,6 +1490,9 @@ function gateway(service) {
|
|
|
1400
1490
|
if (!sdk.client.callReport)
|
|
1401
1491
|
throw new Error(`Service 'call-report' is not configured. Provide its baseUrl in configure().`);
|
|
1402
1492
|
return sdk.client.callReport;
|
|
1493
|
+
case SERVICE_GATEWAYS.CALLS:
|
|
1494
|
+
if (!sdk.client.calls) throw new Error(`Service 'calls' is not configured. Provide its baseUrl in configure().`);
|
|
1495
|
+
return sdk.client.calls;
|
|
1403
1496
|
case SERVICE_GATEWAYS.CASES:
|
|
1404
1497
|
if (!sdk.client.cases) throw new Error(`Service 'cases' is not configured. Provide its baseUrl in configure().`);
|
|
1405
1498
|
return sdk.client.cases;
|