@opens/gateways 1.16.15 → 1.16.16

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
@@ -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