@c1m-public/channel-client 5.0.0 → 5.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/README.md CHANGED
@@ -109,6 +109,21 @@ const visitorChannel = channel.withVisitor({
109
109
  const geo = await visitorChannel.geo.detect();
110
110
  ```
111
111
 
112
+ ### Country-aware catalogue
113
+
114
+ The 5.1.0 SDK candidate adds three workspace-channel reads:
115
+
116
+ - `products.markets()` discovers the countries available on the channel.
117
+ - `products.listForCountry({ country: "IE" })` returns a product list and,
118
+ on compatible servers, a `browse` object with the selected market,
119
+ selector choices, and fallback country. An empty list can still carry
120
+ this context. Use discovery if the response omits it.
121
+ - `products.getForCountry(slug, "IE")` reads a product with its contextual price.
122
+
123
+ Render the price and currency returned by the API and use the market's
124
+ `can_purchase` flag for purchase controls. The Next.js client keeps these
125
+ reads out of the shared Data Cache.
126
+
112
127
  ### Canonical document renderer
113
128
 
114
129
  The renderer owns safe mechanics, not presentation. A site supplies a registry
@@ -1,4 +1,4 @@
1
- import { createChannelClient } from './chunk-654FCSVE.js';
1
+ import { createChannelClient } from './chunk-J3Y6KAEC.js';
2
2
  import 'server-only';
3
3
 
4
4
  function narrow(client) {
@@ -279,6 +279,13 @@ function buildChannelClient(options, viewer) {
279
279
  if (!key) throw new ChannelConfigurationError("idempotencyKey is required");
280
280
  return { "Idempotency-Key": key };
281
281
  }
282
+ function listProducts(params) {
283
+ return request(
284
+ "channel.catalog.products.list",
285
+ appendQuery("/products", params),
286
+ params.country !== void 0 ? { cache: "no-store" } : void 0
287
+ );
288
+ }
282
289
  return {
283
290
  /**
284
291
  * Verify the channel token and see what it points at.
@@ -436,8 +443,11 @@ function buildChannelClient(options, viewer) {
436
443
  get: (slug) => request("channel.pages.get", `/pages/${encodePath(slug)}`)
437
444
  },
438
445
  products: {
439
- list: (params = {}) => request("channel.catalog.products.list", appendQuery("/products", params)),
446
+ markets: () => request("channel.catalog.markets.list", "/catalog/markets", { cache: "no-store" }),
447
+ list: (params = {}) => listProducts(params),
448
+ listForCountry: (params) => listProducts(params),
440
449
  get: (slug) => request("channel.catalog.products.get", `/products/${encodePath(slug)}`),
450
+ getForCountry: (slug, country) => request("channel.catalog.products.get", appendQuery(`/products/${encodePath(slug)}`, { country }), { cache: "no-store" }),
441
451
  media: (slug) => request("channel.catalog.products.media", `/products/${encodePath(slug)}/media`)
442
452
  },
443
453
  artwork: {
@@ -489,6 +499,15 @@ function buildChannelClient(options, viewer) {
489
499
  method: "POST",
490
500
  headers: mutationHeaders(mutation),
491
501
  body: JSON.stringify(input)
502
+ }),
503
+ previewMarket: (cartToken, country) => request("channel.cart.market.preview", appendQuery("/cart/market/preview", {
504
+ cart_token: required(cartToken, "cartToken"),
505
+ country: required(country, "country")
506
+ }), { cache: "no-store" }),
507
+ confirmMarket: (input, mutation) => request("channel.cart.market.confirm", "/cart/market/confirm", {
508
+ method: "POST",
509
+ headers: requiredIdempotencyHeaders(mutation),
510
+ body: JSON.stringify(input)
492
511
  })
493
512
  },
494
513
  // Checkout is addressed by the ORDER the cart became: the server mounts
@@ -1,4 +1,4 @@
1
- import { isChannelAPIError, createChannelClient } from './chunk-654FCSVE.js';
1
+ import { isChannelAPIError, createChannelClient } from './chunk-J3Y6KAEC.js';
2
2
  import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
3
3
  import 'server-only';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { DashChannelClient } from './dash.js';
2
2
  import { CreateNextChannelClientOptions } from './next.js';
3
3
  import './index.js';
4
- import './types-Ch86mCHw.js';
4
+ import './types-BSN-nxmG.js';
5
5
  import './webhooks.js';
6
6
 
7
7
  /**
package/dist/dash-next.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createNextChannelClient } from './chunk-7D26WVWG.js';
2
- import { narrow } from './chunk-K4WHHUTW.js';
3
- import './chunk-654FCSVE.js';
1
+ import { createNextChannelClient } from './chunk-ZO3ME5FP.js';
2
+ import { narrow } from './chunk-EKMKL3XK.js';
3
+ import './chunk-J3Y6KAEC.js';
4
4
  import './chunk-XPO7C3DW.js';
5
5
  import 'server-only';
6
6
 
package/dist/dash.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createChannelClient, ChannelVisitor, CreateChannelClientOptions } from './index.js';
2
- import './types-Ch86mCHw.js';
2
+ import './types-BSN-nxmG.js';
3
3
  import './webhooks.js';
4
4
 
5
5
  /**
package/dist/dash.js CHANGED
@@ -1,3 +1,3 @@
1
- export { createDashChannelClient, narrow as narrowToDash } from './chunk-K4WHHUTW.js';
2
- import './chunk-654FCSVE.js';
1
+ export { createDashChannelClient, narrow as narrowToDash } from './chunk-EKMKL3XK.js';
2
+ import './chunk-J3Y6KAEC.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, 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, b0 as CompleteUploadInput, $ as ArtworkMutationReceipt, b1 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 SubscriptionPaymentRecoveryResponse, aX as AccountBooking, aY as AccountPayment, aZ as GivingIntentListResponse, a_ as LeadResponse, b2 as Slot } from './types-Ch86mCHw.js';
2
- export { b3 as BookingAvailability, b4 as BookingCancellationPolicy, b5 as BookingCustomerInput, b6 as BookingFreeSpan, b7 as BookingHold, b8 as BookingIntakeQuestion, b9 as BookingPriceQuote, ba as BookingServicePricing, bb as BookingTimeRange, bc as CatalogProduct, bd as ChannelReceipt, be as ChannelReceiptLine, bf as ChannelReceiptRecurring, bg as CheckoutAddress, bh as CheckoutStatus, bi as ConfigDocument, bj as ConfigQuote, bk as ConfigSelectionRequest, bl as Customer, bm as CustomerSecurityActivity, bn as DashBrandingInfo, bo as DashDirectoryGalleryItem, bp as DashDirectoryLocation, bq as DashDirectoryProfile, br as DashLeadPortalMatch, bs as DashLeadPortalMovingSummary, bt as DashLeadPortalRequest, bu as DashLeadPortalRequestStatus, bv as DashLocaleInfo, bw as DashPlan, bx as DashPlanLimitValue, by as DashPlanPricing, bz as DashPublicPage, bA as DashPublicProfileInfo, bB as DashTenantInfo, bC as DiningAvailability, bD as DiningAvailabilityRule, bE as DiningComboChoice, bF as DiningComboGroup, bG as DiningItemSize, bH as DiningMenuItem, bI as DiningModifier, bJ as DiningModifierGroup, bK as DiningOffer, bL as DiningOfferBadge, bM as DirectoryVerificationStatus, bN as FileRequestTokenInput, bO as GivingIntent, bP as Menu, bQ as MenuItem, bR as OrderItem, bS as PaymentLinkRedemptionStatus, bT as PaymentMethodOption, bU as PaymentReadiness, bV as PrintBranding, bW as PrintIntakeLimits, bX as PrintJobFile, bY as PrintPaperSize, bZ as PrintPerPagePricing, b_ as PrintPriceBreakdown, b$ as PrintPriceLine, c0 as PrintPricing, c1 as PrintPricingOption, c2 as ProductLineConfiguration, c3 as PublicGate, c4 as PublicPaymentLink, c5 as PublicSiteSignals, c6 as ShippingMethodOption, c7 as SiteGatedDocument, c8 as SiteRef, c9 as SiteResolvedDocument, ca as SiteSubject, cb as SubscriptionAgreement, cc as SubscriptionPlanOffer, cd as SubscriptionSourceDisplay, ce as WaitlistAttribution, cf as WorkspaceInfo } from './types-Ch86mCHw.js';
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 BrowseMarketsResponse, Y as Product, Z as ChannelProductListResponse, _ as ProductAsset, $ as SlotsResponse, a0 as DownloadResponse, b3 as BeginUploadInput, b4 as CompleteUploadInput, a1 as ArtworkMutationReceipt, b5 as DecisionInput, a2 as PublicConfiguration, a3 as PublicConfigurationQuoteInput, a4 as PublicConfigurationQuote, a5 as CatalogCategory, a6 as CatalogProductsResponse, a7 as CatalogCollection, a8 as CatalogBrand, a9 as CartLookupResponse, A as AddCartItemInput, C as CartResponse, aa as UpdateCartItemInput, ab as MergeCartInput, ac as CartMarketPreview, ad as ConfirmCartMarketInput, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, ae as Review, af as ReviewSummaryResponse, ag as PublicSubmitReviewInput, ah as ThemeResponse, ai as MenuResponse, aj as BlogPost, ak as BlogPostResponse, al as GivingEntry, am as StartGivingInput, an as StartGivingResponse, ao as SubscriptionPlanListResponse, ap as SubscriptionPlanResponse, aq as BookingService, ar as BookingServiceResponse, as as BookingAvailabilityParams, at as BookingAvailabilityResponse, au as BookingQuoteParams, av as BookingQuoteResponse, aw as CreateBookingHoldInput, ax as BookingHoldResponse, ay as PublicPaymentLinkResponse, az as PaymentLinkCheckoutInput, aA as PaymentLinkCheckoutResponse, aB as PaymentLinkRedemptionStatusResponse, aC as PrintSettingsResponse, aD as PrintOptionsSelection, aE as PrintQuoteResponse, aF as PrintIntakeInput, aG as PrintJob, aH as DiningMenu, aI as CustomerSignupResponse, aJ as SendCodeResponse, aK as CustomerSession, aL as CustomerResponse, aM as CustomerAuthSession, aN as CustomerSecurityActivityPage, O as Order, aO as OrderSummary, aP as SavedAddress, aQ as SavedAddressResponse, aR as SavedAddressInput, aS as SavedAddressUpdateInput, aT as AccountBillingPortalInput, aU as AccountBillingPortalResponse, aV as StartSubscriptionInput, aW as SubscriptionCheckoutResponse, aX as SubscriptionListResponse, aY as SubscriptionAgreementResponse, aZ as SubscriptionSourceResponse, a_ as SubscriptionPaymentRecoveryResponse, a$ as AccountBooking, b0 as AccountPayment, b1 as GivingIntentListResponse, b2 as LeadResponse, b6 as Slot } from './types-BSN-nxmG.js';
2
+ export { b7 as BookingAvailability, b8 as BookingCancellationPolicy, b9 as BookingCustomerInput, ba as BookingFreeSpan, bb as BookingHold, bc as BookingIntakeQuestion, bd as BookingPriceQuote, be as BookingServicePricing, bf as BookingTimeRange, bg as BrowseCatalogueContext, bh as BrowseMarket, bi as BrowseMarketPrice, bj as CatalogProduct, bk as ChannelReceipt, bl as ChannelReceiptLine, bm as ChannelReceiptRecurring, bn as CheckoutAddress, bo as CheckoutStatus, bp as ConfigDocument, bq as ConfigQuote, br as ConfigSelectionRequest, bs as Customer, bt as CustomerSecurityActivity, bu as DashBrandingInfo, bv as DashDirectoryGalleryItem, bw as DashDirectoryLocation, bx as DashDirectoryProfile, by as DashLeadPortalMatch, bz as DashLeadPortalMovingSummary, bA as DashLeadPortalRequest, bB as DashLeadPortalRequestStatus, bC as DashLocaleInfo, bD as DashPlan, bE as DashPlanLimitValue, bF as DashPlanPricing, bG as DashPublicPage, bH as DashPublicProfileInfo, bI as DashTenantInfo, bJ as DiningAvailability, bK as DiningAvailabilityRule, bL as DiningComboChoice, bM as DiningComboGroup, bN as DiningItemSize, bO as DiningMenuItem, bP as DiningModifier, bQ as DiningModifierGroup, bR as DiningOffer, bS as DiningOfferBadge, bT as DirectoryVerificationStatus, bU as FileRequestTokenInput, bV as GivingIntent, bW as Menu, bX as MenuItem, bY as OrderItem, bZ as PaymentLinkRedemptionStatus, b_ as PaymentMethodOption, b$ as PaymentReadiness, c0 as PrintBranding, c1 as PrintIntakeLimits, c2 as PrintJobFile, c3 as PrintPaperSize, c4 as PrintPerPagePricing, c5 as PrintPriceBreakdown, c6 as PrintPriceLine, c7 as PrintPricing, c8 as PrintPricingOption, c9 as ProductLineConfiguration, ca as PublicGate, cb as PublicPaymentLink, cc as PublicSiteSignals, cd as ShippingMethodOption, ce as SiteGatedDocument, cf as SiteRef, cg as SiteResolvedDocument, ch as SiteSubject, ci as SubscriptionAgreement, cj as SubscriptionPlanOffer, ck as SubscriptionSourceDisplay, cl as WaitlistAttribution, cm as WorkspaceInfo } from './types-BSN-nxmG.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
  /**
@@ -94,7 +94,7 @@ interface ChannelVisitor {
94
94
  userAgent?: string;
95
95
  }
96
96
  type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
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.payment_recovery" | "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";
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.markets.list" | "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.payment_recovery" | "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.cart.market.preview" | "channel.cart.market.confirm" | "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";
98
98
  interface ChannelRequestObservation {
99
99
  operation: ChannelOperation;
100
100
  method: string;
@@ -118,6 +118,7 @@ interface ChannelAccountBookingListParams extends ChannelListParams {
118
118
  when?: "upcoming" | "past";
119
119
  }
120
120
  interface ChannelProductListParams extends ChannelListParams {
121
+ country?: string;
121
122
  currency?: string;
122
123
  search?: string;
123
124
  category_id?: string;
@@ -277,10 +278,17 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
277
278
  }>;
278
279
  };
279
280
  readonly products: {
281
+ readonly markets: () => Promise<BrowseMarketsResponse>;
280
282
  readonly list: (params?: ChannelProductListParams) => Promise<ListResponse<Product>>;
283
+ readonly listForCountry: (params: ChannelProductListParams & {
284
+ country: string;
285
+ }) => Promise<ChannelProductListResponse>;
281
286
  readonly get: (slug: string) => Promise<{
282
287
  product: Product;
283
288
  }>;
289
+ readonly getForCountry: (slug: string, country: string) => Promise<{
290
+ product: Product;
291
+ }>;
284
292
  readonly media: (slug: string) => Promise<ListResponse<ProductAsset>>;
285
293
  };
286
294
  readonly artwork: {
@@ -315,6 +323,8 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
315
323
  readonly removeItem: (itemId: string, cartToken: string, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
316
324
  readonly clear: (cartToken: string, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
317
325
  readonly merge: (input: MergeCartInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
326
+ readonly previewMarket: (cartToken: string, country: string) => Promise<CartMarketPreview>;
327
+ readonly confirmMarket: (input: ConfirmCartMarketInput, mutation: RequiredIdempotency) => Promise<CartResponse>;
318
328
  };
319
329
  readonly checkout: {
320
330
  readonly options: (orderId: string, cartToken: string) => Promise<CheckoutOptions>;
@@ -496,4 +506,4 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
496
506
  };
497
507
  };
498
508
 
499
- 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, SubscriptionPaymentRecoveryResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, SubscriptionSourceResponse, ThemeResponse, UpdateCartItemInput, type UploadTicket, WaitlistAcknowledgement, WaitlistFormSettings, WaitlistGateStatus, WaitlistSubmission, WaitlistUnsubscription, WaitlistVerification, createChannelClient, isChannelAPIError, isChannelConfigurationError };
509
+ 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, BrowseMarketsResponse, CartLookupResponse, CartMarketPreview, CartResponse, CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, ChannelAPIError, type ChannelAccountBookingListParams, type ChannelCheckoutStatusParams, ChannelConfigurationError, ChannelGeo, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, ChannelPing, type ChannelProductListParams, ChannelProductListResponse, 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, ConfirmCartMarketInput, 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, SubscriptionPaymentRecoveryResponse, 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-654FCSVE.js';
1
+ export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-J3Y6KAEC.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
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 SubscriptionPaymentRecoveryResponse, aX as AccountBooking, aY as AccountPayment, aZ as GivingIntentListResponse, a_ as LeadResponse } from './types-Ch86mCHw.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 BrowseMarketsResponse, Y as Product, Z as ChannelProductListResponse, _ as ProductAsset, $ as SlotsResponse, a0 as DownloadResponse, a1 as ArtworkMutationReceipt, a2 as PublicConfiguration, a3 as PublicConfigurationQuoteInput, a4 as PublicConfigurationQuote, a5 as CatalogCategory, a6 as CatalogProductsResponse, a7 as CatalogCollection, a8 as CatalogBrand, a9 as CartLookupResponse, aa as UpdateCartItemInput, ab as MergeCartInput, ac as CartMarketPreview, ad as ConfirmCartMarketInput, ae as Review, af as ReviewSummaryResponse, ag as PublicSubmitReviewInput, ah as ThemeResponse, ai as MenuResponse, aj as BlogPost, ak as BlogPostResponse, al as GivingEntry, am as StartGivingInput, an as StartGivingResponse, ao as SubscriptionPlanListResponse, ap as SubscriptionPlanResponse, aq as BookingService, ar as BookingServiceResponse, as as BookingAvailabilityParams, at as BookingAvailabilityResponse, au as BookingQuoteParams, av as BookingQuoteResponse, aw as CreateBookingHoldInput, ax as BookingHoldResponse, ay as PublicPaymentLinkResponse, az as PaymentLinkCheckoutInput, aA as PaymentLinkCheckoutResponse, aB as PaymentLinkRedemptionStatusResponse, aC as PrintSettingsResponse, aD as PrintOptionsSelection, aE as PrintQuoteResponse, aF as PrintIntakeInput, aG as PrintJob, aH as DiningMenu, aI as CustomerSignupResponse, aJ as SendCodeResponse, aK as CustomerSession, aL as CustomerResponse, aM as CustomerAuthSession, aN as CustomerSecurityActivityPage, aO as OrderSummary, aP as SavedAddress, aQ as SavedAddressResponse, aR as SavedAddressInput, aS as SavedAddressUpdateInput, aT as AccountBillingPortalInput, aU as AccountBillingPortalResponse, aV as StartSubscriptionInput, aW as SubscriptionCheckoutResponse, aX as SubscriptionListResponse, aY as SubscriptionAgreementResponse, aZ as SubscriptionSourceResponse, a_ as SubscriptionPaymentRecoveryResponse, a$ as AccountBooking, b0 as AccountPayment, b1 as GivingIntentListResponse, b2 as LeadResponse } from './types-BSN-nxmG.js';
3
3
  import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
4
4
 
5
5
  /**
@@ -357,10 +357,17 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
357
357
  }>;
358
358
  };
359
359
  readonly products: {
360
+ readonly markets: () => Promise<BrowseMarketsResponse>;
360
361
  readonly list: (params?: ChannelProductListParams) => Promise<ListResponse<Product>>;
362
+ readonly listForCountry: (params: ChannelProductListParams & {
363
+ country: string;
364
+ }) => Promise<ChannelProductListResponse>;
361
365
  readonly get: (slug: string) => Promise<{
362
366
  product: Product;
363
367
  }>;
368
+ readonly getForCountry: (slug: string, country: string) => Promise<{
369
+ product: Product;
370
+ }>;
364
371
  readonly media: (slug: string) => Promise<ListResponse<ProductAsset>>;
365
372
  };
366
373
  readonly artwork: {
@@ -395,6 +402,8 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
395
402
  readonly removeItem: (itemId: string, cartToken: string, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
396
403
  readonly clear: (cartToken: string, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
397
404
  readonly merge: (input: MergeCartInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
405
+ readonly previewMarket: (cartToken: string, country: string) => Promise<CartMarketPreview>;
406
+ readonly confirmMarket: (input: ConfirmCartMarketInput, mutation: RequiredIdempotency) => Promise<CartResponse>;
398
407
  };
399
408
  readonly checkout: {
400
409
  readonly options: (orderId: string, cartToken: string) => Promise<CheckoutOptions>;
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-7D26WVWG.js';
2
- import './chunk-654FCSVE.js';
1
+ export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-ZO3ME5FP.js';
2
+ import './chunk-J3Y6KAEC.js';
3
3
  import './chunk-XPO7C3DW.js';
package/dist/site.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c8 as SiteRef, c3 as PublicGate, c5 as PublicSiteSignals } from './types-Ch86mCHw.js';
1
+ import { cf as SiteRef, ca as PublicGate, cc as PublicSiteSignals } from './types-BSN-nxmG.js';
2
2
 
3
3
  /**
4
4
  * Site signals: what a public site serves, decided from the `signals` block
@@ -686,7 +686,37 @@ interface PublicPage extends PublicPageSummary {
686
686
  theme_id?: string;
687
687
  default_shell_template_id?: string;
688
688
  }
689
+ interface BrowseMarket {
690
+ country: string;
691
+ market_code: string;
692
+ name: string;
693
+ currency: string;
694
+ locale: string;
695
+ can_purchase: boolean;
696
+ can_switch_cart?: boolean;
697
+ }
698
+ interface BrowseMarketPrice {
699
+ amount: {
700
+ minor: number;
701
+ currency: string;
702
+ };
703
+ source: string;
704
+ expires_at?: string;
705
+ }
706
+ interface BrowseMarketsResponse {
707
+ markets: BrowseMarket[];
708
+ fallback_country?: string;
709
+ }
710
+ interface BrowseCatalogueContext extends BrowseMarketsResponse {
711
+ market: BrowseMarket;
712
+ }
713
+ interface ChannelProductListResponse extends ListResponse<Product> {
714
+ /** Available on successful country-aware reads from capable channel servers. */
715
+ browse?: BrowseCatalogueContext;
716
+ }
689
717
  interface Product {
718
+ browse_market?: BrowseMarket;
719
+ browse_price?: BrowseMarketPrice;
690
720
  kind?: string;
691
721
  id: string;
692
722
  workspace_id: string;
@@ -1458,6 +1488,7 @@ interface Order {
1458
1488
  order_number: string;
1459
1489
  cart_token?: string;
1460
1490
  channel_id?: string;
1491
+ buyer_country?: string;
1461
1492
  status: string;
1462
1493
  payment_status: string;
1463
1494
  currency: string;
@@ -1500,6 +1531,25 @@ interface CartResponse {
1500
1531
  interface CartLookupResponse {
1501
1532
  order?: Order | null;
1502
1533
  }
1534
+ interface CartMarketPreview {
1535
+ market: BrowseMarket;
1536
+ lines: {
1537
+ item_id: string;
1538
+ title: string;
1539
+ quantity: number;
1540
+ previous_unit_price: BrowseMarketPrice["amount"];
1541
+ proposed_unit_price: BrowseMarketPrice["amount"];
1542
+ }[];
1543
+ subtotal: BrowseMarketPrice["amount"];
1544
+ reset_fulfillment: boolean;
1545
+ expires_at: string;
1546
+ review_token: string;
1547
+ }
1548
+ interface ConfirmCartMarketInput {
1549
+ cart_token: string;
1550
+ country: string;
1551
+ review_token: string;
1552
+ }
1503
1553
  interface ProductLineConfiguration {
1504
1554
  revision_id?: string;
1505
1555
  selection: ConfigSelectionRequest;
@@ -1822,4 +1872,4 @@ interface AccountPayment {
1822
1872
  reference: string;
1823
1873
  }
1824
1874
 
1825
- 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, BeginUploadInput 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, SubscriptionPaymentRecoveryResponse as aW, AccountBooking as aX, AccountPayment as aY, GivingIntentListResponse as aZ, LeadResponse 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, PrintPriceLine as b$, CompleteUploadInput as b0, DecisionInput as b1, Slot as b2, BookingAvailability as b3, BookingCancellationPolicy as b4, BookingCustomerInput as b5, BookingFreeSpan as b6, BookingHold as b7, BookingIntakeQuestion as b8, BookingPriceQuote as b9, DashPublicProfileInfo as bA, DashTenantInfo as bB, DiningAvailability as bC, DiningAvailabilityRule as bD, DiningComboChoice as bE, DiningComboGroup as bF, DiningItemSize as bG, DiningMenuItem as bH, DiningModifier as bI, DiningModifierGroup as bJ, DiningOffer as bK, DiningOfferBadge as bL, DirectoryVerificationStatus as bM, FileRequestTokenInput as bN, GivingIntent as bO, Menu as bP, MenuItem as bQ, OrderItem as bR, PaymentLinkRedemptionStatus as bS, PaymentMethodOption as bT, PaymentReadiness as bU, PrintBranding as bV, PrintIntakeLimits as bW, PrintJobFile as bX, PrintPaperSize as bY, PrintPerPagePricing as bZ, PrintPriceBreakdown as b_, BookingServicePricing as ba, BookingTimeRange as bb, CatalogProduct as bc, ChannelReceipt as bd, ChannelReceiptLine as be, ChannelReceiptRecurring as bf, CheckoutAddress as bg, CheckoutStatus as bh, ConfigDocument as bi, ConfigQuote as bj, ConfigSelectionRequest as bk, Customer as bl, CustomerSecurityActivity as bm, DashBrandingInfo as bn, DashDirectoryGalleryItem as bo, DashDirectoryLocation as bp, DashDirectoryProfile as bq, DashLeadPortalMatch as br, DashLeadPortalMovingSummary as bs, DashLeadPortalRequest as bt, DashLeadPortalRequestStatus as bu, DashLocaleInfo as bv, DashPlan as bw, DashPlanLimitValue as bx, DashPlanPricing as by, DashPublicPage as bz, CheckoutCustomerInput as c, PrintPricing as c0, PrintPricingOption as c1, ProductLineConfiguration as c2, PublicGate as c3, PublicPaymentLink as c4, PublicSiteSignals as c5, ShippingMethodOption as c6, SiteGatedDocument as c7, SiteRef as c8, SiteResolvedDocument as c9, SiteSubject as ca, SubscriptionAgreement as cb, SubscriptionPlanOffer as cc, SubscriptionSourceDisplay as cd, WaitlistAttribution as ce, WorkspaceInfo as cf, 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 };
1875
+ export type { SlotsResponse 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, BrowseMarketsResponse as X, Product as Y, ChannelProductListResponse as Z, ProductAsset as _, CheckoutOptions as a, AccountBooking as a$, DownloadResponse as a0, ArtworkMutationReceipt as a1, PublicConfiguration as a2, PublicConfigurationQuoteInput as a3, PublicConfigurationQuote as a4, CatalogCategory as a5, CatalogProductsResponse as a6, CatalogCollection as a7, CatalogBrand as a8, CartLookupResponse as a9, PaymentLinkCheckoutResponse as aA, PaymentLinkRedemptionStatusResponse as aB, PrintSettingsResponse as aC, PrintOptionsSelection as aD, PrintQuoteResponse as aE, PrintIntakeInput as aF, PrintJob as aG, DiningMenu as aH, CustomerSignupResponse as aI, SendCodeResponse as aJ, CustomerSession as aK, CustomerResponse as aL, CustomerAuthSession as aM, CustomerSecurityActivityPage as aN, OrderSummary as aO, SavedAddress as aP, SavedAddressResponse as aQ, SavedAddressInput as aR, SavedAddressUpdateInput as aS, AccountBillingPortalInput as aT, AccountBillingPortalResponse as aU, StartSubscriptionInput as aV, SubscriptionCheckoutResponse as aW, SubscriptionListResponse as aX, SubscriptionAgreementResponse as aY, SubscriptionSourceResponse as aZ, SubscriptionPaymentRecoveryResponse as a_, UpdateCartItemInput as aa, MergeCartInput as ab, CartMarketPreview as ac, ConfirmCartMarketInput as ad, Review as ae, ReviewSummaryResponse as af, PublicSubmitReviewInput as ag, ThemeResponse as ah, MenuResponse as ai, BlogPost as aj, BlogPostResponse as ak, GivingEntry as al, StartGivingInput as am, StartGivingResponse as an, SubscriptionPlanListResponse as ao, SubscriptionPlanResponse as ap, BookingService as aq, BookingServiceResponse as ar, BookingAvailabilityParams as as, BookingAvailabilityResponse as at, BookingQuoteParams as au, BookingQuoteResponse as av, CreateBookingHoldInput as aw, BookingHoldResponse as ax, PublicPaymentLinkResponse as ay, PaymentLinkCheckoutInput as az, CheckoutStatusResponse as b, PaymentReadiness as b$, AccountPayment as b0, GivingIntentListResponse as b1, LeadResponse as b2, BeginUploadInput as b3, CompleteUploadInput as b4, DecisionInput as b5, Slot as b6, BookingAvailability as b7, BookingCancellationPolicy as b8, BookingCustomerInput as b9, DashLeadPortalRequest as bA, DashLeadPortalRequestStatus as bB, DashLocaleInfo as bC, DashPlan as bD, DashPlanLimitValue as bE, DashPlanPricing as bF, DashPublicPage as bG, DashPublicProfileInfo as bH, DashTenantInfo as bI, DiningAvailability as bJ, DiningAvailabilityRule as bK, DiningComboChoice as bL, DiningComboGroup as bM, DiningItemSize as bN, DiningMenuItem as bO, DiningModifier as bP, DiningModifierGroup as bQ, DiningOffer as bR, DiningOfferBadge as bS, DirectoryVerificationStatus as bT, FileRequestTokenInput as bU, GivingIntent as bV, Menu as bW, MenuItem as bX, OrderItem as bY, PaymentLinkRedemptionStatus as bZ, PaymentMethodOption as b_, BookingFreeSpan as ba, BookingHold as bb, BookingIntakeQuestion as bc, BookingPriceQuote as bd, BookingServicePricing as be, BookingTimeRange as bf, BrowseCatalogueContext as bg, BrowseMarket as bh, BrowseMarketPrice as bi, CatalogProduct as bj, ChannelReceipt as bk, ChannelReceiptLine as bl, ChannelReceiptRecurring as bm, CheckoutAddress as bn, CheckoutStatus as bo, ConfigDocument as bp, ConfigQuote as bq, ConfigSelectionRequest as br, Customer as bs, CustomerSecurityActivity as bt, DashBrandingInfo as bu, DashDirectoryGalleryItem as bv, DashDirectoryLocation as bw, DashDirectoryProfile as bx, DashLeadPortalMatch as by, DashLeadPortalMovingSummary as bz, CheckoutCustomerInput as c, PrintBranding as c0, PrintIntakeLimits as c1, PrintJobFile as c2, PrintPaperSize as c3, PrintPerPagePricing as c4, PrintPriceBreakdown as c5, PrintPriceLine as c6, PrintPricing as c7, PrintPricingOption as c8, ProductLineConfiguration as c9, PublicGate as ca, PublicPaymentLink as cb, PublicSiteSignals as cc, ShippingMethodOption as cd, SiteGatedDocument as ce, SiteRef as cf, SiteResolvedDocument as cg, SiteSubject as ch, SubscriptionAgreement as ci, SubscriptionPlanOffer as cj, SubscriptionSourceDisplay as ck, WaitlistAttribution as cl, WorkspaceInfo as cm, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c1m-public/channel-client",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Typed server-side client for the MML headless Channel API",