@boelabs/billete-sdk 9.1.0 → 10.0.0-beta.1

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/README.md CHANGED
@@ -63,7 +63,7 @@ Crea una clave secreta en el dashboard (**Desarrolladores → Claves API**) y gu
63
63
  ```ts
64
64
  import { createBillete } from "@boelabs/billete-sdk";
65
65
 
66
- const billete = createBillete({ apiVersion: "2026-10-24", environment: "test" });
66
+ const billete = createBillete({ apiVersion: "2026-11-06.beta", environment: "test" });
67
67
 
68
68
  const checkout = await billete.checkouts.create({
69
69
  plan: "plan_…",
@@ -91,7 +91,7 @@ solicite expresamente. En carritos, solo ofrece los demás métodos que todos lo
91
91
 
92
92
  ```ts
93
93
  const billete = createBillete({
94
- apiVersion: "2026-10-24",
94
+ apiVersion: "2026-11-06.beta",
95
95
  environment: "production",
96
96
  apiKey: process.env.BILLETE_API_KEY,
97
97
  timeoutMs: 30_000,
@@ -136,8 +136,6 @@ Todos los métodos devuelven promesas con el recurso tipado. Los recursos con li
136
136
  | `subscriptions` | `cancel`, `resume` |
137
137
  | `payments` | `refund`, `listRefunds` |
138
138
  | `fulfillments` | `deliver`, `submitTracking` (entregas de productos físicos; también `retrieve`, `list` e `iterate`) |
139
- | `payouts` | — |
140
- | `balance` | `retrieve` |
141
139
  | `webhookEndpoints` | `delete` |
142
140
  | `events` | `retrieve`, `list`, `iterate` |
143
141
  | `exchangeRates` | `list` |
@@ -257,7 +255,7 @@ return { token: session.token };
257
255
  // Navegador
258
256
  import { createClient } from "@boelabs/billete-sdk/client";
259
257
 
260
- const billete = createClient({ apiVersion: "2026-10-24", customerSession: token });
258
+ const billete = createClient({ apiVersion: "2026-11-06.beta", customerSession: token });
261
259
 
262
260
  const { data: subscriptions } = await billete.customer.subscriptions();
263
261
  const tokens = await billete.customer.feature("tokens");
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as PortalSessionCreate, A as CustomerSessionCreate, At as PublicPaymentLink, B as FulfillmentTrackingInput, Bt as LatestApiVersion, C as CouponCreate, Ct as PublicCheckout, D as CustomerInput, Dt as PublicFulfillment, E as CustomerCreate, Et as PublicClaimSummary, F as FeatureOperationCreate, Ft as API_VERSION_PATTERN, G as PaymentLinkUpdate, Gt as isApiVersionRetired, H as InvoiceLineInput, Ht as apiVersionStage, I as FeatureUpdate, It as ApiVersion, J as PlanCreate, K as PlanCheckoutCreate, Kt as supportedApiVersions, L as FulfillmentDeliverInput, Lt as ApiVersionLifecycle, M as EventSelector, Mt as PublicPortal, N as FeatureCreate, Nt as API_VERSIONS, O as CustomerMemberCreate, Ot as PublicFulfillmentRefund, P as FeatureOperationCommit, Pt as API_VERSION_HEADER, Q as PlanUpdate, R as FulfillmentHandoverInput, Rt as ApiVersionStage, S as CollectInput, St as PortalFeatures, T as CustomFieldInput, Tt as PublicClaim, U as KEY_PATTERN, Ut as currentApiVersion, V as InvoiceCreate, Vt as apiVersionLifecycle, W as PaymentLinkCreate, Wt as isApiVersion, X as PlanLinkCreate, Y as PlanFeaturesInput, Z as PlanPriceInput, _ as ClientPaymentCode, _t as PaymentInstructions, a as AfterCompletionInput, at as RefundCreate, b as ClientSubscriptionSeats, bt as PaymentNextAction, c as ClaimResolve, ct as SubscriptionChangePreviewInput, d as ClientCheckoutUpdate, dt as VariantInput, et as ProductCheckoutCreate, f as ClientClaimCreate, ft as WebhookEndpointCreate, g as ClientLinkCheckout, gt as FulfillmentOption, h as ClientInvoicePay, ht as CustomerSubscriptionChangeResult, i as TransportOptions, it as ProductUpdate, j as CustomerUpdate, jt as PublicPaymentState, k as CustomerMemberUpdate, kt as PublicInvoice, l as ClaimRespond, lt as SubscriptionCreate, m as ClientFulfillmentProblem, mt as CustomerSubscription, n as BilleteErrorCode, nt as ProductCreate, o as CheckoutCreate, ot as SubscriptionCancel, p as ClientCustomerClaimCreate, pt as WebhookEndpointUpdate, q as PlanCouponCreate, r as RequestOptions, rt as ProductLinkCreate, s as CheckoutItemInput, st as SubscriptionChangeCreate, t as BilleteError, tt as ProductCouponCreate, u as ClientCheckoutPay, ut as SubscriptionUpdate, v as ClientRefundDestination, vt as PaymentMethodField, w as CouponUpdate, wt as PublicCheckoutItem, x as ClientSubscriptionUpdate, xt as PaymentTestScenario, y as ClientSubscriptionCancel, yt as PaymentMethodOption, z as FulfillmentInput, zt as LATEST_API_VERSION } from "./errors-B7u708iH.js";
2
- import { $ as FulfillmentHandover, $t as PAYMENT_FAILURE_CODES, A as Coupon, An as ENVIRONMENTS, At as RISK_LEVELS, B as Event, Bt as SubscriptionChangeResult, C as CheckoutPurpose, Cn as TaxBehavior, Ct as PlanSeats, D as ClaimReason, Dn as isLandlinePhone, Dt as ProductVariant, E as ClaimOutcome, En as findBank, Et as ProductCategory, F as CustomerFeature, Ft as SUBSCRIPTION_STATUSES, G as Feature, Gt as WebhookEndpoint, H as FEATURE_TYPES, Ht as SubscriptionStatus, I as CustomerMember, It as SubmitLabel, J as FeatureReset, Jt as ReceiptSend, K as FeatureOperation, Kt as Weekday, L as CustomerMemberList, Lt as Subscription, M as CustomField, Mn as TokenKind, Mt as ResetFrequency, N as Customer, Nn as tokenEnvironment, Nt as RiskLevel, O as ClaimStatus, On as isMobilePhone, Ot as REFUND_MODES, P as CustomerDetails, Pn as tokenPrefix, Pt as SUBMIT_LABELS, Q as FulfillmentChoice, Qt as ApiErrorType, R as CustomerSession, Rt as SubscriptionChange, S as CheckoutItem, Sn as TAX_BEHAVIORS, St as PlanPrice, T as ClaimMessage, Tn as VENEZUELAN_BANKS, Tt as Product, U as FULFILLMENT_METHODS, Ut as SubscriptionTerms, V as ExchangeRate, Vt as SubscriptionRenewal, W as FULFILLMENT_STATUSES, Wt as USAGE_FEATURE_TYPES, X as FeatureUsageResult, Xt as ApiErrorBody, Y as FeatureType, Yt as API_ERROR_TYPES, Z as Fulfillment, Zt as ApiErrorEnvelope, _ as CLAIM_STATUSES, _n as MOBILE_PREFIXES, _t as PaymentSettlement, a as WEBHOOK_TEST_EVENT, an as AddressInput, at as Invoice, b as CarrierOffice, bn as SUSPENSION_DAYS, bt as Plan, c as AfterCompletion, cn as BillingMonths, ct as LineItem, d as CANCELLATION_FEEDBACK, dn as GRACE_PERIOD_DAYS, dt as PRODUCT_CATEGORIES, en as PaymentFailureCode, et as FulfillmentMethod, f as CARRIERS, fn as GracePeriodDays, ft as Payment, g as CLAIM_REASONS, gn as MAX_QUANTITY, gt as PaymentLink, h as CLAIM_OUTCOMES, hn as ListSort, ht as PaymentFeeDetails, i as SubscribableEventType, in as Address, it as INVOICE_STATUSES, j as CurrencyAvailability, jn as Environment, jt as Refund, k as CollectSettings, kn as nationalPhone, kt as RESET_FREQUENCIES, l as Balance, ln as CURRENCIES, lt as MAX_SEATS, m as CHECKOUT_PURPOSES, mn as ListQuery, mt as PaymentFailure, n as EventDataMap, nn as ApiErrorCode, nt as FulfillmentTracking, o as WebhookEvent, on as BILLING_MONTHS, ot as InvoiceReason, p as CARRIER_TEST_SCENARIOS, pn as List, pt as PaymentAttempt, q as FeatureOperationResult, qt as ReceiptReference, r as EventType, rn as ACCOUNT_NUMBER_LENGTH, rt as INVOICE_REASONS, s as Actor, sn as BankCode, st as InvoiceStatus, t as EVENT_TYPES, tn as API_ERROR_CODES, tt as FulfillmentStatus, u as BalanceAmount, un as Currency, ut as PAYMENT_STATUSES, v as CancellationFeedback, vn as Metadata, vt as PaymentStatus, w as Claim, wn as Timestamp, wt as PortalSession, x as Checkout, xn as SuspensionDays, xt as PlanFeatureValues, y as Carrier, yn as MobilePrefix, yt as Payout, z as Deletion, zt as SubscriptionChangePreview } from "./events-TqSJMxqF.js";
1
+ import { $ as PortalSessionCreate, A as CustomerSessionCreate, At as PublicFulfillmentRefund, B as FulfillmentTrackingInput, Bt as ApiVersion, C as CouponCreate, Ct as PaymentsUnavailable, D as CustomerInput, Dt as PublicClaim, E as CustomerCreate, Et as PublicCheckoutItem, F as FeatureOperationCreate, Ft as PublicPortal, G as PaymentLinkUpdate, Gt as apiVersionLifecycle, H as InvoiceLineInput, Ht as ApiVersionStage, I as FeatureUpdate, It as PublicRefund, J as PlanCreate, Jt as isApiVersion, K as PlanCheckoutCreate, Kt as apiVersionStage, L as FulfillmentDeliverInput, Lt as API_VERSIONS, M as EventSelector, Mt as PublicMerchant, N as FeatureCreate, Nt as PublicPaymentLink, O as CustomerMemberCreate, Ot as PublicClaimSummary, P as FeatureOperationCommit, Pt as PublicPaymentState, Q as PlanUpdate, R as FulfillmentHandoverInput, Rt as API_VERSION_HEADER, S as CollectInput, St as PaymentTestScenario, T as CustomFieldInput, Tt as PublicCheckout, U as KEY_PATTERN, Ut as LATEST_API_VERSION, V as InvoiceCreate, Vt as ApiVersionLifecycle, W as PaymentLinkCreate, Wt as LatestApiVersion, X as PlanLinkCreate, Xt as supportedApiVersions, Y as PlanFeaturesInput, Yt as isApiVersionRetired, Z as PlanPriceInput, _ as ClientPaymentCode, _t as PaymentInstructions, a as AfterCompletionInput, at as RefundCreate, b as ClientSubscriptionSeats, bt as PaymentMethodOption, c as ClaimResolve, ct as SubscriptionChangePreviewInput, d as ClientCheckoutUpdate, dt as VariantInput, et as ProductCheckoutCreate, f as ClientClaimCreate, ft as WebhookEndpointCreate, g as ClientLinkCheckout, gt as FulfillmentOption, h as ClientInvoicePay, ht as CustomerSubscriptionChangeResult, i as TransportOptions, it as ProductUpdate, j as CustomerUpdate, jt as PublicInvoice, k as CustomerMemberUpdate, kt as PublicFulfillment, l as ClaimRespond, lt as SubscriptionCreate, m as ClientFulfillmentProblem, mt as CustomerSubscription, n as BilleteErrorCode, nt as ProductCreate, o as CheckoutCreate, ot as SubscriptionCancel, p as ClientCustomerClaimCreate, pt as WebhookEndpointUpdate, q as PlanCouponCreate, qt as currentApiVersion, r as RequestOptions, rt as ProductLinkCreate, s as CheckoutItemInput, st as SubscriptionChangeCreate, t as BilleteError, tt as ProductCouponCreate, u as ClientCheckoutPay, ut as SubscriptionUpdate, v as ClientRefundDestination, vt as PaymentMethodField, w as CouponUpdate, wt as PortalFeatures, x as ClientSubscriptionUpdate, xt as PaymentNextAction, y as ClientSubscriptionCancel, yt as PaymentMethodList, z as FulfillmentInput, zt as API_VERSION_PATTERN } from "./errors-Dk3plV2O.js";
2
+ import { $ as FulfillmentStatus, $t as API_ERROR_CODES, A as CustomField, An as TokenKind, At as ResetFrequency, B as FEATURE_TYPES, Bt as SubscriptionStatus, C as ClaimMessage, Cn as VENEZUELAN_BANKS, Ct as ProductCategory, D as CollectSettings, Dn as nationalPhone, Dt as RESET_FREQUENCIES, E as ClaimStatus, En as isMobilePhone, Et as REFUND_MODES, F as CustomerMemberList, Ft as Subscription, G as FeatureOperationResult, Gt as ReceiptReference, H as FULFILLMENT_STATUSES, Ht as USAGE_FEATURE_TYPES, I as CustomerSession, It as SubscriptionChange, J as FeatureUsageResult, Jt as ApiErrorBody, K as FeatureReset, Kt as ReceiptSend, L as Deletion, Lt as SubscriptionChangePreview, M as CustomerDetails, Mn as tokenPrefix, Mt as SUBMIT_LABELS, N as CustomerFeature, Nt as SUBSCRIPTION_STATUSES, O as Coupon, On as ENVIRONMENTS, Ot as RISK_LEVELS, P as CustomerMember, Pt as SubmitLabel, Q as FulfillmentMethod, Qt as PaymentFailureCode, R as Event, Rt as SubscriptionChangeResult, S as Claim, Sn as Timestamp, St as Product, T as ClaimReason, Tn as isLandlinePhone, Tt as ProductVariant, U as Feature, Ut as WebhookEndpoint, V as FULFILLMENT_METHODS, Vt as SubscriptionTerms, W as FeatureOperation, Wt as Weekday, X as FulfillmentChoice, Xt as ApiErrorType, Y as Fulfillment, Yt as ApiErrorEnvelope, Z as FulfillmentHandover, Zt as PAYMENT_FAILURE_CODES, _ as Carrier, _n as MobilePrefix, _t as Plan, a as WEBHOOK_TEST_EVENT, an as BankCode, at as InvoiceStatus, b as CheckoutItem, bn as TAX_BEHAVIORS, bt as PlanSeats, c as AfterCompletion, cn as Currency, ct as PAYMENT_STATUSES, d as CARRIER_TEST_SCENARIOS, dn as List, dt as PaymentAttempt, en as ApiErrorCode, et as FulfillmentTracking, f as CHECKOUT_PURPOSES, fn as ListQuery, ft as PaymentFailure, g as CancellationFeedback, gn as Metadata, gt as PaymentStatus, h as CLAIM_STATUSES, hn as MOBILE_PREFIXES, ht as PaymentSettlement, i as SubscribableEventType, in as BILLING_MONTHS, it as InvoiceReason, j as Customer, jn as tokenEnvironment, jt as RiskLevel, k as CurrencyAvailability, kn as Environment, kt as Refund, l as CANCELLATION_FEEDBACK, ln as GRACE_PERIOD_DAYS, lt as PRODUCT_CATEGORIES, m as CLAIM_REASONS, mn as MAX_QUANTITY, mt as PaymentLink, n as EventDataMap, nn as Address, nt as INVOICE_STATUSES, o as WebhookEvent, on as BillingMonths, ot as LineItem, p as CLAIM_OUTCOMES, pn as ListSort, pt as PaymentFeeDetails, q as FeatureType, qt as API_ERROR_TYPES, r as EventType, rn as AddressInput, rt as Invoice, s as Actor, sn as CURRENCIES, st as MAX_SEATS, t as EVENT_TYPES, tn as ACCOUNT_NUMBER_LENGTH, tt as INVOICE_REASONS, u as CARRIERS, un as GracePeriodDays, ut as Payment, v as CarrierOffice, vn as SUSPENSION_DAYS, vt as PlanFeatureValues, w as ClaimOutcome, wn as findBank, wt as ProductImage, x as CheckoutPurpose, xn as TaxBehavior, xt as PortalSession, y as Checkout, yn as SuspensionDays, yt as PlanPrice, z as ExchangeRate, zt as SubscriptionRenewal } from "./events-CLifhYGq.js";
3
3
  interface ClientOptions extends TransportOptions {
4
4
  /**
5
5
  * Token from `billete.customerSessions.create()` on your server. Needed only for the
@@ -13,7 +13,7 @@ interface ClientOptions extends TransportOptions {
13
13
  * and customer data requires a short-lived customer session minted by your server.
14
14
  *
15
15
  * ```ts
16
- * const billete = createClient({ apiVersion: "2026-10-24", customerSession: token });
16
+ * const billete = createClient({ apiVersion: "2026-11-06.beta", customerSession: token });
17
17
  * const [subscription] = (await billete.customer.subscriptions()).data;
18
18
  * if (subscription?.renewal?.status === "overdue") showBanner(subscription.renewal);
19
19
  * ```
@@ -40,7 +40,7 @@ export declare function createClient(options: ClientOptions): {
40
40
  /** Changes quantity, variant, billing cycle or coupon on a payment link checkout. */
41
41
  update: (id: string, changes: ClientCheckoutUpdate, options?: RequestOptions) => Promise<PublicCheckout>;
42
42
  /** Methods that can pay this checkout, with the converted amount and transfer details. */
43
- paymentMethods: (id: string, options?: RequestOptions) => Promise<List<PaymentMethodOption>>;
43
+ paymentMethods: (id: string, options?: RequestOptions) => Promise<PaymentMethodList>;
44
44
  /** Submits the payment; the returned checkout carries the payment status and any failure. */
45
45
  pay: (id: string, input: ClientCheckoutPay, options?: RequestOptions) => Promise<PublicCheckout>;
46
46
  openClaim: (id: string, input: ClientClaimCreate, options?: RequestOptions) => Promise<PublicClaim>;
@@ -62,7 +62,7 @@ export declare function createClient(options: ClientOptions): {
62
62
  waitSeconds?: number;
63
63
  }) => Promise<PublicInvoice>;
64
64
  /** Methods that can pay this Cobro, with the converted amount and transfer details. */
65
- paymentMethods: (id: string, options?: RequestOptions) => Promise<List<PaymentMethodOption>>;
65
+ paymentMethods: (id: string, options?: RequestOptions) => Promise<PaymentMethodList>;
66
66
  /** Submits the payment; the returned Cobro carries the payment status and any failure. */
67
67
  pay: (id: string, input: ClientInvoicePay, options?: RequestOptions) => Promise<PublicInvoice>;
68
68
  openClaim: (id: string, input: ClientClaimCreate, options?: RequestOptions) => Promise<PublicClaim>;
@@ -81,14 +81,23 @@ export declare function createClient(options: ClientOptions): {
81
81
  * claim (`claim`), whose page (`claim.url`) the customer follows.
82
82
  */
83
83
  openClaim: (token: string, input: ClientClaimCreate, options?: RequestOptions) => Promise<PublicFulfillment>;
84
- /** Something went wrong: the funds stay held while Billete reviews it. */
84
+ /** Something went wrong: Billete reviews it between the business and its customer. */
85
85
  reportProblem: (token: string, input: ClientFulfillmentProblem, options?: RequestOptions) => Promise<PublicFulfillment>;
86
86
  /**
87
- * Where Billete sends the customer's refund by Pago Móvil, while it waits for one
87
+ * Where the business sends the customer's refund by Pago Móvil, while it waits for one
88
88
  * (`refund.status: "needs_destination"`).
89
89
  */
90
90
  setRefundDestination: (token: string, input: ClientRefundDestination, options?: RequestOptions) => Promise<PublicFulfillment>;
91
91
  };
92
+ /**
93
+ * A refund its business returns by Pago Móvil, as its customer follows it. The `token` comes in
94
+ * its page's link, sent by email when the business needs to know where to send it.
95
+ */
96
+ refunds: {
97
+ retrieve: (token: string, options?: RequestOptions) => Promise<PublicRefund>;
98
+ /** Where to receive it, while the business waits for it (`refund.status: "needs_destination"`). */
99
+ setDestination: (token: string, input: ClientRefundDestination, options?: RequestOptions) => Promise<PublicRefund>;
100
+ };
92
101
  /**
93
102
  * A claim about a payment, as its customer follows it. The `token` comes in its page's link
94
103
  * (`url`), sent by email when it is opened, and is the only credential.
@@ -137,4 +146,4 @@ export declare function createClient(options: ClientOptions): {
137
146
  };
138
147
  };
139
148
  type BilleteClient = ReturnType<typeof createClient>;
140
- export { type ACCOUNT_NUMBER_LENGTH, type API_ERROR_CODES, type API_ERROR_TYPES, type API_VERSIONS, type API_VERSION_HEADER, type API_VERSION_PATTERN, type Actor, type Address, type AddressInput, type AfterCompletion, type AfterCompletionInput, type ApiErrorBody, type ApiErrorCode, type ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type BilleteClient, BilleteError, type BilleteErrorCode, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CLAIM_OUTCOMES, type CLAIM_REASONS, type CLAIM_STATUSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type Claim, type ClaimMessage, type ClaimOutcome, type ClaimReason, type ClaimResolve, type ClaimRespond, type ClaimStatus, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientClaimCreate, type ClientCustomerClaimCreate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientOptions, type ClientPaymentCode, type ClientRefundDestination, type ClientSubscriptionCancel, type ClientSubscriptionSeats, type ClientSubscriptionUpdate, type CollectInput, type CollectSettings, type Coupon, type CouponCreate, type CouponUpdate, type Currency, type CurrencyAvailability, type CustomField, type CustomFieldInput, type Customer, type CustomerCreate, type CustomerDetails, type CustomerFeature, type CustomerInput, type CustomerMember, type CustomerMemberCreate, type CustomerMemberList, type CustomerMemberUpdate, type CustomerSession, type CustomerSessionCreate, type CustomerSubscription, type CustomerSubscriptionChangeResult, type CustomerUpdate, type Deletion, type ENVIRONMENTS, type EVENT_TYPES, type Environment, type Event, type EventDataMap, type EventSelector, type EventType, type ExchangeRate, type FEATURE_TYPES, type FULFILLMENT_METHODS, type FULFILLMENT_STATUSES, type Feature, type FeatureCreate, type FeatureOperation, type FeatureOperationCommit, type FeatureOperationCreate, type FeatureOperationResult, type FeatureReset, type FeatureType, type FeatureUpdate, type FeatureUsageResult, type Fulfillment, type FulfillmentChoice, type FulfillmentDeliverInput, type FulfillmentHandover, type FulfillmentHandoverInput, type FulfillmentInput, type FulfillmentMethod, type FulfillmentOption, type FulfillmentStatus, type FulfillmentTracking, type FulfillmentTrackingInput, type GRACE_PERIOD_DAYS, type GracePeriodDays, type INVOICE_REASONS, type INVOICE_STATUSES, type Invoice, type InvoiceCreate, type InvoiceLineInput, type InvoiceReason, type InvoiceStatus, type KEY_PATTERN, type LATEST_API_VERSION, type LatestApiVersion, type LineItem, type List, type ListQuery, type ListSort, type MAX_QUANTITY, type MAX_SEATS, type MOBILE_PREFIXES, type Metadata, type MobilePrefix, type PAYMENT_FAILURE_CODES, type PAYMENT_STATUSES, type PRODUCT_CATEGORIES, type Payment, type PaymentAttempt, type PaymentFailure, type PaymentFailureCode, type PaymentFeeDetails, type PaymentInstructions, type PaymentLink, type PaymentLinkCreate, type PaymentLinkUpdate, type PaymentMethodField, type PaymentMethodOption, type PaymentNextAction, type PaymentSettlement, type PaymentStatus, type PaymentTestScenario, type Payout, type Plan, type PlanCheckoutCreate, type PlanCouponCreate, type PlanCreate, type PlanFeatureValues, type PlanFeaturesInput, type PlanLinkCreate, type PlanPrice, type PlanPriceInput, type PlanSeats, type PlanUpdate, type PortalFeatures, type PortalSession, type PortalSessionCreate, type Product, type ProductCategory, type ProductCheckoutCreate, type ProductCouponCreate, type ProductCreate, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicCheckoutItem, type PublicClaim, type PublicClaimSummary, type PublicFulfillment, type PublicFulfillmentRefund, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type REFUND_MODES, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SUSPENSION_DAYS, type SubmitLabel, type SubscribableEventType, type Subscription, type SubscriptionCancel, type SubscriptionChange, type SubscriptionChangeCreate, type SubscriptionChangePreview, type SubscriptionChangePreviewInput, type SubscriptionChangeResult, type SubscriptionCreate, type SubscriptionRenewal, type SubscriptionStatus, type SubscriptionTerms, type SubscriptionUpdate, type SuspensionDays, type TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, type WEBHOOK_TEST_EVENT, type WebhookEndpoint, type WebhookEndpointCreate, type WebhookEndpointUpdate, type WebhookEvent, type Weekday, type apiVersionLifecycle, type apiVersionStage, type currentApiVersion, type findBank, type isApiVersion, type isApiVersionRetired, type isLandlinePhone, type isMobilePhone, type nationalPhone, type supportedApiVersions, type tokenEnvironment, type tokenPrefix };
149
+ export { type ACCOUNT_NUMBER_LENGTH, type API_ERROR_CODES, type API_ERROR_TYPES, type API_VERSIONS, type API_VERSION_HEADER, type API_VERSION_PATTERN, type Actor, type Address, type AddressInput, type AfterCompletion, type AfterCompletionInput, type ApiErrorBody, type ApiErrorCode, type ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type BankCode, type BilleteClient, BilleteError, type BilleteErrorCode, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CLAIM_OUTCOMES, type CLAIM_REASONS, type CLAIM_STATUSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type Claim, type ClaimMessage, type ClaimOutcome, type ClaimReason, type ClaimResolve, type ClaimRespond, type ClaimStatus, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientClaimCreate, type ClientCustomerClaimCreate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientOptions, type ClientPaymentCode, type ClientRefundDestination, type ClientSubscriptionCancel, type ClientSubscriptionSeats, type ClientSubscriptionUpdate, type CollectInput, type CollectSettings, type Coupon, type CouponCreate, type CouponUpdate, type Currency, type CurrencyAvailability, type CustomField, type CustomFieldInput, type Customer, type CustomerCreate, type CustomerDetails, type CustomerFeature, type CustomerInput, type CustomerMember, type CustomerMemberCreate, type CustomerMemberList, type CustomerMemberUpdate, type CustomerSession, type CustomerSessionCreate, type CustomerSubscription, type CustomerSubscriptionChangeResult, type CustomerUpdate, type Deletion, type ENVIRONMENTS, type EVENT_TYPES, type Environment, type Event, type EventDataMap, type EventSelector, type EventType, type ExchangeRate, type FEATURE_TYPES, type FULFILLMENT_METHODS, type FULFILLMENT_STATUSES, type Feature, type FeatureCreate, type FeatureOperation, type FeatureOperationCommit, type FeatureOperationCreate, type FeatureOperationResult, type FeatureReset, type FeatureType, type FeatureUpdate, type FeatureUsageResult, type Fulfillment, type FulfillmentChoice, type FulfillmentDeliverInput, type FulfillmentHandover, type FulfillmentHandoverInput, type FulfillmentInput, type FulfillmentMethod, type FulfillmentOption, type FulfillmentStatus, type FulfillmentTracking, type FulfillmentTrackingInput, type GRACE_PERIOD_DAYS, type GracePeriodDays, type INVOICE_REASONS, type INVOICE_STATUSES, type Invoice, type InvoiceCreate, type InvoiceLineInput, type InvoiceReason, type InvoiceStatus, type KEY_PATTERN, type LATEST_API_VERSION, type LatestApiVersion, type LineItem, type List, type ListQuery, type ListSort, type MAX_QUANTITY, type MAX_SEATS, type MOBILE_PREFIXES, type Metadata, type MobilePrefix, type PAYMENT_FAILURE_CODES, type PAYMENT_STATUSES, type PRODUCT_CATEGORIES, type Payment, type PaymentAttempt, type PaymentFailure, type PaymentFailureCode, type PaymentFeeDetails, type PaymentInstructions, type PaymentLink, type PaymentLinkCreate, type PaymentLinkUpdate, type PaymentMethodField, type PaymentMethodList, type PaymentMethodOption, type PaymentNextAction, type PaymentSettlement, type PaymentStatus, type PaymentTestScenario, type PaymentsUnavailable, type Plan, type PlanCheckoutCreate, type PlanCouponCreate, type PlanCreate, type PlanFeatureValues, type PlanFeaturesInput, type PlanLinkCreate, type PlanPrice, type PlanPriceInput, type PlanSeats, type PlanUpdate, type PortalFeatures, type PortalSession, type PortalSessionCreate, type Product, type ProductCategory, type ProductCheckoutCreate, type ProductCouponCreate, type ProductCreate, type ProductImage, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicCheckoutItem, type PublicClaim, type PublicClaimSummary, type PublicFulfillment, type PublicFulfillmentRefund, type PublicInvoice, type PublicMerchant, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type PublicRefund, type REFUND_MODES, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SUSPENSION_DAYS, type SubmitLabel, type SubscribableEventType, type Subscription, type SubscriptionCancel, type SubscriptionChange, type SubscriptionChangeCreate, type SubscriptionChangePreview, type SubscriptionChangePreviewInput, type SubscriptionChangeResult, type SubscriptionCreate, type SubscriptionRenewal, type SubscriptionStatus, type SubscriptionTerms, type SubscriptionUpdate, type SuspensionDays, type TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, type WEBHOOK_TEST_EVENT, type WebhookEndpoint, type WebhookEndpointCreate, type WebhookEndpointUpdate, type WebhookEvent, type Weekday, type apiVersionLifecycle, type apiVersionStage, type currentApiVersion, type findBank, type isApiVersion, type isApiVersionRetired, type isLandlinePhone, type isMobilePhone, type nationalPhone, type supportedApiVersions, type tokenEnvironment, type tokenPrefix };
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as segment, r as BilleteError, t as createTransport } from "./http-B4z0Sbfu.js";
1
+ import { n as segment, r as BilleteError, t as createTransport } from "./http-moOPtD7S.js";
2
2
  // src/create-client.ts
3
3
  /**
4
4
  * Browser client. It never holds a secret key: checkouts and Cobros are addressed by their
@@ -6,7 +6,7 @@ import { n as segment, r as BilleteError, t as createTransport } from "./http-B4
6
6
  * and customer data requires a short-lived customer session minted by your server.
7
7
  *
8
8
  * ```ts
9
- * const billete = createClient({ apiVersion: "2026-10-24", customerSession: token });
9
+ * const billete = createClient({ apiVersion: "2026-11-06.beta", customerSession: token });
10
10
  * const [subscription] = (await billete.customer.subscriptions()).data;
11
11
  * if (subscription?.renewal?.status === "overdue") showBanner(subscription.renewal);
12
12
  * ```
@@ -67,6 +67,7 @@ function createClient(options) {
67
67
  });
68
68
  const invoicePath = (id) => `/v1/client/invoices/${segment(id)}`;
69
69
  const fulfillmentPath = (token) => `/v1/client/fulfillments/${segment(token)}`;
70
+ const refundPath = (token) => `/v1/client/refunds/${segment(token)}`;
70
71
  const claimPath = (token) => `/v1/client/claims/${segment(token)}`;
71
72
  /** Opens a claim about the payment of a paid checkout or Cobro, from its page. */
72
73
  const openClaim = (path) => (id, input, options) => http.request({
@@ -163,7 +164,7 @@ function createClient(options) {
163
164
  body: input,
164
165
  options
165
166
  }),
166
- /** Something went wrong: the funds stay held while Billete reviews it. */
167
+ /** Something went wrong: Billete reviews it between the business and its customer. */
167
168
  reportProblem: (token, input, options) => http.request({
168
169
  method: "POST",
169
170
  path: `${fulfillmentPath(token)}/problem`,
@@ -171,7 +172,7 @@ function createClient(options) {
171
172
  options
172
173
  }),
173
174
  /**
174
- * Where Billete sends the customer's refund by Pago Móvil, while it waits for one
175
+ * Where the business sends the customer's refund by Pago Móvil, while it waits for one
175
176
  * (`refund.status: "needs_destination"`).
176
177
  */
177
178
  setRefundDestination: (token, input, options) => http.request({
@@ -182,6 +183,24 @@ function createClient(options) {
182
183
  })
183
184
  },
184
185
  /**
186
+ * A refund its business returns by Pago Móvil, as its customer follows it. The `token` comes in
187
+ * its page's link, sent by email when the business needs to know where to send it.
188
+ */
189
+ refunds: {
190
+ retrieve: (token, options) => http.request({
191
+ method: "GET",
192
+ path: refundPath(token),
193
+ options
194
+ }),
195
+ /** Where to receive it, while the business waits for it (`refund.status: "needs_destination"`). */
196
+ setDestination: (token, input, options) => http.request({
197
+ method: "PUT",
198
+ path: `${refundPath(token)}/destination`,
199
+ body: input,
200
+ options
201
+ })
202
+ },
203
+ /**
185
204
  * A claim about a payment, as its customer follows it. The `token` comes in its page's link
186
205
  * (`url`), sent by email when it is opened, and is the only credential.
187
206
  */
@@ -1,4 +1,4 @@
1
- import { C as CheckoutPurpose, Cn as TaxBehavior, Ct as PlanSeats, D as ClaimReason, E as ClaimOutcome, Et as ProductCategory, It as SubmitLabel, J as FeatureReset, Lt as Subscription, M as CustomField, O as ClaimStatus, P as CustomerDetails, Qt as ApiErrorType, S as CheckoutItem, St as PlanPrice, T as ClaimMessage, Xt as ApiErrorBody, Z as Fulfillment, an as AddressInput, b as CarrierOffice, c as AfterCompletion, cn as BillingMonths, ct as LineItem, en as PaymentFailureCode, et as FulfillmentMethod, fn as GracePeriodDays, i as SubscribableEventType, in as Address, jn as Environment, jt as Refund, k as CollectSettings, mt as PaymentFailure, nn as ApiErrorCode, nt as FulfillmentTracking, ot as InvoiceReason, qt as ReceiptReference, st as InvoiceStatus, tt as FulfillmentStatus, un as Currency, v as CancellationFeedback, vn as Metadata, vt as PaymentStatus, wn as Timestamp, xn as SuspensionDays, y as Carrier } from "./events-TqSJMxqF.js";
1
+ import { $ as FulfillmentStatus, A as CustomField, C as ClaimMessage, Ct as ProductCategory, D as CollectSettings, E as ClaimStatus, Ft as Subscription, Gt as ReceiptReference, Jt as ApiErrorBody, K as FeatureReset, M as CustomerDetails, Pt as SubmitLabel, Q as FulfillmentMethod, Qt as PaymentFailureCode, Sn as Timestamp, T as ClaimReason, Xt as ApiErrorType, Y as Fulfillment, _ as Carrier, at as InvoiceStatus, b as CheckoutItem, bt as PlanSeats, c as AfterCompletion, cn as Currency, dn as List, en as ApiErrorCode, et as FulfillmentTracking, ft as PaymentFailure, g as CancellationFeedback, gn as Metadata, gt as PaymentStatus, i as SubscribableEventType, it as InvoiceReason, kn as Environment, kt as Refund, nn as Address, on as BillingMonths, ot as LineItem, rn as AddressInput, un as GracePeriodDays, v as CarrierOffice, w as ClaimOutcome, x as CheckoutPurpose, xn as TaxBehavior, yn as SuspensionDays, yt as PlanPrice } from "./events-CLifhYGq.js";
2
2
  /**
3
3
  * Billete API versions. Kept free of runtime dependencies: the dashboard, the API, the worker and
4
4
  * the docs read it, and the public SDK pins its newest entry as a type.
@@ -12,7 +12,7 @@ import { C as CheckoutPurpose, Cn as TaxBehavior, Ct as PlanSeats, D as ClaimRea
12
12
  * Every version published, oldest first. The history starts at `2026-10-24`, the first version
13
13
  * open to businesses. Append only: retired versions stay listed.
14
14
  */
15
- declare const API_VERSIONS: readonly ["2026-10-24"];
15
+ declare const API_VERSIONS: readonly ["2026-10-24", "2026-11-06.beta"];
16
16
  type ApiVersion = (typeof API_VERSIONS)[number];
17
17
  type LatestApiVersion = typeof API_VERSIONS extends readonly [...unknown[], infer Last] ? Last : never;
18
18
  /** The version the code speaks: responses are built in its shape. Always the last entry. */
@@ -48,6 +48,14 @@ declare function currentApiVersion(): ApiVersion;
48
48
  * A subscription as its customer sees it, in the browser: without the business's `metadata`, with
49
49
  * its plan's name and the cycles the customer may switch to.
50
50
  */
51
+ /** The business a customer pays, as its pages show it. */
52
+ interface PublicMerchant {
53
+ name: string;
54
+ supportEmail: string | null;
55
+ supportPhone: string | null;
56
+ /** Its logo, when it uploaded one; otherwise pages show its initial. */
57
+ logoUrl: string | null;
58
+ }
51
59
  interface CustomerSubscription extends Omit<Subscription, "metadata"> {
52
60
  plan: {
53
61
  name: string;
@@ -85,11 +93,7 @@ interface PortalFeatures {
85
93
  interface PublicPortal {
86
94
  object: "portal";
87
95
  environment: Environment;
88
- merchant: {
89
- name: string;
90
- supportEmail: string | null;
91
- supportPhone: string | null;
92
- };
96
+ merchant: PublicMerchant;
93
97
  customer: {
94
98
  email: string;
95
99
  name: string | null;
@@ -133,11 +137,7 @@ interface PublicInvoice {
133
137
  url: string;
134
138
  status: InvoiceStatus;
135
139
  reason: InvoiceReason;
136
- merchant: {
137
- name: string;
138
- supportEmail: string | null;
139
- supportPhone: string | null;
140
- };
140
+ merchant: PublicMerchant;
141
141
  email: string;
142
142
  description: string | null;
143
143
  lines: LineItem[];
@@ -161,6 +161,8 @@ interface PublicInvoice {
161
161
  interface PublicCheckoutItem extends CheckoutItem {
162
162
  /** The `lookupKey` of the plan or product, as it is now; `null` when it has none. */
163
163
  lookupKey: string | null;
164
+ /** A product's photo as it is now (its variant's, or the principal); `null` for plans. */
165
+ imageUrl: string | null;
164
166
  }
165
167
  /** Browser-safe view of a checkout: everything needed to render and pay it, nothing internal. */
166
168
  interface PublicCheckout {
@@ -182,11 +184,7 @@ interface PublicCheckout {
182
184
  url: string;
183
185
  status: "open" | "completed" | "expired";
184
186
  purpose: CheckoutPurpose;
185
- merchant: {
186
- name: string;
187
- supportEmail: string | null;
188
- supportPhone: string | null;
189
- };
187
+ merchant: PublicMerchant;
190
188
  email: string | null;
191
189
  items: PublicCheckoutItem[];
192
190
  currency: Currency;
@@ -259,11 +257,7 @@ interface PublicFulfillment {
259
257
  id: string;
260
258
  object: "fulfillment";
261
259
  environment: Environment;
262
- merchant: {
263
- name: string;
264
- supportEmail: string | null;
265
- supportPhone: string | null;
266
- };
260
+ merchant: PublicMerchant;
267
261
  method: FulfillmentMethod;
268
262
  status: FulfillmentStatus;
269
263
  option: FulfillmentOption;
@@ -301,13 +295,22 @@ interface PublicFulfillment {
301
295
  cancellationReason: Fulfillment["cancellationReason"];
302
296
  /** The latest claim about it, followed on its page (`url`); `null` without one. */
303
297
  claim: PublicClaimSummary | null;
304
- /** Billete returning the purchase's money (`mode: "billete"`); `null` without one. */
298
+ /** The latest refund of the purchase, as its customer follows it; `null` without one. */
305
299
  refund: PublicFulfillmentRefund | null;
306
300
  }
301
+ /** A refund's page: the business returning it, and where it stands. */
302
+ interface PublicRefund {
303
+ object: "refund";
304
+ environment: Environment;
305
+ merchant: {
306
+ name: string;
307
+ };
308
+ refund: PublicFulfillmentRefund;
309
+ }
307
310
  /**
308
- * Billete returning a purchase's money by Pago Móvil. `needs_destination`: it waits for the
311
+ * A business returning a purchase's money by Pago Móvil. `needs_destination`: it waits for the
309
312
  * customer to say where (`setRefundDestination`), also after a transfer to the previous one failed
310
- * (`problem`). `processing`: Billete is sending it. `paid`: sent, with the bank's reference.
313
+ * (`problem`). `processing`: the business is sending it. `paid`: sent, with the bank's reference.
311
314
  */
312
315
  interface PublicFulfillmentRefund {
313
316
  amount: number;
@@ -436,6 +439,20 @@ interface PaymentMethodOption {
436
439
  instructions: PaymentInstructions | null;
437
440
  testScenarios: PaymentTestScenario[] | null;
438
441
  }
442
+ /**
443
+ * Why a checkout or Cobro offers no method: the business takes no payments now
444
+ * (`account_suspended`), offers no method for this payment (`payment_method_unavailable`), or
445
+ * nothing can charge the ones it offers right now (`payments_unavailable`, the only one that may
446
+ * pass by trying again). `message` is meant for the payer.
447
+ */
448
+ interface PaymentsUnavailable {
449
+ code: "account_suspended" | "payment_method_unavailable" | "payments_unavailable";
450
+ message: string;
451
+ }
452
+ /** The methods a checkout or Cobro can be paid with now; with none, why (`unavailable`). */
453
+ interface PaymentMethodList extends List<PaymentMethodOption> {
454
+ unavailable: PaymentsUnavailable | null;
455
+ }
439
456
  /** Browser-safe view of a payment link, used to render its page before a checkout exists. */
440
457
  interface PublicPaymentLink {
441
458
  id: string;
@@ -446,11 +463,7 @@ interface PublicPaymentLink {
446
463
  type: "product" | "plan";
447
464
  /** `false` when the link was deactivated or reached its payment limit. */
448
465
  available: boolean;
449
- merchant: {
450
- name: string;
451
- supportEmail: string | null;
452
- supportPhone: string | null;
453
- };
466
+ merchant: PublicMerchant;
454
467
  product: {
455
468
  name: string;
456
469
  description: string | null;
@@ -509,11 +522,7 @@ interface PublicClaimSummary {
509
522
  interface PublicClaim extends PublicClaimSummary {
510
523
  object: "claim";
511
524
  environment: Environment;
512
- merchant: {
513
- name: string;
514
- supportEmail: string | null;
515
- supportPhone: string | null;
516
- };
525
+ merchant: PublicMerchant;
517
526
  description: string;
518
527
  messages: ClaimMessage[];
519
528
  /** What the claim is about: the payment and what it bought. */
@@ -972,6 +981,8 @@ interface RefundCreate {
972
981
  /** Defaults to the remaining refundable amount, in the settlement currency. */
973
982
  amount?: number;
974
983
  reason?: string;
984
+ /** The bank's reference of the Pago Móvil the business returned it with. */
985
+ reference?: string;
975
986
  }
976
987
  /** An event type, or `*` for every event. */
977
988
  type EventSelector = "*" | SubscribableEventType;
@@ -1108,6 +1119,7 @@ type ClaimResolve = {
1108
1119
  note: string;
1109
1120
  refund?: {
1110
1121
  amount?: number;
1122
+ reference?: string;
1111
1123
  };
1112
1124
  } | {
1113
1125
  outcome: "business";
@@ -1157,4 +1169,4 @@ declare class BilleteError extends Error {
1157
1169
  code: BilleteErrorCode;
1158
1170
  }, status: number, options?: ErrorOptions);
1159
1171
  }
1160
- export { PortalSessionCreate as $, CustomerSessionCreate as A, PublicPaymentLink as At, FulfillmentTrackingInput as B, LatestApiVersion as Bt, CouponCreate as C, PublicCheckout as Ct, CustomerInput as D, PublicFulfillment as Dt, CustomerCreate as E, PublicClaimSummary as Et, FeatureOperationCreate as F, API_VERSION_PATTERN as Ft, PaymentLinkUpdate as G, isApiVersionRetired as Gt, InvoiceLineInput as H, apiVersionStage as Ht, FeatureUpdate as I, ApiVersion as It, PlanCreate as J, PlanCheckoutCreate as K, supportedApiVersions as Kt, FulfillmentDeliverInput as L, ApiVersionLifecycle as Lt, EventSelector as M, PublicPortal as Mt, FeatureCreate as N, API_VERSIONS as Nt, CustomerMemberCreate as O, PublicFulfillmentRefund as Ot, FeatureOperationCommit as P, API_VERSION_HEADER as Pt, PlanUpdate as Q, FulfillmentHandoverInput as R, ApiVersionStage as Rt, CollectInput as S, PortalFeatures as St, CustomFieldInput as T, PublicClaim as Tt, KEY_PATTERN as U, currentApiVersion as Ut, InvoiceCreate as V, apiVersionLifecycle as Vt, PaymentLinkCreate as W, isApiVersion as Wt, PlanLinkCreate as X, PlanFeaturesInput as Y, PlanPriceInput as Z, ClientPaymentCode as _, PaymentInstructions as _t, AfterCompletionInput as a, RefundCreate as at, ClientSubscriptionSeats as b, PaymentNextAction as bt, ClaimResolve as c, SubscriptionChangePreviewInput as ct, ClientCheckoutUpdate as d, VariantInput as dt, ProductCheckoutCreate as et, ClientClaimCreate as f, WebhookEndpointCreate as ft, ClientLinkCheckout as g, FulfillmentOption as gt, ClientInvoicePay as h, CustomerSubscriptionChangeResult as ht, TransportOptions as i, ProductUpdate as it, CustomerUpdate as j, PublicPaymentState as jt, CustomerMemberUpdate as k, PublicInvoice as kt, ClaimRespond as l, SubscriptionCreate as lt, ClientFulfillmentProblem as m, CustomerSubscription as mt, BilleteErrorCode as n, ProductCreate as nt, CheckoutCreate as o, SubscriptionCancel as ot, ClientCustomerClaimCreate as p, WebhookEndpointUpdate as pt, PlanCouponCreate as q, RequestOptions as r, ProductLinkCreate as rt, CheckoutItemInput as s, SubscriptionChangeCreate as st, BilleteError as t, ProductCouponCreate as tt, ClientCheckoutPay as u, SubscriptionUpdate as ut, ClientRefundDestination as v, PaymentMethodField as vt, CouponUpdate as w, PublicCheckoutItem as wt, ClientSubscriptionUpdate as x, PaymentTestScenario as xt, ClientSubscriptionCancel as y, PaymentMethodOption as yt, FulfillmentInput as z, LATEST_API_VERSION as zt };
1172
+ export { PortalSessionCreate as $, CustomerSessionCreate as A, PublicFulfillmentRefund as At, FulfillmentTrackingInput as B, ApiVersion as Bt, CouponCreate as C, PaymentsUnavailable as Ct, CustomerInput as D, PublicClaim as Dt, CustomerCreate as E, PublicCheckoutItem as Et, FeatureOperationCreate as F, PublicPortal as Ft, PaymentLinkUpdate as G, apiVersionLifecycle as Gt, InvoiceLineInput as H, ApiVersionStage as Ht, FeatureUpdate as I, PublicRefund as It, PlanCreate as J, isApiVersion as Jt, PlanCheckoutCreate as K, apiVersionStage as Kt, FulfillmentDeliverInput as L, API_VERSIONS as Lt, EventSelector as M, PublicMerchant as Mt, FeatureCreate as N, PublicPaymentLink as Nt, CustomerMemberCreate as O, PublicClaimSummary as Ot, FeatureOperationCommit as P, PublicPaymentState as Pt, PlanUpdate as Q, FulfillmentHandoverInput as R, API_VERSION_HEADER as Rt, CollectInput as S, PaymentTestScenario as St, CustomFieldInput as T, PublicCheckout as Tt, KEY_PATTERN as U, LATEST_API_VERSION as Ut, InvoiceCreate as V, ApiVersionLifecycle as Vt, PaymentLinkCreate as W, LatestApiVersion as Wt, PlanLinkCreate as X, supportedApiVersions as Xt, PlanFeaturesInput as Y, isApiVersionRetired as Yt, PlanPriceInput as Z, ClientPaymentCode as _, PaymentInstructions as _t, AfterCompletionInput as a, RefundCreate as at, ClientSubscriptionSeats as b, PaymentMethodOption as bt, ClaimResolve as c, SubscriptionChangePreviewInput as ct, ClientCheckoutUpdate as d, VariantInput as dt, ProductCheckoutCreate as et, ClientClaimCreate as f, WebhookEndpointCreate as ft, ClientLinkCheckout as g, FulfillmentOption as gt, ClientInvoicePay as h, CustomerSubscriptionChangeResult as ht, TransportOptions as i, ProductUpdate as it, CustomerUpdate as j, PublicInvoice as jt, CustomerMemberUpdate as k, PublicFulfillment as kt, ClaimRespond as l, SubscriptionCreate as lt, ClientFulfillmentProblem as m, CustomerSubscription as mt, BilleteErrorCode as n, ProductCreate as nt, CheckoutCreate as o, SubscriptionCancel as ot, ClientCustomerClaimCreate as p, WebhookEndpointUpdate as pt, PlanCouponCreate as q, currentApiVersion as qt, RequestOptions as r, ProductLinkCreate as rt, CheckoutItemInput as s, SubscriptionChangeCreate as st, BilleteError as t, ProductCouponCreate as tt, ClientCheckoutPay as u, SubscriptionUpdate as ut, ClientRefundDestination as v, PaymentMethodField as vt, CouponUpdate as w, PortalFeatures as wt, ClientSubscriptionUpdate as x, PaymentNextAction as xt, ClientSubscriptionCancel as y, PaymentMethodList as yt, FulfillmentInput as z, API_VERSION_PATTERN as zt };
@@ -259,7 +259,7 @@ type Timestamp = string;
259
259
  */
260
260
  declare const API_ERROR_CODES: {
261
261
  readonly account_not_found: "No existe el negocio.";
262
- readonly account_suspended: "Este negocio está suspendido.";
262
+ readonly account_suspended: "Este negocio no está recibiendo pagos: está pausado o suspendido, o tiene un reembolso vencido.";
263
263
  readonly address_required: "Falta la dirección que pide el checkout.";
264
264
  readonly amount_required: "El producto sin variantes necesita un precio.";
265
265
  readonly amount_too_large: "El importe total supera el máximo permitido.";
@@ -392,11 +392,11 @@ declare const API_ERROR_CODES: {
392
392
  readonly payment_link_deleted: "Este enlace fue eliminado y no puede modificarse.";
393
393
  readonly payment_link_not_found: "No existe el enlace de pago.";
394
394
  readonly payment_link_unavailable: "Este enlace de pago ya no está disponible.";
395
- readonly payment_method_unavailable: "Ese método no permite pagar en la moneda del checkout o del cobro.";
395
+ readonly payment_method_unavailable: "Este negocio no ofrece ese método para este pago: no existe, no cobra en esa moneda, solo funciona en pruebas o el negocio no lo tiene.";
396
396
  readonly payment_not_claimable: "Solo puedes abrir un reclamo por un pago confirmado.";
397
397
  readonly payment_not_found: "No existe el pago.";
398
398
  readonly payment_not_refundable: "Solo se pueden reembolsar pagos confirmados.";
399
- readonly payments_unavailable: "No pudimos contactar al banco o al proveedor; inténtalo en unos segundos.";
399
+ readonly payments_unavailable: "Nada puede cobrar ese método ahora: su proveedor no responde o está en mantenimiento. Inténtalo de nuevo en unos minutos.";
400
400
  readonly payout_account_change_pending: "Ya hay un cambio de la cuenta de retiro pendiente: cancélalo antes de pedir otro.";
401
401
  readonly payout_not_found: "No existe el retiro.";
402
402
  readonly phone_required: "Teléfono: este campo es obligatorio.";
@@ -565,6 +565,11 @@ interface Deletion {
565
565
  deletedAt: Timestamp | null;
566
566
  deletedBy: Actor | null;
567
567
  }
568
+ /** A photo of a product, served to anyone by its `url`. */
569
+ interface ProductImage {
570
+ id: string;
571
+ url: string;
572
+ }
568
573
  interface ProductVariant extends Deletion {
569
574
  id: string;
570
575
  name: string;
@@ -576,6 +581,8 @@ interface ProductVariant extends Deletion {
576
581
  reserved: number;
577
582
  isDefault: boolean;
578
583
  active: boolean;
584
+ /** Its photo among the product's `images`; `null` shows the product's principal one. */
585
+ imageId: string | null;
579
586
  }
580
587
  interface Product extends Resource<"product">, Deletion {
581
588
  name: string;
@@ -586,6 +593,8 @@ interface Product extends Resource<"product">, Deletion {
586
593
  lookupKey: string | null;
587
594
  description: string | null;
588
595
  imageUrl: string | null;
596
+ /** Its photos, the principal first, uploaded from the dashboard. */
597
+ images: ProductImage[];
589
598
  category: ProductCategory;
590
599
  /**
591
600
  * How a `physical` product may be received, among the ways the business offers. Empty: it is
@@ -1267,13 +1276,17 @@ interface Refund extends Resource<"refund"> {
1267
1276
  currency: Currency;
1268
1277
  reason: string | null;
1269
1278
  /**
1270
- * `provider`: the method's provider returns the funds. `manual`: the method cannot refund
1271
- * automatically; the merchant returned the funds. `billete`: Billete returns them by Pago Móvil
1272
- * to where the customer says, on the delivery's page (a shipment not sent in time, or a problem
1273
- * Billete decided in the customer's favor); `pending` until it does.
1279
+ * `provider`: the method's provider returns the funds, when they are still where it collected
1280
+ * them. `manual`: the business returns them from its own bank by Pago Móvil, to the payer's or to
1281
+ * where the customer says on the refund's page; `pending` until it records the reference (a
1282
+ * refund it asked for without paying it yet, or one Billete decided: a shipment not sent in time
1283
+ * or a problem with a delivery decided in the customer's favor). `billete`: only on refunds from
1284
+ * before Billete stopped keeping the businesses' money.
1274
1285
  */
1275
1286
  mode: (typeof REFUND_MODES)[number];
1276
1287
  status: "pending" | "succeeded" | "failed";
1288
+ /** The bank's reference of the Pago Móvil that returned it, once returned. */
1289
+ reference?: string | null;
1277
1290
  }
1278
1291
  /**
1279
1292
  * Why a customer opened a claim. `not_received`: they paid and nothing arrived. `overcharged`:
@@ -1332,28 +1345,6 @@ interface Claim extends Resource<"claim"> {
1332
1345
  withdrawnAt: Timestamp | null;
1333
1346
  updatedAt: Timestamp;
1334
1347
  }
1335
- interface BalanceAmount {
1336
- amount: number;
1337
- currency: Currency;
1338
- }
1339
- interface Balance {
1340
- object: "balance";
1341
- environment: Environment;
1342
- /** Funds that can be paid out. */
1343
- available: BalanceAmount[];
1344
- /** Funds still inside the settlement hold. */
1345
- pending: BalanceAmount[];
1346
- /** Funds of purchases the customer has not received yet; released when they do. */
1347
- held: BalanceAmount[];
1348
- }
1349
- interface Payout extends Resource<"payout"> {
1350
- amount: number;
1351
- currency: Currency;
1352
- status: "pending" | "in_transit" | "paid" | "failed" | "canceled";
1353
- automatic: boolean;
1354
- arrivalAt: Timestamp | null;
1355
- failureMessage: string | null;
1356
- }
1357
1348
  interface WebhookEndpoint extends Resource<"webhook_endpoint">, Deletion {
1358
1349
  url: string;
1359
1350
  events: string[];
@@ -1444,10 +1435,6 @@ interface EventDataMap {
1444
1435
  "refund.created": Refund;
1445
1436
  /** The provider could not return the funds; the amount is back in the balance. */
1446
1437
  "refund.failed": Refund;
1447
- "payout.created": Payout;
1448
- "payout.paid": Payout;
1449
- "payout.failed": Payout;
1450
- "payout.canceled": Payout;
1451
1438
  "invoice.created": Invoice;
1452
1439
  "invoice.paid": Invoice;
1453
1440
  "invoice.voided": Invoice;
@@ -1478,7 +1465,7 @@ type EventType = keyof EventDataMap;
1478
1465
  declare const WEBHOOK_TEST_EVENT: "webhook_endpoint.test";
1479
1466
  /** What a webhook endpoint can subscribe to: everything that happens in a business. */
1480
1467
  type SubscribableEventType = Exclude<EventType, typeof WEBHOOK_TEST_EVENT>;
1481
- declare const EVENT_TYPES: readonly ["product.updated", "product.deleted", "payment_link.deleted", "customer.created", "customer.updated", "customer.member_added", "customer.member_removed", "subscription.change_failed", "checkout.completed", "checkout.expired", "payment.succeeded", "payment.failed", "payment.refunded", "fulfillment.created", "fulfillment.shipped", "fulfillment.ready_for_pickup", "fulfillment.delivered", "fulfillment.received", "fulfillment.problem_reported", "fulfillment.canceled", "claim.created", "claim.updated", "claim.resolved", "claim.withdrawn", "refund.created", "refund.failed", "payout.created", "payout.paid", "payout.failed", "payout.canceled", "invoice.created", "invoice.paid", "invoice.voided", "invoice.uncollectible", "subscription.created", "subscription.updated", "subscription.renewal_due", "subscription.renewed", "subscription.past_due", "subscription.suspended", "subscription.reactivated", "subscription.canceled", "subscription.expired"];
1468
+ declare const EVENT_TYPES: readonly ["product.updated", "product.deleted", "payment_link.deleted", "customer.created", "customer.updated", "customer.member_added", "customer.member_removed", "subscription.change_failed", "checkout.completed", "checkout.expired", "payment.succeeded", "payment.failed", "payment.refunded", "fulfillment.created", "fulfillment.shipped", "fulfillment.ready_for_pickup", "fulfillment.delivered", "fulfillment.received", "fulfillment.problem_reported", "fulfillment.canceled", "claim.created", "claim.updated", "claim.resolved", "claim.withdrawn", "refund.created", "refund.failed", "invoice.created", "invoice.paid", "invoice.voided", "invoice.uncollectible", "subscription.created", "subscription.updated", "subscription.renewal_due", "subscription.renewed", "subscription.past_due", "subscription.suspended", "subscription.reactivated", "subscription.canceled", "subscription.expired"];
1482
1469
  /** A delivered webhook, discriminated by `type` so `data` narrows automatically. */
1483
1470
  type WebhookEvent = { [TType in EventType]: {
1484
1471
  id: string;
@@ -1490,4 +1477,4 @@ type WebhookEvent = { [TType in EventType]: {
1490
1477
  createdAt: string;
1491
1478
  data: EventDataMap[TType];
1492
1479
  }; }[EventType];
1493
- export { FulfillmentHandover as $, PAYMENT_FAILURE_CODES as $t, Coupon as A, ENVIRONMENTS as An, RISK_LEVELS as At, Event as B, SubscriptionChangeResult as Bt, CheckoutPurpose as C, TaxBehavior as Cn, PlanSeats as Ct, ClaimReason as D, isLandlinePhone as Dn, ProductVariant as Dt, ClaimOutcome as E, findBank as En, ProductCategory as Et, CustomerFeature as F, SUBSCRIPTION_STATUSES as Ft, Feature as G, WebhookEndpoint as Gt, FEATURE_TYPES as H, SubscriptionStatus as Ht, CustomerMember as I, SubmitLabel as It, FeatureReset as J, ReceiptSend as Jt, FeatureOperation as K, Weekday as Kt, CustomerMemberList as L, Subscription as Lt, CustomField as M, TokenKind as Mn, ResetFrequency as Mt, Customer as N, tokenEnvironment as Nn, RiskLevel as Nt, ClaimStatus as O, isMobilePhone as On, REFUND_MODES as Ot, CustomerDetails as P, tokenPrefix as Pn, SUBMIT_LABELS as Pt, FulfillmentChoice as Q, ApiErrorType as Qt, CustomerSession as R, SubscriptionChange as Rt, CheckoutItem as S, TAX_BEHAVIORS as Sn, PlanPrice as St, ClaimMessage as T, VENEZUELAN_BANKS as Tn, Product as Tt, FULFILLMENT_METHODS as U, SubscriptionTerms as Ut, ExchangeRate as V, SubscriptionRenewal as Vt, FULFILLMENT_STATUSES as W, USAGE_FEATURE_TYPES as Wt, FeatureUsageResult as X, ApiErrorBody as Xt, FeatureType as Y, API_ERROR_TYPES as Yt, Fulfillment as Z, ApiErrorEnvelope as Zt, CLAIM_STATUSES as _, MOBILE_PREFIXES as _n, PaymentSettlement as _t, WEBHOOK_TEST_EVENT as a, AddressInput as an, Invoice as at, CarrierOffice as b, SUSPENSION_DAYS as bn, Plan as bt, AfterCompletion as c, BillingMonths as cn, LineItem as ct, CANCELLATION_FEEDBACK as d, GRACE_PERIOD_DAYS as dn, PRODUCT_CATEGORIES as dt, PaymentFailureCode as en, FulfillmentMethod as et, CARRIERS as f, GracePeriodDays as fn, Payment as ft, CLAIM_REASONS as g, MAX_QUANTITY as gn, PaymentLink as gt, CLAIM_OUTCOMES as h, ListSort as hn, PaymentFeeDetails as ht, SubscribableEventType as i, Address as in, INVOICE_STATUSES as it, CurrencyAvailability as j, Environment as jn, Refund as jt, CollectSettings as k, nationalPhone as kn, RESET_FREQUENCIES as kt, Balance as l, CURRENCIES as ln, MAX_SEATS as lt, CHECKOUT_PURPOSES as m, ListQuery as mn, PaymentFailure as mt, EventDataMap as n, ApiErrorCode as nn, FulfillmentTracking as nt, WebhookEvent as o, BILLING_MONTHS as on, InvoiceReason as ot, CARRIER_TEST_SCENARIOS as p, List as pn, PaymentAttempt as pt, FeatureOperationResult as q, ReceiptReference as qt, EventType as r, ACCOUNT_NUMBER_LENGTH as rn, INVOICE_REASONS as rt, Actor as s, BankCode as sn, InvoiceStatus as st, EVENT_TYPES as t, API_ERROR_CODES as tn, FulfillmentStatus as tt, BalanceAmount as u, Currency as un, PAYMENT_STATUSES as ut, CancellationFeedback as v, Metadata as vn, PaymentStatus as vt, Claim as w, Timestamp as wn, PortalSession as wt, Checkout as x, SuspensionDays as xn, PlanFeatureValues as xt, Carrier as y, MobilePrefix as yn, Payout as yt, Deletion as z, SubscriptionChangePreview as zt };
1480
+ export { FulfillmentStatus as $, API_ERROR_CODES as $t, CustomField as A, TokenKind as An, ResetFrequency as At, FEATURE_TYPES as B, SubscriptionStatus as Bt, ClaimMessage as C, VENEZUELAN_BANKS as Cn, ProductCategory as Ct, CollectSettings as D, nationalPhone as Dn, RESET_FREQUENCIES as Dt, ClaimStatus as E, isMobilePhone as En, REFUND_MODES as Et, CustomerMemberList as F, Subscription as Ft, FeatureOperationResult as G, ReceiptReference as Gt, FULFILLMENT_STATUSES as H, USAGE_FEATURE_TYPES as Ht, CustomerSession as I, SubscriptionChange as It, FeatureUsageResult as J, ApiErrorBody as Jt, FeatureReset as K, ReceiptSend as Kt, Deletion as L, SubscriptionChangePreview as Lt, CustomerDetails as M, tokenPrefix as Mn, SUBMIT_LABELS as Mt, CustomerFeature as N, SUBSCRIPTION_STATUSES as Nt, Coupon as O, ENVIRONMENTS as On, RISK_LEVELS as Ot, CustomerMember as P, SubmitLabel as Pt, FulfillmentMethod as Q, PaymentFailureCode as Qt, Event as R, SubscriptionChangeResult as Rt, Claim as S, Timestamp as Sn, Product as St, ClaimReason as T, isLandlinePhone as Tn, ProductVariant as Tt, Feature as U, WebhookEndpoint as Ut, FULFILLMENT_METHODS as V, SubscriptionTerms as Vt, FeatureOperation as W, Weekday as Wt, FulfillmentChoice as X, ApiErrorType as Xt, Fulfillment as Y, ApiErrorEnvelope as Yt, FulfillmentHandover as Z, PAYMENT_FAILURE_CODES as Zt, Carrier as _, MobilePrefix as _n, Plan as _t, WEBHOOK_TEST_EVENT as a, BankCode as an, InvoiceStatus as at, CheckoutItem as b, TAX_BEHAVIORS as bn, PlanSeats as bt, AfterCompletion as c, Currency as cn, PAYMENT_STATUSES as ct, CARRIER_TEST_SCENARIOS as d, List as dn, PaymentAttempt as dt, ApiErrorCode as en, FulfillmentTracking as et, CHECKOUT_PURPOSES as f, ListQuery as fn, PaymentFailure as ft, CancellationFeedback as g, Metadata as gn, PaymentStatus as gt, CLAIM_STATUSES as h, MOBILE_PREFIXES as hn, PaymentSettlement as ht, SubscribableEventType as i, BILLING_MONTHS as in, InvoiceReason as it, Customer as j, tokenEnvironment as jn, RiskLevel as jt, CurrencyAvailability as k, Environment as kn, Refund as kt, CANCELLATION_FEEDBACK as l, GRACE_PERIOD_DAYS as ln, PRODUCT_CATEGORIES as lt, CLAIM_REASONS as m, MAX_QUANTITY as mn, PaymentLink as mt, EventDataMap as n, Address as nn, INVOICE_STATUSES as nt, WebhookEvent as o, BillingMonths as on, LineItem as ot, CLAIM_OUTCOMES as p, ListSort as pn, PaymentFeeDetails as pt, FeatureType as q, API_ERROR_TYPES as qt, EventType as r, AddressInput as rn, Invoice as rt, Actor as s, CURRENCIES as sn, MAX_SEATS as st, EVENT_TYPES as t, ACCOUNT_NUMBER_LENGTH as tn, INVOICE_REASONS as tt, CARRIERS as u, GracePeriodDays as un, Payment as ut, CarrierOffice as v, SUSPENSION_DAYS as vn, PlanFeatureValues as vt, ClaimOutcome as w, findBank as wn, ProductImage as wt, CheckoutPurpose as x, TaxBehavior as xn, PortalSession as xt, Checkout as y, SuspensionDays as yn, PlanPrice as yt, ExchangeRate as z, SubscriptionRenewal as zt };
@@ -17,7 +17,7 @@ var BilleteError = class extends Error {
17
17
  }
18
18
  };
19
19
  // src/http.ts
20
- const SDK_VERSION = "9.1.0";
20
+ const SDK_VERSION = "10.0.0-beta.1";
21
21
  const DEFAULT_BASE_URL = "https://api.billete.run";
22
22
  const RETRYABLE_STATUS = /* @__PURE__ */ new Set([
23
23
  429,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as FulfillmentHandover, $t as PAYMENT_FAILURE_CODES, A as Coupon, An as ENVIRONMENTS, At as RISK_LEVELS, B as Event, Bt as SubscriptionChangeResult, C as CheckoutPurpose, Cn as TaxBehavior, Ct as PlanSeats, D as ClaimReason, Dn as isLandlinePhone, Dt as ProductVariant, E as ClaimOutcome, En as findBank, Et as ProductCategory, F as CustomerFeature, Ft as SUBSCRIPTION_STATUSES, G as Feature, Gt as WebhookEndpoint, H as FEATURE_TYPES, Ht as SubscriptionStatus, I as CustomerMember, It as SubmitLabel, J as FeatureReset, Jt as ReceiptSend, K as FeatureOperation, Kt as Weekday, L as CustomerMemberList, Lt as Subscription, M as CustomField, Mn as TokenKind, Mt as ResetFrequency, N as Customer, Nn as tokenEnvironment, Nt as RiskLevel, O as ClaimStatus, On as isMobilePhone, Ot as REFUND_MODES, P as CustomerDetails, Pn as tokenPrefix, Pt as SUBMIT_LABELS, Q as FulfillmentChoice, Qt as ApiErrorType, R as CustomerSession, Rt as SubscriptionChange, S as CheckoutItem, Sn as TAX_BEHAVIORS, St as PlanPrice, T as ClaimMessage, Tn as VENEZUELAN_BANKS, Tt as Product, U as FULFILLMENT_METHODS, Ut as SubscriptionTerms, V as ExchangeRate, Vt as SubscriptionRenewal, W as FULFILLMENT_STATUSES, Wt as USAGE_FEATURE_TYPES, X as FeatureUsageResult, Xt as ApiErrorBody, Y as FeatureType, Yt as API_ERROR_TYPES, Z as Fulfillment, Zt as ApiErrorEnvelope, _ as CLAIM_STATUSES, _n as MOBILE_PREFIXES, _t as PaymentSettlement, a as WEBHOOK_TEST_EVENT, an as AddressInput, at as Invoice, b as CarrierOffice, bn as SUSPENSION_DAYS, bt as Plan, c as AfterCompletion, cn as BillingMonths, ct as LineItem, d as CANCELLATION_FEEDBACK, dn as GRACE_PERIOD_DAYS, dt as PRODUCT_CATEGORIES, en as PaymentFailureCode, et as FulfillmentMethod, f as CARRIERS, fn as GracePeriodDays, ft as Payment, g as CLAIM_REASONS, gn as MAX_QUANTITY, gt as PaymentLink, h as CLAIM_OUTCOMES, hn as ListSort, ht as PaymentFeeDetails, i as SubscribableEventType, in as Address, it as INVOICE_STATUSES, j as CurrencyAvailability, jn as Environment, jt as Refund, k as CollectSettings, kn as nationalPhone, kt as RESET_FREQUENCIES, l as Balance, ln as CURRENCIES, lt as MAX_SEATS, m as CHECKOUT_PURPOSES, mn as ListQuery, mt as PaymentFailure, n as EventDataMap, nn as ApiErrorCode, nt as FulfillmentTracking, o as WebhookEvent, on as BILLING_MONTHS, ot as InvoiceReason, p as CARRIER_TEST_SCENARIOS, pn as List, pt as PaymentAttempt, q as FeatureOperationResult, qt as ReceiptReference, r as EventType, rn as ACCOUNT_NUMBER_LENGTH, rt as INVOICE_REASONS, s as Actor, sn as BankCode, st as InvoiceStatus, t as EVENT_TYPES, tn as API_ERROR_CODES, tt as FulfillmentStatus, u as BalanceAmount, un as Currency, ut as PAYMENT_STATUSES, v as CancellationFeedback, vn as Metadata, vt as PaymentStatus, w as Claim, wn as Timestamp, wt as PortalSession, x as Checkout, xn as SuspensionDays, xt as PlanFeatureValues, y as Carrier, yn as MobilePrefix, yt as Payout, z as Deletion, zt as SubscriptionChangePreview } from "./events-TqSJMxqF.js";
2
- import { $ as PortalSessionCreate, A as CustomerSessionCreate, At as PublicPaymentLink, B as FulfillmentTrackingInput, Bt as LatestApiVersion, C as CouponCreate, Ct as PublicCheckout, D as CustomerInput, Dt as PublicFulfillment, E as CustomerCreate, Et as PublicClaimSummary, F as FeatureOperationCreate, Ft as API_VERSION_PATTERN, G as PaymentLinkUpdate, Gt as isApiVersionRetired, H as InvoiceLineInput, Ht as apiVersionStage, I as FeatureUpdate, It as ApiVersion, J as PlanCreate, K as PlanCheckoutCreate, Kt as supportedApiVersions, L as FulfillmentDeliverInput, Lt as ApiVersionLifecycle, M as EventSelector, Mt as PublicPortal, N as FeatureCreate, Nt as API_VERSIONS, O as CustomerMemberCreate, Ot as PublicFulfillmentRefund, P as FeatureOperationCommit, Pt as API_VERSION_HEADER, Q as PlanUpdate, R as FulfillmentHandoverInput, Rt as ApiVersionStage, S as CollectInput, St as PortalFeatures, T as CustomFieldInput, Tt as PublicClaim, U as KEY_PATTERN, Ut as currentApiVersion, V as InvoiceCreate, Vt as apiVersionLifecycle, W as PaymentLinkCreate, Wt as isApiVersion, X as PlanLinkCreate, Y as PlanFeaturesInput, Z as PlanPriceInput, _ as ClientPaymentCode, _t as PaymentInstructions, a as AfterCompletionInput, at as RefundCreate, b as ClientSubscriptionSeats, bt as PaymentNextAction, c as ClaimResolve, ct as SubscriptionChangePreviewInput, d as ClientCheckoutUpdate, dt as VariantInput, et as ProductCheckoutCreate, f as ClientClaimCreate, ft as WebhookEndpointCreate, g as ClientLinkCheckout, gt as FulfillmentOption, h as ClientInvoicePay, ht as CustomerSubscriptionChangeResult, i as TransportOptions, it as ProductUpdate, j as CustomerUpdate, jt as PublicPaymentState, k as CustomerMemberUpdate, kt as PublicInvoice, l as ClaimRespond, lt as SubscriptionCreate, m as ClientFulfillmentProblem, mt as CustomerSubscription, n as BilleteErrorCode, nt as ProductCreate, o as CheckoutCreate, ot as SubscriptionCancel, p as ClientCustomerClaimCreate, pt as WebhookEndpointUpdate, q as PlanCouponCreate, r as RequestOptions, rt as ProductLinkCreate, s as CheckoutItemInput, st as SubscriptionChangeCreate, t as BilleteError, tt as ProductCouponCreate, u as ClientCheckoutPay, ut as SubscriptionUpdate, v as ClientRefundDestination, vt as PaymentMethodField, w as CouponUpdate, wt as PublicCheckoutItem, x as ClientSubscriptionUpdate, xt as PaymentTestScenario, y as ClientSubscriptionCancel, yt as PaymentMethodOption, z as FulfillmentInput, zt as LATEST_API_VERSION } from "./errors-B7u708iH.js";
1
+ import { $ as FulfillmentStatus, $t as API_ERROR_CODES, A as CustomField, An as TokenKind, At as ResetFrequency, B as FEATURE_TYPES, Bt as SubscriptionStatus, C as ClaimMessage, Cn as VENEZUELAN_BANKS, Ct as ProductCategory, D as CollectSettings, Dn as nationalPhone, Dt as RESET_FREQUENCIES, E as ClaimStatus, En as isMobilePhone, Et as REFUND_MODES, F as CustomerMemberList, Ft as Subscription, G as FeatureOperationResult, Gt as ReceiptReference, H as FULFILLMENT_STATUSES, Ht as USAGE_FEATURE_TYPES, I as CustomerSession, It as SubscriptionChange, J as FeatureUsageResult, Jt as ApiErrorBody, K as FeatureReset, Kt as ReceiptSend, L as Deletion, Lt as SubscriptionChangePreview, M as CustomerDetails, Mn as tokenPrefix, Mt as SUBMIT_LABELS, N as CustomerFeature, Nt as SUBSCRIPTION_STATUSES, O as Coupon, On as ENVIRONMENTS, Ot as RISK_LEVELS, P as CustomerMember, Pt as SubmitLabel, Q as FulfillmentMethod, Qt as PaymentFailureCode, R as Event, Rt as SubscriptionChangeResult, S as Claim, Sn as Timestamp, St as Product, T as ClaimReason, Tn as isLandlinePhone, Tt as ProductVariant, U as Feature, Ut as WebhookEndpoint, V as FULFILLMENT_METHODS, Vt as SubscriptionTerms, W as FeatureOperation, Wt as Weekday, X as FulfillmentChoice, Xt as ApiErrorType, Y as Fulfillment, Yt as ApiErrorEnvelope, Z as FulfillmentHandover, Zt as PAYMENT_FAILURE_CODES, _ as Carrier, _n as MobilePrefix, _t as Plan, a as WEBHOOK_TEST_EVENT, an as BankCode, at as InvoiceStatus, b as CheckoutItem, bn as TAX_BEHAVIORS, bt as PlanSeats, c as AfterCompletion, cn as Currency, ct as PAYMENT_STATUSES, d as CARRIER_TEST_SCENARIOS, dn as List, dt as PaymentAttempt, en as ApiErrorCode, et as FulfillmentTracking, f as CHECKOUT_PURPOSES, fn as ListQuery, ft as PaymentFailure, g as CancellationFeedback, gn as Metadata, gt as PaymentStatus, h as CLAIM_STATUSES, hn as MOBILE_PREFIXES, ht as PaymentSettlement, i as SubscribableEventType, in as BILLING_MONTHS, it as InvoiceReason, j as Customer, jn as tokenEnvironment, jt as RiskLevel, k as CurrencyAvailability, kn as Environment, kt as Refund, l as CANCELLATION_FEEDBACK, ln as GRACE_PERIOD_DAYS, lt as PRODUCT_CATEGORIES, m as CLAIM_REASONS, mn as MAX_QUANTITY, mt as PaymentLink, n as EventDataMap, nn as Address, nt as INVOICE_STATUSES, o as WebhookEvent, on as BillingMonths, ot as LineItem, p as CLAIM_OUTCOMES, pn as ListSort, pt as PaymentFeeDetails, q as FeatureType, qt as API_ERROR_TYPES, r as EventType, rn as AddressInput, rt as Invoice, s as Actor, sn as CURRENCIES, st as MAX_SEATS, t as EVENT_TYPES, tn as ACCOUNT_NUMBER_LENGTH, tt as INVOICE_REASONS, u as CARRIERS, un as GracePeriodDays, ut as Payment, v as CarrierOffice, vn as SUSPENSION_DAYS, vt as PlanFeatureValues, w as ClaimOutcome, wn as findBank, wt as ProductImage, x as CheckoutPurpose, xn as TaxBehavior, xt as PortalSession, y as Checkout, yn as SuspensionDays, yt as PlanPrice, z as ExchangeRate, zt as SubscriptionRenewal } from "./events-CLifhYGq.js";
2
+ import { $ as PortalSessionCreate, A as CustomerSessionCreate, At as PublicFulfillmentRefund, B as FulfillmentTrackingInput, Bt as ApiVersion, C as CouponCreate, Ct as PaymentsUnavailable, D as CustomerInput, Dt as PublicClaim, E as CustomerCreate, Et as PublicCheckoutItem, F as FeatureOperationCreate, Ft as PublicPortal, G as PaymentLinkUpdate, Gt as apiVersionLifecycle, H as InvoiceLineInput, Ht as ApiVersionStage, I as FeatureUpdate, It as PublicRefund, J as PlanCreate, Jt as isApiVersion, K as PlanCheckoutCreate, Kt as apiVersionStage, L as FulfillmentDeliverInput, Lt as API_VERSIONS, M as EventSelector, Mt as PublicMerchant, N as FeatureCreate, Nt as PublicPaymentLink, O as CustomerMemberCreate, Ot as PublicClaimSummary, P as FeatureOperationCommit, Pt as PublicPaymentState, Q as PlanUpdate, R as FulfillmentHandoverInput, Rt as API_VERSION_HEADER, S as CollectInput, St as PaymentTestScenario, T as CustomFieldInput, Tt as PublicCheckout, U as KEY_PATTERN, Ut as LATEST_API_VERSION, V as InvoiceCreate, Vt as ApiVersionLifecycle, W as PaymentLinkCreate, Wt as LatestApiVersion, X as PlanLinkCreate, Xt as supportedApiVersions, Y as PlanFeaturesInput, Yt as isApiVersionRetired, Z as PlanPriceInput, _ as ClientPaymentCode, _t as PaymentInstructions, a as AfterCompletionInput, at as RefundCreate, b as ClientSubscriptionSeats, bt as PaymentMethodOption, c as ClaimResolve, ct as SubscriptionChangePreviewInput, d as ClientCheckoutUpdate, dt as VariantInput, et as ProductCheckoutCreate, f as ClientClaimCreate, ft as WebhookEndpointCreate, g as ClientLinkCheckout, gt as FulfillmentOption, h as ClientInvoicePay, ht as CustomerSubscriptionChangeResult, i as TransportOptions, it as ProductUpdate, j as CustomerUpdate, jt as PublicInvoice, k as CustomerMemberUpdate, kt as PublicFulfillment, l as ClaimRespond, lt as SubscriptionCreate, m as ClientFulfillmentProblem, mt as CustomerSubscription, n as BilleteErrorCode, nt as ProductCreate, o as CheckoutCreate, ot as SubscriptionCancel, p as ClientCustomerClaimCreate, pt as WebhookEndpointUpdate, q as PlanCouponCreate, qt as currentApiVersion, r as RequestOptions, rt as ProductLinkCreate, s as CheckoutItemInput, st as SubscriptionChangeCreate, t as BilleteError, tt as ProductCouponCreate, u as ClientCheckoutPay, ut as SubscriptionUpdate, v as ClientRefundDestination, vt as PaymentMethodField, w as CouponUpdate, wt as PortalFeatures, x as ClientSubscriptionUpdate, xt as PaymentNextAction, y as ClientSubscriptionCancel, yt as PaymentMethodList, z as FulfillmentInput, zt as API_VERSION_PATTERN } from "./errors-Dk3plV2O.js";
3
3
  import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
4
4
  type Filters<T> = ListQuery & T;
5
5
  type MemberOptions = RequestOptions & {
@@ -24,7 +24,7 @@ interface BilleteOptions extends TransportOptions {
24
24
  *
25
25
  * ```ts
26
26
  * // Reads BILLETE_API_KEY.
27
- * const billete = createBillete({ apiVersion: "2026-10-24", environment: "test" });
27
+ * const billete = createBillete({ apiVersion: "2026-11-06.beta", environment: "test" });
28
28
  * const { allowed } = await billete.features.consume("user_123", "tokens", 850);
29
29
  * ```
30
30
  */
@@ -339,18 +339,6 @@ export declare function createBillete(options: BilleteOptions): {
339
339
  */
340
340
  resolve: (id: string, input: ClaimResolve, options?: RequestOptions) => Promise<Claim>;
341
341
  };
342
- balance: {
343
- retrieve: (options?: RequestOptions) => Promise<Balance>;
344
- };
345
- payouts: {
346
- retrieve: (id: string, options?: RequestOptions) => Promise<Payout>;
347
- list: (query?: Filters<{
348
- sort?: ListSort<"created" | "amount">;
349
- }>, options?: RequestOptions) => Promise<List<Payout>>;
350
- iterate: (query?: Filters<{
351
- sort?: ListSort<"created" | "amount">;
352
- }>) => AsyncGenerator<Payout, any, any>;
353
- };
354
342
  webhookEndpoints: {
355
343
  create: (input: WebhookEndpointCreate, options?: RequestOptions) => Promise<WebhookEndpoint>;
356
344
  retrieve: (id: string, options?: RequestOptions) => Promise<WebhookEndpoint>;
@@ -387,4 +375,4 @@ export declare function createBillete(options: BilleteOptions): {
387
375
  };
388
376
  /** The server client: what `createBillete` returns. */
389
377
  type Billete = ReturnType<typeof createBillete>;
390
- export { type ACCOUNT_NUMBER_LENGTH, type API_ERROR_CODES, type API_ERROR_TYPES, type API_VERSIONS, type API_VERSION_HEADER, type API_VERSION_PATTERN, type Actor, type Address, type AddressInput, type AfterCompletion, type AfterCompletionInput, type ApiErrorBody, type ApiErrorCode, type ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type Billete, BilleteError, type BilleteErrorCode, type BilleteOptions, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CLAIM_OUTCOMES, type CLAIM_REASONS, type CLAIM_STATUSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type Claim, type ClaimMessage, type ClaimOutcome, type ClaimReason, type ClaimResolve, type ClaimRespond, type ClaimStatus, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientClaimCreate, type ClientCustomerClaimCreate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientPaymentCode, type ClientRefundDestination, type ClientSubscriptionCancel, type ClientSubscriptionSeats, type ClientSubscriptionUpdate, type CollectInput, type CollectSettings, type Coupon, type CouponCreate, type CouponUpdate, type Currency, type CurrencyAvailability, type CustomField, type CustomFieldInput, type Customer, type CustomerCreate, type CustomerDetails, type CustomerFeature, type CustomerInput, type CustomerMember, type CustomerMemberCreate, type CustomerMemberList, type CustomerMemberUpdate, type CustomerSession, type CustomerSessionCreate, type CustomerSubscription, type CustomerSubscriptionChangeResult, type CustomerUpdate, type Deletion, type ENVIRONMENTS, type EVENT_TYPES, type Environment, type Event, type EventDataMap, type EventSelector, type EventType, type ExchangeRate, type FEATURE_TYPES, type FULFILLMENT_METHODS, type FULFILLMENT_STATUSES, type Feature, type FeatureCreate, type FeatureOperation, type FeatureOperationCommit, type FeatureOperationCreate, type FeatureOperationResult, type FeatureReset, type FeatureType, type FeatureUpdate, type FeatureUsageResult, type Fulfillment, type FulfillmentChoice, type FulfillmentDeliverInput, type FulfillmentHandover, type FulfillmentHandoverInput, type FulfillmentInput, type FulfillmentMethod, type FulfillmentOption, type FulfillmentStatus, type FulfillmentTracking, type FulfillmentTrackingInput, type GRACE_PERIOD_DAYS, type GracePeriodDays, type INVOICE_REASONS, type INVOICE_STATUSES, type Invoice, type InvoiceCreate, type InvoiceLineInput, type InvoiceReason, type InvoiceStatus, type KEY_PATTERN, type LATEST_API_VERSION, type LatestApiVersion, type LineItem, type List, type ListQuery, type ListSort, type MAX_QUANTITY, type MAX_SEATS, type MOBILE_PREFIXES, type Metadata, type MobilePrefix, type PAYMENT_FAILURE_CODES, type PAYMENT_STATUSES, type PRODUCT_CATEGORIES, type Payment, type PaymentAttempt, type PaymentFailure, type PaymentFailureCode, type PaymentFeeDetails, type PaymentInstructions, type PaymentLink, type PaymentLinkCreate, type PaymentLinkUpdate, type PaymentMethodField, type PaymentMethodOption, type PaymentNextAction, type PaymentSettlement, type PaymentStatus, type PaymentTestScenario, type Payout, type Plan, type PlanCheckoutCreate, type PlanCouponCreate, type PlanCreate, type PlanFeatureValues, type PlanFeaturesInput, type PlanLinkCreate, type PlanPrice, type PlanPriceInput, type PlanSeats, type PlanUpdate, type PortalFeatures, type PortalSession, type PortalSessionCreate, type Product, type ProductCategory, type ProductCheckoutCreate, type ProductCouponCreate, type ProductCreate, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicCheckoutItem, type PublicClaim, type PublicClaimSummary, type PublicFulfillment, type PublicFulfillmentRefund, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type REFUND_MODES, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SUSPENSION_DAYS, type SubmitLabel, type SubscribableEventType, type Subscription, type SubscriptionCancel, type SubscriptionChange, type SubscriptionChangeCreate, type SubscriptionChangePreview, type SubscriptionChangePreviewInput, type SubscriptionChangeResult, type SubscriptionCreate, type SubscriptionRenewal, type SubscriptionStatus, type SubscriptionTerms, type SubscriptionUpdate, type SuspensionDays, type TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type TransportOptions, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, type WEBHOOK_TEST_EVENT, type WebhookEndpoint, type WebhookEndpointCreate, type WebhookEndpointUpdate, type WebhookEvent, WebhookVerificationError, type Weekday, type apiVersionLifecycle, type apiVersionStage, type currentApiVersion, type findBank, type isApiVersion, type isApiVersionRetired, type isLandlinePhone, type isMobilePhone, type nationalPhone, type supportedApiVersions, type tokenEnvironment, type tokenPrefix, verifyWebhook };
378
+ export { type ACCOUNT_NUMBER_LENGTH, type API_ERROR_CODES, type API_ERROR_TYPES, type API_VERSIONS, type API_VERSION_HEADER, type API_VERSION_PATTERN, type Actor, type Address, type AddressInput, type AfterCompletion, type AfterCompletionInput, type ApiErrorBody, type ApiErrorCode, type ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type BankCode, type Billete, BilleteError, type BilleteErrorCode, type BilleteOptions, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CLAIM_OUTCOMES, type CLAIM_REASONS, type CLAIM_STATUSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type Claim, type ClaimMessage, type ClaimOutcome, type ClaimReason, type ClaimResolve, type ClaimRespond, type ClaimStatus, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientClaimCreate, type ClientCustomerClaimCreate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientPaymentCode, type ClientRefundDestination, type ClientSubscriptionCancel, type ClientSubscriptionSeats, type ClientSubscriptionUpdate, type CollectInput, type CollectSettings, type Coupon, type CouponCreate, type CouponUpdate, type Currency, type CurrencyAvailability, type CustomField, type CustomFieldInput, type Customer, type CustomerCreate, type CustomerDetails, type CustomerFeature, type CustomerInput, type CustomerMember, type CustomerMemberCreate, type CustomerMemberList, type CustomerMemberUpdate, type CustomerSession, type CustomerSessionCreate, type CustomerSubscription, type CustomerSubscriptionChangeResult, type CustomerUpdate, type Deletion, type ENVIRONMENTS, type EVENT_TYPES, type Environment, type Event, type EventDataMap, type EventSelector, type EventType, type ExchangeRate, type FEATURE_TYPES, type FULFILLMENT_METHODS, type FULFILLMENT_STATUSES, type Feature, type FeatureCreate, type FeatureOperation, type FeatureOperationCommit, type FeatureOperationCreate, type FeatureOperationResult, type FeatureReset, type FeatureType, type FeatureUpdate, type FeatureUsageResult, type Fulfillment, type FulfillmentChoice, type FulfillmentDeliverInput, type FulfillmentHandover, type FulfillmentHandoverInput, type FulfillmentInput, type FulfillmentMethod, type FulfillmentOption, type FulfillmentStatus, type FulfillmentTracking, type FulfillmentTrackingInput, type GRACE_PERIOD_DAYS, type GracePeriodDays, type INVOICE_REASONS, type INVOICE_STATUSES, type Invoice, type InvoiceCreate, type InvoiceLineInput, type InvoiceReason, type InvoiceStatus, type KEY_PATTERN, type LATEST_API_VERSION, type LatestApiVersion, type LineItem, type List, type ListQuery, type ListSort, type MAX_QUANTITY, type MAX_SEATS, type MOBILE_PREFIXES, type Metadata, type MobilePrefix, type PAYMENT_FAILURE_CODES, type PAYMENT_STATUSES, type PRODUCT_CATEGORIES, type Payment, type PaymentAttempt, type PaymentFailure, type PaymentFailureCode, type PaymentFeeDetails, type PaymentInstructions, type PaymentLink, type PaymentLinkCreate, type PaymentLinkUpdate, type PaymentMethodField, type PaymentMethodList, type PaymentMethodOption, type PaymentNextAction, type PaymentSettlement, type PaymentStatus, type PaymentTestScenario, type PaymentsUnavailable, type Plan, type PlanCheckoutCreate, type PlanCouponCreate, type PlanCreate, type PlanFeatureValues, type PlanFeaturesInput, type PlanLinkCreate, type PlanPrice, type PlanPriceInput, type PlanSeats, type PlanUpdate, type PortalFeatures, type PortalSession, type PortalSessionCreate, type Product, type ProductCategory, type ProductCheckoutCreate, type ProductCouponCreate, type ProductCreate, type ProductImage, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicCheckoutItem, type PublicClaim, type PublicClaimSummary, type PublicFulfillment, type PublicFulfillmentRefund, type PublicInvoice, type PublicMerchant, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type PublicRefund, type REFUND_MODES, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SUSPENSION_DAYS, type SubmitLabel, type SubscribableEventType, type Subscription, type SubscriptionCancel, type SubscriptionChange, type SubscriptionChangeCreate, type SubscriptionChangePreview, type SubscriptionChangePreviewInput, type SubscriptionChangeResult, type SubscriptionCreate, type SubscriptionRenewal, type SubscriptionStatus, type SubscriptionTerms, type SubscriptionUpdate, type SuspensionDays, type TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type TransportOptions, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, type WEBHOOK_TEST_EVENT, type WebhookEndpoint, type WebhookEndpointCreate, type WebhookEndpointUpdate, type WebhookEvent, WebhookVerificationError, type Weekday, type apiVersionLifecycle, type apiVersionStage, type currentApiVersion, type findBank, type isApiVersion, type isApiVersionRetired, type isLandlinePhone, type isMobilePhone, type nationalPhone, type supportedApiVersions, type tokenEnvironment, type tokenPrefix, verifyWebhook };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as segment, r as BilleteError, t as createTransport } from "./http-B4z0Sbfu.js";
1
+ import { n as segment, r as BilleteError, t as createTransport } from "./http-moOPtD7S.js";
2
2
  import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
3
3
  // ../contracts/src/environment.ts
4
4
  /**
@@ -74,7 +74,7 @@ function fromEnv(name) {
74
74
  *
75
75
  * ```ts
76
76
  * // Reads BILLETE_API_KEY.
77
- * const billete = createBillete({ apiVersion: "2026-10-24", environment: "test" });
77
+ * const billete = createBillete({ apiVersion: "2026-11-06.beta", environment: "test" });
78
78
  * const { allowed } = await billete.features.consume("user_123", "tokens", 850);
79
79
  * ```
80
80
  */
@@ -422,17 +422,6 @@ create: (input, options) => http.request({
422
422
  options
423
423
  })
424
424
  };
425
- const balance = { retrieve: (options) => http.request({
426
- method: "GET",
427
- path: "/v1/balance",
428
- options
429
- }) };
430
- const payoutCrud = collection(http, "/v1/payouts");
431
- const payouts = {
432
- retrieve: payoutCrud.retrieve,
433
- list: payoutCrud.list,
434
- iterate: payoutCrud.iterate
435
- };
436
425
  const webhookEndpoints = {
437
426
  ...collection(http, "/v1/webhook-endpoints"),
438
427
  /** Stops its events; its deliveries stay as history. */
@@ -455,8 +444,6 @@ create: (input, options) => http.request({
455
444
  payments,
456
445
  fulfillments,
457
446
  claims,
458
- balance,
459
- payouts,
460
447
  webhookEndpoints,
461
448
  events: {
462
449
  retrieve: eventCrud.retrieve,
@@ -1,4 +1,4 @@
1
- import { o as WebhookEvent } from "./events-TqSJMxqF.js";
1
+ import { o as WebhookEvent } from "./events-CLifhYGq.js";
2
2
  export declare class WebhookVerificationError extends Error {
3
3
  constructor(message: string);
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boelabs/billete-sdk",
3
- "version": "9.1.0",
3
+ "version": "10.0.0-beta.1",
4
4
  "description": "Billete SDK: server client, browser client and webhook verification",
5
5
  "keywords": [
6
6
  "billete",