@signalhouse-sms/sdk 1.11.0 → 1.13.0

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.
@@ -16,18 +16,20 @@ export class Webhooks {
16
16
  * @param {Object} params - The parameters for getting webhooks
17
17
  * @param {string} [params.id] - Filter by webhook ID
18
18
  * @param {string} [params.groupId] - Filter by associated group ID
19
- * @param {string} [params.endpointType] - Filter by endpoint type (Global, Number)
19
+ * @param {string} [params.endpointType] - Filter by endpoint type (Global, Number, Agent)
20
20
  * @param {string} [params.phoneNumber] - Filter by associated phone number (for SMS webhooks)
21
+ * @param {string} [params.agentId] - Filter by RCS agent (for Agent webhooks)
21
22
  * @param {number} [params.page] - The page number for pagination
22
23
  * @param {number} [params.limit] - The number of items per page for pagination
23
24
  * @param {RequestOptions} [params.options] - Additional options for the request
24
25
  * @returns {Promise<SdkResponse<Array>>} The response from the server
25
26
  */
26
- getWebhooks({ id, groupId, endpointType, phoneNumber, page, limit, options }: {
27
+ getWebhooks({ id, groupId, endpointType, phoneNumber, agentId, page, limit, options }: {
27
28
  id?: string;
28
29
  groupId?: string;
29
30
  endpointType?: string;
30
31
  phoneNumber?: string;
32
+ agentId?: string;
31
33
  page?: number;
32
34
  limit?: number;
33
35
  options?: RequestOptions;
@@ -46,7 +48,9 @@ export class Webhooks {
46
48
  * `webhookData.eventSettings` holds per-event options keyed by event name:
47
49
  * `NUMBER_HEALTH_BELOW_THRESHOLD` and `CAMPAIGN_HEALTH_BELOW_THRESHOLD` each take `{ threshold }`, the 7-day
48
50
  * health score (1.5–10, in 0.5 steps) below which the event fires; a subscribed health event without one is
49
- * stored with the default, 6.
51
+ * stored with the default, 6. `webhookData.endpointType` is `Global`, `Number` or `Agent`. An `Agent` endpoint
52
+ * receives one RCS agent's events only: it needs `agentId`, and may set `secondaryUrl`, which gets one try when
53
+ * every attempt to `url` fails.
50
54
  * @async
51
55
  * @roles api, admin, developer
52
56
  * @param {Object} params - The parameters for creating a webhook
@@ -67,7 +71,8 @@ export class Webhooks {
67
71
  * the stored credentials; `HMAC` is rejected for an endpoint with no signing secret (call
68
72
  * `rotateWebhookSecret` first). `updateData.eventSettings` changes per-event options by event name
69
73
  * (`{ NUMBER_HEALTH_BELOW_THRESHOLD: { threshold } }`, `{ CAMPAIGN_HEALTH_BELOW_THRESHOLD: { threshold } }`,
70
- * 1.5–10 in 0.5 steps); events you omit keep their stored settings. Like every read of a webhook, the
74
+ * 1.5–10 in 0.5 steps); events you omit keep their stored settings. `updateData.secondaryUrl` changes an
75
+ * `Agent` endpoint's secondary URL, and `null` clears it. Like every read of a webhook, the
71
76
  * response carries `hasSigningSecret` and `hasCredentials` (booleans), never a secret or credential.
72
77
  * @async
73
78
  * @roles api, admin, developer