@c1m-public/channel-client 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/{chunk-ZO3ME5FP.js → chunk-4GSTY323.js} +1 -1
- package/dist/{chunk-J3Y6KAEC.js → chunk-5ULF3TZJ.js} +8 -11
- package/dist/{chunk-EKMKL3XK.js → chunk-SFPJ6HJJ.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 +7 -9
- package/dist/index.js +1 -1
- package/dist/leads.d.ts +60 -0
- package/dist/leads.js +75 -0
- package/dist/next.d.ts +1 -4
- package/dist/next.js +2 -2
- package/dist/renderer.js +1 -1
- package/dist/site.d.ts +1 -1
- package/dist/{types-BSN-nxmG.d.ts → types-BedZ9_Y2.d.ts} +1 -3
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Channel credentials resolve the tenant and scope at the API door (plus the
|
|
|
34
34
|
workspace for workspace-scoped channels), so site URLs never carry those
|
|
35
35
|
identifiers.
|
|
36
36
|
|
|
37
|
-
Managed C1M sites need one deployment secret: `
|
|
37
|
+
Managed C1M sites need one deployment secret: `SAASDASH_CHANNEL_TOKEN`. The client
|
|
38
38
|
uses `https://api.saasdash.app` by default. Pass `baseUrl` directly only for
|
|
39
39
|
local development or private C1M infrastructure; it is not part of the normal
|
|
40
40
|
deployment contract.
|
|
@@ -45,7 +45,7 @@ deployment contract.
|
|
|
45
45
|
import { createNextChannelClient } from "@c1m-public/channel-client/next";
|
|
46
46
|
|
|
47
47
|
const channel = createNextChannelClient({
|
|
48
|
-
token: process.env.
|
|
48
|
+
token: process.env.SAASDASH_CHANNEL_TOKEN!,
|
|
49
49
|
cache: { revalidate: 60 },
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -70,7 +70,7 @@ const checkout = await channel.checkout.pay(
|
|
|
70
70
|
import { createChannelClient } from "@c1m-public/channel-client";
|
|
71
71
|
|
|
72
72
|
const channel = createChannelClient({
|
|
73
|
-
token: process.env.
|
|
73
|
+
token: process.env.SAASDASH_CHANNEL_TOKEN!,
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
const category = await channel.categories.products("electric-cars");
|
|
@@ -231,7 +231,7 @@ const { hold: current } = await bookings.holds.get(token);
|
|
|
231
231
|
|
|
232
232
|
```ts
|
|
233
233
|
const channel = createChannelClient({
|
|
234
|
-
token: process.env.
|
|
234
|
+
token: process.env.SAASDASH_CHANNEL_TOKEN!,
|
|
235
235
|
observe(event) {
|
|
236
236
|
console.info("c1m.channel", event);
|
|
237
237
|
},
|
|
@@ -246,7 +246,7 @@ Verify webhook requests before parsing or acting on their payload:
|
|
|
246
246
|
import { parseChannelWebhookEvent } from "@c1m-public/channel-client/webhooks";
|
|
247
247
|
|
|
248
248
|
const event = await parseChannelWebhookEvent(request, {
|
|
249
|
-
secret: process.env.
|
|
249
|
+
secret: process.env.SAASDASH_CHANNEL_WEBHOOK_SECRET!,
|
|
250
250
|
});
|
|
251
251
|
```
|
|
252
252
|
|
|
@@ -288,7 +288,7 @@ import { revalidatePath, revalidateTag } from "next/cache";
|
|
|
288
288
|
import { createChannelWebhookRoute } from "@c1m-public/channel-client/next";
|
|
289
289
|
|
|
290
290
|
export const POST = createChannelWebhookRoute({
|
|
291
|
-
secret: () => process.env.
|
|
291
|
+
secret: () => process.env.SAASDASH_CHANNEL_WEBHOOK_SECRET!,
|
|
292
292
|
invalidate: { revalidatePath, revalidateTag },
|
|
293
293
|
});
|
|
294
294
|
```
|
|
@@ -305,7 +305,7 @@ the classifier (`defaultChannelCacheTags` is exported to compose with).
|
|
|
305
305
|
|
|
306
306
|
```ts
|
|
307
307
|
const channel = createNextChannelClient({
|
|
308
|
-
token: process.env.
|
|
308
|
+
token: process.env.SAASDASH_CHANNEL_TOKEN!,
|
|
309
309
|
cache: { revalidate: 3600 }, // products.list() → tags ["channel:catalog"]
|
|
310
310
|
});
|
|
311
311
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-5ULF3TZJ.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
|
@@ -41,6 +41,9 @@ var TransportError = class extends Error {
|
|
|
41
41
|
function isTransportError(error) {
|
|
42
42
|
return error instanceof TransportError || typeof error === "object" && error !== null && error.name === "TransportError";
|
|
43
43
|
}
|
|
44
|
+
function detailsRecord(value) {
|
|
45
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
46
|
+
}
|
|
44
47
|
function positiveNumber(value, label, fail) {
|
|
45
48
|
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) throw fail(`${label} must be a positive finite number`);
|
|
46
49
|
return value;
|
|
@@ -101,12 +104,14 @@ async function performRequest(transport, url, init, observe, decode) {
|
|
|
101
104
|
if (!response.ok) {
|
|
102
105
|
const envelope = await response.json().catch(() => ({}));
|
|
103
106
|
if (typeof envelope.request_id === "string") requestId = envelope.request_id;
|
|
107
|
+
const details = detailsRecord(envelope.details);
|
|
104
108
|
return fail({
|
|
105
109
|
outcome: "api_error",
|
|
106
110
|
status,
|
|
107
111
|
code: typeof envelope.code === "string" ? envelope.code : "",
|
|
108
112
|
message: typeof envelope.message === "string" ? envelope.message : "",
|
|
109
|
-
requestId
|
|
113
|
+
requestId,
|
|
114
|
+
...details ? { details } : {}
|
|
110
115
|
});
|
|
111
116
|
}
|
|
112
117
|
let payload;
|
|
@@ -323,18 +328,10 @@ function buildChannelClient(options, viewer) {
|
|
|
323
328
|
)
|
|
324
329
|
},
|
|
325
330
|
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* follow the links in waitlist emails and work with any scope.
|
|
331
|
+
* Scope-free waitlist email links (`verify` and `unsubscribe`).
|
|
332
|
+
* Dash waitlist status, form and signups live under `dash.waitlist`.
|
|
329
333
|
*/
|
|
330
334
|
waitlist: {
|
|
331
|
-
status: () => request("channel.waitlist.status", "/waitlist", { cache: "no-store" }),
|
|
332
|
-
form: () => request("channel.waitlist.form", "/waitlist/form", { cache: "no-store" }),
|
|
333
|
-
submit: (input, mutation) => request("channel.waitlist.submit", "/waitlist/entries", {
|
|
334
|
-
method: "POST",
|
|
335
|
-
headers: mutationHeaders(mutation),
|
|
336
|
-
body: JSON.stringify(input)
|
|
337
|
-
}),
|
|
338
335
|
verify: (token2) => linkRequest("/verify", { token: required(token2, "token") }),
|
|
339
336
|
unsubscribe: (key) => linkRequest("/unsubscribe", { key: required(key, "key") })
|
|
340
337
|
},
|
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-4GSTY323.js';
|
|
2
|
+
import { narrow } from './chunk-SFPJ6HJJ.js';
|
|
3
|
+
import './chunk-5ULF3TZJ.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-SFPJ6HJJ.js';
|
|
2
|
+
import './chunk-5ULF3TZJ.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
|
|
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-
|
|
1
|
+
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, F as FileRequestView, l as FileRequestUploadInput, m as FileRequestUploadTicket, n as FileRequestCompleteInput, o as FileRequestReceivedFile, p as FileRequestClosed, q as ChannelReceiptResponse, D as DashProfileResponse, r as DashInitResponse, s as WaitlistGateStatus, t as WaitlistFormSettings, u as WaitlistSubmission, v as WaitlistAcknowledgement, 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-BedZ9_Y2.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-BedZ9_Y2.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.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.
|
|
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.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;
|
|
@@ -135,6 +135,8 @@ interface ChannelLeadInput {
|
|
|
135
135
|
message?: string;
|
|
136
136
|
source?: string;
|
|
137
137
|
meta?: Record<string, unknown>;
|
|
138
|
+
/** Bot trap, forwarded unchanged; the API silently drops non-blank values. */
|
|
139
|
+
_gotcha?: string;
|
|
138
140
|
}
|
|
139
141
|
interface DashDirectoryListParams extends ChannelListParams {
|
|
140
142
|
category?: string;
|
|
@@ -195,14 +197,10 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
195
197
|
readonly availability: () => Promise<PaymentCollectionAvailability>;
|
|
196
198
|
};
|
|
197
199
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* follow the links in waitlist emails and work with any scope.
|
|
200
|
+
* Scope-free waitlist email links (`verify` and `unsubscribe`).
|
|
201
|
+
* Dash waitlist status, form and signups live under `dash.waitlist`.
|
|
201
202
|
*/
|
|
202
203
|
readonly waitlist: {
|
|
203
|
-
readonly status: () => Promise<WaitlistGateStatus>;
|
|
204
|
-
readonly form: () => Promise<WaitlistFormSettings>;
|
|
205
|
-
readonly submit: (input: WaitlistSubmission, mutation?: ChannelMutationOptions) => Promise<WaitlistAcknowledgement>;
|
|
206
204
|
readonly verify: (token: string) => Promise<WaitlistVerification>;
|
|
207
205
|
readonly unsubscribe: (key: string) => Promise<WaitlistUnsubscription>;
|
|
208
206
|
};
|
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-5ULF3TZJ.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/leads.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Form field name for the hidden bot trap; forwarded unchanged as `_gotcha`. */
|
|
2
|
+
declare const HONEYPOT_FIELD_NAME = "_gotcha";
|
|
3
|
+
/** Backend-aligned character limits for public lead capture forms. */
|
|
4
|
+
declare const LEAD_LIMITS: {
|
|
5
|
+
readonly name: 120;
|
|
6
|
+
readonly email: 254;
|
|
7
|
+
readonly phone: 40;
|
|
8
|
+
readonly message: 4000;
|
|
9
|
+
};
|
|
10
|
+
interface LeadCaptureInput {
|
|
11
|
+
name?: string;
|
|
12
|
+
email: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
message?: string;
|
|
15
|
+
/** Bot trap, forwarded unchanged as `_gotcha`. */
|
|
16
|
+
_gotcha?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ValidatedLead {
|
|
19
|
+
attemptId: string;
|
|
20
|
+
input: LeadCaptureInput;
|
|
21
|
+
}
|
|
22
|
+
type LeadField = "name" | "email" | "phone" | "message";
|
|
23
|
+
type LeadValidationResult = {
|
|
24
|
+
valid: true;
|
|
25
|
+
value: ValidatedLead;
|
|
26
|
+
} | {
|
|
27
|
+
valid: false;
|
|
28
|
+
fieldErrors: Partial<Record<LeadField, string>>;
|
|
29
|
+
formError?: string;
|
|
30
|
+
};
|
|
31
|
+
type LeadCaptureOutcome = {
|
|
32
|
+
state: "created";
|
|
33
|
+
id: string;
|
|
34
|
+
} | {
|
|
35
|
+
state: "disabled";
|
|
36
|
+
} | {
|
|
37
|
+
state: "invalid";
|
|
38
|
+
} | {
|
|
39
|
+
state: "error";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Validates a public lead-capture `FormData` payload against the Channel API's
|
|
43
|
+
* field limits (including 254-character email and UUID `lead_attempt_id`) and
|
|
44
|
+
* preserves `_gotcha` unchanged for server-side evaluation.
|
|
45
|
+
*/
|
|
46
|
+
declare function validateLeadForm(formData: FormData): LeadValidationResult;
|
|
47
|
+
/**
|
|
48
|
+
* Maps a failed `leads.create` error onto the visitor-facing state:
|
|
49
|
+
* - 401/403/404/410 -> `"disabled"` (channel or lead capture unavailable)
|
|
50
|
+
* - other 4xx -> `"invalid"` (submission rejected; visitor can correct input)
|
|
51
|
+
* - 5xx / transport -> `"error"` (transient failure; retryable)
|
|
52
|
+
*/
|
|
53
|
+
declare function classifyLeadCaptureError(error: unknown): Exclude<LeadCaptureOutcome["state"], "created">;
|
|
54
|
+
/**
|
|
55
|
+
* True when a failed capture returned a definite 4xx refusal and the form
|
|
56
|
+
* should rotate its `lead_attempt_id` before the next submission.
|
|
57
|
+
*/
|
|
58
|
+
declare function shouldRotateLeadAttemptKey(error: unknown): boolean;
|
|
59
|
+
|
|
60
|
+
export { HONEYPOT_FIELD_NAME, LEAD_LIMITS, type LeadCaptureInput, type LeadCaptureOutcome, type LeadField, type LeadValidationResult, type ValidatedLead, classifyLeadCaptureError, shouldRotateLeadAttemptKey, validateLeadForm };
|
package/dist/leads.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { isChannelAPIError } from './chunk-5ULF3TZJ.js';
|
|
2
|
+
import './chunk-XPO7C3DW.js';
|
|
3
|
+
|
|
4
|
+
// src/leads.ts
|
|
5
|
+
var HONEYPOT_FIELD_NAME = "_gotcha";
|
|
6
|
+
var LEAD_LIMITS = {
|
|
7
|
+
name: 120,
|
|
8
|
+
email: 254,
|
|
9
|
+
phone: 40,
|
|
10
|
+
message: 4e3
|
|
11
|
+
};
|
|
12
|
+
var attemptPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
13
|
+
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
14
|
+
var DISABLED_STATUSES = /* @__PURE__ */ new Set([401, 403, 404, 410]);
|
|
15
|
+
function optional(value, max) {
|
|
16
|
+
if (typeof value !== "string") return void 0;
|
|
17
|
+
const normalized = value.trim();
|
|
18
|
+
return normalized && normalized.length <= max ? normalized : void 0;
|
|
19
|
+
}
|
|
20
|
+
function validateLeadForm(formData) {
|
|
21
|
+
const attemptId = optional(formData.get("lead_attempt_id"), 64);
|
|
22
|
+
const rawName = formData.get("name");
|
|
23
|
+
const rawEmail = formData.get("email");
|
|
24
|
+
const rawPhone = formData.get("phone");
|
|
25
|
+
const rawMessage = formData.get("message");
|
|
26
|
+
const rawGotcha = formData.get(HONEYPOT_FIELD_NAME);
|
|
27
|
+
const name = optional(rawName, LEAD_LIMITS.name);
|
|
28
|
+
const email = optional(rawEmail, LEAD_LIMITS.email)?.toLowerCase();
|
|
29
|
+
const phone = optional(rawPhone, LEAD_LIMITS.phone);
|
|
30
|
+
const message = optional(rawMessage, LEAD_LIMITS.message);
|
|
31
|
+
const fieldErrors = {};
|
|
32
|
+
if (!email) {
|
|
33
|
+
fieldErrors.email = typeof rawEmail === "string" && rawEmail.trim().length > LEAD_LIMITS.email ? `Email must be ${LEAD_LIMITS.email} characters or fewer.` : "Enter your email address.";
|
|
34
|
+
} else if (!emailPattern.test(email)) {
|
|
35
|
+
fieldErrors.email = "Enter a valid email address.";
|
|
36
|
+
}
|
|
37
|
+
if (typeof rawName === "string" && rawName.trim() && !name) {
|
|
38
|
+
fieldErrors.name = `Name must be ${LEAD_LIMITS.name} characters or fewer.`;
|
|
39
|
+
}
|
|
40
|
+
if (typeof rawPhone === "string" && rawPhone.trim() && !phone) {
|
|
41
|
+
fieldErrors.phone = `Phone must be ${LEAD_LIMITS.phone} characters or fewer.`;
|
|
42
|
+
}
|
|
43
|
+
if (typeof rawMessage === "string" && rawMessage.trim() && !message) {
|
|
44
|
+
fieldErrors.message = `Message must be ${LEAD_LIMITS.message} characters or fewer.`;
|
|
45
|
+
}
|
|
46
|
+
const formError = !attemptId || !attemptPattern.test(attemptId) ? "This form has expired. Refresh the page and try again." : void 0;
|
|
47
|
+
if (formError || Object.keys(fieldErrors).length > 0) {
|
|
48
|
+
return { valid: false, fieldErrors, ...formError ? { formError } : {} };
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
valid: true,
|
|
52
|
+
value: {
|
|
53
|
+
attemptId,
|
|
54
|
+
input: {
|
|
55
|
+
email,
|
|
56
|
+
...name ? { name } : {},
|
|
57
|
+
...phone ? { phone } : {},
|
|
58
|
+
...message ? { message } : {},
|
|
59
|
+
...typeof rawGotcha === "string" ? { _gotcha: rawGotcha } : {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function classifyLeadCaptureError(error) {
|
|
65
|
+
if (isChannelAPIError(error)) {
|
|
66
|
+
if (DISABLED_STATUSES.has(error.status)) return "disabled";
|
|
67
|
+
if (error.status >= 400 && error.status < 500) return "invalid";
|
|
68
|
+
}
|
|
69
|
+
return "error";
|
|
70
|
+
}
|
|
71
|
+
function shouldRotateLeadAttemptKey(error) {
|
|
72
|
+
return isChannelAPIError(error) && error.status >= 400 && error.status < 500;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { HONEYPOT_FIELD_NAME, LEAD_LIMITS, classifyLeadCaptureError, shouldRotateLeadAttemptKey, validateLeadForm };
|
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
|
|
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 WaitlistVerification, k as WaitlistUnsubscription, F as FileRequestView, l as FileRequestUploadInput, m as FileRequestUploadTicket, n as FileRequestCompleteInput, o as FileRequestReceivedFile, p as FileRequestClosed, q as ChannelReceiptResponse, D as DashProfileResponse, r as DashInitResponse, s as WaitlistGateStatus, t as WaitlistFormSettings, u as WaitlistSubmission, v as WaitlistAcknowledgement, 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-BedZ9_Y2.js';
|
|
3
3
|
import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -292,9 +292,6 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
|
|
|
292
292
|
readonly availability: () => Promise<PaymentCollectionAvailability>;
|
|
293
293
|
};
|
|
294
294
|
readonly waitlist: {
|
|
295
|
-
readonly status: () => Promise<WaitlistGateStatus>;
|
|
296
|
-
readonly form: () => Promise<WaitlistFormSettings>;
|
|
297
|
-
readonly submit: (input: WaitlistSubmission, mutation?: ChannelMutationOptions) => Promise<WaitlistAcknowledgement>;
|
|
298
295
|
readonly verify: (token: string) => Promise<WaitlistVerification>;
|
|
299
296
|
readonly unsubscribe: (key: string) => Promise<WaitlistUnsubscription>;
|
|
300
297
|
};
|
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-4GSTY323.js';
|
|
2
|
+
import './chunk-5ULF3TZJ.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/renderer.js
CHANGED
|
@@ -43,7 +43,7 @@ function safeStyleRule(properties) {
|
|
|
43
43
|
}
|
|
44
44
|
function collectResponsiveCSS(document, widths = {}) {
|
|
45
45
|
if (!isSiteBuilderDocument(document)) return "";
|
|
46
|
-
const mobile = widths.mobile ??
|
|
46
|
+
const mobile = widths.mobile ?? 480;
|
|
47
47
|
const tablet = widths.tablet ?? 768;
|
|
48
48
|
const rules = [];
|
|
49
49
|
const walk = (nodes) => {
|
package/dist/site.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cf as SiteRef, ca as PublicGate, cc as PublicSiteSignals } from './types-
|
|
1
|
+
import { cf as SiteRef, ca as PublicGate, cc as PublicSiteSignals } from './types-BedZ9_Y2.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Site signals: what a public site serves, decided from the `signals` block
|
|
@@ -502,8 +502,6 @@ interface DashDirectoryEntry {
|
|
|
502
502
|
logo_square_url?: string;
|
|
503
503
|
card_media_url?: string;
|
|
504
504
|
primary_color?: string;
|
|
505
|
-
review_count: number;
|
|
506
|
-
average_rating: number;
|
|
507
505
|
verification_status?: DirectoryVerificationStatus;
|
|
508
506
|
verified: boolean;
|
|
509
507
|
service_tags?: unknown;
|
|
@@ -1872,4 +1870,4 @@ interface AccountPayment {
|
|
|
1872
1870
|
reference: string;
|
|
1873
1871
|
}
|
|
1874
1872
|
|
|
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,
|
|
1873
|
+
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, WaitlistVerification 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, WaitlistUnsubscription as k, FileRequestUploadInput as l, FileRequestUploadTicket as m, FileRequestCompleteInput as n, FileRequestReceivedFile as o, FileRequestClosed as p, ChannelReceiptResponse as q, DashInitResponse as r, WaitlistGateStatus as s, WaitlistFormSettings as t, WaitlistSubmission as u, WaitlistAcknowledgement 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": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Typed server-side client for the MML headless Channel API",
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./dist/site.d.ts",
|
|
45
45
|
"default": "./dist/site.js"
|
|
46
46
|
},
|
|
47
|
+
"./leads": {
|
|
48
|
+
"types": "./dist/leads.d.ts",
|
|
49
|
+
"default": "./dist/leads.js"
|
|
50
|
+
},
|
|
47
51
|
"./moving-lead-model": {
|
|
48
52
|
"types": "./dist/moving-lead-model/index.d.ts",
|
|
49
53
|
"default": "./dist/moving-lead-model/index.js"
|