@opens/gateways 1.16.19 → 1.16.21
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/chat-config/contracts/index.d.mts +143 -9
- package/dist/chat-config/contracts/index.d.ts +143 -9
- package/dist/customer-service/contracts/index.d.mts +308 -9
- package/dist/customer-service/contracts/index.d.ts +308 -9
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +27 -5
- package/dist/index.d.ts +27 -5
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -350,6 +350,32 @@ var CustomerServiceGateway = class {
|
|
|
350
350
|
});
|
|
351
351
|
return data;
|
|
352
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Submits one response to a survey announcement.
|
|
355
|
+
* @param announcementId - The unique identifier of the survey announcement.
|
|
356
|
+
* @param payload - The subject identifier and validated survey answers.
|
|
357
|
+
* @returns The persisted survey response.
|
|
358
|
+
*/
|
|
359
|
+
async submitSurveyResponse(announcementId, payload) {
|
|
360
|
+
const { data } = await this.httpClient.post(
|
|
361
|
+
`${this.baseUrl}/announcements/${announcementId}/responses`,
|
|
362
|
+
payload
|
|
363
|
+
);
|
|
364
|
+
return data;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Retrieves paginated responses for a survey announcement.
|
|
368
|
+
* @param announcementId - The unique identifier of the survey announcement.
|
|
369
|
+
* @param query - Pagination options for the administrative list.
|
|
370
|
+
* @returns Paginated survey responses.
|
|
371
|
+
*/
|
|
372
|
+
async findSurveyResponses(announcementId, query) {
|
|
373
|
+
const { data } = await this.httpClient.get(
|
|
374
|
+
`${this.baseUrl}/announcements/admin/${announcementId}/responses`,
|
|
375
|
+
{ params: query }
|
|
376
|
+
);
|
|
377
|
+
return data;
|
|
378
|
+
}
|
|
353
379
|
};
|
|
354
380
|
|
|
355
381
|
// src/chat-config/index.ts
|
|
@@ -471,6 +497,19 @@ var ChatConfigGateway = class {
|
|
|
471
497
|
const { data } = await this.httpClient.put(`${this.baseUrl}/rules/queue/find-or-create`, payload);
|
|
472
498
|
return data;
|
|
473
499
|
}
|
|
500
|
+
/**
|
|
501
|
+
* Retrieves a rule by its ID (`GET /rules/:id`).
|
|
502
|
+
* Pass `rootOnly: false` to expand the nested `flow` tree recursively.
|
|
503
|
+
* @param ruleId - The unique identifier of the rule.
|
|
504
|
+
* @param params - Optional query parameters (`rootOnly`, `includeFlow`, etc.).
|
|
505
|
+
* @returns The rule, optionally with nested `flow`.
|
|
506
|
+
*/
|
|
507
|
+
async getRuleById(ruleId, params) {
|
|
508
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/rules/${ruleId}`, {
|
|
509
|
+
params
|
|
510
|
+
});
|
|
511
|
+
return data;
|
|
512
|
+
}
|
|
474
513
|
/**
|
|
475
514
|
* @param params - The company and pagination parameters.
|
|
476
515
|
* @returns The paginated initial service rules.
|