@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.mjs
CHANGED
|
@@ -15,6 +15,35 @@ var CustomerServiceGateway = class {
|
|
|
15
15
|
const { data } = await this.httpClient.get(`${this.baseUrl}/companies/search/${companyId}`);
|
|
16
16
|
return data;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Updates the current company settings.
|
|
20
|
+
* @param payload - The company fields to update.
|
|
21
|
+
* @returns The updated company data wrapped in a {@link CompanyResponse}.
|
|
22
|
+
*/
|
|
23
|
+
async updateCompany(payload) {
|
|
24
|
+
const { data } = await this.httpClient.put(`${this.baseUrl}/companies`, payload);
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Updates the support widget identifier for the current company.
|
|
29
|
+
* @param payload - The support widget identifier to set.
|
|
30
|
+
* @returns The updated company support widget data.
|
|
31
|
+
*/
|
|
32
|
+
async updateSupportWidgetId(payload) {
|
|
33
|
+
const { data } = await this.httpClient.put(
|
|
34
|
+
`${this.baseUrl}/companies/support-widget-id`,
|
|
35
|
+
payload
|
|
36
|
+
);
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the list of queues configured for the current company.
|
|
41
|
+
* @returns The company queues.
|
|
42
|
+
*/
|
|
43
|
+
async getCompanyQueues() {
|
|
44
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/companies/queues`);
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
18
47
|
/**
|
|
19
48
|
* Retrieves the strong password options config for a company.
|
|
20
49
|
* @param companyId - The unique identifier of the company.
|
|
@@ -27,6 +56,44 @@ var CustomerServiceGateway = class {
|
|
|
27
56
|
);
|
|
28
57
|
return data;
|
|
29
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Updates the strong password options config for the current company.
|
|
61
|
+
* @param payload - The strong password policy rules to apply.
|
|
62
|
+
* @returns The updated strong password options company config.
|
|
63
|
+
*/
|
|
64
|
+
async updateStrongPasswordOptions(payload) {
|
|
65
|
+
const { data } = await this.httpClient.put(
|
|
66
|
+
`${this.baseUrl}/companies/configs/strong-password-options`,
|
|
67
|
+
payload
|
|
68
|
+
);
|
|
69
|
+
return data;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Updates a boolean company config by key.
|
|
73
|
+
* @param key - The config key to update.
|
|
74
|
+
* @param payload - The boolean value to set.
|
|
75
|
+
* @returns The updated company config entry.
|
|
76
|
+
*/
|
|
77
|
+
async updateCompanyBooleanConfig(key, payload) {
|
|
78
|
+
const { data } = await this.httpClient.put(
|
|
79
|
+
`${this.baseUrl}/companies/configs/${key}`,
|
|
80
|
+
payload
|
|
81
|
+
);
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Updates a string company config by key.
|
|
86
|
+
* @param key - The config key to update.
|
|
87
|
+
* @param payload - The string value to set.
|
|
88
|
+
* @returns The updated company config entry.
|
|
89
|
+
*/
|
|
90
|
+
async updateCompanyStringConfig(key, payload) {
|
|
91
|
+
const { data } = await this.httpClient.put(
|
|
92
|
+
`${this.baseUrl}/companies/configs/${key}`,
|
|
93
|
+
payload
|
|
94
|
+
);
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
30
97
|
/**
|
|
31
98
|
* Retrieves a user by login email.
|
|
32
99
|
* @param email - The user email used as login identifier.
|
|
@@ -1058,6 +1125,24 @@ var CallReportGateway = class {
|
|
|
1058
1125
|
}
|
|
1059
1126
|
};
|
|
1060
1127
|
|
|
1128
|
+
// src/calls/index.ts
|
|
1129
|
+
var CallsGateway = class {
|
|
1130
|
+
constructor(httpClient, baseUrl) {
|
|
1131
|
+
this.httpClient = httpClient;
|
|
1132
|
+
this.baseUrl = baseUrl;
|
|
1133
|
+
}
|
|
1134
|
+
httpClient;
|
|
1135
|
+
baseUrl;
|
|
1136
|
+
/**
|
|
1137
|
+
* Retrieves all call endpoints and their current status.
|
|
1138
|
+
* @returns The list of call endpoints.
|
|
1139
|
+
*/
|
|
1140
|
+
async getEndpoints() {
|
|
1141
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/endpoints`);
|
|
1142
|
+
return data;
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1061
1146
|
// src/cases/index.ts
|
|
1062
1147
|
var CasesGateway = class {
|
|
1063
1148
|
constructor(httpClient, baseUrl) {
|
|
@@ -1241,10 +1326,11 @@ var SDKGateways = class {
|
|
|
1241
1326
|
integrations;
|
|
1242
1327
|
chatWebservice;
|
|
1243
1328
|
callReport;
|
|
1329
|
+
calls;
|
|
1244
1330
|
cases;
|
|
1245
1331
|
rh;
|
|
1246
1332
|
accessHub;
|
|
1247
|
-
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, cases, rh, accessHub) {
|
|
1333
|
+
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, calls, cases, rh, accessHub) {
|
|
1248
1334
|
this.customerService = customerService;
|
|
1249
1335
|
this.chatConfig = chatConfig;
|
|
1250
1336
|
this.campaigns = campaigns;
|
|
@@ -1254,6 +1340,7 @@ var SDKGateways = class {
|
|
|
1254
1340
|
this.integrations = integrations;
|
|
1255
1341
|
this.chatWebservice = chatWebservice;
|
|
1256
1342
|
this.callReport = callReport;
|
|
1343
|
+
this.calls = calls;
|
|
1257
1344
|
this.cases = cases;
|
|
1258
1345
|
this.rh = rh;
|
|
1259
1346
|
this.accessHub = accessHub;
|
|
@@ -1274,6 +1361,7 @@ function createClient(params) {
|
|
|
1274
1361
|
const integrations = params.services.integrations ? new IntegrationsGateway(httpClient, params.services.integrations.baseUrl) : null;
|
|
1275
1362
|
const chatWebservice = params.services.chatWebservice ? new ChatWebserviceGateway(httpClient, params.services.chatWebservice.baseUrl) : null;
|
|
1276
1363
|
const callReport = params.services.callReport ? new CallReportGateway(httpClient, params.services.callReport.baseUrl) : null;
|
|
1364
|
+
const calls = params.services.calls ? new CallsGateway(httpClient, params.services.calls.baseUrl) : null;
|
|
1277
1365
|
const cases = params.services.cases ? new CasesGateway(httpClient, params.services.cases.baseUrl) : null;
|
|
1278
1366
|
const rh = params.services.rh ? new RhGateway(httpClient, params.services.rh.baseUrl) : null;
|
|
1279
1367
|
const accessHub = params.services.accessHub ? new AccessHubGateway(httpClient, params.services.accessHub.baseUrl) : null;
|
|
@@ -1287,6 +1375,7 @@ function createClient(params) {
|
|
|
1287
1375
|
integrations,
|
|
1288
1376
|
chatWebservice,
|
|
1289
1377
|
callReport,
|
|
1378
|
+
calls,
|
|
1290
1379
|
cases,
|
|
1291
1380
|
rh,
|
|
1292
1381
|
accessHub
|
|
@@ -1304,6 +1393,7 @@ var SERVICE_GATEWAYS = {
|
|
|
1304
1393
|
INTEGRATIONS: "integrations",
|
|
1305
1394
|
CHAT_WEBSERVICE: "chat-webservice",
|
|
1306
1395
|
CALL_REPORT: "call-report",
|
|
1396
|
+
CALLS: "calls",
|
|
1307
1397
|
CASES: "cases",
|
|
1308
1398
|
RH: "rh",
|
|
1309
1399
|
ACCESS_HUB: "access-hub"
|
|
@@ -1362,6 +1452,9 @@ function gateway(service) {
|
|
|
1362
1452
|
if (!sdk.client.callReport)
|
|
1363
1453
|
throw new Error(`Service 'call-report' is not configured. Provide its baseUrl in configure().`);
|
|
1364
1454
|
return sdk.client.callReport;
|
|
1455
|
+
case SERVICE_GATEWAYS.CALLS:
|
|
1456
|
+
if (!sdk.client.calls) throw new Error(`Service 'calls' is not configured. Provide its baseUrl in configure().`);
|
|
1457
|
+
return sdk.client.calls;
|
|
1365
1458
|
case SERVICE_GATEWAYS.CASES:
|
|
1366
1459
|
if (!sdk.client.cases) throw new Error(`Service 'cases' is not configured. Provide its baseUrl in configure().`);
|
|
1367
1460
|
return sdk.client.cases;
|