@boelabs/billete-sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as SubscriptionRenewal, A as Payment, At as ENVIRONMENTS, B as Product, C as FEATURE_TYPES, Ct as MobilePrefix, D as FeatureUsageResult, Dt as isLandlinePhone, E as FeatureType, Et as Timestamp, F as PaymentStatus, G as Refund, H as ProductVariant, I as Payout, J as RiskLevel, K as ResetFrequency, L as Plan, M as PaymentFailure, Mt as TokenKind, N as PaymentLink, Nt as tokenEnvironment, O as PAYMENT_STATUSES, Ot as isMobilePhone, P as PaymentSettlement, Pt as tokenPrefix, Q as Subscription, R as PlanFeatureValues, S as ExchangeRate, St as Metadata, T as FeatureReset, Tt as TaxBehavior, U as RESET_FREQUENCIES, V as ProductCategory, W as RISK_LEVELS, X as SUBSCRIPTION_STATUSES, Y as SUBMIT_LABELS, Z as SubmitLabel, _ as Customer, _t as GracePeriodDays, a as Actor, at as ApiErrorBody, b as CustomerSession, bt as MAX_QUANTITY, c as BalanceAmount, ct as PAYMENT_FAILURE_CODES, d as CheckoutItem, dt as AddressInput, et as SubscriptionStatus, f as CheckoutPurpose, ft as BILLING_MONTHS, g as CustomField, gt as GRACE_PERIOD_DAYS, h as CurrencyAvailability, ht as Currency, i as WebhookEvent, it as API_ERROR_TYPES, j as PaymentAttempt, jt as Environment, k as PRODUCT_CATEGORIES, kt as nationalPhone, l as CHECKOUT_PURPOSES, lt as PaymentFailureCode, m as Coupon, mt as CURRENCIES, n as EventDataMap, nt as WebhookEndpoint, o as AfterCompletion, ot as ApiErrorEnvelope, p as CollectSettings, pt as BillingMonths, q as Retirement, r as EventType, rt as Weekday, s as Balance, st as ApiErrorType, t as EVENT_TYPES, tt as USAGE_FEATURE_TYPES, u as Checkout, ut as Address, v as CustomerDetails, vt as List, w as Feature, wt as TAX_BEHAVIORS, x as Event, xt as MOBILE_PREFIXES, y as CustomerFeature, yt as ListQuery, z as PlanPrice } from "./events-oZ08-Zz2.js";
|
|
2
|
-
import { A as ProductCheckoutCreate, B as WebhookEndpointCreate, C as PaymentLinkUpdate, D as PlanLinkCreate, E as PlanFeaturesInput, F as RetireInput, G as PaymentTestScenario, H as CheckoutPaymentMethod, I as SubscriptionCancel, K as PublicCheckout, L as SubscriptionCreate, M as ProductLinkCreate, N as ProductUpdate, O as PlanPriceInput, P as RefundCreate, R as SubscriptionUpdate, S as PaymentLinkCreate, T as PlanCreate, U as PaymentInstructions, V as WebhookEndpointUpdate, W as PaymentMethodField, _ as CustomerUpdate, a as CheckoutCreate, b as FeatureUpdate, c as ClientCheckoutUpdate, d as CouponCreate, f as CouponUpdate, g as CustomerSessionCreate, h as CustomerInput, i as AfterCompletionInput, j as ProductCreate, k as PlanUpdate, l as ClientLinkCheckout, m as CustomerCreate, n as RequestOptions, o as CheckoutItemInput, p as CustomFieldInput, q as PublicPaymentLink, r as TransportOptions, s as ClientCheckoutPay, t as BilleteError, u as CollectInput, v as EventSelector, w as PlanCheckoutCreate, x as KEY_PATTERN, y as FeatureCreate, z as VariantInput } from "./errors-
|
|
2
|
+
import { A as ProductCheckoutCreate, B as WebhookEndpointCreate, C as PaymentLinkUpdate, D as PlanLinkCreate, E as PlanFeaturesInput, F as RetireInput, G as PaymentTestScenario, H as CheckoutPaymentMethod, I as SubscriptionCancel, K as PublicCheckout, L as SubscriptionCreate, M as ProductLinkCreate, N as ProductUpdate, O as PlanPriceInput, P as RefundCreate, R as SubscriptionUpdate, S as PaymentLinkCreate, T as PlanCreate, U as PaymentInstructions, V as WebhookEndpointUpdate, W as PaymentMethodField, _ as CustomerUpdate, a as CheckoutCreate, b as FeatureUpdate, c as ClientCheckoutUpdate, d as CouponCreate, f as CouponUpdate, g as CustomerSessionCreate, h as CustomerInput, i as AfterCompletionInput, j as ProductCreate, k as PlanUpdate, l as ClientLinkCheckout, m as CustomerCreate, n as RequestOptions, o as CheckoutItemInput, p as CustomFieldInput, q as PublicPaymentLink, r as TransportOptions, s as ClientCheckoutPay, t as BilleteError, u as CollectInput, v as EventSelector, w as PlanCheckoutCreate, x as KEY_PATTERN, y as FeatureCreate, z as VariantInput } from "./errors-CoLmEszH.js";
|
|
3
3
|
//#region src/create-client.d.ts
|
|
4
4
|
interface ClientOptions extends TransportOptions {
|
|
5
5
|
/**
|
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-F2X2zd4c.js";
|
|
2
2
|
//#region src/create-client.ts
|
|
3
3
|
/**
|
|
4
4
|
* Browser client. It never holds a secret key: checkouts are addressed by their unguessable ID
|
|
@@ -27,6 +27,16 @@ interface PublicCheckout {
|
|
|
27
27
|
adjustableQuantity: boolean;
|
|
28
28
|
/** Most units the customer can choose right now: the link's limit, capped by stock. */
|
|
29
29
|
maxQuantity: number;
|
|
30
|
+
/**
|
|
31
|
+
* Variants the customer may switch between for a product checkout. `maxQuantity` is the most
|
|
32
|
+
* units of that variant one purchase can take right now; `0` means it is sold out.
|
|
33
|
+
*/
|
|
34
|
+
variants: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
amount: number;
|
|
38
|
+
maxQuantity: number;
|
|
39
|
+
}> | null;
|
|
30
40
|
/** Billing cycles the customer may switch between for a plan checkout. */
|
|
31
41
|
cycles: Array<{
|
|
32
42
|
months: BillingMonths;
|
|
@@ -18,7 +18,7 @@ var BilleteError = class extends Error {
|
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/http.ts
|
|
21
|
-
const SDK_VERSION = "0.
|
|
21
|
+
const SDK_VERSION = "0.5.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
1
|
import { $ as SubscriptionRenewal, A as Payment, At as ENVIRONMENTS, B as Product, C as FEATURE_TYPES, Ct as MobilePrefix, D as FeatureUsageResult, Dt as isLandlinePhone, E as FeatureType, Et as Timestamp, F as PaymentStatus, G as Refund, H as ProductVariant, I as Payout, J as RiskLevel, K as ResetFrequency, L as Plan, M as PaymentFailure, Mt as TokenKind, N as PaymentLink, Nt as tokenEnvironment, O as PAYMENT_STATUSES, Ot as isMobilePhone, P as PaymentSettlement, Pt as tokenPrefix, Q as Subscription, R as PlanFeatureValues, S as ExchangeRate, St as Metadata, T as FeatureReset, Tt as TaxBehavior, U as RESET_FREQUENCIES, V as ProductCategory, W as RISK_LEVELS, X as SUBSCRIPTION_STATUSES, Y as SUBMIT_LABELS, Z as SubmitLabel, _ as Customer, _t as GracePeriodDays, a as Actor, at as ApiErrorBody, b as CustomerSession, bt as MAX_QUANTITY, c as BalanceAmount, ct as PAYMENT_FAILURE_CODES, d as CheckoutItem, dt as AddressInput, et as SubscriptionStatus, f as CheckoutPurpose, ft as BILLING_MONTHS, g as CustomField, gt as GRACE_PERIOD_DAYS, h as CurrencyAvailability, ht as Currency, i as WebhookEvent, it as API_ERROR_TYPES, j as PaymentAttempt, jt as Environment, k as PRODUCT_CATEGORIES, kt as nationalPhone, l as CHECKOUT_PURPOSES, lt as PaymentFailureCode, m as Coupon, mt as CURRENCIES, n as EventDataMap, nt as WebhookEndpoint, o as AfterCompletion, ot as ApiErrorEnvelope, p as CollectSettings, pt as BillingMonths, q as Retirement, r as EventType, rt as Weekday, s as Balance, st as ApiErrorType, t as EVENT_TYPES, tt as USAGE_FEATURE_TYPES, u as Checkout, ut as Address, v as CustomerDetails, vt as List, w as Feature, wt as TAX_BEHAVIORS, x as Event, xt as MOBILE_PREFIXES, y as CustomerFeature, yt as ListQuery, z as PlanPrice } from "./events-oZ08-Zz2.js";
|
|
2
|
-
import { A as ProductCheckoutCreate, B as WebhookEndpointCreate, C as PaymentLinkUpdate, D as PlanLinkCreate, E as PlanFeaturesInput, F as RetireInput, G as PaymentTestScenario, H as CheckoutPaymentMethod, I as SubscriptionCancel, K as PublicCheckout, L as SubscriptionCreate, M as ProductLinkCreate, N as ProductUpdate, O as PlanPriceInput, P as RefundCreate, R as SubscriptionUpdate, S as PaymentLinkCreate, T as PlanCreate, U as PaymentInstructions, V as WebhookEndpointUpdate, W as PaymentMethodField, _ as CustomerUpdate, a as CheckoutCreate, b as FeatureUpdate, c as ClientCheckoutUpdate, d as CouponCreate, f as CouponUpdate, g as CustomerSessionCreate, h as CustomerInput, i as AfterCompletionInput, j as ProductCreate, k as PlanUpdate, l as ClientLinkCheckout, m as CustomerCreate, n as RequestOptions, o as CheckoutItemInput, p as CustomFieldInput, q as PublicPaymentLink, r as TransportOptions, s as ClientCheckoutPay, t as BilleteError, u as CollectInput, v as EventSelector, w as PlanCheckoutCreate, x as KEY_PATTERN, y as FeatureCreate, z as VariantInput } from "./errors-
|
|
2
|
+
import { A as ProductCheckoutCreate, B as WebhookEndpointCreate, C as PaymentLinkUpdate, D as PlanLinkCreate, E as PlanFeaturesInput, F as RetireInput, G as PaymentTestScenario, H as CheckoutPaymentMethod, I as SubscriptionCancel, K as PublicCheckout, L as SubscriptionCreate, M as ProductLinkCreate, N as ProductUpdate, O as PlanPriceInput, P as RefundCreate, R as SubscriptionUpdate, S as PaymentLinkCreate, T as PlanCreate, U as PaymentInstructions, V as WebhookEndpointUpdate, W as PaymentMethodField, _ as CustomerUpdate, a as CheckoutCreate, b as FeatureUpdate, c as ClientCheckoutUpdate, d as CouponCreate, f as CouponUpdate, g as CustomerSessionCreate, h as CustomerInput, i as AfterCompletionInput, j as ProductCreate, k as PlanUpdate, l as ClientLinkCheckout, m as CustomerCreate, n as RequestOptions, o as CheckoutItemInput, p as CustomFieldInput, q as PublicPaymentLink, r as TransportOptions, s as ClientCheckoutPay, t as BilleteError, u as CollectInput, v as EventSelector, w as PlanCheckoutCreate, x as KEY_PATTERN, y as FeatureCreate, z as VariantInput } from "./errors-CoLmEszH.js";
|
|
3
3
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
4
4
|
//#region src/server.d.ts
|
|
5
5
|
type Filters<T> = ListQuery & T;
|
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-F2X2zd4c.js";
|
|
2
2
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
3
3
|
//#region ../contracts/src/environment.ts
|
|
4
4
|
/**
|