@boelabs/billete-sdk 2.0.0 → 4.0.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/README.md +3 -3
- package/dist/client.d.ts +9 -4
- package/dist/client.js +12 -2
- package/dist/{errors-Cu8XMn5I.d.ts → errors-D0dmjljM.d.ts} +99 -11
- package/dist/{events-CrmMdwBX.d.ts → events-C0pKiZ_h.d.ts} +34 -5
- package/dist/{http-CgBMbPS2.js → http-BuqnZQ6s.js} +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.js +6 -2
- package/dist/webhooks.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Crea una clave secreta en el dashboard (**Desarrolladores → Claves API**) y gu
|
|
|
62
62
|
```ts
|
|
63
63
|
import { createBillete } from "@boelabs/billete-sdk";
|
|
64
64
|
|
|
65
|
-
const billete = createBillete({ apiVersion: "2026-10-
|
|
65
|
+
const billete = createBillete({ apiVersion: "2026-10-10", environment: "test" });
|
|
66
66
|
|
|
67
67
|
const checkout = await billete.checkouts.create({
|
|
68
68
|
plan: "plan_…",
|
|
@@ -90,7 +90,7 @@ solicite expresamente. En carritos, solo ofrece los demás métodos que todos lo
|
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
92
|
const billete = createBillete({
|
|
93
|
-
apiVersion: "2026-10-
|
|
93
|
+
apiVersion: "2026-10-10",
|
|
94
94
|
environment: "production",
|
|
95
95
|
apiKey: process.env.BILLETE_API_KEY,
|
|
96
96
|
timeoutMs: 30_000,
|
|
@@ -256,7 +256,7 @@ return { token: session.token };
|
|
|
256
256
|
// Navegador
|
|
257
257
|
import { createClient } from "@boelabs/billete-sdk/client";
|
|
258
258
|
|
|
259
|
-
const billete = createClient({ apiVersion: "2026-10-
|
|
259
|
+
const billete = createClient({ apiVersion: "2026-10-10", customerSession: token });
|
|
260
260
|
|
|
261
261
|
const { data: subscriptions } = await billete.customer.subscriptions();
|
|
262
262
|
const tokens = await billete.customer.feature("tokens");
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as PRODUCT_CATEGORIES, $t as ListQuery, A as ExchangeRate, At as SubscriptionTerms, B as Fulfillment, Bt as PAYMENT_FAILURE_CODES, C as Customer, Ct as SubmitLabel, D as CustomerMemberList, Dt as SubscriptionChangeResult, E as CustomerMember, Et as SubscriptionChangePreview, F as FeatureOperation, Ft as ReceiptSend, G as INVOICE_REASONS, Gt as BILLING_MONTHS, H as FulfillmentMethod, Ht as ACCOUNT_NUMBER_LENGTH, I as FeatureOperationResult, It as API_ERROR_TYPES, J as InvoiceReason, Jt as CURRENCIES, K as INVOICE_STATUSES, Kt as BankCode, L as FeatureReset, Lt as ApiErrorBody, M as FULFILLMENT_METHODS, Mt as WebhookEndpoint, N as FULFILLMENT_STATUSES, Nt as Weekday, O as CustomerSession, Ot as SubscriptionRenewal, P as Feature, Pt as ReceiptReference, Q as PAYMENT_STATUSES, Qt as List, R as FeatureType, Rt as ApiErrorEnvelope, S as CustomField, St as SUBSCRIPTION_STATUSES, T as CustomerFeature, Tt as SubscriptionChange, U as FulfillmentStatus, Ut as Address, V as FulfillmentChoice, Vt as PaymentFailureCode, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Xt as GRACE_PERIOD_DAYS, Y as InvoiceStatus, Yt as Currency, Z as MAX_SEATS, Zt as GracePeriodDays, _ as CheckoutItem, _n as tokenPrefix, _t as Refund, a as Actor, an as TAX_BEHAVIORS, at as PaymentStatus, b as Coupon, bt as RiskLevel, c as BalanceAmount, cn as VENEZUELAN_BANKS, ct as PlanFeatureValues, d as CARRIER_TEST_SCENARIOS, dn as isMobilePhone, dt as PortalSession, en as ListSort, et as Payment, f as CHECKOUT_PURPOSES, fn as nationalPhone, ft as Product, g as Checkout, gn as tokenEnvironment, gt as RISK_LEVELS, h as CarrierOffice, hn as TokenKind, ht as RESET_FREQUENCIES, i as WebhookEvent, in as MobilePrefix, it as PaymentSettlement, j as FEATURE_TYPES, jt as USAGE_FEATURE_TYPES, k as Event, kt as SubscriptionStatus, l as CANCELLATION_FEEDBACK, ln as findBank, lt as PlanPrice, m as Carrier, mn as Environment, mt as ProductVariant, n as EventDataMap, nn as MOBILE_PREFIXES, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, ot as Payout, p as CancellationFeedback, pn as ENVIRONMENTS, pt as ProductCategory, q as Invoice, qt as BillingMonths, r as EventType, rn as Metadata, rt as PaymentLink, s as Balance, sn as Timestamp, st as Plan, t as EVENT_TYPES, tn as MAX_QUANTITY, tt as PaymentAttempt, u as CARRIERS, un as isLandlinePhone, ut as PlanSeats, v as CheckoutPurpose, vt as ResetFrequency, w as CustomerDetails, wt as Subscription, x as CurrencyAvailability, xt as SUBMIT_LABELS, y as CollectSettings, yt as Retirement, z as FeatureUsageResult, zt as ApiErrorType } from "./events-
|
|
1
|
+
import { $ as SubscriptionCancel, A as FeatureUpdate, At as apiVersionLifecycle, B as PlanCreate, C as CustomerMemberUpdate, Ct as API_VERSION_HEADER, D as FeatureCreate, Dt as ApiVersionStage, E as EventSelector, Et as ApiVersionLifecycle, F as KEY_PATTERN, Ft as supportedApiVersions, G as PortalSessionCreate, H as PlanLinkCreate, I as PaymentLinkCreate, J as ProductCreate, K as ProductCheckoutCreate, L as PaymentLinkUpdate, M as FulfillmentTrackingInput, Mt as currentApiVersion, N as InvoiceCreate, Nt as isApiVersion, O as FeatureOperationCommit, Ot as LATEST_API_VERSION, P as InvoiceLineInput, Pt as isApiVersionRetired, Q as RetireInput, R as PlanCheckoutCreate, S as CustomerMemberCreate, St as API_VERSIONS, T as CustomerUpdate, Tt as ApiVersion, U as PlanPriceInput, V as PlanFeaturesInput, W as PlanUpdate, X as ProductUpdate, Y as ProductLinkCreate, Z as RefundCreate, _ as CouponCreate, _t as PublicFulfillment, a as CheckoutCreate, at as WebhookEndpointCreate, b as CustomerCreate, bt as PublicPaymentState, c as ClientCheckoutUpdate, ct as CustomerSubscriptionChangeResult, d as ClientLinkCheckout, dt as PaymentMethodField, et as SubscriptionChangeCreate, f as ClientPaymentCode, ft as PaymentMethodOption, g as CollectInput, gt as PublicCheckout, h as ClientSubscriptionUpdate, ht as PortalFeatures, i as AfterCompletionInput, it as VariantInput, j as FulfillmentInput, jt as apiVersionStage, k as FeatureOperationCreate, kt as LatestApiVersion, l as ClientFulfillmentProblem, lt as FulfillmentOption, m as ClientSubscriptionSeats, mt as PaymentTestScenario, n as RequestOptions, nt as SubscriptionCreate, o as CheckoutItemInput, ot as WebhookEndpointUpdate, p as ClientSubscriptionCancel, pt as PaymentNextAction, q as ProductCouponCreate, r as TransportOptions, rt as SubscriptionUpdate, s as ClientCheckoutPay, st as CustomerSubscription, t as BilleteError, tt as SubscriptionChangePreviewInput, u as ClientInvoicePay, ut as PaymentInstructions, v as CouponUpdate, vt as PublicInvoice, w as CustomerSessionCreate, wt as API_VERSION_PATTERN, x as CustomerInput, xt as PublicPortal, y as CustomFieldInput, yt as PublicPaymentLink, z as PlanCouponCreate } from "./errors-D0dmjljM.js";
|
|
2
|
+
import { $ as PRODUCT_CATEGORIES, $t as ListQuery, A as ExchangeRate, At as SubscriptionTerms, B as Fulfillment, Bt as PAYMENT_FAILURE_CODES, C as Customer, Ct as SubmitLabel, D as CustomerMemberList, Dt as SubscriptionChangeResult, E as CustomerMember, Et as SubscriptionChangePreview, F as FeatureOperation, Ft as ReceiptSend, G as INVOICE_REASONS, Gt as BILLING_MONTHS, H as FulfillmentMethod, Ht as ACCOUNT_NUMBER_LENGTH, I as FeatureOperationResult, It as API_ERROR_TYPES, J as InvoiceReason, Jt as CURRENCIES, K as INVOICE_STATUSES, Kt as BankCode, L as FeatureReset, Lt as ApiErrorBody, M as FULFILLMENT_METHODS, Mt as WebhookEndpoint, N as FULFILLMENT_STATUSES, Nt as Weekday, O as CustomerSession, Ot as SubscriptionRenewal, P as Feature, Pt as ReceiptReference, Q as PAYMENT_STATUSES, Qt as List, R as FeatureType, Rt as ApiErrorEnvelope, S as CustomField, St as SUBSCRIPTION_STATUSES, T as CustomerFeature, Tt as SubscriptionChange, U as FulfillmentStatus, Ut as Address, V as FulfillmentChoice, Vt as PaymentFailureCode, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Xt as GRACE_PERIOD_DAYS, Y as InvoiceStatus, Yt as Currency, Z as MAX_SEATS, Zt as GracePeriodDays, _ as CheckoutItem, _n as tokenPrefix, _t as Refund, a as Actor, an as TAX_BEHAVIORS, at as PaymentStatus, b as Coupon, bt as RiskLevel, c as BalanceAmount, cn as VENEZUELAN_BANKS, ct as PlanFeatureValues, d as CARRIER_TEST_SCENARIOS, dn as isMobilePhone, dt as PortalSession, en as ListSort, et as Payment, f as CHECKOUT_PURPOSES, fn as nationalPhone, ft as Product, g as Checkout, gn as tokenEnvironment, gt as RISK_LEVELS, h as CarrierOffice, hn as TokenKind, ht as RESET_FREQUENCIES, i as WebhookEvent, in as MobilePrefix, it as PaymentSettlement, j as FEATURE_TYPES, jt as USAGE_FEATURE_TYPES, k as Event, kt as SubscriptionStatus, l as CANCELLATION_FEEDBACK, ln as findBank, lt as PlanPrice, m as Carrier, mn as Environment, mt as ProductVariant, n as EventDataMap, nn as MOBILE_PREFIXES, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, ot as Payout, p as CancellationFeedback, pn as ENVIRONMENTS, pt as ProductCategory, q as Invoice, qt as BillingMonths, r as EventType, rn as Metadata, rt as PaymentLink, s as Balance, sn as Timestamp, st as Plan, t as EVENT_TYPES, tn as MAX_QUANTITY, tt as PaymentAttempt, u as CARRIERS, un as isLandlinePhone, ut as PlanSeats, v as CheckoutPurpose, vt as ResetFrequency, w as CustomerDetails, wt as Subscription, x as CurrencyAvailability, xt as SUBMIT_LABELS, y as CollectSettings, yt as Retirement, z as FeatureUsageResult, zt as ApiErrorType } from "./events-C0pKiZ_h.js";
|
|
3
3
|
//#region src/create-client.d.ts
|
|
4
4
|
interface ClientOptions extends TransportOptions {
|
|
5
5
|
/**
|
|
@@ -14,7 +14,7 @@ interface ClientOptions extends TransportOptions {
|
|
|
14
14
|
* and customer data requires a short-lived customer session minted by your server.
|
|
15
15
|
*
|
|
16
16
|
* ```ts
|
|
17
|
-
* const billete = createClient({ apiVersion: "2026-10-
|
|
17
|
+
* const billete = createClient({ apiVersion: "2026-10-10", customerSession: token });
|
|
18
18
|
* const [subscription] = (await billete.customer.subscriptions()).data;
|
|
19
19
|
* if (subscription?.renewal?.status === "overdue") showBanner(subscription.renewal);
|
|
20
20
|
* ```
|
|
@@ -94,6 +94,11 @@ export declare function createClient(options: ClientOptions): {
|
|
|
94
94
|
resumeSubscription: (id: string, options?: RequestOptions) => Promise<CustomerSubscription>;
|
|
95
95
|
/** Switches the billing cycle from the next renewal. */
|
|
96
96
|
updateSubscription: (id: string, input: ClientSubscriptionUpdate, options?: RequestOptions) => Promise<CustomerSubscription>;
|
|
97
|
+
/**
|
|
98
|
+
* Buys more seats now, paid in the checkout it returns (`type: "checkout"`), or leaves fewer
|
|
99
|
+
* from the next renewal; during a trial both apply now. Only for plans charged per seat.
|
|
100
|
+
*/
|
|
101
|
+
changeSeats: (id: string, input: ClientSubscriptionSeats, options?: RequestOptions) => Promise<CustomerSubscriptionChangeResult>;
|
|
97
102
|
/** Withdraws the mandate: renewals are then paid by hand from their Cobro. */
|
|
98
103
|
stopAutoCharge: (id: string, options?: RequestOptions) => Promise<CustomerSubscription>;
|
|
99
104
|
features: (options?: RequestOptions) => Promise<List<CustomerFeature>>;
|
|
@@ -102,4 +107,4 @@ export declare function createClient(options: ClientOptions): {
|
|
|
102
107
|
};
|
|
103
108
|
type BilleteClient = ReturnType<typeof createClient>;
|
|
104
109
|
//#endregion
|
|
105
|
-
export { type ACCOUNT_NUMBER_LENGTH, 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 ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type BilleteClient, BilleteError, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientOptions, type ClientPaymentCode, type ClientSubscriptionCancel, 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 CustomerUpdate, 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 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 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 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 ProductCreate, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicFulfillment, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RetireInput, type Retirement, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SubmitLabel, 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 TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, 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 };
|
|
110
|
+
export { type ACCOUNT_NUMBER_LENGTH, 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 ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type BilleteClient, BilleteError, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientOptions, type ClientPaymentCode, 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 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 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 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 PublicFulfillment, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RetireInput, type Retirement, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SubmitLabel, 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 TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, 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-
|
|
1
|
+
import { n as segment, r as BilleteError, t as createTransport } from "./http-BuqnZQ6s.js";
|
|
2
2
|
//#region 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-Cg
|
|
|
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-
|
|
9
|
+
* const billete = createClient({ apiVersion: "2026-10-10", customerSession: token });
|
|
10
10
|
* const [subscription] = (await billete.customer.subscriptions()).data;
|
|
11
11
|
* if (subscription?.renewal?.status === "overdue") showBanner(subscription.renewal);
|
|
12
12
|
* ```
|
|
@@ -195,6 +195,16 @@ list: (options) => http.request({
|
|
|
195
195
|
body: input,
|
|
196
196
|
options
|
|
197
197
|
}),
|
|
198
|
+
/**
|
|
199
|
+
* Buys more seats now, paid in the checkout it returns (`type: "checkout"`), or leaves fewer
|
|
200
|
+
* from the next renewal; during a trial both apply now. Only for plans charged per seat.
|
|
201
|
+
*/
|
|
202
|
+
changeSeats: (id, input, options) => http.request({
|
|
203
|
+
method: "POST",
|
|
204
|
+
path: `/v1/client/customer/subscriptions/${segment(id)}/seats`,
|
|
205
|
+
body: input,
|
|
206
|
+
options
|
|
207
|
+
}),
|
|
198
208
|
/** Withdraws the mandate: renewals are then paid by hand from their Cobro. */
|
|
199
209
|
stopAutoCharge: (id, options) => http.request({
|
|
200
210
|
method: "POST",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Fulfillment, Ct as SubmitLabel, H as FulfillmentMethod, J as InvoiceReason, L as FeatureReset, Lt as ApiErrorBody, Pt as ReceiptReference, S as CustomField, U as FulfillmentStatus, Ut as Address, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Y as InvoiceStatus, Yt as Currency, Zt as GracePeriodDays, _ as CheckoutItem, at as PaymentStatus, h as CarrierOffice, lt as PlanPrice, m as Carrier, mn as Environment, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, p as CancellationFeedback, pt as ProductCategory, qt as BillingMonths, r as EventType, rn as Metadata, sn as Timestamp, ut as PlanSeats, v as CheckoutPurpose, w as CustomerDetails, wt as Subscription, y as CollectSettings, zt as ApiErrorType } from "./events-
|
|
1
|
+
import { B as Fulfillment, Ct as SubmitLabel, H as FulfillmentMethod, J as InvoiceReason, L as FeatureReset, Lt as ApiErrorBody, Pt as ReceiptReference, S as CustomField, U as FulfillmentStatus, Ut as Address, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Y as InvoiceStatus, Yt as Currency, Zt as GracePeriodDays, _ as CheckoutItem, at as PaymentStatus, h as CarrierOffice, lt as PlanPrice, m as Carrier, mn as Environment, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, p as CancellationFeedback, pt as ProductCategory, qt as BillingMonths, r as EventType, rn as Metadata, sn as Timestamp, ut as PlanSeats, v as CheckoutPurpose, w as CustomerDetails, wt as Subscription, y as CollectSettings, zt as ApiErrorType } from "./events-C0pKiZ_h.js";
|
|
2
2
|
//#region ../contracts/src/api-versions.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Billete API versions. Kept free of runtime dependencies: the dashboard, the API, the worker and
|
|
@@ -10,7 +10,7 @@ import { B as Fulfillment, Ct as SubmitLabel, H as FulfillmentMethod, J as Invoi
|
|
|
10
10
|
* that is still supported.
|
|
11
11
|
*/
|
|
12
12
|
/** Every version ever published, oldest first. Append only: retired versions stay listed. */
|
|
13
|
-
declare const API_VERSIONS: readonly ["2026-10-07.beta", "2026-10-08"];
|
|
13
|
+
declare const API_VERSIONS: readonly ["2026-10-07.beta", "2026-10-08", "2026-10-09", "2026-10-10"];
|
|
14
14
|
type ApiVersion = (typeof API_VERSIONS)[number];
|
|
15
15
|
type LatestApiVersion = typeof API_VERSIONS extends readonly [...unknown[], infer Last] ? Last : never;
|
|
16
16
|
/** The version the code speaks: responses are built in its shape. Always the last entry. */
|
|
@@ -52,8 +52,20 @@ interface CustomerSubscription extends Omit<Subscription, "metadata"> {
|
|
|
52
52
|
plan: {
|
|
53
53
|
name: string;
|
|
54
54
|
cycles: PlanPrice[];
|
|
55
|
+
seats: PlanSeats;
|
|
55
56
|
};
|
|
56
57
|
}
|
|
58
|
+
/** What a customer's change from the portal did: applied, scheduled, or a checkout to pay it. */
|
|
59
|
+
type CustomerSubscriptionChangeResult = {
|
|
60
|
+
type: "applied" | "scheduled";
|
|
61
|
+
subscription: CustomerSubscription;
|
|
62
|
+
} | {
|
|
63
|
+
type: "checkout";
|
|
64
|
+
checkout: {
|
|
65
|
+
id: string;
|
|
66
|
+
url: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
57
69
|
/** What the business lets its customers do from the portal. */
|
|
58
70
|
interface PortalFeatures {
|
|
59
71
|
/** Paid and closed Cobros are listed; open ones always are, so they can be paid. */
|
|
@@ -64,6 +76,8 @@ interface PortalFeatures {
|
|
|
64
76
|
cancellationReasons: boolean;
|
|
65
77
|
/** Switch between the plan's billing cycles, from the next renewal. */
|
|
66
78
|
switchCycle: boolean;
|
|
79
|
+
/** Buy more seats of a plan charged per seat, or fewer from the next renewal. */
|
|
80
|
+
changeSeats: boolean;
|
|
67
81
|
/** Turn off automatic charging and pay each renewal by hand. */
|
|
68
82
|
stopAutoCharge: boolean;
|
|
69
83
|
}
|
|
@@ -173,9 +187,14 @@ interface PublicCheckout {
|
|
|
173
187
|
trialDays: number | null;
|
|
174
188
|
couponCode: string | null;
|
|
175
189
|
allowCoupons: boolean;
|
|
176
|
-
/** The customer may change the quantity of the single item. */
|
|
190
|
+
/** The customer may change the quantity of the single item: units, or seats of a plan. */
|
|
177
191
|
adjustableQuantity: boolean;
|
|
178
|
-
/**
|
|
192
|
+
/** Fewest units the customer can choose: 1, or the plan's minimum seats. */
|
|
193
|
+
minQuantity: number;
|
|
194
|
+
/**
|
|
195
|
+
* Most units the customer can choose right now: the link's limit, capped by stock, or the
|
|
196
|
+
* plan's maximum seats.
|
|
197
|
+
*/
|
|
179
198
|
maxQuantity: number;
|
|
180
199
|
/**
|
|
181
200
|
* Variants the customer may switch between for a product checkout. `maxQuantity` is the most
|
|
@@ -394,9 +413,15 @@ interface PublicPaymentLink {
|
|
|
394
413
|
trialDays: number;
|
|
395
414
|
cycles: PlanPrice[];
|
|
396
415
|
} | null;
|
|
397
|
-
/**
|
|
416
|
+
/**
|
|
417
|
+
* The customer chooses how many units to buy, or how many seats of a plan charged per seat;
|
|
418
|
+
* otherwise every purchase is one unit, or the plan's minimum seats.
|
|
419
|
+
*/
|
|
398
420
|
adjustableQuantity: boolean;
|
|
399
|
-
/**
|
|
421
|
+
/**
|
|
422
|
+
* Most units (or seats) per purchase when `adjustableQuantity`; `null` leaves stock (or the
|
|
423
|
+
* plan's maximum) as the only limit.
|
|
424
|
+
*/
|
|
400
425
|
maxQuantity: number | null;
|
|
401
426
|
/** Effective required details; fulfillment adds name and phone to the saved preferences. */
|
|
402
427
|
collect: CollectSettings;
|
|
@@ -427,10 +452,16 @@ interface CustomerUpdate {
|
|
|
427
452
|
interface CustomerMemberCreate {
|
|
428
453
|
externalId: string;
|
|
429
454
|
name?: string;
|
|
455
|
+
/**
|
|
456
|
+
* Takes a seat before the others when there are fewer seats than active members (the
|
|
457
|
+
* organization's admin, say). Defaults to `false`.
|
|
458
|
+
*/
|
|
459
|
+
priority?: boolean;
|
|
430
460
|
metadata?: Metadata;
|
|
431
461
|
}
|
|
432
462
|
interface CustomerMemberUpdate {
|
|
433
463
|
name?: string | null;
|
|
464
|
+
priority?: boolean;
|
|
434
465
|
metadata?: Metadata;
|
|
435
466
|
}
|
|
436
467
|
interface FeatureOperationCreate {
|
|
@@ -581,9 +612,19 @@ interface SubscriptionChangePreviewInput {
|
|
|
581
612
|
plan?: string;
|
|
582
613
|
months?: BillingMonths;
|
|
583
614
|
quantity?: number;
|
|
615
|
+
/**
|
|
616
|
+
* During a trial a change made `now` applies at no cost and the trial goes on; `true` ends the
|
|
617
|
+
* trial instead and charges the new terms from today.
|
|
618
|
+
*/
|
|
619
|
+
endTrial?: boolean;
|
|
584
620
|
}
|
|
585
621
|
interface SubscriptionChangeCreate extends SubscriptionChangePreviewInput {
|
|
586
622
|
when: "now" | "renewal";
|
|
623
|
+
/**
|
|
624
|
+
* Accepts a change that leaves fewer seats than active members: the ones without a seat lose
|
|
625
|
+
* access (`enabled: false`) until seats free up. Otherwise it fails with `seats_in_use`.
|
|
626
|
+
*/
|
|
627
|
+
disableExcessMembers?: boolean;
|
|
587
628
|
acceptUnusedCredit?: boolean;
|
|
588
629
|
successUrl?: string;
|
|
589
630
|
cancelUrl?: string;
|
|
@@ -599,18 +640,42 @@ interface ClientSubscriptionCancel {
|
|
|
599
640
|
feedback?: CancellationFeedback;
|
|
600
641
|
comment?: string;
|
|
601
642
|
}
|
|
602
|
-
/**
|
|
603
|
-
|
|
643
|
+
/**
|
|
644
|
+
* Exactly one of `percentOff` and `amountOff`. A `currency` is required by `amountOff` and
|
|
645
|
+
* `minimumAmount`, and limits the coupon to prices in it.
|
|
646
|
+
*/
|
|
647
|
+
interface CouponFields {
|
|
604
648
|
code: string;
|
|
605
649
|
name?: string;
|
|
606
650
|
percentOff?: number;
|
|
607
651
|
amountOff?: number;
|
|
608
652
|
currency?: Currency;
|
|
609
|
-
|
|
610
|
-
|
|
653
|
+
/** Smallest subtotal, before discount and tax, the coupon needs. */
|
|
654
|
+
minimumAmount?: number;
|
|
655
|
+
/** Each customer (by email) uses it once. */
|
|
656
|
+
oncePerCustomer?: boolean;
|
|
657
|
+
/** Only for customers who never bought from the business. */
|
|
658
|
+
firstPurchaseOnly?: boolean;
|
|
611
659
|
maxRedemptions?: number;
|
|
660
|
+
/** Until when it can be applied; omit for no end. */
|
|
612
661
|
expiresAt?: string;
|
|
613
662
|
}
|
|
663
|
+
interface ProductCouponCreate extends CouponFields {
|
|
664
|
+
appliesTo: "products";
|
|
665
|
+
/** Limits it to these products (IDs); omit for every product. */
|
|
666
|
+
products?: string[];
|
|
667
|
+
}
|
|
668
|
+
interface PlanCouponCreate extends CouponFields {
|
|
669
|
+
appliesTo: "plans";
|
|
670
|
+
/** Limits it to these plans (IDs); omit for every plan. */
|
|
671
|
+
plans?: string[];
|
|
672
|
+
/**
|
|
673
|
+
* How many payments of the subscription it discounts, from the first one charged (after a
|
|
674
|
+
* trial, the first renewal): `1` by default, `null` for every payment.
|
|
675
|
+
*/
|
|
676
|
+
payments?: number | null;
|
|
677
|
+
}
|
|
678
|
+
type CouponCreate = ProductCouponCreate | PlanCouponCreate;
|
|
614
679
|
interface CouponUpdate {
|
|
615
680
|
name?: string | null;
|
|
616
681
|
active?: boolean;
|
|
@@ -659,6 +724,13 @@ interface PlanLinkCreate extends PaymentLinkFields {
|
|
|
659
724
|
type: "plan";
|
|
660
725
|
plan: string;
|
|
661
726
|
months?: BillingMonths[];
|
|
727
|
+
/**
|
|
728
|
+
* Lets the customer choose how many seats to buy, within the plan's range; only for plans
|
|
729
|
+
* charged per seat. Defaults to the plan's minimum.
|
|
730
|
+
*/
|
|
731
|
+
adjustableQuantity?: boolean;
|
|
732
|
+
/** Most seats per purchase; only with `adjustableQuantity`. Omit to allow the plan's maximum. */
|
|
733
|
+
maxQuantity?: number;
|
|
662
734
|
}
|
|
663
735
|
type PaymentLinkCreate = ProductLinkCreate | PlanLinkCreate;
|
|
664
736
|
interface PaymentLinkUpdate {
|
|
@@ -674,6 +746,8 @@ interface PaymentLinkUpdate {
|
|
|
674
746
|
interface CheckoutFields {
|
|
675
747
|
customer?: CustomerInput;
|
|
676
748
|
coupon?: string;
|
|
749
|
+
/** Lets the customer apply a coupon in the checkout. */
|
|
750
|
+
allowCoupons?: boolean;
|
|
677
751
|
collect?: CollectInput;
|
|
678
752
|
/**
|
|
679
753
|
* Where the customer goes after paying. `{CHECKOUT_ID}` is replaced by the checkout's ID, so
|
|
@@ -694,7 +768,14 @@ interface ProductCheckoutCreate extends CheckoutFields {
|
|
|
694
768
|
items: CheckoutItemInput[];
|
|
695
769
|
}
|
|
696
770
|
interface PlanCheckoutCreate extends CheckoutFields {
|
|
771
|
+
/** Seats of a plan charged per seat; fixed unless `adjustableQuantity`. */
|
|
697
772
|
quantity?: number;
|
|
773
|
+
/**
|
|
774
|
+
* Lets the customer choose the seats in the checkout, within the plan's range, starting at
|
|
775
|
+
* `quantity` (or the plan's minimum). Defaults to `true` for a plan charged per seat when
|
|
776
|
+
* `quantity` is omitted.
|
|
777
|
+
*/
|
|
778
|
+
adjustableQuantity?: boolean;
|
|
698
779
|
plan: string;
|
|
699
780
|
months: BillingMonths;
|
|
700
781
|
}
|
|
@@ -772,6 +853,13 @@ interface PortalSessionCreate {
|
|
|
772
853
|
interface ClientSubscriptionUpdate {
|
|
773
854
|
months: BillingMonths;
|
|
774
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* The seats a customer wants from the portal: more are paid now for what is left of the period;
|
|
858
|
+
* fewer apply from the next renewal (during a trial, both apply now).
|
|
859
|
+
*/
|
|
860
|
+
interface ClientSubscriptionSeats {
|
|
861
|
+
quantity: number;
|
|
862
|
+
}
|
|
775
863
|
interface ClientCheckoutUpdate {
|
|
776
864
|
quantity?: number;
|
|
777
865
|
variant?: string;
|
|
@@ -859,4 +947,4 @@ declare class BilleteError extends Error {
|
|
|
859
947
|
}, status: number);
|
|
860
948
|
}
|
|
861
949
|
//#endregion
|
|
862
|
-
export {
|
|
950
|
+
export { SubscriptionCancel as $, FeatureUpdate as A, apiVersionLifecycle as At, PlanCreate as B, CustomerMemberUpdate as C, API_VERSION_HEADER as Ct, FeatureCreate as D, ApiVersionStage as Dt, EventSelector as E, ApiVersionLifecycle as Et, KEY_PATTERN as F, supportedApiVersions as Ft, PortalSessionCreate as G, PlanLinkCreate as H, PaymentLinkCreate as I, ProductCreate as J, ProductCheckoutCreate as K, PaymentLinkUpdate as L, FulfillmentTrackingInput as M, currentApiVersion as Mt, InvoiceCreate as N, isApiVersion as Nt, FeatureOperationCommit as O, LATEST_API_VERSION as Ot, InvoiceLineInput as P, isApiVersionRetired as Pt, RetireInput as Q, PlanCheckoutCreate as R, CustomerMemberCreate as S, API_VERSIONS as St, CustomerUpdate as T, ApiVersion as Tt, PlanPriceInput as U, PlanFeaturesInput as V, PlanUpdate as W, ProductUpdate as X, ProductLinkCreate as Y, RefundCreate as Z, CouponCreate as _, PublicFulfillment as _t, CheckoutCreate as a, WebhookEndpointCreate as at, CustomerCreate as b, PublicPaymentState as bt, ClientCheckoutUpdate as c, CustomerSubscriptionChangeResult as ct, ClientLinkCheckout as d, PaymentMethodField as dt, SubscriptionChangeCreate as et, ClientPaymentCode as f, PaymentMethodOption as ft, CollectInput as g, PublicCheckout as gt, ClientSubscriptionUpdate as h, PortalFeatures as ht, AfterCompletionInput as i, VariantInput as it, FulfillmentInput as j, apiVersionStage as jt, FeatureOperationCreate as k, LatestApiVersion as kt, ClientFulfillmentProblem as l, FulfillmentOption as lt, ClientSubscriptionSeats as m, PaymentTestScenario as mt, RequestOptions as n, SubscriptionCreate as nt, CheckoutItemInput as o, WebhookEndpointUpdate as ot, ClientSubscriptionCancel as p, PaymentNextAction as pt, ProductCouponCreate as q, TransportOptions as r, SubscriptionUpdate as rt, ClientCheckoutPay as s, CustomerSubscription as st, BilleteError as t, SubscriptionChangePreviewInput as tt, ClientInvoicePay as u, PaymentInstructions as ut, CouponUpdate as v, PublicInvoice as vt, CustomerSessionCreate as w, API_VERSION_PATTERN as wt, CustomerInput as x, PublicPortal as xt, CustomFieldInput as y, PublicPaymentLink as yt, PlanCouponCreate as z };
|
|
@@ -304,6 +304,9 @@ interface CustomerMember extends Resource<"customer_member"> {
|
|
|
304
304
|
externalId: string;
|
|
305
305
|
name: string | null;
|
|
306
306
|
status: "active" | "removed";
|
|
307
|
+
/** Takes a seat before members without priority; then the longest active go first. */
|
|
308
|
+
priority: boolean;
|
|
309
|
+
/** Active and within the seats: what the customer's subscriptions grant all add up. */
|
|
307
310
|
enabled: boolean;
|
|
308
311
|
activeSince: Timestamp;
|
|
309
312
|
removedAt: Timestamp | null;
|
|
@@ -554,11 +557,24 @@ interface Coupon extends Resource<"coupon"> {
|
|
|
554
557
|
name: string | null;
|
|
555
558
|
percentOff: number | null;
|
|
556
559
|
amountOff: number | null;
|
|
560
|
+
/** The currency of `amountOff` and `minimumAmount`: the coupon only applies to prices in it. */
|
|
557
561
|
currency: Currency | null;
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
562
|
+
appliesTo: "products" | "plans";
|
|
563
|
+
/** Products it is limited to (`appliesTo: "products"`); `null` for every product. */
|
|
564
|
+
productIds: string[] | null;
|
|
565
|
+
/** Plans it is limited to (`appliesTo: "plans"`); `null` for every plan. */
|
|
566
|
+
planIds: string[] | null;
|
|
567
|
+
/**
|
|
568
|
+
* Payments of a subscription it discounts, from the first one charged; `null` for every
|
|
569
|
+
* payment. Always `1` for products.
|
|
570
|
+
*/
|
|
571
|
+
payments: number | null;
|
|
572
|
+
/** Smallest subtotal, before discount and tax, it needs. */
|
|
573
|
+
minimumAmount: number | null;
|
|
574
|
+
oncePerCustomer: boolean;
|
|
575
|
+
firstPurchaseOnly: boolean;
|
|
561
576
|
maxRedemptions: number | null;
|
|
577
|
+
/** Checkouts paid with it; renewals of a subscription do not count. */
|
|
562
578
|
redemptions: number;
|
|
563
579
|
expiresAt: Timestamp | null;
|
|
564
580
|
active: boolean;
|
|
@@ -590,9 +606,15 @@ interface PaymentLink extends Resource<"payment_link">, Retirement {
|
|
|
590
606
|
productId: string | null;
|
|
591
607
|
/** Variants offered for a product link; `null` offers every active variant. */
|
|
592
608
|
variantIds: string[] | null;
|
|
593
|
-
/**
|
|
609
|
+
/**
|
|
610
|
+
* The customer chooses how many units to buy, or how many seats of a plan charged per seat;
|
|
611
|
+
* otherwise every purchase is one unit, or the plan's minimum seats.
|
|
612
|
+
*/
|
|
594
613
|
adjustableQuantity: boolean;
|
|
595
|
-
/**
|
|
614
|
+
/**
|
|
615
|
+
* Most units (or seats) per purchase when `adjustableQuantity`; `null` leaves stock (or the
|
|
616
|
+
* plan's maximum) as the only limit.
|
|
617
|
+
*/
|
|
596
618
|
maxQuantity: number | null;
|
|
597
619
|
planId: string | null;
|
|
598
620
|
/** Billing cycles offered for a plan link; `null` offers every plan price. */
|
|
@@ -651,6 +673,8 @@ interface Checkout extends Resource<"checkout"> {
|
|
|
651
673
|
*/
|
|
652
674
|
trialDays: number | null;
|
|
653
675
|
couponCode: string | null;
|
|
676
|
+
/** The customer can apply a coupon in the checkout. */
|
|
677
|
+
allowCoupons: boolean;
|
|
654
678
|
subscriptionId: string | null;
|
|
655
679
|
paymentLinkId: string | null;
|
|
656
680
|
paymentId: string | null;
|
|
@@ -700,6 +724,11 @@ interface SubscriptionChangePreview {
|
|
|
700
724
|
version: number;
|
|
701
725
|
currentPeriodEnd: Timestamp;
|
|
702
726
|
periodEndIfPaidNow?: Timestamp;
|
|
727
|
+
/**
|
|
728
|
+
* Active members the change leaves without a seat: remove them first, or accept it with
|
|
729
|
+
* `disableExcessMembers`.
|
|
730
|
+
*/
|
|
731
|
+
excessMembers: number;
|
|
703
732
|
}
|
|
704
733
|
type SubscriptionChangeResult = {
|
|
705
734
|
type: "scheduled" | "applied";
|
|
@@ -18,7 +18,7 @@ var BilleteError = class extends Error {
|
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/http.ts
|
|
21
|
-
const SDK_VERSION = "
|
|
21
|
+
const SDK_VERSION = "4.0.0";
|
|
22
22
|
const DEFAULT_BASE_URL = "https://api.billete.run";
|
|
23
23
|
const RETRYABLE_STATUS = /* @__PURE__ */ new Set([
|
|
24
24
|
429,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as PRODUCT_CATEGORIES, $t as ListQuery, A as ExchangeRate, At as SubscriptionTerms, B as Fulfillment, Bt as PAYMENT_FAILURE_CODES, C as Customer, Ct as SubmitLabel, D as CustomerMemberList, Dt as SubscriptionChangeResult, E as CustomerMember, Et as SubscriptionChangePreview, F as FeatureOperation, Ft as ReceiptSend, G as INVOICE_REASONS, Gt as BILLING_MONTHS, H as FulfillmentMethod, Ht as ACCOUNT_NUMBER_LENGTH, I as FeatureOperationResult, It as API_ERROR_TYPES, J as InvoiceReason, Jt as CURRENCIES, K as INVOICE_STATUSES, Kt as BankCode, L as FeatureReset, Lt as ApiErrorBody, M as FULFILLMENT_METHODS, Mt as WebhookEndpoint, N as FULFILLMENT_STATUSES, Nt as Weekday, O as CustomerSession, Ot as SubscriptionRenewal, P as Feature, Pt as ReceiptReference, Q as PAYMENT_STATUSES, Qt as List, R as FeatureType, Rt as ApiErrorEnvelope, S as CustomField, St as SUBSCRIPTION_STATUSES, T as CustomerFeature, Tt as SubscriptionChange, U as FulfillmentStatus, Ut as Address, V as FulfillmentChoice, Vt as PaymentFailureCode, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Xt as GRACE_PERIOD_DAYS, Y as InvoiceStatus, Yt as Currency, Z as MAX_SEATS, Zt as GracePeriodDays, _ as CheckoutItem, _n as tokenPrefix, _t as Refund, a as Actor, an as TAX_BEHAVIORS, at as PaymentStatus, b as Coupon, bt as RiskLevel, c as BalanceAmount, cn as VENEZUELAN_BANKS, ct as PlanFeatureValues, d as CARRIER_TEST_SCENARIOS, dn as isMobilePhone, dt as PortalSession, en as ListSort, et as Payment, f as CHECKOUT_PURPOSES, fn as nationalPhone, ft as Product, g as Checkout, gn as tokenEnvironment, gt as RISK_LEVELS, h as CarrierOffice, hn as TokenKind, ht as RESET_FREQUENCIES, i as WebhookEvent, in as MobilePrefix, it as PaymentSettlement, j as FEATURE_TYPES, jt as USAGE_FEATURE_TYPES, k as Event, kt as SubscriptionStatus, l as CANCELLATION_FEEDBACK, ln as findBank, lt as PlanPrice, m as Carrier, mn as Environment, mt as ProductVariant, n as EventDataMap, nn as MOBILE_PREFIXES, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, ot as Payout, p as CancellationFeedback, pn as ENVIRONMENTS, pt as ProductCategory, q as Invoice, qt as BillingMonths, r as EventType, rn as Metadata, rt as PaymentLink, s as Balance, sn as Timestamp, st as Plan, t as EVENT_TYPES, tn as MAX_QUANTITY, tt as PaymentAttempt, u as CARRIERS, un as isLandlinePhone, ut as PlanSeats, v as CheckoutPurpose, vt as ResetFrequency, w as CustomerDetails, wt as Subscription, x as CurrencyAvailability, xt as SUBMIT_LABELS, y as CollectSettings, yt as Retirement, z as FeatureUsageResult, zt as ApiErrorType } from "./events-
|
|
1
|
+
import { $ as SubscriptionCancel, A as FeatureUpdate, At as apiVersionLifecycle, B as PlanCreate, C as CustomerMemberUpdate, Ct as API_VERSION_HEADER, D as FeatureCreate, Dt as ApiVersionStage, E as EventSelector, Et as ApiVersionLifecycle, F as KEY_PATTERN, Ft as supportedApiVersions, G as PortalSessionCreate, H as PlanLinkCreate, I as PaymentLinkCreate, J as ProductCreate, K as ProductCheckoutCreate, L as PaymentLinkUpdate, M as FulfillmentTrackingInput, Mt as currentApiVersion, N as InvoiceCreate, Nt as isApiVersion, O as FeatureOperationCommit, Ot as LATEST_API_VERSION, P as InvoiceLineInput, Pt as isApiVersionRetired, Q as RetireInput, R as PlanCheckoutCreate, S as CustomerMemberCreate, St as API_VERSIONS, T as CustomerUpdate, Tt as ApiVersion, U as PlanPriceInput, V as PlanFeaturesInput, W as PlanUpdate, X as ProductUpdate, Y as ProductLinkCreate, Z as RefundCreate, _ as CouponCreate, _t as PublicFulfillment, a as CheckoutCreate, at as WebhookEndpointCreate, b as CustomerCreate, bt as PublicPaymentState, c as ClientCheckoutUpdate, ct as CustomerSubscriptionChangeResult, d as ClientLinkCheckout, dt as PaymentMethodField, et as SubscriptionChangeCreate, f as ClientPaymentCode, ft as PaymentMethodOption, g as CollectInput, gt as PublicCheckout, h as ClientSubscriptionUpdate, ht as PortalFeatures, i as AfterCompletionInput, it as VariantInput, j as FulfillmentInput, jt as apiVersionStage, k as FeatureOperationCreate, kt as LatestApiVersion, l as ClientFulfillmentProblem, lt as FulfillmentOption, m as ClientSubscriptionSeats, mt as PaymentTestScenario, n as RequestOptions, nt as SubscriptionCreate, o as CheckoutItemInput, ot as WebhookEndpointUpdate, p as ClientSubscriptionCancel, pt as PaymentNextAction, q as ProductCouponCreate, r as TransportOptions, rt as SubscriptionUpdate, s as ClientCheckoutPay, st as CustomerSubscription, t as BilleteError, tt as SubscriptionChangePreviewInput, u as ClientInvoicePay, ut as PaymentInstructions, v as CouponUpdate, vt as PublicInvoice, w as CustomerSessionCreate, wt as API_VERSION_PATTERN, x as CustomerInput, xt as PublicPortal, y as CustomFieldInput, yt as PublicPaymentLink, z as PlanCouponCreate } from "./errors-D0dmjljM.js";
|
|
2
|
+
import { $ as PRODUCT_CATEGORIES, $t as ListQuery, A as ExchangeRate, At as SubscriptionTerms, B as Fulfillment, Bt as PAYMENT_FAILURE_CODES, C as Customer, Ct as SubmitLabel, D as CustomerMemberList, Dt as SubscriptionChangeResult, E as CustomerMember, Et as SubscriptionChangePreview, F as FeatureOperation, Ft as ReceiptSend, G as INVOICE_REASONS, Gt as BILLING_MONTHS, H as FulfillmentMethod, Ht as ACCOUNT_NUMBER_LENGTH, I as FeatureOperationResult, It as API_ERROR_TYPES, J as InvoiceReason, Jt as CURRENCIES, K as INVOICE_STATUSES, Kt as BankCode, L as FeatureReset, Lt as ApiErrorBody, M as FULFILLMENT_METHODS, Mt as WebhookEndpoint, N as FULFILLMENT_STATUSES, Nt as Weekday, O as CustomerSession, Ot as SubscriptionRenewal, P as Feature, Pt as ReceiptReference, Q as PAYMENT_STATUSES, Qt as List, R as FeatureType, Rt as ApiErrorEnvelope, S as CustomField, St as SUBSCRIPTION_STATUSES, T as CustomerFeature, Tt as SubscriptionChange, U as FulfillmentStatus, Ut as Address, V as FulfillmentChoice, Vt as PaymentFailureCode, W as FulfillmentTracking, Wt as AddressInput, X as LineItem, Xt as GRACE_PERIOD_DAYS, Y as InvoiceStatus, Yt as Currency, Z as MAX_SEATS, Zt as GracePeriodDays, _ as CheckoutItem, _n as tokenPrefix, _t as Refund, a as Actor, an as TAX_BEHAVIORS, at as PaymentStatus, b as Coupon, bt as RiskLevel, c as BalanceAmount, cn as VENEZUELAN_BANKS, ct as PlanFeatureValues, d as CARRIER_TEST_SCENARIOS, dn as isMobilePhone, dt as PortalSession, en as ListSort, et as Payment, f as CHECKOUT_PURPOSES, fn as nationalPhone, ft as Product, g as Checkout, gn as tokenEnvironment, gt as RISK_LEVELS, h as CarrierOffice, hn as TokenKind, ht as RESET_FREQUENCIES, i as WebhookEvent, in as MobilePrefix, it as PaymentSettlement, j as FEATURE_TYPES, jt as USAGE_FEATURE_TYPES, k as Event, kt as SubscriptionStatus, l as CANCELLATION_FEEDBACK, ln as findBank, lt as PlanPrice, m as Carrier, mn as Environment, mt as ProductVariant, n as EventDataMap, nn as MOBILE_PREFIXES, nt as PaymentFailure, o as AfterCompletion, on as TaxBehavior, ot as Payout, p as CancellationFeedback, pn as ENVIRONMENTS, pt as ProductCategory, q as Invoice, qt as BillingMonths, r as EventType, rn as Metadata, rt as PaymentLink, s as Balance, sn as Timestamp, st as Plan, t as EVENT_TYPES, tn as MAX_QUANTITY, tt as PaymentAttempt, u as CARRIERS, un as isLandlinePhone, ut as PlanSeats, v as CheckoutPurpose, vt as ResetFrequency, w as CustomerDetails, wt as Subscription, x as CurrencyAvailability, xt as SUBMIT_LABELS, y as CollectSettings, yt as Retirement, z as FeatureUsageResult, zt as ApiErrorType } from "./events-C0pKiZ_h.js";
|
|
3
3
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
4
4
|
//#region src/server.d.ts
|
|
5
5
|
type Filters<T> = ListQuery & T;
|
|
@@ -25,7 +25,7 @@ interface BilleteOptions extends TransportOptions {
|
|
|
25
25
|
*
|
|
26
26
|
* ```ts
|
|
27
27
|
* // Reads BILLETE_API_KEY.
|
|
28
|
-
* const billete = createBillete({ apiVersion: "2026-10-
|
|
28
|
+
* const billete = createBillete({ apiVersion: "2026-10-10", environment: "test" });
|
|
29
29
|
* const { allowed } = await billete.features.consume("user_123", "tokens", 850);
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
@@ -100,15 +100,19 @@ export declare function createBillete(options: BilleteOptions): {
|
|
|
100
100
|
};
|
|
101
101
|
features: {
|
|
102
102
|
create: (input: FeatureCreate, options?: RequestOptions) => Promise<Feature>;
|
|
103
|
-
retrieve: (id: string, options?: RequestOptions) => Promise<Feature>;
|
|
104
|
-
update: (id: string, input: FeatureUpdate, options?: RequestOptions) => Promise<Feature>;
|
|
105
103
|
list: (query?: Filters<{
|
|
104
|
+
search?: string;
|
|
106
105
|
sort?: ListSort<"created" | "name">;
|
|
107
106
|
}>, options?: RequestOptions) => Promise<List<Feature>>;
|
|
108
107
|
/** Iterates every item across pages: `for await (const item of iterate())`. */
|
|
109
108
|
iterate: (query?: Filters<{
|
|
109
|
+
search?: string;
|
|
110
110
|
sort?: ListSort<"created" | "name">;
|
|
111
111
|
}>) => AsyncGenerator<Feature, any, any>;
|
|
112
|
+
/** A feature by its `key` (`tokens`) or its `feat_` ID. */
|
|
113
|
+
retrieve: (key: string, options?: RequestOptions) => Promise<Feature>;
|
|
114
|
+
/** Renames a feature or changes its schedule; `key` also takes its `feat_` ID. */
|
|
115
|
+
update: (key: string, input: FeatureUpdate, options?: RequestOptions) => Promise<Feature>;
|
|
112
116
|
/**
|
|
113
117
|
* Reserves `amount` of a metered feature for one job: it counts as used right away and the
|
|
114
118
|
* operation is closed later through `features.operations`. Repeating `operation` returns the
|
|
@@ -318,4 +322,4 @@ export declare function createBillete(options: BilleteOptions): {
|
|
|
318
322
|
/** The server client: what `createBillete` returns. */
|
|
319
323
|
type Billete = ReturnType<typeof createBillete>;
|
|
320
324
|
//#endregion
|
|
321
|
-
export { type ACCOUNT_NUMBER_LENGTH, 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 ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type Billete, BilleteError, type BilleteOptions, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientPaymentCode, type ClientSubscriptionCancel, 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 CustomerUpdate, 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 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 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 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 ProductCreate, type ProductLinkCreate, type ProductUpdate, type ProductVariant, type PublicCheckout, type PublicFulfillment, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RetireInput, type Retirement, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SubmitLabel, 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 TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type TransportOptions, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, 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 };
|
|
325
|
+
export { type ACCOUNT_NUMBER_LENGTH, 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 ApiErrorEnvelope, type ApiErrorType, type ApiVersion, type ApiVersionLifecycle, type ApiVersionStage, type BILLING_MONTHS, type Balance, type BalanceAmount, type BankCode, type Billete, BilleteError, type BilleteOptions, type BillingMonths, type CANCELLATION_FEEDBACK, type CARRIERS, type CARRIER_TEST_SCENARIOS, type CHECKOUT_PURPOSES, type CURRENCIES, type CancellationFeedback, type Carrier, type CarrierOffice, type Checkout, type CheckoutCreate, type CheckoutItem, type CheckoutItemInput, type CheckoutPurpose, type ClientCheckoutPay, type ClientCheckoutUpdate, type ClientFulfillmentProblem, type ClientInvoicePay, type ClientLinkCheckout, type ClientPaymentCode, 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 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 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 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 PublicFulfillment, type PublicInvoice, type PublicPaymentLink, type PublicPaymentState, type PublicPortal, type RESET_FREQUENCIES, type RISK_LEVELS, type ReceiptReference, type ReceiptSend, type Refund, type RefundCreate, type RequestOptions, type ResetFrequency, type RetireInput, type Retirement, type RiskLevel, type SUBMIT_LABELS, type SUBSCRIPTION_STATUSES, type SubmitLabel, 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 TAX_BEHAVIORS, type TaxBehavior, type Timestamp, type TokenKind, type TransportOptions, type USAGE_FEATURE_TYPES, type VENEZUELAN_BANKS, type VariantInput, 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-
|
|
1
|
+
import { n as segment, r as BilleteError, t as createTransport } from "./http-BuqnZQ6s.js";
|
|
2
2
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
3
3
|
//#region ../contracts/src/environment.ts
|
|
4
4
|
/**
|
|
@@ -64,7 +64,7 @@ function fromEnv(name) {
|
|
|
64
64
|
*
|
|
65
65
|
* ```ts
|
|
66
66
|
* // Reads BILLETE_API_KEY.
|
|
67
|
-
* const billete = createBillete({ apiVersion: "2026-10-
|
|
67
|
+
* const billete = createBillete({ apiVersion: "2026-10-10", environment: "test" });
|
|
68
68
|
* const { allowed } = await billete.features.consume("user_123", "tokens", 850);
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
@@ -159,6 +159,10 @@ create: (input, options) => http.request({
|
|
|
159
159
|
const operationPath = (operation, action) => `/v1/feature-operations/${segment(operation)}${action ? `/${action}` : ""}`;
|
|
160
160
|
const features = {
|
|
161
161
|
...featureCrud,
|
|
162
|
+
/** A feature by its `key` (`tokens`) or its `feat_` ID. */
|
|
163
|
+
retrieve: (key, options) => featureCrud.retrieve(key, options),
|
|
164
|
+
/** Renames a feature or changes its schedule; `key` also takes its `feat_` ID. */
|
|
165
|
+
update: (key, input, options) => featureCrud.update(key, input, options),
|
|
162
166
|
/**
|
|
163
167
|
* Reserves `amount` of a metered feature for one job: it counts as used right away and the
|
|
164
168
|
* operation is closed later through `features.operations`. Repeating `operation` returns the
|
package/dist/webhooks.d.ts
CHANGED