@naturali/sdk 0.304.0 → 0.305.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 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. `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
+ * 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.
5327
5327
  *
5328
5328
  */
5329
5329
  static listPolicies(options) {
@@ -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 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
+ * 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`.
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 project group policy, `project-groups:GetPolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; 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 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.
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 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
+ * 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.
5376
5376
  */
5377
5377
  static updatePolicy(options) {
5378
5378
  return (options.client ?? client).put({
@@ -5389,7 +5389,7 @@ var Policies = class {
5389
5389
  *
5390
5390
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5391
5391
  *
5392
- * 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.
5392
+ * 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.
5393
5393
  *
5394
5394
  */
5395
5395
  static listAccountPolicies(options) {
@@ -5420,7 +5420,7 @@ var Policies = class {
5420
5420
  *
5421
5421
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5422
5422
  *
5423
- * 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`.
5423
+ * 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`.
5424
5424
  */
5425
5425
  static deleteAccountPolicy(options) {
5426
5426
  return (options.client ?? client).delete({
@@ -5433,7 +5433,7 @@ var Policies = class {
5433
5433
  *
5434
5434
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5435
5435
  *
5436
- * 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.
5436
+ * 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.
5437
5437
  */
5438
5438
  static getAccountPolicy(options) {
5439
5439
  return (options.client ?? client).get({
@@ -5446,7 +5446,7 @@ var Policies = class {
5446
5446
  *
5447
5447
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5448
5448
  *
5449
- * 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.
5449
+ * 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.
5450
5450
  */
5451
5451
  static updateAccountPolicy(options) {
5452
5452
  return (options.client ?? client).put({
package/dist/index.d.cts CHANGED
@@ -9254,6 +9254,10 @@ type PolicyRecord = {
9254
9254
  name?: string | null;
9255
9255
  description?: string | null;
9256
9256
  document?: PolicyDocument;
9257
+ /**
9258
+ * Whether every tenant credential may read this global policy; always `false` on a project or project group policy.
9259
+ */
9260
+ published?: boolean;
9257
9261
  created_at?: Date;
9258
9262
  updated_at?: Date;
9259
9263
  };
@@ -32411,6 +32415,10 @@ type ListPoliciesData = {
32411
32415
  * Return only policies attached to this user (user_...)
32412
32416
  */
32413
32417
  user_id?: string;
32418
+ /**
32419
+ * `global` lists only the global policies (no `project_id` and no `project_group_id`); never with `project_id`, `project_group_id` or `user_id`
32420
+ */
32421
+ scope?: 'global';
32414
32422
  /**
32415
32423
  * Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
32416
32424
  */
@@ -32432,7 +32440,7 @@ type ListPoliciesErrors = {
32432
32440
  */
32433
32441
  401: ErrorResponse;
32434
32442
  /**
32435
- * Forbidden: the caller may not list policies in the project, or lists global policies without being the unrestricted admin
32443
+ * Forbidden: the caller may not list policies in the project, lists every policy without being the unrestricted admin, or lists the global ones holding the policy list nowhere
32436
32444
  */
32437
32445
  403: ErrorResponse;
32438
32446
  /**
@@ -32467,6 +32475,10 @@ type CreatePolicyData = {
32467
32475
  name?: string;
32468
32476
  description?: string;
32469
32477
  document: PolicyDocument;
32478
+ /**
32479
+ * Defaults to `false`. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32480
+ */
32481
+ published?: boolean;
32470
32482
  };
32471
32483
  path: {
32472
32484
  /**
@@ -32638,6 +32650,10 @@ type UpdatePolicyData = {
32638
32650
  name?: string;
32639
32651
  description?: string;
32640
32652
  document: PolicyDocument;
32653
+ /**
32654
+ * Unchanged when omitted. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32655
+ */
32656
+ published?: boolean;
32641
32657
  };
32642
32658
  path: {
32643
32659
  /**
@@ -32706,6 +32722,10 @@ type ListAccountPoliciesData = {
32706
32722
  * Return only policies attached to this user (user_...)
32707
32723
  */
32708
32724
  user_id?: string;
32725
+ /**
32726
+ * `global` lists only the global policies (no `project_id` and no `project_group_id`); never with `project_id`, `project_group_id` or `user_id`
32727
+ */
32728
+ scope?: 'global';
32709
32729
  /**
32710
32730
  * Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
32711
32731
  */
@@ -32727,7 +32747,7 @@ type ListAccountPoliciesErrors = {
32727
32747
  */
32728
32748
  401: ErrorResponse;
32729
32749
  /**
32730
- * Forbidden: the caller may not list policies in the project, or lists global policies without being the unrestricted admin
32750
+ * Forbidden: the caller may not list policies in the project, lists every policy without being the unrestricted admin, or lists the global ones holding the policy list nowhere
32731
32751
  */
32732
32752
  403: ErrorResponse;
32733
32753
  /**
@@ -32758,6 +32778,10 @@ type CreateAccountPolicyData = {
32758
32778
  name?: string;
32759
32779
  description?: string;
32760
32780
  document: PolicyDocument;
32781
+ /**
32782
+ * Defaults to `false`. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32783
+ */
32784
+ published?: boolean;
32761
32785
  };
32762
32786
  path?: never;
32763
32787
  query?: never;
@@ -32916,6 +32940,10 @@ type UpdateAccountPolicyData = {
32916
32940
  name?: string;
32917
32941
  description?: string;
32918
32942
  document: PolicyDocument;
32943
+ /**
32944
+ * Unchanged when omitted. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32945
+ */
32946
+ published?: boolean;
32919
32947
  };
32920
32948
  path: {
32921
32949
  /**
@@ -42051,7 +42079,7 @@ export declare class Policies {
42051
42079
  /**
42052
42080
  * List policies
42053
42081
  *
42054
- * 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.
42082
+ * 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.
42055
42083
  *
42056
42084
  */
42057
42085
  static listPolicies<ThrowOnError extends boolean = false>(options: Options<ListPoliciesData, ThrowOnError>): RequestResult<ListPoliciesResponses, ListPoliciesErrors, ThrowOnError>;
@@ -42064,19 +42092,19 @@ export declare class Policies {
42064
42092
  /**
42065
42093
  * Delete a policy
42066
42094
  *
42067
- * 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`.
42095
+ * 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`.
42068
42096
  */
42069
42097
  static deletePolicy<ThrowOnError extends boolean = false>(options: Options<DeletePolicyData, ThrowOnError>): RequestResult<DeletePolicyResponses, DeletePolicyErrors, ThrowOnError>;
42070
42098
  /**
42071
42099
  * Get a policy
42072
42100
  *
42073
- * 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.
42101
+ * 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.
42074
42102
  */
42075
42103
  static getPolicy<ThrowOnError extends boolean = false>(options: Options<GetPolicyData, ThrowOnError>): RequestResult<GetPolicyResponses, GetPolicyErrors, ThrowOnError>;
42076
42104
  /**
42077
42105
  * Update a policy
42078
42106
  *
42079
- * 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.
42107
+ * 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.
42080
42108
  */
42081
42109
  static updatePolicy<ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>): RequestResult<UpdatePolicyResponses, UpdatePolicyErrors, ThrowOnError>;
42082
42110
  /**
@@ -42084,7 +42112,7 @@ export declare class Policies {
42084
42112
  *
42085
42113
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42086
42114
  *
42087
- * 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.
42115
+ * 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.
42088
42116
  *
42089
42117
  */
42090
42118
  static listAccountPolicies<ThrowOnError extends boolean = false>(options?: Options<ListAccountPoliciesData, ThrowOnError>): RequestResult<ListAccountPoliciesResponses, ListAccountPoliciesErrors, ThrowOnError>;
@@ -42101,7 +42129,7 @@ export declare class Policies {
42101
42129
  *
42102
42130
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42103
42131
  *
42104
- * 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`.
42132
+ * 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`.
42105
42133
  */
42106
42134
  static deleteAccountPolicy<ThrowOnError extends boolean = false>(options: Options<DeleteAccountPolicyData, ThrowOnError>): RequestResult<DeleteAccountPolicyResponses, DeleteAccountPolicyErrors, ThrowOnError>;
42107
42135
  /**
@@ -42109,7 +42137,7 @@ export declare class Policies {
42109
42137
  *
42110
42138
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42111
42139
  *
42112
- * 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.
42140
+ * 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.
42113
42141
  */
42114
42142
  static getAccountPolicy<ThrowOnError extends boolean = false>(options: Options<GetAccountPolicyData, ThrowOnError>): RequestResult<GetAccountPolicyResponses, GetAccountPolicyErrors, ThrowOnError>;
42115
42143
  /**
@@ -42117,7 +42145,7 @@ export declare class Policies {
42117
42145
  *
42118
42146
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42119
42147
  *
42120
- * 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.
42148
+ * 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.
42121
42149
  */
42122
42150
  static updateAccountPolicy<ThrowOnError extends boolean = false>(options: Options<UpdateAccountPolicyData, ThrowOnError>): RequestResult<UpdateAccountPolicyResponses, UpdateAccountPolicyErrors, ThrowOnError>;
42123
42151
  }
package/dist/index.d.mts CHANGED
@@ -9254,6 +9254,10 @@ type PolicyRecord = {
9254
9254
  name?: string | null;
9255
9255
  description?: string | null;
9256
9256
  document?: PolicyDocument;
9257
+ /**
9258
+ * Whether every tenant credential may read this global policy; always `false` on a project or project group policy.
9259
+ */
9260
+ published?: boolean;
9257
9261
  created_at?: Date;
9258
9262
  updated_at?: Date;
9259
9263
  };
@@ -32411,6 +32415,10 @@ type ListPoliciesData = {
32411
32415
  * Return only policies attached to this user (user_...)
32412
32416
  */
32413
32417
  user_id?: string;
32418
+ /**
32419
+ * `global` lists only the global policies (no `project_id` and no `project_group_id`); never with `project_id`, `project_group_id` or `user_id`
32420
+ */
32421
+ scope?: 'global';
32414
32422
  /**
32415
32423
  * Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
32416
32424
  */
@@ -32432,7 +32440,7 @@ type ListPoliciesErrors = {
32432
32440
  */
32433
32441
  401: ErrorResponse;
32434
32442
  /**
32435
- * Forbidden: the caller may not list policies in the project, or lists global policies without being the unrestricted admin
32443
+ * Forbidden: the caller may not list policies in the project, lists every policy without being the unrestricted admin, or lists the global ones holding the policy list nowhere
32436
32444
  */
32437
32445
  403: ErrorResponse;
32438
32446
  /**
@@ -32467,6 +32475,10 @@ type CreatePolicyData = {
32467
32475
  name?: string;
32468
32476
  description?: string;
32469
32477
  document: PolicyDocument;
32478
+ /**
32479
+ * Defaults to `false`. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32480
+ */
32481
+ published?: boolean;
32470
32482
  };
32471
32483
  path: {
32472
32484
  /**
@@ -32638,6 +32650,10 @@ type UpdatePolicyData = {
32638
32650
  name?: string;
32639
32651
  description?: string;
32640
32652
  document: PolicyDocument;
32653
+ /**
32654
+ * Unchanged when omitted. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32655
+ */
32656
+ published?: boolean;
32641
32657
  };
32642
32658
  path: {
32643
32659
  /**
@@ -32706,6 +32722,10 @@ type ListAccountPoliciesData = {
32706
32722
  * Return only policies attached to this user (user_...)
32707
32723
  */
32708
32724
  user_id?: string;
32725
+ /**
32726
+ * `global` lists only the global policies (no `project_id` and no `project_group_id`); never with `project_id`, `project_group_id` or `user_id`
32727
+ */
32728
+ scope?: 'global';
32709
32729
  /**
32710
32730
  * Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
32711
32731
  */
@@ -32727,7 +32747,7 @@ type ListAccountPoliciesErrors = {
32727
32747
  */
32728
32748
  401: ErrorResponse;
32729
32749
  /**
32730
- * Forbidden: the caller may not list policies in the project, or lists global policies without being the unrestricted admin
32750
+ * Forbidden: the caller may not list policies in the project, lists every policy without being the unrestricted admin, or lists the global ones holding the policy list nowhere
32731
32751
  */
32732
32752
  403: ErrorResponse;
32733
32753
  /**
@@ -32758,6 +32778,10 @@ type CreateAccountPolicyData = {
32758
32778
  name?: string;
32759
32779
  description?: string;
32760
32780
  document: PolicyDocument;
32781
+ /**
32782
+ * Defaults to `false`. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32783
+ */
32784
+ published?: boolean;
32761
32785
  };
32762
32786
  path?: never;
32763
32787
  query?: never;
@@ -32916,6 +32940,10 @@ type UpdateAccountPolicyData = {
32916
32940
  name?: string;
32917
32941
  description?: string;
32918
32942
  document: PolicyDocument;
32943
+ /**
32944
+ * Unchanged when omitted. Whether every tenant credential may read this global policy; set only by the unrestricted admin, on a global policy only (`400` otherwise).
32945
+ */
32946
+ published?: boolean;
32919
32947
  };
32920
32948
  path: {
32921
32949
  /**
@@ -42051,7 +42079,7 @@ export declare class Policies {
42051
42079
  /**
42052
42080
  * List policies
42053
42081
  *
42054
- * 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.
42082
+ * 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.
42055
42083
  *
42056
42084
  */
42057
42085
  static listPolicies<ThrowOnError extends boolean = false>(options: Options<ListPoliciesData, ThrowOnError>): RequestResult<ListPoliciesResponses, ListPoliciesErrors, ThrowOnError>;
@@ -42064,19 +42092,19 @@ export declare class Policies {
42064
42092
  /**
42065
42093
  * Delete a policy
42066
42094
  *
42067
- * 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`.
42095
+ * 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`.
42068
42096
  */
42069
42097
  static deletePolicy<ThrowOnError extends boolean = false>(options: Options<DeletePolicyData, ThrowOnError>): RequestResult<DeletePolicyResponses, DeletePolicyErrors, ThrowOnError>;
42070
42098
  /**
42071
42099
  * Get a policy
42072
42100
  *
42073
- * 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.
42101
+ * 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.
42074
42102
  */
42075
42103
  static getPolicy<ThrowOnError extends boolean = false>(options: Options<GetPolicyData, ThrowOnError>): RequestResult<GetPolicyResponses, GetPolicyErrors, ThrowOnError>;
42076
42104
  /**
42077
42105
  * Update a policy
42078
42106
  *
42079
- * 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.
42107
+ * 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.
42080
42108
  */
42081
42109
  static updatePolicy<ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>): RequestResult<UpdatePolicyResponses, UpdatePolicyErrors, ThrowOnError>;
42082
42110
  /**
@@ -42084,7 +42112,7 @@ export declare class Policies {
42084
42112
  *
42085
42113
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42086
42114
  *
42087
- * 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.
42115
+ * 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.
42088
42116
  *
42089
42117
  */
42090
42118
  static listAccountPolicies<ThrowOnError extends boolean = false>(options?: Options<ListAccountPoliciesData, ThrowOnError>): RequestResult<ListAccountPoliciesResponses, ListAccountPoliciesErrors, ThrowOnError>;
@@ -42101,7 +42129,7 @@ export declare class Policies {
42101
42129
  *
42102
42130
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42103
42131
  *
42104
- * 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`.
42132
+ * 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`.
42105
42133
  */
42106
42134
  static deleteAccountPolicy<ThrowOnError extends boolean = false>(options: Options<DeleteAccountPolicyData, ThrowOnError>): RequestResult<DeleteAccountPolicyResponses, DeleteAccountPolicyErrors, ThrowOnError>;
42107
42135
  /**
@@ -42109,7 +42137,7 @@ export declare class Policies {
42109
42137
  *
42110
42138
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42111
42139
  *
42112
- * 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.
42140
+ * 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.
42113
42141
  */
42114
42142
  static getAccountPolicy<ThrowOnError extends boolean = false>(options: Options<GetAccountPolicyData, ThrowOnError>): RequestResult<GetAccountPolicyResponses, GetAccountPolicyErrors, ThrowOnError>;
42115
42143
  /**
@@ -42117,7 +42145,7 @@ export declare class Policies {
42117
42145
  *
42118
42146
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
42119
42147
  *
42120
- * 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.
42148
+ * 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.
42121
42149
  */
42122
42150
  static updateAccountPolicy<ThrowOnError extends boolean = false>(options: Options<UpdateAccountPolicyData, ThrowOnError>): RequestResult<UpdateAccountPolicyResponses, UpdateAccountPolicyErrors, ThrowOnError>;
42123
42151
  }
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. `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.
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. `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.
5326
5326
  *
5327
5327
  */
5328
5328
  static listPolicies(options) {
@@ -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 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`.
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, 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`.
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 project group policy, `project-groups:GetPolicy` on `srn:project-group:<project_group_id>:policy/<policy_id>`; 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 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.
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 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.
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, and an unpublished one is `404` to anyone else. The project or project group never changes.
5375
5375
  */
5376
5376
  static updatePolicy(options) {
5377
5377
  return (options.client ?? client).put({
@@ -5388,7 +5388,7 @@ var Policies = class {
5388
5388
  *
5389
5389
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5390
5390
  *
5391
- * 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.
5391
+ * 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.
5392
5392
  *
5393
5393
  */
5394
5394
  static listAccountPolicies(options) {
@@ -5419,7 +5419,7 @@ var Policies = class {
5419
5419
  *
5420
5420
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5421
5421
  *
5422
- * 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`.
5422
+ * 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`.
5423
5423
  */
5424
5424
  static deleteAccountPolicy(options) {
5425
5425
  return (options.client ?? client).delete({
@@ -5432,7 +5432,7 @@ var Policies = class {
5432
5432
  *
5433
5433
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5434
5434
  *
5435
- * 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.
5435
+ * 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.
5436
5436
  */
5437
5437
  static getAccountPolicy(options) {
5438
5438
  return (options.client ?? client).get({
@@ -5445,7 +5445,7 @@ var Policies = class {
5445
5445
  *
5446
5446
  * Acts on the caller's account: the account's project group is the one addressed, never named in the request.
5447
5447
  *
5448
- * 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.
5448
+ * 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.
5449
5449
  */
5450
5450
  static updateAccountPolicy(options) {
5451
5451
  return (options.client ?? client).put({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.304.0",
3
+ "version": "0.305.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.304.0",
41
+ "@naturali/api": "0.305.0",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",