@naturali/sdk 0.328.0 → 0.329.0

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.mjs CHANGED
@@ -1805,7 +1805,7 @@ var ApiKeys = class {
1805
1805
  *
1806
1806
  * 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.
1807
1807
  * 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.
1808
- * A project key's `policy_ids` are managed policies (`Full`, `Read only`) or policies of its project; any other id is `400`. An account key's are global policies, managed ones among them, 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.
1808
+ * A project key's `policy_ids` are managed policies (`Full`, `Read only`) or policies of its project; any other id is `400`. An account key's are global policies, managed ones among them, or policies of the account (`/v1/account/policies`), each granting only what the account holds; any other is `400`. An account key with `policy_ids` is checked against them on each account operation, and in each project the account pays for; an account operation without an account action is `403`, and so is every route in any other project.
1809
1809
  * 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.
1810
1810
  * 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.
1811
1811
  * 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.
@@ -2101,7 +2101,7 @@ var AuditLog = class {
2101
2101
  /**
2102
2102
  * List audit entries
2103
2103
  *
2104
- * Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a prefix match (e.g. `srn:{project}:secret:` matches every secret action); every other filter is exact.
2104
+ * Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a resource pattern (e.g. `srn:project/{project_id}/secret*` matches every secret's entries); every other filter is exact.
2105
2105
  */
2106
2106
  static listAuditEntries(options) {
2107
2107
  return (options.client ?? client).get({
@@ -3151,7 +3151,7 @@ var Evaluations = class {
3151
3151
  *
3152
3152
  * The item is a **copy**, not a view. It keeps working after the source generation's content is purged, and `source_generation_id` goes null if that generation is deleted — a purge can never quietly stop a suite from being runnable.
3153
3153
  *
3154
- * Requires both `evaluations:CreateDataset` and `generations:GetGeneration`: the call copies content out of a generation, so a principal that may not read that generation may not curate it either.
3154
+ * Requires both `evaluations:CreateDatasetItem` and `generations:GetGeneration`: the call copies content out of a generation, so a principal that may not read that generation may not curate it either.
3155
3155
  *
3156
3156
  * Only a **completed** generation can be promoted (`409 GENERATION_NOT_COMPLETED`), and only while its content is still available: an agent or project running with `trace_content_mode: none` never stored the input, and a purged or expired generation no longer has it (`409 GENERATION_CONTENT_UNAVAILABLE`). Generations that predate input recording answer the same way. A conversation turn's input is rebuilt from the conversation messages it read; once one of them is deleted, or a message is inserted among them, it answers `409 GENERATION_INPUT_NOT_REPRODUCIBLE`.
3157
3157
  */
@@ -5562,7 +5562,7 @@ var Policies = class {
5562
5562
  /**
5563
5563
  * List policies
5564
5564
  *
5565
- * Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. `project_group_id` lists that project group's policies instead, which needs `project-groups:ListPolicies` on `srn:project-group:<project_group_id>:policy*`. Without any, the unrestricted admin lists every policy, global, project and project group ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user. `scope=global` lists only the global policies: every one to the unrestricted admin, the published ones to any caller holding `policies:ListPolicies` in a project or `project-groups:ListPolicies` in a project group.
5565
+ * Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. `project_group_id` lists that project group's policies instead, which needs `project-groups:ListPolicies` on `srn:project_group/<project_group_id>/policy`. Without any, the unrestricted admin lists every policy, global, project and project group ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user. `scope=global` lists only the global policies: every one to the unrestricted admin, the published ones to any caller holding `policies:ListPolicies` in a project or `project-groups:ListPolicies` in a project group.
5566
5566
  *
5567
5567
  */
5568
5568
  static listPolicies(options) {
@@ -5574,7 +5574,7 @@ var Policies = class {
5574
5574
  /**
5575
5575
  * Create a policy
5576
5576
  *
5577
- * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. With `project_group_id`, creates a project group policy, which needs `project-groups:CreatePolicy` on `srn:project-group:<project_group_id>:policy*`: its `Allow` statements may name only the project group's own resources (`srn:project-group:<project_group_id>:<type>/<id>`) and those of a project in it, else `400`; an `Allow` without `resource` grants a project group action on the project group and any other action on its projects, read when the policy is evaluated. Only the project group and its keys may carry it in `policy_ids`. Without a project or a project group, creates a global policy, which only the unrestricted admin may.
5577
+ * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:project/<project_id>/<type>/<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. With `project_group_id`, creates a project group policy, which needs `project-groups:CreatePolicy` on `srn:project_group/<project_group_id>/policy`: its `Allow` statements may name only the project group's own resources (`srn:project_group/<project_group_id>/<type>/<id>`) and those of a project in it, else `400`; an `Allow` without `resource` grants a project group action on the project group and any other action on its projects, read when the policy is evaluated. Only the project group and its keys may carry it in `policy_ids`. Without a project or a project group, creates a global policy, which only the unrestricted admin may.
5578
5578
  */
5579
5579
  static createPolicy(options) {
5580
5580
  return (options.client ?? client).post({
@@ -5589,7 +5589,7 @@ var Policies = class {
5589
5589
  /**
5590
5590
  * Delete a policy
5591
5591
  *
5592
- * Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
5592
+ * Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
5593
5593
  */
5594
5594
  static deletePolicy(options) {
5595
5595
  return (options.client ?? client).delete({
@@ -5600,7 +5600,7 @@ var Policies = class {
5600
5600
  /**
5601
5601
  * Get a policy
5602
5602
  *
5603
- * Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; a published global one, `policies:GetPolicy` in a project or `project-groups:GetPolicy` in a project group. An unpublished global one is `404` to all but the unrestricted admin.
5603
+ * Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`; a published global one, `policies:GetPolicy` in a project or `project-groups:GetPolicy` in a project group. An unpublished global one is `404` to all but the unrestricted admin.
5604
5604
  */
5605
5605
  static getPolicy(options) {
5606
5606
  return (options.client ?? client).get({
@@ -5611,7 +5611,7 @@ var Policies = class {
5611
5611
  /**
5612
5612
  * Update a policy
5613
5613
  *
5614
- * Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a project group policy, `project-groups:UpdatePolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`, and its `Allow` statements stay within the project group; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. The project or project group never changes.
5614
+ * Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a project group policy, `project-groups:UpdatePolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`, and its `Allow` statements stay within the project group; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. The project or project group never changes.
5615
5615
  */
5616
5616
  static updatePolicy(options) {
5617
5617
  return (options.client ?? client).put({
@@ -5628,7 +5628,7 @@ var Policies = class {
5628
5628
  *
5629
5629
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5630
5630
  *
5631
- * Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. `project_group_id` lists that project group's policies instead, which needs `project-groups:ListPolicies` on `srn:project-group:<project_group_id>:policy*`. Without any, the unrestricted admin lists every policy, global, project and project group ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user. `scope=global` lists only the global policies: every one to the unrestricted admin, the published ones to any caller holding `policies:ListPolicies` in a project or `project-groups:ListPolicies` in a project group.
5631
+ * Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. `project_group_id` lists that project group's policies instead, which needs `project-groups:ListPolicies` on `srn:project_group/<project_group_id>/policy`. Without any, the unrestricted admin lists every policy, global, project and project group ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user. `scope=global` lists only the global policies: every one to the unrestricted admin, the published ones to any caller holding `policies:ListPolicies` in a project or `project-groups:ListPolicies` in a project group.
5632
5632
  *
5633
5633
  */
5634
5634
  static listAccountPolicies(options) {
@@ -5642,7 +5642,7 @@ var Policies = class {
5642
5642
  *
5643
5643
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5644
5644
  *
5645
- * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. With `project_group_id`, creates a project group policy, which needs `project-groups:CreatePolicy` on `srn:project-group:<project_group_id>:policy*`: its `Allow` statements may name only the project group's own resources (`srn:project-group:<project_group_id>:<type>/<id>`) and those of a project in it, else `400`; an `Allow` without `resource` grants a project group action on the project group and any other action on its projects, read when the policy is evaluated. Only the project group and its keys may carry it in `policy_ids`. Without a project or a project group, creates a global policy, which only the unrestricted admin may.
5645
+ * Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:project/<project_id>/<type>/<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. With `project_group_id`, creates a project group policy, which needs `project-groups:CreatePolicy` on `srn:project_group/<project_group_id>/policy`: its `Allow` statements may name only the project group's own resources (`srn:project_group/<project_group_id>/<type>/<id>`) and those of a project in it, else `400`; an `Allow` without `resource` grants a project group action on the project group and any other action on its projects, read when the policy is evaluated. Only the project group and its keys may carry it in `policy_ids`. Without a project or a project group, creates a global policy, which only the unrestricted admin may.
5646
5646
  */
5647
5647
  static createAccountPolicy(options) {
5648
5648
  return (options.client ?? client).post({
@@ -5659,7 +5659,7 @@ var Policies = class {
5659
5659
  *
5660
5660
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5661
5661
  *
5662
- * Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
5662
+ * Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
5663
5663
  */
5664
5664
  static deleteAccountPolicy(options) {
5665
5665
  return (options.client ?? client).delete({
@@ -5672,7 +5672,7 @@ var Policies = class {
5672
5672
  *
5673
5673
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5674
5674
  *
5675
- * Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; a published global one, `policies:GetPolicy` in a project or `project-groups:GetPolicy` in a project group. An unpublished global one is `404` to all but the unrestricted admin.
5675
+ * Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`; a published global one, `policies:GetPolicy` in a project or `project-groups:GetPolicy` in a project group. An unpublished global one is `404` to all but the unrestricted admin.
5676
5676
  */
5677
5677
  static getAccountPolicy(options) {
5678
5678
  return (options.client ?? client).get({
@@ -5685,7 +5685,7 @@ var Policies = class {
5685
5685
  *
5686
5686
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5687
5687
  *
5688
- * Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a project group policy, `project-groups:UpdatePolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`, and its `Allow` statements stay within the project group; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. The project or project group never changes.
5688
+ * Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a project group policy, `project-groups:UpdatePolicy` on `srn:project_group/<project_group_id>/policy/<policy_id>`, and its `Allow` statements stay within the project group; a global one, the unrestricted admin, and an unpublished one is `404` to anyone else. The project or project group never changes.
5689
5689
  */
5690
5690
  static updateAccountPolicy(options) {
5691
5691
  return (options.client ?? client).put({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.328.0",
3
+ "version": "0.329.0",
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.328.0",
41
+ "@naturali/api": "0.329.0",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",