@boelabs/billete-sdk 4.2.0 → 4.4.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 +3 -3
- package/dist/client.js +1 -1
- package/dist/{errors-Mb5hrrTr.d.ts → errors-Ca_4OGi0.d.ts} +22 -3
- package/dist/{events-CaNwG-EX.d.ts → events-1yiDG8bS.d.ts} +13 -1
- package/dist/{http-DwVziPd5.js → http-CCvluhGO.js} +4 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +15 -2
- package/dist/webhooks.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as ProductCouponCreate, A as EventSelector, At as API_VERSIONS, B as InvoiceLineInput, Bt as currentApiVersion, C as CustomFieldInput, Ct as PublicClaim, D as CustomerMemberUpdate, Dt as PublicPaymentLink, E as CustomerMemberCreate, Et as PublicInvoice, F as FulfillmentDeliverInput, Ft as ApiVersionStage, G as PlanCouponCreate, H as PaymentLinkCreate, Ht as isApiVersionRetired, I as FulfillmentHandoverInput, It as LATEST_API_VERSION, J as PlanLinkCreate, K as PlanCreate, L as FulfillmentInput, Lt as LatestApiVersion, M as FeatureOperationCommit, Mt as API_VERSION_PATTERN, N as FeatureOperationCreate, Nt as ApiVersion, O as CustomerSessionCreate, Ot as PublicPaymentState, P as FeatureUpdate, Pt as ApiVersionLifecycle, Q as ProductCheckoutCreate, R as FulfillmentTrackingInput, Rt as apiVersionLifecycle, S as CouponUpdate, St as PublicCheckout, T as CustomerInput, Tt as PublicFulfillment, U as PaymentLinkUpdate, Ut as supportedApiVersions, V as KEY_PATTERN, Vt as isApiVersion, W as PlanCheckoutCreate, X as PlanUpdate, Y as PlanPriceInput, Z as PortalSessionCreate, _ as ClientSubscriptionCancel, _t as PaymentMethodField, a as CheckoutCreate, at as SubscriptionCancel, b as CollectInput, bt as PaymentTestScenario, c as ClaimRespond, ct as SubscriptionCreate, d as ClientClaimCreate, dt as WebhookEndpointCreate, et as ProductCreate, f as ClientCustomerClaimCreate, ft as WebhookEndpointUpdate, g as ClientPaymentCode, gt as PaymentInstructions, h as ClientLinkCheckout, ht as FulfillmentOption, i as AfterCompletionInput, it as RetireInput, j as FeatureCreate, jt as API_VERSION_HEADER, k as CustomerUpdate, kt as PublicPortal, l as ClientCheckoutPay, lt as SubscriptionUpdate, m as ClientInvoicePay, mt as CustomerSubscriptionChangeResult, n as RequestOptions, nt as ProductUpdate, o as CheckoutItemInput, ot as SubscriptionChangeCreate, p as ClientFulfillmentProblem, pt as CustomerSubscription, q as PlanFeaturesInput, r as TransportOptions, rt as RefundCreate, s as ClaimResolve, st as SubscriptionChangePreviewInput, t as BilleteError, tt as ProductLinkCreate, u as ClientCheckoutUpdate, ut as VariantInput, v as ClientSubscriptionSeats, vt as PaymentMethodOption, w as CustomerCreate, wt as PublicClaimSummary, x as CouponCreate, xt as PortalFeatures, y as ClientSubscriptionUpdate, yt as PaymentNextAction, z as InvoiceCreate, zt as apiVersionStage } from "./errors-Ca_4OGi0.js";
|
|
2
|
+
import { $ as FulfillmentMethod, $t as PaymentFailureCode, A as Coupon, At as ResetFrequency, B as ExchangeRate, Bt as SubscriptionRenewal, C as CheckoutPurpose, Cn as isMobilePhone, Ct as PortalSession, D as ClaimReason, Dn as TokenKind, Dt as RESET_FREQUENCIES, E as ClaimOutcome, En as Environment, Et as ProductVariant, F as CustomerFeature, Ft as SubmitLabel, G as FeatureOperation, Gt as Weekday, H as FULFILLMENT_METHODS, Ht as SubscriptionTerms, I as CustomerMember, It as Subscription, J as FeatureType, Jt as API_ERROR_TYPES, K as FeatureOperationResult, Kt as ReceiptReference, L as CustomerMemberList, Lt as SubscriptionChange, M as CustomField, Mt as RiskLevel, N as Customer, Nt as SUBMIT_LABELS, O as ClaimStatus, On as tokenEnvironment, Ot as RISK_LEVELS, P as CustomerDetails, Pt as SUBSCRIPTION_STATUSES, Q as FulfillmentHandover, Qt as PAYMENT_FAILURE_CODES, R as CustomerSession, Rt as SubscriptionChangePreview, S as CheckoutItem, Sn as isLandlinePhone, St as PlanSeats, T as ClaimMessage, Tn as ENVIRONMENTS, Tt as ProductCategory, U as FULFILLMENT_STATUSES, Ut as USAGE_FEATURE_TYPES, V as FEATURE_TYPES, Vt as SubscriptionStatus, W as Feature, Wt as WebhookEndpoint, X as Fulfillment, Xt as ApiErrorEnvelope, Y as FeatureUsageResult, Yt as ApiErrorBody, Z as FulfillmentChoice, Zt as ApiErrorType, _ as CLAIM_STATUSES, _n as TAX_BEHAVIORS, _t as PaymentStatus, a as WEBHOOK_TEST_EVENT, an as BillingMonths, at as InvoiceReason, b as CarrierOffice, bn as VENEZUELAN_BANKS, bt as PlanFeatureValues, c as AfterCompletion, cn as GRACE_PERIOD_DAYS, ct as MAX_SEATS, d as CANCELLATION_FEEDBACK, dn as ListQuery, dt as Payment, en as ACCOUNT_NUMBER_LENGTH, et as FulfillmentStatus, f as CARRIERS, fn as ListSort, ft as PaymentAttempt, g as CLAIM_REASONS, gn as MobilePrefix, gt as PaymentSettlement, h as CLAIM_OUTCOMES, hn as Metadata, ht as PaymentLink, i as SubscribableEventType, in as BankCode, it as Invoice, j as CurrencyAvailability, jt as Retirement, k as CollectSettings, kn as tokenPrefix, kt as Refund, l as Balance, ln as GracePeriodDays, lt as PAYMENT_STATUSES, m as CHECKOUT_PURPOSES, mn as MOBILE_PREFIXES, mt as PaymentFeeDetails, n as EventDataMap, nn as AddressInput, nt as INVOICE_REASONS, o as WebhookEvent, on as CURRENCIES, ot as InvoiceStatus, p as CARRIER_TEST_SCENARIOS, pn as MAX_QUANTITY, pt as PaymentFailure, q as FeatureReset, qt as ReceiptSend, r as EventType, rn as BILLING_MONTHS, rt as INVOICE_STATUSES, s as Actor, sn as Currency, st as LineItem, t as EVENT_TYPES, tn as Address, tt as FulfillmentTracking, u as BalanceAmount, un as List, ut as PRODUCT_CATEGORIES, v as CancellationFeedback, vn as TaxBehavior, vt as Payout, w as Claim, wn as nationalPhone, wt as Product, x as Checkout, xn as findBank, xt as PlanPrice, y as Carrier, yn as Timestamp, yt as Plan, z as Event, zt as SubscriptionChangeResult } from "./events-1yiDG8bS.js";
|
|
3
3
|
//#region src/create-client.d.ts
|
|
4
4
|
interface ClientOptions extends TransportOptions {
|
|
5
5
|
/**
|
|
@@ -128,4 +128,4 @@ export declare function createClient(options: ClientOptions): {
|
|
|
128
128
|
};
|
|
129
129
|
type BilleteClient = ReturnType<typeof createClient>;
|
|
130
130
|
//#endregion
|
|
131
|
-
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 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 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 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 PublicClaim, type PublicClaimSummary, 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 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 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 };
|
|
131
|
+
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 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 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 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 PublicClaim, type PublicClaimSummary, 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 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 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-
|
|
1
|
+
import { n as segment, r as BilleteError, t as createTransport } from "./http-CCvluhGO.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as FulfillmentMethod, C as CheckoutPurpose, D as ClaimReason, E as ClaimOutcome, En as Environment, Ft as SubmitLabel, It as Subscription, Kt as ReceiptReference, M as CustomField, O as ClaimStatus, P as CustomerDetails, S as CheckoutItem, St as PlanSeats, T as ClaimMessage, Tt as ProductCategory, X as Fulfillment, Yt as ApiErrorBody, Zt as ApiErrorType, _t as PaymentStatus, an as BillingMonths, at as InvoiceReason, b as CarrierOffice, c as AfterCompletion, et as FulfillmentStatus, hn as Metadata, i as SubscribableEventType, k as CollectSettings, kt as Refund, ln as GracePeriodDays, nn as AddressInput, ot as InvoiceStatus, pt as PaymentFailure, q as FeatureReset, sn as Currency, st as LineItem, tn as Address, tt as FulfillmentTracking, v as CancellationFeedback, vn as TaxBehavior, xt as PlanPrice, y as Carrier, yn as Timestamp } from "./events-1yiDG8bS.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
|
|
@@ -270,7 +270,14 @@ interface PublicFulfillment {
|
|
|
270
270
|
currency: Currency;
|
|
271
271
|
total: number;
|
|
272
272
|
paidAt: Timestamp;
|
|
273
|
+
/**
|
|
274
|
+
* What the QR the customer shows when receiving it encodes: the address where the business,
|
|
275
|
+
* signed in, finds the order and hands it over. Only while the business has not handed it over,
|
|
276
|
+
* and never for a shipment, which the carrier hands over.
|
|
277
|
+
*/
|
|
278
|
+
handoverUrl: string | null;
|
|
273
279
|
deliveredAt: Timestamp | null;
|
|
280
|
+
handover: Fulfillment["handover"];
|
|
274
281
|
confirmBy: Timestamp | null;
|
|
275
282
|
receivedAt: Timestamp | null;
|
|
276
283
|
problem: {
|
|
@@ -969,6 +976,18 @@ type FulfillmentInput = {
|
|
|
969
976
|
interface FulfillmentTrackingInput {
|
|
970
977
|
number: string;
|
|
971
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* The code the customer shows when receiving a purchase: the value its QR encodes (an address that
|
|
981
|
+
* ends in the code) or the code alone.
|
|
982
|
+
*/
|
|
983
|
+
interface FulfillmentHandoverInput {
|
|
984
|
+
code: string;
|
|
985
|
+
}
|
|
986
|
+
/** Marks a purchase handed over without the customer's code. */
|
|
987
|
+
interface FulfillmentDeliverInput {
|
|
988
|
+
/** Why it went without the code: "Lo llevó un motorizado", "El cliente no tenía teléfono". */
|
|
989
|
+
reason?: string;
|
|
990
|
+
}
|
|
972
991
|
/** What went wrong with a purchase the business marked as delivered. */
|
|
973
992
|
interface ClientFulfillmentProblem {
|
|
974
993
|
comment: string;
|
|
@@ -1037,7 +1056,7 @@ declare class BilleteError extends Error {
|
|
|
1037
1056
|
readonly requestId?: string;
|
|
1038
1057
|
constructor(body: Omit<ApiErrorBody, "type"> & {
|
|
1039
1058
|
type: ApiErrorType | "network";
|
|
1040
|
-
}, status: number);
|
|
1059
|
+
}, status: number, options?: ErrorOptions);
|
|
1041
1060
|
}
|
|
1042
1061
|
//#endregion
|
|
1043
|
-
export {
|
|
1062
|
+
export { ProductCouponCreate as $, EventSelector as A, API_VERSIONS as At, InvoiceLineInput as B, currentApiVersion as Bt, CustomFieldInput as C, PublicClaim as Ct, CustomerMemberUpdate as D, PublicPaymentLink as Dt, CustomerMemberCreate as E, PublicInvoice as Et, FulfillmentDeliverInput as F, ApiVersionStage as Ft, PlanCouponCreate as G, PaymentLinkCreate as H, isApiVersionRetired as Ht, FulfillmentHandoverInput as I, LATEST_API_VERSION as It, PlanLinkCreate as J, PlanCreate as K, FulfillmentInput as L, LatestApiVersion as Lt, FeatureOperationCommit as M, API_VERSION_PATTERN as Mt, FeatureOperationCreate as N, ApiVersion as Nt, CustomerSessionCreate as O, PublicPaymentState as Ot, FeatureUpdate as P, ApiVersionLifecycle as Pt, ProductCheckoutCreate as Q, FulfillmentTrackingInput as R, apiVersionLifecycle as Rt, CouponUpdate as S, PublicCheckout as St, CustomerInput as T, PublicFulfillment as Tt, PaymentLinkUpdate as U, supportedApiVersions as Ut, KEY_PATTERN as V, isApiVersion as Vt, PlanCheckoutCreate as W, PlanUpdate as X, PlanPriceInput as Y, PortalSessionCreate as Z, ClientSubscriptionCancel as _, PaymentMethodField as _t, CheckoutCreate as a, SubscriptionCancel as at, CollectInput as b, PaymentTestScenario as bt, ClaimRespond as c, SubscriptionCreate as ct, ClientClaimCreate as d, WebhookEndpointCreate as dt, ProductCreate as et, ClientCustomerClaimCreate as f, WebhookEndpointUpdate as ft, ClientPaymentCode as g, PaymentInstructions as gt, ClientLinkCheckout as h, FulfillmentOption as ht, AfterCompletionInput as i, RetireInput as it, FeatureCreate as j, API_VERSION_HEADER as jt, CustomerUpdate as k, PublicPortal as kt, ClientCheckoutPay as l, SubscriptionUpdate as lt, ClientInvoicePay as m, CustomerSubscriptionChangeResult as mt, RequestOptions as n, ProductUpdate as nt, CheckoutItemInput as o, SubscriptionChangeCreate as ot, ClientFulfillmentProblem as p, CustomerSubscription as pt, PlanFeaturesInput as q, TransportOptions as r, RefundCreate as rt, ClaimResolve as s, SubscriptionChangePreviewInput as st, BilleteError as t, ProductLinkCreate as tt, ClientCheckoutUpdate as u, VariantInput as ut, ClientSubscriptionSeats as v, PaymentMethodOption as vt, CustomerCreate as w, PublicClaimSummary as wt, CouponCreate as x, PortalFeatures as xt, ClientSubscriptionUpdate as y, PaymentNextAction as yt, InvoiceCreate as z, apiVersionStage as zt };
|
|
@@ -820,6 +820,16 @@ interface FulfillmentTracking {
|
|
|
820
820
|
/** When the carrier was last asked. */
|
|
821
821
|
checkedAt: Timestamp | null;
|
|
822
822
|
}
|
|
823
|
+
/**
|
|
824
|
+
* How the business handed a purchase over. `code`: it scanned the code its customer shows (the QR
|
|
825
|
+
* of their order page), proof they were there; the customer then has 24 hours instead of 48 to
|
|
826
|
+
* confirm or report a problem. `manual`: marked without the code, with the business's `reason`
|
|
827
|
+
* when it gave one.
|
|
828
|
+
*/
|
|
829
|
+
interface FulfillmentHandover {
|
|
830
|
+
method: "code" | "manual";
|
|
831
|
+
reason: string | null;
|
|
832
|
+
}
|
|
823
833
|
/** How a customer receives a physical purchase. Its funds are held until it is received. */
|
|
824
834
|
interface Fulfillment extends Resource<"fulfillment"> {
|
|
825
835
|
checkoutId: string;
|
|
@@ -854,6 +864,8 @@ interface Fulfillment extends Resource<"fulfillment"> {
|
|
|
854
864
|
reason: string;
|
|
855
865
|
} | null;
|
|
856
866
|
deliveredAt: Timestamp | null;
|
|
867
|
+
/** How it was handed over, once the business did; `null` before, and for a shipment. */
|
|
868
|
+
handover: FulfillmentHandover | null;
|
|
857
869
|
/** While `delivered`: when it counts as received if the customer says nothing. */
|
|
858
870
|
confirmBy: Timestamp | null;
|
|
859
871
|
receivedAt: Timestamp | null;
|
|
@@ -1204,4 +1216,4 @@ type WebhookEvent = { [TType in EventType]: {
|
|
|
1204
1216
|
data: EventDataMap[TType];
|
|
1205
1217
|
}; }[EventType];
|
|
1206
1218
|
//#endregion
|
|
1207
|
-
export {
|
|
1219
|
+
export { FulfillmentMethod as $, PaymentFailureCode as $t, Coupon as A, ResetFrequency as At, ExchangeRate as B, SubscriptionRenewal as Bt, CheckoutPurpose as C, isMobilePhone as Cn, PortalSession as Ct, ClaimReason as D, TokenKind as Dn, RESET_FREQUENCIES as Dt, ClaimOutcome as E, Environment as En, ProductVariant as Et, CustomerFeature as F, SubmitLabel as Ft, FeatureOperation as G, Weekday as Gt, FULFILLMENT_METHODS as H, SubscriptionTerms as Ht, CustomerMember as I, Subscription as It, FeatureType as J, API_ERROR_TYPES as Jt, FeatureOperationResult as K, ReceiptReference as Kt, CustomerMemberList as L, SubscriptionChange as Lt, CustomField as M, RiskLevel as Mt, Customer as N, SUBMIT_LABELS as Nt, ClaimStatus as O, tokenEnvironment as On, RISK_LEVELS as Ot, CustomerDetails as P, SUBSCRIPTION_STATUSES as Pt, FulfillmentHandover as Q, PAYMENT_FAILURE_CODES as Qt, CustomerSession as R, SubscriptionChangePreview as Rt, CheckoutItem as S, isLandlinePhone as Sn, PlanSeats as St, ClaimMessage as T, ENVIRONMENTS as Tn, ProductCategory as Tt, FULFILLMENT_STATUSES as U, USAGE_FEATURE_TYPES as Ut, FEATURE_TYPES as V, SubscriptionStatus as Vt, Feature as W, WebhookEndpoint as Wt, Fulfillment as X, ApiErrorEnvelope as Xt, FeatureUsageResult as Y, ApiErrorBody as Yt, FulfillmentChoice as Z, ApiErrorType as Zt, CLAIM_STATUSES as _, TAX_BEHAVIORS as _n, PaymentStatus as _t, WEBHOOK_TEST_EVENT as a, BillingMonths as an, InvoiceReason as at, CarrierOffice as b, VENEZUELAN_BANKS as bn, PlanFeatureValues as bt, AfterCompletion as c, GRACE_PERIOD_DAYS as cn, MAX_SEATS as ct, CANCELLATION_FEEDBACK as d, ListQuery as dn, Payment as dt, ACCOUNT_NUMBER_LENGTH as en, FulfillmentStatus as et, CARRIERS as f, ListSort as fn, PaymentAttempt as ft, CLAIM_REASONS as g, MobilePrefix as gn, PaymentSettlement as gt, CLAIM_OUTCOMES as h, Metadata as hn, PaymentLink as ht, SubscribableEventType as i, BankCode as in, Invoice as it, CurrencyAvailability as j, Retirement as jt, CollectSettings as k, tokenPrefix as kn, Refund as kt, Balance as l, GracePeriodDays as ln, PAYMENT_STATUSES as lt, CHECKOUT_PURPOSES as m, MOBILE_PREFIXES as mn, PaymentFeeDetails as mt, EventDataMap as n, AddressInput as nn, INVOICE_REASONS as nt, WebhookEvent as o, CURRENCIES as on, InvoiceStatus as ot, CARRIER_TEST_SCENARIOS as p, MAX_QUANTITY as pn, PaymentFailure as pt, FeatureReset as q, ReceiptSend as qt, EventType as r, BILLING_MONTHS as rn, INVOICE_STATUSES as rt, Actor as s, Currency as sn, LineItem as st, EVENT_TYPES as t, Address as tn, FulfillmentTracking as tt, BalanceAmount as u, List as un, PRODUCT_CATEGORIES as ut, CancellationFeedback as v, TaxBehavior as vn, Payout as vt, Claim as w, nationalPhone as wn, Product as wt, Checkout as x, findBank as xn, PlanPrice as xt, Carrier as y, Timestamp as yn, Plan as yt, Event as z, SubscriptionChangeResult as zt };
|
|
@@ -6,8 +6,8 @@ var BilleteError = class extends Error {
|
|
|
6
6
|
status;
|
|
7
7
|
param;
|
|
8
8
|
requestId;
|
|
9
|
-
constructor(body, status) {
|
|
10
|
-
super(body.message);
|
|
9
|
+
constructor(body, status, options) {
|
|
10
|
+
super(body.message, options);
|
|
11
11
|
this.name = "BilleteError";
|
|
12
12
|
this.type = body.type;
|
|
13
13
|
this.code = body.code;
|
|
@@ -18,7 +18,7 @@ var BilleteError = class extends Error {
|
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/http.ts
|
|
21
|
-
const SDK_VERSION = "4.
|
|
21
|
+
const SDK_VERSION = "4.4.0";
|
|
22
22
|
const DEFAULT_BASE_URL = "https://api.billete.run";
|
|
23
23
|
const RETRYABLE_STATUS = /* @__PURE__ */ new Set([
|
|
24
24
|
429,
|
|
@@ -91,7 +91,7 @@ function createTransport(options) {
|
|
|
91
91
|
type: "network",
|
|
92
92
|
code: "network_error",
|
|
93
93
|
message: `Could not reach Billete: ${response.message}`
|
|
94
|
-
}, 0);
|
|
94
|
+
}, 0, { cause: response });
|
|
95
95
|
if (!response.ok) throw await toError(response);
|
|
96
96
|
return response.status === 204 ? void 0 : await response.json();
|
|
97
97
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as ProductCouponCreate, A as EventSelector, At as API_VERSIONS, B as InvoiceLineInput, Bt as currentApiVersion, C as CustomFieldInput, Ct as PublicClaim, D as CustomerMemberUpdate, Dt as PublicPaymentLink, E as CustomerMemberCreate, Et as PublicInvoice, F as FulfillmentDeliverInput, Ft as ApiVersionStage, G as PlanCouponCreate, H as PaymentLinkCreate, Ht as isApiVersionRetired, I as FulfillmentHandoverInput, It as LATEST_API_VERSION, J as PlanLinkCreate, K as PlanCreate, L as FulfillmentInput, Lt as LatestApiVersion, M as FeatureOperationCommit, Mt as API_VERSION_PATTERN, N as FeatureOperationCreate, Nt as ApiVersion, O as CustomerSessionCreate, Ot as PublicPaymentState, P as FeatureUpdate, Pt as ApiVersionLifecycle, Q as ProductCheckoutCreate, R as FulfillmentTrackingInput, Rt as apiVersionLifecycle, S as CouponUpdate, St as PublicCheckout, T as CustomerInput, Tt as PublicFulfillment, U as PaymentLinkUpdate, Ut as supportedApiVersions, V as KEY_PATTERN, Vt as isApiVersion, W as PlanCheckoutCreate, X as PlanUpdate, Y as PlanPriceInput, Z as PortalSessionCreate, _ as ClientSubscriptionCancel, _t as PaymentMethodField, a as CheckoutCreate, at as SubscriptionCancel, b as CollectInput, bt as PaymentTestScenario, c as ClaimRespond, ct as SubscriptionCreate, d as ClientClaimCreate, dt as WebhookEndpointCreate, et as ProductCreate, f as ClientCustomerClaimCreate, ft as WebhookEndpointUpdate, g as ClientPaymentCode, gt as PaymentInstructions, h as ClientLinkCheckout, ht as FulfillmentOption, i as AfterCompletionInput, it as RetireInput, j as FeatureCreate, jt as API_VERSION_HEADER, k as CustomerUpdate, kt as PublicPortal, l as ClientCheckoutPay, lt as SubscriptionUpdate, m as ClientInvoicePay, mt as CustomerSubscriptionChangeResult, n as RequestOptions, nt as ProductUpdate, o as CheckoutItemInput, ot as SubscriptionChangeCreate, p as ClientFulfillmentProblem, pt as CustomerSubscription, q as PlanFeaturesInput, r as TransportOptions, rt as RefundCreate, s as ClaimResolve, st as SubscriptionChangePreviewInput, t as BilleteError, tt as ProductLinkCreate, u as ClientCheckoutUpdate, ut as VariantInput, v as ClientSubscriptionSeats, vt as PaymentMethodOption, w as CustomerCreate, wt as PublicClaimSummary, x as CouponCreate, xt as PortalFeatures, y as ClientSubscriptionUpdate, yt as PaymentNextAction, z as InvoiceCreate, zt as apiVersionStage } from "./errors-Ca_4OGi0.js";
|
|
2
|
+
import { $ as FulfillmentMethod, $t as PaymentFailureCode, A as Coupon, At as ResetFrequency, B as ExchangeRate, Bt as SubscriptionRenewal, C as CheckoutPurpose, Cn as isMobilePhone, Ct as PortalSession, D as ClaimReason, Dn as TokenKind, Dt as RESET_FREQUENCIES, E as ClaimOutcome, En as Environment, Et as ProductVariant, F as CustomerFeature, Ft as SubmitLabel, G as FeatureOperation, Gt as Weekday, H as FULFILLMENT_METHODS, Ht as SubscriptionTerms, I as CustomerMember, It as Subscription, J as FeatureType, Jt as API_ERROR_TYPES, K as FeatureOperationResult, Kt as ReceiptReference, L as CustomerMemberList, Lt as SubscriptionChange, M as CustomField, Mt as RiskLevel, N as Customer, Nt as SUBMIT_LABELS, O as ClaimStatus, On as tokenEnvironment, Ot as RISK_LEVELS, P as CustomerDetails, Pt as SUBSCRIPTION_STATUSES, Q as FulfillmentHandover, Qt as PAYMENT_FAILURE_CODES, R as CustomerSession, Rt as SubscriptionChangePreview, S as CheckoutItem, Sn as isLandlinePhone, St as PlanSeats, T as ClaimMessage, Tn as ENVIRONMENTS, Tt as ProductCategory, U as FULFILLMENT_STATUSES, Ut as USAGE_FEATURE_TYPES, V as FEATURE_TYPES, Vt as SubscriptionStatus, W as Feature, Wt as WebhookEndpoint, X as Fulfillment, Xt as ApiErrorEnvelope, Y as FeatureUsageResult, Yt as ApiErrorBody, Z as FulfillmentChoice, Zt as ApiErrorType, _ as CLAIM_STATUSES, _n as TAX_BEHAVIORS, _t as PaymentStatus, a as WEBHOOK_TEST_EVENT, an as BillingMonths, at as InvoiceReason, b as CarrierOffice, bn as VENEZUELAN_BANKS, bt as PlanFeatureValues, c as AfterCompletion, cn as GRACE_PERIOD_DAYS, ct as MAX_SEATS, d as CANCELLATION_FEEDBACK, dn as ListQuery, dt as Payment, en as ACCOUNT_NUMBER_LENGTH, et as FulfillmentStatus, f as CARRIERS, fn as ListSort, ft as PaymentAttempt, g as CLAIM_REASONS, gn as MobilePrefix, gt as PaymentSettlement, h as CLAIM_OUTCOMES, hn as Metadata, ht as PaymentLink, i as SubscribableEventType, in as BankCode, it as Invoice, j as CurrencyAvailability, jt as Retirement, k as CollectSettings, kn as tokenPrefix, kt as Refund, l as Balance, ln as GracePeriodDays, lt as PAYMENT_STATUSES, m as CHECKOUT_PURPOSES, mn as MOBILE_PREFIXES, mt as PaymentFeeDetails, n as EventDataMap, nn as AddressInput, nt as INVOICE_REASONS, o as WebhookEvent, on as CURRENCIES, ot as InvoiceStatus, p as CARRIER_TEST_SCENARIOS, pn as MAX_QUANTITY, pt as PaymentFailure, q as FeatureReset, qt as ReceiptSend, r as EventType, rn as BILLING_MONTHS, rt as INVOICE_STATUSES, s as Actor, sn as Currency, st as LineItem, t as EVENT_TYPES, tn as Address, tt as FulfillmentTracking, u as BalanceAmount, un as List, ut as PRODUCT_CATEGORIES, v as CancellationFeedback, vn as TaxBehavior, vt as Payout, w as Claim, wn as nationalPhone, wt as Product, x as Checkout, xn as findBank, xt as PlanPrice, y as Carrier, yn as Timestamp, yt as Plan, z as Event, zt as SubscriptionChangeResult } from "./events-1yiDG8bS.js";
|
|
3
3
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
4
4
|
//#region src/server.d.ts
|
|
5
5
|
type Filters<T> = ListQuery & T;
|
|
@@ -261,17 +261,31 @@ export declare function createBillete(options: BilleteOptions): {
|
|
|
261
261
|
retrieve: (id: string, options?: RequestOptions) => Promise<Fulfillment>;
|
|
262
262
|
list: (query?: Filters<{
|
|
263
263
|
status?: FulfillmentStatus;
|
|
264
|
+
/** `search`: part of the ID, or of the customer's name or email. */
|
|
264
265
|
search?: string;
|
|
266
|
+
/** The one whose code the customer showed: what its QR encodes, or the code alone. */
|
|
267
|
+
handoverCode?: string;
|
|
265
268
|
sort?: ListSort<"created">;
|
|
266
269
|
}>, options?: RequestOptions) => Promise<List<Fulfillment>>;
|
|
267
270
|
iterate: (query?: Filters<{
|
|
268
271
|
status?: FulfillmentStatus;
|
|
272
|
+
/** `search`: part of the ID, or of the customer's name or email. */
|
|
269
273
|
search?: string;
|
|
274
|
+
/** The one whose code the customer showed: what its QR encodes, or the code alone. */
|
|
275
|
+
handoverCode?: string;
|
|
270
276
|
sort?: ListSort<"created">;
|
|
271
277
|
}>) => AsyncGenerator<Fulfillment, any, any>;
|
|
272
278
|
/** Sends a tracking number to be verified against the customer's chosen office. */
|
|
273
279
|
submitTracking: (id: string, input: FulfillmentTrackingInput, options?: RequestOptions) => Promise<Fulfillment>;
|
|
274
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* You handed it over with the code the customer showed (the QR of their order page), proof
|
|
282
|
+
* they were there: they have 24 hours to confirm it or report a problem.
|
|
283
|
+
*/
|
|
284
|
+
handOver: (id: string, input: FulfillmentHandoverInput, options?: RequestOptions) => Promise<Fulfillment>;
|
|
285
|
+
/**
|
|
286
|
+
* You handed it over without the customer's code, or sent it with a courier: they have 48
|
|
287
|
+
* hours to confirm it or report a problem.
|
|
288
|
+
*/
|
|
275
289
|
deliver: (id: string, options?: RequestOptions) => Promise<Fulfillment>;
|
|
276
290
|
};
|
|
277
291
|
claims: {
|
|
@@ -350,4 +364,4 @@ export declare function createBillete(options: BilleteOptions): {
|
|
|
350
364
|
/** The server client: what `createBillete` returns. */
|
|
351
365
|
type Billete = ReturnType<typeof createBillete>;
|
|
352
366
|
//#endregion
|
|
353
|
-
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 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 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 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 PublicClaim, type PublicClaimSummary, 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 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 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 };
|
|
367
|
+
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 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 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 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 PublicClaim, type PublicClaimSummary, 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 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 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-
|
|
1
|
+
import { n as segment, r as BilleteError, t as createTransport } from "./http-CCvluhGO.js";
|
|
2
2
|
import { WebhookVerificationError, verifyWebhook } from "./webhooks.js";
|
|
3
3
|
//#region ../contracts/src/environment.ts
|
|
4
4
|
/**
|
|
@@ -358,7 +358,20 @@ create: (input, options) => http.request({
|
|
|
358
358
|
body: input,
|
|
359
359
|
options
|
|
360
360
|
}),
|
|
361
|
-
/**
|
|
361
|
+
/**
|
|
362
|
+
* You handed it over with the code the customer showed (the QR of their order page), proof
|
|
363
|
+
* they were there: they have 24 hours to confirm it or report a problem.
|
|
364
|
+
*/
|
|
365
|
+
handOver: (id, input, options) => http.request({
|
|
366
|
+
method: "POST",
|
|
367
|
+
path: `/v1/fulfillments/${segment(id)}/handover`,
|
|
368
|
+
body: input,
|
|
369
|
+
options
|
|
370
|
+
}),
|
|
371
|
+
/**
|
|
372
|
+
* You handed it over without the customer's code, or sent it with a courier: they have 48
|
|
373
|
+
* hours to confirm it or report a problem.
|
|
374
|
+
*/
|
|
362
375
|
deliver: (id, options) => http.request({
|
|
363
376
|
method: "POST",
|
|
364
377
|
path: `/v1/fulfillments/${segment(id)}/deliver`,
|
package/dist/webhooks.d.ts
CHANGED