@naturali/sdk 0.210.1 → 0.211.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 +4 -2
- package/dist/index.d.cts +14 -10
- package/dist/index.d.mts +14 -10
- package/dist/index.mjs +4 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1588,7 +1588,8 @@ var ApiKeys = class {
|
|
|
1588
1588
|
/**
|
|
1589
1589
|
* Create an API key
|
|
1590
1590
|
*
|
|
1591
|
-
* 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. `capabilities` narrows
|
|
1591
|
+
* 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. `capabilities` narrows the key to the operations whose capability it names; empty, the key reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed key. An unknown capability is `400`. The raw `key` (nat_sk_…) is returned only in this response.
|
|
1592
|
+
* A narrowed key may grant only a non-empty subset of its own set: a wider or empty set is `403`, on update too, and so is rotating a key wider than it.
|
|
1592
1593
|
* 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.
|
|
1593
1594
|
* 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.
|
|
1594
1595
|
*
|
|
@@ -1633,7 +1634,8 @@ var ApiKeys = class {
|
|
|
1633
1634
|
/**
|
|
1634
1635
|
* Update an API key
|
|
1635
1636
|
*
|
|
1636
|
-
* Rename an API key or replace its capability set. The scope (project vs account) is immutable.
|
|
1637
|
+
* Rename an API key or replace its capability set; the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own set (`403`).
|
|
1638
|
+
*
|
|
1637
1639
|
*/
|
|
1638
1640
|
static updateApiKey(options) {
|
|
1639
1641
|
return (options.client ?? client).patch({
|
package/dist/index.d.cts
CHANGED
|
@@ -2083,7 +2083,8 @@ type ApiKeyRecord = {
|
|
|
2083
2083
|
*/
|
|
2084
2084
|
project_id?: string | null;
|
|
2085
2085
|
/**
|
|
2086
|
-
*
|
|
2086
|
+
* The capabilities this key is narrowed to, each the one an operation needs (`<module>:<OperationId>`); a call outside them is `403`. Empty means the key reaches whatever its holder's membership reaches.
|
|
2087
|
+
*
|
|
2087
2088
|
*/
|
|
2088
2089
|
capabilities: Array<string>;
|
|
2089
2090
|
created_at: Date;
|
|
@@ -2108,7 +2109,8 @@ type ApiKeyCreate = {
|
|
|
2108
2109
|
*/
|
|
2109
2110
|
project_id?: string;
|
|
2110
2111
|
/**
|
|
2111
|
-
* Capabilities to
|
|
2112
|
+
* Capabilities to narrow the key to. Omit for none, or for the caller's own set when the caller is a narrowed key.
|
|
2113
|
+
*
|
|
2112
2114
|
*/
|
|
2113
2115
|
capabilities?: Array<string>;
|
|
2114
2116
|
};
|
|
@@ -2118,7 +2120,7 @@ type ApiKeyCreate = {
|
|
|
2118
2120
|
type ApiKeyUpdate = {
|
|
2119
2121
|
name?: string;
|
|
2120
2122
|
/**
|
|
2121
|
-
* Replace the capability set
|
|
2123
|
+
* Replace the capability set; an empty array removes the narrowing.
|
|
2122
2124
|
*/
|
|
2123
2125
|
capabilities?: Array<string>;
|
|
2124
2126
|
};
|
|
@@ -12744,7 +12746,7 @@ type CreateApiKeyErrors = {
|
|
|
12744
12746
|
*/
|
|
12745
12747
|
401: ErrorResponse;
|
|
12746
12748
|
/**
|
|
12747
|
-
* Authenticated, but not permitted to act on this key.
|
|
12749
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12748
12750
|
*/
|
|
12749
12751
|
403: ErrorResponse;
|
|
12750
12752
|
};
|
|
@@ -12773,7 +12775,7 @@ type DeleteApiKeyErrors = {
|
|
|
12773
12775
|
*/
|
|
12774
12776
|
401: ErrorResponse;
|
|
12775
12777
|
/**
|
|
12776
|
-
* Authenticated, but not permitted to act on this key.
|
|
12778
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12777
12779
|
*/
|
|
12778
12780
|
403: ErrorResponse;
|
|
12779
12781
|
/**
|
|
@@ -12806,7 +12808,7 @@ type GetApiKeyErrors = {
|
|
|
12806
12808
|
*/
|
|
12807
12809
|
401: ErrorResponse;
|
|
12808
12810
|
/**
|
|
12809
|
-
* Authenticated, but not permitted to act on this key.
|
|
12811
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12810
12812
|
*/
|
|
12811
12813
|
403: ErrorResponse;
|
|
12812
12814
|
/**
|
|
@@ -12843,7 +12845,7 @@ type UpdateApiKeyErrors = {
|
|
|
12843
12845
|
*/
|
|
12844
12846
|
401: ErrorResponse;
|
|
12845
12847
|
/**
|
|
12846
|
-
* Authenticated, but not permitted to act on this key.
|
|
12848
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12847
12849
|
*/
|
|
12848
12850
|
403: ErrorResponse;
|
|
12849
12851
|
/**
|
|
@@ -12876,7 +12878,7 @@ type RotateApiKeyErrors = {
|
|
|
12876
12878
|
*/
|
|
12877
12879
|
401: ErrorResponse;
|
|
12878
12880
|
/**
|
|
12879
|
-
* Authenticated, but not permitted to act on this key.
|
|
12881
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12880
12882
|
*/
|
|
12881
12883
|
403: ErrorResponse;
|
|
12882
12884
|
/**
|
|
@@ -33015,7 +33017,8 @@ export declare class ApiKeys {
|
|
|
33015
33017
|
/**
|
|
33016
33018
|
* Create an API key
|
|
33017
33019
|
*
|
|
33018
|
-
* 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. `capabilities` narrows
|
|
33020
|
+
* 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. `capabilities` narrows the key to the operations whose capability it names; empty, the key reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed key. An unknown capability is `400`. The raw `key` (nat_sk_…) is returned only in this response.
|
|
33021
|
+
* A narrowed key may grant only a non-empty subset of its own set: a wider or empty set is `403`, on update too, and so is rotating a key wider than it.
|
|
33019
33022
|
* 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.
|
|
33020
33023
|
* 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.
|
|
33021
33024
|
*
|
|
@@ -33036,7 +33039,8 @@ export declare class ApiKeys {
|
|
|
33036
33039
|
/**
|
|
33037
33040
|
* Update an API key
|
|
33038
33041
|
*
|
|
33039
|
-
* Rename an API key or replace its capability set. The scope (project vs account) is immutable.
|
|
33042
|
+
* Rename an API key or replace its capability set; the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own set (`403`).
|
|
33043
|
+
*
|
|
33040
33044
|
*/
|
|
33041
33045
|
static updateApiKey<ThrowOnError extends boolean = false>(options: Options<UpdateApiKeyData, ThrowOnError>): RequestResult<UpdateApiKeyResponses, UpdateApiKeyErrors, ThrowOnError>;
|
|
33042
33046
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -2083,7 +2083,8 @@ type ApiKeyRecord = {
|
|
|
2083
2083
|
*/
|
|
2084
2084
|
project_id?: string | null;
|
|
2085
2085
|
/**
|
|
2086
|
-
*
|
|
2086
|
+
* The capabilities this key is narrowed to, each the one an operation needs (`<module>:<OperationId>`); a call outside them is `403`. Empty means the key reaches whatever its holder's membership reaches.
|
|
2087
|
+
*
|
|
2087
2088
|
*/
|
|
2088
2089
|
capabilities: Array<string>;
|
|
2089
2090
|
created_at: Date;
|
|
@@ -2108,7 +2109,8 @@ type ApiKeyCreate = {
|
|
|
2108
2109
|
*/
|
|
2109
2110
|
project_id?: string;
|
|
2110
2111
|
/**
|
|
2111
|
-
* Capabilities to
|
|
2112
|
+
* Capabilities to narrow the key to. Omit for none, or for the caller's own set when the caller is a narrowed key.
|
|
2113
|
+
*
|
|
2112
2114
|
*/
|
|
2113
2115
|
capabilities?: Array<string>;
|
|
2114
2116
|
};
|
|
@@ -2118,7 +2120,7 @@ type ApiKeyCreate = {
|
|
|
2118
2120
|
type ApiKeyUpdate = {
|
|
2119
2121
|
name?: string;
|
|
2120
2122
|
/**
|
|
2121
|
-
* Replace the capability set
|
|
2123
|
+
* Replace the capability set; an empty array removes the narrowing.
|
|
2122
2124
|
*/
|
|
2123
2125
|
capabilities?: Array<string>;
|
|
2124
2126
|
};
|
|
@@ -12744,7 +12746,7 @@ type CreateApiKeyErrors = {
|
|
|
12744
12746
|
*/
|
|
12745
12747
|
401: ErrorResponse;
|
|
12746
12748
|
/**
|
|
12747
|
-
* Authenticated, but not permitted to act on this key.
|
|
12749
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12748
12750
|
*/
|
|
12749
12751
|
403: ErrorResponse;
|
|
12750
12752
|
};
|
|
@@ -12773,7 +12775,7 @@ type DeleteApiKeyErrors = {
|
|
|
12773
12775
|
*/
|
|
12774
12776
|
401: ErrorResponse;
|
|
12775
12777
|
/**
|
|
12776
|
-
* Authenticated, but not permitted to act on this key.
|
|
12778
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12777
12779
|
*/
|
|
12778
12780
|
403: ErrorResponse;
|
|
12779
12781
|
/**
|
|
@@ -12806,7 +12808,7 @@ type GetApiKeyErrors = {
|
|
|
12806
12808
|
*/
|
|
12807
12809
|
401: ErrorResponse;
|
|
12808
12810
|
/**
|
|
12809
|
-
* Authenticated, but not permitted to act on this key.
|
|
12811
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12810
12812
|
*/
|
|
12811
12813
|
403: ErrorResponse;
|
|
12812
12814
|
/**
|
|
@@ -12843,7 +12845,7 @@ type UpdateApiKeyErrors = {
|
|
|
12843
12845
|
*/
|
|
12844
12846
|
401: ErrorResponse;
|
|
12845
12847
|
/**
|
|
12846
|
-
* Authenticated, but not permitted to act on this key.
|
|
12848
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12847
12849
|
*/
|
|
12848
12850
|
403: ErrorResponse;
|
|
12849
12851
|
/**
|
|
@@ -12876,7 +12878,7 @@ type RotateApiKeyErrors = {
|
|
|
12876
12878
|
*/
|
|
12877
12879
|
401: ErrorResponse;
|
|
12878
12880
|
/**
|
|
12879
|
-
* Authenticated, but not permitted to act on this key.
|
|
12881
|
+
* Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
|
|
12880
12882
|
*/
|
|
12881
12883
|
403: ErrorResponse;
|
|
12882
12884
|
/**
|
|
@@ -33015,7 +33017,8 @@ export declare class ApiKeys {
|
|
|
33015
33017
|
/**
|
|
33016
33018
|
* Create an API key
|
|
33017
33019
|
*
|
|
33018
|
-
* 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. `capabilities` narrows
|
|
33020
|
+
* 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. `capabilities` narrows the key to the operations whose capability it names; empty, the key reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed key. An unknown capability is `400`. The raw `key` (nat_sk_…) is returned only in this response.
|
|
33021
|
+
* A narrowed key may grant only a non-empty subset of its own set: a wider or empty set is `403`, on update too, and so is rotating a key wider than it.
|
|
33019
33022
|
* 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.
|
|
33020
33023
|
* 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.
|
|
33021
33024
|
*
|
|
@@ -33036,7 +33039,8 @@ export declare class ApiKeys {
|
|
|
33036
33039
|
/**
|
|
33037
33040
|
* Update an API key
|
|
33038
33041
|
*
|
|
33039
|
-
* Rename an API key or replace its capability set. The scope (project vs account) is immutable.
|
|
33042
|
+
* Rename an API key or replace its capability set; the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own set (`403`).
|
|
33043
|
+
*
|
|
33040
33044
|
*/
|
|
33041
33045
|
static updateApiKey<ThrowOnError extends boolean = false>(options: Options<UpdateApiKeyData, ThrowOnError>): RequestResult<UpdateApiKeyResponses, UpdateApiKeyErrors, ThrowOnError>;
|
|
33042
33046
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1587,7 +1587,8 @@ var ApiKeys = class {
|
|
|
1587
1587
|
/**
|
|
1588
1588
|
* Create an API key
|
|
1589
1589
|
*
|
|
1590
|
-
* 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. `capabilities` narrows
|
|
1590
|
+
* 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. `capabilities` narrows the key to the operations whose capability it names; empty, the key reaches whatever its holder's membership reaches. Omitted, it is empty, or the caller's own set when the caller is a narrowed key. An unknown capability is `400`. The raw `key` (nat_sk_…) is returned only in this response.
|
|
1591
|
+
* A narrowed key may grant only a non-empty subset of its own set: a wider or empty set is `403`, on update too, and so is rotating a key wider than it.
|
|
1591
1592
|
* 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.
|
|
1592
1593
|
* 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.
|
|
1593
1594
|
*
|
|
@@ -1632,7 +1633,8 @@ var ApiKeys = class {
|
|
|
1632
1633
|
/**
|
|
1633
1634
|
* Update an API key
|
|
1634
1635
|
*
|
|
1635
|
-
* Rename an API key or replace its capability set. The scope (project vs account) is immutable.
|
|
1636
|
+
* Rename an API key or replace its capability set; the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own set (`403`).
|
|
1637
|
+
*
|
|
1636
1638
|
*/
|
|
1637
1639
|
static updateApiKey(options) {
|
|
1638
1640
|
return (options.client ?? client).patch({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.211.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.
|
|
41
|
+
"@naturali/api": "0.211.0",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|