@naturali/cli 0.170.4 → 0.171.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.
Files changed (2) hide show
  1. package/dist/index.mjs +13 -5
  2. 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.170.4";
20
+ var version = "0.171.0";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -5448,11 +5448,13 @@ var Users = class {
5448
5448
  });
5449
5449
  }
5450
5450
  /**
5451
- * Start a credit top-up
5451
+ * Top up credit
5452
5452
  *
5453
- * A hosted card checkout that buys model credit for the caller's account. Send the caller to `checkout_url`; 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.
5453
+ * 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. Charged in US dollars.
5454
5454
  *
5455
- * Charged in US dollars. Creating a top-up charges nothing, and one left unpaid lapses at `expires_at`. After paying, the browser returns to the console's billing page.
5455
+ * 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
+ *
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.
5456
5458
  *
5457
5459
  */
5458
5460
  static createCurrentUserTopUp(options) {
@@ -21112,7 +21114,7 @@ const routes = {
21112
21114
  "create-current-user-top-up": {
21113
21115
  serviceClass: "Users",
21114
21116
  operationId: "createCurrentUserTopUp",
21115
- description: "A hosted card checkout that buys model credit for the caller's account. Send the caller to `checkout_url`; 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. Charged in US dollars. Creating a top-up charges nothing, and one left unpaid lapses at `expires_at`. After paying, the browser returns to the console's billing page.",
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. Charged in US dollars. 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.",
21116
21118
  moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
21117
21119
  httpMethod: "post",
21118
21120
  pathParams: [],
@@ -21125,6 +21127,12 @@ const routes = {
21125
21127
  "required": true,
21126
21128
  "type": "number",
21127
21129
  "in": "body"
21130
+ }, {
21131
+ "name": "saved_card",
21132
+ "description": "Charge the saved card now instead of opening a checkout.",
21133
+ "required": false,
21134
+ "type": "boolean",
21135
+ "in": "body"
21128
21136
  }]
21129
21137
  },
21130
21138
  "get-current-user-payment-method": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.170.4",
3
+ "version": "0.171.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.170.4",
28
+ "@naturali/sdk": "0.171.0",
29
29
  "@ttoss/openapi-codegen": "^0.5.0",
30
30
  "@types/node": "^26.5.1",
31
31
  "tsdown": "^0.23.0",