@zernio/node 0.2.507 → 0.2.509

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.d.mts CHANGED
@@ -2108,7 +2108,7 @@ type ApiKey = {
2108
2108
  */
2109
2109
  permission?: 'read-write' | 'read';
2110
2110
  /**
2111
- * 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.
2111
+ * 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 read or send private messages through any API surface, and it cannot create or edit a webhook subscription broader than itself: it cannot subscribe to, test-fire, redeliver, or read delivery logs for message events. Subscriptions created earlier, from the dashboard, or with a full-access key keep delivering whatever their own `disabledResourceGroups` allows, so restricting an existing integration end to end means restricting the subscription too. OAuth connector tokens (AI assistants and MCP clients) resolve against the same registry, but their groups are not settable yet: treat an authorized connector as full access.
2112
2112
  */
2113
2113
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
2114
2114
  };
@@ -4825,6 +4825,10 @@ type PlatformTarget = {
4825
4825
  * Timestamp when the post was published to this platform
4826
4826
  */
4827
4827
  publishedAt?: string;
4828
+ /**
4829
+ * 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.
4830
+ */
4831
+ removedFromPlatformAt?: (string) | null;
4828
4832
  /**
4829
4833
  * 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.
4830
4834
  */
@@ -6428,6 +6432,10 @@ type Webhook = {
6428
6432
  customHeaders?: {
6429
6433
  [key: string]: (string);
6430
6434
  };
6435
+ /**
6436
+ * 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.
6437
+ */
6438
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
6431
6439
  };
6432
6440
  /**
6433
6441
  * A single webhook delivery attempt recorded by Zernio (30-day retention).
@@ -11352,7 +11360,7 @@ type CreateApiKeyData = {
11352
11360
  */
11353
11361
  permission?: 'read-write' | 'read';
11354
11362
  /**
11355
- * 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.
11363
+ * 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 read or send private messages through any API surface and cannot create or edit a webhook subscription broader than itself. Subscriptions that already exist are governed by their own `disabledResourceGroups`, not by this key's. OAuth connector tokens resolve against the same registry, but their groups are not settable yet.
11356
11364
  */
11357
11365
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
11358
11366
  };
@@ -15520,6 +15528,13 @@ type GetWebhookSettingsResponse = ({
15520
15528
  });
15521
15529
  type GetWebhookSettingsError = ({
15522
15530
  error?: string;
15531
+ } | {
15532
+ error?: string;
15533
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15534
+ /**
15535
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15536
+ */
15537
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15523
15538
  });
