zernio-sdk 0.0.1066 → 0.0.1067
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.
- checksums.yaml +4 -4
- data/docs/CreateWebhookSettingsRequest.md +3 -1
- data/docs/UpdateWebhookSettingsRequest.md +3 -1
- data/docs/Webhook.md +3 -1
- data/docs/WebhooksApi.md +2 -2
- data/lib/zernio-sdk/api/webhooks_api.rb +4 -4
- data/lib/zernio-sdk/models/create_webhook_settings_request.rb +35 -4
- data/lib/zernio-sdk/models/update_webhook_settings_request.rb +35 -4
- data/lib/zernio-sdk/models/webhook.rb +16 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +1 -1
- data/spec/api/webhooks_api_spec.rb +2 -2
- data/spec/models/create_webhook_settings_request_spec.rb +6 -0
- data/spec/models/update_webhook_settings_request_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- metadata +2168 -2168
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86169536fec909716dbb44f07d1f2d53e96db7c665386c34e502fbde9395d702
|
|
4
|
+
data.tar.gz: 0ef9eb7295f5d8c98ff7d6748722ea51d46cb8b44cc70b13aa6cc6d2c17f8aa0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52bfac9e54b042470cb42259b2ca863de956aa9b1fe834b1dda9ed5a2dd257ae6e43b428fc1c5e87d30eea9a739f8f9cc743faea18301342512db414d5e96470
|
|
7
|
+
data.tar.gz: 1ffde8705240cee8c5da74aabfc5b2d253cb3267afe5b4decde1154b084613f40fa47c7590cb6fdb9390211856a0926120f7779251a9ba57c55fe34f81ee942c
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **is_active** | **Boolean** | Enable or disable webhook delivery. Defaults to `true` when omitted. | [optional][default to true] |
|
|
12
12
|
| **custom_headers** | **Hash<String, String>** | Custom headers to include in webhook requests | [optional] |
|
|
13
13
|
| **disabled_resource_groups** | **Array<String>** | Resource groups this subscription does not receive (opt-out denylist). Omit or send an empty array to receive every event in `events`. Listing a group here drops its events before delivery and on every replay path. Set at creation it applies to everything this subscription ever receives; changed later via PUT it applies to events emitted after the change, with a five-minute tail for events already queued (see that operation). When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned into whatever you send here, so a restricted key can never create a subscription wider than itself. | [optional] |
|
|
14
|
+
| **profile_ids** | **Array<String>** | Profiles this subscription receives events for. Omit or send an empty array to receive every profile. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing is created. Typical use is routing the profile that holds test accounts to a staging endpoint. | [optional] |
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,7 +25,8 @@ instance = Zernio::CreateWebhookSettingsRequest.new(
|
|
|
24
25
|
events: null,
|
|
25
26
|
is_active: null,
|
|
26
27
|
custom_headers: null,
|
|
27
|
-
disabled_resource_groups: null
|
|
28
|
+
disabled_resource_groups: null,
|
|
29
|
+
profile_ids: null
|
|
28
30
|
)
|
|
29
31
|
```
|
|
30
32
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| **is_active** | **Boolean** | Enable or disable webhook delivery | [optional] |
|
|
14
14
|
| **custom_headers** | **Hash<String, String>** | Custom headers to include in webhook requests | [optional] |
|
|
15
15
|
| **disabled_resource_groups** | **Array<String>** | Replaces the subscription's denylist. Send an empty array to clear it and receive every event in `events` again. Omitting the field leaves the current denylist untouched. Applies to events emitted after the update; already-queued events can still deliver for up to five minutes after they were enqueued. When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned back in either way, so a restricted key can neither clear nor widen a subscription past its own groups. | [optional] |
|
|
16
|
+
| **profile_ids** | **Array<String>** | Replaces the subscription's profile allowlist. Send an empty array to receive every profile again. Omitting the field leaves the current list untouched. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing changes. Applies to events emitted after the update. | [optional] |
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
|
@@ -28,7 +29,8 @@ instance = Zernio::UpdateWebhookSettingsRequest.new(
|
|
|
28
29
|
events: null,
|
|
29
30
|
is_active: null,
|
|
30
31
|
custom_headers: null,
|
|
31
|
-
disabled_resource_groups: null
|
|
32
|
+
disabled_resource_groups: null,
|
|
33
|
+
profile_ids: null
|
|
32
34
|
)
|
|
33
35
|
```
|
|
34
36
|
|
data/docs/Webhook.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| **failure_count** | **Integer** | Consecutive terminal delivery failures (resets to 0 on any successful delivery). Auto-disable only triggers when the endpoint has had no successful delivery within a 3-day window AND either reaches 20 consecutive terminal failures or has been failing continuously for 3 days; any success within that window keeps the endpoint enabled regardless of the count. | [optional] |
|
|
15
15
|
| **custom_headers** | **Hash<String, String>** | Custom headers included in webhook requests | [optional] |
|
|
16
16
|
| **disabled_resource_groups** | **Array<String>** | Resource groups this subscription does not receive (opt-out denylist, same vocabulary and same semantics as the field on API keys). Absent or empty means the subscription receives every event listed in `events`, which is how every subscription created before this field existed behaves. An event whose group is listed here is dropped before delivery even when it is still present in `events`, and the same check runs on every replay path (test fire, redelivery, dead-letter requeue). Editing the denylist applies to every event emitted afterwards; events already queued when the edit landed can still be delivered for up to five minutes after they were enqueued. | [optional] |
|
|
17
|
+
| **profile_ids** | **Array<String>** | Profiles this subscription receives events for (allowlist). Absent or empty means every profile, which is how every subscription created before this field existed behaves. A scoped subscription is only sent events attributable to a listed profile; events with no profile behind them (`verification.*`, `phone_number.*`) are not delivered to it. Applied when the event is emitted: a redelivery replays a delivery already made to this endpoint, and a test fire ignores the list. | [optional] |
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
|
|
@@ -30,7 +31,8 @@ instance = Zernio::Webhook.new(
|
|
|
30
31
|
last_fired_at: null,
|
|
31
32
|
failure_count: null,
|
|
32
33
|
custom_headers: null,
|
|
33
|
-
disabled_resource_groups: null
|
|
34
|
+
disabled_resource_groups: null,
|
|
35
|
+
profile_ids: null
|
|
34
36
|
)
|
|
35
37
|
```
|
|
36
38
|
|
data/docs/WebhooksApi.md
CHANGED
|
@@ -19,7 +19,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
19
19
|
|
|
20
20
|
Create webhook
|
|
21
21
|
|
|
22
|
-
Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in.
|
|
22
|
+
Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in. `profileIds` pins the subscription to a set of profiles: only events attributable to one of them are delivered. Use it to send the profile holding your test accounts to a staging endpoint. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
23
23
|
|
|
24
24
|
### Examples
|
|
25
25
|
|
|
@@ -446,7 +446,7 @@ end
|
|
|
446
446
|
|
|
447
447
|
Update webhook
|
|
448
448
|
|
|
449
|
-
Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist.
|
|
449
|
+
Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist. `profileIds` replaces the subscription's profile allowlist; an empty array clears it. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
450
450
|
|
|
451
451
|
### Examples
|
|
452
452
|
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create webhook
|
|
23
|
-
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in.
|
|
23
|
+
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in. `profileIds` pins the subscription to a set of profiles: only events attributable to one of them are delivered. Use it to send the profile holding your test accounts to a staging endpoint. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
24
24
|
# @param create_webhook_settings_request [CreateWebhookSettingsRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [UpdateWebhookSettings200Response]
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create webhook
|
|
33
|
-
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in.
|
|
33
|
+
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in. `profileIds` pins the subscription to a set of profiles: only events attributable to one of them are delivered. Use it to send the profile holding your test accounts to a staging endpoint. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
34
34
|
# @param create_webhook_settings_request [CreateWebhookSettingsRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(UpdateWebhookSettings200Response, Integer, Hash)>] UpdateWebhookSettings200Response data, response status code and response headers
|
|
@@ -473,7 +473,7 @@ module Zernio
|
|
|
473
473
|
end
|
|
474
474
|
|
|
475
475
|
# Update webhook
|
|
476
|
-
# Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist.
|
|
476
|
+
# Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist. `profileIds` replaces the subscription's profile allowlist; an empty array clears it. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
477
477
|
# @param update_webhook_settings_request [UpdateWebhookSettingsRequest]
|
|
478
478
|
# @param [Hash] opts the optional parameters
|
|
479
479
|
# @return [UpdateWebhookSettings200Response]
|
|
@@ -483,7 +483,7 @@ module Zernio
|
|
|
483
483
|
end
|
|
484
484
|
|
|
485
485
|
# Update webhook
|
|
486
|
-
# Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist.
|
|
486
|
+
# Update an existing webhook configuration. All fields except `webhookId` are optional; only provided fields will be updated. `webhookId` is the same name the other /v1/webhooks operations use (logs, redeliver, test); the deprecated `_id` is still accepted in its place. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist. `profileIds` replaces the subscription's profile allowlist; an empty array clears it. Ids outside your team are rejected with 404 `profile_not_found`.
|
|
487
487
|
# @param update_webhook_settings_request [UpdateWebhookSettingsRequest]
|
|
488
488
|
# @param [Hash] opts the optional parameters
|
|
489
489
|
# @return [Array<(UpdateWebhookSettings200Response, Integer, Hash)>] UpdateWebhookSettings200Response data, response status code and response headers
|
|
@@ -36,6 +36,9 @@ module Zernio
|
|
|
36
36
|
# Resource groups this subscription does not receive (opt-out denylist). Omit or send an empty array to receive every event in `events`. Listing a group here drops its events before delivery and on every replay path. Set at creation it applies to everything this subscription ever receives; changed later via PUT it applies to events emitted after the change, with a five-minute tail for events already queued (see that operation). When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned into whatever you send here, so a restricted key can never create a subscription wider than itself.
|
|
37
37
|
attr_accessor :disabled_resource_groups
|
|
38
38
|
|
|
39
|
+
# Profiles this subscription receives events for. Omit or send an empty array to receive every profile. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing is created. Typical use is routing the profile that holds test accounts to a staging endpoint.
|
|
40
|
+
attr_accessor :profile_ids
|
|
41
|
+
|
|
39
42
|
class EnumAttributeValidator
|
|
40
43
|
attr_reader :datatype
|
|
41
44
|
attr_reader :allowable_values
|
|
@@ -67,7 +70,8 @@ module Zernio
|
|
|
67
70
|
:'events' => :'events',
|
|
68
71
|
:'is_active' => :'isActive',
|
|
69
72
|
:'custom_headers' => :'customHeaders',
|
|
70
|
-
:'disabled_resource_groups' => :'disabledResourceGroups'
|
|
73
|
+
:'disabled_resource_groups' => :'disabledResourceGroups',
|
|
74
|
+
:'profile_ids' => :'profileIds'
|
|
71
75
|
}
|
|
72
76
|
end
|
|
73
77
|
|
|
@@ -90,7 +94,8 @@ module Zernio
|
|
|
90
94
|
:'events' => :'Array<String>',
|
|
91
95
|
:'is_active' => :'Boolean',
|
|
92
96
|
:'custom_headers' => :'Hash<String, String>',
|
|
93
|
-
:'disabled_resource_groups' => :'Array<String>'
|
|
97
|
+
:'disabled_resource_groups' => :'Array<String>',
|
|
98
|
+
:'profile_ids' => :'Array<String>'
|
|
94
99
|
}
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -157,6 +162,12 @@ module Zernio
|
|
|
157
162
|
self.disabled_resource_groups = value
|
|
158
163
|
end
|
|
159
164
|
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'profile_ids')
|
|
167
|
+
if (value = attributes[:'profile_ids']).is_a?(Array)
|
|
168
|
+
self.profile_ids = value
|
|
169
|
+
end
|
|
170
|
+
end
|
|
160
171
|
end
|
|
161
172
|
|
|
162
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -188,6 +199,10 @@ module Zernio
|
|
|
188
199
|
invalid_properties.push('invalid value for "events", number of items must be greater than or equal to 1.')
|
|
189
200
|
end
|
|
190
201
|
|
|
202
|
+
if !@profile_ids.nil? && @profile_ids.length > 50
|
|
203
|
+
invalid_properties.push('invalid value for "profile_ids", number of items must be less than or equal to 50.')
|
|
204
|
+
end
|
|
205
|
+
|
|
191
206
|
invalid_properties
|
|
192
207
|
end
|
|
193
208
|
|
|
@@ -201,6 +216,7 @@ module Zernio
|
|
|
201
216
|
return false if @url.nil?
|
|
202
217
|
return false if @events.nil?
|
|
203
218
|
return false if @events.length < 1
|
|
219
|
+
return false if !@profile_ids.nil? && @profile_ids.length > 50
|
|
204
220
|
true
|
|
205
221
|
end
|
|
206
222
|
|
|
@@ -232,6 +248,20 @@ module Zernio
|
|
|
232
248
|
@url = url
|
|
233
249
|
end
|
|
234
250
|
|
|
251
|
+
# Custom attribute writer method with validation
|
|
252
|
+
# @param [Object] profile_ids Value to be assigned
|
|
253
|
+
def profile_ids=(profile_ids)
|
|
254
|
+
if profile_ids.nil?
|
|
255
|
+
fail ArgumentError, 'profile_ids cannot be nil'
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if profile_ids.length > 50
|
|
259
|
+
fail ArgumentError, 'invalid value for "profile_ids", number of items must be less than or equal to 50.'
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
@profile_ids = profile_ids
|
|
263
|
+
end
|
|
264
|
+
|
|
235
265
|
# Checks equality by comparing each attribute.
|
|
236
266
|
# @param [Object] Object to be compared
|
|
237
267
|
def ==(o)
|
|
@@ -243,7 +273,8 @@ module Zernio
|
|
|
243
273
|
events == o.events &&
|
|
244
274
|
is_active == o.is_active &&
|
|
245
275
|
custom_headers == o.custom_headers &&
|
|
246
|
-
disabled_resource_groups == o.disabled_resource_groups
|
|
276
|
+
disabled_resource_groups == o.disabled_resource_groups &&
|
|
277
|
+
profile_ids == o.profile_ids
|
|
247
278
|
end
|
|
248
279
|
|
|
249
280
|
# @see the `==` method
|
|
@@ -255,7 +286,7 @@ module Zernio
|
|
|
255
286
|
# Calculates hash code according to all attributes.
|
|
256
287
|
# @return [Integer] Hash code
|
|
257
288
|
def hash
|
|
258
|
-
[name, url, secret, events, is_active, custom_headers, disabled_resource_groups].hash
|
|
289
|
+
[name, url, secret, events, is_active, custom_headers, disabled_resource_groups, profile_ids].hash
|
|
259
290
|
end
|
|
260
291
|
|
|
261
292
|
# Builds the object from hash
|
|
@@ -42,6 +42,9 @@ module Zernio
|
|
|
42
42
|
# Replaces the subscription's denylist. Send an empty array to clear it and receive every event in `events` again. Omitting the field leaves the current denylist untouched. Applies to events emitted after the update; already-queued events can still deliver for up to five minutes after they were enqueued. When the caller is a restricted (zrk_) key, that key's own disabled groups are unioned back in either way, so a restricted key can neither clear nor widen a subscription past its own groups.
|
|
43
43
|
attr_accessor :disabled_resource_groups
|
|
44
44
|
|
|
45
|
+
# Replaces the subscription's profile allowlist. Send an empty array to receive every profile again. Omitting the field leaves the current list untouched. Every id must be a profile in your team, otherwise the request fails with 404 `profile_not_found` and nothing changes. Applies to events emitted after the update.
|
|
46
|
+
attr_accessor :profile_ids
|
|
47
|
+
|
|
45
48
|
class EnumAttributeValidator
|
|
46
49
|
attr_reader :datatype
|
|
47
50
|
attr_reader :allowable_values
|
|
@@ -75,7 +78,8 @@ module Zernio
|
|
|
75
78
|
:'events' => :'events',
|
|
76
79
|
:'is_active' => :'isActive',
|
|
77
80
|
:'custom_headers' => :'customHeaders',
|
|
78
|
-
:'disabled_resource_groups' => :'disabledResourceGroups'
|
|
81
|
+
:'disabled_resource_groups' => :'disabledResourceGroups',
|
|
82
|
+
:'profile_ids' => :'profileIds'
|
|
79
83
|
}
|
|
80
84
|
end
|
|
81
85
|
|
|
@@ -100,7 +104,8 @@ module Zernio
|
|
|
100
104
|
:'events' => :'Array<String>',
|
|
101
105
|
:'is_active' => :'Boolean',
|
|
102
106
|
:'custom_headers' => :'Hash<String, String>',
|
|
103
|
-
:'disabled_resource_groups' => :'Array<String>'
|
|
107
|
+
:'disabled_resource_groups' => :'Array<String>',
|
|
108
|
+
:'profile_ids' => :'Array<String>'
|
|
104
109
|
}
|
|
105
110
|
end
|
|
106
111
|
|
|
@@ -167,6 +172,12 @@ module Zernio
|
|
|
167
172
|
self.disabled_resource_groups = value
|
|
168
173
|
end
|
|
169
174
|
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'profile_ids')
|
|
177
|
+
if (value = attributes[:'profile_ids']).is_a?(Array)
|
|
178
|
+
self.profile_ids = value
|
|
179
|
+
end
|
|
180
|
+
end
|
|
170
181
|
end
|
|
171
182
|
|
|
172
183
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -186,6 +197,10 @@ module Zernio
|
|
|
186
197
|
invalid_properties.push('invalid value for "events", number of items must be greater than or equal to 1.')
|
|
187
198
|
end
|
|
188
199
|
|
|
200
|
+
if !@profile_ids.nil? && @profile_ids.length > 50
|
|
201
|
+
invalid_properties.push('invalid value for "profile_ids", number of items must be less than or equal to 50.')
|
|
202
|
+
end
|
|
203
|
+
|
|
189
204
|
invalid_properties
|
|
190
205
|
end
|
|
191
206
|
|
|
@@ -196,6 +211,7 @@ module Zernio
|
|
|
196
211
|
return false if !@name.nil? && @name.to_s.length > 50
|
|
197
212
|
return false if !@name.nil? && @name.to_s.length < 1
|
|
198
213
|
return false if !@events.nil? && @events.length < 1
|
|
214
|
+
return false if !@profile_ids.nil? && @profile_ids.length > 50
|
|
199
215
|
true
|
|
200
216
|
end
|
|
201
217
|
|
|
@@ -217,6 +233,20 @@ module Zernio
|
|
|
217
233
|
@name = name
|
|
218
234
|
end
|
|
219
235
|
|
|
236
|
+
# Custom attribute writer method with validation
|
|
237
|
+
# @param [Object] profile_ids Value to be assigned
|
|
238
|
+
def profile_ids=(profile_ids)
|
|
239
|
+
if profile_ids.nil?
|
|
240
|
+
fail ArgumentError, 'profile_ids cannot be nil'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if profile_ids.length > 50
|
|
244
|
+
fail ArgumentError, 'invalid value for "profile_ids", number of items must be less than or equal to 50.'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@profile_ids = profile_ids
|
|
248
|
+
end
|
|
249
|
+
|
|
220
250
|
# Checks equality by comparing each attribute.
|
|
221
251
|
# @param [Object] Object to be compared
|
|
222
252
|
def ==(o)
|
|
@@ -230,7 +260,8 @@ module Zernio
|
|
|
230
260
|
events == o.events &&
|
|
231
261
|
is_active == o.is_active &&
|
|
232
262
|
custom_headers == o.custom_headers &&
|
|
233
|
-
disabled_resource_groups == o.disabled_resource_groups
|
|
263
|
+
disabled_resource_groups == o.disabled_resource_groups &&
|
|
264
|
+
profile_ids == o.profile_ids
|
|
234
265
|
end
|
|
235
266
|
|
|
236
267
|
# @see the `==` method
|
|
@@ -242,7 +273,7 @@ module Zernio
|
|
|
242
273
|
# Calculates hash code according to all attributes.
|
|
243
274
|
# @return [Integer] Hash code
|
|
244
275
|
def hash
|
|
245
|
-
[webhook_id, _id, name, url, secret, events, is_active, custom_headers, disabled_resource_groups].hash
|
|
276
|
+
[webhook_id, _id, name, url, secret, events, is_active, custom_headers, disabled_resource_groups, profile_ids].hash
|
|
246
277
|
end
|
|
247
278
|
|
|
248
279
|
# Builds the object from hash
|
|
@@ -46,6 +46,9 @@ module Zernio
|
|
|
46
46
|
# Resource groups this subscription does not receive (opt-out denylist, same vocabulary and same semantics as the field on API keys). Absent or empty means the subscription receives every event listed in `events`, which is how every subscription created before this field existed behaves. An event whose group is listed here is dropped before delivery even when it is still present in `events`, and the same check runs on every replay path (test fire, redelivery, dead-letter requeue). Editing the denylist applies to every event emitted afterwards; events already queued when the edit landed can still be delivered for up to five minutes after they were enqueued.
|
|
47
47
|
attr_accessor :disabled_resource_groups
|
|
48
48
|
|
|
49
|
+
# Profiles this subscription receives events for (allowlist). Absent or empty means every profile, which is how every subscription created before this field existed behaves. A scoped subscription is only sent events attributable to a listed profile; events with no profile behind them (`verification.*`, `phone_number.*`) are not delivered to it. Applied when the event is emitted: a redelivery replays a delivery already made to this endpoint, and a test fire ignores the list.
|
|
50
|
+
attr_accessor :profile_ids
|
|
51
|
+
|
|
49
52
|
class EnumAttributeValidator
|
|
50
53
|
attr_reader :datatype
|
|
51
54
|
attr_reader :allowable_values
|
|
@@ -80,7 +83,8 @@ module Zernio
|
|
|
80
83
|
:'last_fired_at' => :'lastFiredAt',
|
|
81
84
|
:'failure_count' => :'failureCount',
|
|
82
85
|
:'custom_headers' => :'customHeaders',
|
|
83
|
-
:'disabled_resource_groups' => :'disabledResourceGroups'
|
|
86
|
+
:'disabled_resource_groups' => :'disabledResourceGroups',
|
|
87
|
+
:'profile_ids' => :'profileIds'
|
|
84
88
|
}
|
|
85
89
|
end
|
|
86
90
|
|
|
@@ -106,7 +110,8 @@ module Zernio
|
|
|
106
110
|
:'last_fired_at' => :'Time',
|
|
107
111
|
:'failure_count' => :'Integer',
|
|
108
112
|
:'custom_headers' => :'Hash<String, String>',
|
|
109
|
-
:'disabled_resource_groups' => :'Array<String>'
|
|
113
|
+
:'disabled_resource_groups' => :'Array<String>',
|
|
114
|
+
:'profile_ids' => :'Array<String>'
|
|
110
115
|
}
|
|
111
116
|
end
|
|
112
117
|
|
|
@@ -177,6 +182,12 @@ module Zernio
|
|
|
177
182
|
self.disabled_resource_groups = value
|
|
178
183
|
end
|
|
179
184
|
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'profile_ids')
|
|
187
|
+
if (value = attributes[:'profile_ids']).is_a?(Array)
|
|
188
|
+
self.profile_ids = value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
180
191
|
end
|
|
181
192
|
|
|
182
193
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -227,7 +238,8 @@ module Zernio
|
|
|
227
238
|
last_fired_at == o.last_fired_at &&
|
|
228
239
|
failure_count == o.failure_count &&
|
|
229
240
|
custom_headers == o.custom_headers &&
|
|
230
|
-
disabled_resource_groups == o.disabled_resource_groups
|
|
241
|
+
disabled_resource_groups == o.disabled_resource_groups &&
|
|
242
|
+
profile_ids == o.profile_ids
|
|
231
243
|
end
|
|
232
244
|
|
|
233
245
|
# @see the `==` method
|
|
@@ -239,7 +251,7 @@ module Zernio
|
|
|
239
251
|
# Calculates hash code according to all attributes.
|
|
240
252
|
# @return [Integer] Hash code
|
|
241
253
|
def hash
|
|
242
|
-
[_id, name, url, secret, events, is_active, last_fired_at, failure_count, custom_headers, disabled_resource_groups].hash
|
|
254
|
+
[_id, name, url, secret, events, is_active, last_fired_at, failure_count, custom_headers, disabled_resource_groups, profile_ids].hash
|
|
243
255
|
end
|
|
244
256
|
|
|
245
257
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED