@opens/gateways 1.17.2 → 1.17.4
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/contact-list/contracts/index.d.mts +1 -47
- package/dist/contact-list/contracts/index.d.ts +1 -47
- package/dist/contact-list/contracts/index.js.map +1 -1
- package/dist/customer-service/contracts/index.d.mts +55 -1
- package/dist/customer-service/contracts/index.d.ts +55 -1
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +30 -11
- package/dist/index.d.ts +30 -11
- package/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -239,6 +239,42 @@ var CustomerServiceGateway = class {
|
|
|
239
239
|
);
|
|
240
240
|
return data;
|
|
241
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Creates a company user device (e.g. a SNEP peer device).
|
|
244
|
+
* @param payload - The device type and owner user identifier.
|
|
245
|
+
*/
|
|
246
|
+
async createUserDevice(payload) {
|
|
247
|
+
await this.httpClient.post(`${this.baseUrl}/companies/users/devices`, payload);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Deletes a company user device by its unique identifier.
|
|
251
|
+
* @param deviceId - The unique identifier of the user device.
|
|
252
|
+
*/
|
|
253
|
+
async deleteUserDevice(deviceId) {
|
|
254
|
+
await this.httpClient.delete(`${this.baseUrl}/companies/users/devices/${deviceId}`);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Lists all SNEP peers for the current company.
|
|
258
|
+
* @returns The list of SNEP peers.
|
|
259
|
+
*/
|
|
260
|
+
async getPeers() {
|
|
261
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/snep/users/peers`);
|
|
262
|
+
return data;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Creates a SNEP peer for a user.
|
|
266
|
+
* @param payload - The peer extension, username and origin.
|
|
267
|
+
*/
|
|
268
|
+
async createPeer(payload) {
|
|
269
|
+
await this.httpClient.post(`${this.baseUrl}/snep/users/peer`, payload);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Updates a SNEP peer password and display name.
|
|
273
|
+
* @param payload - The peer identifier, password and name.
|
|
274
|
+
*/
|
|
275
|
+
async updatePeer(payload) {
|
|
276
|
+
await this.httpClient.put(`${this.baseUrl}/snep/users/peer`, payload);
|
|
277
|
+
}
|
|
242
278
|
/**
|
|
243
279
|
* Generates a two-factor OTP secret URL for a user.
|
|
244
280
|
* @param payload - The user identifier.
|
|
@@ -888,17 +924,6 @@ var ContactListGateway = class {
|
|
|
888
924
|
});
|
|
889
925
|
return data;
|
|
890
926
|
}
|
|
891
|
-
/**
|
|
892
|
-
* Searches WhatsApp accounts with optional filtering and pagination.
|
|
893
|
-
* @param params - The query parameters for the search.
|
|
894
|
-
* @returns The paginated WhatsApp accounts response.
|
|
895
|
-
*/
|
|
896
|
-
async searchWhatsappAccounts(params) {
|
|
897
|
-
const { data } = await this.httpClient.get(`${this.baseUrl}/whatsapp-accounts/search`, {
|
|
898
|
-
params
|
|
899
|
-
});
|
|
900
|
-
return data;
|
|
901
|
-
}
|
|
902
927
|
/**
|
|
903
928
|
* Retrieves all contact categories.
|
|
904
929
|
* @returns An array of contact categories.
|