@naturali/cli 0.229.0 → 0.229.2
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 +15 -8
- 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.229.
|
|
20
|
+
var version = "0.229.2";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -6454,7 +6454,7 @@ var Users = class {
|
|
|
6454
6454
|
*
|
|
6455
6455
|
* 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.
|
|
6456
6456
|
*
|
|
6457
|
-
* 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
|
|
6457
|
+
* 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 app's billing page.
|
|
6458
6458
|
*
|
|
6459
6459
|
*/
|
|
6460
6460
|
static createCurrentUserTopUp(options) {
|
|
@@ -7359,6 +7359,13 @@ const findRootBodyFlag = (route) => {
|
|
|
7359
7359
|
return flag.in === "body-root";
|
|
7360
7360
|
});
|
|
7361
7361
|
};
|
|
7362
|
+
const keepText = (value) => {
|
|
7363
|
+
return value;
|
|
7364
|
+
};
|
|
7365
|
+
const scalarCoercer = (flag) => {
|
|
7366
|
+
if (flag?.type !== "string") return parseFlagValue;
|
|
7367
|
+
return flag.in === "query" ? keepText : parseStringFlagValue;
|
|
7368
|
+
};
|
|
7362
7369
|
const placeFlags = (args) => {
|
|
7363
7370
|
const { route, parsedFlags, call } = args;
|
|
7364
7371
|
const fileErrors = [];
|
|
@@ -7377,13 +7384,13 @@ const placeFlags = (args) => {
|
|
|
7377
7384
|
return resolved.fromFile ? resolved.value : coerce(resolved.value);
|
|
7378
7385
|
};
|
|
7379
7386
|
const rootBodyFlag = findRootBodyFlag(route);
|
|
7380
|
-
const
|
|
7381
|
-
return [toCanonical(flag.name), flag
|
|
7387
|
+
const flagByCanonical = new Map(route.flags.map((flag) => {
|
|
7388
|
+
return [toCanonical(flag.name), flag];
|
|
7382
7389
|
}));
|
|
7383
7390
|
for (const [flagKey, rawValue] of Object.entries(parsedFlags.single)) {
|
|
7384
7391
|
const canonical = toCanonical(flagKey);
|
|
7385
|
-
const
|
|
7386
|
-
const value =
|
|
7392
|
+
const declared = flagByCanonical.get(canonical);
|
|
7393
|
+
const value = declared?.type === "array" ? buildArrayFlagValue((parsedFlags.repeated[flagKey] ?? [rawValue]).map((item) => {
|
|
7387
7394
|
return readValue({
|
|
7388
7395
|
flagKey,
|
|
7389
7396
|
raw: item,
|
|
@@ -7392,7 +7399,7 @@ const placeFlags = (args) => {
|
|
|
7392
7399
|
})) : readValue({
|
|
7393
7400
|
flagKey,
|
|
7394
7401
|
raw: rawValue,
|
|
7395
|
-
coerce:
|
|
7402
|
+
coerce: scalarCoercer(declared)
|
|
7396
7403
|
});
|
|
7397
7404
|
const pathParam = route.pathParams.find((param) => {
|
|
7398
7405
|
return toCanonical(param) === canonical;
|
|
@@ -25603,7 +25610,7 @@ const routes = {
|
|
|
25603
25610
|
"create-current-user-top-up": {
|
|
25604
25611
|
serviceClass: "Users",
|
|
25605
25612
|
operationId: "createCurrentUserTopUp",
|
|
25606
|
-
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
|
|
25613
|
+
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 app's billing page.",
|
|
25607
25614
|
moduleDocsUrl: "https://naturali.ai/docs/modules/users",
|
|
25608
25615
|
httpMethod: "post",
|
|
25609
25616
|
pathParams: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.229.
|
|
3
|
+
"version": "0.229.2",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"yaml": "^2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@naturali/sdk": "0.229.
|
|
34
|
+
"@naturali/sdk": "0.229.2",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|