@naturali/cli 0.167.0 → 0.169.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 +118 -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.169.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.
|
|
@@ -1754,6 +1754,34 @@ var Assistant = class {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Read the conversation
|
|
1759
|
+
*
|
|
1760
|
+
* The newest 100 messages of your conversation with the Assistant in the app, oldest first. An account that has not messaged it yet has an empty conversation.
|
|
1761
|
+
*
|
|
1762
|
+
*/
|
|
1763
|
+
static listAssistantMessages(options) {
|
|
1764
|
+
return (options?.client ?? client).get({
|
|
1765
|
+
url: "/v1/assistant/messages",
|
|
1766
|
+
...options
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Message the Assistant
|
|
1771
|
+
*
|
|
1772
|
+
* Runs one turn as your account and answers with the messages it added: yours, then the Assistant's reply. The turn is paid from your credit and refused before it runs when the balance is below zero.
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
static sendAssistantMessage(options) {
|
|
1776
|
+
return (options.client ?? client).post({
|
|
1777
|
+
url: "/v1/assistant/messages",
|
|
1778
|
+
...options,
|
|
1779
|
+
headers: {
|
|
1780
|
+
"Content-Type": "application/json",
|
|
1781
|
+
...options.headers
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1757
1785
|
};
|
|
1758
1786
|
var AuditLog = class {
|
|
1759
1787
|
/**
|
|
@@ -5358,7 +5386,7 @@ var Users = class {
|
|
|
5358
5386
|
*
|
|
5359
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.
|
|
5360
5388
|
*
|
|
5361
|
-
* `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.
|
|
5362
5390
|
*
|
|
5363
5391
|
*/
|
|
5364
5392
|
static listCurrentUserStops(options) {
|
|
@@ -5396,9 +5424,9 @@ var Users = class {
|
|
|
5396
5424
|
/**
|
|
5397
5425
|
* List the account's monthly statements
|
|
5398
5426
|
*
|
|
5399
|
-
* 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.
|
|
5400
5428
|
*
|
|
5401
|
-
* 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.
|
|
5402
5430
|
*
|
|
5403
5431
|
*/
|
|
5404
5432
|
static listCurrentUserStatements(options) {
|
|
@@ -5512,6 +5540,24 @@ var Users = class {
|
|
|
5512
5540
|
}
|
|
5513
5541
|
});
|
|
5514
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
|
+
}
|
|
5515
5561
|
};
|
|
5516
5562
|
var Webhooks = class {
|
|
5517
5563
|
/**
|
|
@@ -7422,7 +7468,7 @@ const routes = {
|
|
|
7422
7468
|
"grant-user-credit": {
|
|
7423
7469
|
serviceClass: "Admin",
|
|
7424
7470
|
operationId: "grantUserCredit",
|
|
7425
|
-
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.",
|
|
7426
7472
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/admin",
|
|
7427
7473
|
httpMethod: "post",
|
|
7428
7474
|
pathParams: ["user_id"],
|
|
@@ -7439,7 +7485,7 @@ const routes = {
|
|
|
7439
7485
|
},
|
|
7440
7486
|
{
|
|
7441
7487
|
"name": "kind",
|
|
7442
|
-
"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.",
|
|
7443
7489
|
"required": true,
|
|
7444
7490
|
"type": "string",
|
|
7445
7491
|
"in": "body"
|
|
@@ -7453,7 +7499,7 @@ const routes = {
|
|
|
7453
7499
|
},
|
|
7454
7500
|
{
|
|
7455
7501
|
"name": "reason",
|
|
7456
|
-
"description": "Why, for the record.
|
|
7502
|
+
"description": "Why, for the record. Required for `earned`.",
|
|
7457
7503
|
"required": false,
|
|
7458
7504
|
"type": "string",
|
|
7459
7505
|
"in": "body"
|
|
@@ -9356,6 +9402,36 @@ const routes = {
|
|
|
9356
9402
|
"in": "body"
|
|
9357
9403
|
}]
|
|
9358
9404
|
},
|
|
9405
|
+
"list-assistant-messages": {
|
|
9406
|
+
serviceClass: "Assistant",
|
|
9407
|
+
operationId: "listAssistantMessages",
|
|
9408
|
+
description: "The newest 100 messages of your conversation with the Assistant in the app, oldest first. An account that has not messaged it yet has an empty conversation.",
|
|
9409
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/assistant",
|
|
9410
|
+
httpMethod: "get",
|
|
9411
|
+
pathParams: [],
|
|
9412
|
+
queryParams: [],
|
|
9413
|
+
headerParams: [],
|
|
9414
|
+
cookieParams: [],
|
|
9415
|
+
flags: []
|
|
9416
|
+
},
|
|
9417
|
+
"send-assistant-message": {
|
|
9418
|
+
serviceClass: "Assistant",
|
|
9419
|
+
operationId: "sendAssistantMessage",
|
|
9420
|
+
description: "Runs one turn as your account and answers with the messages it added: yours, then the Assistant's reply. The turn is paid from your credit and refused before it runs when the balance is below zero.",
|
|
9421
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/assistant",
|
|
9422
|
+
httpMethod: "post",
|
|
9423
|
+
pathParams: [],
|
|
9424
|
+
queryParams: [],
|
|
9425
|
+
headerParams: [],
|
|
9426
|
+
cookieParams: [],
|
|
9427
|
+
flags: [{
|
|
9428
|
+
"name": "text",
|
|
9429
|
+
"description": "",
|
|
9430
|
+
"required": true,
|
|
9431
|
+
"type": "string",
|
|
9432
|
+
"in": "body"
|
|
9433
|
+
}]
|
|
9434
|
+
},
|
|
9359
9435
|
"list-audit-entries": {
|
|
9360
9436
|
serviceClass: "AuditLog",
|
|
9361
9437
|
operationId: "listAuditEntries",
|
|
@@ -15295,6 +15371,13 @@ const routes = {
|
|
|
15295
15371
|
"required": false,
|
|
15296
15372
|
"type": "string",
|
|
15297
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"
|
|
15298
15381
|
}
|
|
15299
15382
|
]
|
|
15300
15383
|
},
|
|
@@ -15367,6 +15450,13 @@ const routes = {
|
|
|
15367
15450
|
"required": false,
|
|
15368
15451
|
"type": "string",
|
|
15369
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"
|
|
15370
15460
|
}
|
|
15371
15461
|
]
|
|
15372
15462
|
},
|
|
@@ -20920,7 +21010,7 @@ const routes = {
|
|
|
20920
21010
|
"list-current-user-stops": {
|
|
20921
21011
|
serviceClass: "Users",
|
|
20922
21012
|
operationId: "listCurrentUserStops",
|
|
20923
|
-
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.",
|
|
20924
21014
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
20925
21015
|
httpMethod: "get",
|
|
20926
21016
|
pathParams: [],
|
|
@@ -20980,7 +21070,7 @@ const routes = {
|
|
|
20980
21070
|
"list-current-user-statements": {
|
|
20981
21071
|
serviceClass: "Users",
|
|
20982
21072
|
operationId: "listCurrentUserStatements",
|
|
20983
|
-
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.",
|
|
20984
21074
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
20985
21075
|
httpMethod: "get",
|
|
20986
21076
|
pathParams: [],
|
|
@@ -21121,6 +21211,24 @@ const routes = {
|
|
|
21121
21211
|
cookieParams: [],
|
|
21122
21212
|
flags: []
|
|
21123
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
|
+
},
|
|
21124
21232
|
"list-webhooks": {
|
|
21125
21233
|
serviceClass: "Webhooks",
|
|
21126
21234
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.169.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.169.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|