@opens/gateways 1.17.3 → 1.17.5

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.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.
@@ -551,6 +587,15 @@ var ChatConfigGateway = class {
551
587
  });
552
588
  return data;
553
589
  }
590
+ /**
591
+ * Retrieves the rules and edges for a workflow.
592
+ * @param workflowId - The unique identifier of the workflow.
593
+ * @returns The workflow data.
594
+ */
595
+ async getWorkflowData(workflowId) {
596
+ const { data } = await this.httpClient.get(`${this.baseUrl}/workflow/${workflowId}`);
597
+ return data;
598
+ }
554
599
  };
555
600
 
556
601
  // src/campaigns/index.ts
@@ -888,17 +933,6 @@ var ContactListGateway = class {
888
933
  });
889
934
  return data;
890
935
  }
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
936
  /**
903
937
  * Retrieves all contact categories.
904
938
  * @returns An array of contact categories.