@c1m-public/channel-client 0.32.0 → 0.35.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 +6 -0
- package/dist/{chunk-KCYSLD37.js → chunk-HVMDHL3V.js} +1 -1
- package/dist/{chunk-EDG3ZGPF.js → chunk-NJ4HX7ID.js} +1 -1
- package/dist/{chunk-LBOYLZ4J.js → chunk-SMEO3KMT.js} +27 -14
- 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 +12 -4
- package/dist/index.js +1 -1
- package/dist/next.d.ts +9 -1
- package/dist/next.js +2 -2
- package/dist/site.d.ts +1 -1
- package/dist/{types-B1EaOZ2f.d.ts → types-CEoHH8eN.d.ts} +67 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,6 +24,12 @@ transport core.
|
|
|
24
24
|
- `@c1m-public/channel-client/moving-lead-model` — the moving-quote domain
|
|
25
25
|
model shared by dash sites and SaaSDash; no transport, optional `zod` peer.
|
|
26
26
|
|
|
27
|
+
The Dash channel client exposes `dash.movingQuotes.create` for typed quote
|
|
28
|
+
capture and `dash.movingAddresses.lookup`, `.resolve`, and `.distance` for
|
|
29
|
+
server-side address assistance. These methods require a Dash-scoped channel
|
|
30
|
+
credential and are intended for server actions or route handlers, never a
|
|
31
|
+
browser bundle.
|
|
32
|
+
|
|
27
33
|
Channel credentials resolve the tenant and scope at the API door (plus the
|
|
28
34
|
workspace for workspace-scoped channels), so site URLs never carry those
|
|
29
35
|
identifiers.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-SMEO3KMT.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
|
@@ -334,6 +334,19 @@ function createChannelClient(options) {
|
|
|
334
334
|
"channel.dash.lead_portal.my_quotes",
|
|
335
335
|
appendQuery("/dash/lead-portal/my-quotes", { token: token2 })
|
|
336
336
|
)
|
|
337
|
+
},
|
|
338
|
+
movingQuotes: {
|
|
339
|
+
create: (input, mutation) => request("channel.dash.quote_requests.moving.capture", "/dash/quote-requests/moving", {
|
|
340
|
+
method: "POST",
|
|
341
|
+
headers: mutationHeaders(mutation),
|
|
342
|
+
body: JSON.stringify(input),
|
|
343
|
+
cache: "no-store"
|
|
344
|
+
})
|
|
345
|
+
},
|
|
346
|
+
movingAddresses: {
|
|
347
|
+
lookup: (query) => request("channel.dash.addresses.lookup", appendQuery("/dash/addresses/lookup", { q: required(query, "address query") }), { cache: "no-store" }),
|
|
348
|
+
resolve: (udprn) => request("channel.dash.addresses.resolve", appendQuery("/dash/addresses/resolve", { udprn }), { cache: "no-store" }),
|
|
349
|
+
distance: (fromLat, fromLng, toLat, toLng) => request("channel.dash.addresses.distance", appendQuery("/dash/addresses/distance", { fromLat, fromLng, toLat, toLng }), { cache: "no-store" })
|
|
337
350
|
}
|
|
338
351
|
},
|
|
339
352
|
assetUrl: (pathOrUrl) => new URL(required(pathOrUrl, "asset URL"), `${baseUrl}/`).toString(),
|
|
@@ -345,13 +358,13 @@ function createChannelClient(options) {
|
|
|
345
358
|
light: () => request("channel.init.light", "/init/light")
|
|
346
359
|
},
|
|
347
360
|
pages: {
|
|
348
|
-
list: (params = {}) => request("
|
|
349
|
-
get: (slug) => request("
|
|
361
|
+
list: (params = {}) => request("channel.pages.list", appendQuery("/pages", params)),
|
|
362
|
+
get: (slug) => request("channel.pages.get", `/pages/${encodePath(slug)}`)
|
|
350
363
|
},
|
|
351
364
|
products: {
|
|
352
|
-
list: (params = {}) => request("
|
|
353
|
-
get: (slug) => request("
|
|
354
|
-
media: (slug) => request("
|
|
365
|
+
list: (params = {}) => request("channel.catalog.products.list", appendQuery("/products", params)),
|
|
366
|
+
get: (slug) => request("channel.catalog.products.get", `/products/${encodePath(slug)}`),
|
|
367
|
+
media: (slug) => request("channel.catalog.products.media", `/products/${encodePath(slug)}/media`)
|
|
355
368
|
},
|
|
356
369
|
categories: {
|
|
357
370
|
list: (params = {}) => request("channel.catalog.categories.list", appendQuery("/categories", params)),
|
|
@@ -359,7 +372,7 @@ function createChannelClient(options) {
|
|
|
359
372
|
},
|
|
360
373
|
collections: {
|
|
361
374
|
list: (params = {}) => request("channel.catalog.collections.list", appendQuery("/collections", params)),
|
|
362
|
-
get: (slug) => request("
|
|
375
|
+
get: (slug) => request("channel.catalog.collections.get", `/collections/by-slug/${encodePath(slug)}`),
|
|
363
376
|
products: (slug) => request("channel.catalog.collections.products", `/collections/by-slug/${encodePath(slug)}/products`)
|
|
364
377
|
},
|
|
365
378
|
brands: {
|
|
@@ -431,9 +444,9 @@ function createChannelClient(options) {
|
|
|
431
444
|
})
|
|
432
445
|
},
|
|
433
446
|
reviews: {
|
|
434
|
-
list: (params = {}) => request("reviews.
|
|
435
|
-
summary: () => request("reviews.
|
|
436
|
-
submit: (input, mutation) => request("reviews.
|
|
447
|
+
list: (params = {}) => request("channel.reviews.list", appendQuery("/reviews", params)),
|
|
448
|
+
summary: () => request("channel.reviews.summary", "/reviews/summary"),
|
|
449
|
+
submit: (input, mutation) => request("channel.reviews.submit", "/reviews", {
|
|
437
450
|
method: "POST",
|
|
438
451
|
headers: mutationHeaders(mutation),
|
|
439
452
|
body: JSON.stringify(input)
|
|
@@ -473,17 +486,17 @@ function createChannelClient(options) {
|
|
|
473
486
|
},
|
|
474
487
|
paymentLinks: {
|
|
475
488
|
get: (linkId) => request(
|
|
476
|
-
"
|
|
489
|
+
"channel.payment_links.get",
|
|
477
490
|
`/payment-links/${encodePath(linkId)}`
|
|
478
491
|
),
|
|
479
492
|
checkout: (linkId, input, mutation) => request(
|
|
480
|
-
"
|
|
493
|
+
"channel.payment_links.checkout",
|
|
481
494
|
`/payment-links/${encodePath(linkId)}/checkout`,
|
|
482
495
|
{ method: "POST", headers: mutationHeaders(mutation), body: JSON.stringify(input) }
|
|
483
496
|
),
|
|
484
497
|
redemptions: {
|
|
485
498
|
get: (linkId, redemptionId) => request(
|
|
486
|
-
"
|
|
499
|
+
"channel.payment_links.redemptions.get",
|
|
487
500
|
`/payment-links/${encodePath(linkId)}/redemptions/${encodePath(redemptionId)}`
|
|
488
501
|
)
|
|
489
502
|
}
|
|
@@ -511,7 +524,7 @@ function createChannelClient(options) {
|
|
|
511
524
|
}
|
|
512
525
|
},
|
|
513
526
|
dining: {
|
|
514
|
-
menu: (boardSlug) => request("menu.
|
|
527
|
+
menu: (boardSlug) => request("channel.menu.boards.menu", `/menu/boards/${encodePath(boardSlug)}/menu`)
|
|
515
528
|
},
|
|
516
529
|
// Customer sign-in. These are anonymous calls — they CREATE a session.
|
|
517
530
|
auth: {
|
|
@@ -635,7 +648,7 @@ function createChannelClient(options) {
|
|
|
635
648
|
};
|
|
636
649
|
},
|
|
637
650
|
leads: {
|
|
638
|
-
create: (input, mutation) => request("
|
|
651
|
+
create: (input, mutation) => request("channel.leads.capture", "/leads", {
|
|
639
652
|
method: "POST",
|
|
640
653
|
headers: mutationHeaders(mutation),
|
|
641
654
|
body: JSON.stringify(input)
|
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-NJ4HX7ID.js';
|
|
2
|
+
import { narrow } from './chunk-HVMDHL3V.js';
|
|
3
|
+
import './chunk-SMEO3KMT.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-HVMDHL3V.js';
|
|
2
|
+
import './chunk-SMEO3KMT.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 WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument,
|
|
2
|
-
export {
|
|
1
|
+
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, y as DashMovingQuoteInput, z as DashMovingQuoteReceipt, B as DashMovingAddressList, E as DashMovingAddress, F as DashMovingDistance, S as SiteDocument, G as PublicWorkspaceInit, H as LightInitResponse, I as PublicPageSummary, J as PublicPage, K as Product, M as ProductAsset, N as CatalogCategory, Q as CatalogProductsResponse, R as CatalogCollection, T as CatalogBrand, U as CartLookupResponse, A as AddCartItemInput, C as CartResponse, V as UpdateCartItemInput, X 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, Y as Review, Z as ReviewSummaryResponse, _ as PublicSubmitReviewInput, $ as ThemeResponse, a0 as MenuResponse, a1 as BlogPost, a2 as BlogPostResponse, a3 as GivingEntry, a4 as StartGivingInput, a5 as StartGivingResponse, a6 as SubscriptionPlanListResponse, a7 as SubscriptionPlanResponse, a8 as PublicPaymentLinkResponse, a9 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 SavedPaymentMethod, au as PaymentMethodSetupInput, av as PaymentMethodSetupResult, aw as PaymentMethodConfirmInput, ax as PaymentMethodMutationResponse, ay as StartSubscriptionInput, az as SubscriptionAgreementResponse, aA as SubscriptionListResponse, aB as SubscriptionSourceResponse, aC as SubscriptionInvoiceListResponse, aD as SubscriptionInvoiceResponse, aE as GivingIntentListResponse, aF as LeadResponse } from './types-CEoHH8eN.js';
|
|
2
|
+
export { aG as CatalogProduct, aH as CheckoutAddress, aI as CheckoutStatus, aJ as Customer, aK as CustomerSecurityActivity, aL as DashBrandingInfo, aM as DashDirectoryProfile, aN as DashLeadPortalMatch, aO as DashLeadPortalMovingSummary, aP as DashLeadPortalRequest, aQ as DashLeadPortalRequestStatus, aR as DashLocaleInfo, aS as DashPlan, aT as DashPlanPricing, aU as DashPlanRegion, aV as DashPublicPage, aW as DashPublicProfileInfo, aX as DashTenantInfo, aY as DiningAvailability, aZ as DiningAvailabilityRule, a_ as DiningComboChoice, a$ as DiningComboGroup, b0 as DiningItemSize, b1 as DiningMenuItem, b2 as DiningModifier, b3 as DiningModifierGroup, b4 as DiningOffer, b5 as DiningOfferBadge, b6 as GivingIntent, b7 as Menu, b8 as MenuItem, b9 as OrderItem, ba as PaymentLinkRedemptionStatus, bb as PaymentMethodOption, bc as PaymentReadiness, bd as PrintBranding, be as PrintIntakeLimits, bf as PrintJobFile, bg as PrintPaperSize, bh as PrintPerPagePricing, bi as PrintPriceBreakdown, bj as PrintPriceLine, bk as PrintPricing, bl as PrintPricingOption, bm as PublicGate, bn as PublicPaymentLink, bo as PublicSiteSignals, bp as ShippingMethodOption, bq as SiteGatedDocument, br as SiteRef, bs as SiteResolvedDocument, bt as SiteSubject, bu as SubscriptionAgreement, bv as SubscriptionInvoice, bw as SubscriptionPlanOffer, bx as SubscriptionSourceDisplay, by as WaitlistAttribution, bz as WorkspaceInfo } from './types-CEoHH8eN.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
|
/**
|
|
@@ -58,7 +58,7 @@ interface ChannelVisitor {
|
|
|
58
58
|
userAgent?: string;
|
|
59
59
|
}
|
|
60
60
|
type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
|
|
61
|
-
type ChannelOperation = "channel.ping" | "channel.geo.detect" | "channel.site.resolve" | "channel.init.get" | "channel.init.light" | "
|
|
61
|
+
type ChannelOperation = "channel.ping" | "channel.geo.detect" | "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.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.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.orders.list" | "channel.account.orders.summary" | "channel.account.orders.get" | "channel.account.payment_methods.list" | "channel.account.payment_methods.setup" | "channel.account.payment_methods.confirm" | "channel.account.payment_methods.default" | "channel.account.payment_methods.delete" | "channel.account.subscriptions.list" | "channel.account.subscriptions.get" | "channel.account.subscriptions.source" | "channel.account.subscriptions.cancel" | "channel.account.subscriptions.pause" | "channel.account.subscriptions.resume" | "channel.account.subscriptions.invoices.list" | "channel.account.subscriptions.invoices.get" | "channel.account.subscriptions.invoices.pay_now" | "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.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";
|
|
62
62
|
interface ChannelRequestObservation {
|
|
63
63
|
operation: ChannelOperation;
|
|
64
64
|
method: string;
|
|
@@ -175,6 +175,14 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
175
175
|
readonly requestLink: (input: DashLeadPortalRequestLinkInput) => Promise<DashLeadPortalRequestLinkResponse>;
|
|
176
176
|
readonly view: (token: string) => Promise<DashLeadPortalView>;
|
|
177
177
|
};
|
|
178
|
+
readonly movingQuotes: {
|
|
179
|
+
readonly create: (input: DashMovingQuoteInput, mutation?: ChannelMutationOptions) => Promise<DashMovingQuoteReceipt>;
|
|
180
|
+
};
|
|
181
|
+
readonly movingAddresses: {
|
|
182
|
+
readonly lookup: (query: string) => Promise<DashMovingAddressList>;
|
|
183
|
+
readonly resolve: (udprn: number) => Promise<DashMovingAddress>;
|
|
184
|
+
readonly distance: (fromLat: number, fromLng: number, toLat: number, toLng: number) => Promise<DashMovingDistance>;
|
|
185
|
+
};
|
|
178
186
|
};
|
|
179
187
|
readonly assetUrl: (pathOrUrl: string) => string;
|
|
180
188
|
readonly site: {
|
|
@@ -385,4 +393,4 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
385
393
|
};
|
|
386
394
|
};
|
|
387
395
|
|
|
388
|
-
export { AddCartItemInput, BlogPost, BlogPostResponse, CartLookupResponse, CartResponse, CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, CheckoutAddressesInput, CheckoutCancelInput, CheckoutCustomerInput, CheckoutFulfillmentInput, CheckoutOptions, CheckoutPayInput, CheckoutPayResponse, CheckoutStatusResponse, type CreateChannelClientOptions, CustomerAuthSession, CustomerResponse, CustomerSecurityActivityPage, CustomerSession, CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, DashDirectoryEntry, type DashDirectoryListParams, DashDirectoryProfileResponse, DashDirectoryRegion, DashInitResponse, DashLead, DashLeadPortalRequestLinkInput, DashLeadPortalRequestLinkResponse, DashLeadPortalView, DashPlansResponse, DashProfileResponse, DiningMenu, GivingEntry, GivingIntentListResponse, LeadResponse, LightInitResponse, ListResponse, MenuResponse, MergeCartInput, Order, OrderSummary, PaymentCollectionAvailability, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PaymentMethodConfirmInput, PaymentMethodMutationResponse, PaymentMethodSetupInput, PaymentMethodSetupResult, PrintIntakeInput, PrintJob, PrintOptionsSelection, PrintQuoteResponse, PrintSettingsResponse, Product, ProductAsset, PublicPage, PublicPageSummary, PublicPaymentLinkResponse, PublicSubmitReviewInput, PublicWorkspaceInit, Review, ReviewSummaryResponse, SavedAddress, SavedAddressInput, SavedAddressResponse, SavedAddressUpdateInput, SavedPaymentMethod, SendCodeResponse, SiteDocument, StartGivingInput, StartGivingResponse, StartSubscriptionInput, SubscriptionAgreementResponse, SubscriptionInvoiceListResponse, SubscriptionInvoiceResponse, SubscriptionListResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, SubscriptionSourceResponse, ThemeResponse, UpdateCartItemInput, WaitlistAcknowledgement, WaitlistFormSettings, WaitlistGateStatus, WaitlistSubmission, WaitlistUnsubscription, WaitlistVerification, createChannelClient, isChannelAPIError, isChannelConfigurationError };
|
|
396
|
+
export { AddCartItemInput, BlogPost, BlogPostResponse, CartLookupResponse, CartResponse, CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, CheckoutAddressesInput, CheckoutCancelInput, CheckoutCustomerInput, CheckoutFulfillmentInput, CheckoutOptions, CheckoutPayInput, CheckoutPayResponse, CheckoutStatusResponse, 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, GivingEntry, GivingIntentListResponse, LeadResponse, LightInitResponse, ListResponse, MenuResponse, MergeCartInput, Order, OrderSummary, PaymentCollectionAvailability, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PaymentMethodConfirmInput, PaymentMethodMutationResponse, PaymentMethodSetupInput, PaymentMethodSetupResult, PrintIntakeInput, PrintJob, PrintOptionsSelection, PrintQuoteResponse, PrintSettingsResponse, Product, ProductAsset, PublicPage, PublicPageSummary, PublicPaymentLinkResponse, PublicSubmitReviewInput, PublicWorkspaceInit, Review, ReviewSummaryResponse, SavedAddress, SavedAddressInput, SavedAddressResponse, SavedAddressUpdateInput, SavedPaymentMethod, SendCodeResponse, SiteDocument, StartGivingInput, StartGivingResponse, StartSubscriptionInput, SubscriptionAgreementResponse, SubscriptionInvoiceListResponse, SubscriptionInvoiceResponse, SubscriptionListResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, SubscriptionSourceResponse, ThemeResponse, UpdateCartItemInput, WaitlistAcknowledgement, WaitlistFormSettings, WaitlistGateStatus, WaitlistSubmission, WaitlistUnsubscription, WaitlistVerification, createChannelClient, isChannelAPIError, isChannelConfigurationError };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-
|
|
1
|
+
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-SMEO3KMT.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, ChannelSubscriptionListParams, ChannelSubscriptionCancelParams, ChannelInvoiceListParams } 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 WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument,
|
|
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, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, y as DashMovingQuoteInput, z as DashMovingQuoteReceipt, B as DashMovingAddressList, E as DashMovingAddress, F as DashMovingDistance, S as SiteDocument, G as PublicWorkspaceInit, H as LightInitResponse, I as PublicPageSummary, J as PublicPage, K as Product, M as ProductAsset, N as CatalogCategory, Q as CatalogProductsResponse, R as CatalogCollection, T as CatalogBrand, U as CartLookupResponse, V as UpdateCartItemInput, X as MergeCartInput, Y as Review, Z as ReviewSummaryResponse, _ as PublicSubmitReviewInput, $ as ThemeResponse, a0 as MenuResponse, a1 as BlogPost, a2 as BlogPostResponse, a3 as GivingEntry, a4 as StartGivingInput, a5 as StartGivingResponse, a6 as SubscriptionPlanListResponse, a7 as SubscriptionPlanResponse, a8 as PublicPaymentLinkResponse, a9 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 SavedPaymentMethod, au as PaymentMethodSetupInput, av as PaymentMethodSetupResult, aw as PaymentMethodConfirmInput, ax as PaymentMethodMutationResponse, ay as StartSubscriptionInput, az as SubscriptionAgreementResponse, aA as SubscriptionListResponse, aB as SubscriptionSourceResponse, aC as SubscriptionInvoiceListResponse, aD as SubscriptionInvoiceResponse, aE as GivingIntentListResponse, aF as LeadResponse } from './types-CEoHH8eN.js';
|
|
3
3
|
import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -317,6 +317,14 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
|
|
|
317
317
|
readonly requestLink: (input: DashLeadPortalRequestLinkInput) => Promise<DashLeadPortalRequestLinkResponse>;
|
|
318
318
|
readonly view: (token: string) => Promise<DashLeadPortalView>;
|
|
319
319
|
};
|
|
320
|
+
readonly movingQuotes: {
|
|
321
|
+
readonly create: (input: DashMovingQuoteInput, mutation?: ChannelMutationOptions) => Promise<DashMovingQuoteReceipt>;
|
|
322
|
+
};
|
|
323
|
+
readonly movingAddresses: {
|
|
324
|
+
readonly lookup: (query: string) => Promise<DashMovingAddressList>;
|
|
325
|
+
readonly resolve: (udprn: number) => Promise<DashMovingAddress>;
|
|
326
|
+
readonly distance: (fromLat: number, fromLng: number, toLat: number, toLng: number) => Promise<DashMovingDistance>;
|
|
327
|
+
};
|
|
320
328
|
};
|
|
321
329
|
readonly assetUrl: (pathOrUrl: string) => string;
|
|
322
330
|
readonly site: {
|
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-NJ4HX7ID.js';
|
|
2
|
+
import './chunk-SMEO3KMT.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/site.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { br as SiteRef, bm as PublicGate, bo as PublicSiteSignals } from './types-CEoHH8eN.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Site signals: what a public site serves, decided from the `signals` block
|
|
@@ -317,6 +317,67 @@ interface DashLeadPortalRequestLinkResponse {
|
|
|
317
317
|
ok: boolean;
|
|
318
318
|
message: string;
|
|
319
319
|
}
|
|
320
|
+
interface DashMovingQuoteInput {
|
|
321
|
+
name: string;
|
|
322
|
+
email: string;
|
|
323
|
+
phone: string;
|
|
324
|
+
from_address: string;
|
|
325
|
+
to_address: string;
|
|
326
|
+
from_postcode: string;
|
|
327
|
+
to_postcode: string;
|
|
328
|
+
move_date: string;
|
|
329
|
+
flexible_date: boolean;
|
|
330
|
+
property_size: string;
|
|
331
|
+
floor_from: number;
|
|
332
|
+
floor_to: number;
|
|
333
|
+
has_lift_from: boolean;
|
|
334
|
+
has_lift_to: boolean;
|
|
335
|
+
packing_required: boolean;
|
|
336
|
+
storage_required: boolean;
|
|
337
|
+
dismantling_required: boolean;
|
|
338
|
+
special_items: string[];
|
|
339
|
+
additional_notes: string;
|
|
340
|
+
distance_miles?: number | null;
|
|
341
|
+
duration_minutes?: number | null;
|
|
342
|
+
}
|
|
343
|
+
interface DashMovingQuoteReceipt {
|
|
344
|
+
reference: string;
|
|
345
|
+
status: string;
|
|
346
|
+
}
|
|
347
|
+
interface DashMovingAddress {
|
|
348
|
+
display: string;
|
|
349
|
+
_udprn?: number;
|
|
350
|
+
address?: {
|
|
351
|
+
line_1: string;
|
|
352
|
+
line_2: string;
|
|
353
|
+
line_3: string;
|
|
354
|
+
post_town: string;
|
|
355
|
+
county: string;
|
|
356
|
+
country: string;
|
|
357
|
+
postcode: string;
|
|
358
|
+
latitude: number;
|
|
359
|
+
longitude: number;
|
|
360
|
+
udprn: number;
|
|
361
|
+
};
|
|
362
|
+
normalized?: {
|
|
363
|
+
address_line1: string;
|
|
364
|
+
address_line2: string;
|
|
365
|
+
city: string;
|
|
366
|
+
state_region: string;
|
|
367
|
+
postal_code: string;
|
|
368
|
+
country_code: string;
|
|
369
|
+
latitude: number;
|
|
370
|
+
longitude: number;
|
|
371
|
+
udprn: number;
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
interface DashMovingAddressList {
|
|
375
|
+
results: DashMovingAddress[];
|
|
376
|
+
}
|
|
377
|
+
interface DashMovingDistance {
|
|
378
|
+
distanceMiles: number;
|
|
379
|
+
durationMinutes: number;
|
|
380
|
+
}
|
|
320
381
|
interface DashLead {
|
|
321
382
|
id: string;
|
|
322
383
|
owner_scope?: string;
|
|
@@ -496,9 +557,10 @@ interface ReviewSummaryResponse {
|
|
|
496
557
|
}
|
|
497
558
|
interface LeadResponse {
|
|
498
559
|
id: string;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
560
|
+
/** Omitted when empty: a capture can be email-only or phone-only. */
|
|
561
|
+
workspace_id?: string;
|
|
562
|
+
name?: string;
|
|
563
|
+
email?: string;
|
|
502
564
|
phone?: string;
|
|
503
565
|
message?: string;
|
|
504
566
|
source: string;
|
|
@@ -771,6 +833,7 @@ interface SubscriptionSourceResponse {
|
|
|
771
833
|
source_display: SubscriptionSourceDisplay;
|
|
772
834
|
}
|
|
773
835
|
interface StartGivingInput {
|
|
836
|
+
entry_id?: string;
|
|
774
837
|
variant?: string;
|
|
775
838
|
title?: string;
|
|
776
839
|
description?: string;
|
|
@@ -1353,4 +1416,4 @@ interface StartSubscriptionInput {
|
|
|
1353
1416
|
plan_id: string;
|
|
1354
1417
|
}
|
|
1355
1418
|
|
|
1356
|
-
export type {
|
|
1419
|
+
export type { ThemeResponse as $, AddCartItemInput as A, DashMovingAddressList as B, CartResponse as C, DashProfileResponse as D, DashMovingAddress as E, DashMovingDistance as F, PublicWorkspaceInit as G, LightInitResponse as H, PublicPageSummary as I, PublicPage as J, Product as K, ListResponse as L, ProductAsset as M, CatalogCategory as N, Order as O, PaymentCollectionAvailability as P, CatalogProductsResponse as Q, CatalogCollection as R, SiteDocument as S, CatalogBrand as T, CartLookupResponse as U, UpdateCartItemInput as V, WaitlistVerification as W, MergeCartInput as X, Review as Y, ReviewSummaryResponse as Z, PublicSubmitReviewInput as _, CheckoutOptions as a, DiningComboGroup as a$, MenuResponse as a0, BlogPost as a1, BlogPostResponse as a2, GivingEntry as a3, StartGivingInput as a4, StartGivingResponse as a5, SubscriptionPlanListResponse as a6, SubscriptionPlanResponse as a7, PublicPaymentLinkResponse as a8, PaymentLinkCheckoutInput as a9, SubscriptionListResponse as aA, SubscriptionSourceResponse as aB, SubscriptionInvoiceListResponse as aC, SubscriptionInvoiceResponse as aD, GivingIntentListResponse as aE, LeadResponse as aF, CatalogProduct as aG, CheckoutAddress as aH, CheckoutStatus as aI, Customer as aJ, CustomerSecurityActivity as aK, DashBrandingInfo as aL, DashDirectoryProfile as aM, DashLeadPortalMatch as aN, DashLeadPortalMovingSummary as aO, DashLeadPortalRequest as aP, DashLeadPortalRequestStatus as aQ, DashLocaleInfo as aR, DashPlan as aS, DashPlanPricing as aT, DashPlanRegion as aU, DashPublicPage as aV, DashPublicProfileInfo as aW, DashTenantInfo as aX, DiningAvailability as aY, DiningAvailabilityRule as aZ, DiningComboChoice as a_, 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, SavedPaymentMethod as at, PaymentMethodSetupInput as au, PaymentMethodSetupResult as av, PaymentMethodConfirmInput as aw, PaymentMethodMutationResponse as ax, StartSubscriptionInput as ay, SubscriptionAgreementResponse as az, CheckoutStatusResponse as b, DiningItemSize as b0, DiningMenuItem as b1, DiningModifier as b2, DiningModifierGroup as b3, DiningOffer as b4, DiningOfferBadge as b5, GivingIntent as b6, Menu as b7, MenuItem as b8, OrderItem as b9, PaymentLinkRedemptionStatus as ba, PaymentMethodOption as bb, PaymentReadiness as bc, PrintBranding as bd, PrintIntakeLimits as be, PrintJobFile as bf, PrintPaperSize as bg, PrintPerPagePricing as bh, PrintPriceBreakdown as bi, PrintPriceLine as bj, PrintPricing as bk, PrintPricingOption as bl, PublicGate as bm, PublicPaymentLink as bn, PublicSiteSignals as bo, ShippingMethodOption as bp, SiteGatedDocument as bq, SiteRef as br, SiteResolvedDocument as bs, SiteSubject as bt, SubscriptionAgreement as bu, SubscriptionInvoice as bv, SubscriptionPlanOffer as bw, SubscriptionSourceDisplay as bx, WaitlistAttribution as by, WorkspaceInfo as bz, CheckoutCustomerInput as c, CheckoutAddressesInput as d, CheckoutFulfillmentInput as e, CheckoutPayInput as f, CheckoutPayResponse as g, CheckoutCancelInput as h, ChannelPing as i, ChannelGeo as j, WaitlistUnsubscription as k, DashInitResponse as l, WaitlistGateStatus as m, WaitlistFormSettings as n, WaitlistSubmission as o, WaitlistAcknowledgement as p, DashPlansResponse as q, DashDirectoryRegion as r, DashDirectoryEntry as s, DashDirectoryProfileResponse as t, DashLead as u, DashLeadPortalRequestLinkInput as v, DashLeadPortalRequestLinkResponse as w, DashLeadPortalView as x, DashMovingQuoteInput as y, DashMovingQuoteReceipt as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c1m-public/channel-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Typed server-side client for the MML headless Channel API",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"typescript": "5.9.3",
|
|
76
76
|
"vitest": "^4.1.4",
|
|
77
77
|
"zod": "^4.3.6",
|
|
78
|
-
"@c1m-public/
|
|
79
|
-
"@c1m-public/
|
|
78
|
+
"@c1m-public/transport": "0.0.0",
|
|
79
|
+
"@c1m-public/resilience": "0.1.0"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|