@naturali/sdk 0.302.0 → 0.303.1

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.cjs CHANGED
@@ -1682,9 +1682,9 @@ var ApiKeys = class {
1682
1682
  * Create an API key
1683
1683
  *
1684
1684
  * Creates an API key. When `project_id` is set the key is scoped to that project (the default and recommended stance); omit it for an account-scoped key. The raw `key` (nat_sk_…) is returned only in this response.
1685
- * A project key is bounded by `policy_ids`, policies of its project whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a project key, else empty and never. An id that is not a policy of the project is `400`, and so is `capabilities`.
1686
- * An account key is bounded by `capabilities`, narrowing it to the operations whose capability it names; empty, it reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed account key. An unknown capability is `400`, and so are `policy_ids` and `expires_at`.
1687
- * A narrowed key may grant only a non-empty subset of its own `policy_ids` or `capabilities`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it. A key narrowed by `capabilities` writes no project key.
1685
+ * A key is bounded by `policy_ids`, whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a narrowed or expiring key, else empty and never.
1686
+ * A project key's `policy_ids` are policies of its project; any other id is `400`. An account key's are global policies or policies of the account (`/v1/account/policies`), each granting only account actions the account holds; any other is `400`. An account key with `policy_ids` acts on its account only: each account operation is checked against them, an operation without an account action is `403`, and so is every route in a project.
1687
+ * A narrowed key may grant only a non-empty subset of its own `policy_ids`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it.
1688
1688
  * A project-scoped key requires membership of that project. The key carries no role of its own — every request it makes resolves its holder's membership again — so it can never reach past what its minter already had. An account-scoped key requires a credential that is not itself confined to one project.
1689
1689
  * A connected app cannot create keys at all: a grant is revocable and a key is not, so a key minted under a grant would still work after the app was disconnected. Reading and revoking keys stay available.
1690
1690
  *
@@ -1730,7 +1730,7 @@ var ApiKeys = class {
1730
1730
  /**
1731
1731
  * Update an API key
1732
1732
  *
1733
- * Rename an API key or replace its bound (`policy_ids` and `expires_at` for a project key, `capabilities` for an account key); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
1733
+ * Rename an API key or replace its bound (`policy_ids` and `expires_at`); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
1734
1734
  *
1735
1735
  */
1736
1736
  static updateApiKey(options) {
package/dist/index.d.cts CHANGED
@@ -2387,20 +2387,14 @@ type ApiKeyRecord = {
2387
2387
  */
2388
2388
  project_id?: string | null;
2389
2389
  /**
2390
- * An account key's capabilities, each the one an operation needs (`<action_name>:<OperationId>`); a call outside them is `403`. Empty means the key reaches whatever its holder's membership reaches. Absent on a project key.
2390
+ * The key's policies, whose grants it holds together: a project key's are its project's, an account key's are global or its account's. A call they do not allow is `403`. Empty means the key reaches whatever its holder's membership reaches.
2391
2391
  *
2392
2392
  */
2393
- capabilities?: Array<string>;
2393
+ policy_ids: Array<string>;
2394
2394
  /**
2395
- * A project key's policies, of its project, whose grants it holds together; a call they do not allow is `403`. Empty means the key reaches whatever its holder's membership reaches. Absent on an account key.
2396
- *
2395
+ * When the key stops authenticating (`401`); null for never.
2397
2396
  */
2398
- policy_ids?: Array<string>;
2399
- /**
2400
- * When a project key stops authenticating (`401`); null for never. Absent on an account key.
2401
- *
2402
- */
2403
- expires_at?: Date | null;
2397
+ expires_at: Date | null;
2404
2398
  created_at: Date;
2405
2399
  /**
2406
2400
  * When the key was last presented; null if never used.
@@ -2423,17 +2417,12 @@ type ApiKeyCreate = {
2423
2417
  */
2424
2418
  project_id?: string;
2425
2419
  /**
2426
- * An account key's capabilities. Omit for none, or for the caller's own set when the caller is a narrowed account key. `400` on a project key.
2427
- *
2428
- */
2429
- capabilities?: Array<string>;
2430
- /**
2431
- * A project key's policies, each a policy of its project. Omit for none, or for the caller's own when the caller is a narrowed project key. `400` on an account key.
2420
+ * The key's policies: for a project key, policies of its project; for an account key, global policies or the account's policies. Omit for none, or for the caller's own when the caller is a narrowed key.
2432
2421
  *
2433
2422
  */
2434
2423
  policy_ids?: Array<string>;
2435
2424
  /**
2436
- * When a project key stops authenticating. Omit for never, or for the caller's own expiry when the caller is an expiring key. `400` on an account key.
2425
+ * When the key stops authenticating. Omit for never, or for the caller's own expiry when the caller is an expiring key.
2437
2426
  *
2438
2427
  */
2439
2428
  expires_at?: Date;
@@ -2444,18 +2433,12 @@ type ApiKeyCreate = {
2444
2433
  type ApiKeyUpdate = {
2445
2434
  name?: string;
2446
2435
  /**
2447
- * Replace an account key's capability set; an empty array removes the narrowing. `400` on a project key.
2448
- *
2449
- */
2450
- capabilities?: Array<string>;
2451
- /**
2452
- * Replace a project key's policies; an empty array removes the narrowing. `400` on an account key.
2436
+ * Replace the key's policies; an empty array removes the narrowing.
2453
2437
  *
2454
2438
  */
2455
2439
  policy_ids?: Array<string>;
2456
2440
  /**
2457
- * Replace a project key's expiry; null for never. `400` on an account key.
2458
- *
2441
+ * Replace the key's expiry; null for never.
2459
2442
  */
2460
2443
  expires_at?: Date | null;
2461
2444
  };
@@ -40208,9 +40191,9 @@ export declare class ApiKeys {
40208
40191
  * Create an API key
40209
40192
  *
40210
40193
  * Creates an API key. When `project_id` is set the key is scoped to that project (the default and recommended stance); omit it for an account-scoped key. The raw `key` (nat_sk_…) is returned only in this response.
40211
- * A project key is bounded by `policy_ids`, policies of its project whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a project key, else empty and never. An id that is not a policy of the project is `400`, and so is `capabilities`.
40212
- * An account key is bounded by `capabilities`, narrowing it to the operations whose capability it names; empty, it reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed account key. An unknown capability is `400`, and so are `policy_ids` and `expires_at`.
40213
- * A narrowed key may grant only a non-empty subset of its own `policy_ids` or `capabilities`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it. A key narrowed by `capabilities` writes no project key.
40194
+ * A key is bounded by `policy_ids`, whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a narrowed or expiring key, else empty and never.
40195
+ * A project key's `policy_ids` are policies of its project; any other id is `400`. An account key's are global policies or policies of the account (`/v1/account/policies`), each granting only account actions the account holds; any other is `400`. An account key with `policy_ids` acts on its account only: each account operation is checked against them, an operation without an account action is `403`, and so is every route in a project.
40196
+ * A narrowed key may grant only a non-empty subset of its own `policy_ids`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it.
40214
40197
  * A project-scoped key requires membership of that project. The key carries no role of its own — every request it makes resolves its holder's membership again — so it can never reach past what its minter already had. An account-scoped key requires a credential that is not itself confined to one project.
40215
40198
  * A connected app cannot create keys at all: a grant is revocable and a key is not, so a key minted under a grant would still work after the app was disconnected. Reading and revoking keys stay available.
40216
40199
  *
@@ -40232,7 +40215,7 @@ export declare class ApiKeys {
40232
40215
  /**
40233
40216
  * Update an API key
40234
40217
  *
40235
- * Rename an API key or replace its bound (`policy_ids` and `expires_at` for a project key, `capabilities` for an account key); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
40218
+ * Rename an API key or replace its bound (`policy_ids` and `expires_at`); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
40236
40219
  *
40237
40220
  */
40238
40221
  static updateApiKey<ThrowOnError extends boolean = false>(options: Options<UpdateApiKeyData, ThrowOnError>): RequestResult<UpdateApiKeyResponses, UpdateApiKeyErrors, ThrowOnError>;
package/dist/index.d.mts CHANGED
@@ -2387,20 +2387,14 @@ type ApiKeyRecord = {
2387
2387
  */
2388
2388
  project_id?: string | null;
2389
2389
  /**
2390
- * An account key's capabilities, each the one an operation needs (`<action_name>:<OperationId>`); a call outside them is `403`. Empty means the key reaches whatever its holder's membership reaches. Absent on a project key.
2390
+ * The key's policies, whose grants it holds together: a project key's are its project's, an account key's are global or its account's. A call they do not allow is `403`. Empty means the key reaches whatever its holder's membership reaches.
2391
2391
  *
2392
2392
  */
2393
- capabilities?: Array<string>;
2393
+ policy_ids: Array<string>;
2394
2394
  /**
2395
- * A project key's policies, of its project, whose grants it holds together; a call they do not allow is `403`. Empty means the key reaches whatever its holder's membership reaches. Absent on an account key.
2396
- *
2395
+ * When the key stops authenticating (`401`); null for never.
2397
2396
  */
2398
- policy_ids?: Array<string>;
2399
- /**
2400
- * When a project key stops authenticating (`401`); null for never. Absent on an account key.
2401
- *
2402
- */
2403
- expires_at?: Date | null;
2397
+ expires_at: Date | null;
2404
2398
  created_at: Date;
2405
2399
  /**
2406
2400
  * When the key was last presented; null if never used.
@@ -2423,17 +2417,12 @@ type ApiKeyCreate = {
2423
2417
  */
2424
2418
  project_id?: string;
2425
2419
  /**
2426
- * An account key's capabilities. Omit for none, or for the caller's own set when the caller is a narrowed account key. `400` on a project key.
2427
- *
2428
- */
2429
- capabilities?: Array<string>;
2430
- /**
2431
- * A project key's policies, each a policy of its project. Omit for none, or for the caller's own when the caller is a narrowed project key. `400` on an account key.
2420
+ * The key's policies: for a project key, policies of its project; for an account key, global policies or the account's policies. Omit for none, or for the caller's own when the caller is a narrowed key.
2432
2421
  *
2433
2422
  */
2434
2423
  policy_ids?: Array<string>;
2435
2424
  /**
2436
- * When a project key stops authenticating. Omit for never, or for the caller's own expiry when the caller is an expiring key. `400` on an account key.
2425
+ * When the key stops authenticating. Omit for never, or for the caller's own expiry when the caller is an expiring key.
2437
2426
  *
2438
2427
  */
2439
2428
  expires_at?: Date;
@@ -2444,18 +2433,12 @@ type ApiKeyCreate = {
2444
2433
  type ApiKeyUpdate = {
2445
2434
  name?: string;
2446
2435
  /**
2447
- * Replace an account key's capability set; an empty array removes the narrowing. `400` on a project key.
2448
- *
2449
- */
2450
- capabilities?: Array<string>;
2451
- /**
2452
- * Replace a project key's policies; an empty array removes the narrowing. `400` on an account key.
2436
+ * Replace the key's policies; an empty array removes the narrowing.
2453
2437
  *
2454
2438
  */
2455
2439
  policy_ids?: Array<string>;
2456
2440
  /**
2457
- * Replace a project key's expiry; null for never. `400` on an account key.
2458
- *
2441
+ * Replace the key's expiry; null for never.
2459
2442
  */
2460
2443
  expires_at?: Date | null;
2461
2444
  };
@@ -40208,9 +40191,9 @@ export declare class ApiKeys {
40208
40191
  * Create an API key
40209
40192
  *
40210
40193
  * Creates an API key. When `project_id` is set the key is scoped to that project (the default and recommended stance); omit it for an account-scoped key. The raw `key` (nat_sk_…) is returned only in this response.
40211
- * A project key is bounded by `policy_ids`, policies of its project whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a project key, else empty and never. An id that is not a policy of the project is `400`, and so is `capabilities`.
40212
- * An account key is bounded by `capabilities`, narrowing it to the operations whose capability it names; empty, it reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed account key. An unknown capability is `400`, and so are `policy_ids` and `expires_at`.
40213
- * A narrowed key may grant only a non-empty subset of its own `policy_ids` or `capabilities`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it. A key narrowed by `capabilities` writes no project key.
40194
+ * A key is bounded by `policy_ids`, whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a narrowed or expiring key, else empty and never.
40195
+ * A project key's `policy_ids` are policies of its project; any other id is `400`. An account key's are global policies or policies of the account (`/v1/account/policies`), each granting only account actions the account holds; any other is `400`. An account key with `policy_ids` acts on its account only: each account operation is checked against them, an operation without an account action is `403`, and so is every route in a project.
40196
+ * A narrowed key may grant only a non-empty subset of its own `policy_ids`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it.
40214
40197
  * A project-scoped key requires membership of that project. The key carries no role of its own — every request it makes resolves its holder's membership again — so it can never reach past what its minter already had. An account-scoped key requires a credential that is not itself confined to one project.
40215
40198
  * A connected app cannot create keys at all: a grant is revocable and a key is not, so a key minted under a grant would still work after the app was disconnected. Reading and revoking keys stay available.
40216
40199
  *
@@ -40232,7 +40215,7 @@ export declare class ApiKeys {
40232
40215
  /**
40233
40216
  * Update an API key
40234
40217
  *
40235
- * Rename an API key or replace its bound (`policy_ids` and `expires_at` for a project key, `capabilities` for an account key); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
40218
+ * Rename an API key or replace its bound (`policy_ids` and `expires_at`); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
40236
40219
  *
40237
40220
  */
40238
40221
  static updateApiKey<ThrowOnError extends boolean = false>(options: Options<UpdateApiKeyData, ThrowOnError>): RequestResult<UpdateApiKeyResponses, UpdateApiKeyErrors, ThrowOnError>;
package/dist/index.mjs CHANGED
@@ -1681,9 +1681,9 @@ var ApiKeys = class {
1681
1681
  * Create an API key
1682
1682
  *
1683
1683
  * Creates an API key. When `project_id` is set the key is scoped to that project (the default and recommended stance); omit it for an account-scoped key. The raw `key` (nat_sk_…) is returned only in this response.
1684
- * A project key is bounded by `policy_ids`, policies of its project whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a project key, else empty and never. An id that is not a policy of the project is `400`, and so is `capabilities`.
1685
- * An account key is bounded by `capabilities`, narrowing it to the operations whose capability it names; empty, it reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed account key. An unknown capability is `400`, and so are `policy_ids` and `expires_at`.
1686
- * A narrowed key may grant only a non-empty subset of its own `policy_ids` or `capabilities`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it. A key narrowed by `capabilities` writes no project key.
1684
+ * A key is bounded by `policy_ids`, whose grants it holds together; empty, it reaches whatever its holder's membership reaches. A key past `expires_at` is `401`. Omitted, each is the caller's own when the caller is a narrowed or expiring key, else empty and never.
1685
+ * A project key's `policy_ids` are policies of its project; any other id is `400`. An account key's are global policies or policies of the account (`/v1/account/policies`), each granting only account actions the account holds; any other is `400`. An account key with `policy_ids` acts on its account only: each account operation is checked against them, an operation without an account action is `403`, and so is every route in a project.
1686
+ * A narrowed key may grant only a non-empty subset of its own `policy_ids`, and an expiring key only a key that expires no later: anything wider or longer-lived is `403`, on update too, and so is rotating a key wider than it.
1687
1687
  * A project-scoped key requires membership of that project. The key carries no role of its own — every request it makes resolves its holder's membership again — so it can never reach past what its minter already had. An account-scoped key requires a credential that is not itself confined to one project.
1688
1688
  * A connected app cannot create keys at all: a grant is revocable and a key is not, so a key minted under a grant would still work after the app was disconnected. Reading and revoking keys stay available.
1689
1689
  *
@@ -1729,7 +1729,7 @@ var ApiKeys = class {
1729
1729
  /**
1730
1730
  * Update an API key
1731
1731
  *
1732
- * Rename an API key or replace its bound (`policy_ids` and `expires_at` for a project key, `capabilities` for an account key); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
1732
+ * Rename an API key or replace its bound (`policy_ids` and `expires_at`); the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own bound, and an expiring one no later expiry (`403`).
1733
1733
  *
1734
1734
  */
1735
1735
  static updateApiKey(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.302.0",
3
+ "version": "0.303.1",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.302.0",
41
+ "@naturali/api": "0.303.1",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",