@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.js CHANGED
@@ -277,6 +277,42 @@ var CustomerServiceGateway = class {
277
277
  );
278
278
  return data;
279
279
  }
280
+ /**
281
+ * Creates a company user device (e.g. a SNEP peer device).
282
+ * @param payload - The device type and owner user identifier.
283
+ */
284
+ async createUserDevice(payload) {
285
+ await this.httpClient.post(`${this.baseUrl}/companies/users/devices`, payload);
286
+ }
287
+ /**
288
+ * Deletes a company user device by its unique identifier.
289
+ * @param deviceId - The unique identifier of the user device.
290
+ */
291
+ async deleteUserDevice(deviceId) {
292
+ await this.httpClient.delete(`${this.baseUrl}/companies/users/devices/${deviceId}`);
293
+ }
294
+ /**
295
+ * Lists all SNEP peers for the current company.
296
+ * @returns The list of SNEP peers.
297
+ */
298
+ async getPeers() {
299
+ const { data } = await this.httpClient.get(`${this.baseUrl}/snep/users/peers`);
300
+ return data;
301
+ }
302
+ /**
303
+ * Creates a SNEP peer for a user.
304
+ * @param payload - The peer extension, username and origin.
305
+ */
306
+ async createPeer(payload) {
307
+ await this.httpClient.post(`${this.baseUrl}/snep/users/peer`, payload);
308
+ }
309
+ /**
310
+ * Updates a SNEP peer password and display name.
311
+ * @param payload - The peer identifier, password and name.
312
+ */
313
+ async updatePeer(payload) {
314
+ await this.httpClient.put(`${this.baseUrl}/snep/users/peer`, payload);
315
+ }
280
316
  /**
281
317
  * Generates a two-factor OTP secret URL for a user.
282
318
  * @param payload - The user identifier.
@@ -589,6 +625,15 @@ var ChatConfigGateway = class {
589
625
  });
590
626
  return data;
591
627
  }
628
+ /**
629
+ * Retrieves the rules and edges for a workflow.
630
+ * @param workflowId - The unique identifier of the workflow.
631
+ * @returns The workflow data.
632
+ */
633
+ async getWorkflowData(workflowId) {
634
+ const { data } = await this.httpClient.get(`${this.baseUrl}/workflow/${workflowId}`);
635
+ return data;
636
+ }
592
637
  };
593
638
 
594
639
  // src/campaigns/index.ts
@@ -926,17 +971,6 @@ var ContactListGateway = class {
926
971
  });
927
972
  return data;
928
973
  }
929
- /**
930
- * Searches WhatsApp accounts with optional filtering and pagination.
931
- * @param params - The query parameters for the search.
932
- * @returns The paginated WhatsApp accounts response.
933
- */
934
- async searchWhatsappAccounts(params) {
935
- const { data } = await this.httpClient.get(`${this.baseUrl}/whatsapp-accounts/search`, {
936
- params
937
- });
938
- return data;
939
- }
940
974
  /**
941
975
  * Retrieves all contact categories.
942
976
  * @returns An array of contact categories.