@c1m-public/channel-client 0.24.0 → 0.27.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.
@@ -1,4 +1,4 @@
1
- import { ChannelConfigurationError } from './chunk-P3HX34X7.js';
1
+ import { ChannelConfigurationError } from './chunk-XPO7C3DW.js';
2
2
  import 'server-only';
3
3
 
4
4
  // ../resilience/src/index.ts
@@ -278,6 +278,15 @@ function createChannelClient(options) {
278
278
  dash: {
279
279
  profile: () => request("channel.dash.profile", "/dash/profile"),
280
280
  init: () => request("channel.dash.init", "/dash/init"),
281
+ waitlist: {
282
+ status: () => request("channel.dash.waitlist.status", "/dash/waitlist", { cache: "no-store" }),
283
+ form: () => request("channel.dash.waitlist.form", "/dash/waitlist/form", { cache: "no-store" }),
284
+ submit: (input, mutation) => request("channel.dash.waitlist.submit", "/dash/waitlist/entries", {
285
+ method: "POST",
286
+ headers: mutationHeaders(mutation),
287
+ body: JSON.stringify(input)
288
+ })
289
+ },
281
290
  plans: () => request("channel.dash.plans", "/dash/plans"),
282
291
  directory: {
283
292
  regions: () => request("channel.dash.directory.regions", "/dash/directory/regions"),
@@ -366,9 +375,7 @@ function createChannelClient(options) {
366
375
  },
367
376
  // Checkout is addressed by the ORDER the cart became: the server mounts
368
377
  // /checkout/{order_id}/... (the cart is an orders row, and every cart call
369
- // returns its order.id). 0.5.0 shipped these without the order_id segment,
370
- // so every checkout call 404'd — the signature change is safe because the
371
- // old shape never worked.
378
+ // returns its order.id).
372
379
  checkout: {
373
380
  options: (orderId, cartToken) => request("channel.checkout.options", appendQuery(`/checkout/${encodePath(orderId)}/options`, {
374
381
  cart_token: required(cartToken, "cartToken")
@@ -396,6 +403,11 @@ function createChannelClient(options) {
396
403
  method: "POST",
397
404
  headers: mutationHeaders(mutation),
398
405
  body: JSON.stringify(input)
406
+ }),
407
+ cancel: (orderId, input, mutation) => request("channel.checkout.cancel", `/checkout/${encodePath(orderId)}/cancel`, {
408
+ method: "POST",
409
+ headers: mutationHeaders(mutation),
410
+ body: JSON.stringify(input)
399
411
  })
400
412
  },
401
413
  reviews: {
@@ -535,10 +547,10 @@ function createChannelClient(options) {
535
547
  method: "DELETE",
536
548
  headers: mutationHeaders(mutation)
537
549
  }, customerSession),
538
- setDefault: (addressId, kind, mutation) => request("channel.account.addresses.set_default", `/account/addresses/${encodePath(addressId)}/default`, {
550
+ setDefault: (addressId, mutation) => request("channel.account.addresses.set_default", `/account/addresses/${encodePath(addressId)}/default`, {
539
551
  method: "POST",
540
552
  headers: mutationHeaders(mutation),
541
- body: JSON.stringify({ kind })
553
+ body: JSON.stringify({ kind: "shipping" })
542
554
  }, customerSession)
543
555
  },
544
556
  paymentMethods: {
@@ -1,5 +1,5 @@
1
- import { isChannelAPIError, createChannelClient } from './chunk-LG43JMFW.js';
2
- import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-P3HX34X7.js';
1
+ import { isChannelAPIError, createChannelClient } from './chunk-E5J5UOPS.js';
2
+ import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
3
3
  import 'server-only';
4
4
 
5
5
  var MAX_AGE_SECONDS = 60 * 60 * 24 * 30;
@@ -286,7 +286,9 @@ function createCart(options) {
286
286
  * must be on the channel's registered site_url — the server refuses
287
287
  * anything else, because an unchecked return URL is an open redirect.
288
288
  */
289
- pay: (orderId, input, attempt) => resolve().checkout.pay(orderId, input, attempt)
289
+ pay: (orderId, input, attempt) => resolve().checkout.pay(orderId, input, attempt),
290
+ /** Expire the hosted provider session before returning the cart to editing. */
291
+ cancel: (orderId, input, attempt) => resolve().checkout.cancel(orderId, input, attempt)
290
292
  }
291
293
  };
292
294
  }
@@ -1,4 +1,4 @@
1
- import { createChannelClient } from './chunk-LG43JMFW.js';
1
+ import { createChannelClient } from './chunk-E5J5UOPS.js';
2
2
  import 'server-only';
3
3
 
4
4
  function narrow(client) {
@@ -10,7 +10,7 @@ function isChannelConfigurationError(error) {
10
10
  }
11
11
 
12
12
  // src/generated/webhook-events.ts
13
- var GENERATED_CHANNEL_WEBHOOK_EVENT_TYPES = ["order.created", "order.paid", "order.updated", "order.cancelled", "order.refunded", "lead.created", "review.submitted", "review.published", "page.published", "page.updated", "page.deleted", "menu.updated", "product.created", "product.updated", "product.deleted"];
13
+ var GENERATED_CHANNEL_WEBHOOK_EVENT_TYPES = ["order.created", "order.paid", "order.updated", "order.cancelled", "order.refunded", "fulfillment.shipped", "fulfillment.delivered", "lead.created", "review.submitted", "review.published", "page.published", "page.updated", "page.deleted", "menu.updated", "product.created", "product.updated", "product.deleted"];
14
14
 
15
15
  // src/webhooks.ts
16
16
  var CHANNEL_WEBHOOK_EVENT_TYPES = GENERATED_CHANNEL_WEBHOOK_EVENT_TYPES;
@@ -152,6 +152,9 @@ function isKnownEventData(type, value) {
152
152
  case "order.cancelled":
153
153
  case "order.refunded":
154
154
  return hasStrings(value, ["order_id", "order_number", "status", "payment_status", "currency", "created_at"]) && typeof value.total_cents === "number";
155
+ case "fulfillment.shipped":
156
+ case "fulfillment.delivered":
157
+ return hasStrings(value, ["fulfillment_id", "order_id", "status"]) && (value.tracking_number === void 0 || typeof value.tracking_number === "string") && (value.tracking_url === void 0 || typeof value.tracking_url === "string") && (value.carrier === void 0 || typeof value.carrier === "string") && (value.shipped_at === void 0 || typeof value.shipped_at === "string") && (value.delivered_at === void 0 || typeof value.delivered_at === "string");
155
158
  case "lead.created":
156
159
  return hasStrings(value, ["lead_id", "source", "created_at"]);
157
160
  case "review.submitted":
package/dist/dash-next.js CHANGED
@@ -1,7 +1,7 @@
1
- import { createNextChannelClient } from './chunk-6VQ4ZTZI.js';
2
- import { narrow } from './chunk-3K45GH6B.js';
3
- import './chunk-LG43JMFW.js';
4
- import './chunk-P3HX34X7.js';
1
+ import { createNextChannelClient } from './chunk-HOR5MOYI.js';
2
+ import { narrow } from './chunk-LRHQXWLD.js';
3
+ import './chunk-E5J5UOPS.js';
4
+ import './chunk-XPO7C3DW.js';
5
5
  import 'server-only';
6
6
 
7
7
  function createNextDashChannelClient(options) {
package/dist/dash.js CHANGED
@@ -1,3 +1,3 @@
1
- export { createDashChannelClient, narrow as narrowToDash } from './chunk-3K45GH6B.js';
2
- import './chunk-LG43JMFW.js';
3
- import './chunk-P3HX34X7.js';
1
+ export { createDashChannelClient, narrow as narrowToDash } from './chunk-LRHQXWLD.js';
2
+ import './chunk-E5J5UOPS.js';
3
+ import './chunk-XPO7C3DW.js';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- 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, LeadCreatedEventData, MenuUpdatedEventData, OrderEventData, PagePublishedEventData, ParseChannelWebhookEventOptions, ParsedChannelWebhookEvent, ProductEventData, ReviewPublishedEventData, ReviewSubmittedEventData, UnknownChannelWebhookEvent, VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './webhooks.js';
1
+ 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';
2
2
 
3
3
  interface ListResponse<T> {
4
4
  items: T[];
@@ -12,12 +12,31 @@ interface WorkspaceInfo {
12
12
  is_active: boolean;
13
13
  status?: string;
14
14
  }
15
+ /** Public availability only; never participant data or an access grant. */
16
+ interface WaitlistPublicStatus {
17
+ enabled: boolean;
18
+ accepting_entries: boolean;
19
+ display: "page" | "block";
20
+ }
21
+ interface WaitlistPublicFormResponse {
22
+ status: WaitlistPublicStatus;
23
+ collect_marketing_consent: boolean;
24
+ }
25
+ interface WaitlistSubmission {
26
+ email: string;
27
+ name?: string;
28
+ source?: string;
29
+ marketing_opt_in?: boolean;
30
+ }
31
+ interface WaitlistAcknowledgement {
32
+ accepted: boolean;
33
+ }
15
34
  interface PublicWorkspaceInit {
16
35
  workspace: WorkspaceInfo;
17
36
  branding?: Record<string, unknown>;
18
37
  preferences?: Record<string, unknown>;
19
38
  profile?: Record<string, unknown>;
20
- launch?: Record<string, unknown>;
39
+ waitlist?: WaitlistPublicStatus;
21
40
  features?: Array<{
22
41
  key: string;
23
42
  name: string;
@@ -50,6 +69,7 @@ interface SiteRef {
50
69
  * (`menus.get`) and theme (`theme.get`) stay separate, parallel reads.
51
70
  */
52
71
  interface LightInitResponse {
72
+ waitlist?: WaitlistPublicStatus;
53
73
  workspace_id: string;
54
74
  workspace_name: string;
55
75
  workspace_slug?: string;
@@ -106,6 +126,7 @@ interface DashLocaleInfo {
106
126
  * `dash.profile()` remains for the full profile page (gallery, about template).
107
127
  */
108
128
  interface DashInitResponse {
129
+ waitlist?: WaitlistPublicStatus;
109
130
  tenant: DashTenantInfo;
110
131
  public_profile: DashPublicProfileInfo;
111
132
  branding?: DashBrandingInfo;
@@ -566,7 +587,6 @@ interface GivingIntentListResponse {
566
587
  }
567
588
  interface SavedAddress {
568
589
  id: string;
569
- end_user_id: string;
570
590
  label: string;
571
591
  name: string;
572
592
  phone: string;
@@ -576,36 +596,29 @@ interface SavedAddress {
576
596
  region: string;
577
597
  postal_code: string;
578
598
  country_code: string;
579
- is_default_shipping: boolean;
580
- is_default_billing: boolean;
599
+ is_default: boolean;
581
600
  created_at: string;
582
601
  updated_at: string;
583
602
  }
584
603
  interface SavedAddressInput {
604
+ name: string;
585
605
  line1: string;
586
606
  city: string;
587
607
  country_code: string;
588
608
  label?: string;
589
- name?: string;
590
609
  phone?: string;
591
610
  line2?: string;
592
611
  region?: string;
593
612
  postal_code?: string;
594
- is_default_shipping?: boolean;
595
- is_default_billing?: boolean;
613
+ is_default?: boolean;
596
614
  }
597
615
  type SavedAddressUpdateInput = SavedAddressInput;
598
- type SavedAddressDefaultKind = "shipping" | "billing";
599
616
  interface SavedAddressResponse {
600
617
  address: SavedAddress;
601
618
  }
602
619
  interface SavedPaymentMethod {
603
620
  id: string;
604
- workspace_id: string;
605
- end_user_ref?: string;
606
621
  provider: string;
607
- provider_customer_id?: string;
608
- provider_payment_method_id: string;
609
622
  status: string;
610
623
  is_default: boolean;
611
624
  display_brand?: string;
@@ -617,6 +630,8 @@ interface SavedPaymentMethod {
617
630
  }
618
631
  interface PaymentMethodSetupInput {
619
632
  provider: string;
633
+ consent: boolean;
634
+ consent_version: "saved_payment_method_v1";
620
635
  }
621
636
  interface PaymentMethodSetupResult {
622
637
  type: string;
@@ -1196,6 +1211,9 @@ interface CheckoutPayInput {
1196
1211
  cart_token: string;
1197
1212
  return_url?: string;
1198
1213
  }
1214
+ interface CheckoutCancelInput {
1215
+ cart_token: string;
1216
+ }
1199
1217
  interface PaymentMethodOption {
1200
1218
  provider: string;
1201
1219
  name: string;
@@ -1221,6 +1239,7 @@ interface ShippingMethodOption {
1221
1239
  interface CheckoutOptions {
1222
1240
  checkout_variant: string;
1223
1241
  order: Order;
1242
+ checkout_active?: boolean;
1224
1243
  shipping_methods?: ShippingMethodOption[];
1225
1244
  payment_methods?: PaymentMethodOption[];
1226
1245
  payment_ready?: boolean;
@@ -1291,7 +1310,7 @@ interface StartSubscriptionInput {
1291
1310
  * malformed token, invalid retry/timeout/cache options, missing fetch, missing
1292
1311
  * webhook secret — as opposed to ChannelAPIError, which describes what the
1293
1312
  * network or the API did. Callers can branch on this without string-matching
1294
- * messages; both starters previously invented a local equivalent.
1313
+ * messages.
1295
1314
  */
1296
1315
  declare class ChannelConfigurationError extends Error {
1297
1316
  constructor(message: string);
@@ -1342,7 +1361,7 @@ interface ChannelVisitor {
1342
1361
  userAgent?: string;
1343
1362
  }
1344
1363
  type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
1345
- type ChannelOperation = "channel.ping" | "channel.geo.detect" | "channel.site.resolve" | "channel.init.get" | "channel.init.light" | "content.pages.public.list.channel" | "content.pages.public.get.channel" | "shop.public.products.list.channel" | "shop.public.products.get.channel" | "shop.public.products.media.channel" | "reviews.public.list.channel" | "reviews.public.summary.channel" | "reviews.public.submit.channel" | "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" | "monetization.payment_links.public_get.channel" | "monetization.payment_links.public_checkout.channel" | "monetization.payment_links.public_redemption_get.channel" | "channel.print.settings" | "channel.print.quote" | "channel.print.intake" | "menu.public.board_menu.channel" | "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" | "shop.public.collections.get.channel" | "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.dash.profile" | "channel.dash.init" | "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" | "growth.public_workspace.leads.capture.channel";
1364
+ type ChannelOperation = "channel.ping" | "channel.geo.detect" | "channel.site.resolve" | "channel.init.get" | "channel.init.light" | "content.pages.public.list.channel" | "content.pages.public.get.channel" | "shop.public.products.list.channel" | "shop.public.products.get.channel" | "shop.public.products.media.channel" | "reviews.public.list.channel" | "reviews.public.summary.channel" | "reviews.public.submit.channel" | "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" | "monetization.payment_links.public_get.channel" | "monetization.payment_links.public_checkout.channel" | "monetization.payment_links.public_redemption_get.channel" | "channel.print.settings" | "channel.print.quote" | "channel.print.intake" | "menu.public.board_menu.channel" | "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" | "shop.public.collections.get.channel" | "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" | "growth.public_workspace.leads.capture.channel";
1346
1365
  interface ChannelRequestObservation {
1347
1366
  operation: ChannelOperation;
1348
1367
  method: string;
@@ -1434,6 +1453,11 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
1434
1453
  readonly dash: {
1435
1454
  readonly profile: () => Promise<DashProfileResponse>;
1436
1455
  readonly init: () => Promise<DashInitResponse>;
1456
+ readonly waitlist: {
1457
+ readonly status: () => Promise<WaitlistPublicStatus>;
1458
+ readonly form: () => Promise<WaitlistPublicFormResponse>;
1459
+ readonly submit: (input: WaitlistSubmission, mutation?: ChannelMutationOptions) => Promise<WaitlistAcknowledgement>;
1460
+ };
1437
1461
  readonly plans: () => Promise<DashPlansResponse>;
1438
1462
  readonly directory: {
1439
1463
  readonly regions: () => Promise<ListResponse<DashDirectoryRegion>>;
@@ -1500,6 +1524,7 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
1500
1524
  readonly setAddresses: (orderId: string, input: CheckoutAddressesInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
1501
1525
  readonly setFulfillment: (orderId: string, input: CheckoutFulfillmentInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
1502
1526
  readonly pay: (orderId: string, input: CheckoutPayInput, mutation?: ChannelMutationOptions) => Promise<CheckoutPayResponse>;
1527
+ readonly cancel: (orderId: string, input: CheckoutCancelInput, mutation?: ChannelMutationOptions) => Promise<void>;
1503
1528
  };
1504
1529
  readonly reviews: {
1505
1530
  readonly list: (params?: ChannelListParams) => Promise<ListResponse<Review>>;
@@ -1623,7 +1648,7 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
1623
1648
  readonly delete: (addressId: string, mutation?: ChannelMutationOptions) => Promise<{
1624
1649
  status?: string;
1625
1650
  }>;
1626
- readonly setDefault: (addressId: string, kind: SavedAddressDefaultKind, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
1651
+ readonly setDefault: (addressId: string, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
1627
1652
  };
1628
1653
  readonly paymentMethods: {
1629
1654
  readonly list: () => Promise<ListResponse<SavedPaymentMethod>>;
@@ -1658,4 +1683,4 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
1658
1683
  };
1659
1684
  };
1660
1685
 
1661
- export { type AddCartItemInput, type BlogPost, type BlogPostResponse, type CartResponse, type CatalogBrand, type CatalogCategory, type CatalogCollection, type CatalogProduct, type CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, type ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, type ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, type CheckoutAddress, type CheckoutAddressesInput, type CheckoutCustomerInput, type CheckoutFulfillmentInput, type CheckoutOptions, type CheckoutPayInput, type CheckoutPayResponse, type CheckoutStatus, type CheckoutStatusResponse, type CreateChannelClientOptions, type Customer, type CustomerAuthSession, type CustomerResponse, type CustomerSecurityActivity, type CustomerSecurityActivityPage, type CustomerSession, type CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, type DashBrandingInfo, type DashDirectoryEntry, type DashDirectoryListParams, type DashDirectoryProfile, type DashDirectoryProfileResponse, type DashDirectoryRegion, type DashInitResponse, type DashLead, type DashLeadPortalMatch, type DashLeadPortalMovingSummary, type DashLeadPortalRequest, type DashLeadPortalRequestLinkInput, type DashLeadPortalRequestLinkResponse, type DashLeadPortalRequestStatus, type DashLeadPortalView, type DashLocaleInfo, type DashPlan, type DashPlanPricing, type DashPlanRegion, type DashPlansResponse, type DashProfileResponse, type DashPublicPage, type DashPublicProfileInfo, type DashTenantInfo, type DiningAvailability, type DiningAvailabilityRule, type DiningComboChoice, type DiningComboGroup, type DiningItemSize, type DiningMenu, type DiningMenuItem, type DiningModifier, type DiningModifierGroup, type DiningOffer, type DiningOfferBadge, type GivingEntry, type GivingIntent, type GivingIntentListResponse, type LeadResponse, type LightInitResponse, type ListResponse, type Menu, type MenuItem, type MenuResponse, type MergeCartInput, type Order, type OrderItem, type OrderSummary, type PaymentCollectionAvailability, type PaymentLinkCheckoutInput, type PaymentLinkCheckoutResponse, type PaymentLinkRedemptionStatus, type PaymentLinkRedemptionStatusResponse, type PaymentMethodConfirmInput, type PaymentMethodMutationResponse, type PaymentMethodOption, type PaymentMethodSetupInput, type PaymentMethodSetupResult, type PaymentReadiness, type PrintBranding, type PrintIntakeInput, type PrintIntakeLimits, type PrintJob, type PrintJobFile, type PrintOptionsSelection, type PrintPaperSize, type PrintPerPagePricing, type PrintPriceBreakdown, type PrintPriceLine, type PrintPricing, type PrintPricingOption, type PrintQuoteResponse, type PrintSettingsResponse, type Product, type ProductAsset, type PublicPage, type PublicPageSummary, type PublicPaymentLink, type PublicPaymentLinkResponse, type PublicSubmitReviewInput, type PublicWorkspaceInit, type Review, type ReviewSummaryResponse, type SavedAddress, type SavedAddressDefaultKind, type SavedAddressInput, type SavedAddressResponse, type SavedAddressUpdateInput, type SavedPaymentMethod, type SendCodeResponse, type ShippingMethodOption, type SiteDocument, type SiteGatedDocument, type SiteRef, type SiteResolvedDocument, type SiteSubject, type StartGivingInput, type StartGivingResponse, type StartSubscriptionInput, type SubscriptionAgreement, type SubscriptionAgreementResponse, type SubscriptionInvoice, type SubscriptionInvoiceListResponse, type SubscriptionInvoiceResponse, type SubscriptionListResponse, type SubscriptionPlanListResponse, type SubscriptionPlanOffer, type SubscriptionPlanResponse, type SubscriptionSourceDisplay, type SubscriptionSourceResponse, type ThemeResponse, type UpdateCartItemInput, type WorkspaceInfo, createChannelClient, isChannelAPIError, isChannelConfigurationError };
1686
+ export { type AddCartItemInput, type BlogPost, type BlogPostResponse, type CartResponse, type CatalogBrand, type CatalogCategory, type CatalogCollection, type CatalogProduct, type CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, type ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, type ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, type CheckoutAddress, type CheckoutAddressesInput, type CheckoutCancelInput, type CheckoutCustomerInput, type CheckoutFulfillmentInput, type CheckoutOptions, type CheckoutPayInput, type CheckoutPayResponse, type CheckoutStatus, type CheckoutStatusResponse, type CreateChannelClientOptions, type Customer, type CustomerAuthSession, type CustomerResponse, type CustomerSecurityActivity, type CustomerSecurityActivityPage, type CustomerSession, type CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, type DashBrandingInfo, type DashDirectoryEntry, type DashDirectoryListParams, type DashDirectoryProfile, type DashDirectoryProfileResponse, type DashDirectoryRegion, type DashInitResponse, type DashLead, type DashLeadPortalMatch, type DashLeadPortalMovingSummary, type DashLeadPortalRequest, type DashLeadPortalRequestLinkInput, type DashLeadPortalRequestLinkResponse, type DashLeadPortalRequestStatus, type DashLeadPortalView, type DashLocaleInfo, type DashPlan, type DashPlanPricing, type DashPlanRegion, type DashPlansResponse, type DashProfileResponse, type DashPublicPage, type DashPublicProfileInfo, type DashTenantInfo, type DiningAvailability, type DiningAvailabilityRule, type DiningComboChoice, type DiningComboGroup, type DiningItemSize, type DiningMenu, type DiningMenuItem, type DiningModifier, type DiningModifierGroup, type DiningOffer, type DiningOfferBadge, type GivingEntry, type GivingIntent, type GivingIntentListResponse, type LeadResponse, type LightInitResponse, type ListResponse, type Menu, type MenuItem, type MenuResponse, type MergeCartInput, type Order, type OrderItem, type OrderSummary, type PaymentCollectionAvailability, type PaymentLinkCheckoutInput, type PaymentLinkCheckoutResponse, type PaymentLinkRedemptionStatus, type PaymentLinkRedemptionStatusResponse, type PaymentMethodConfirmInput, type PaymentMethodMutationResponse, type PaymentMethodOption, type PaymentMethodSetupInput, type PaymentMethodSetupResult, type PaymentReadiness, type PrintBranding, type PrintIntakeInput, type PrintIntakeLimits, type PrintJob, type PrintJobFile, type PrintOptionsSelection, type PrintPaperSize, type PrintPerPagePricing, type PrintPriceBreakdown, type PrintPriceLine, type PrintPricing, type PrintPricingOption, type PrintQuoteResponse, type PrintSettingsResponse, type Product, type ProductAsset, type PublicPage, type PublicPageSummary, type PublicPaymentLink, type PublicPaymentLinkResponse, type PublicSubmitReviewInput, type PublicWorkspaceInit, type Review, type ReviewSummaryResponse, type SavedAddress, type SavedAddressInput, type SavedAddressResponse, type SavedAddressUpdateInput, type SavedPaymentMethod, type SendCodeResponse, type ShippingMethodOption, type SiteDocument, type SiteGatedDocument, type SiteRef, type SiteResolvedDocument, type SiteSubject, type StartGivingInput, type StartGivingResponse, type StartSubscriptionInput, type SubscriptionAgreement, type SubscriptionAgreementResponse, type SubscriptionInvoice, type SubscriptionInvoiceListResponse, type SubscriptionInvoiceResponse, type SubscriptionListResponse, type SubscriptionPlanListResponse, type SubscriptionPlanOffer, type SubscriptionPlanResponse, type SubscriptionSourceDisplay, type SubscriptionSourceResponse, type ThemeResponse, type UpdateCartItemInput, type WaitlistAcknowledgement, type WaitlistPublicFormResponse, type WaitlistPublicStatus, type WaitlistSubmission, type WorkspaceInfo, createChannelClient, isChannelAPIError, isChannelConfigurationError };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-LG43JMFW.js';
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-P3HX34X7.js';
1
+ export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-E5J5UOPS.js';
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,12 +1,11 @@
1
- import { createChannelClient, Order, AddCartItemInput, CartResponse, CheckoutOptions, ChannelCheckoutStatusParams, CheckoutStatusResponse, CheckoutCustomerInput, CheckoutAddressesInput, CheckoutFulfillmentInput, CheckoutPayInput, ChannelMutationOptions, CheckoutPayResponse, CreateChannelClientOptions, ChannelPing, ChannelVisitor, ChannelGeo, PaymentCollectionAvailability, DashProfileResponse, DashInitResponse, DashPlansResponse, ListResponse, DashDirectoryRegion, DashDirectoryListParams, DashDirectoryEntry, DashDirectoryProfileResponse, ChannelLeadInput, DashLead, DashLeadPortalRequestLinkInput, DashLeadPortalRequestLinkResponse, DashLeadPortalView, ChannelSiteResolveParams, SiteDocument, PublicWorkspaceInit, LightInitResponse, ChannelListParams, PublicPageSummary, PublicPage, ChannelProductListParams, Product, ProductAsset, CatalogCategory, CatalogProductsResponse, CatalogCollection, CatalogBrand, UpdateCartItemInput, MergeCartInput, Review, ReviewSummaryResponse, PublicSubmitReviewInput, ThemeResponse, MenuResponse, BlogPost, BlogPostResponse, GivingEntry, StartGivingInput, StartGivingResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, PublicPaymentLinkResponse, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PrintSettingsResponse, PrintOptionsSelection, PrintQuoteResponse, PrintIntakeInput, PrintJob, DiningMenu, CustomerSignupResponse, SendCodeResponse, CustomerSession, CustomerResponse, CustomerAuthSession, CustomerSecurityActivityPage, OrderSummary, SavedAddress, SavedAddressResponse, SavedAddressInput, SavedAddressUpdateInput, SavedAddressDefaultKind, SavedPaymentMethod, PaymentMethodSetupInput, PaymentMethodSetupResult, PaymentMethodConfirmInput, PaymentMethodMutationResponse, StartSubscriptionInput, SubscriptionAgreementResponse, ChannelSubscriptionListParams, SubscriptionListResponse, SubscriptionSourceResponse, ChannelSubscriptionCancelParams, ChannelInvoiceListParams, SubscriptionInvoiceListResponse, SubscriptionInvoiceResponse, GivingIntentListResponse, LeadResponse } from './index.js';
1
+ import { createChannelClient, Order, AddCartItemInput, CartResponse, CheckoutOptions, ChannelCheckoutStatusParams, CheckoutStatusResponse, CheckoutCustomerInput, CheckoutAddressesInput, CheckoutFulfillmentInput, CheckoutPayInput, ChannelMutationOptions, CheckoutPayResponse, CheckoutCancelInput, CreateChannelClientOptions, ChannelPing, ChannelVisitor, ChannelGeo, PaymentCollectionAvailability, DashProfileResponse, DashInitResponse, WaitlistPublicStatus, WaitlistPublicFormResponse, WaitlistSubmission, WaitlistAcknowledgement, DashPlansResponse, ListResponse, DashDirectoryRegion, DashDirectoryListParams, DashDirectoryEntry, DashDirectoryProfileResponse, ChannelLeadInput, DashLead, DashLeadPortalRequestLinkInput, DashLeadPortalRequestLinkResponse, DashLeadPortalView, ChannelSiteResolveParams, SiteDocument, PublicWorkspaceInit, LightInitResponse, ChannelListParams, PublicPageSummary, PublicPage, ChannelProductListParams, Product, ProductAsset, CatalogCategory, CatalogProductsResponse, CatalogCollection, CatalogBrand, UpdateCartItemInput, MergeCartInput, Review, ReviewSummaryResponse, PublicSubmitReviewInput, ThemeResponse, MenuResponse, BlogPost, BlogPostResponse, GivingEntry, StartGivingInput, StartGivingResponse, SubscriptionPlanListResponse, SubscriptionPlanResponse, PublicPaymentLinkResponse, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PrintSettingsResponse, PrintOptionsSelection, PrintQuoteResponse, PrintIntakeInput, PrintJob, DiningMenu, CustomerSignupResponse, SendCodeResponse, CustomerSession, CustomerResponse, CustomerAuthSession, CustomerSecurityActivityPage, OrderSummary, SavedAddress, SavedAddressResponse, SavedAddressInput, SavedAddressUpdateInput, SavedPaymentMethod, PaymentMethodSetupInput, PaymentMethodSetupResult, PaymentMethodConfirmInput, PaymentMethodMutationResponse, StartSubscriptionInput, SubscriptionAgreementResponse, ChannelSubscriptionListParams, SubscriptionListResponse, SubscriptionSourceResponse, ChannelSubscriptionCancelParams, ChannelInvoiceListParams, SubscriptionInvoiceListResponse, SubscriptionInvoiceResponse, GivingIntentListResponse, LeadResponse } from './index.js';
2
2
  import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
3
3
 
4
4
  /**
5
5
  * Customer-session kit for Next.js sites.
6
6
  *
7
- * Every headless C1M site needs the same ~250 lines: an httpOnly cookie codec,
8
- * a refresh-skew decision, and — the part nobody gets right twice — the
9
- * contested-vs-expired distinction. This kit ships them once.
7
+ * An httpOnly cookie codec, a refresh-skew decision, and the
8
+ * contested-vs-expired distinction.
10
9
  *
11
10
  * Framework-honest: no `next` imports. The codec returns names, values and
12
11
  * attribute objects; the app applies them with `next/headers` or `NextResponse`
@@ -129,10 +128,8 @@ type CustomerSessionKit = ReturnType<typeof createCustomerSession>;
129
128
  * invalidate: { revalidatePath, revalidateTag },
130
129
  * });
131
130
  *
132
- * The invalidator is injected rather than imported here on purpose: it keeps
133
- * this module free of `next` (bundler-safe, unit-testable with a fake), and it
134
- * is the app's two-line import — not eighty lines of verification, dispatch,
135
- * path-safety and error-mapping boilerplate.
131
+ * The invalidator is injected rather than imported: it keeps this module free
132
+ * of `next` (bundler-safe, unit-testable with a fake).
136
133
  */
137
134
  /** The cache tag every anonymous site read is filed under. */
138
135
  declare const CHANNEL_SITE_CACHE_TAG = "channel:site";
@@ -246,6 +243,10 @@ declare function createCart(options: CreateCartOptions): {
246
243
  }, attempt: ChannelMutationOptions & {
247
244
  idempotencyKey: string;
248
245
  }) => Promise<CheckoutPayResponse>;
246
+ /** Expire the hosted provider session before returning the cart to editing. */
247
+ readonly cancel: (orderId: string, input: CheckoutCancelInput, attempt: ChannelMutationOptions & {
248
+ idempotencyKey: string;
249
+ }) => Promise<void>;
249
250
  };
250
251
  };
251
252
  type CartKit = ReturnType<typeof createCart>;
@@ -291,6 +292,11 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
291
292
  readonly dash: {
292
293
  readonly profile: () => Promise<DashProfileResponse>;
293
294
  readonly init: () => Promise<DashInitResponse>;
295
+ readonly waitlist: {
296
+ readonly status: () => Promise<WaitlistPublicStatus>;
297
+ readonly form: () => Promise<WaitlistPublicFormResponse>;
298
+ readonly submit: (input: WaitlistSubmission, mutation?: ChannelMutationOptions) => Promise<WaitlistAcknowledgement>;
299
+ };
294
300
  readonly plans: () => Promise<DashPlansResponse>;
295
301
  readonly directory: {
296
302
  readonly regions: () => Promise<ListResponse<DashDirectoryRegion>>;
@@ -357,6 +363,7 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
357
363
  readonly setAddresses: (orderId: string, input: CheckoutAddressesInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
358
364
  readonly setFulfillment: (orderId: string, input: CheckoutFulfillmentInput, mutation?: ChannelMutationOptions) => Promise<CartResponse>;
359
365
  readonly pay: (orderId: string, input: CheckoutPayInput, mutation?: ChannelMutationOptions) => Promise<CheckoutPayResponse>;
366
+ readonly cancel: (orderId: string, input: CheckoutCancelInput, mutation?: ChannelMutationOptions) => Promise<void>;
360
367
  };
361
368
  readonly reviews: {
362
369
  readonly list: (params?: ChannelListParams) => Promise<ListResponse<Review>>;
@@ -469,7 +476,7 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
469
476
  readonly delete: (addressId: string, mutation?: ChannelMutationOptions) => Promise<{
470
477
  status?: string;
471
478
  }>;
472
- readonly setDefault: (addressId: string, kind: SavedAddressDefaultKind, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
479
+ readonly setDefault: (addressId: string, mutation?: ChannelMutationOptions) => Promise<SavedAddressResponse>;
473
480
  };
474
481
  readonly paymentMethods: {
475
482
  readonly list: () => Promise<ListResponse<SavedPaymentMethod>>;
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-6VQ4ZTZI.js';
2
- import './chunk-LG43JMFW.js';
3
- import './chunk-P3HX34X7.js';
1
+ export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-HOR5MOYI.js';
2
+ import './chunk-E5J5UOPS.js';
3
+ import './chunk-XPO7C3DW.js';
@@ -9,7 +9,7 @@
9
9
  * PII-free fields; fetch the detail back through the channel client. Data POSTed
10
10
  * to your server can never be reached by a GDPR erasure on ours.
11
11
  */
12
- declare const CHANNEL_WEBHOOK_EVENT_TYPES: readonly ["order.created", "order.paid", "order.updated", "order.cancelled", "order.refunded", "lead.created", "review.submitted", "review.published", "page.published", "page.updated", "page.deleted", "menu.updated", "product.created", "product.updated", "product.deleted"];
12
+ declare const CHANNEL_WEBHOOK_EVENT_TYPES: readonly ["order.created", "order.paid", "order.updated", "order.cancelled", "order.refunded", "fulfillment.shipped", "fulfillment.delivered", "lead.created", "review.submitted", "review.published", "page.published", "page.updated", "page.deleted", "menu.updated", "product.created", "product.updated", "product.deleted"];
13
13
  type ChannelWebhookEventType = (typeof CHANNEL_WEBHOOK_EVENT_TYPES)[number];
14
14
  interface OrderEventData {
15
15
  order_id: string;
@@ -20,6 +20,16 @@ interface OrderEventData {
20
20
  total_cents: number;
21
21
  created_at: string;
22
22
  }
23
+ interface FulfillmentEventData {
24
+ fulfillment_id: string;
25
+ order_id: string;
26
+ status: string;
27
+ tracking_number?: string;
28
+ tracking_url?: string;
29
+ carrier?: string;
30
+ shipped_at?: string;
31
+ delivered_at?: string;
32
+ }
23
33
  interface LeadCreatedEventData {
24
34
  lead_id: string;
25
35
  source: string;
@@ -72,6 +82,8 @@ interface ChannelWebhookEventDataMap {
72
82
  "order.updated": OrderEventData;
73
83
  "order.cancelled": OrderEventData;
74
84
  "order.refunded": OrderEventData;
85
+ "fulfillment.shipped": FulfillmentEventData;
86
+ "fulfillment.delivered": FulfillmentEventData;
75
87
  "lead.created": LeadCreatedEventData;
76
88
  "review.submitted": ReviewSubmittedEventData;
77
89
  "review.published": ReviewPublishedEventData;
@@ -181,4 +193,4 @@ interface ParseChannelWebhookEventOptions {
181
193
  */
182
194
  declare function parseChannelWebhookEvent(request: Request, options: ParseChannelWebhookEventOptions): Promise<ParsedChannelWebhookEvent>;
183
195
 
184
- export { type AnyChannelWebhookEvent, CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, type ChannelWebhookEvent, type ChannelWebhookEventDataMap, type ChannelWebhookEventType, type ChannelWebhookVerificationCode, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, type LeadCreatedEventData, type MenuUpdatedEventData, type OrderEventData, type PagePublishedEventData, type ParseChannelWebhookEventOptions, type ParsedChannelWebhookEvent, type ProductEventData, type ReviewPublishedEventData, type ReviewSubmittedEventData, type UnknownChannelWebhookEvent, type VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature };
196
+ export { type AnyChannelWebhookEvent, CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, type ChannelWebhookEvent, type ChannelWebhookEventDataMap, type ChannelWebhookEventType, type ChannelWebhookVerificationCode, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, type FulfillmentEventData, type LeadCreatedEventData, type MenuUpdatedEventData, type OrderEventData, type PagePublishedEventData, type ParseChannelWebhookEventOptions, type ParsedChannelWebhookEvent, type ProductEventData, type ReviewPublishedEventData, type ReviewSubmittedEventData, type UnknownChannelWebhookEvent, type VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature };
package/dist/webhooks.js CHANGED
@@ -1 +1 @@
1
- export { CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './chunk-P3HX34X7.js';
1
+ export { CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './chunk-XPO7C3DW.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c1m-public/channel-client",
3
- "version": "0.24.0",
3
+ "version": "0.27.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Typed server-side client for the MML headless Channel API",