15524
15539
  type CreateWebhookSettingsData = {
15525
15540
  body: {
@@ -15549,6 +15564,10 @@ type CreateWebhookSettingsData = {
15549
15564
  customHeaders?: {
15550
15565
  [key: string]: (string);
15551
15566
  };
15567
+ /**
15568
+ * 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.
15569
+ */
15570
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15552
15571
  };
15553
15572
  };
15554
15573
  type CreateWebhookSettingsResponse = ({
@@ -15597,6 +15616,10 @@ type UpdateWebhookSettingsData = {
15597
15616
  customHeaders?: {
15598
15617
  [key: string]: (string);
15599
15618
  };
15619
+ /**
15620
+ * 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.
15621
+ */
15622
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15600
15623
  };
15601
15624
  };
15602
15625
  type UpdateWebhookSettingsResponse = ({
@@ -15626,6 +15649,13 @@ type DeleteWebhookSettingsResponse = ({
15626
15649
  });
15627
15650
  type DeleteWebhookSettingsError = (unknown | {
15628
15651
  error?: string;
15652
+ } | {
15653
+ error?: string;
15654
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15655
+ /**
15656
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15657
+ */
15658
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15629
15659
  });
15630
15660
  type GetWebhookLogsData = {
15631
15661
  query?: {
@@ -15704,6 +15734,13 @@ type TestWebhookResponse = ({
15704
15734
  });
15705
15735
  type TestWebhookError = (unknown | {
15706
15736
  error?: string;
15737
+ } | {
15738
+ error?: string;
15739
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15740
+ /**
15741
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15742
+ */
15743
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15707
15744
  } | {
15708
15745
  success?: boolean;
15709
15746
  message?: string;
package/dist/index.d.ts CHANGED
@@ -2108,7 +2108,7 @@ type ApiKey = {
2108
2108
  */
2109
2109
  permission?: 'read-write' | 'read';
2110
2110
  /**
2111
- * 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.
2111
+ * 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 read or send private messages through any API surface, and it cannot create or edit a webhook subscription broader than itself: it cannot subscribe to, test-fire, redeliver, or read delivery logs for message events. Subscriptions created earlier, from the dashboard, or with a full-access key keep delivering whatever their own `disabledResourceGroups` allows, so restricting an existing integration end to end means restricting the subscription too. OAuth connector tokens (AI assistants and MCP clients) resolve against the same registry, but their groups are not settable yet: treat an authorized connector as full access.
2112
2112
  */
2113
2113
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
2114
2114
  };
@@ -4825,6 +4825,10 @@ type PlatformTarget = {
4825
4825
  * Timestamp when the post was published to this platform
4826
4826
  */
4827
4827
  publishedAt?: string;
4828
+ /**
4829
+ * 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.
4830
+ */
4831
+ removedFromPlatformAt?: (string) | null;
4828
4832
  /**
4829
4833
  * 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.
4830
4834
  */
@@ -6428,6 +6432,10 @@ type Webhook = {
6428
6432
  customHeaders?: {
6429
6433
  [key: string]: (string);
6430
6434
  };
6435
+ /**
6436
+ * 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.
6437
+ */
6438
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
6431
6439
  };
6432
6440
  /**
6433
6441
  * A single webhook delivery attempt recorded by Zernio (30-day retention).
@@ -11352,7 +11360,7 @@ type CreateApiKeyData = {
11352
11360
  */
11353
11361
  permission?: 'read-write' | 'read';
11354
11362
  /**
11355
- * 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.
11363
+ * 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 read or send private messages through any API surface and cannot create or edit a webhook subscription broader than itself. Subscriptions that already exist are governed by their own `disabledResourceGroups`, not by this key's. OAuth connector tokens resolve against the same registry, but their groups are not settable yet.
11356
11364
  */
11357
11365
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
11358
11366
  };
@@ -15520,6 +15528,13 @@ type GetWebhookSettingsResponse = ({
15520
15528
  });
15521
15529
  type GetWebhookSettingsError = ({
15522
15530
  error?: string;
15531
+ } | {
15532
+ error?: string;
15533
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15534
+ /**
15535
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15536
+ */
15537
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15523
15538
  });
15524
15539
  type CreateWebhookSettingsData = {
15525
15540
  body: {
@@ -15549,6 +15564,10 @@ type CreateWebhookSettingsData = {
15549
15564
  customHeaders?: {
15550
15565
  [key: string]: (string);
15551
15566
  };
15567
+ /**
15568
+ * 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.
15569
+ */
15570
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15552
15571
  };
15553
15572
  };
15554
15573
  type CreateWebhookSettingsResponse = ({
@@ -15597,6 +15616,10 @@ type UpdateWebhookSettingsData = {
15597
15616
  customHeaders?: {
15598
15617
  [key: string]: (string);
15599
15618
  };
15619
+ /**
15620
+ * 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.
15621
+ */
15622
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15600
15623
  };
15601
15624
  };
15602
15625
  type UpdateWebhookSettingsResponse = ({
@@ -15626,6 +15649,13 @@ type DeleteWebhookSettingsResponse = ({
15626
15649
  });
15627
15650
  type DeleteWebhookSettingsError = (unknown | {
15628
15651
  error?: string;
15652
+ } | {
15653
+ error?: string;
15654
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15655
+ /**
15656
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15657
+ */
15658
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15629
15659
  });
15630
15660
  type GetWebhookLogsData = {
15631
15661
  query?: {
@@ -15704,6 +15734,13 @@ type TestWebhookResponse = ({
15704
15734
  });
15705
15735
  type TestWebhookError = (unknown | {
15706
15736
  error?: string;
15737
+ } | {
15738
+ error?: string;
15739
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15740
+ /**
15741
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15742
+ */
15743
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15707
15744
  } | {
15708
15745
  success?: boolean;
15709
15746
  message?: string;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@zernio/node",
39
- version: "0.2.507",
39
+ version: "0.2.509",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@zernio/node",
8
- version: "0.2.507",
8
+ version: "0.2.509",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.507",
3
+ "version": "0.2.509",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2817,9 +2817,16 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
2817
2817
  * Webhooks are automatically disabled after 10 consecutive delivery failures.
2818
2818
  *
2819
2819
  * A restricted (zrk_) API key can only subscribe to events whose resource group
2820
- * the key holds; an event outside the key's groups is rejected with 403. Note
2821
- * that the KEY cannot access private messages; the ACCOUNT's pre-existing
2822
- * webhook subscriptions are a separate grant surface.
2820
+ * the key holds; an event outside the key's groups is rejected with 403, so a
2821
+ * restricted key can never create a subscription broader than itself.
2822
+ *
2823
+ * `disabledResourceGroups` restricts the subscription itself, independently of
2824
+ * which key or session later reads it. Events in a disabled group are dropped
2825
+ * before delivery to this endpoint, on live delivery and on every replay path
2826
+ * (test fire, redelivery, dead-letter requeue), even if they are listed in
2827
+ * `events`. Omit it to receive everything in `events`, which is how existing
2828
+ * subscriptions behave. A restricted key's own disabled groups are always
2829
+ * unioned in.
2823
2830
  *
2824
2831
  */
2825
2832
  export const createWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWebhookSettingsData, ThrowOnError>) => {
@@ -2839,6 +2846,21 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
2839
2846
  *
2840
2847
  * A restricted (zrk_) API key can only set `events` to events whose resource
2841
2848
  * group the key holds; an event outside the key's groups is rejected with 403.
2849
+ * It also cannot widen an existing subscription past its own groups.
2850
+ *
2851
+ * `disabledResourceGroups` replaces the subscription's own denylist, which
2852
+ * applies to delivery regardless of which key or session created it. Send an
2853
+ * empty array to clear it. A restricted key's own disabled groups are unioned
2854
+ * into the stored value on every update, so repointing a legacy unrestricted
2855
+ * subscription with a restricted key also narrows it.
2856
+ *
2857
+ * Timing: the new denylist applies to every event emitted after the update.
2858
+ * Events already queued for delivery when the update landed were filtered
2859
+ * against the previous denylist and can still arrive at your endpoint for up
2860
+ * to five minutes after they were enqueued, because the delivery worker
2861
+ * trusts a five-minute enqueue-time snapshot before re-checking the
2862
+ * subscription. Retries beyond that window, dead-letter replays, test fires,
2863
+ * and redeliveries are all checked against the current denylist.
2842
2864
  *
2843
2865
  */
2844
2866
  export const updateWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWebhookSettingsData, ThrowOnError>) => {
@@ -2867,7 +2889,10 @@ export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(opti
2867
2889
  *
2868
2890
  * For a restricted (zrk_) API key, rows for events outside the key's resource
2869
2891
  * groups are omitted (`pagination.total` may over-count), and an `event` filter
2870
- * naming such an event is rejected with 403.
2892
+ * naming such an event is rejected with 403. Events blocked by a subscription's
2893
+ * own `disabledResourceGroups` are dropped before delivery, so they produce no
2894
+ * log rows for anyone; the exception is the five-minute tail after a denylist
2895
+ * change, where an already-queued event can still be delivered and logged.
2871
2896
  *
2872
2897
  */
2873
2898
  export const getWebhookLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetWebhookLogsData, ThrowOnError>) => {
@@ -2881,6 +2906,13 @@ export const getWebhookLogs = <ThrowOnError extends boolean = false>(options?: O
2881
2906
  * Send test webhook
2882
2907
  * Send a test webhook to verify your endpoint is configured correctly. The test payload includes event: "webhook.test" to distinguish it from real events.
2883
2908
  *
2909
+ * `webhook.test` belongs to the `webhooks` resource group, so a key with that
2910
+ * group disabled is rejected with 403, as is a test fire on a subscription that
2911
+ * lists `webhooks` in its own `disabledResourceGroups` (a 403, not a reported
2912
+ * delivery failure). Replays of real events (redelivery, dead-letter requeue) run
2913
+ * the same checks as live delivery, against both the key's groups and the
2914
+ * subscription's.
2915
+ *
2884
2916
  */
2885
2917
  export const testWebhook = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<TestWebhookData, ThrowOnError>) => {
2886
2918
  return (options?.client ?? client).post<TestWebhookResponse, TestWebhookError, ThrowOnError>({
@@ -921,7 +921,7 @@ export type ApiKey = {
921
921
  */
922
922
  permission?: 'read-write' | 'read';
923
923
  /**
924
- * 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.
924
+ * 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 read or send private messages through any API surface, and it cannot create or edit a webhook subscription broader than itself: it cannot subscribe to, test-fire, redeliver, or read delivery logs for message events. Subscriptions created earlier, from the dashboard, or with a full-access key keep delivering whatever their own `disabledResourceGroups` allows, so restricting an existing integration end to end means restricting the subscription too. OAuth connector tokens (AI assistants and MCP clients) resolve against the same registry, but their groups are not settable yet: treat an authorized connector as full access.
925
925
  */
926
926
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
927
927
  };
@@ -3739,6 +3739,10 @@ export type PlatformTarget = {
3739
3739
  * Timestamp when the post was published to this platform
3740
3740
  */
3741
3741
  publishedAt?: string;
3742
+ /**
3743
+ * 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.
3744
+ */
3745
+ removedFromPlatformAt?: (string) | null;
3742
3746
  /**
3743
3747
  * 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.
3744
3748
  */
@@ -5419,6 +5423,10 @@ export type Webhook = {
5419
5423
  customHeaders?: {
5420
5424
  [key: string]: (string);
5421
5425
  };
5426
+ /**
5427
+ * 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.
5428
+ */
5429
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
5422
5430
  };
5423
5431
 
5424
5432
  /**
@@ -10647,7 +10655,7 @@ export type CreateApiKeyData = {
10647
10655
  */
10648
10656
  permission?: 'read-write' | 'read';
10649
10657
  /**
10650
- * 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.
10658
+ * 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 read or send private messages through any API surface and cannot create or edit a webhook subscription broader than itself. Subscriptions that already exist are governed by their own `disabledResourceGroups`, not by this key's. OAuth connector tokens resolve against the same registry, but their groups are not settable yet.
10651
10659
  */
10652
10660
  disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
10653
10661
  };
@@ -15148,6 +15156,13 @@ export type GetWebhookSettingsResponse = ({
15148
15156
 
15149
15157
  export type GetWebhookSettingsError = ({
15150
15158
  error?: string;
15159
+ } | {
15160
+ error?: string;
15161
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15162
+ /**
15163
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15164
+ */
15165
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15151
15166
  });
15152
15167
 
15153
15168
  export type CreateWebhookSettingsData = {
@@ -15178,6 +15193,10 @@ export type CreateWebhookSettingsData = {
15178
15193
  customHeaders?: {
15179
15194
  [key: string]: (string);
15180
15195
  };
15196
+ /**
15197
+ * 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.
15198
+ */
15199
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15181
15200
  };
15182
15201
  };
15183
15202
 
@@ -15229,6 +15248,10 @@ export type UpdateWebhookSettingsData = {
15229
15248
  customHeaders?: {
15230
15249
  [key: string]: (string);
15231
15250
  };
15251
+ /**
15252
+ * 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.
15253
+ */
15254
+ disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
15232
15255
  };
15233
15256
  };
15234
15257
 
@@ -15263,6 +15286,13 @@ export type DeleteWebhookSettingsResponse = ({
15263
15286
 
15264
15287
  export type DeleteWebhookSettingsError = (unknown | {
15265
15288
  error?: string;
15289
+ } | {
15290
+ error?: string;
15291
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15292
+ /**
15293
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15294
+ */
15295
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15266
15296
  });
15267
15297
 
15268
15298
  export type GetWebhookLogsData = {
@@ -15347,6 +15377,13 @@ export type TestWebhookResponse = ({
15347
15377
 
15348
15378
  export type TestWebhookError = (unknown | {
15349
15379
  error?: string;
15380
+ } | {
15381
+ error?: string;
15382
+ code?: 'insufficient_permissions' | 'unclassified_resource';
15383
+ /**
15384
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
15385
+ */
15386
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
15350
15387
  } | {
15351
15388
  success?: boolean;
15352
15389
  message?: string;