@naturali/cli 0.173.4 → 0.175.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 +72 -6
- 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.175.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1852,6 +1852,22 @@ var Auth = class {
|
|
|
1852
1852
|
});
|
|
1853
1853
|
}
|
|
1854
1854
|
/**
|
|
1855
|
+
* Sign in with Google
|
|
1856
|
+
*
|
|
1857
|
+
* Exchanges a Google ID token, issued to this deployment's web client, for a session. The account is the one for the token's address: an address that signed in with an emailed code reaches the same account, and a new address gets one. Google must have verified the address.
|
|
1858
|
+
*
|
|
1859
|
+
*/
|
|
1860
|
+
static signInWithGoogle(options) {
|
|
1861
|
+
return (options.client ?? client).post({
|
|
1862
|
+
url: "/v1/auth/google",
|
|
1863
|
+
...options,
|
|
1864
|
+
headers: {
|
|
1865
|
+
"Content-Type": "application/json",
|
|
1866
|
+
...options.headers
|
|
1867
|
+
}
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1855
1871
|
* Refresh a session
|
|
1856
1872
|
*
|
|
1857
1873
|
* Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
|
|
@@ -5454,7 +5470,7 @@ var Users = class {
|
|
|
5454
5470
|
*
|
|
5455
5471
|
* With `saved_card: true` the saved card is charged at once and the answer is `status: paid`. When the card needs authentication or is declined, nothing is charged and the answer falls back to a checkout.
|
|
5456
5472
|
*
|
|
5457
|
-
* A checkout (`status: checkout`) is a hosted page: send the caller to `checkout_url`. Creating it charges nothing, and one left unpaid lapses at `expires_at`. After paying, the browser returns to the console's billing page.
|
|
5473
|
+
* A checkout (`status: checkout`) is a hosted page: send the caller to `checkout_url`. Creating it charges nothing, and one left unpaid lapses at `expires_at`. The card paid with there becomes the account's saved card, replacing any other. After paying, the browser returns to the console's billing page.
|
|
5458
5474
|
*
|
|
5459
5475
|
*/
|
|
5460
5476
|
static createCurrentUserTopUp(options) {
|
|
@@ -5545,9 +5561,11 @@ var Users = class {
|
|
|
5545
5561
|
/**
|
|
5546
5562
|
* Change the plan
|
|
5547
5563
|
*
|
|
5548
|
-
* Choose `free`, `pro` or `business`.
|
|
5564
|
+
* Choose `free`, `pro` or `business`.
|
|
5549
5565
|
*
|
|
5550
|
-
* An upgrade is charged
|
|
5566
|
+
* An upgrade is charged for the price difference over the rest of the month, then takes effect; the month's statement nets that payment out. The saved card is charged at once, in its currency. With no saved card, or when the card needs authentication or is declined, nothing is charged and the answer carries a `checkout_url`: a hosted page that charges the upgrade and saves the card. The plan changes once it is paid; one left unpaid lapses at `expires_at`.
|
|
5567
|
+
*
|
|
5568
|
+
* A downgrade takes effect when the month ends, and `next_plan` names it until then. A contract plan is changed by asking us.
|
|
5551
5569
|
*
|
|
5552
5570
|
*/
|
|
5553
5571
|
static setCurrentUserPlan(options) {
|
|
@@ -5560,6 +5578,18 @@ var Users = class {
|
|
|
5560
5578
|
}
|
|
5561
5579
|
});
|
|
5562
5580
|
}
|
|
5581
|
+
/**
|
|
5582
|
+
* Preview a plan change
|
|
5583
|
+
*
|
|
5584
|
+
* What choosing `plan` would charge now: an upgrade's share of the rest of the month, else 0. Changes nothing.
|
|
5585
|
+
*
|
|
5586
|
+
*/
|
|
5587
|
+
static getCurrentUserPlanQuote(options) {
|
|
5588
|
+
return (options.client ?? client).get({
|
|
5589
|
+
url: "/v1/users/me/plan/quote",
|
|
5590
|
+
...options
|
|
5591
|
+
});
|
|
5592
|
+
}
|
|
5563
5593
|
};
|
|
5564
5594
|
var Webhooks = class {
|
|
5565
5595
|
/**
|
|
@@ -9654,6 +9684,24 @@ const routes = {
|
|
|
9654
9684
|
"in": "body"
|
|
9655
9685
|
}]
|
|
9656
9686
|
},
|
|
9687
|
+
"sign-in-with-google": {
|
|
9688
|
+
serviceClass: "Auth",
|
|
9689
|
+
operationId: "signInWithGoogle",
|
|
9690
|
+
description: "Exchanges a Google ID token, issued to this deployment's web client, for a session. The account is the one for the token's address: an address that signed in with an emailed code reaches the same account, and a new address gets one. Google must have verified the address.",
|
|
9691
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/auth",
|
|
9692
|
+
httpMethod: "post",
|
|
9693
|
+
pathParams: [],
|
|
9694
|
+
queryParams: [],
|
|
9695
|
+
headerParams: [],
|
|
9696
|
+
cookieParams: [],
|
|
9697
|
+
flags: [{
|
|
9698
|
+
"name": "id_token",
|
|
9699
|
+
"description": "The `credential` Google Identity Services returns to the page.",
|
|
9700
|
+
"required": true,
|
|
9701
|
+
"type": "string",
|
|
9702
|
+
"in": "body"
|
|
9703
|
+
}]
|
|
9704
|
+
},
|
|
9657
9705
|
"refresh-session": {
|
|
9658
9706
|
serviceClass: "Auth",
|
|
9659
9707
|
operationId: "refreshSession",
|
|
@@ -21114,7 +21162,7 @@ const routes = {
|
|
|
21114
21162
|
"create-current-user-top-up": {
|
|
21115
21163
|
serviceClass: "Users",
|
|
21116
21164
|
operationId: "createCurrentUserTopUp",
|
|
21117
|
-
description: "Buys model credit for the caller's account. Once the card is charged the full amount is added to `credit_balance_usd` as purchased credit, which never expires. The card fee is not deducted. `amount_usd` is what is credited; a card issued in Brazil is charged its equivalent in Brazilian reais at the Banco Central's latest closing PTAX selling rate, and a checkout shows reais to a payer in Brazil. With `saved_card: true` the saved card is charged at once and the answer is `status: paid`. When the card needs authentication or is declined, nothing is charged and the answer falls back to a checkout. A checkout (`status: checkout`) is a hosted page: send the caller to `checkout_url`. Creating it charges nothing, and one left unpaid lapses at `expires_at`. After paying, the browser returns to the console's billing page.",
|
|
21165
|
+
description: "Buys model credit for the caller's account. Once the card is charged the full amount is added to `credit_balance_usd` as purchased credit, which never expires. The card fee is not deducted. `amount_usd` is what is credited; a card issued in Brazil is charged its equivalent in Brazilian reais at the Banco Central's latest closing PTAX selling rate, and a checkout shows reais to a payer in Brazil. With `saved_card: true` the saved card is charged at once and the answer is `status: paid`. When the card needs authentication or is declined, nothing is charged and the answer falls back to a checkout. A checkout (`status: checkout`) is a hosted page: send the caller to `checkout_url`. Creating it charges nothing, and one left unpaid lapses at `expires_at`. The card paid with there becomes the account's saved card, replacing any other. After paying, the browser returns to the console's billing page.",
|
|
21118
21166
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21119
21167
|
httpMethod: "post",
|
|
21120
21168
|
pathParams: [],
|
|
@@ -21222,7 +21270,7 @@ const routes = {
|
|
|
21222
21270
|
"set-current-user-plan": {
|
|
21223
21271
|
serviceClass: "Users",
|
|
21224
21272
|
operationId: "setCurrentUserPlan",
|
|
21225
|
-
description: "Choose `free`, `pro` or `business`.
|
|
21273
|
+
description: "Choose `free`, `pro` or `business`. An upgrade is charged for the price difference over the rest of the month, then takes effect; the month's statement nets that payment out. The saved card is charged at once, in its currency. With no saved card, or when the card needs authentication or is declined, nothing is charged and the answer carries a `checkout_url`: a hosted page that charges the upgrade and saves the card. The plan changes once it is paid; one left unpaid lapses at `expires_at`. A downgrade takes effect when the month ends, and `next_plan` names it until then. A contract plan is changed by asking us.",
|
|
21226
21274
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21227
21275
|
httpMethod: "put",
|
|
21228
21276
|
pathParams: [],
|
|
@@ -21237,6 +21285,24 @@ const routes = {
|
|
|
21237
21285
|
"in": "body"
|
|
21238
21286
|
}]
|
|
21239
21287
|
},
|
|
21288
|
+
"get-current-user-plan-quote": {
|
|
21289
|
+
serviceClass: "Users",
|
|
21290
|
+
operationId: "getCurrentUserPlanQuote",
|
|
21291
|
+
description: "What choosing `plan` would charge now: an upgrade's share of the rest of the month, else 0. Changes nothing.",
|
|
21292
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21293
|
+
httpMethod: "get",
|
|
21294
|
+
pathParams: [],
|
|
21295
|
+
queryParams: ["plan"],
|
|
21296
|
+
headerParams: [],
|
|
21297
|
+
cookieParams: [],
|
|
21298
|
+
flags: [{
|
|
21299
|
+
"name": "plan",
|
|
21300
|
+
"description": "",
|
|
21301
|
+
"required": true,
|
|
21302
|
+
"type": "string",
|
|
21303
|
+
"in": "query"
|
|
21304
|
+
}]
|
|
21305
|
+
},
|
|
21240
21306
|
"list-webhooks": {
|
|
21241
21307
|
serviceClass: "Webhooks",
|
|
21242
21308
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.175.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.175.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|