late-sdk 0.0.672 → 0.0.674

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/docs/ApiKey.md +3 -1
  4. data/docs/ConnectedAppsApi.md +2 -2
  5. data/docs/CreateApiKeyRequest.md +3 -1
  6. data/docs/InlineObject2.md +5 -11
  7. data/docs/InlineObject3.md +28 -0
  8. data/docs/{InlineObject2Details.md → InlineObject3Details.md} +2 -2
  9. data/docs/InvitesApi.md +1 -1
  10. data/docs/PlatformTarget.md +2 -0
  11. data/docs/WebhooksApi.md +3 -3
  12. data/lib/zernio-sdk/api/connected_apps_api.rb +4 -4
  13. data/lib/zernio-sdk/api/invites_api.rb +2 -2
  14. data/lib/zernio-sdk/api/webhooks_api.rb +6 -6
  15. data/lib/zernio-sdk/models/api_key.rb +16 -4
  16. data/lib/zernio-sdk/models/create_api_key_request.rb +16 -4
  17. data/lib/zernio-sdk/models/inline_object2.rb +18 -80
  18. data/lib/zernio-sdk/models/inline_object3.rb +274 -0
  19. data/lib/zernio-sdk/models/{inline_object2_details.rb → inline_object3_details.rb} +3 -3
  20. data/lib/zernio-sdk/models/platform_target.rb +12 -1
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +2 -1
  23. data/openapi.yaml +650 -27
  24. data/spec/api/connected_apps_api_spec.rb +2 -2
  25. data/spec/api/invites_api_spec.rb +1 -1
  26. data/spec/api/webhooks_api_spec.rb +3 -3
  27. data/spec/models/api_key_spec.rb +10 -0
  28. data/spec/models/create_api_key_request_spec.rb +10 -0
  29. data/spec/models/inline_object2_spec.rb +4 -22
  30. data/spec/models/{inline_object2_details_spec.rb → inline_object3_details_spec.rb} +6 -6
  31. data/spec/models/inline_object3_spec.rb +74 -0
  32. data/spec/models/platform_target_spec.rb +6 -0
  33. data/zernio-sdk-0.0.674.gem +0 -0
  34. metadata +10 -6
  35. data/zernio-sdk-0.0.672.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cacfd06d995df70d50a098100eb8a9de74a6427d1dfeb641509589da2e58f672
4
- data.tar.gz: c1826f1d7ccd473a444bd3e6af12062d972d37287bb258870ec04ff147bba592
3
+ metadata.gz: 2f9296d022283f95def0855290cf28b0251301a321d73f7e0363e9c396cb0665
4
+ data.tar.gz: c7eb3fc66df938994c7f26a83641dbd62816cc88eed971b3edb41512cae6e688
5
5
  SHA512:
6
- metadata.gz: 652a49fb39d3859a402edbc0791567c642cabe82a2e6bc62973a50132bf39d248584919e7770b0b1ff0689aca9a0a1361b1280a4c50a288a8ee52ad65caf23ae
7
- data.tar.gz: 3a954dbdc1d19c66dbf2153f8b8e216840031b6e316cd300f07eda289b6c73e7915a78a46c45300f9fbf784e3d8d72e5ec25a428703fab23302a90c4efabbf14
6
+ metadata.gz: c12a2ac757d6be0c885422885452b7f15645d66537c19359b9c99cc8d8fef3d3c5062a0d8963a659257396d55e6d84005d3658cc078ee3628aefb53fff0971b2
7
+ data.tar.gz: a7ce41f8866238b56acc7287a3ccba1c7ef9edebfa89339e730191f24baaa4456a8a2f5a43b12eb858a02a0b7f24d89ad7cb83d02000f4d0cb20e8ea39619e12
data/README.md CHANGED
@@ -1361,7 +1361,8 @@ Class | Method | HTTP request | Description
1361
1361
  - [Zernio::InlineObject](docs/InlineObject.md)
1362
1362
  - [Zernio::InlineObject1](docs/InlineObject1.md)
1363
1363
  - [Zernio::InlineObject2](docs/InlineObject2.md)
