@naturali/cli 0.168.0 → 0.170.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.mjs +60 -10
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.170.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1145,7 +1145,7 @@ var Admin = class {
|
|
|
1145
1145
|
/**
|
|
1146
1146
|
* Grant a user credit
|
|
1147
1147
|
*
|
|
1148
|
-
* Writes one
|
|
1148
|
+
* Writes one line to the account's credit ledger and answers with the balance it produced. Needs the `admin` role.
|
|
1149
1149
|
* The ledger is append-only and the balance is its sum — there is no balance to set and no line to edit or delete. A mistake is corrected by writing a **negative** `amount_usd`, which leaves the wrong line on the record beside the one that compensates for it.
|
|
1150
1150
|
* `kind` is required. Money received and credit given away report differently — one is revenue, the other customer-acquisition cost — so the line says which it is rather than defaulting to one of them.
|
|
1151
1151
|
* The balance this moves is not yet a ceiling anything enforces; turning it into one is a separate mechanism.
|
|
@@ -5386,7 +5386,7 @@ var Users = class {
|
|
|
5386
5386
|
*
|
|
5387
5387
|
* Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first.
|
|
5388
5388
|
*
|
|
5389
|
-
* `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A project-confined key sees its own project's stops only.
|
|
5389
|
+
* `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A `marketplace_fee` stop, for work naming a priced installed listing, is restored only while the paid balance is positive. A project-confined key sees its own project's stops only.
|
|
5390
5390
|
*
|
|
5391
5391
|
*/
|
|
5392
5392
|
static listCurrentUserStops(options) {
|
|
@@ -5424,9 +5424,9 @@ var Users = class {
|
|
|
5424
5424
|
/**
|
|
5425
5425
|
* List the account's monthly statements
|
|
5426
5426
|
*
|
|
5427
|
-
* What the account owes for each closed billing month, newest first: the subscription fee, prorated by the share of the month each plan was held, and runs past the allowance at the plan's overage rate. Overage is measured against the highest plan held that month.
|
|
5427
|
+
* What the account owes for each closed billing month, newest first: the subscription fee, prorated by the share of the month each plan was held, and runs past the allowance at the plan's overage rate, less what was paid at an upgrade. Overage is measured against the highest plan held that month.
|
|
5428
5428
|
*
|
|
5429
|
-
* A statement is written within an hour of the month closing, once, and never changes
|
|
5429
|
+
* A statement is written within an hour of the month closing, once, and never changes; `payment_status` follows its charge on the saved card. It is not a tax invoice. Months on the Free plan alone, contract plans and storage are not stated.
|
|
5430
5430
|
*
|
|
5431
5431
|
*/
|
|
5432
5432
|
static listCurrentUserStatements(options) {
|
|
@@ -5540,6 +5540,24 @@ var Users = class {
|
|
|
5540
5540
|
}
|
|
5541
5541
|
});
|
|
5542
5542
|
}
|
|
5543
|
+
/**
|
|
5544
|
+
* Change the plan
|
|
5545
|
+
*
|
|
5546
|
+
* Choose `free`, `pro` or `business`. A paid plan needs a saved card.
|
|
5547
|
+
*
|
|
5548
|
+
* An upgrade is charged at once on the saved card for the price difference over the rest of the month, then takes effect; the month's statement nets that payment out. A declined card leaves the plan unchanged. A downgrade takes effect when the month ends, and `next_plan` names it until then. A contract plan is changed by asking us.
|
|
5549
|
+
*
|
|
5550
|
+
*/
|
|
5551
|
+
static setCurrentUserPlan(options) {
|
|
5552
|
+
return (options.client ?? client).put({
|
|
5553
|
+
url: "/v1/users/me/plan",
|
|
5554
|
+
...options,
|
|
5555
|
+
headers: {
|
|
5556
|
+
"Content-Type": "application/json",
|
|
5557
|
+
...options.headers
|
|
5558
|
+
}
|
|
5559
|
+
});
|
|
5560
|
+
}
|
|
5543
5561
|
};
|
|
5544
5562
|
var Webhooks = class {
|
|
5545
5563
|
/**
|
|
@@ -7450,7 +7468,7 @@ const routes = {
|
|
|
7450
7468
|
"grant-user-credit": {
|
|
7451
7469
|
serviceClass: "Admin",
|
|
7452
7470
|
operationId: "grantUserCredit",
|
|
7453
|
-
description: "Writes one
|
|
7471
|
+
description: "Writes one line to the account's credit ledger and answers with the balance it produced. Needs the `admin` role. The ledger is append-only and the balance is its sum — there is no balance to set and no line to edit or delete. A mistake is corrected by writing a **negative** `amount_usd`, which leaves the wrong line on the record beside the one that compensates for it. `kind` is required. Money received and credit given away report differently — one is revenue, the other customer-acquisition cost — so the line says which it is rather than defaulting to one of them. The balance this moves is not yet a ceiling anything enforces; turning it into one is a separate mechanism.",
|
|
7454
7472
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/admin",
|
|
7455
7473
|
httpMethod: "post",
|
|
7456
7474
|
pathParams: ["user_id"],
|
|
@@ -7467,7 +7485,7 @@ const routes = {
|
|
|
7467
7485
|
},
|
|
7468
7486
|
{
|
|
7469
7487
|
"name": "kind",
|
|
7470
|
-
"description": "What this line is. `purchased` for money that arrived, `granted` for credit naturali gave away — the two report differently, so it is required rather than defaulted. `included` is not accepted here: a plan's monthly allowance is the billing cycle's to write.",
|
|
7488
|
+
"description": "What this line is. `purchased` for money that arrived, `granted` for credit naturali gave away — the two report differently, so it is required rather than defaulted. `earned` writes a withdrawal or a dispute against marketplace earnings and requires `reason`; a negative one is refused while the account's balance is negative. `included` is not accepted here: a plan's monthly allowance is the billing cycle's to write.",
|
|
7471
7489
|
"required": true,
|
|
7472
7490
|
"type": "string",
|
|
7473
7491
|
"in": "body"
|
|
@@ -7481,7 +7499,7 @@ const routes = {
|
|
|
7481
7499
|
},
|
|
7482
7500
|
{
|
|
7483
7501
|
"name": "reason",
|
|
7484
|
-
"description": "Why, for the record.
|
|
7502
|
+
"description": "Why, for the record. Required for `earned`.",
|
|
7485
7503
|
"required": false,
|
|
7486
7504
|
"type": "string",
|
|
7487
7505
|
"in": "body"
|
|
@@ -15353,6 +15371,13 @@ const routes = {
|
|
|
15353
15371
|
"required": false,
|
|
15354
15372
|
"type": "string",
|
|
15355
15373
|
"in": "body"
|
|
15374
|
+
},
|
|
15375
|
+
{
|
|
15376
|
+
"name": "pricing",
|
|
15377
|
+
"description": "What an installing project is charged per call, on top of any model cost. Omit for a free listing.\n",
|
|
15378
|
+
"required": false,
|
|
15379
|
+
"type": "array",
|
|
15380
|
+
"in": "body"
|
|
15356
15381
|
}
|
|
15357
15382
|
]
|
|
15358
15383
|
},
|
|
@@ -15425,6 +15450,13 @@ const routes = {
|
|
|
15425
15450
|
"required": false,
|
|
15426
15451
|
"type": "string",
|
|
15427
15452
|
"in": "body"
|
|
15453
|
+
},
|
|
15454
|
+
{
|
|
15455
|
+
"name": "pricing",
|
|
15456
|
+
"description": "The new price, replacing the whole list. A lower price applies the next minute. A higher unit price or a new component applies 7 days later, is returned in `pricing_next` meanwhile, and is emailed to every installing project. A component left out is no longer charged.\n",
|
|
15457
|
+
"required": false,
|
|
15458
|
+
"type": "array",
|
|
15459
|
+
"in": "body"
|
|
15428
15460
|
}
|
|
15429
15461
|
]
|
|
15430
15462
|
},
|
|
@@ -20978,7 +21010,7 @@ const routes = {
|
|
|
20978
21010
|
"list-current-user-stops": {
|
|
20979
21011
|
serviceClass: "Users",
|
|
20980
21012
|
operationId: "listCurrentUserStops",
|
|
20981
|
-
description: "Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first. `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A project-confined key sees its own project's stops only.",
|
|
21013
|
+
description: "Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first. `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A `marketplace_fee` stop, for work naming a priced installed listing, is restored only while the paid balance is positive. A project-confined key sees its own project's stops only.",
|
|
20982
21014
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
20983
21015
|
httpMethod: "get",
|
|
20984
21016
|
pathParams: [],
|
|
@@ -21038,7 +21070,7 @@ const routes = {
|
|
|
21038
21070
|
"list-current-user-statements": {
|
|
21039
21071
|
serviceClass: "Users",
|
|
21040
21072
|
operationId: "listCurrentUserStatements",
|
|
21041
|
-
description: "What the account owes for each closed billing month, newest first: the subscription fee, prorated by the share of the month each plan was held, and runs past the allowance at the plan's overage rate. Overage is measured against the highest plan held that month. A statement is written within an hour of the month closing, once, and never changes
|
|
21073
|
+
description: "What the account owes for each closed billing month, newest first: the subscription fee, prorated by the share of the month each plan was held, and runs past the allowance at the plan's overage rate, less what was paid at an upgrade. Overage is measured against the highest plan held that month. A statement is written within an hour of the month closing, once, and never changes; `payment_status` follows its charge on the saved card. It is not a tax invoice. Months on the Free plan alone, contract plans and storage are not stated.",
|
|
21042
21074
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21043
21075
|
httpMethod: "get",
|
|
21044
21076
|
pathParams: [],
|
|
@@ -21179,6 +21211,24 @@ const routes = {
|
|
|
21179
21211
|
cookieParams: [],
|
|
21180
21212
|
flags: []
|
|
21181
21213
|
},
|
|
21214
|
+
"set-current-user-plan": {
|
|
21215
|
+
serviceClass: "Users",
|
|
21216
|
+
operationId: "setCurrentUserPlan",
|
|
21217
|
+
description: "Choose `free`, `pro` or `business`. A paid plan needs a saved card. An upgrade is charged at once on the saved card for the price difference over the rest of the month, then takes effect; the month's statement nets that payment out. A declined card leaves the plan unchanged. A downgrade takes effect when the month ends, and `next_plan` names it until then. A contract plan is changed by asking us.",
|
|
21218
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21219
|
+
httpMethod: "put",
|
|
21220
|
+
pathParams: [],
|
|
21221
|
+
queryParams: [],
|
|
21222
|
+
headerParams: [],
|
|
21223
|
+
cookieParams: [],
|
|
21224
|
+
flags: [{
|
|
21225
|
+
"name": "plan",
|
|
21226
|
+
"description": "",
|
|
21227
|
+
"required": true,
|
|
21228
|
+
"type": "string",
|
|
21229
|
+
"in": "body"
|
|
21230
|
+
}]
|
|
21231
|
+
},
|
|
21182
21232
|
"list-webhooks": {
|
|
21183
21233
|
serviceClass: "Webhooks",
|
|
21184
21234
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.170.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"yaml": "^2.9.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@naturali/sdk": "0.
|
|
28
|
+
"@naturali/sdk": "0.170.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|