@zernio/node 0.2.508 → 0.2.510
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 +42 -3
- package/dist/index.d.ts +42 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +36 -4
- package/src/generated/types.gen.ts +42 -3
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
|
|
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
|
};
|
|
@@ -6432,6 +6432,10 @@ type Webhook = {
|
|
|
6432
6432
|
customHeaders?: {
|
|
6433
6433
|
[key: string]: (string);
|
|
6434
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')>;
|
|
6435
6439
|
};
|
|
6436
6440
|
/**
|
|
6437
6441
|
* A single webhook delivery attempt recorded by Zernio (30-day retention).
|
|
@@ -11356,7 +11360,7 @@ type CreateApiKeyData = {
|
|
|
11356
11360
|
*/
|
|
11357
11361
|
permission?: 'read-write' | 'read';
|
|
11358
11362
|
/**
|
|
11359
|
-
* 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
|
|
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.
|
|
11360
11364
|
*/
|
|
11361
11365
|
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
11362
11366
|
};
|
|
@@ -15524,6 +15528,13 @@ type GetWebhookSettingsResponse = ({
|
|
|
15524
15528
|
});
|
|
15525
15529
|
type GetWebhookSettingsError = ({
|
|
15526
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';
|
|
15527
15538
|
});
|
|
15528
15539
|
type CreateWebhookSettingsData = {
|
|
15529
15540
|
body: {
|
|
@@ -15553,6 +15564,10 @@ type CreateWebhookSettingsData = {
|
|
|
15553
15564
|
customHeaders?: {
|
|
15554
15565
|
[key: string]: (string);
|
|
15555
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')>;
|
|
15556
15571
|
};
|
|
15557
15572
|
};
|
|
15558
15573
|
type CreateWebhookSettingsResponse = ({
|
|
@@ -15601,6 +15616,10 @@ type UpdateWebhookSettingsData = {
|
|
|
15601
15616
|
customHeaders?: {
|
|
15602
15617
|
[key: string]: (string);
|
|
15603
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')>;
|
|
15604
15623
|
};
|
|
15605
15624
|
};
|
|
15606
15625
|
type UpdateWebhookSettingsResponse = ({
|
|
@@ -15630,6 +15649,13 @@ type DeleteWebhookSettingsResponse = ({
|
|
|
15630
15649
|
});
|
|
15631
15650
|
type DeleteWebhookSettingsError = (unknown | {
|
|
15632
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';
|
|
15633
15659
|
});
|
|
15634
15660
|
type GetWebhookLogsData = {
|
|
15635
15661
|
query?: {
|
|
@@ -15708,6 +15734,13 @@ type TestWebhookResponse = ({
|
|
|
15708
15734
|
});
|
|
15709
15735
|
type TestWebhookError = (unknown | {
|
|
15710
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';
|
|
15711
15744
|
} | {
|
|
15712
15745
|
success?: boolean;
|
|
15713
15746
|
message?: string;
|
|
@@ -28424,7 +28457,9 @@ type CreateStandaloneAdData = {
|
|
|
28424
28457
|
* with "The language asset feed includes an unsupported targeting field"
|
|
28425
28458
|
* (subcode 1885985).
|
|
28426
28459
|
*
|
|
28427
|
-
* Media DOES inherit and is uploaded once when shared
|
|
28460
|
+
* Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits
|
|
28461
|
+
* too: each locale may name its own landing page and unlisted locales fall back
|
|
28462
|
+
* to the ad's top-level `linkUrl`. Note that Meta enforces
|
|
28428
28463
|
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
28429
28464
|
* works on a normal ad may be rejected with "The following images have invalid
|
|
28430
28465
|
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
@@ -28450,6 +28485,10 @@ type CreateStandaloneAdData = {
|
|
|
28450
28485
|
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
28451
28486
|
*/
|
|
28452
28487
|
description: string;
|
|
28488
|
+
/**
|
|
28489
|
+
* Destination URL for this language. Inherits the ad's top-level `linkUrl` when omitted, and requires it to be present (400 otherwise): the top-level URL is the destination for every locale you did not override. Unlike text, identical URLs across locales are fine (they share one asset).
|
|
28490
|
+
*/
|
|
28491
|
+
linkUrl?: string;
|
|
28453
28492
|
/**
|
|
28454
28493
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28455
28494
|
*/
|
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
|
|
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
|
};
|
|
@@ -6432,6 +6432,10 @@ type Webhook = {
|
|
|
6432
6432
|
customHeaders?: {
|
|
6433
6433
|
[key: string]: (string);
|
|
6434
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')>;
|
|
6435
6439
|
};
|
|
6436
6440
|
/**
|
|
6437
6441
|
* A single webhook delivery attempt recorded by Zernio (30-day retention).
|
|
@@ -11356,7 +11360,7 @@ type CreateApiKeyData = {
|
|
|
11356
11360
|
*/
|
|
11357
11361
|
permission?: 'read-write' | 'read';
|
|
11358
11362
|
/**
|
|
11359
|
-
* 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
|
|
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.
|
|
11360
11364
|
*/
|
|
11361
11365
|
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
11362
11366
|
};
|
|
@@ -15524,6 +15528,13 @@ type GetWebhookSettingsResponse = ({
|
|
|
15524
15528
|
});
|
|
15525
15529
|
type GetWebhookSettingsError = ({
|
|
15526
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';
|
|
15527
15538
|
});
|
|
15528
15539
|
type CreateWebhookSettingsData = {
|
|
15529
15540
|
body: {
|
|
@@ -15553,6 +15564,10 @@ type CreateWebhookSettingsData = {
|
|
|
15553
15564
|
customHeaders?: {
|
|
15554
15565
|
[key: string]: (string);
|
|
15555
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')>;
|
|
15556
15571
|
};
|
|
15557
15572
|
};
|
|
15558
15573
|
type CreateWebhookSettingsResponse = ({
|
|
@@ -15601,6 +15616,10 @@ type UpdateWebhookSettingsData = {
|
|
|
15601
15616
|
customHeaders?: {
|
|
15602
15617
|
[key: string]: (string);
|
|
15603
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')>;
|
|
15604
15623
|
};
|
|
15605
15624
|
};
|
|
15606
15625
|
type UpdateWebhookSettingsResponse = ({
|
|
@@ -15630,6 +15649,13 @@ type DeleteWebhookSettingsResponse = ({
|
|
|
15630
15649
|
});
|
|
15631
15650
|
type DeleteWebhookSettingsError = (unknown | {
|
|
15632
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';
|
|
15633
15659
|
});
|
|
15634
15660
|
type GetWebhookLogsData = {
|
|
15635
15661
|
query?: {
|
|
@@ -15708,6 +15734,13 @@ type TestWebhookResponse = ({
|
|
|
15708
15734
|
});
|
|
15709
15735
|
type TestWebhookError = (unknown | {
|
|
15710
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';
|
|
15711
15744
|
} | {
|
|
15712
15745
|
success?: boolean;
|
|
15713
15746
|
message?: string;
|
|
@@ -28424,7 +28457,9 @@ type CreateStandaloneAdData = {
|
|
|
28424
28457
|
* with "The language asset feed includes an unsupported targeting field"
|
|
28425
28458
|
* (subcode 1885985).
|
|
28426
28459
|
*
|
|
28427
|
-
* Media DOES inherit and is uploaded once when shared
|
|
28460
|
+
* Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits
|
|
28461
|
+
* too: each locale may name its own landing page and unlisted locales fall back
|
|
28462
|
+
* to the ad's top-level `linkUrl`. Note that Meta enforces
|
|
28428
28463
|
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
28429
28464
|
* works on a normal ad may be rejected with "The following images have invalid
|
|
28430
28465
|
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
@@ -28450,6 +28485,10 @@ type CreateStandaloneAdData = {
|
|
|
28450
28485
|
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
28451
28486
|
*/
|
|
28452
28487
|
description: string;
|
|
28488
|
+
/**
|
|
28489
|
+
* Destination URL for this language. Inherits the ad's top-level `linkUrl` when omitted, and requires it to be present (400 otherwise): the top-level URL is the destination for every locale you did not override. Unlike text, identical URLs across locales are fine (they share one asset).
|
|
28490
|
+
*/
|
|
28491
|
+
linkUrl?: string;
|
|
28453
28492
|
/**
|
|
28454
28493
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28455
28494
|
*/
|
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.
|
|
39
|
+
version: "0.2.510",
|
|
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.
|
|
8
|
+
version: "0.2.510",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -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
|
|
2821
|
-
*
|
|
2822
|
-
*
|
|
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
|
|
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
|
};
|
|
@@ -5423,6 +5423,10 @@ export type Webhook = {
|
|
|
5423
5423
|
customHeaders?: {
|
|
5424
5424
|
[key: string]: (string);
|
|
5425
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')>;
|
|
5426
5430
|
};
|
|
5427
5431
|
|
|
5428
5432
|
/**
|
|
@@ -10651,7 +10655,7 @@ export type CreateApiKeyData = {
|
|
|
10651
10655
|
*/
|
|
10652
10656
|
permission?: 'read-write' | 'read';
|
|
10653
10657
|
/**
|
|
10654
|
-
* 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
|
|
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.
|
|
10655
10659
|
*/
|
|
10656
10660
|
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
10657
10661
|
};
|
|
@@ -15152,6 +15156,13 @@ export type GetWebhookSettingsResponse = ({
|
|
|
15152
15156
|
|
|
15153
15157
|
export type GetWebhookSettingsError = ({
|
|
15154
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';
|
|
15155
15166
|
});
|
|
15156
15167
|
|
|
15157
15168
|
export type CreateWebhookSettingsData = {
|
|
@@ -15182,6 +15193,10 @@ export type CreateWebhookSettingsData = {
|
|
|
15182
15193
|
customHeaders?: {
|
|
15183
15194
|
[key: string]: (string);
|
|
15184
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')>;
|
|
15185
15200
|
};
|
|
15186
15201
|
};
|
|
15187
15202
|
|
|
@@ -15233,6 +15248,10 @@ export type UpdateWebhookSettingsData = {
|
|
|
15233
15248
|
customHeaders?: {
|
|
15234
15249
|
[key: string]: (string);
|
|
15235
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')>;
|
|
15236
15255
|
};
|
|
15237
15256
|
};
|
|
15238
15257
|
|
|
@@ -15267,6 +15286,13 @@ export type DeleteWebhookSettingsResponse = ({
|
|
|
15267
15286
|
|
|
15268
15287
|
export type DeleteWebhookSettingsError = (unknown | {
|
|
15269
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';
|
|
15270
15296
|
});
|
|
15271
15297
|
|
|
15272
15298
|
export type GetWebhookLogsData = {
|
|
@@ -15351,6 +15377,13 @@ export type TestWebhookResponse = ({
|
|
|
15351
15377
|
|
|
15352
15378
|
export type TestWebhookError = (unknown | {
|
|
15353
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';
|
|
15354
15387
|
} | {
|
|
15355
15388
|
success?: boolean;
|
|
15356
15389
|
message?: string;
|
|
@@ -28962,7 +28995,9 @@ export type CreateStandaloneAdData = {
|
|
|
28962
28995
|
* with "The language asset feed includes an unsupported targeting field"
|
|
28963
28996
|
* (subcode 1885985).
|
|
28964
28997
|
*
|
|
28965
|
-
* Media DOES inherit and is uploaded once when shared
|
|
28998
|
+
* Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits
|
|
28999
|
+
* too: each locale may name its own landing page and unlisted locales fall back
|
|
29000
|
+
* to the ad's top-level `linkUrl`. Note that Meta enforces
|
|
28966
29001
|
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
28967
29002
|
* works on a normal ad may be rejected with "The following images have invalid
|
|
28968
29003
|
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
@@ -28988,6 +29023,10 @@ export type CreateStandaloneAdData = {
|
|
|
28988
29023
|
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
28989
29024
|
*/
|
|
28990
29025
|
description: string;
|
|
29026
|
+
/**
|
|
29027
|
+
* Destination URL for this language. Inherits the ad's top-level `linkUrl` when omitted, and requires it to be present (400 otherwise): the top-level URL is the destination for every locale you did not override. Unlike text, identical URLs across locales are fine (they share one asset).
|
|
29028
|
+
*/
|
|
29029
|
+
linkUrl?: string;
|
|
28991
29030
|
/**
|
|
28992
29031
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28993
29032
|
*/
|