1364
- - [Zernio::InlineObject2Details](docs/InlineObject2Details.md)
1364
+ - [Zernio::InlineObject3](docs/InlineObject3.md)
1365
+ - [Zernio::InlineObject3Details](docs/InlineObject3Details.md)
1365
1366
  - [Zernio::InstagramAccountInsightsResponse](docs/InstagramAccountInsightsResponse.md)
1366
1367
  - [Zernio::InstagramAccountInsightsResponseDateRange](docs/InstagramAccountInsightsResponseDateRange.md)
1367
1368
  - [Zernio::InstagramAccountInsightsResponseMetricsValue](docs/InstagramAccountInsightsResponseMetricsValue.md)
data/docs/ApiKey.md CHANGED
@@ -13,6 +13,7 @@
13
13
  | **scope** | **String** | 'full' grants access to all profiles, 'profiles' restricts to specific profiles | [optional][default to 'full'] |
14
14
  | **profile_ids** | [**Array<ApiKeyProfileIdsInner>**](ApiKeyProfileIdsInner.md) | Profiles this key can access (populated with name and color). Only present when scope is 'profiles'. | [optional] |
15
15
  | **permission** | **String** | 'read-write' allows all operations, 'read' restricts to GET requests only | [optional][default to 'read-write'] |
16
+ | **disabled_resource_groups** | **Array<String>** | Resource groups this key can NOT access (opt-out denylist). Absent or empty means legacy full access. A key with any group disabled is a restricted key (zrk_ prefix) and can never manage API keys, invites, or member identity. Each operation's group is published as x-resource-group. With 'messages' disabled, the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface. | [optional] |
16
17
 
17
18
  ## Example
18
19
 
@@ -28,7 +29,8 @@ instance = Zernio::ApiKey.new(
28
29
  key: null,
29
30
  scope: null,
30
31
  profile_ids: null,
31
- permission: null
32
+ permission: null,
33
+ disabled_resource_groups: null
32
34
  )
33
35
  ```
34
36
 
@@ -14,7 +14,7 @@ All URIs are relative to *https://zernio.com/api*
14
14
 
15
15
  List connected apps
16
16
 
17
- Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-scope API key. A profile-scoped API key or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations.
17
+ Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations, and connected-app management is admin-plane.
18
18
 
19
19
  ### Examples
20
20
 
@@ -80,7 +80,7 @@ This endpoint does not need any parameter.
80
80
 
81
81
  Revoke connected app
82
82
 
83
- Ends an app's access: invalidates the client's pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app's next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with `revokedTokens: 0`.
83
+ Ends an app's access: invalidates the client's pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app's next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with `revokedTokens: 0`. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403.
84
84
 
85
85
  ### Examples
86
86
 
@@ -9,6 +9,7 @@
9
9
  | **scope** | **String** | 'full' grants access to all profiles (default), 'profiles' restricts to specific profiles | [optional][default to 'full'] |
10
10
  | **profile_ids** | **Array<String>** | Profile IDs this key can access. Required when scope is 'profiles'. | [optional] |
11
11
  | **permission** | **String** | 'read-write' allows all operations (default), 'read' restricts to GET requests only | [optional][default to 'read-write'] |
12
+ | **disabled_resource_groups** | **Array<String>** | Resource groups to DISABLE on this key (opt-out denylist). Omit for a legacy full-access key. A key with any group disabled mints with the zrk_ prefix, gets 403 with code=insufficient_permissions and required_group on operations in disabled groups (each operation's group is published as x-resource-group), and can never manage API keys, invites, or member identity. With 'messages' disabled, the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface. | [optional] |
12
13
 
13
14
  ## Example
14
15
 
@@ -20,7 +21,8 @@ instance = Zernio::CreateApiKeyRequest.new(
20
21
  expires_in: null,
21
22
  scope: null,
22
23
  profile_ids: null,
23
- permission: null
24
+ permission: null,
25
+ disabled_resource_groups: null
24
26
  )
25
27
  ```
26
28
 
