@c1m-public/channel-client 3.0.0 → 4.1.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/{chunk-IESKKOTS.js → chunk-GZB2OOOK.js} +1 -1
- package/dist/{chunk-ZEWL4PBM.js → chunk-SZ2GFSXD.js} +27 -30
- package/dist/{chunk-2VFLXYHH.js → chunk-VRKR3SGI.js} +1 -1
- package/dist/dash-next.d.ts +1 -1
- package/dist/dash-next.js +3 -3
- package/dist/dash.d.ts +1 -1
- package/dist/dash.js +2 -2
- package/dist/index.d.ts +46 -21
- package/dist/index.js +1 -1
- package/dist/next.d.ts +16 -14
- package/dist/next.js +2 -2
- package/dist/site.d.ts +1 -1
- package/dist/{types-Iuoc_GMq.d.ts → types-tOFjxrQP.d.ts} +71 -59
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-SZ2GFSXD.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
|
@@ -190,12 +190,19 @@ async function visitorHeaders(token, method, path, visitor) {
|
|
|
190
190
|
"X-C1M-Visitor-Signature": signature
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
+
var SITE_PAGES = ["receipt", "account", "manage-subscription"];
|
|
194
|
+
function sitePagesOf(options) {
|
|
195
|
+
const declared = new Set(options.sitePages ?? []);
|
|
196
|
+
if (options.receiptPage) declared.add("receipt");
|
|
197
|
+
return SITE_PAGES.filter((page) => declared.has(page));
|
|
198
|
+
}
|
|
193
199
|
function createChannelClient(options) {
|
|
194
200
|
return buildChannelClient(options);
|
|
195
201
|
}
|
|
196
202
|
function buildChannelClient(options, viewer) {
|
|
197
203
|
const baseUrl = (options.baseUrl === void 0 ? DEFAULT_CHANNEL_API_URL : required(options.baseUrl, "baseUrl")).replace(/\/+$/, "");
|
|
198
204
|
const token = required(options.token, "token");
|
|
205
|
+
const declaredSitePages = sitePagesOf(options);
|
|
199
206
|
if (!token.startsWith(CHANNEL_TOKEN_PREFIX)) throw new ChannelConfigurationError("token must start with sk_chan_");
|
|
200
207
|
const fetcher = options.fetch ?? globalThis.fetch;
|
|
201
208
|
if (!fetcher) throw new ChannelConfigurationError("fetch implementation is required");
|
|
@@ -218,6 +225,8 @@ function buildChannelClient(options, viewer) {
|
|
|
218
225
|
if (signedVisitor) {
|
|
219
226
|
for (const [key, value] of Object.entries(signedVisitor)) headers.set(key, value);
|
|
220
227
|
}
|
|
228
|
+
if (declaredSitePages.length) headers.set("X-Site-Pages", declaredSitePages.join(","));
|
|
229
|
+
if (declaredSitePages.includes("receipt")) headers.set("X-Receipt-Page", "1");
|
|
221
230
|
const effectiveSession = session ?? viewer;
|
|
222
231
|
if (effectiveSession) headers.set("X-End-User-Token", effectiveSession);
|
|
223
232
|
if (init.body !== void 0 && !isFormDataBody(init.body) && !headers.has("Content-Type")) {
|
|
@@ -349,6 +358,14 @@ function buildChannelClient(options, viewer) {
|
|
|
349
358
|
body: JSON.stringify({ token: required(token2, "token") })
|
|
350
359
|
})
|
|
351
360
|
},
|
|
361
|
+
/**
|
|
362
|
+
* A purchase by its receipt link (workspace token). The token is the
|
|
363
|
+
* credential; pass the customer's session to learn whether they made the
|
|
364
|
+
* purchase. Answers are never cached: render them per request.
|
|
365
|
+
*/
|
|
366
|
+
receipts: {
|
|
367
|
+
get: (token2, options2 = {}) => request("channel.receipts.get", `/receipts/${encodePath(required(token2, "token"))}`, { cache: "no-store" }, options2.endUserToken?.trim() || void 0)
|
|
368
|
+
},
|
|
352
369
|
/** Tenant-level data exposed only to a dash-scoped channel token. */
|
|
353
370
|
dash: {
|
|
354
371
|
profile: () => request("channel.dash.profile", "/dash/profile"),
|
|
@@ -693,25 +710,10 @@ function buildChannelClient(options, viewer) {
|
|
|
693
710
|
body: JSON.stringify({ kind: "shipping" })
|
|
694
711
|
}, customerSession)
|
|
695
712
|
},
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
setup: (input, mutation) => request("channel.account.payment_methods.setup", "/account/payment-methods/setup", {
|
|
699
|
-
method: "POST",
|
|
700
|
-
headers: mutationHeaders(mutation),
|
|
701
|
-
body: JSON.stringify(input)
|
|
702
|
-
}, customerSession),
|
|
703
|
-
confirm: (input, mutation) => request("channel.account.payment_methods.confirm", "/account/payment-methods/confirm", {
|
|
713
|
+
billing: {
|
|
714
|
+
portal: (input) => request("channel.account.billing.portal", "/account/billing/portal", {
|
|
704
715
|
method: "POST",
|
|
705
|
-
headers: mutationHeaders(mutation),
|
|
706
716
|
body: JSON.stringify(input)
|
|
707
|
-
}, customerSession),
|
|
708
|
-
setDefault: (methodId, mutation) => request("channel.account.payment_methods.default", `/account/payment-methods/${encodePath(methodId)}/default`, {
|
|
709
|
-
method: "POST",
|
|
710
|
-
headers: mutationHeaders(mutation)
|
|
711
|
-
}, customerSession),
|
|
712
|
-
delete: (methodId, mutation) => request("channel.account.payment_methods.delete", `/account/payment-methods/${encodePath(methodId)}`, {
|
|
713
|
-
method: "DELETE",
|
|
714
|
-
headers: mutationHeaders(mutation)
|
|
715
717
|
}, customerSession)
|
|
716
718
|
},
|
|
717
719
|
subscriptions: {
|
|
@@ -722,19 +724,14 @@ function buildChannelClient(options, viewer) {
|
|
|
722
724
|
}, customerSession),
|
|
723
725
|
list: (params = {}) => request("channel.account.subscriptions.list", appendQuery("/account/subscriptions", params), {}, customerSession),
|
|
724
726
|
get: (agreementId) => request("channel.account.subscriptions.get", `/account/subscriptions/${encodePath(agreementId)}`, {}, customerSession),
|
|
725
|
-
source: (agreementId) => request("channel.account.subscriptions.source", `/account/subscriptions/${encodePath(agreementId)}/source`, {}, customerSession)
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
body: JSON.stringify(input)
|
|
734
|
-
}, customerSession),
|
|
735
|
-
invoices: {
|
|
736
|
-
list: (agreementId, params = {}) => request("channel.account.subscriptions.invoices.list", appendQuery(`/account/subscriptions/${encodePath(agreementId)}/invoices`, params), {}, customerSession)
|
|
737
|
-
}
|
|
727
|
+
source: (agreementId) => request("channel.account.subscriptions.source", `/account/subscriptions/${encodePath(agreementId)}/source`, {}, customerSession)
|
|
728
|
+
},
|
|
729
|
+
bookings: {
|
|
730
|
+
list: (params = {}) => request("channel.account.bookings.list", appendQuery("/account/bookings", params), {}, customerSession)
|
|
731
|
+
},
|
|
732
|
+
payments: {
|
|
733
|
+
/** The customer's payment-link payments. */
|
|
734
|
+
list: (params = {}) => request("channel.account.payment_links.list", appendQuery("/account/payments", params), {}, customerSession)
|
|
738
735
|
},
|
|
739
736
|
giving: {
|
|
740
737
|
list: () => request("channel.account.giving.list", "/account/giving", {}, customerSession),
|
package/dist/dash-next.d.ts
CHANGED
package/dist/dash-next.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createNextChannelClient } from './chunk-
|
|
2
|
-
import { narrow } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { createNextChannelClient } from './chunk-GZB2OOOK.js';
|
|
2
|
+
import { narrow } from './chunk-VRKR3SGI.js';
|
|
3
|
+
import './chunk-SZ2GFSXD.js';
|
|
4
4
|
import './chunk-XPO7C3DW.js';
|
|
5
5
|
import 'server-only';
|
|
6
6
|
|
package/dist/dash.d.ts
CHANGED
package/dist/dash.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createDashChannelClient, narrow as narrowToDash } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createDashChannelClient, narrow as narrowToDash } from './chunk-VRKR3SGI.js';
|
|
2
|
+
import './chunk-SZ2GFSXD.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistGateStatus, k as WaitlistFormSettings, l as WaitlistSubmission, m as WaitlistAcknowledgement, n as WaitlistVerification, o as WaitlistUnsubscription, F as FileRequestView, p as FileRequestUploadInput, q as FileRequestUploadTicket, r as FileRequestCompleteInput, s as FileRequestReceivedFile, t as FileRequestClosed, D as DashProfileResponse,
|
|
2
|
-
export {
|
|
1
|
+
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistGateStatus, k as WaitlistFormSettings, l as WaitlistSubmission, m as WaitlistAcknowledgement, n as WaitlistVerification, o as WaitlistUnsubscription, F as FileRequestView, p as FileRequestUploadInput, q as FileRequestUploadTicket, r as FileRequestCompleteInput, s as FileRequestReceivedFile, t as FileRequestClosed, u as ChannelReceiptResponse, D as DashProfileResponse, v as DashInitResponse, w as DashPlansResponse, L as ListResponse, x as DashDirectoryRegion, y as DashDirectoryEntry, z as DashDirectoryProfileResponse, B as DashLead, E as DashLeadPortalRequestLinkInput, G as DashLeadPortalRequestLinkResponse, H as DashLeadPortalView, I as DashMovingQuoteInput, J as DashMovingQuoteReceipt, K as DashMovingAddressList, M as DashMovingAddress, N as DashMovingDistance, S as SiteAccess, Q as SiteDocument, R as PublicWorkspaceInit, T as LightInitResponse, U as PublicPageSummary, V as PublicPage, X as Product, Y as ProductAsset, Z as SlotsResponse, _ as DownloadResponse, a_ as BeginUploadInput, a$ as CompleteUploadInput, $ as ArtworkMutationReceipt, b0 as DecisionInput, a0 as PublicConfiguration, a1 as PublicConfigurationQuoteInput, a2 as PublicConfigurationQuote, a3 as CatalogCategory, a4 as CatalogProductsResponse, a5 as CatalogCollection, a6 as CatalogBrand, a7 as CartLookupResponse, A as AddCartItemInput, C as CartResponse, a8 as UpdateCartItemInput, a9 as MergeCartInput, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, aa as Review, ab as ReviewSummaryResponse, ac as PublicSubmitReviewInput, ad as ThemeResponse, ae as MenuResponse, af as BlogPost, ag as BlogPostResponse, ah as GivingEntry, ai as StartGivingInput, aj as StartGivingResponse, ak as SubscriptionPlanListResponse, al as SubscriptionPlanResponse, am as BookingService, an as BookingServiceResponse, ao as BookingAvailabilityParams, ap as BookingAvailabilityResponse, aq as BookingQuoteParams, ar as BookingQuoteResponse, as as CreateBookingHoldInput, at as BookingHoldResponse, au as PublicPaymentLinkResponse, av as PaymentLinkCheckoutInput, aw as PaymentLinkCheckoutResponse, ax as PaymentLinkRedemptionStatusResponse, ay as PrintSettingsResponse, az as PrintOptionsSelection, aA as PrintQuoteResponse, aB as PrintIntakeInput, aC as PrintJob, aD as DiningMenu, aE as CustomerSignupResponse, aF as SendCodeResponse, aG as CustomerSession, aH as CustomerResponse, aI as CustomerAuthSession, aJ as CustomerSecurityActivityPage, O as Order, aK as OrderSummary, aL as SavedAddress, aM as SavedAddressResponse, aN as SavedAddressInput, aO as SavedAddressUpdateInput, aP as AccountBillingPortalInput, aQ as AccountBillingPortalResponse, aR as StartSubscriptionInput, aS as SubscriptionCheckoutResponse, aT as SubscriptionListResponse, aU as SubscriptionAgreementResponse, aV as SubscriptionSourceResponse, aW as AccountBooking, aX as AccountPayment, aY as GivingIntentListResponse, aZ as LeadResponse, b1 as Slot } from './types-tOFjxrQP.js';
|
|
2
|
+
export { b2 as BookingAvailability, b3 as BookingCancellationPolicy, b4 as BookingCustomerInput, b5 as BookingFreeSpan, b6 as BookingHold, b7 as BookingIntakeQuestion, b8 as BookingPriceQuote, b9 as BookingServicePricing, ba as BookingTimeRange, bb as CatalogProduct, bc as ChannelReceipt, bd as ChannelReceiptLine, be as ChannelReceiptRecurring, bf as CheckoutAddress, bg as CheckoutStatus, bh as ConfigDocument, bi as ConfigQuote, bj as ConfigSelectionRequest, bk as Customer, bl as CustomerSecurityActivity, bm as DashBrandingInfo, bn as DashDirectoryProfile, bo as DashLeadPortalMatch, bp as DashLeadPortalMovingSummary, bq as DashLeadPortalRequest, br as DashLeadPortalRequestStatus, bs as DashLocaleInfo, bt as DashPlan, bu as DashPlanLimitValue, bv as DashPlanPricing, bw as DashPublicPage, bx as DashPublicProfileInfo, by as DashTenantInfo, bz as DiningAvailability, bA as DiningAvailabilityRule, bB as DiningComboChoice, bC as DiningComboGroup, bD as DiningItemSize, bE as DiningMenuItem, bF as DiningModifier, bG as DiningModifierGroup, bH as DiningOffer, bI as DiningOfferBadge, bJ as FileRequestTokenInput, bK as GivingIntent, bL as Menu, bM as MenuItem, bN as OrderItem, bO as PaymentLinkRedemptionStatus, bP as PaymentMethodOption, bQ as PaymentReadiness, bR as PrintBranding, bS as PrintIntakeLimits, bT as PrintJobFile, bU as PrintPaperSize, bV as PrintPerPagePricing, bW as PrintPriceBreakdown, bX as PrintPriceLine, bY as PrintPricing, bZ as PrintPricingOption, b_ as ProductLineConfiguration, b$ as PublicGate, c0 as PublicPaymentLink, c1 as PublicSiteSignals, c2 as ShippingMethodOption, c3 as SiteGatedDocument, c4 as SiteRef, c5 as SiteResolvedDocument, c6 as SiteSubject, c7 as SubscriptionAgreement, c8 as SubscriptionPlanOffer, c9 as SubscriptionSourceDisplay, ca as WaitlistAttribution, cb as WorkspaceInfo } from './types-tOFjxrQP.js';
|
|
3
3
|
export { AnyChannelWebhookEvent, CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelWebhookEvent, ChannelWebhookEventDataMap, ChannelWebhookEventType, ChannelWebhookVerificationCode, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, FulfillmentEventData, LeadCreatedEventData, MenuUpdatedEventData, OrderEventData, PagePublishedEventData, ParseChannelWebhookEventOptions, ParsedChannelWebhookEvent, ProductEventData, ReviewPublishedEventData, ReviewSubmittedEventData, UnknownChannelWebhookEvent, VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -69,14 +69,32 @@ interface CreateChannelClientOptions {
|
|
|
69
69
|
signal?: AbortSignal;
|
|
70
70
|
/** Verified visitor metadata from the hosting edge. Never accept these values from an untrusted caller. */
|
|
71
71
|
visitor?: ChannelVisitor;
|
|
72
|
+
/**
|
|
73
|
+
* Set when the site serves `/receipt/{token}` and reads it with
|
|
74
|
+
* `receipts.get`. Purchases started through this client then return there
|
|
75
|
+
* (and its email links point there); without it they return to the site's
|
|
76
|
+
* own success pages.
|
|
77
|
+
*/
|
|
78
|
+
receiptPage?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The customer pages this site serves at the built-in site's paths:
|
|
81
|
+
* `receipt` (`/receipt/{token}`), `account` (`/account`, `/account/orders/{id}`,
|
|
82
|
+
* `/account/subscriptions/{id}`, `/account/giving`, `/account/bookings`,
|
|
83
|
+
* `/account/payments`) and `manage-subscription`. When the site serves the
|
|
84
|
+
* workspace's primary domain, purchase emails link these pages instead of
|
|
85
|
+
* the built-in site's. Declare only pages that exist. `receiptPage: true`
|
|
86
|
+
* is the same as including `receipt`.
|
|
87
|
+
*/
|
|
88
|
+
sitePages?: readonly ChannelSitePage[];
|
|
72
89
|
}
|
|
90
|
+
type ChannelSitePage = "receipt" | "account" | "manage-subscription";
|
|
73
91
|
interface ChannelVisitor {
|
|
74
92
|
ip?: string;
|
|
75
93
|
country?: string;
|
|
76
94
|
userAgent?: string;
|
|
77
95
|
}
|
|
78
96
|
type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
|
|
79
|
-
type ChannelOperation = "channel.commerce.artwork.list" | "channel.commerce.artwork.download" | "channel.commerce.artwork.decide" | "channel.commerce.artwork.uploads.begin" | "channel.commerce.artwork.uploads.complete" | "channel.ping" | "channel.geo.detect" | "channel.site.access" | "channel.site.resolve" | "channel.init.get" | "channel.init.light" | "channel.pages.list" | "channel.pages.get" | "channel.catalog.products.list" | "channel.catalog.products.get" | "channel.catalog.products.media" | "channel.catalog.products.configuration.get" | "channel.catalog.products.configuration.quote" | "channel.reviews.list" | "channel.reviews.summary" | "channel.reviews.submit" | "channel.theme.get" | "channel.menus.get" | "channel.blog.get" | "channel.blog.list" | "channel.payments.availability" | "channel.giving.entries.list" | "channel.giving.entries.get" | "channel.giving.start" | "channel.subscriptions.plans.list" | "channel.subscriptions.plans.get" | "channel.subscriptions.start" | "channel.book.services.list" | "channel.book.services.get" | "channel.book.availability.get" | "channel.book.quote.get" | "channel.book.holds.create" | "channel.book.holds.checkout" | "channel.book.holds.get" | "channel.book.holds.release" | "channel.payment_links.get" | "channel.payment_links.checkout" | "channel.payment_links.redemptions.get" | "channel.print.settings" | "channel.print.quote" | "channel.print.intake" | "channel.menu.boards.menu" | "channel.auth.check" | "channel.auth.signup" | "channel.auth.send_code" | "channel.auth.verify_code" | "channel.auth.refresh" | "channel.auth.me" | "channel.auth.me.update" | "channel.auth.logout" | "channel.auth.sessions.list" | "channel.auth.sessions.revoke" | "channel.auth.sessions.revoke_others" | "channel.auth.sessions.revoke_all" | "channel.auth.security_activity.list" | "channel.account.addresses.list" | "channel.account.addresses.create" | "channel.account.addresses.get" | "channel.account.addresses.update" | "channel.account.addresses.delete" | "channel.account.addresses.set_default" | "channel.account.giving.list" | "channel.account.
|
|
97
|
+
type ChannelOperation = "channel.commerce.artwork.list" | "channel.commerce.artwork.download" | "channel.commerce.artwork.decide" | "channel.commerce.artwork.uploads.begin" | "channel.commerce.artwork.uploads.complete" | "channel.ping" | "channel.geo.detect" | "channel.site.access" | "channel.site.resolve" | "channel.init.get" | "channel.init.light" | "channel.pages.list" | "channel.pages.get" | "channel.catalog.products.list" | "channel.catalog.products.get" | "channel.catalog.products.media" | "channel.catalog.products.configuration.get" | "channel.catalog.products.configuration.quote" | "channel.reviews.list" | "channel.reviews.summary" | "channel.reviews.submit" | "channel.theme.get" | "channel.menus.get" | "channel.blog.get" | "channel.blog.list" | "channel.payments.availability" | "channel.giving.entries.list" | "channel.giving.entries.get" | "channel.giving.start" | "channel.subscriptions.plans.list" | "channel.subscriptions.plans.get" | "channel.subscriptions.start" | "channel.book.services.list" | "channel.book.services.get" | "channel.book.availability.get" | "channel.book.quote.get" | "channel.book.holds.create" | "channel.book.holds.checkout" | "channel.book.holds.get" | "channel.book.holds.release" | "channel.payment_links.get" | "channel.payment_links.checkout" | "channel.payment_links.redemptions.get" | "channel.print.settings" | "channel.print.quote" | "channel.print.intake" | "channel.menu.boards.menu" | "channel.auth.check" | "channel.auth.signup" | "channel.auth.send_code" | "channel.auth.verify_code" | "channel.auth.refresh" | "channel.auth.me" | "channel.auth.me.update" | "channel.auth.logout" | "channel.auth.sessions.list" | "channel.auth.sessions.revoke" | "channel.auth.sessions.revoke_others" | "channel.auth.sessions.revoke_all" | "channel.auth.security_activity.list" | "channel.account.addresses.list" | "channel.account.addresses.create" | "channel.account.addresses.get" | "channel.account.addresses.update" | "channel.account.addresses.delete" | "channel.account.addresses.set_default" | "channel.account.giving.list" | "channel.account.bookings.list" | "channel.account.payment_links.list" | "channel.account.orders.list" | "channel.account.orders.summary" | "channel.account.orders.get" | "channel.account.billing.portal" | "channel.account.subscriptions.list" | "channel.account.subscriptions.get" | "channel.account.subscriptions.source" | "channel.catalog.brands.list" | "channel.catalog.categories.list" | "channel.catalog.categories.products" | "channel.catalog.collections.list" | "channel.catalog.collections.products" | "channel.catalog.collections.get" | "channel.cart.get" | "channel.cart.items.add" | "channel.cart.items.update" | "channel.cart.items.remove" | "channel.cart.clear" | "channel.cart.merge" | "channel.checkout.options" | "channel.checkout.status" | "channel.checkout.customer.set" | "channel.checkout.addresses.set" | "channel.checkout.fulfillment.set" | "channel.checkout.pay" | "channel.checkout.cancel" | "channel.dash.profile" | "channel.dash.init" | "channel.waitlist.status" | "channel.waitlist.form" | "channel.waitlist.submit" | "channel.file_requests.view" | "channel.file_requests.uploads.begin" | "channel.file_requests.uploads.complete" | "channel.file_requests.close" | "channel.receipts.get" | "channel.dash.waitlist.status" | "channel.dash.waitlist.form" | "channel.dash.waitlist.submit" | "channel.dash.plans" | "channel.dash.directory.regions" | "channel.dash.directory.browse" | "channel.dash.directory.get" | "channel.dash.leads.capture" | "channel.dash.lead_portal.my_quotes" | "channel.dash.lead_portal.request_link" | "channel.dash.quote_requests.moving.capture" | "channel.dash.addresses.lookup" | "channel.dash.addresses.resolve" | "channel.dash.addresses.distance" | "channel.leads.capture";
|
|
80
98
|
interface ChannelRequestObservation {
|
|
81
99
|
operation: ChannelOperation;
|
|
82
100
|
method: string;
|
|
@@ -95,6 +113,10 @@ interface ChannelListParams {
|
|
|
95
113
|
cursor?: string;
|
|
96
114
|
limit?: number;
|
|
97
115
|
}
|
|
116
|
+
interface ChannelAccountBookingListParams extends ChannelListParams {
|
|
117
|
+
/** `upcoming` (soonest first) or `past` (latest first); all, latest first, when omitted. */
|
|
118
|
+
when?: "upcoming" | "past";
|
|
119
|
+
}
|
|
98
120
|
interface ChannelProductListParams extends ChannelListParams {
|
|
99
121
|
currency?: string;
|
|
100
122
|
search?: string;
|
|
@@ -131,11 +153,6 @@ interface ChannelCheckoutStatusParams {
|
|
|
131
153
|
interface ChannelSubscriptionListParams extends ChannelListParams {
|
|
132
154
|
status?: string;
|
|
133
155
|
}
|
|
134
|
-
interface ChannelSubscriptionCancelParams {
|
|
135
|
-
immediate?: boolean;
|
|
136
|
-
}
|
|
137
|
-
interface ChannelInvoiceListParams extends ChannelListParams {
|
|
138
|
-
}
|
|
139
156
|
declare class ChannelAPIError extends Error {
|
|
140
157
|
readonly status: number;
|
|
141
158
|
readonly code: string;
|
|
@@ -200,6 +217,16 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
200
217
|
readonly complete: (input: FileRequestCompleteInput, mutation?: ChannelMutationOptions) => Promise<FileRequestReceivedFile>;
|
|
201
218
|
readonly close: (token: string, mutation?: ChannelMutationOptions) => Promise<FileRequestClosed>;
|
|
202
219
|
};
|
|
220
|
+
/**
|
|
221
|
+
* A purchase by its receipt link (workspace token). The token is the
|
|
222
|
+
* credential; pass the customer's session to learn whether they made the
|
|
223
|
+
* purchase. Answers are never cached: render them per request.
|
|
224
|
+
*/
|
|
225
|
+
readonly receipts: {
|
|
226
|
+
readonly get: (token: string, options?: {
|
|
227
|
+
endUserToken?: string;
|
|
228
|
+
}) => Promise<ChannelReceiptResponse>;
|
|
229
|
+
};
|
|
203
230
|
/** Tenant-level data exposed only to a dash-scoped channel token. */
|
|
204
231
|
readonly dash: {
|
|
205
232
|
readonly profile: () => Promise<DashProfileResponse>;
|
|
@@ -440,23 +467,21 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
440
467
|
}>;
|
|
441
468
|
readonly setDefault: (addressId: string, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
|
|
442
469
|
};
|
|
443
|
-
readonly
|
|
444
|
-
readonly
|
|
445
|
-
readonly setup: (input: PaymentMethodSetupInput, mutation?: ChannelMutationOptions) => Promise<PaymentMethodSetupResult>;
|
|
446
|
-
readonly confirm: (input: PaymentMethodConfirmInput, mutation?: ChannelMutationOptions) => Promise<SavedPaymentMethod>;
|
|
447
|
-
readonly setDefault: (methodId: string, mutation?: ChannelMutationOptions) => Promise<PaymentMethodMutationResponse>;
|
|
448
|
-
readonly delete: (methodId: string, mutation?: ChannelMutationOptions) => Promise<PaymentMethodMutationResponse>;
|
|
470
|
+
readonly billing: {
|
|
471
|
+
readonly portal: (input: AccountBillingPortalInput) => Promise<AccountBillingPortalResponse>;
|
|
449
472
|
};
|
|
450
473
|
readonly subscriptions: {
|
|
451
|
-
readonly start: (input: StartSubscriptionInput, mutation?: ChannelMutationOptions) => Promise<
|
|
474
|
+
readonly start: (input: StartSubscriptionInput, mutation?: ChannelMutationOptions) => Promise<SubscriptionCheckoutResponse>;
|
|
452
475
|
readonly list: (params?: ChannelSubscriptionListParams) => Promise<SubscriptionListResponse>;
|
|
453
476
|
readonly get: (agreementId: string) => Promise<SubscriptionAgreementResponse>;
|
|
454
477
|
readonly source: (agreementId: string) => Promise<SubscriptionSourceResponse>;
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
readonly
|
|
458
|
-
|
|
459
|
-
|
|
478
|
+
};
|
|
479
|
+
readonly bookings: {
|
|
480
|
+
readonly list: (params?: ChannelAccountBookingListParams) => Promise<ListResponse<AccountBooking>>;
|
|
481
|
+
};
|
|
482
|
+
readonly payments: {
|
|
483
|
+
/** The customer's payment-link payments. */
|
|
484
|
+
readonly list: (params?: ChannelListParams) => Promise<ListResponse<AccountPayment>>;
|
|
460
485
|
};
|
|
461
486
|
readonly giving: {
|
|
462
487
|
readonly list: () => Promise<GivingIntentListResponse>;
|
|
@@ -470,4 +495,4 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
470
495
|
};
|
|
471
496
|
};
|
|
472
497
|
|
|
473
|
-
export { AddCartItemInput, type ArtworkCompleteInput, ArtworkMutationReceipt, type ArtworkProofDecision, type ArtworkSlot, type ArtworkSlotsResponse, type ArtworkUploadInput, type ArtworkUploadTicket, BlogPost, BlogPostResponse, BookingAvailabilityParams, BookingAvailabilityResponse, BookingHoldResponse, BookingQuoteParams, BookingQuoteResponse, BookingService, BookingServiceResponse, CartLookupResponse, CartResponse, CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, ChannelGeo, type
|
|
498
|
+
export { AccountBillingPortalInput, AccountBillingPortalResponse, AccountBooking, AccountPayment, AddCartItemInput, type ArtworkCompleteInput, ArtworkMutationReceipt, type ArtworkProofDecision, type ArtworkSlot, type ArtworkSlotsResponse, type ArtworkUploadInput, type ArtworkUploadTicket, BlogPost, BlogPostResponse, BookingAvailabilityParams, BookingAvailabilityResponse, BookingHoldResponse, BookingQuoteParams, BookingQuoteResponse, BookingService, BookingServiceResponse, CartLookupResponse, CartResponse, CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, ChannelAPIError, type ChannelAccountBookingListParams, type ChannelCheckoutStatusParams, ChannelConfigurationError, ChannelGeo, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, ChannelPing, type ChannelProductListParams, ChannelReceiptResponse, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSitePage, type ChannelSiteResolveParams, type ChannelSubscriptionListParams, type ChannelVisitor, CheckoutAddressesInput, CheckoutCancelInput, CheckoutCustomerInput, CheckoutFulfillmentInput, CheckoutOptions, CheckoutPayInput, CheckoutPayResponse, CheckoutStatusResponse, CreateBookingHoldInput, type CreateChannelClientOptions, CustomerAuthSession, CustomerResponse, CustomerSecurityActivityPage, CustomerSession, CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, DashDirectoryEntry, type DashDirectoryListParams, DashDirectoryProfileResponse, DashDirectoryRegion, DashInitResponse, DashLead, DashLeadPortalRequestLinkInput, DashLeadPortalRequestLinkResponse, DashLeadPortalView, DashMovingAddress, DashMovingAddressList, DashMovingDistance, DashMovingQuoteInput, DashMovingQuoteReceipt, DashPlansResponse, DashProfileResponse, DiningMenu, DownloadResponse, FileRequestClosed, FileRequestCompleteInput, FileRequestReceivedFile, FileRequestUploadInput, FileRequestUploadTicket, FileRequestView, GivingEntry, GivingIntentListResponse, LeadResponse, LightInitResponse, ListResponse, MenuResponse, MergeCartInput, Order, OrderSummary, PaymentCollectionAvailability, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PrintIntakeInput, PrintJob, PrintOptionsSelection, PrintQuoteResponse, PrintSettingsResponse, Product, ProductAsset, PublicConfiguration, PublicConfigurationQuote, PublicConfigurationQuoteInput, PublicPage, PublicPageSummary, PublicPaymentLinkResponse, PublicSubmitReviewInput, PublicWorkspaceInit, type RequiredIdempotency, Review, ReviewSummaryResponse, SavedAddress, SavedAddressInput, SavedAddressResponse, SavedAddressUpdateInput, SendCodeResponse, SiteAccess, SiteDocument, SlotsResponse, StartGivingInput, StartGivingResponse, StartSubscriptionInput, SubscriptionAgreementResponse, SubscriptionCheckoutResponse, SubscriptionListResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, SubscriptionSourceResponse, ThemeResponse, UpdateCartItemInput, type UploadTicket, WaitlistAcknowledgement, WaitlistFormSettings, WaitlistGateStatus, WaitlistSubmission, WaitlistUnsubscription, WaitlistVerification, createChannelClient, isChannelAPIError, isChannelConfigurationError };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-
|
|
1
|
+
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-SZ2GFSXD.js';
|
|
2
2
|
export { CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelConfigurationError, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, isChannelConfigurationError, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './chunk-XPO7C3DW.js';
|
package/dist/next.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createChannelClient, ChannelCheckoutStatusParams, ChannelMutationOptions, CreateChannelClientOptions, ChannelVisitor, DashDirectoryListParams, ChannelLeadInput, ChannelSiteResolveParams, ChannelListParams, ChannelProductListParams, ArtworkUploadInput, UploadTicket, ArtworkCompleteInput, ArtworkProofDecision, RequiredIdempotency, ChannelSubscriptionListParams,
|
|
2
|
-
import { O as Order, A as AddCartItemInput, C as CartResponse, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistGateStatus, k as WaitlistFormSettings, l as WaitlistSubmission, m as WaitlistAcknowledgement, n as WaitlistVerification, o as WaitlistUnsubscription, F as FileRequestView, p as FileRequestUploadInput, q as FileRequestUploadTicket, r as FileRequestCompleteInput, s as FileRequestReceivedFile, t as FileRequestClosed, D as DashProfileResponse,
|
|
1
|
+
import { createChannelClient, ChannelCheckoutStatusParams, ChannelMutationOptions, CreateChannelClientOptions, ChannelVisitor, DashDirectoryListParams, ChannelLeadInput, ChannelSiteResolveParams, ChannelListParams, ChannelProductListParams, ArtworkUploadInput, UploadTicket, ArtworkCompleteInput, ArtworkProofDecision, RequiredIdempotency, ChannelSubscriptionListParams, ChannelAccountBookingListParams } from './index.js';
|
|
2
|
+
import { O as Order, A as AddCartItemInput, C as CartResponse, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistGateStatus, k as WaitlistFormSettings, l as WaitlistSubmission, m as WaitlistAcknowledgement, n as WaitlistVerification, o as WaitlistUnsubscription, F as FileRequestView, p as FileRequestUploadInput, q as FileRequestUploadTicket, r as FileRequestCompleteInput, s as FileRequestReceivedFile, t as FileRequestClosed, u as ChannelReceiptResponse, D as DashProfileResponse, v as DashInitResponse, w as DashPlansResponse, L as ListResponse, x as DashDirectoryRegion, y as DashDirectoryEntry, z as DashDirectoryProfileResponse, B as DashLead, E as DashLeadPortalRequestLinkInput, G as DashLeadPortalRequestLinkResponse, H as DashLeadPortalView, I as DashMovingQuoteInput, J as DashMovingQuoteReceipt, K as DashMovingAddressList, M as DashMovingAddress, N as DashMovingDistance, S as SiteAccess, Q as SiteDocument, R as PublicWorkspaceInit, T as LightInitResponse, U as PublicPageSummary, V as PublicPage, X as Product, Y as ProductAsset, Z as SlotsResponse, _ as DownloadResponse, $ as ArtworkMutationReceipt, a0 as PublicConfiguration, a1 as PublicConfigurationQuoteInput, a2 as PublicConfigurationQuote, a3 as CatalogCategory, a4 as CatalogProductsResponse, a5 as CatalogCollection, a6 as CatalogBrand, a7 as CartLookupResponse, a8 as UpdateCartItemInput, a9 as MergeCartInput, aa as Review, ab as ReviewSummaryResponse, ac as PublicSubmitReviewInput, ad as ThemeResponse, ae as MenuResponse, af as BlogPost, ag as BlogPostResponse, ah as GivingEntry, ai as StartGivingInput, aj as StartGivingResponse, ak as SubscriptionPlanListResponse, al as SubscriptionPlanResponse, am as BookingService, an as BookingServiceResponse, ao as BookingAvailabilityParams, ap as BookingAvailabilityResponse, aq as BookingQuoteParams, ar as BookingQuoteResponse, as as CreateBookingHoldInput, at as BookingHoldResponse, au as PublicPaymentLinkResponse, av as PaymentLinkCheckoutInput, aw as PaymentLinkCheckoutResponse, ax as PaymentLinkRedemptionStatusResponse, ay as PrintSettingsResponse, az as PrintOptionsSelection, aA as PrintQuoteResponse, aB as PrintIntakeInput, aC as PrintJob, aD as DiningMenu, aE as CustomerSignupResponse, aF as SendCodeResponse, aG as CustomerSession, aH as CustomerResponse, aI as CustomerAuthSession, aJ as CustomerSecurityActivityPage, aK as OrderSummary, aL as SavedAddress, aM as SavedAddressResponse, aN as SavedAddressInput, aO as SavedAddressUpdateInput, aP as AccountBillingPortalInput, aQ as AccountBillingPortalResponse, aR as StartSubscriptionInput, aS as SubscriptionCheckoutResponse, aT as SubscriptionListResponse, aU as SubscriptionAgreementResponse, aV as SubscriptionSourceResponse, aW as AccountBooking, aX as AccountPayment, aY as GivingIntentListResponse, aZ as LeadResponse } from './types-tOFjxrQP.js';
|
|
3
3
|
import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -304,6 +304,11 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
|
|
|
304
304
|
readonly complete: (input: FileRequestCompleteInput, mutation?: ChannelMutationOptions) => Promise<FileRequestReceivedFile>;
|
|
305
305
|
readonly close: (token: string, mutation?: ChannelMutationOptions) => Promise<FileRequestClosed>;
|
|
306
306
|
};
|
|
307
|
+
readonly receipts: {
|
|
308
|
+
readonly get: (token: string, options?: {
|
|
309
|
+
endUserToken?: string;
|
|
310
|
+
}) => Promise<ChannelReceiptResponse>;
|
|
311
|
+
};
|
|
307
312
|
readonly dash: {
|
|
308
313
|
readonly profile: () => Promise<DashProfileResponse>;
|
|
309
314
|
readonly init: () => Promise<DashInitResponse>;
|
|
@@ -530,23 +535,20 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
|
|
|
530
535
|
}>;
|
|
531
536
|
readonly setDefault: (addressId: string, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
|
|
532
537
|
};
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
535
|
-
readonly setup: (input: PaymentMethodSetupInput, mutation?: ChannelMutationOptions) => Promise<PaymentMethodSetupResult>;
|
|
536
|
-
readonly confirm: (input: PaymentMethodConfirmInput, mutation?: ChannelMutationOptions) => Promise<SavedPaymentMethod>;
|
|
537
|
-
readonly setDefault: (methodId: string, mutation?: ChannelMutationOptions) => Promise<PaymentMethodMutationResponse>;
|
|
538
|
-
readonly delete: (methodId: string, mutation?: ChannelMutationOptions) => Promise<PaymentMethodMutationResponse>;
|
|
538
|
+
readonly billing: {
|
|
539
|
+
readonly portal: (input: AccountBillingPortalInput) => Promise<AccountBillingPortalResponse>;
|
|
539
540
|
};
|
|
540
541
|
readonly subscriptions: {
|
|
541
|
-
readonly start: (input: StartSubscriptionInput, mutation?: ChannelMutationOptions) => Promise<
|
|
542
|
+
readonly start: (input: StartSubscriptionInput, mutation?: ChannelMutationOptions) => Promise<SubscriptionCheckoutResponse>;
|
|
542
543
|
readonly list: (params?: ChannelSubscriptionListParams) => Promise<SubscriptionListResponse>;
|
|
543
544
|
readonly get: (agreementId: string) => Promise<SubscriptionAgreementResponse>;
|
|
544
545
|
readonly source: (agreementId: string) => Promise<SubscriptionSourceResponse>;
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
readonly
|
|
548
|
-
|
|
549
|
-
|
|
546
|
+
};
|
|
547
|
+
readonly bookings: {
|
|
548
|
+
readonly list: (params?: ChannelAccountBookingListParams) => Promise<ListResponse<AccountBooking>>;
|
|
549
|
+
};
|
|
550
|
+
readonly payments: {
|
|
551
|
+
readonly list: (params?: ChannelListParams) => Promise<ListResponse<AccountPayment>>;
|
|
550
552
|
};
|
|
551
553
|
readonly giving: {
|
|
552
554
|
readonly list: () => Promise<GivingIntentListResponse>;
|
package/dist/next.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-GZB2OOOK.js';
|
|
2
|
+
import './chunk-SZ2GFSXD.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/site.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c4 as SiteRef, b$ as PublicGate, c1 as PublicSiteSignals } from './types-tOFjxrQP.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Site signals: what a public site serves, decided from the `signals` block
|
|
@@ -968,35 +968,11 @@ type SavedAddressUpdateInput = SavedAddressInput;
|
|
|
968
968
|
interface SavedAddressResponse {
|
|
969
969
|
address: SavedAddress;
|
|
970
970
|
}
|
|
971
|
-
interface
|
|
972
|
-
|
|
973
|
-
provider: string;
|
|
974
|
-
status: string;
|
|
975
|
-
is_default: boolean;
|
|
976
|
-
display_brand?: string;
|
|
977
|
-
display_last4?: string;
|
|
978
|
-
exp_month?: number;
|
|
979
|
-
exp_year?: number;
|
|
980
|
-
created_at: string;
|
|
981
|
-
updated_at: string;
|
|
982
|
-
}
|
|
983
|
-
interface PaymentMethodSetupInput {
|
|
984
|
-
provider: string;
|
|
985
|
-
consent: boolean;
|
|
986
|
-
consent_version: "saved_payment_method_v1";
|
|
971
|
+
interface AccountBillingPortalInput {
|
|
972
|
+
return_url: string;
|
|
987
973
|
}
|
|
988
|
-
interface
|
|
989
|
-
|
|
990
|
-
client_secret?: string;
|
|
991
|
-
publishable_key?: string;
|
|
992
|
-
}
|
|
993
|
-
interface PaymentMethodConfirmInput {
|
|
994
|
-
provider: string;
|
|
995
|
-
setup_intent_id?: string;
|
|
996
|
-
payment_method_id?: string;
|
|
997
|
-
}
|
|
998
|
-
interface PaymentMethodMutationResponse {
|
|
999
|
-
success: boolean;
|
|
974
|
+
interface AccountBillingPortalResponse {
|
|
975
|
+
url: string;
|
|
1000
976
|
}
|
|
1001
977
|
interface SubscriptionAgreement {
|
|
1002
978
|
id: string;
|
|
@@ -1017,42 +993,20 @@ interface SubscriptionAgreement {
|
|
|
1017
993
|
interface SubscriptionAgreementResponse {
|
|
1018
994
|
agreement: SubscriptionAgreement;
|
|
1019
995
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
996
|
+
/**
|
|
997
|
+
* A started subscription (`subscriptions.start`). The first period is paid on
|
|
998
|
+
* Stripe Checkout: send the customer to `checkout_url`; the agreement is not
|
|
999
|
+
* active until that payment settles.
|
|
1000
|
+
*/
|
|
1001
|
+
interface SubscriptionCheckoutResponse {
|
|
1002
|
+
agreement: SubscriptionAgreement;
|
|
1003
|
+
checkout_url: string;
|
|
1025
1004
|
}
|
|
1026
1005
|
interface SubscriptionListResponse {
|
|
1027
1006
|
items: SubscriptionAgreement[];
|
|
1028
1007
|
has_more: boolean;
|
|
1029
1008
|
next_cursor?: string;
|
|
1030
1009
|
}
|
|
1031
|
-
interface SubscriptionInvoice {
|
|
1032
|
-
id: string;
|
|
1033
|
-
workspace_id: string;
|
|
1034
|
-
agreement_id: string;
|
|
1035
|
-
source_kind: string;
|
|
1036
|
-
source_id: string;
|
|
1037
|
-
invoice_number: string;
|
|
1038
|
-
status: string;
|
|
1039
|
-
currency: string;
|
|
1040
|
-
subtotal_cents: number;
|
|
1041
|
-
tax_cents: number;
|
|
1042
|
-
total_cents: number;
|
|
1043
|
-
paid_cents: number;
|
|
1044
|
-
period_start?: string;
|
|
1045
|
-
period_end?: string;
|
|
1046
|
-
paid_at?: string;
|
|
1047
|
-
payment_id?: string;
|
|
1048
|
-
created_at: string;
|
|
1049
|
-
updated_at: string;
|
|
1050
|
-
}
|
|
1051
|
-
interface SubscriptionInvoiceListResponse {
|
|
1052
|
-
items: SubscriptionInvoice[];
|
|
1053
|
-
has_more: boolean;
|
|
1054
|
-
next_cursor?: string;
|
|
1055
|
-
}
|
|
1056
1010
|
interface SubscriptionSourceDisplay {
|
|
1057
1011
|
source_app: string;
|
|
1058
1012
|
source_kind: string;
|
|
@@ -1779,5 +1733,63 @@ interface BookingQuoteParams {
|
|
|
1779
1733
|
/** RFC 3339; omit for a fixed-length service. */
|
|
1780
1734
|
endsAt?: string;
|
|
1781
1735
|
}
|
|
1736
|
+
/** One bought item on a receipt: no addresses, no options. */
|
|
1737
|
+
interface ChannelReceiptLine {
|
|
1738
|
+
name: string;
|
|
1739
|
+
quantity: number;
|
|
1740
|
+
amount_cents: number;
|
|
1741
|
+
/** The item's picture, an absolute http(s) URL, when it has one. */
|
|
1742
|
+
image_url?: string;
|
|
1743
|
+
}
|
|
1744
|
+
/** How a recurring purchase repeats. */
|
|
1745
|
+
interface ChannelReceiptRecurring {
|
|
1746
|
+
interval: string;
|
|
1747
|
+
next_payment_at?: string;
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* A purchase as its receipt link shows it (`channel.receipts.get`). Never
|
|
1751
|
+
* cache or index it. `viewer_owns` is true only when the customer session
|
|
1752
|
+
* sent with the read made the purchase.
|
|
1753
|
+
*/
|
|
1754
|
+
interface ChannelReceipt {
|
|
1755
|
+
kind: "shop_order" | "gift" | "subscription" | "booking" | "payment_link";
|
|
1756
|
+
record_id: string;
|
|
1757
|
+
status: "pending" | "paid" | "failed" | "cancelled";
|
|
1758
|
+
title: string;
|
|
1759
|
+
reference: string;
|
|
1760
|
+
amount_cents: number;
|
|
1761
|
+
currency: string;
|
|
1762
|
+
masked_email: string;
|
|
1763
|
+
viewer_owns: boolean;
|
|
1764
|
+
lines?: ChannelReceiptLine[];
|
|
1765
|
+
paid_at?: string;
|
|
1766
|
+
starts_at?: string;
|
|
1767
|
+
recurring?: ChannelReceiptRecurring;
|
|
1768
|
+
}
|
|
1769
|
+
interface ChannelReceiptResponse {
|
|
1770
|
+
receipt: ChannelReceipt;
|
|
1771
|
+
}
|
|
1772
|
+
/** A booking the signed-in customer holds (`withCustomer(...).bookings.list`). */
|
|
1773
|
+
interface AccountBooking {
|
|
1774
|
+
id: string;
|
|
1775
|
+
service_name: string;
|
|
1776
|
+
starts_at: string;
|
|
1777
|
+
ends_at: string;
|
|
1778
|
+
status: "requested" | "pending_payment" | "confirmed" | "completed" | "cancelled" | "expired";
|
|
1779
|
+
reference: string;
|
|
1780
|
+
amount_cents?: number;
|
|
1781
|
+
currency?: string;
|
|
1782
|
+
}
|
|
1783
|
+
/** A payment-link payment the signed-in customer made (`withCustomer(...).payments.list`). */
|
|
1784
|
+
interface AccountPayment {
|
|
1785
|
+
id: string;
|
|
1786
|
+
title: string;
|
|
1787
|
+
amount_cents: number;
|
|
1788
|
+
currency: string;
|
|
1789
|
+
status: string;
|
|
1790
|
+
created_at: string;
|
|
1791
|
+
paid_at?: string;
|
|
1792
|
+
reference: string;
|
|
1793
|
+
}
|
|
1782
1794
|
|
|
1783
|
-
export type {
|
|
1795
|
+
export type { ArtworkMutationReceipt as $, AddCartItemInput as A, DashLead as B, CartResponse as C, DashProfileResponse as D, DashLeadPortalRequestLinkInput as E, FileRequestView as F, DashLeadPortalRequestLinkResponse as G, DashLeadPortalView as H, DashMovingQuoteInput as I, DashMovingQuoteReceipt as J, DashMovingAddressList as K, ListResponse as L, DashMovingAddress as M, DashMovingDistance as N, Order as O, PaymentCollectionAvailability as P, SiteDocument as Q, PublicWorkspaceInit as R, SiteAccess as S, LightInitResponse as T, PublicPageSummary as U, PublicPage as V, WaitlistGateStatus as W, Product as X, ProductAsset as Y, SlotsResponse as Z, DownloadResponse as _, CheckoutOptions as a, CompleteUploadInput as a$, PublicConfiguration as a0, PublicConfigurationQuoteInput as a1, PublicConfigurationQuote as a2, CatalogCategory as a3, CatalogProductsResponse as a4, CatalogCollection as a5, CatalogBrand as a6, CartLookupResponse as a7, UpdateCartItemInput as a8, MergeCartInput as a9, PrintQuoteResponse as aA, PrintIntakeInput as aB, PrintJob as aC, DiningMenu as aD, CustomerSignupResponse as aE, SendCodeResponse as aF, CustomerSession as aG, CustomerResponse as aH, CustomerAuthSession as aI, CustomerSecurityActivityPage as aJ, OrderSummary as aK, SavedAddress as aL, SavedAddressResponse as aM, SavedAddressInput as aN, SavedAddressUpdateInput as aO, AccountBillingPortalInput as aP, AccountBillingPortalResponse as aQ, StartSubscriptionInput as aR, SubscriptionCheckoutResponse as aS, SubscriptionListResponse as aT, SubscriptionAgreementResponse as aU, SubscriptionSourceResponse as aV, AccountBooking as aW, AccountPayment as aX, GivingIntentListResponse as aY, LeadResponse as aZ, BeginUploadInput as a_, Review as aa, ReviewSummaryResponse as ab, PublicSubmitReviewInput as ac, ThemeResponse as ad, MenuResponse as ae, BlogPost as af, BlogPostResponse as ag, GivingEntry as ah, StartGivingInput as ai, StartGivingResponse as aj, SubscriptionPlanListResponse as ak, SubscriptionPlanResponse as al, BookingService as am, BookingServiceResponse as an, BookingAvailabilityParams as ao, BookingAvailabilityResponse as ap, BookingQuoteParams as aq, BookingQuoteResponse as ar, CreateBookingHoldInput as as, BookingHoldResponse as at, PublicPaymentLinkResponse as au, PaymentLinkCheckoutInput as av, PaymentLinkCheckoutResponse as aw, PaymentLinkRedemptionStatusResponse as ax, PrintSettingsResponse as ay, PrintOptionsSelection as az, CheckoutStatusResponse as b, PublicGate as b$, DecisionInput as b0, Slot as b1, BookingAvailability as b2, BookingCancellationPolicy as b3, BookingCustomerInput as b4, BookingFreeSpan as b5, BookingHold as b6, BookingIntakeQuestion as b7, BookingPriceQuote as b8, BookingServicePricing as b9, DiningAvailabilityRule as bA, DiningComboChoice as bB, DiningComboGroup as bC, DiningItemSize as bD, DiningMenuItem as bE, DiningModifier as bF, DiningModifierGroup as bG, DiningOffer as bH, DiningOfferBadge as bI, FileRequestTokenInput as bJ, GivingIntent as bK, Menu as bL, MenuItem as bM, OrderItem as bN, PaymentLinkRedemptionStatus as bO, PaymentMethodOption as bP, PaymentReadiness as bQ, PrintBranding as bR, PrintIntakeLimits as bS, PrintJobFile as bT, PrintPaperSize as bU, PrintPerPagePricing as bV, PrintPriceBreakdown as bW, PrintPriceLine as bX, PrintPricing as bY, PrintPricingOption as bZ, ProductLineConfiguration as b_, BookingTimeRange as ba, CatalogProduct as bb, ChannelReceipt as bc, ChannelReceiptLine as bd, ChannelReceiptRecurring as be, CheckoutAddress as bf, CheckoutStatus as bg, ConfigDocument as bh, ConfigQuote as bi, ConfigSelectionRequest as bj, Customer as bk, CustomerSecurityActivity as bl, DashBrandingInfo as bm, DashDirectoryProfile as bn, DashLeadPortalMatch as bo, DashLeadPortalMovingSummary as bp, DashLeadPortalRequest as bq, DashLeadPortalRequestStatus as br, DashLocaleInfo as bs, DashPlan as bt, DashPlanLimitValue as bu, DashPlanPricing as bv, DashPublicPage as bw, DashPublicProfileInfo as bx, DashTenantInfo as by, DiningAvailability as bz, CheckoutCustomerInput as c, PublicPaymentLink as c0, PublicSiteSignals as c1, ShippingMethodOption as c2, SiteGatedDocument as c3, SiteRef as c4, SiteResolvedDocument as c5, SiteSubject as c6, SubscriptionAgreement as c7, SubscriptionPlanOffer as c8, SubscriptionSourceDisplay as c9, WaitlistAttribution as ca, WorkspaceInfo as cb, CheckoutAddressesInput as d, CheckoutFulfillmentInput as e, CheckoutPayInput as f, CheckoutPayResponse as g, CheckoutCancelInput as h, ChannelPing as i, ChannelGeo as j, WaitlistFormSettings as k, WaitlistSubmission as l, WaitlistAcknowledgement as m, WaitlistVerification as n, WaitlistUnsubscription as o, FileRequestUploadInput as p, FileRequestUploadTicket as q, FileRequestCompleteInput as r, FileRequestReceivedFile as s, FileRequestClosed as t, ChannelReceiptResponse as u, DashInitResponse as v, DashPlansResponse as w, DashDirectoryRegion as x, DashDirectoryEntry as y, DashDirectoryProfileResponse as z };
|