@zernio/node 0.2.506 → 0.2.507
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 +72 -1
- package/dist/index.d.ts +72 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +22 -3
- package/src/generated/types.gen.ts +72 -1
package/dist/index.d.mts
CHANGED
|
@@ -2107,6 +2107,10 @@ type ApiKey = {
|
|
|
2107
2107
|
* 'read-write' allows all operations, 'read' restricts to GET requests only
|
|
2108
2108
|
*/
|
|
2109
2109
|
permission?: 'read-write' | 'read';
|
|
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.
|
|
2112
|
+
*/
|
|
2113
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
2110
2114
|
};
|
|
2111
2115
|
/**
|
|
2112
2116
|
* 'full' grants access to all profiles, 'profiles' restricts to specific profiles
|
|
@@ -11320,6 +11324,13 @@ type ListApiKeysResponse = ({
|
|
|
11320
11324
|
});
|
|
11321
11325
|
type ListApiKeysError = ({
|
|
11322
11326
|
error?: string;
|
|
11327
|
+
} | {
|
|
11328
|
+
error?: string;
|
|
11329
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11330
|
+
/**
|
|
11331
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11332
|
+
*/
|
|
11333
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11323
11334
|
});
|
|
11324
11335
|
type CreateApiKeyData = {
|
|
11325
11336
|
body: {
|
|
@@ -11340,6 +11351,10 @@ type CreateApiKeyData = {
|
|
|
11340
11351
|
* 'read-write' allows all operations (default), 'read' restricts to GET requests only
|
|
11341
11352
|
*/
|
|
11342
11353
|
permission?: 'read-write' | 'read';
|
|
11354
|
+
/**
|
|
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.
|
|
11356
|
+
*/
|
|
11357
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
11343
11358
|
};
|
|
11344
11359
|
};
|
|
11345
11360
|
type CreateApiKeyResponse = ({
|
|
@@ -11348,6 +11363,13 @@ type CreateApiKeyResponse = ({
|
|
|
11348
11363
|
});
|
|
11349
11364
|
type CreateApiKeyError = (unknown | {
|
|
11350
11365
|
error?: string;
|
|
11366
|
+
} | {
|
|
11367
|
+
error?: string;
|
|
11368
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11369
|
+
/**
|
|
11370
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11371
|
+
*/
|
|
11372
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11351
11373
|
});
|
|
11352
11374
|
type DeleteApiKeyData = {
|
|
11353
11375
|
path: {
|
|
@@ -11359,13 +11381,27 @@ type DeleteApiKeyResponse = ({
|
|
|
11359
11381
|
});
|
|
11360
11382
|
type DeleteApiKeyError = ({
|
|
11361
11383
|
error?: string;
|
|
11384
|
+
} | {
|
|
11385
|
+
error?: string;
|
|
11386
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11387
|
+
/**
|
|
11388
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11389
|
+
*/
|
|
11390
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11362
11391
|
});
|
|
11363
11392
|
type ListConnectedAppsResponse = ({
|
|
11364
11393
|
connectedApps?: Array<ConnectedApp>;
|
|
11365
11394
|
});
|
|
11366
11395
|
type ListConnectedAppsError = ({
|
|
11367
11396
|
error?: string;
|
|
11368
|
-
} |
|
|
11397
|
+
} | {
|
|
11398
|
+
error?: string;
|
|
11399
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11400
|
+
/**
|
|
11401
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11402
|
+
*/
|
|
11403
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11404
|
+
});
|
|
11369
11405
|
type RevokeConnectedAppData = {
|
|
11370
11406
|
path: {
|
|
11371
11407
|
/**
|
|
@@ -11388,6 +11424,13 @@ type RevokeConnectedAppResponse = ({
|
|
|
11388
11424
|
});
|
|
11389
11425
|
type RevokeConnectedAppError = (ErrorResponse | {
|
|
11390
11426
|
error?: string;
|
|
11427
|
+
} | {
|
|
11428
|
+
error?: string;
|
|
11429
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11430
|
+
/**
|
|
11431
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11432
|
+
*/
|
|
11433
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11391
11434
|
});
|
|
11392
11435
|
type CreateInviteTokenData = {
|
|
11393
11436
|
body: {
|
|
@@ -11419,6 +11462,13 @@ type CreateInviteTokenResponse = ({
|
|
|
11419
11462
|
});
|
|
11420
11463
|
type CreateInviteTokenError = (unknown | {
|
|
11421
11464
|
error?: string;
|
|
11465
|
+
} | {
|
|
11466
|
+
error?: string;
|
|
11467
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11468
|
+
/**
|
|
11469
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11470
|
+
*/
|
|
11471
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11422
11472
|
});
|
|
11423
11473
|
type GetConnectUrlData = {
|
|
11424
11474
|
path: {
|
|
@@ -15507,6 +15557,13 @@ type CreateWebhookSettingsResponse = ({
|
|
|
15507
15557
|
});
|
|
15508
15558
|
type CreateWebhookSettingsError = (unknown | {
|
|
15509
15559
|
error?: string;
|
|
15560
|
+
} | {
|
|
15561
|
+
error?: string;
|
|
15562
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15563
|
+
/**
|
|
15564
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15565
|
+
*/
|
|
15566
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15510
15567
|
});
|
|
15511
15568
|
type UpdateWebhookSettingsData = {
|
|
15512
15569
|
body: {
|
|
@@ -15548,6 +15605,13 @@ type UpdateWebhookSettingsResponse = ({
|
|
|
15548
15605
|
});
|
|
15549
15606
|
type UpdateWebhookSettingsError = (unknown | {
|
|
15550
15607
|
error?: string;
|
|
15608
|
+
} | {
|
|
15609
|
+
error?: string;
|
|
15610
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15611
|
+
/**
|
|
15612
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15613
|
+
*/
|
|
15614
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15551
15615
|
});
|
|
15552
15616
|
type DeleteWebhookSettingsData = {
|
|
15553
15617
|
query: {
|
|
@@ -15618,6 +15682,13 @@ type GetWebhookLogsResponse = ({
|
|
|
15618
15682
|
});
|
|
15619
15683
|
type GetWebhookLogsError = (unknown | {
|
|
15620
15684
|
error?: string;
|
|
15685
|
+
} | {
|
|
15686
|
+
error?: string;
|
|
15687
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15688
|
+
/**
|
|
15689
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15690
|
+
*/
|
|
15691
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15621
15692
|
});
|
|
15622
15693
|
type TestWebhookData = {
|
|
15623
15694
|
body: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2107,6 +2107,10 @@ type ApiKey = {
|
|
|
2107
2107
|
* 'read-write' allows all operations, 'read' restricts to GET requests only
|
|
2108
2108
|
*/
|
|
2109
2109
|
permission?: 'read-write' | 'read';
|
|
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.
|
|
2112
|
+
*/
|
|
2113
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
2110
2114
|
};
|
|
2111
2115
|
/**
|
|
2112
2116
|
* 'full' grants access to all profiles, 'profiles' restricts to specific profiles
|
|
@@ -11320,6 +11324,13 @@ type ListApiKeysResponse = ({
|
|
|
11320
11324
|
});
|
|
11321
11325
|
type ListApiKeysError = ({
|
|
11322
11326
|
error?: string;
|
|
11327
|
+
} | {
|
|
11328
|
+
error?: string;
|
|
11329
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11330
|
+
/**
|
|
11331
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11332
|
+
*/
|
|
11333
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11323
11334
|
});
|
|
11324
11335
|
type CreateApiKeyData = {
|
|
11325
11336
|
body: {
|
|
@@ -11340,6 +11351,10 @@ type CreateApiKeyData = {
|
|
|
11340
11351
|
* 'read-write' allows all operations (default), 'read' restricts to GET requests only
|
|
11341
11352
|
*/
|
|
11342
11353
|
permission?: 'read-write' | 'read';
|
|
11354
|
+
/**
|
|
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.
|
|
11356
|
+
*/
|
|
11357
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
11343
11358
|
};
|
|
11344
11359
|
};
|
|
11345
11360
|
type CreateApiKeyResponse = ({
|
|
@@ -11348,6 +11363,13 @@ type CreateApiKeyResponse = ({
|
|
|
11348
11363
|
});
|
|
11349
11364
|
type CreateApiKeyError = (unknown | {
|
|
11350
11365
|
error?: string;
|
|
11366
|
+
} | {
|
|
11367
|
+
error?: string;
|
|
11368
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11369
|
+
/**
|
|
11370
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11371
|
+
*/
|
|
11372
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11351
11373
|
});
|
|
11352
11374
|
type DeleteApiKeyData = {
|
|
11353
11375
|
path: {
|
|
@@ -11359,13 +11381,27 @@ type DeleteApiKeyResponse = ({
|
|
|
11359
11381
|
});
|
|
11360
11382
|
type DeleteApiKeyError = ({
|
|
11361
11383
|
error?: string;
|
|
11384
|
+
} | {
|
|
11385
|
+
error?: string;
|
|
11386
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11387
|
+
/**
|
|
11388
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11389
|
+
*/
|
|
11390
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11362
11391
|
});
|
|
11363
11392
|
type ListConnectedAppsResponse = ({
|
|
11364
11393
|
connectedApps?: Array<ConnectedApp>;
|
|
11365
11394
|
});
|
|
11366
11395
|
type ListConnectedAppsError = ({
|
|
11367
11396
|
error?: string;
|
|
11368
|
-
} |
|
|
11397
|
+
} | {
|
|
11398
|
+
error?: string;
|
|
11399
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11400
|
+
/**
|
|
11401
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11402
|
+
*/
|
|
11403
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11404
|
+
});
|
|
11369
11405
|
type RevokeConnectedAppData = {
|
|
11370
11406
|
path: {
|
|
11371
11407
|
/**
|
|
@@ -11388,6 +11424,13 @@ type RevokeConnectedAppResponse = ({
|
|
|
11388
11424
|
});
|
|
11389
11425
|
type RevokeConnectedAppError = (ErrorResponse | {
|
|
11390
11426
|
error?: string;
|
|
11427
|
+
} | {
|
|
11428
|
+
error?: string;
|
|
11429
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11430
|
+
/**
|
|
11431
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11432
|
+
*/
|
|
11433
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11391
11434
|
});
|
|
11392
11435
|
type CreateInviteTokenData = {
|
|
11393
11436
|
body: {
|
|
@@ -11419,6 +11462,13 @@ type CreateInviteTokenResponse = ({
|
|
|
11419
11462
|
});
|
|
11420
11463
|
type CreateInviteTokenError = (unknown | {
|
|
11421
11464
|
error?: string;
|
|
11465
|
+
} | {
|
|
11466
|
+
error?: string;
|
|
11467
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
11468
|
+
/**
|
|
11469
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
11470
|
+
*/
|
|
11471
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
11422
11472
|
});
|
|
11423
11473
|
type GetConnectUrlData = {
|
|
11424
11474
|
path: {
|
|
@@ -15507,6 +15557,13 @@ type CreateWebhookSettingsResponse = ({
|
|
|
15507
15557
|
});
|
|
15508
15558
|
type CreateWebhookSettingsError = (unknown | {
|
|
15509
15559
|
error?: string;
|
|
15560
|
+
} | {
|
|
15561
|
+
error?: string;
|
|
15562
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15563
|
+
/**
|
|
15564
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15565
|
+
*/
|
|
15566
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15510
15567
|
});
|
|
15511
15568
|
type UpdateWebhookSettingsData = {
|
|
15512
15569
|
body: {
|
|
@@ -15548,6 +15605,13 @@ type UpdateWebhookSettingsResponse = ({
|
|
|
15548
15605
|
});
|
|
15549
15606
|
type UpdateWebhookSettingsError = (unknown | {
|
|
15550
15607
|
error?: string;
|
|
15608
|
+
} | {
|
|
15609
|
+
error?: string;
|
|
15610
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15611
|
+
/**
|
|
15612
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15613
|
+
*/
|
|
15614
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15551
15615
|
});
|
|
15552
15616
|
type DeleteWebhookSettingsData = {
|
|
15553
15617
|
query: {
|
|
@@ -15618,6 +15682,13 @@ type GetWebhookLogsResponse = ({
|
|
|
15618
15682
|
});
|
|
15619
15683
|
type GetWebhookLogsError = (unknown | {
|
|
15620
15684
|
error?: string;
|
|
15685
|
+
} | {
|
|
15686
|
+
error?: string;
|
|
15687
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15688
|
+
/**
|
|
15689
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15690
|
+
*/
|
|
15691
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15621
15692
|
});
|
|
15622
15693
|
type TestWebhookData = {
|
|
15623
15694
|
body: {
|
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.507",
|
|
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.507",
|
|
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
|
@@ -1235,9 +1235,10 @@ export const deleteApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
1235
1235
|
* Returns the OAuth clients (AI assistants and MCP connectors) the authenticated
|
|
1236
1236
|
* user has authorized and that still hold a live token.
|
|
1237
1237
|
*
|
|
1238
|
-
* Requires a session or a full-
|
|
1239
|
-
* OAuth access token is rejected with 403: an
|
|
1240
|
-
* its sibling authorizations
|
|
1238
|
+
* Requires a session or a full-access API key. A profile-scoped API key, a
|
|
1239
|
+
* restricted (zrk_) API key, or an OAuth access token is rejected with 403: an
|
|
1240
|
+
* app must not be able to enumerate its sibling authorizations, and connected-app
|
|
1241
|
+
* management is admin-plane.
|
|
1241
1242
|
*
|
|
1242
1243
|
*/
|
|
1243
1244
|
export const listConnectedApps = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
@@ -1256,6 +1257,9 @@ export const listConnectedApps = <ThrowOnError extends boolean = false>(options?
|
|
|
1256
1257
|
* Idempotent while the authorization is still on record: revoking an app that
|
|
1257
1258
|
* was already revoked returns 200 with `revokedTokens: 0`.
|
|
1258
1259
|
*
|
|
1260
|
+
* Requires a session or a full-access API key. A profile-scoped API key, a
|
|
1261
|
+
* restricted (zrk_) API key, or an OAuth access token is rejected with 403.
|
|
1262
|
+
*
|
|
1259
1263
|
*/
|
|
1260
1264
|
export const revokeConnectedApp = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RevokeConnectedAppData, ThrowOnError>) => {
|
|
1261
1265
|
return (options?.client ?? client).delete<RevokeConnectedAppResponse, RevokeConnectedAppError, ThrowOnError>({
|
|
@@ -1269,6 +1273,9 @@ export const revokeConnectedApp = <ThrowOnError extends boolean = false>(options
|
|
|
1269
1273
|
* Generate a secure invite link to grant team members access to your profiles.
|
|
1270
1274
|
* Invites expire after 7 days and are single-use.
|
|
1271
1275
|
*
|
|
1276
|
+
* Returns 403 when a requested profile is not found or not owned, or when
|
|
1277
|
+
* called with a restricted (zrk_) API key: invite management is admin-plane.
|
|
1278
|
+
*
|
|
1272
1279
|
*/
|
|
1273
1280
|
export const createInviteToken = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateInviteTokenData, ThrowOnError>) => {
|
|
1274
1281
|
return (options?.client ?? client).post<CreateInviteTokenResponse, CreateInviteTokenError, ThrowOnError>({
|
|
@@ -2809,6 +2816,11 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
|
|
|
2809
2816
|
*
|
|
2810
2817
|
* Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
2811
2818
|
*
|
|
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.
|
|
2823
|
+
*
|
|
2812
2824
|
*/
|
|
2813
2825
|
export const createWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWebhookSettingsData, ThrowOnError>) => {
|
|
2814
2826
|
return (options?.client ?? client).post<CreateWebhookSettingsResponse, CreateWebhookSettingsError, ThrowOnError>({
|
|
@@ -2825,6 +2837,9 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
2825
2837
|
*
|
|
2826
2838
|
* Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
2827
2839
|
*
|
|
2840
|
+
* A restricted (zrk_) API key can only set `events` to events whose resource
|
|
2841
|
+
* group the key holds; an event outside the key's groups is rejected with 403.
|
|
2842
|
+
*
|
|
2828
2843
|
*/
|
|
2829
2844
|
export const updateWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWebhookSettingsData, ThrowOnError>) => {
|
|
2830
2845
|
return (options?.client ?? client).put<UpdateWebhookSettingsResponse, UpdateWebhookSettingsError, ThrowOnError>({
|
|
@@ -2850,6 +2865,10 @@ export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
2850
2865
|
* Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID,
|
|
2851
2866
|
* plus offset-based pagination.
|
|
2852
2867
|
*
|
|
2868
|
+
* For a restricted (zrk_) API key, rows for events outside the key's resource
|
|
2869
|
+
* groups are omitted (`pagination.total` may over-count), and an `event` filter
|
|
2870
|
+
* naming such an event is rejected with 403.
|
|
2871
|
+
*
|
|
2853
2872
|
*/
|
|
2854
2873
|
export const getWebhookLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetWebhookLogsData, ThrowOnError>) => {
|
|
2855
2874
|
return (options?.client ?? client).get<GetWebhookLogsResponse, GetWebhookLogsError, ThrowOnError>({
|
|
@@ -920,6 +920,10 @@ export type ApiKey = {
|
|
|
920
920
|
* 'read-write' allows all operations, 'read' restricts to GET requests only
|
|
921
921
|
*/
|
|
922
922
|
permission?: 'read-write' | 'read';
|
|
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.
|
|
925
|
+
*/
|
|
926
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
923
927
|
};
|
|
924
928
|
|
|
925
929
|
/**
|
|
@@ -10614,6 +10618,13 @@ export type ListApiKeysResponse = ({
|
|
|
10614
10618
|
|
|
10615
10619
|
export type ListApiKeysError = ({
|
|
10616
10620
|
error?: string;
|
|
10621
|
+
} | {
|
|
10622
|
+
error?: string;
|
|
10623
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10624
|
+
/**
|
|
10625
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10626
|
+
*/
|
|
10627
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10617
10628
|
});
|
|
10618
10629
|
|
|
10619
10630
|
export type CreateApiKeyData = {
|
|
@@ -10635,6 +10646,10 @@ export type CreateApiKeyData = {
|
|
|
10635
10646
|
* 'read-write' allows all operations (default), 'read' restricts to GET requests only
|
|
10636
10647
|
*/
|
|
10637
10648
|
permission?: 'read-write' | 'read';
|
|
10649
|
+
/**
|
|
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.
|
|
10651
|
+
*/
|
|
10652
|
+
disabledResourceGroups?: Array<('publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks')>;
|
|
10638
10653
|
};
|
|
10639
10654
|
};
|
|
10640
10655
|
|
|
@@ -10645,6 +10660,13 @@ export type CreateApiKeyResponse = ({
|
|
|
10645
10660
|
|
|
10646
10661
|
export type CreateApiKeyError = (unknown | {
|
|
10647
10662
|
error?: string;
|
|
10663
|
+
} | {
|
|
10664
|
+
error?: string;
|
|
10665
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10666
|
+
/**
|
|
10667
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10668
|
+
*/
|
|
10669
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10648
10670
|
});
|
|
10649
10671
|
|
|
10650
10672
|
export type DeleteApiKeyData = {
|
|
@@ -10659,6 +10681,13 @@ export type DeleteApiKeyResponse = ({
|
|
|
10659
10681
|
|
|
10660
10682
|
export type DeleteApiKeyError = ({
|
|
10661
10683
|
error?: string;
|
|
10684
|
+
} | {
|
|
10685
|
+
error?: string;
|
|
10686
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10687
|
+
/**
|
|
10688
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10689
|
+
*/
|
|
10690
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10662
10691
|
});
|
|
10663
10692
|
|
|
10664
10693
|
export type ListConnectedAppsResponse = ({
|
|
@@ -10667,7 +10696,14 @@ export type ListConnectedAppsResponse = ({
|
|
|
10667
10696
|
|
|
10668
10697
|
export type ListConnectedAppsError = ({
|
|
10669
10698
|
error?: string;
|
|
10670
|
-
} |
|
|
10699
|
+
} | {
|
|
10700
|
+
error?: string;
|
|
10701
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10702
|
+
/**
|
|
10703
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10704
|
+
*/
|
|
10705
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10706
|
+
});
|
|
10671
10707
|
|
|
10672
10708
|
export type RevokeConnectedAppData = {
|
|
10673
10709
|
path: {
|
|
@@ -10693,6 +10729,13 @@ export type RevokeConnectedAppResponse = ({
|
|
|
10693
10729
|
|
|
10694
10730
|
export type RevokeConnectedAppError = (ErrorResponse | {
|
|
10695
10731
|
error?: string;
|
|
10732
|
+
} | {
|
|
10733
|
+
error?: string;
|
|
10734
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10735
|
+
/**
|
|
10736
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10737
|
+
*/
|
|
10738
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10696
10739
|
});
|
|
10697
10740
|
|
|
10698
10741
|
export type CreateInviteTokenData = {
|
|
@@ -10727,6 +10770,13 @@ export type CreateInviteTokenResponse = ({
|
|
|
10727
10770
|
|
|
10728
10771
|
export type CreateInviteTokenError = (unknown | {
|
|
10729
10772
|
error?: string;
|
|
10773
|
+
} | {
|
|
10774
|
+
error?: string;
|
|
10775
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
10776
|
+
/**
|
|
10777
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
10778
|
+
*/
|
|
10779
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
10730
10780
|
});
|
|
10731
10781
|
|
|
10732
10782
|
export type GetConnectUrlData = {
|
|
@@ -15138,6 +15188,13 @@ export type CreateWebhookSettingsResponse = ({
|
|
|
15138
15188
|
|
|
15139
15189
|
export type CreateWebhookSettingsError = (unknown | {
|
|
15140
15190
|
error?: string;
|
|
15191
|
+
} | {
|
|
15192
|
+
error?: string;
|
|
15193
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15194
|
+
/**
|
|
15195
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15196
|
+
*/
|
|
15197
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15141
15198
|
});
|
|
15142
15199
|
|
|
15143
15200
|
export type UpdateWebhookSettingsData = {
|
|
@@ -15182,6 +15239,13 @@ export type UpdateWebhookSettingsResponse = ({
|
|
|
15182
15239
|
|
|
15183
15240
|
export type UpdateWebhookSettingsError = (unknown | {
|
|
15184
15241
|
error?: string;
|
|
15242
|
+
} | {
|
|
15243
|
+
error?: string;
|
|
15244
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15245
|
+
/**
|
|
15246
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15247
|
+
*/
|
|
15248
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15185
15249
|
});
|
|
15186
15250
|
|
|
15187
15251
|
export type DeleteWebhookSettingsData = {
|
|
@@ -15258,6 +15322,13 @@ export type GetWebhookLogsResponse = ({
|
|
|
15258
15322
|
|
|
15259
15323
|
export type GetWebhookLogsError = (unknown | {
|
|
15260
15324
|
error?: string;
|
|
15325
|
+
} | {
|
|
15326
|
+
error?: string;
|
|
15327
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
15328
|
+
/**
|
|
15329
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
15330
|
+
*/
|
|
15331
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks';
|
|
15261
15332
|
});
|
|
15262
15333
|
|
|
15263
15334
|
export type TestWebhookData = {
|