@@ -4,12 +4,9 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **error** | **String** | Human-readable error message suitable for end-user display. | |
8
- | **code** | **String** | Machine-readable error code. Stable across versions. | |
9
- | **reason** | **String** | Discriminator for which gate fired. | |
10
- | **documentation_url** | **String** | Link to the relevant documentation page. | [optional] |
11
- | **dashboard_url** | **String** | Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page. | [optional] |
12
- | **details** | [**InlineObject2Details**](InlineObject2Details.md) | | [optional] |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+ | **required_group** | **String** | The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials. | [optional] |
13
10
 
14
11
  ## Example
15
12
 
@@ -17,12 +14,9 @@
17
14
  require 'zernio-sdk'
18
15
 
19
16
  instance = Zernio::InlineObject2.new(
20
- error: X (Twitter) requires a payment method due to API pass-through costs. Add a payment method to connect an X account.,
17
+ error: This API key has the 'messages' resource group disabled. GET /api/v1/inbox/conversations requires it. Create a key with 'messages' enabled in the dashboard API keys tab.,
21
18
  code: null,
22
- reason: null,
23
- documentation_url: https://docs.zernio.com/billing/payment-method-required,
24
- dashboard_url: https://zernio.com/dashboard?tab=billing,
25
- details: null
19
+ required_group: null
26
20
  )
27
21
  ```
28
22
 
@@ -0,0 +1,28 @@
1
+ # Zernio::InlineObject3
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | Human-readable error message suitable for end-user display. | |
8
+ | **code** | **String** | Machine-readable error code. Stable across versions. | |
9
+ | **reason** | **String** | Discriminator for which gate fired. | |
10
+ | **documentation_url** | **String** | Link to the relevant documentation page. | [optional] |
11
+ | **dashboard_url** | **String** | Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page. | [optional] |
12
+ | **details** | [**InlineObject3Details**](InlineObject3Details.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::InlineObject3.new(
20
+ error: X (Twitter) requires a payment method due to API pass-through costs. Add a payment method to connect an X account.,
21
+ code: null,
22
+ reason: null,
23
+ documentation_url: https://docs.zernio.com/billing/payment-method-required,
24
+ dashboard_url: https://zernio.com/dashboard?tab=billing,
25
+ details: null
26
+ )
27
+ ```
28
+
@@ -1,4 +1,4 @@
1
- # Zernio::InlineObject2Details
1
+ # Zernio::InlineObject3Details
2
2
 
3
3
  ## Properties
4
4
 
