@naturali/cli 0.110.1 → 0.111.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.mjs +17 -7
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.111.1";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1072,6 +1072,7 @@ var Admin = class {
|
|
|
1072
1072
|
* Puts the account on a rung of the infra ladder. Needs the `admin` role.
|
|
1073
1073
|
* `PUT` because an account is on exactly one rung at a time, but the change is **recorded rather than overwritten**: the plan history is append-only and the newest line is the account's plan. Setting the rung it already holds still writes a line — a re-confirmation is an act worth a record, and the `reason` given with it would otherwise have nowhere to go. Read the history back with `GET` on this path.
|
|
1074
1074
|
* The rung is what the feature gate and the resource caps resolve against. Downgrading is the same call with a lower rung; what becomes of resources a lower plan would not hold is a separate mechanism that is not built.
|
|
1075
|
+
* A rung whose content-retention window a contract sets — `enterprise` — **requires `retention_days`**, since nothing else can answer what that window is and an unanswered one bounds nothing. Every other rung sets its own and refuses the field.
|
|
1075
1076
|
*
|
|
1076
1077
|
*/
|
|
1077
1078
|
static grantUserPlan(options) {
|
|
@@ -1451,6 +1452,7 @@ var ApiKeys = class {
|
|
|
1451
1452
|
*
|
|
1452
1453
|
* 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 what the key may do; when omitted the key inherits the creator's capabilities. The raw `key` (nat_sk_…) is returned only in this response.
|
|
1453
1454
|
* A project-scoped key requires the `admin` role in that project: the key is a standing credential for everything the project can do, so handing one out is an administrative act rather than something a read-only `member` can do for themselves. An account-scoped key requires a credential that is not itself confined to one project.
|
|
1455
|
+
* 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.
|
|
1454
1456
|
*
|
|
1455
1457
|
*/
|
|
1456
1458
|
static createApiKey(options) {
|
|
@@ -1504,6 +1506,7 @@ var ApiKeys = class {
|
|
|
1504
1506
|
* Rotate an API key
|
|
1505
1507
|
*
|
|
1506
1508
|
* Issues a new secret for the same key record (same id, scope and capabilities) and invalidates the previous secret. The new raw `key` is returned only in this response.
|
|
1509
|
+
* Refused for a connected app, like creation: rotation returns a raw secret for a key the caller need never have held, so it reaches the same place by another door.
|
|
1507
1510
|
*
|
|
1508
1511
|
*/
|
|
1509
1512
|
static rotateApiKey(options) {
|
|
@@ -4253,9 +4256,9 @@ var Users = class {
|
|
|
4253
4256
|
/**
|
|
4254
4257
|
* Get the current account's billing standing
|
|
4255
4258
|
*
|
|
4256
|
-
* The plan the account is on and the credit it has left — the
|
|
4259
|
+
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4257
4260
|
*
|
|
4258
|
-
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`.
|
|
4261
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
4259
4262
|
*
|
|
4260
4263
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
4261
4264
|
*
|
|
@@ -5733,7 +5736,7 @@ const routes = {
|
|
|
5733
5736
|
"grant-user-plan": {
|
|
5734
5737
|
serviceClass: "Admin",
|
|
5735
5738
|
operationId: "grantUserPlan",
|
|
5736
|
-
description: "Puts the account on a rung of the infra ladder. Needs the `admin` role. `PUT` because an account is on exactly one rung at a time, but the change is **recorded rather than overwritten**: the plan history is append-only and the newest line is the account's plan. Setting the rung it already holds still writes a line — a re-confirmation is an act worth a record, and the `reason` given with it would otherwise have nowhere to go. Read the history back with `GET` on this path. The rung is what the feature gate and the resource caps resolve against. Downgrading is the same call with a lower rung; what becomes of resources a lower plan would not hold is a separate mechanism that is not built.",
|
|
5739
|
+
description: "Puts the account on a rung of the infra ladder. Needs the `admin` role. `PUT` because an account is on exactly one rung at a time, but the change is **recorded rather than overwritten**: the plan history is append-only and the newest line is the account's plan. Setting the rung it already holds still writes a line — a re-confirmation is an act worth a record, and the `reason` given with it would otherwise have nowhere to go. Read the history back with `GET` on this path. The rung is what the feature gate and the resource caps resolve against. Downgrading is the same call with a lower rung; what becomes of resources a lower plan would not hold is a separate mechanism that is not built. A rung whose content-retention window a contract sets — `enterprise` — **requires `retention_days`**, since nothing else can answer what that window is and an unanswered one bounds nothing. Every other rung sets its own and refuses the field.",
|
|
5737
5740
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/admin",
|
|
5738
5741
|
httpMethod: "put",
|
|
5739
5742
|
pathParams: ["user_id"],
|
|
@@ -5753,6 +5756,13 @@ const routes = {
|
|
|
5753
5756
|
"type": "string",
|
|
5754
5757
|
"in": "body"
|
|
5755
5758
|
},
|
|
5759
|
+
{
|
|
5760
|
+
"name": "retention_days",
|
|
5761
|
+
"description": "The content-retention window the contract negotiated, in days. **Required on `enterprise`**, whose window the pricing table leaves to a contract: without one nothing bounds what the account's projects store, so it is refused rather than defaulted. Send `null` for a contract that keeps content indefinitely — that is a decision the field records, not the absence of one. **Refused on every other rung**, whose window the plan itself sets.",
|
|
5762
|
+
"required": false,
|
|
5763
|
+
"type": "integer",
|
|
5764
|
+
"in": "body"
|
|
5765
|
+
},
|
|
5756
5766
|
{
|
|
5757
5767
|
"name": "reason",
|
|
5758
5768
|
"description": "Why the account was moved. Recorded on the line and never edited, so it is the only account of intent the history carries.",
|
|
@@ -7116,7 +7126,7 @@ const routes = {
|
|
|
7116
7126
|
"create-api-key": {
|
|
7117
7127
|
serviceClass: "APIKeys",
|
|
7118
7128
|
operationId: "createApiKey",
|
|
7119
|
-
description: "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 what the key may do; when omitted the key inherits the creator's capabilities. The raw `key` (nat_sk_…) is returned only in this response. A project-scoped key requires the `admin` role in that project: the key is a standing credential for everything the project can do, so handing one out is an administrative act rather than something a read-only `member` can do for themselves. An account-scoped key requires a credential that is not itself confined to one project.",
|
|
7129
|
+
description: "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 what the key may do; when omitted the key inherits the creator's capabilities. The raw `key` (nat_sk_…) is returned only in this response. A project-scoped key requires the `admin` role in that project: the key is a standing credential for everything the project can do, so handing one out is an administrative act rather than something a read-only `member` can do for themselves. An account-scoped key requires a credential that is not itself confined to one project. 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.",
|
|
7120
7130
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/api-keys",
|
|
7121
7131
|
httpMethod: "post",
|
|
7122
7132
|
pathParams: [],
|
|
@@ -7212,7 +7222,7 @@ const routes = {
|
|
|
7212
7222
|
"rotate-api-key": {
|
|
7213
7223
|
serviceClass: "APIKeys",
|
|
7214
7224
|
operationId: "rotateApiKey",
|
|
7215
|
-
description: "Issues a new secret for the same key record (same id, scope and capabilities) and invalidates the previous secret. The new raw `key` is returned only in this response.",
|
|
7225
|
+
description: "Issues a new secret for the same key record (same id, scope and capabilities) and invalidates the previous secret. The new raw `key` is returned only in this response. Refused for a connected app, like creation: rotation returns a raw secret for a key the caller need never have held, so it reaches the same place by another door.",
|
|
7216
7226
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/api-keys",
|
|
7217
7227
|
httpMethod: "post",
|
|
7218
7228
|
pathParams: ["api_key_id"],
|
|
@@ -15421,7 +15431,7 @@ const routes = {
|
|
|
15421
15431
|
"get-current-user-billing": {
|
|
15422
15432
|
serviceClass: "Users",
|
|
15423
15433
|
operationId: "getCurrentUserBilling",
|
|
15424
|
-
description: "The plan the account is on and the credit it has left — the
|
|
15434
|
+
description: "The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against. A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days`. Every refusal names what is missing; this is where the numbers behind them are read. Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.",
|
|
15425
15435
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
15426
15436
|
httpMethod: "get",
|
|
15427
15437
|
pathParams: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.111.1",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.23.1",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"@naturali/sdk": "0.
|
|
33
|
+
"@naturali/sdk": "0.111.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|