@opens/gateways 1.16.19 → 1.16.20

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
@@ -471,6 +471,19 @@ var ChatConfigGateway = class {
471
471
  const { data } = await this.httpClient.put(`${this.baseUrl}/rules/queue/find-or-create`, payload);
472
472
  return data;
473
473
  }
474
+ /**
475
+ * Retrieves a rule by its ID (`GET /rules/:id`).
476
+ * Pass `rootOnly: false` to expand the nested `flow` tree recursively.
477
+ * @param ruleId - The unique identifier of the rule.
478
+ * @param params - Optional query parameters (`rootOnly`, `includeFlow`, etc.).
479
+ * @returns The rule, optionally with nested `flow`.
480
+ */
481
+ async getRuleById(ruleId, params) {
482
+ const { data } = await this.httpClient.get(`${this.baseUrl}/rules/${ruleId}`, {
483
+ params
484
+ });
485
+ return data;
486
+ }
474
487
  /**
475
488
  * @param params - The company and pagination parameters.
476
489
  * @returns The paginated initial service rules.