@@ -14,7 +14,7 @@
14
14
  ```ruby
15
15
  require 'zernio-sdk'
16
16
 
17
- instance = Zernio::InlineObject2Details.new(
17
+ instance = Zernio::InlineObject3Details.new(
18
18
  free_tier_account_limit: 2,
19
19
  current_account_count: 5,
20
20
  has_payment_method: null,
data/docs/InvitesApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://zernio.com/api*
13
13
 
14
14
  Create invite token
15
15
 
16
- Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use.
16
+ Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use. Returns 403 when a requested profile is not found or not owned, or when called with a restricted (zrk_) API key: invite management is admin-plane.
17
17
 
18
18
  ### Examples
19
19
 
@@ -14,6 +14,7 @@
14
14
  | **platform_post_id** | **String** | The native post ID on the platform (populated after successful publish) | [optional] |
15
15
  | **platform_post_url** | **String** | Public URL of the published post. Included in the response for immediate posts; for scheduled posts, fetch via GET /v1/posts/{postId} after publish time. | [optional] |
16
16
  | **published_at** | **Time** | Timestamp when the post was published to this platform | [optional] |
17
+ | **removed_from_platform_at** | **Time** | Set when a post that was successfully published later disappears from the platform (deleted on-platform or taken down by the platform). status stays \"published\" (it reflects the publish outcome); poll this field to detect post-publish removals. Absent while the post is live, and cleared if the post reappears. Detection runs with the analytics sync, so expect up to a few hours of lag. | [optional] |
17
18
  | **is_trial_reel** | **Boolean** | Present and true only when this Instagram reel was launched as a Trial through Zernio (created with platformSpecificData.trialParams). Use it to segment trial reels in analytics. Note: Instagram's Graph API exposes no readable trial field, so this reflects creation-time intent only. It indicates the reel STARTED as a trial, not whether or when it graduated. | [optional] |
18
19
  | **trial_graduation_strategy** | **String** | Graduation strategy the trial reel was launched with. Present only when isTrialReel is true. | [optional] |
19
20
  | **error_message** | **String** | Human-readable error message when status is failed. Contains platform-specific error details explaining why the publish failed. | [optional] |
@@ -36,6 +37,7 @@ instance = Zernio::PlatformTarget.new(
36
37
  platform_post_id: 1234567890123456789,
37
38
  platform_post_url: https://twitter.com/acmecorp/status/1234567890123456789,
38
39
  published_at: null,
40
+ removed_from_platform_at: null,
39
41
  is_trial_reel: null,
40
42
  trial_graduation_strategy: null,
41
43
  error_message: null,
data/docs/WebhooksApi.md CHANGED
@@ -18,7 +18,7 @@ All URIs are relative to *https://zernio.com/api*
18
18
 
19
19
  Create webhook
20
20
 
21
- 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 automatically disabled after 10 consecutive delivery failures.
21
+ 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 automatically disabled after 10 consecutive delivery failures. 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. Note that the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface.
22
22
 
23
23
  ### Examples
24
24
 
@@ -156,7 +156,7 @@ end
156
156
 
157
157
  List webhook delivery logs
158
158
 
159
- Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination.
159
+ Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination. For a restricted (zrk_) API key, rows for events outside the key's resource groups are omitted (`pagination.total` may over-count), and an `event` filter naming such an event is rejected with 403.
160
160
 
161
161
  ### Examples
162
162
 
@@ -372,7 +372,7 @@ end
372
372
 
373
373
  Update webhook
374
374
 
375
- Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. 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 automatically disabled after 10 consecutive delivery failures.
375
+ Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. 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 automatically disabled after 10 consecutive delivery failures. 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.
376
376
 
377
377
  ### Examples
378
378
 
@@ -20,7 +20,7 @@ module Zernio
20
20
  @api_client = api_client
21
21
  end
22
22
  # List connected apps
23
- # Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-scope API key. A profile-scoped API key or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations.
23
+ # Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations, and connected-app management is admin-plane.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [ListConnectedApps200Response]
26
26
  def list_connected_apps(opts = {})
@@ -29,7 +29,7 @@ module Zernio
29
29
  end
30
30
 
31
31
  # List connected apps
32
- # Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-scope API key. A profile-scoped API key or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations.
32
+ # Returns the OAuth clients (AI assistants and MCP connectors) the authenticated user has authorized and that still hold a live token. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403: an app must not be able to enumerate its sibling authorizations, and connected-app management is admin-plane.
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(ListConnectedApps200Response, Integer, Hash)>] ListConnectedApps200Response data, response status code and response headers
35
35
  def list_connected_apps_with_http_info(opts = {})
@@ -77,7 +77,7 @@ module Zernio
77
77
  end
78
78
 
79
79
  # Revoke connected app
80
- # Ends an app's access: invalidates the client's pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app's next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with `revokedTokens: 0`.
80
+ # Ends an app's access: invalidates the client's pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app's next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with `revokedTokens: 0`. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403.
81
81
  # @param client_id [String] OAuth client id, as returned by GET /v1/me/connected-apps.
82
82
  # @param [Hash] opts the optional parameters
83
83
  # @return [RevokeConnectedApp200Response]
@@ -87,7 +87,7 @@ module Zernio
87
87
  end
88
88
 
89
89
  # Revoke connected app
90
- # Ends an app&#39;s access: invalidates the client&#39;s pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app&#39;s next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with &#x60;revokedTokens: 0&#x60;.
90
+ # Ends an app&#39;s access: invalidates the client&#39;s pending authorization codes and revokes every live token it holds for the authenticated user. Takes effect on the app&#39;s next request. Idempotent while the authorization is still on record: revoking an app that was already revoked returns 200 with &#x60;revokedTokens: 0&#x60;. Requires a session or a full-access API key. A profile-scoped API key, a restricted (zrk_) API key, or an OAuth access token is rejected with 403.
91
91
  # @param client_id [String] OAuth client id, as returned by GET /v1/me/connected-apps.
92
92
  # @param [Hash] opts the optional parameters
93
93
  # @return [Array<(RevokeConnectedApp200Response, Integer, Hash)>] RevokeConnectedApp200Response data, response status code and response headers
@@ -20,7 +20,7 @@ module Zernio
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create invite token
23
- # Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use.
23
+ # Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use. Returns 403 when a requested profile is not found or not owned, or when called with a restricted (zrk_) API key: invite management is admin-plane.
24
24
  # @param create_invite_token_request [CreateInviteTokenRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [CreateInviteToken201Response]
@@ -30,7 +30,7 @@ module Zernio
30
30
  end
31
31
 
32
32
  # Create invite token
33
- # Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use.
33
+ # Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use. Returns 403 when a requested profile is not found or not owned, or when called with a restricted (zrk_) API key: invite management is admin-plane.
34
34
  # @param create_invite_token_request [CreateInviteTokenRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(CreateInviteToken201Response, Integer, Hash)>] CreateInviteToken201Response data, response status code and response headers
@@ -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 automatically disabled after 10 consecutive delivery failures.
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 automatically disabled after 10 consecutive delivery failures. 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. Note that the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface.
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. &#x60;name&#x60;, &#x60;url&#x60; and &#x60;events&#x60; are required. &#x60;url&#x60; must be a valid URL and &#x60;events&#x60; must contain at least one event. Whitespace is trimmed from &#x60;url&#x60; before validation. Webhooks are automatically disabled after 10 consecutive delivery failures.
33
+ # Create a new webhook configuration. Maximum 50 webhooks per user. &#x60;name&#x60;, &#x60;url&#x60; and &#x60;events&#x60; are required. &#x60;url&#x60; must be a valid URL and &#x60;events&#x60; must contain at least one event. Whitespace is trimmed from &#x60;url&#x60; before validation. Webhooks are automatically disabled after 10 consecutive delivery failures. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key&#39;s groups is rejected with 403. Note that the KEY cannot access private messages; the ACCOUNT&#39;s pre-existing webhook subscriptions are a separate grant surface.
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
@@ -152,7 +152,7 @@ module Zernio
152
152
  end
153
153
 
154
154
  # List webhook delivery logs
155
- # Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination.
155
+ # Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination. For a restricted (zrk_) API key, rows for events outside the key's resource groups are omitted (`pagination.total` may over-count), and an `event` filter naming such an event is rejected with 403.
156
156
  # @param [Hash] opts the optional parameters
157
157
  # @option opts [Integer] :limit Maximum number of logs to return (default to 50)
158
158
  # @option opts [Integer] :skip Number of logs to skip (offset-based pagination) (default to 0)
@@ -167,7 +167,7 @@ module Zernio
167
167
  end
168
168
 
169
169
  # List webhook delivery logs
170
- # Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination.
170
+ # Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination. For a restricted (zrk_) API key, rows for events outside the key&#39;s resource groups are omitted (&#x60;pagination.total&#x60; may over-count), and an &#x60;event&#x60; filter naming such an event is rejected with 403.
171
171
  # @param [Hash] opts the optional parameters
172
172
  # @option opts [Integer] :limit Maximum number of logs to return (default to 50)
173
173
  # @option opts [Integer] :skip Number of logs to skip (offset-based pagination) (default to 0)
@@ -396,7 +396,7 @@ module Zernio
396
396
  end
397
397
 
398
398
  # Update webhook
399
- # Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. 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 automatically disabled after 10 consecutive delivery failures.
399
+ # Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. 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 automatically disabled after 10 consecutive delivery failures. 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.
400
400
  # @param update_webhook_settings_request [UpdateWebhookSettingsRequest]
401
401
  # @param [Hash] opts the optional parameters
402
402
  # @return [UpdateWebhookSettings200Response]
@@ -406,7 +406,7 @@ module Zernio
406
406
  end
407
407
 
408
408
  # Update webhook
409
- # Update an existing webhook configuration. All fields except &#x60;_id&#x60; are optional; only provided fields will be updated. When provided, &#x60;name&#x60; must be 1-50 characters, &#x60;url&#x60; must be a valid URL, and &#x60;events&#x60; must contain at least one event. Whitespace is trimmed from &#x60;url&#x60; before validation. Webhooks are automatically disabled after 10 consecutive delivery failures.
409
+ # Update an existing webhook configuration. All fields except &#x60;_id&#x60; are optional; only provided fields will be updated. When provided, &#x60;name&#x60; must be 1-50 characters, &#x60;url&#x60; must be a valid URL, and &#x60;events&#x60; must contain at least one event. Whitespace is trimmed from &#x60;url&#x60; before validation. Webhooks are automatically disabled after 10 consecutive delivery failures. A restricted (zrk_) API key can only set &#x60;events&#x60; to events whose resource group the key holds; an event outside the key&#39;s groups is rejected with 403.
410
410
  # @param update_webhook_settings_request [UpdateWebhookSettingsRequest]
411
411
  # @param [Hash] opts the optional parameters
412
412
  # @return [Array<(UpdateWebhookSettings200Response, Integer, Hash)>] UpdateWebhookSettings200Response data, response status code and response headers
@@ -37,6 +37,9 @@ module Zernio
37
37
  # 'read-write' allows all operations, 'read' restricts to GET requests only
38
38
  attr_accessor :permission
39
39
 
40
+ # Resource groups this key can NOT access (opt-out denylist). Absent or empty means legacy full access. A key with any group disabled is a restricted key (zrk_ prefix) and can never manage API keys, invites, or member identity. Each operation's group is published as x-resource-group. With 'messages' disabled, the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface.
41
+ attr_accessor :disabled_resource_groups
42
+
40
43
  class EnumAttributeValidator
41
44
  attr_reader :datatype
42
45
  attr_reader :allowable_values
@@ -70,7 +73,8 @@ module Zernio
70
73
  :'key' => :'key',
71
74
  :'scope' => :'scope',
72
75
  :'profile_ids' => :'profileIds',
73
- :'permission' => :'permission'
76
+ :'permission' => :'permission',
77
+ :'disabled_resource_groups' => :'disabledResourceGroups'
74
78
  }
75
79
  end
76
80
 
@@ -95,7 +99,8 @@ module Zernio
95
99
  :'key' => :'String',
96
100
  :'scope' => :'String',
97
101
  :'profile_ids' => :'Array<ApiKeyProfileIdsInner>',
98
- :'permission' => :'String'
102
+ :'permission' => :'String',
103
+ :'disabled_resource_groups' => :'Array<String>'
99
104
  }
100
105
  end
101
106
 
@@ -162,6 +167,12 @@ module Zernio
162
167
  else
163
168
  self.permission = 'read-write'
164
169
  end
170
+
171
+ if attributes.key?(:'disabled_resource_groups')
172
+ if (value = attributes[:'disabled_resource_groups']).is_a?(Array)
173
+ self.disabled_resource_groups = value
174
+ end
175
+ end
165
176
  end
166
177
 
167
178
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -216,7 +227,8 @@ module Zernio
216
227
  key == o.key &&
217
228
  scope == o.scope &&
218
229
  profile_ids == o.profile_ids &&
219
- permission == o.permission
230
+ permission == o.permission &&
231
+ disabled_resource_groups == o.disabled_resource_groups
220
232
  end
221
233
 
222
234
  # @see the `==` method
@@ -228,7 +240,7 @@ module Zernio
228
240
  # Calculates hash code according to all attributes.
229
241
  # @return [Integer] Hash code
230
242
  def hash
231
- [id, name, key_preview, expires_at, created_at, key, scope, profile_ids, permission].hash
243
+ [id, name, key_preview, expires_at, created_at, key, scope, profile_ids, permission, disabled_resource_groups].hash
232
244
  end
233
245
 
234
246
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Zernio
29
29
  # 'read-write' allows all operations (default), 'read' restricts to GET requests only
30
30
  attr_accessor :permission
31
31
 
32
+ # Resource groups to DISABLE on this key (opt-out denylist). Omit for a legacy full-access key. A key with any group disabled mints with the zrk_ prefix, gets 403 with code=insufficient_permissions and required_group on operations in disabled groups (each operation's group is published as x-resource-group), and can never manage API keys, invites, or member identity. With 'messages' disabled, the KEY cannot access private messages; the ACCOUNT's pre-existing webhook subscriptions are a separate grant surface.
33
+ attr_accessor :disabled_resource_groups
34
+
32
35
  class EnumAttributeValidator
33
36
  attr_reader :datatype
34
37
  attr_reader :allowable_values
@@ -58,7 +61,8 @@ module Zernio
58
61
  :'expires_in' => :'expiresIn',
59
62
  :'scope' => :'scope',
60
63
  :'profile_ids' => :'profileIds',
61
- :'permission' => :'permission'
64
+ :'permission' => :'permission',
65
+ :'disabled_resource_groups' => :'disabledResourceGroups'
62
66
  }
63
67
  end
64
68
 
@@ -79,7 +83,8 @@ module Zernio
79
83
  :'expires_in' => :'Integer',
80
84
  :'scope' => :'String',
81
85
  :'profile_ids' => :'Array<String>',
82
- :'permission' => :'String'
86
+ :'permission' => :'String',
87
+ :'disabled_resource_groups' => :'Array<String>'
83
88
  }
84
89
  end
85
90
 
@@ -132,6 +137,12 @@ module Zernio
132
137
  else
133
138
  self.permission = 'read-write'
134
139
  end
140
+
141
+ if attributes.key?(:'disabled_resource_groups')
142
+ if (value = attributes[:'disabled_resource_groups']).is_a?(Array)
143
+ self.disabled_resource_groups = value
144
+ end
145
+ end
135
146
  end
136
147
 
137
148
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -197,7 +208,8 @@ module Zernio
197
208
  expires_in == o.expires_in &&
198
209
  scope == o.scope &&
199
210
  profile_ids == o.profile_ids &&
200
- permission == o.permission
211
+ permission == o.permission &&
212
+ disabled_resource_groups == o.disabled_resource_groups
201
213
  end
202
214
 
203
215
  # @see the `==` method
@@ -209,7 +221,7 @@ module Zernio
209
221
  # Calculates hash code according to all attributes.
210
222
  # @return [Integer] Hash code
211
223
  def hash
212
- [name, expires_in, scope, profile_ids, permission].hash
224
+ [name, expires_in, scope, profile_ids, permission, disabled_resource_groups].hash
213
225
  end
214
226
 
215
227
  # Builds the object from hash
@@ -15,22 +15,12 @@ require 'time'
15
15
 
16
16
  module Zernio
17
17
  class InlineObject2 < ApiModelBase
18
- # Human-readable error message suitable for end-user display.
19
18
  attr_accessor :error
20
19
 
21
- # Machine-readable error code. Stable across versions.
22
20
  attr_accessor :code
23
21
 
24
- # Discriminator for which gate fired.
25
- attr_accessor :reason
26
-
27
- # Link to the relevant documentation page.
28
- attr_accessor :documentation_url
29
-
30
- # Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page.
31
- attr_accessor :dashboard_url
32
-
33
- attr_accessor :details
22
+ # The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
23
+ attr_accessor :required_group
34
24
 
35
25
  class EnumAttributeValidator
36
26
  attr_reader :datatype
@@ -59,10 +49,7 @@ module Zernio
59
49
  {
60
50
  :'error' => :'error',
61
51
  :'code' => :'code',
62
- :'reason' => :'reason',
63
- :'documentation_url' => :'documentation_url',
64
- :'dashboard_url' => :'dashboard_url',
65
- :'details' => :'details'
52
+ :'required_group' => :'required_group'
66
53
  }
67
54
  end
68
55
 
@@ -81,10 +68,7 @@ module Zernio
81
68
  {
82
69
  :'error' => :'String',
83
70
  :'code' => :'String',
84
- :'reason' => :'String',
85
- :'documentation_url' => :'String',
86
- :'dashboard_url' => :'String',
87
- :'details' => :'InlineObject2Details'
71
+ :'required_group' => :'String'
88
72
  }
89
73
  end
90
74
 
@@ -112,32 +96,14 @@ module Zernio
112
96
 
113
97
  if attributes.key?(:'error')
114
98
  self.error = attributes[:'error']
115
- else
116
- self.error = nil
117
99
  end
118
100
 
119
101
  if attributes.key?(:'code')
120
102
  self.code = attributes[:'code']
121
- else
122
- self.code = nil
123
- end
124
-
125
- if attributes.key?(:'reason')
126
- self.reason = attributes[:'reason']
127
- else
128
- self.reason = nil
129
103
  end
130
104
 
131
- if attributes.key?(:'documentation_url')
132
- self.documentation_url = attributes[:'documentation_url']
133
- end
134
-
135
- if attributes.key?(:'dashboard_url')
136
- self.dashboard_url = attributes[:'dashboard_url']
137
- end
138
-
139
- if attributes.key?(:'details')
140
- self.details = attributes[:'details']
105
+ if attributes.key?(:'required_group')
106
+ self.required_group = attributes[:'required_group']
141
107
  end
142
108
  end
143
109
 
@@ -146,18 +112,6 @@ module Zernio
146
112
  def list_invalid_properties
147
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
114
  invalid_properties = Array.new
149
- if @error.nil?
150
- invalid_properties.push('invalid value for "error", error cannot be nil.')
151
- end
152
-
153
- if @code.nil?
154
- invalid_properties.push('invalid value for "code", code cannot be nil.')
155
- end
156
-
157
- if @reason.nil?
158
- invalid_properties.push('invalid value for "reason", reason cannot be nil.')
159
- end
160
-
161
115
  invalid_properties
162
116
  end
163
117
 
@@ -165,30 +119,17 @@ module Zernio
165
119
  # @return true if the model is valid
166
120
  def valid?
167
121
  warn '[DEPRECATED] the `valid?` method is obsolete'
168
- return false if @error.nil?
169
- return false if @code.nil?
170
- code_validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
122
+ code_validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
171
123
  return false unless code_validator.valid?(@code)
172
- return false if @reason.nil?
173
- reason_validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
174
- return false unless reason_validator.valid?(@reason)
124
+ required_group_validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
125
+ return false unless required_group_validator.valid?(@required_group)
175
126
  true
176
127
  end
177
128
 
178
- # Custom attribute writer method with validation
179
- # @param [Object] error Value to be assigned
180
- def error=(error)
181
- if error.nil?
182
- fail ArgumentError, 'error cannot be nil'
183
- end
184
-
185
- @error = error
186
- end
187
-
188
129
  # Custom attribute writer method checking allowed values (enum).
189
130
  # @param [Object] code Object to be assigned
190
131
  def code=(code)
191
- validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
132
+ validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
192
133
  unless validator.valid?(code)
193
134
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
194
135
  end
@@ -196,13 +137,13 @@ module Zernio
196
137
  end
197
138
 
198
139
  # Custom attribute writer method checking allowed values (enum).
199
- # @param [Object] reason Object to be assigned
200
- def reason=(reason)
201
- validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
202
- unless validator.valid?(reason)
203
- fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
140
+ # @param [Object] required_group Object to be assigned
141
+ def required_group=(required_group)
142
+ validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
143
+ unless validator.valid?(required_group)
144
+ fail ArgumentError, "invalid value for \"required_group\", must be one of #{validator.allowable_values}."
204
145
  end
205
- @reason = reason
146
+ @required_group = required_group
206
147
  end
207
148
 
208
149
  # Checks equality by comparing each attribute.
@@ -212,10 +153,7 @@ module Zernio
212
153
  self.class == o.class &&
213
154
  error == o.error &&
214
155
  code == o.code &&
215
- reason == o.reason &&
216
- documentation_url == o.documentation_url &&
217
- dashboard_url == o.dashboard_url &&
218
- details == o.details
156
+ required_group == o.required_group
219
157
  end
220
158
 
221
159
  # @see the `==` method
@@ -227,7 +165,7 @@ module Zernio
227
165
  # Calculates hash code according to all attributes.
228
166
  # @return [Integer] Hash code
229
167
  def hash
230
- [error, code, reason, documentation_url, dashboard_url, details].hash
168
+ [error, code, required_group].hash
231
169
  end
232
170
 
233
171
  # Builds the object from hash