@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.cjs +13 -13
- package/dist/index.d.cts +222 -417
- package/dist/index.d.mts +222 -417
- package/dist/index.mjs +13 -13
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1806,7 +1806,7 @@ var ApiKeys = class {
|
|
|
1806
1806
|
*
|
|
1807
1807
|
* 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.
|
|
1808
1808
|
* 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.
|
|
1809
|
-
* 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
|
|
1809
|
+
* 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.
|
|
1810
1810
|
* 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.
|
|
1811
1811
|
* 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.
|
|
1812
1812
|
* 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.
|
|
@@ -2102,7 +2102,7 @@ var AuditLog = class {
|
|
|
2102
2102
|
/**
|
|
2103
2103
|
* List audit entries
|
|
2104
2104
|
*
|
|
2105
|
-
* Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a
|
|
2105
|
+
* 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.
|
|
2106
2106
|
*/
|
|
2107
2107
|
static listAuditEntries(options) {
|
|
2108
2108
|
return (options.client ?? client).get({
|
|
@@ -3152,7 +3152,7 @@ var Evaluations = class {
|
|
|
3152
3152
|
*
|
|
3153
3153
|
* 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.
|
|
3154
3154
|
*
|
|
3155
|
-
* Requires both `evaluations:
|
|
3155
|
+
* 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.
|
|
3156
3156
|
*
|
|
3157
3157
|
* 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`.
|
|
3158
3158
|
*/
|
|
@@ -5563,7 +5563,7 @@ var Policies = class {
|
|
|
5563
5563
|
/**
|
|
5564
5564
|
* List policies
|
|
5565
5565
|
*
|
|
5566
|
-
* 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:
|
|
5566
|
+
* 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.
|
|
5567
5567
|
*
|
|
5568
5568
|
*/
|
|
5569
5569
|
static listPolicies(options) {
|
|
@@ -5575,7 +5575,7 @@ var Policies = class {
|
|
|
5575
5575
|
/**
|
|
5576
5576
|
* Create a policy
|
|
5577
5577
|
*
|
|
5578
|
-
* 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
|
|
5578
|
+
* 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.
|
|
5579
5579
|
*/
|
|
5580
5580
|
static createPolicy(options) {
|
|
5581
5581
|
return (options.client ?? client).post({
|
|
@@ -5590,7 +5590,7 @@ var Policies = class {
|
|
|
5590
5590
|
/**
|
|
5591
5591
|
* Delete a policy
|
|
5592
5592
|
*
|
|
5593
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:
|
|
5593
|
+
* 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`.
|
|
5594
5594
|
*/
|
|
5595
5595
|
static deletePolicy(options) {
|
|
5596
5596
|
return (options.client ?? client).delete({
|
|
@@ -5601,7 +5601,7 @@ var Policies = class {
|
|
|
5601
5601
|
/**
|
|
5602
5602
|
* Get a policy
|
|
5603
5603
|
*
|
|
5604
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:
|
|
5604
|
+
* 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.
|
|
5605
5605
|
*/
|
|
5606
5606
|
static getPolicy(options) {
|
|
5607
5607
|
return (options.client ?? client).get({
|
|
@@ -5612,7 +5612,7 @@ var Policies = class {
|
|
|
5612
5612
|
/**
|
|
5613
5613
|
* Update a policy
|
|
5614
5614
|
*
|
|
5615
|
-
* 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:
|
|
5615
|
+
* 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.
|
|
5616
5616
|
*/
|
|
5617
5617
|
static updatePolicy(options) {
|
|
5618
5618
|
return (options.client ?? client).put({
|
|
@@ -5629,7 +5629,7 @@ var Policies = class {
|
|
|
5629
5629
|
*
|
|
5630
5630
|
* Acts on the caller's account: the account's project group is the one addressed, never named in the request.
|
|
5631
5631
|
*
|
|
5632
|
-
* 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:
|
|
5632
|
+
* 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.
|
|
5633
5633
|
*
|
|
5634
5634
|
*/
|
|
5635
5635
|
static listAccountPolicies(options) {
|
|
@@ -5643,7 +5643,7 @@ var Policies = class {
|
|
|
5643
5643
|
*
|
|
5644
5644
|
* Acts on the caller's account: the account's project group is the one addressed, never named in the request.
|
|
5645
5645
|
*
|
|
5646
|
-
* 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
|
|
5646
|
+
* 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.
|
|
5647
5647
|
*/
|
|
5648
5648
|
static createAccountPolicy(options) {
|
|
5649
5649
|
return (options.client ?? client).post({
|
|
@@ -5660,7 +5660,7 @@ var Policies = class {
|
|
|
5660
5660
|
*
|
|
5661
5661
|
* Acts on the caller's account: the account's project group is the one addressed, never named in the request.
|
|
5662
5662
|
*
|
|
5663
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a project group policy, `project-groups:DeletePolicy` on `srn:
|
|
5663
|
+
* 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`.
|
|
5664
5664
|
*/
|
|
5665
5665
|
static deleteAccountPolicy(options) {
|
|
5666
5666
|
return (options.client ?? client).delete({
|
|
@@ -5673,7 +5673,7 @@ var Policies = class {
|
|
|
5673
5673
|
*
|
|
5674
5674
|
* Acts on the caller's account: the account's project group is the one addressed, never named in the request.
|
|
5675
5675
|
*
|
|
5676
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a project group policy, `project-groups:GetPolicy` on `srn:
|
|
5676
|
+
* 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.
|
|
5677
5677
|
*/
|
|
5678
5678
|
static getAccountPolicy(options) {
|
|
5679
5679
|
return (options.client ?? client).get({
|
|
@@ -5686,7 +5686,7 @@ var Policies = class {
|
|
|
5686
5686
|
*
|
|
5687
5687
|
* Acts on the caller's account: the account's project group is the one addressed, never named in the request.
|
|
5688
5688
|
*
|
|
5689
|
-
* 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:
|
|
5689
|
+
* 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.
|
|
5690
5690
|
*/
|
|
5691
5691
|
static updateAccountPolicy(options) {
|
|
5692
5692
|
return (options.client ?? client).put({
|