@naturali/sdk 0.171.0 → 0.172.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.cjs +3 -3
- package/dist/index.d.cts +17 -5
- package/dist/index.d.mts +17 -5
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5430,7 +5430,7 @@ var Users = class {
|
|
|
5430
5430
|
/**
|
|
5431
5431
|
* Top up credit
|
|
5432
5432
|
*
|
|
5433
|
-
* 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.
|
|
5433
|
+
* 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.
|
|
5434
5434
|
*
|
|
5435
5435
|
* 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.
|
|
5436
5436
|
*
|
|
@@ -5461,7 +5461,7 @@ var Users = class {
|
|
|
5461
5461
|
/**
|
|
5462
5462
|
* Get the saved card
|
|
5463
5463
|
*
|
|
5464
|
-
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and
|
|
5464
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits, expiry and issuing country are kept here. A card issued in Brazil is charged in Brazilian reais, every other card in US dollars.
|
|
5465
5465
|
*
|
|
5466
5466
|
*/
|
|
5467
5467
|
static getCurrentUserPaymentMethod(options) {
|
|
@@ -5527,7 +5527,7 @@ var Users = class {
|
|
|
5527
5527
|
*
|
|
5528
5528
|
* Choose `free`, `pro` or `business`. A paid plan needs a saved card.
|
|
5529
5529
|
*
|
|
5530
|
-
* 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.
|
|
5530
|
+
* An upgrade is charged at once on the saved card, in its currency, 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.
|
|
5531
5531
|
*
|
|
5532
5532
|
*/
|
|
5533
5533
|
static setCurrentUserPlan(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -8426,7 +8426,7 @@ type TopUp = {
|
|
|
8426
8426
|
*/
|
|
8427
8427
|
id: string;
|
|
8428
8428
|
/**
|
|
8429
|
-
* What is charged,
|
|
8429
|
+
* What is credited once paid: charged in US dollars, or its equivalent in reais.
|
|
8430
8430
|
*/
|
|
8431
8431
|
amount_usd: number;
|
|
8432
8432
|
/**
|
|
@@ -8447,6 +8447,14 @@ type PaymentMethod = {
|
|
|
8447
8447
|
last4: string;
|
|
8448
8448
|
exp_month: number;
|
|
8449
8449
|
exp_year: number;
|
|
8450
|
+
/**
|
|
8451
|
+
* What the card is charged in, from its issuing country.
|
|
8452
|
+
*/
|
|
8453
|
+
currency: 'usd' | 'brl';
|
|
8454
|
+
/**
|
|
8455
|
+
* Units of `currency` per US dollar for a charge made now: 1 for `usd`, the Banco Central's latest closing PTAX selling rate for `brl`. `null` while that rate cannot be read.
|
|
8456
|
+
*/
|
|
8457
|
+
exchange_rate: number | null;
|
|
8450
8458
|
};
|
|
8451
8459
|
type PaymentMethodSetup = {
|
|
8452
8460
|
/**
|
|
@@ -24168,7 +24176,7 @@ type CreateCurrentUserTopUpErrors = {
|
|
|
24168
24176
|
*/
|
|
24169
24177
|
502: ErrorResponse;
|
|
24170
24178
|
/**
|
|
24171
|
-
* Card payments are not available on this deployment (`payments_not_configured`).
|
|
24179
|
+
* Card payments are not available on this deployment (`payments_not_configured`), or the exchange rate for a card charged in reais could not be read (`exchange_rate_unavailable`). Nothing was charged.
|
|
24172
24180
|
*/
|
|
24173
24181
|
503: ErrorResponse;
|
|
24174
24182
|
};
|
|
@@ -24355,6 +24363,10 @@ type SetCurrentUserPlanErrors = {
|
|
|
24355
24363
|
* The payment provider could not be reached (`payment_provider_error`).
|
|
24356
24364
|
*/
|
|
24357
24365
|
502: ErrorResponse;
|
|
24366
|
+
/**
|
|
24367
|
+
* The exchange rate for a card charged in reais could not be read (`exchange_rate_unavailable`); the plan is unchanged.
|
|
24368
|
+
*/
|
|
24369
|
+
503: ErrorResponse;
|
|
24358
24370
|
};
|
|
24359
24371
|
type SetCurrentUserPlanError = SetCurrentUserPlanErrors[keyof SetCurrentUserPlanErrors];
|
|
24360
24372
|
type SetCurrentUserPlanResponses = {
|
|
@@ -27593,7 +27605,7 @@ export declare class Users {
|
|
|
27593
27605
|
/**
|
|
27594
27606
|
* Top up credit
|
|
27595
27607
|
*
|
|
27596
|
-
* 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.
|
|
27608
|
+
* 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.
|
|
27597
27609
|
*
|
|
27598
27610
|
* 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.
|
|
27599
27611
|
*
|
|
@@ -27610,7 +27622,7 @@ export declare class Users {
|
|
|
27610
27622
|
/**
|
|
27611
27623
|
* Get the saved card
|
|
27612
27624
|
*
|
|
27613
|
-
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and
|
|
27625
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits, expiry and issuing country are kept here. A card issued in Brazil is charged in Brazilian reais, every other card in US dollars.
|
|
27614
27626
|
*
|
|
27615
27627
|
*/
|
|
27616
27628
|
static getCurrentUserPaymentMethod<ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserPaymentMethodData, ThrowOnError>): RequestResult<GetCurrentUserPaymentMethodResponses, GetCurrentUserPaymentMethodErrors, ThrowOnError>;
|
|
@@ -27647,7 +27659,7 @@ export declare class Users {
|
|
|
27647
27659
|
*
|
|
27648
27660
|
* Choose `free`, `pro` or `business`. A paid plan needs a saved card.
|
|
27649
27661
|
*
|
|
27650
|
-
* 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.
|
|
27662
|
+
* An upgrade is charged at once on the saved card, in its currency, 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.
|
|
27651
27663
|
*
|
|
27652
27664
|
*/
|
|
27653
27665
|
static setCurrentUserPlan<ThrowOnError extends boolean = false>(options: Options<SetCurrentUserPlanData, ThrowOnError>): RequestResult<SetCurrentUserPlanResponses, SetCurrentUserPlanErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -8426,7 +8426,7 @@ type TopUp = {
|
|
|
8426
8426
|
*/
|
|
8427
8427
|
id: string;
|
|
8428
8428
|
/**
|
|
8429
|
-
* What is charged,
|
|
8429
|
+
* What is credited once paid: charged in US dollars, or its equivalent in reais.
|
|
8430
8430
|
*/
|
|
8431
8431
|
amount_usd: number;
|
|
8432
8432
|
/**
|
|
@@ -8447,6 +8447,14 @@ type PaymentMethod = {
|
|
|
8447
8447
|
last4: string;
|
|
8448
8448
|
exp_month: number;
|
|
8449
8449
|
exp_year: number;
|
|
8450
|
+
/**
|
|
8451
|
+
* What the card is charged in, from its issuing country.
|
|
8452
|
+
*/
|
|
8453
|
+
currency: 'usd' | 'brl';
|
|
8454
|
+
/**
|
|
8455
|
+
* Units of `currency` per US dollar for a charge made now: 1 for `usd`, the Banco Central's latest closing PTAX selling rate for `brl`. `null` while that rate cannot be read.
|
|
8456
|
+
*/
|
|
8457
|
+
exchange_rate: number | null;
|
|
8450
8458
|
};
|
|
8451
8459
|
type PaymentMethodSetup = {
|
|
8452
8460
|
/**
|
|
@@ -24168,7 +24176,7 @@ type CreateCurrentUserTopUpErrors = {
|
|
|
24168
24176
|
*/
|
|
24169
24177
|
502: ErrorResponse;
|
|
24170
24178
|
/**
|
|
24171
|
-
* Card payments are not available on this deployment (`payments_not_configured`).
|
|
24179
|
+
* Card payments are not available on this deployment (`payments_not_configured`), or the exchange rate for a card charged in reais could not be read (`exchange_rate_unavailable`). Nothing was charged.
|
|
24172
24180
|
*/
|
|
24173
24181
|
503: ErrorResponse;
|
|
24174
24182
|
};
|
|
@@ -24355,6 +24363,10 @@ type SetCurrentUserPlanErrors = {
|
|
|
24355
24363
|
* The payment provider could not be reached (`payment_provider_error`).
|
|
24356
24364
|
*/
|
|
24357
24365
|
502: ErrorResponse;
|
|
24366
|
+
/**
|
|
24367
|
+
* The exchange rate for a card charged in reais could not be read (`exchange_rate_unavailable`); the plan is unchanged.
|
|
24368
|
+
*/
|
|
24369
|
+
503: ErrorResponse;
|
|
24358
24370
|
};
|
|
24359
24371
|
type SetCurrentUserPlanError = SetCurrentUserPlanErrors[keyof SetCurrentUserPlanErrors];
|
|
24360
24372
|
type SetCurrentUserPlanResponses = {
|
|
@@ -27593,7 +27605,7 @@ export declare class Users {
|
|
|
27593
27605
|
/**
|
|
27594
27606
|
* Top up credit
|
|
27595
27607
|
*
|
|
27596
|
-
* 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.
|
|
27608
|
+
* 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.
|
|
27597
27609
|
*
|
|
27598
27610
|
* 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.
|
|
27599
27611
|
*
|
|
@@ -27610,7 +27622,7 @@ export declare class Users {
|
|
|
27610
27622
|
/**
|
|
27611
27623
|
* Get the saved card
|
|
27612
27624
|
*
|
|
27613
|
-
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and
|
|
27625
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits, expiry and issuing country are kept here. A card issued in Brazil is charged in Brazilian reais, every other card in US dollars.
|
|
27614
27626
|
*
|
|
27615
27627
|
*/
|
|
27616
27628
|
static getCurrentUserPaymentMethod<ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserPaymentMethodData, ThrowOnError>): RequestResult<GetCurrentUserPaymentMethodResponses, GetCurrentUserPaymentMethodErrors, ThrowOnError>;
|
|
@@ -27647,7 +27659,7 @@ export declare class Users {
|
|
|
27647
27659
|
*
|
|
27648
27660
|
* Choose `free`, `pro` or `business`. A paid plan needs a saved card.
|
|
27649
27661
|
*
|
|
27650
|
-
* 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.
|
|
27662
|
+
* An upgrade is charged at once on the saved card, in its currency, 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.
|
|
27651
27663
|
*
|
|
27652
27664
|
*/
|
|
27653
27665
|
static setCurrentUserPlan<ThrowOnError extends boolean = false>(options: Options<SetCurrentUserPlanData, ThrowOnError>): RequestResult<SetCurrentUserPlanResponses, SetCurrentUserPlanErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -5429,7 +5429,7 @@ var Users = class {
|
|
|
5429
5429
|
/**
|
|
5430
5430
|
* Top up credit
|
|
5431
5431
|
*
|
|
5432
|
-
* 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.
|
|
5432
|
+
* 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.
|
|
5433
5433
|
*
|
|
5434
5434
|
* 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.
|
|
5435
5435
|
*
|
|
@@ -5460,7 +5460,7 @@ var Users = class {
|
|
|
5460
5460
|
/**
|
|
5461
5461
|
* Get the saved card
|
|
5462
5462
|
*
|
|
5463
|
-
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and
|
|
5463
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits, expiry and issuing country are kept here. A card issued in Brazil is charged in Brazilian reais, every other card in US dollars.
|
|
5464
5464
|
*
|
|
5465
5465
|
*/
|
|
5466
5466
|
static getCurrentUserPaymentMethod(options) {
|
|
@@ -5526,7 +5526,7 @@ var Users = class {
|
|
|
5526
5526
|
*
|
|
5527
5527
|
* Choose `free`, `pro` or `business`. A paid plan needs a saved card.
|
|
5528
5528
|
*
|
|
5529
|
-
* 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.
|
|
5529
|
+
* An upgrade is charged at once on the saved card, in its currency, 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.
|
|
5530
5530
|
*
|
|
5531
5531
|
*/
|
|
5532
5532
|
static setCurrentUserPlan(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.172.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
34
|
-
"@naturali/api": "0.
|
|
34
|
+
"@naturali/api": "0.172.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|