@naturali/sdk 0.301.0 → 0.301.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 +5 -5
- package/dist/index.d.cts +21 -9
- package/dist/index.d.mts +21 -9
- package/dist/index.mjs +5 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5323,7 +5323,7 @@ var Policies = class {
|
|
|
5323
5323
|
/**
|
|
5324
5324
|
* List policies
|
|
5325
5325
|
*
|
|
5326
|
-
* Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without
|
|
5326
|
+
* 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.
|
|
5327
5327
|
*
|
|
5328
5328
|
*/
|
|
5329
5329
|
static listPolicies(options) {
|
|
@@ -5335,7 +5335,7 @@ var Policies = class {
|
|
|
5335
5335
|
/**
|
|
5336
5336
|
* Create a policy
|
|
5337
5337
|
*
|
|
5338
|
-
* 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. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
5338
|
+
* 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.
|
|
5339
5339
|
*/
|
|
5340
5340
|
static createPolicy(options) {
|
|
5341
5341
|
return (options.client ?? client).post({
|
|
@@ -5350,7 +5350,7 @@ var Policies = class {
|
|
|
5350
5350
|
/**
|
|
5351
5351
|
* Delete a policy
|
|
5352
5352
|
*
|
|
5353
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user or API key names it in its `policy_ids`.
|
|
5353
|
+
* 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. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
|
|
5354
5354
|
*/
|
|
5355
5355
|
static deletePolicy(options) {
|
|
5356
5356
|
return (options.client ?? client).delete({
|
|
@@ -5361,7 +5361,7 @@ var Policies = class {
|
|
|
5361
5361
|
/**
|
|
5362
5362
|
* Get a policy
|
|
5363
5363
|
*
|
|
5364
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
|
|
5364
|
+
* 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 global one, the unrestricted admin.
|
|
5365
5365
|
*/
|
|
5366
5366
|
static getPolicy(options) {
|
|
5367
5367
|
return (options.client ?? client).get({
|
|
@@ -5372,7 +5372,7 @@ var Policies = class {
|
|
|
5372
5372
|
/**
|
|
5373
5373
|
* Update a policy
|
|
5374
5374
|
*
|
|
5375
|
-
* Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
|
|
5375
|
+
* 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. The project or project group never changes.
|
|
5376
5376
|
*/
|
|
5377
5377
|
static updatePolicy(options) {
|
|
5378
5378
|
return (options.client ?? client).put({
|
package/dist/index.d.cts
CHANGED
|
@@ -6240,7 +6240,7 @@ type PolicyStatement = {
|
|
|
6240
6240
|
effect: 'Allow' | 'Deny';
|
|
6241
6241
|
action: Array<string>;
|
|
6242
6242
|
/**
|
|
6243
|
-
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else
|
|
6243
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); in a project group policy, the project group's own resources and those of its projects; anywhere else every resource.
|
|
6244
6244
|
*/
|
|
6245
6245
|
resource?: Array<string>;
|
|
6246
6246
|
/**
|
|
@@ -9261,9 +9261,13 @@ type PolicyRecord = {
|
|
|
9261
9261
|
*/
|
|
9262
9262
|
id?: string;
|
|
9263
9263
|
/**
|
|
9264
|
-
* The project the policy belongs to; `null` for a global policy.
|
|
9264
|
+
* The project the policy belongs to; `null` for a global or a project group policy.
|
|
9265
9265
|
*/
|
|
9266
9266
|
project_id?: string | null;
|
|
9267
|
+
/**
|
|
9268
|
+
* The project group the policy belongs to; `null` for a global or a project policy.
|
|
9269
|
+
*/
|
|
9270
|
+
project_group_id?: string | null;
|
|
9267
9271
|
name?: string | null;
|
|
9268
9272
|
description?: string | null;
|
|
9269
9273
|
document?: PolicyDocument;
|
|
@@ -32416,6 +32420,10 @@ type ListPoliciesData = {
|
|
|
32416
32420
|
project_id: string;
|
|
32417
32421
|
};
|
|
32418
32422
|
query?: {
|
|
32423
|
+
/**
|
|
32424
|
+
* List only this project group's policies (pgrp_...); never with `project_id` or `user_id`
|
|
32425
|
+
*/
|
|
32426
|
+
project_group_id?: string;
|
|
32419
32427
|
/**
|
|
32420
32428
|
* Return only policies attached to this user (user_...)
|
|
32421
32429
|
*/
|
|
@@ -32445,7 +32453,7 @@ type ListPoliciesErrors = {
|
|
|
32445
32453
|
*/
|
|
32446
32454
|
403: ErrorResponse;
|
|
32447
32455
|
/**
|
|
32448
|
-
* The project does not exist or the caller
|
|
32456
|
+
* The project group does not exist, or the caller may not read it
|
|
32449
32457
|
*/
|
|
32450
32458
|
404: ErrorResponse;
|
|
32451
32459
|
/**
|
|
@@ -32469,6 +32477,10 @@ type ListPoliciesResponses = {
|
|
|
32469
32477
|
type ListPoliciesResponse = ListPoliciesResponses[keyof ListPoliciesResponses];
|
|
32470
32478
|
type CreatePolicyData = {
|
|
32471
32479
|
body: {
|
|
32480
|
+
/**
|
|
32481
|
+
* The project group the policy belongs to (pgrp_...); never with `project_id`.
|
|
32482
|
+
*/
|
|
32483
|
+
project_group_id?: string;
|
|
32472
32484
|
name?: string;
|
|
32473
32485
|
description?: string;
|
|
32474
32486
|
document: PolicyDocument;
|
|
@@ -32496,7 +32508,7 @@ type CreatePolicyErrors = {
|
|
|
32496
32508
|
*/
|
|
32497
32509
|
403: ErrorResponse;
|
|
32498
32510
|
/**
|
|
32499
|
-
* The project does not exist or the caller
|
|
32511
|
+
* The project group does not exist, or the caller may not read it
|
|
32500
32512
|
*/
|
|
32501
32513
|
404: ErrorResponse;
|
|
32502
32514
|
/**
|
|
@@ -41782,32 +41794,32 @@ export declare class Policies {
|
|
|
41782
41794
|
/**
|
|
41783
41795
|
* List policies
|
|
41784
41796
|
*
|
|
41785
|
-
* Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without
|
|
41797
|
+
* 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.
|
|
41786
41798
|
*
|
|
41787
41799
|
*/
|
|
41788
41800
|
static listPolicies<ThrowOnError extends boolean = false>(options: Options<ListPoliciesData, ThrowOnError>): RequestResult<ListPoliciesResponses, ListPoliciesErrors, ThrowOnError>;
|
|
41789
41801
|
/**
|
|
41790
41802
|
* Create a policy
|
|
41791
41803
|
*
|
|
41792
|
-
* 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. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
41804
|
+
* 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.
|
|
41793
41805
|
*/
|
|
41794
41806
|
static createPolicy<ThrowOnError extends boolean = false>(options: Options<CreatePolicyData, ThrowOnError>): RequestResult<CreatePolicyResponses, CreatePolicyErrors, ThrowOnError>;
|
|
41795
41807
|
/**
|
|
41796
41808
|
* Delete a policy
|
|
41797
41809
|
*
|
|
41798
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user or API key names it in its `policy_ids`.
|
|
41810
|
+
* 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. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
|
|
41799
41811
|
*/
|
|
41800
41812
|
static deletePolicy<ThrowOnError extends boolean = false>(options: Options<DeletePolicyData, ThrowOnError>): RequestResult<DeletePolicyResponses, DeletePolicyErrors, ThrowOnError>;
|
|
41801
41813
|
/**
|
|
41802
41814
|
* Get a policy
|
|
41803
41815
|
*
|
|
41804
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
|
|
41816
|
+
* 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 global one, the unrestricted admin.
|
|
41805
41817
|
*/
|
|
41806
41818
|
static getPolicy<ThrowOnError extends boolean = false>(options: Options<GetPolicyData, ThrowOnError>): RequestResult<GetPolicyResponses, GetPolicyErrors, ThrowOnError>;
|
|
41807
41819
|
/**
|
|
41808
41820
|
* Update a policy
|
|
41809
41821
|
*
|
|
41810
|
-
* Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
|
|
41822
|
+
* 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. The project or project group never changes.
|
|
41811
41823
|
*/
|
|
41812
41824
|
static updatePolicy<ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>): RequestResult<UpdatePolicyResponses, UpdatePolicyErrors, ThrowOnError>;
|
|
41813
41825
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -6240,7 +6240,7 @@ type PolicyStatement = {
|
|
|
6240
6240
|
effect: 'Allow' | 'Deny';
|
|
6241
6241
|
action: Array<string>;
|
|
6242
6242
|
/**
|
|
6243
|
-
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else
|
|
6243
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); in a project group policy, the project group's own resources and those of its projects; anywhere else every resource.
|
|
6244
6244
|
*/
|
|
6245
6245
|
resource?: Array<string>;
|
|
6246
6246
|
/**
|
|
@@ -9261,9 +9261,13 @@ type PolicyRecord = {
|
|
|
9261
9261
|
*/
|
|
9262
9262
|
id?: string;
|
|
9263
9263
|
/**
|
|
9264
|
-
* The project the policy belongs to; `null` for a global policy.
|
|
9264
|
+
* The project the policy belongs to; `null` for a global or a project group policy.
|
|
9265
9265
|
*/
|
|
9266
9266
|
project_id?: string | null;
|
|
9267
|
+
/**
|
|
9268
|
+
* The project group the policy belongs to; `null` for a global or a project policy.
|
|
9269
|
+
*/
|
|
9270
|
+
project_group_id?: string | null;
|
|
9267
9271
|
name?: string | null;
|
|
9268
9272
|
description?: string | null;
|
|
9269
9273
|
document?: PolicyDocument;
|
|
@@ -32416,6 +32420,10 @@ type ListPoliciesData = {
|
|
|
32416
32420
|
project_id: string;
|
|
32417
32421
|
};
|
|
32418
32422
|
query?: {
|
|
32423
|
+
/**
|
|
32424
|
+
* List only this project group's policies (pgrp_...); never with `project_id` or `user_id`
|
|
32425
|
+
*/
|
|
32426
|
+
project_group_id?: string;
|
|
32419
32427
|
/**
|
|
32420
32428
|
* Return only policies attached to this user (user_...)
|
|
32421
32429
|
*/
|
|
@@ -32445,7 +32453,7 @@ type ListPoliciesErrors = {
|
|
|
32445
32453
|
*/
|
|
32446
32454
|
403: ErrorResponse;
|
|
32447
32455
|
/**
|
|
32448
|
-
* The project does not exist or the caller
|
|
32456
|
+
* The project group does not exist, or the caller may not read it
|
|
32449
32457
|
*/
|
|
32450
32458
|
404: ErrorResponse;
|
|
32451
32459
|
/**
|
|
@@ -32469,6 +32477,10 @@ type ListPoliciesResponses = {
|
|
|
32469
32477
|
type ListPoliciesResponse = ListPoliciesResponses[keyof ListPoliciesResponses];
|
|
32470
32478
|
type CreatePolicyData = {
|
|
32471
32479
|
body: {
|
|
32480
|
+
/**
|
|
32481
|
+
* The project group the policy belongs to (pgrp_...); never with `project_id`.
|
|
32482
|
+
*/
|
|
32483
|
+
project_group_id?: string;
|
|
32472
32484
|
name?: string;
|
|
32473
32485
|
description?: string;
|
|
32474
32486
|
document: PolicyDocument;
|
|
@@ -32496,7 +32508,7 @@ type CreatePolicyErrors = {
|
|
|
32496
32508
|
*/
|
|
32497
32509
|
403: ErrorResponse;
|
|
32498
32510
|
/**
|
|
32499
|
-
* The project does not exist or the caller
|
|
32511
|
+
* The project group does not exist, or the caller may not read it
|
|
32500
32512
|
*/
|
|
32501
32513
|
404: ErrorResponse;
|
|
32502
32514
|
/**
|
|
@@ -41782,32 +41794,32 @@ export declare class Policies {
|
|
|
41782
41794
|
/**
|
|
41783
41795
|
* List policies
|
|
41784
41796
|
*
|
|
41785
|
-
* Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without
|
|
41797
|
+
* 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.
|
|
41786
41798
|
*
|
|
41787
41799
|
*/
|
|
41788
41800
|
static listPolicies<ThrowOnError extends boolean = false>(options: Options<ListPoliciesData, ThrowOnError>): RequestResult<ListPoliciesResponses, ListPoliciesErrors, ThrowOnError>;
|
|
41789
41801
|
/**
|
|
41790
41802
|
* Create a policy
|
|
41791
41803
|
*
|
|
41792
|
-
* 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. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
41804
|
+
* 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.
|
|
41793
41805
|
*/
|
|
41794
41806
|
static createPolicy<ThrowOnError extends boolean = false>(options: Options<CreatePolicyData, ThrowOnError>): RequestResult<CreatePolicyResponses, CreatePolicyErrors, ThrowOnError>;
|
|
41795
41807
|
/**
|
|
41796
41808
|
* Delete a policy
|
|
41797
41809
|
*
|
|
41798
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user or API key names it in its `policy_ids`.
|
|
41810
|
+
* 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. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
|
|
41799
41811
|
*/
|
|
41800
41812
|
static deletePolicy<ThrowOnError extends boolean = false>(options: Options<DeletePolicyData, ThrowOnError>): RequestResult<DeletePolicyResponses, DeletePolicyErrors, ThrowOnError>;
|
|
41801
41813
|
/**
|
|
41802
41814
|
* Get a policy
|
|
41803
41815
|
*
|
|
41804
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
|
|
41816
|
+
* 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 global one, the unrestricted admin.
|
|
41805
41817
|
*/
|
|
41806
41818
|
static getPolicy<ThrowOnError extends boolean = false>(options: Options<GetPolicyData, ThrowOnError>): RequestResult<GetPolicyResponses, GetPolicyErrors, ThrowOnError>;
|
|
41807
41819
|
/**
|
|
41808
41820
|
* Update a policy
|
|
41809
41821
|
*
|
|
41810
|
-
* Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
|
|
41822
|
+
* 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. The project or project group never changes.
|
|
41811
41823
|
*/
|
|
41812
41824
|
static updatePolicy<ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>): RequestResult<UpdatePolicyResponses, UpdatePolicyErrors, ThrowOnError>;
|
|
41813
41825
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5322,7 +5322,7 @@ var Policies = class {
|
|
|
5322
5322
|
/**
|
|
5323
5323
|
* List policies
|
|
5324
5324
|
*
|
|
5325
|
-
* Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without
|
|
5325
|
+
* 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.
|
|
5326
5326
|
*
|
|
5327
5327
|
*/
|
|
5328
5328
|
static listPolicies(options) {
|
|
@@ -5334,7 +5334,7 @@ var Policies = class {
|
|
|
5334
5334
|
/**
|
|
5335
5335
|
* Create a policy
|
|
5336
5336
|
*
|
|
5337
|
-
* 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. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
5337
|
+
* 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.
|
|
5338
5338
|
*/
|
|
5339
5339
|
static createPolicy(options) {
|
|
5340
5340
|
return (options.client ?? client).post({
|
|
@@ -5349,7 +5349,7 @@ var Policies = class {
|
|
|
5349
5349
|
/**
|
|
5350
5350
|
* Delete a policy
|
|
5351
5351
|
*
|
|
5352
|
-
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user or API key names it in its `policy_ids`.
|
|
5352
|
+
* 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. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent, webhook, user, project group or API key names it in its `policy_ids`.
|
|
5353
5353
|
*/
|
|
5354
5354
|
static deletePolicy(options) {
|
|
5355
5355
|
return (options.client ?? client).delete({
|
|
@@ -5360,7 +5360,7 @@ var Policies = class {
|
|
|
5360
5360
|
/**
|
|
5361
5361
|
* Get a policy
|
|
5362
5362
|
*
|
|
5363
|
-
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
|
|
5363
|
+
* 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 global one, the unrestricted admin.
|
|
5364
5364
|
*/
|
|
5365
5365
|
static getPolicy(options) {
|
|
5366
5366
|
return (options.client ?? client).get({
|
|
@@ -5371,7 +5371,7 @@ var Policies = class {
|
|
|
5371
5371
|
/**
|
|
5372
5372
|
* Update a policy
|
|
5373
5373
|
*
|
|
5374
|
-
* Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
|
|
5374
|
+
* 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. The project or project group never changes.
|
|
5375
5375
|
*/
|
|
5376
5376
|
static updatePolicy(options) {
|
|
5377
5377
|
return (options.client ?? client).put({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.301.
|
|
3
|
+
"version": "0.301.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.301.
|
|
41
|
+
"@naturali/api": "0.301.1",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|