@naturali/cli 0.165.0 → 0.167.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 +196 -1
- 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.167.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -5419,6 +5419,99 @@ var Users = class {
|
|
|
5419
5419
|
...options
|
|
5420
5420
|
});
|
|
5421
5421
|
}
|
|
5422
|
+
/**
|
|
5423
|
+
* Start a credit top-up
|
|
5424
|
+
*
|
|
5425
|
+
* 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.
|
|
5426
|
+
*
|
|
5427
|
+
* 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.
|
|
5428
|
+
*
|
|
5429
|
+
*/
|
|
5430
|
+
static createCurrentUserTopUp(options) {
|
|
5431
|
+
return (options.client ?? client).post({
|
|
5432
|
+
url: "/v1/users/me/top-ups",
|
|
5433
|
+
...options,
|
|
5434
|
+
headers: {
|
|
5435
|
+
"Content-Type": "application/json",
|
|
5436
|
+
...options.headers
|
|
5437
|
+
}
|
|
5438
|
+
});
|
|
5439
|
+
}
|
|
5440
|
+
/**
|
|
5441
|
+
* Remove the saved card
|
|
5442
|
+
*
|
|
5443
|
+
* Forgets the saved card and turns auto-recharge off.
|
|
5444
|
+
*/
|
|
5445
|
+
static deleteCurrentUserPaymentMethod(options) {
|
|
5446
|
+
return (options?.client ?? client).delete({
|
|
5447
|
+
url: "/v1/users/me/payment-method",
|
|
5448
|
+
...options
|
|
5449
|
+
});
|
|
5450
|
+
}
|
|
5451
|
+
/**
|
|
5452
|
+
* Get the saved card
|
|
5453
|
+
*
|
|
5454
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and expiry are kept here.
|
|
5455
|
+
*
|
|
5456
|
+
*/
|
|
5457
|
+
static getCurrentUserPaymentMethod(options) {
|
|
5458
|
+
return (options?.client ?? client).get({
|
|
5459
|
+
url: "/v1/users/me/payment-method",
|
|
5460
|
+
...options
|
|
5461
|
+
});
|
|
5462
|
+
}
|
|
5463
|
+
/**
|
|
5464
|
+
* Start saving a card
|
|
5465
|
+
*
|
|
5466
|
+
* A hosted page that saves a card for charges made without the payer present: auto-recharge and monthly statements. Send the caller to `checkout_url`; nothing is charged. A card saved this way replaces the one already saved.
|
|
5467
|
+
*
|
|
5468
|
+
*/
|
|
5469
|
+
static createCurrentUserPaymentMethod(options) {
|
|
5470
|
+
return (options?.client ?? client).post({
|
|
5471
|
+
url: "/v1/users/me/payment-method",
|
|
5472
|
+
...options
|
|
5473
|
+
});
|
|
5474
|
+
}
|
|
5475
|
+
/**
|
|
5476
|
+
* Turn auto-recharge off
|
|
5477
|
+
*
|
|
5478
|
+
* Stops topping up the balance automatically. The saved card stays saved.
|
|
5479
|
+
*
|
|
5480
|
+
*/
|
|
5481
|
+
static disableCurrentUserAutoRecharge(options) {
|
|
5482
|
+
return (options?.client ?? client).delete({
|
|
5483
|
+
url: "/v1/users/me/auto-recharge",
|
|
5484
|
+
...options
|
|
5485
|
+
});
|
|
5486
|
+
}
|
|
5487
|
+
/**
|
|
5488
|
+
* Get the auto-recharge setting
|
|
5489
|
+
*
|
|
5490
|
+
* Whether the credit balance is topped up on the saved card, by how much and below what balance. `enabled` is false until a card is saved and the setting turned on.
|
|
5491
|
+
*
|
|
5492
|
+
*/
|
|
5493
|
+
static getCurrentUserAutoRecharge(options) {
|
|
5494
|
+
return (options?.client ?? client).get({
|
|
5495
|
+
url: "/v1/users/me/auto-recharge",
|
|
5496
|
+
...options
|
|
5497
|
+
});
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Turn auto-recharge on
|
|
5501
|
+
*
|
|
5502
|
+
* Top up `amount_usd` on the saved card whenever the credit balance falls below `below_usd`. Checked every 15 minutes, at most one charge an hour. A declined charge turns it off and emails the account.
|
|
5503
|
+
*
|
|
5504
|
+
*/
|
|
5505
|
+
static setCurrentUserAutoRecharge(options) {
|
|
5506
|
+
return (options.client ?? client).put({
|
|
5507
|
+
url: "/v1/users/me/auto-recharge",
|
|
5508
|
+
...options,
|
|
5509
|
+
headers: {
|
|
5510
|
+
"Content-Type": "application/json",
|
|
5511
|
+
...options.headers
|
|
5512
|
+
}
|
|
5513
|
+
});
|
|
5514
|
+
}
|
|
5422
5515
|
};
|
|
5423
5516
|
var Webhooks = class {
|
|
5424
5517
|
/**
|
|
@@ -20926,6 +21019,108 @@ const routes = {
|
|
|
20926
21019
|
"in": "path"
|
|
20927
21020
|
}]
|
|
20928
21021
|
},
|
|
21022
|
+
"create-current-user-top-up": {
|
|
21023
|
+
serviceClass: "Users",
|
|
21024
|
+
operationId: "createCurrentUserTopUp",
|
|
21025
|
+
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.",
|
|
21026
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21027
|
+
httpMethod: "post",
|
|
21028
|
+
pathParams: [],
|
|
21029
|
+
queryParams: [],
|
|
21030
|
+
headerParams: [],
|
|
21031
|
+
cookieParams: [],
|
|
21032
|
+
flags: [{
|
|
21033
|
+
"name": "amount_usd",
|
|
21034
|
+
"description": "US dollars to buy, in whole cents.",
|
|
21035
|
+
"required": true,
|
|
21036
|
+
"type": "number",
|
|
21037
|
+
"in": "body"
|
|
21038
|
+
}]
|
|
21039
|
+
},
|
|
21040
|
+
"get-current-user-payment-method": {
|
|
21041
|
+
serviceClass: "Users",
|
|
21042
|
+
operationId: "getCurrentUserPaymentMethod",
|
|
21043
|
+
description: "The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and expiry are kept here.",
|
|
21044
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21045
|
+
httpMethod: "get",
|
|
21046
|
+
pathParams: [],
|
|
21047
|
+
queryParams: [],
|
|
21048
|
+
headerParams: [],
|
|
21049
|
+
cookieParams: [],
|
|
21050
|
+
flags: []
|
|
21051
|
+
},
|
|
21052
|
+
"create-current-user-payment-method": {
|
|
21053
|
+
serviceClass: "Users",
|
|
21054
|
+
operationId: "createCurrentUserPaymentMethod",
|
|
21055
|
+
description: "A hosted page that saves a card for charges made without the payer present: auto-recharge and monthly statements. Send the caller to `checkout_url`; nothing is charged. A card saved this way replaces the one already saved.",
|
|
21056
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21057
|
+
httpMethod: "post",
|
|
21058
|
+
pathParams: [],
|
|
21059
|
+
queryParams: [],
|
|
21060
|
+
headerParams: [],
|
|
21061
|
+
cookieParams: [],
|
|
21062
|
+
flags: []
|
|
21063
|
+
},
|
|
21064
|
+
"delete-current-user-payment-method": {
|
|
21065
|
+
serviceClass: "Users",
|
|
21066
|
+
operationId: "deleteCurrentUserPaymentMethod",
|
|
21067
|
+
description: "Forgets the saved card and turns auto-recharge off.",
|
|
21068
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21069
|
+
httpMethod: "delete",
|
|
21070
|
+
pathParams: [],
|
|
21071
|
+
queryParams: [],
|
|
21072
|
+
headerParams: [],
|
|
21073
|
+
cookieParams: [],
|
|
21074
|
+
flags: []
|
|
21075
|
+
},
|
|
21076
|
+
"get-current-user-auto-recharge": {
|
|
21077
|
+
serviceClass: "Users",
|
|
21078
|
+
operationId: "getCurrentUserAutoRecharge",
|
|
21079
|
+
description: "Whether the credit balance is topped up on the saved card, by how much and below what balance. `enabled` is false until a card is saved and the setting turned on.",
|
|
21080
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21081
|
+
httpMethod: "get",
|
|
21082
|
+
pathParams: [],
|
|
21083
|
+
queryParams: [],
|
|
21084
|
+
headerParams: [],
|
|
21085
|
+
cookieParams: [],
|
|
21086
|
+
flags: []
|
|
21087
|
+
},
|
|
21088
|
+
"set-current-user-auto-recharge": {
|
|
21089
|
+
serviceClass: "Users",
|
|
21090
|
+
operationId: "setCurrentUserAutoRecharge",
|
|
21091
|
+
description: "Top up `amount_usd` on the saved card whenever the credit balance falls below `below_usd`. Checked every 15 minutes, at most one charge an hour. A declined charge turns it off and emails the account.",
|
|
21092
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21093
|
+
httpMethod: "put",
|
|
21094
|
+
pathParams: [],
|
|
21095
|
+
queryParams: [],
|
|
21096
|
+
headerParams: [],
|
|
21097
|
+
cookieParams: [],
|
|
21098
|
+
flags: [{
|
|
21099
|
+
"name": "amount_usd",
|
|
21100
|
+
"description": "US dollars per recharge, in whole cents.",
|
|
21101
|
+
"required": true,
|
|
21102
|
+
"type": "number",
|
|
21103
|
+
"in": "body"
|
|
21104
|
+
}, {
|
|
21105
|
+
"name": "below_usd",
|
|
21106
|
+
"description": "Recharge when the balance falls below this, in whole cents.",
|
|
21107
|
+
"required": true,
|
|
21108
|
+
"type": "number",
|
|
21109
|
+
"in": "body"
|
|
21110
|
+
}]
|
|
21111
|
+
},
|
|
21112
|
+
"disable-current-user-auto-recharge": {
|
|
21113
|
+
serviceClass: "Users",
|
|
21114
|
+
operationId: "disableCurrentUserAutoRecharge",
|
|
21115
|
+
description: "Stops topping up the balance automatically. The saved card stays saved.",
|
|
21116
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21117
|
+
httpMethod: "delete",
|
|
21118
|
+
pathParams: [],
|
|
21119
|
+
queryParams: [],
|
|
21120
|
+
headerParams: [],
|
|
21121
|
+
cookieParams: [],
|
|
21122
|
+
flags: []
|
|
21123
|
+
},
|
|
20929
21124
|
"list-webhooks": {
|
|
20930
21125
|
serviceClass: "Webhooks",
|
|
20931
21126
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.167.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.167.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|