@c1m-public/channel-client 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,1316 @@
1
- import "server-only";
2
- export * from "./webhooks.js";
3
- export * from "./errors.js";
4
- export type * from "./types.js";
5
- import type { CatalogBrand, CatalogCategory, CatalogCollection, CatalogProductsResponse, BlogPostResponse, DiningMenu, DashDirectoryEntry, DashDirectoryProfileResponse, DashDirectoryRegion, DashInitResponse, DashLead, DashLeadPortalRequestLinkInput, DashLeadPortalRequestLinkResponse, DashLeadPortalView, DashPlansResponse, DashProfileResponse, GivingEntry, SubscriptionPlanListResponse, SubscriptionPlanResponse, StartSubscriptionInput, GivingIntentListResponse, AddCartItemInput, CartResponse, CheckoutAddressesInput, CheckoutCustomerInput, CheckoutFulfillmentInput, CheckoutOptions, CheckoutPayInput, CheckoutPayResponse, CheckoutStatusResponse, ChannelPing, CustomerResponse, CustomerAuthSession, CustomerSecurityActivityPage, ChannelGeo, CustomerSession, CustomerSignupResponse, LeadResponse, LightInitResponse, ListResponse, Order, OrderSummary, MergeCartInput, SendCodeResponse, Product, ProductAsset, PrintIntakeInput, PrintJob, PrintOptionsSelection, PrintQuoteResponse, PrintSettingsResponse, PublicPage, PublicPageSummary, PublicSubmitReviewInput, PublicWorkspaceInit, MenuResponse, Review, ReviewSummaryResponse, SavedAddress, SavedAddressDefaultKind, SavedAddressInput, SavedAddressResponse, SavedAddressUpdateInput, SavedPaymentMethod, SiteDocument, StartGivingInput, StartGivingResponse, PaymentMethodConfirmInput, PaymentMethodMutationResponse, PaymentMethodSetupInput, PaymentMethodSetupResult, PaymentLinkCheckoutInput, PaymentLinkCheckoutResponse, PaymentLinkRedemptionStatusResponse, PublicPaymentLinkResponse, SubscriptionAgreementResponse, SubscriptionInvoiceListResponse, SubscriptionInvoiceResponse, SubscriptionListResponse, SubscriptionSourceResponse, ThemeResponse, UpdateCartItemInput } from "./types.js";
6
- export declare const DEFAULT_CHANNEL_API_URL = "https://api.saasdash.app";
7
- export interface ChannelRetryPolicy {
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, OrderEventData, PagePublishedEventData, ParseChannelWebhookEventOptions, ParsedChannelWebhookEvent, ProductEventData, ReviewPublishedEventData, ReviewSubmittedEventData, UnknownChannelWebhookEvent, VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './webhooks.js';
2
+
3
+ interface ListResponse<T> {
4
+ items: T[];
5
+ next_cursor?: string;
6
+ has_more?: boolean;
7
+ }
8
+ interface WorkspaceInfo {
9
+ id: string;
10
+ name: string;
11
+ slug: string;
12
+ is_active: boolean;
13
+ status?: string;
14
+ }
15
+ interface PublicWorkspaceInit {
16
+ workspace: WorkspaceInfo;
17
+ branding?: Record<string, unknown>;
18
+ preferences?: Record<string, unknown>;
19
+ profile?: Record<string, unknown>;
20
+ launch?: Record<string, unknown>;
21
+ features?: Array<{
22
+ key: string;
23
+ name: string;
24
+ is_enabled: boolean;
25
+ is_available: boolean;
26
+ }>;
27
+ modules?: unknown[];
28
+ custom?: Record<string, unknown>;
29
+ cache_control?: {
30
+ etag?: string;
31
+ max_age?: number;
32
+ };
33
+ }
34
+ /**
35
+ * The public origin of a dash or workspace, resolved server-side once:
36
+ * verified hostname (external → the channel bound to it) > active channel
37
+ * site_url > hosted managed host. Use it for `metadataBase`, canonical/OG
38
+ * URLs, robots and sitemaps instead of a hardcoded base URL.
39
+ */
40
+ interface SiteRef {
41
+ /** Absolute https origin, no trailing slash. */
42
+ url: string;
43
+ source: "hostname" | "channel" | "hosted";
44
+ /** The external channel that renders the site, when one does. */
45
+ channel_id?: string;
46
+ }
47
+ /**
48
+ * The headless bootstrap payload — one cached call carries identity,
49
+ * branding, features, locale, SEO defaults and the public origin. Navigation
50
+ * (`menus.get`) and theme (`theme.get`) stay separate, parallel reads.
51
+ */
52
+ interface LightInitResponse {
53
+ workspace_id: string;
54
+ workspace_name: string;
55
+ workspace_slug?: string;
56
+ primary_color: string;
57
+ logo_url?: string;
58
+ logo_light_url?: string;
59
+ logo_dark_url?: string;
60
+ logo_square_url?: string;
61
+ enabled_features: string[];
62
+ preferences?: {
63
+ currency?: string;
64
+ locale?: string;
65
+ timezone?: string;
66
+ };
67
+ site?: SiteRef;
68
+ seo?: {
69
+ title?: string;
70
+ description?: string;
71
+ };
72
+ etag?: string;
73
+ }
74
+ interface DashTenantInfo {
75
+ id: string;
76
+ display_name: string;
77
+ managed_domain?: string;
78
+ status: string;
79
+ }
80
+ interface DashPublicProfileInfo {
81
+ discoverable: boolean;
82
+ category?: string;
83
+ headline?: string;
84
+ short_description?: string;
85
+ about?: string;
86
+ logo_url?: string;
87
+ header_media_url?: string;
88
+ pricing_summary?: string;
89
+ }
90
+ interface DashBrandingInfo {
91
+ primary_color?: string;
92
+ logo_url?: string;
93
+ logo_square_url?: string;
94
+ favicon_url?: string;
95
+ cover_url?: string;
96
+ }
97
+ interface DashLocaleInfo {
98
+ region?: string;
99
+ currency?: string;
100
+ locale?: string;
101
+ timezone?: string;
102
+ }
103
+ /**
104
+ * The dash bootstrap — one call for a marketing site's shell: identity,
105
+ * public profile, branding, locale, SEO defaults and the public origin.
106
+ * `dash.profile()` remains for the full profile page (gallery, about template).
107
+ */
108
+ interface DashInitResponse {
109
+ tenant: DashTenantInfo;
110
+ public_profile: DashPublicProfileInfo;
111
+ branding?: DashBrandingInfo;
112
+ locale?: DashLocaleInfo;
113
+ seo?: {
114
+ title?: string;
115
+ description?: string;
116
+ };
117
+ site?: SiteRef;
118
+ }
119
+ interface DashPublicPage {
120
+ profile: DashPublicProfileInfo & {
121
+ tenant_id: string;
122
+ status: string;
123
+ display_name?: string;
124
+ is_private: boolean;
125
+ allow_free_memberships: boolean;
126
+ primary_color?: string;
127
+ logo_square_url?: string;
128
+ favicon_url?: string;
129
+ cover_url?: string;
130
+ gallery_items?: Array<{
131
+ url: string;
132
+ kind: string;
133
+ alt_text?: string;
134
+ caption?: string;
135
+ }>;
136
+ [key: string]: unknown;
137
+ };
138
+ owner_name?: string;
139
+ user_count: number;
140
+ workspace_counts: Record<string, number>;
141
+ media: Array<{
142
+ kind: string;
143
+ url: string;
144
+ alt_text?: string;
145
+ caption?: string;
146
+ }>;
147
+ }
148
+ interface DashProfileResponse {
149
+ page: DashPublicPage;
150
+ }
151
+ interface DashPlanPricing {
152
+ currency: string;
153
+ currency_symbol?: string;
154
+ monthly_price: number;
155
+ yearly_price: number;
156
+ }
157
+ interface DashPlan {
158
+ id: string;
159
+ name: string;
160
+ description: string;
161
+ level: number;
162
+ is_public: boolean;
163
+ is_free: boolean;
164
+ trial_days?: number;
165
+ highlights: string[];
166
+ limits: Record<string, number>;
167
+ pricing: Record<string, DashPlanPricing>;
168
+ }
169
+ interface DashPlanRegion {
170
+ code: string;
171
+ name: string;
172
+ currency: string;
173
+ locale: string;
174
+ timezone: string;
175
+ market_code?: string;
176
+ }
177
+ interface DashPlansResponse {
178
+ plans: DashPlan[];
179
+ regions: DashPlanRegion[];
180
+ default_region: string;
181
+ }
182
+ interface DashDirectoryRegion {
183
+ code: string;
184
+ label: string;
185
+ country_code?: string;
186
+ sort_order: number;
187
+ count: number;
188
+ }
189
+ interface DashDirectoryEntry {
190
+ workspace_id: string;
191
+ slug: string;
192
+ name: string;
193
+ tagline?: string;
194
+ category?: string;
195
+ logo_url?: string;
196
+ logo_square_url?: string;
197
+ primary_color?: string;
198
+ review_count: number;
199
+ average_rating: number;
200
+ verified: boolean;
201
+ service_tags: unknown;
202
+ major_region_code?: string;
203
+ major_region_label?: string;
204
+ upcoming_events?: unknown[];
205
+ }
206
+ interface DashDirectoryProfile extends DashDirectoryEntry {
207
+ display_name?: string;
208
+ description?: string;
209
+ logo_light_url?: string;
210
+ logo_dark_url?: string;
211
+ verified_at?: string;
212
+ created_at: string;
213
+ }
214
+ interface DashDirectoryProfileResponse {
215
+ profile: DashDirectoryProfile;
216
+ }
217
+ /** A requester's view of their quote requests, unlocked by a signed portal link. */
218
+ interface DashLeadPortalView {
219
+ email: string;
220
+ requests: DashLeadPortalRequest[];
221
+ }
222
+ type DashLeadPortalRequestStatus = "received" | "matching" | "matched" | "closed";
223
+ interface DashLeadPortalRequest {
224
+ reference: string;
225
+ submittedAt: string;
226
+ status: DashLeadPortalRequestStatus;
227
+ summary?: DashLeadPortalMovingSummary;
228
+ matches: DashLeadPortalMatch[];
229
+ }
230
+ interface DashLeadPortalMovingSummary {
231
+ from?: string;
232
+ to?: string;
233
+ moveDate?: string;
234
+ size?: string;
235
+ }
236
+ interface DashLeadPortalMatch {
237
+ workspaceId: string;
238
+ name: string;
239
+ category?: string;
240
+ logoUrl?: string;
241
+ coverageArea?: string;
242
+ verified?: boolean;
243
+ rating?: number;
244
+ reviewCount?: number;
245
+ responded?: boolean;
246
+ }
247
+ interface DashLeadPortalRequestLinkInput {
248
+ email: string;
249
+ }
250
+ /** Deliberately non-enumerating: the same shape whether or not the email exists. */
251
+ interface DashLeadPortalRequestLinkResponse {
252
+ ok: boolean;
253
+ message: string;
254
+ }
255
+ interface DashLead {
256
+ id: string;
257
+ owner_scope?: string;
258
+ owner_id?: string;
259
+ name?: string;
260
+ email?: string;
261
+ phone?: string;
262
+ message?: string;
263
+ source: string;
264
+ channel_id?: string;
265
+ status: string;
266
+ meta?: Record<string, unknown>;
267
+ created_at: string;
268
+ updated_at: string;
269
+ }
270
+ interface PublicPageSummary {
271
+ id: string;
272
+ saas_app: string;
273
+ workspace_id: string;
274
+ source: string;
275
+ route_kind: string;
276
+ route_pattern: string;
277
+ slug: string;
278
+ title: string;
279
+ status: string;
280
+ status_reason: string;
281
+ visibility: "hidden" | "visible";
282
+ edit_mode: string;
283
+ draft_revision: number;
284
+ created_at: string;
285
+ updated_at: string;
286
+ }
287
+ interface PublicPage extends PublicPageSummary {
288
+ owner_app?: string;
289
+ required_apps?: string[];
290
+ required_features?: string[];
291
+ seo_title?: string;
292
+ seo_description?: string;
293
+ draft_state?: unknown;
294
+ layout_state?: unknown;
295
+ published_at?: string;
296
+ manifest_key?: string;
297
+ manifest_version?: number;
298
+ template_key?: string;
299
+ theme_id?: string;
300
+ default_shell_template_id?: string;
301
+ }
302
+ interface Product {
303
+ id: string;
304
+ workspace_id: string;
305
+ title: string;
306
+ slug: string;
307
+ description?: string;
308
+ /** The product type, as a summary — the server has never sent a bare string here. */
309
+ type?: {
310
+ id: string;
311
+ name: string;
312
+ slug: string;
313
+ };
314
+ price_cents: number;
315
+ currency: string;
316
+ inventory_qty: number;
317
+ /**
318
+ * Stripe product tax code (e.g. `txcd_99999999`). Drives how Stripe Automatic Tax
319
+ * categorises the product at checkout — a book, a hot meal and a t-shirt are taxed
320
+ * differently in most places. Empty means the merchant's Stripe account default.
321
+ */
322
+ tax_code?: string;
323
+ status: "draft" | "published" | "archived";
324
+ primary_image_url?: string;
325
+ options?: unknown[];
326
+ variants?: unknown[];
327
+ categories?: Array<{
328
+ id: string;
329
+ name: string;
330
+ slug: string;
331
+ }>;
332
+ created_at: string;
333
+ updated_at: string;
334
+ }
335
+ interface ProductAsset {
336
+ id: string;
337
+ position: number;
338
+ is_featured: boolean;
339
+ asset: {
340
+ id: string;
341
+ source: string;
342
+ name: string;
343
+ alt_text?: string;
344
+ size_bytes: number;
345
+ mime_type?: string;
346
+ url?: string;
347
+ created_at: string;
348
+ };
349
+ created_at: string;
350
+ }
351
+ interface CatalogCategory {
352
+ id: string;
353
+ workspace_id: string;
354
+ name: string;
355
+ slug: string;
356
+ description?: string;
357
+ is_active: boolean;
358
+ sort_order: number;
359
+ product_count: number;
360
+ metadata: unknown;
361
+ created_at: string;
362
+ updated_at: string;
363
+ }
364
+ interface CatalogCollection {
365
+ id: string;
366
+ workspace_id: string;
367
+ title: string;
368
+ slug: string;
369
+ description?: string;
370
+ created_at: string;
371
+ updated_at: string;
372
+ }
373
+ interface CatalogBrand {
374
+ id: string;
375
+ workspace_id: string;
376
+ name: string;
377
+ slug: string;
378
+ description?: string;
379
+ website_url?: string;
380
+ is_active: boolean;
381
+ sort_order: number;
382
+ metadata: unknown;
383
+ created_at: string;
384
+ updated_at: string;
385
+ }
386
+ interface CatalogProduct {
387
+ id: string;
388
+ slug: string;
389
+ title: string;
390
+ price_cents: number;
391
+ currency: string;
392
+ base_price_cents?: number;
393
+ base_currency?: string;
394
+ price_source?: string;
395
+ fx_rate?: number;
396
+ fx_provider?: string;
397
+ fx_quoted_at?: string;
398
+ primary_image_url?: string;
399
+ status: string;
400
+ }
401
+ interface CatalogProductsResponse {
402
+ products: CatalogProduct[];
403
+ count: number;
404
+ }
405
+ interface Review {
406
+ id: string;
407
+ rating: number;
408
+ author_name: string;
409
+ author_email: string;
410
+ title: string;
411
+ body: string;
412
+ status: "pending" | "published" | "rejected";
413
+ source?: string;
414
+ created_at?: string;
415
+ [key: string]: unknown;
416
+ }
417
+ interface PublicSubmitReviewInput {
418
+ rating: number;
419
+ author_name?: string;
420
+ author_email?: string;
421
+ title?: string;
422
+ body?: string;
423
+ source?: string;
424
+ }
425
+ interface ReviewSummaryResponse {
426
+ summary: {
427
+ review_count: number;
428
+ average_rating: number;
429
+ };
430
+ }
431
+ interface LeadResponse {
432
+ id: string;
433
+ workspace_id: string;
434
+ name: string;
435
+ email: string;
436
+ phone?: string;
437
+ message?: string;
438
+ source: string;
439
+ status: string;
440
+ meta?: Record<string, unknown>;
441
+ created_at: string;
442
+ updated_at: string;
443
+ }
444
+ interface SiteSubject {
445
+ kind: "workspace";
446
+ id: string;
447
+ saas_app?: string;
448
+ display_name?: string;
449
+ }
450
+ interface SiteResolvedDocument {
451
+ state: "resolved";
452
+ subject: SiteSubject;
453
+ page: {
454
+ id: string;
455
+ workspace_id: string;
456
+ slug: string;
457
+ title: string;
458
+ layout_state?: unknown;
459
+ draft_state?: unknown;
460
+ [key: string]: unknown;
461
+ };
462
+ surface?: Record<string, unknown>;
463
+ route_params?: Record<string, string>;
464
+ theme?: Record<string, unknown> | null;
465
+ navigation: {
466
+ main_menu?: Record<string, unknown> | null;
467
+ footer_menu?: Record<string, unknown> | null;
468
+ };
469
+ init: PublicWorkspaceInit;
470
+ seo?: {
471
+ title?: string;
472
+ description?: string;
473
+ };
474
+ revisions?: Record<string, string | undefined>;
475
+ cache_control?: {
476
+ etag?: string;
477
+ max_age?: number;
478
+ };
479
+ }
480
+ interface SiteGatedDocument {
481
+ state: "gated";
482
+ subject: SiteSubject;
483
+ gate: {
484
+ kind: "password";
485
+ };
486
+ }
487
+ type SiteDocument = SiteResolvedDocument | SiteGatedDocument;
488
+ interface MenuItem {
489
+ id: string;
490
+ parent_id?: string;
491
+ title: string;
492
+ url: string;
493
+ resource_type?: string;
494
+ resource_id?: string;
495
+ position: number;
496
+ target?: Record<string, unknown>;
497
+ [key: string]: unknown;
498
+ }
499
+ interface Menu {
500
+ id: string;
501
+ workspace_id: string;
502
+ handle: string;
503
+ title: string;
504
+ items?: MenuItem[];
505
+ [key: string]: unknown;
506
+ }
507
+ interface MenuResponse {
508
+ menu: Menu;
509
+ }
510
+ interface BlogPost {
511
+ id: string;
512
+ workspace_id: string;
513
+ slug: string;
514
+ title: string;
515
+ status: string;
516
+ excerpt?: string;
517
+ cover_image_url?: string;
518
+ content?: unknown;
519
+ published_at?: string;
520
+ created_at?: string;
521
+ updated_at?: string;
522
+ [key: string]: unknown;
523
+ }
524
+ interface BlogPostResponse {
525
+ post: BlogPost;
526
+ }
527
+ interface GivingEntry {
528
+ id: string;
529
+ workspace_id: string;
530
+ slug: string;
531
+ title: string;
532
+ subtitle?: string;
533
+ variant: string;
534
+ default_amount_cents: number;
535
+ suggested_amounts_cents?: number[];
536
+ allow_custom_amount: boolean;
537
+ cta_label?: string;
538
+ is_active: boolean;
539
+ created_at: string;
540
+ updated_at: string;
541
+ }
542
+ interface GivingIntent {
543
+ id: string;
544
+ workspace_id: string;
545
+ status: string;
546
+ variant: string;
547
+ title: string;
548
+ description?: string;
549
+ currency: string;
550
+ amount_cents: number;
551
+ is_recurring: boolean;
552
+ is_anonymous: boolean;
553
+ display_name?: string;
554
+ email?: string;
555
+ message?: string;
556
+ session_id?: string;
557
+ recurring_agreement_id?: string;
558
+ source_invoice_id?: string;
559
+ created_at: string;
560
+ updated_at: string;
561
+ refunded_at?: string;
562
+ }
563
+ interface GivingIntentListResponse {
564
+ items: GivingIntent[];
565
+ }
566
+ interface SavedAddress {
567
+ id: string;
568
+ end_user_id: string;
569
+ label: string;
570
+ name: string;
571
+ phone: string;
572
+ line1: string;
573
+ line2: string;
574
+ city: string;
575
+ region: string;
576
+ postal_code: string;
577
+ country_code: string;
578
+ is_default_shipping: boolean;
579
+ is_default_billing: boolean;
580
+ created_at: string;
581
+ updated_at: string;
582
+ }
583
+ interface SavedAddressInput {
584
+ line1: string;
585
+ city: string;
586
+ country_code: string;
587
+ label?: string;
588
+ name?: string;
589
+ phone?: string;
590
+ line2?: string;
591
+ region?: string;
592
+ postal_code?: string;
593
+ is_default_shipping?: boolean;
594
+ is_default_billing?: boolean;
595
+ }
596
+ type SavedAddressUpdateInput = SavedAddressInput;
597
+ type SavedAddressDefaultKind = "shipping" | "billing";
598
+ interface SavedAddressResponse {
599
+ address: SavedAddress;
600
+ }
601
+ interface SavedPaymentMethod {
602
+ id: string;
603
+ workspace_id: string;
604
+ end_user_ref?: string;
605
+ provider: string;
606
+ provider_customer_id?: string;
607
+ provider_payment_method_id: string;
608
+ status: string;
609
+ is_default: boolean;
610
+ display_brand?: string;
611
+ display_last4?: string;
612
+ exp_month?: number;
613
+ exp_year?: number;
614
+ created_at: string;
615
+ updated_at: string;
616
+ }
617
+ interface PaymentMethodSetupInput {
618
+ provider: string;
619
+ }
620
+ interface PaymentMethodSetupResult {
621
+ type: string;
622
+ client_secret?: string;
623
+ publishable_key?: string;
624
+ }
625
+ interface PaymentMethodConfirmInput {
626
+ provider: string;
627
+ setup_intent_id?: string;
628
+ payment_method_id?: string;
629
+ }
630
+ interface PaymentMethodMutationResponse {
631
+ success: boolean;
632
+ }
633
+ interface SubscriptionAgreement {
634
+ id: string;
635
+ workspace_id: string;
636
+ source_kind: string;
637
+ source_id: string;
638
+ end_user_ref?: string;
639
+ status: string;
640
+ provider: string;
641
+ provider_ref?: string;
642
+ provider_customer_ref?: string;
643
+ plan_id?: string;
644
+ initial_invoice_id?: string;
645
+ currency: string;
646
+ amount_cents: number;
647
+ interval: string;
648
+ current_period_start?: string;
649
+ current_period_end?: string;
650
+ trial_ends_at?: string;
651
+ cancel_at_period_end: boolean;
652
+ canceled_at?: string;
653
+ meta?: Record<string, unknown>;
654
+ created_at: string;
655
+ updated_at: string;
656
+ }
657
+ interface SubscriptionAgreementResponse {
658
+ agreement: SubscriptionAgreement;
659
+ }
660
+ interface SubscriptionListResponse {
661
+ items: SubscriptionAgreement[];
662
+ has_more: boolean;
663
+ next_cursor?: string;
664
+ }
665
+ interface SubscriptionInvoice {
666
+ id: string;
667
+ workspace_id: string;
668
+ agreement_id: string;
669
+ source_kind: string;
670
+ source_id: string;
671
+ invoice_number: string;
672
+ status: string;
673
+ currency: string;
674
+ subtotal_cents: number;
675
+ tax_cents: number;
676
+ total_cents: number;
677
+ paid_cents: number;
678
+ period_start?: string;
679
+ period_end?: string;
680
+ due_at?: string;
681
+ paid_at?: string;
682
+ payment_id?: string;
683
+ attempt_count: number;
684
+ failure_code?: string;
685
+ failure_message?: string;
686
+ meta?: Record<string, unknown>;
687
+ created_at: string;
688
+ updated_at: string;
689
+ }
690
+ interface SubscriptionInvoiceResponse {
691
+ invoice: SubscriptionInvoice;
692
+ }
693
+ interface SubscriptionInvoiceListResponse {
694
+ items: SubscriptionInvoice[];
695
+ has_more: boolean;
696
+ next_cursor?: string;
697
+ }
698
+ interface SubscriptionSourceDisplay {
699
+ source_app: string;
700
+ source_kind: string;
701
+ source_id: string;
702
+ app_label: string;
703
+ object_label: string;
704
+ subtitle?: string;
705
+ variant?: string;
706
+ admin_href?: string;
707
+ customer_href?: string;
708
+ status?: string;
709
+ }
710
+ interface SubscriptionSourceResponse {
711
+ source_display: SubscriptionSourceDisplay;
712
+ }
713
+ interface StartGivingInput {
714
+ variant?: string;
715
+ title?: string;
716
+ description?: string;
717
+ amount_cents: number;
718
+ currency?: string;
719
+ is_recurring?: boolean;
720
+ is_anonymous?: boolean;
721
+ display_name?: string;
722
+ email?: string;
723
+ message?: string;
724
+ success_url?: string;
725
+ cancel_url?: string;
726
+ }
727
+ interface StartGivingResponse {
728
+ giving: GivingIntent;
729
+ /** Present for one-time gifts. Recurring gifts start an account agreement. */
730
+ session?: {
731
+ session_id: string;
732
+ url: string;
733
+ payment_intent_id?: string;
734
+ };
735
+ }
736
+ /** Public, fail-closed view of the platform payment-collection cutoff. */
737
+ interface PaymentCollectionAvailability {
738
+ available: boolean;
739
+ code?: "payment_collection_disabled" | "payment_collection_unavailable";
740
+ message?: string;
741
+ }
742
+ interface PublicPaymentLink {
743
+ id: string;
744
+ title: string;
745
+ description?: string;
746
+ amount_cents: number;
747
+ currency: string;
748
+ allow_custom_amount: boolean;
749
+ minimum_amount_cents?: number;
750
+ maximum_amount_cents?: number;
751
+ }
752
+ interface PublicPaymentLinkResponse {
753
+ payment_link: PublicPaymentLink;
754
+ }
755
+ interface PaymentLinkCheckoutInput {
756
+ /** Omit for fixed-price links. Required when a custom-price link has no default. */
757
+ amount_cents?: number;
758
+ customer_email?: string;
759
+ customer_name?: string;
760
+ }
761
+ type PaymentLinkRedemptionStatus = "pending" | "checkout_ready" | "succeeded" | "failed" | "refunded" | "disputed" | "charged_back";
762
+ interface PaymentLinkCheckoutResponse {
763
+ redemption_id: string;
764
+ status: PaymentLinkRedemptionStatus;
765
+ session: {
766
+ session_id: string;
767
+ url: string;
768
+ payment_intent_id?: string;
769
+ };
770
+ }
771
+ interface PaymentLinkRedemptionStatusResponse {
772
+ redemption_id: string;
773
+ status: PaymentLinkRedemptionStatus;
774
+ failure_code?: string;
775
+ }
776
+ interface PrintPerPagePricing {
777
+ bw_cents: number;
778
+ colour_cents: number;
779
+ }
780
+ interface PrintPaperSize {
781
+ key: string;
782
+ label: string;
783
+ surcharge_cents: number;
784
+ enabled: boolean;
785
+ }
786
+ interface PrintPricingOption {
787
+ key: string;
788
+ label: string;
789
+ type: string;
790
+ surcharge_cents: number;
791
+ }
792
+ interface PrintPricing {
793
+ base_fee_cents: number;
794
+ per_page: PrintPerPagePricing;
795
+ paper_sizes: PrintPaperSize[];
796
+ options: PrintPricingOption[];
797
+ min_total_cents: number;
798
+ }
799
+ interface PrintBranding {
800
+ display_name?: string;
801
+ logo_url?: string;
802
+ accent?: string;
803
+ instructions?: string;
804
+ }
805
+ interface PrintIntakeLimits {
806
+ max_files: number;
807
+ max_file_bytes: number;
808
+ max_total_bytes: number;
809
+ allowed_extensions: string[];
810
+ }
811
+ interface PrintSettingsResponse {
812
+ accepting: boolean;
813
+ currency: string;
814
+ retention_days: number;
815
+ pricing: PrintPricing;
816
+ branding: PrintBranding;
817
+ intake_limits: PrintIntakeLimits;
818
+ }
819
+ interface PrintOptionsSelection {
820
+ paper_size: string;
821
+ colour: boolean;
822
+ pages: number;
823
+ copies: number;
824
+ extras?: Record<string, boolean>;
825
+ }
826
+ interface PrintPriceLine {
827
+ label: string;
828
+ amount_cents: number;
829
+ }
830
+ interface PrintPriceBreakdown {
831
+ lines: PrintPriceLine[];
832
+ total_cents: number;
833
+ currency: string;
834
+ }
835
+ interface PrintQuoteResponse {
836
+ price_cents: number;
837
+ currency: string;
838
+ breakdown: PrintPriceBreakdown;
839
+ }
840
+ interface PrintIntakeInput {
841
+ name: string;
842
+ email?: string;
843
+ phone?: string;
844
+ notes?: string;
845
+ options: PrintOptionsSelection;
846
+ files: Array<{
847
+ blob: Blob;
848
+ filename: string;
849
+ }>;
850
+ }
851
+ interface PrintJobFile {
852
+ id: string;
853
+ job_id: string;
854
+ file_name: string;
855
+ mime_type: string;
856
+ size_bytes: number;
857
+ page_count?: number;
858
+ sort_order: number;
859
+ created_at: string;
860
+ }
861
+ interface PrintJob {
862
+ id: string;
863
+ workspace_id: string;
864
+ reference: string;
865
+ customer_name: string;
866
+ customer_email?: string;
867
+ customer_phone?: string;
868
+ status: string;
869
+ payment_status: string;
870
+ payment_method: string;
871
+ options: PrintOptionsSelection;
872
+ price_cents: number;
873
+ currency: string;
874
+ price_breakdown: PrintPriceBreakdown;
875
+ notes?: string;
876
+ file_count?: number;
877
+ version: number;
878
+ files?: PrintJobFile[];
879
+ created_at: string;
880
+ updated_at: string;
881
+ }
882
+ interface DiningAvailabilityRule {
883
+ days?: string[];
884
+ start?: string;
885
+ end?: string;
886
+ starts_on?: string;
887
+ ends_on?: string;
888
+ }
889
+ interface DiningAvailability {
890
+ timezone?: string;
891
+ rules?: DiningAvailabilityRule[];
892
+ is_available_now: boolean;
893
+ next_change_at?: string;
894
+ }
895
+ interface DiningItemSize {
896
+ id: string;
897
+ name: string;
898
+ price_cents: number;
899
+ is_default: boolean;
900
+ sort_order: number;
901
+ is_active: boolean;
902
+ }
903
+ interface DiningModifier {
904
+ id: string;
905
+ name: string;
906
+ description?: string;
907
+ price_delta_cents: number;
908
+ is_default: boolean;
909
+ sort_order: number;
910
+ is_active: boolean;
911
+ }
912
+ interface DiningModifierGroup {
913
+ id: string;
914
+ name: string;
915
+ description?: string;
916
+ selection_type: string;
917
+ is_required: boolean;
918
+ min_selections: number;
919
+ max_selections?: number;
920
+ sort_order: number;
921
+ is_active: boolean;
922
+ modifiers: DiningModifier[];
923
+ }
924
+ interface DiningOfferBadge {
925
+ offer_id: string;
926
+ label: string;
927
+ type: string;
928
+ is_featured: boolean;
929
+ display_priority: number;
930
+ }
931
+ interface DiningComboChoice {
932
+ id: string;
933
+ item: {
934
+ id: string;
935
+ slug: string;
936
+ name: string;
937
+ description?: string;
938
+ base_price_cents: number;
939
+ image_url?: string;
940
+ image_alt: string;
941
+ badges: string[];
942
+ status: string;
943
+ dietary_flags: string[];
944
+ allergens: string[];
945
+ calories?: number;
946
+ prep_time_mins?: number;
947
+ spice_level?: number;
948
+ kitchen_station?: string;
949
+ sizes: DiningItemSize[];
950
+ modifier_groups: DiningModifierGroup[];
951
+ };
952
+ label_override?: string;
953
+ description_override?: string;
954
+ price_delta_cents: number;
955
+ is_default: boolean;
956
+ sort_order: number;
957
+ is_active: boolean;
958
+ is_available: boolean;
959
+ }
960
+ interface DiningComboGroup {
961
+ id: string;
962
+ name: string;
963
+ description?: string;
964
+ min_selections: number;
965
+ max_selections?: number;
966
+ allow_repeats: boolean;
967
+ sort_order: number;
968
+ is_active: boolean;
969
+ choices: DiningComboChoice[];
970
+ }
971
+ interface DiningOffer {
972
+ id: string;
973
+ name: string;
974
+ badge_label?: string;
975
+ type: string;
976
+ code?: string;
977
+ is_featured: boolean;
978
+ display_priority: number;
979
+ image_url?: string;
980
+ availability?: DiningAvailability;
981
+ is_active: boolean;
982
+ }
983
+ interface DiningMenuItem {
984
+ id: string;
985
+ slug: string;
986
+ name: string;
987
+ description?: string;
988
+ item_kind: string;
989
+ price_cents: number;
990
+ price_from_cents: number;
991
+ image_url?: string;
992
+ image_alt: string;
993
+ badges: string[];
994
+ is_featured: boolean;
995
+ is_available: boolean;
996
+ status: string;
997
+ dietary_flags: string[];
998
+ allergens: string[];
999
+ calories?: number;
1000
+ prep_time_mins?: number;
1001
+ spice_level?: number;
1002
+ sizes: DiningItemSize[];
1003
+ modifier_groups: DiningModifierGroup[];
1004
+ offer_badges: DiningOfferBadge[];
1005
+ combo_groups?: DiningComboGroup[];
1006
+ }
1007
+ interface DiningMenu {
1008
+ saas_app: string;
1009
+ workspace_id: string;
1010
+ board: {
1011
+ id: string;
1012
+ slug: string;
1013
+ name: string;
1014
+ description?: string;
1015
+ currency: string;
1016
+ applicable_order_types: string[];
1017
+ availability?: DiningAvailability;
1018
+ is_active: boolean;
1019
+ };
1020
+ sections: Array<{
1021
+ id: string;
1022
+ name: string;
1023
+ description?: string;
1024
+ sort_order: number;
1025
+ availability?: DiningAvailability;
1026
+ is_active: boolean;
1027
+ items: DiningMenuItem[];
1028
+ }>;
1029
+ offers: DiningOffer[];
1030
+ generated_at: string;
1031
+ }
1032
+ /** The published theme, as served to a channel that owns its own routing and
1033
+ * therefore never calls `site.resolve` (which otherwise bundles it). */
1034
+ interface ThemeResponse {
1035
+ theme: Record<string, unknown> | null;
1036
+ }
1037
+ interface Customer {
1038
+ id: string;
1039
+ email: string;
1040
+ name: string;
1041
+ email_verified?: boolean;
1042
+ is_active?: boolean;
1043
+ [key: string]: unknown;
1044
+ }
1045
+ /** Returned by verify-code and refresh. `access_token` is the session. */
1046
+ interface CustomerSession {
1047
+ access_token: string;
1048
+ refresh_token: string;
1049
+ token_type: string;
1050
+ expires_at: string;
1051
+ end_user: Customer;
1052
+ }
1053
+ interface CustomerSignupResponse {
1054
+ end_user: Customer;
1055
+ created: boolean;
1056
+ requires_email_verification: boolean;
1057
+ }
1058
+ interface SendCodeResponse {
1059
+ status: string;
1060
+ purpose: string;
1061
+ }
1062
+ interface CustomerResponse {
1063
+ end_user: Customer;
1064
+ }
1065
+ interface CustomerAuthSession {
1066
+ id: string;
1067
+ auth_method: string;
1068
+ device_type: string;
1069
+ browser_name: string;
1070
+ os_name: string;
1071
+ country_code?: string;
1072
+ created_at: string;
1073
+ last_seen_at: string;
1074
+ expires_at: string;
1075
+ revoked_at?: string;
1076
+ current: boolean;
1077
+ }
1078
+ interface CustomerSecurityActivity {
1079
+ id: string;
1080
+ event_type: string;
1081
+ category: string;
1082
+ severity: string;
1083
+ outcome: string;
1084
+ country_code?: string;
1085
+ session_id?: string;
1086
+ metadata?: Record<string, unknown>;
1087
+ occurred_at: string;
1088
+ }
1089
+ interface CustomerSecurityActivityPage {
1090
+ items: CustomerSecurityActivity[];
1091
+ next_cursor?: string;
1092
+ has_more: boolean;
1093
+ }
1094
+ interface ChannelGeo {
1095
+ country: string;
1096
+ countryName: string;
1097
+ currency: {
1098
+ code: string;
1099
+ symbol: string;
1100
+ };
1101
+ region: {
1102
+ code: string;
1103
+ name: string;
1104
+ currency: string;
1105
+ currencySymbol: string;
1106
+ locale: string;
1107
+ timezone: string;
1108
+ };
1109
+ ip: string;
1110
+ source: string;
1111
+ }
1112
+ interface Order {
1113
+ id: string;
1114
+ workspace_id?: string;
1115
+ order_number: string;
1116
+ cart_token?: string;
1117
+ channel_id?: string;
1118
+ status: string;
1119
+ payment_status: string;
1120
+ currency: string;
1121
+ source?: string;
1122
+ customer_email?: string;
1123
+ customer_name?: string;
1124
+ subtotal_cents?: number;
1125
+ shipping_amount_cents?: number;
1126
+ tax_amount_cents?: number;
1127
+ total_cents: number;
1128
+ items?: OrderItem[];
1129
+ version?: number;
1130
+ created_at: string;
1131
+ updated_at?: string;
1132
+ [key: string]: unknown;
1133
+ }
1134
+ interface OrderItem {
1135
+ id: string;
1136
+ order_id: string;
1137
+ product_id?: string;
1138
+ variant_id?: string;
1139
+ product_slug?: string;
1140
+ variant_title?: string;
1141
+ thumbnail_url?: string;
1142
+ title: string;
1143
+ quantity: number;
1144
+ unit_price_cents: number;
1145
+ line_total_cents: number;
1146
+ /** Stripe product tax code, snapshotted from the product at order time. */
1147
+ tax_code?: string;
1148
+ [key: string]: unknown;
1149
+ }
1150
+ interface CartResponse {
1151
+ order: Order;
1152
+ }
1153
+ interface AddCartItemInput {
1154
+ cart_token?: string;
1155
+ currency?: string;
1156
+ product_id: string;
1157
+ variant_id?: string;
1158
+ quantity: number;
1159
+ }
1160
+ interface UpdateCartItemInput {
1161
+ cart_token: string;
1162
+ quantity: number;
1163
+ }
1164
+ interface MergeCartInput {
1165
+ source_cart_token: string;
1166
+ target_cart_token: string;
1167
+ currency?: string;
1168
+ }
1169
+ interface CheckoutCustomerInput {
1170
+ cart_token: string;
1171
+ email: string;
1172
+ name: string;
1173
+ }
1174
+ interface CheckoutAddress {
1175
+ name?: string;
1176
+ phone?: string;
1177
+ line1: string;
1178
+ line2?: string;
1179
+ city: string;
1180
+ region?: string;
1181
+ postal_code?: string;
1182
+ country_code: string;
1183
+ }
1184
+ interface CheckoutAddressesInput {
1185
+ cart_token: string;
1186
+ shipping: CheckoutAddress;
1187
+ billing?: CheckoutAddress;
1188
+ }
1189
+ interface CheckoutFulfillmentInput {
1190
+ cart_token: string;
1191
+ method: "shipping" | "pickup";
1192
+ shipping_method_id?: string;
1193
+ }
1194
+ interface CheckoutPayInput {
1195
+ cart_token: string;
1196
+ return_url?: string;
1197
+ }
1198
+ interface PaymentMethodOption {
1199
+ provider: string;
1200
+ name: string;
1201
+ type: string;
1202
+ is_available: boolean;
1203
+ [key: string]: unknown;
1204
+ }
1205
+ interface PaymentReadiness {
1206
+ ready: boolean;
1207
+ mode: string;
1208
+ reasons?: string[];
1209
+ providers_available?: string[];
1210
+ connect_required?: boolean;
1211
+ connect_configured?: boolean;
1212
+ }
1213
+ interface ShippingMethodOption {
1214
+ id: string;
1215
+ name?: string;
1216
+ code?: string;
1217
+ amount_cents?: number;
1218
+ [key: string]: unknown;
1219
+ }
1220
+ interface CheckoutOptions {
1221
+ checkout_variant: string;
1222
+ order: Order;
1223
+ shipping_methods?: ShippingMethodOption[];
1224
+ payment_methods?: PaymentMethodOption[];
1225
+ payment_ready?: boolean;
1226
+ payment_readiness?: PaymentReadiness;
1227
+ [key: string]: unknown;
1228
+ }
1229
+ type CheckoutStatus = "finalizing" | "completed" | "failed" | "not_found";
1230
+ interface CheckoutStatusResponse {
1231
+ status: CheckoutStatus;
1232
+ order_status?: string;
1233
+ payment_status?: string;
1234
+ payment_reference?: string;
1235
+ updated_at?: string;
1236
+ reasons?: string[];
1237
+ [key: string]: unknown;
1238
+ }
1239
+ interface CheckoutPayResponse {
1240
+ order: Order;
1241
+ session?: Record<string, unknown>;
1242
+ checkout_variant?: string;
1243
+ payment?: Record<string, unknown>;
1244
+ status?: string;
1245
+ provider_ref?: string;
1246
+ checkout_session_id?: string;
1247
+ redirect_url?: string;
1248
+ [key: string]: unknown;
1249
+ }
1250
+ interface OrderSummary {
1251
+ base_currency: string;
1252
+ total_orders: number;
1253
+ [key: string]: unknown;
1254
+ }
1255
+ /** What the door reports about the token you just used. */
1256
+ interface ChannelPing {
1257
+ channel_id: string;
1258
+ workspace_id: string;
1259
+ saas_app: string;
1260
+ scope: "workspace" | "dash";
1261
+ api_version: string;
1262
+ attestation?: string;
1263
+ }
1264
+ /** A subscription plan a workspace offers. Mirrors Go PlanOffer. */
1265
+ interface SubscriptionPlanOffer {
1266
+ id: string;
1267
+ workspace_id: string;
1268
+ title: string;
1269
+ description?: string;
1270
+ currency: string;
1271
+ amount_cents: number;
1272
+ interval: string;
1273
+ is_active: boolean;
1274
+ created_at: string;
1275
+ updated_at: string;
1276
+ }
1277
+ interface SubscriptionPlanListResponse {
1278
+ items: SubscriptionPlanOffer[];
1279
+ }
1280
+ interface SubscriptionPlanResponse {
1281
+ plan: SubscriptionPlanOffer;
1282
+ }
1283
+ /** Customer-controlled subscription acquisition. Price and terms come from the plan. */
1284
+ interface StartSubscriptionInput {
1285
+ plan_id: string;
1286
+ }
1287
+
1288
+ /**
1289
+ * ChannelConfigurationError is thrown for a misconfigured client — missing or
1290
+ * malformed token, invalid retry/timeout/cache options, missing fetch, missing
1291
+ * webhook secret — as opposed to ChannelAPIError, which describes what the
1292
+ * network or the API did. Callers can branch on this without string-matching
1293
+ * messages; both starters previously invented a local equivalent.
1294
+ */
1295
+ declare class ChannelConfigurationError extends Error {
1296
+ constructor(message: string);
1297
+ }
1298
+ /** Works across duplicate package instances and transformed test bundles. */
1299
+ declare function isChannelConfigurationError(error: unknown): error is ChannelConfigurationError;
1300
+
1301
+ declare const DEFAULT_CHANNEL_API_URL = "https://api.saasdash.app";
1302
+ interface ChannelRetryPolicy {
1303
+ /** Additional attempts after the first (default 1). */
8
1304
  attempts?: number;
1305
+ /** Cap on any single wait, including a server's Retry-After (default 2000). */
9
1306
  maxDelayMs?: number;
1307
+ /**
1308
+ * Retry mutations that carry an idempotency key (default true). The key
1309
+ * makes a replay safe by definition; mutations without one never retry.
1310
+ */
1311
+ idempotentWrites?: boolean;
10
1312
  }
11
- export interface CreateChannelClientOptions {
1313
+ interface CreateChannelClientOptions {
12
1314
  /** Override only for local development or private C1M infrastructure. */
13
1315
  baseUrl?: string;
14
1316
  token: string;
@@ -33,14 +1335,14 @@ export interface CreateChannelClientOptions {
33
1335
  /** Verified visitor metadata from the hosting edge. Never accept these values from an untrusted caller. */
34
1336
  visitor?: ChannelVisitor;
35
1337
  }
36
- export interface ChannelVisitor {
1338
+ interface ChannelVisitor {
37
1339
  ip?: string;
38
1340
  country?: string;
39
1341
  userAgent?: string;
40
1342
  }
41
- export type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
42
- export 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.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" | "dining.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" | "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";
43
- export interface ChannelRequestObservation {
1343
+ type ChannelRequestOutcome = "success" | "api_error" | "network_error" | "timeout" | "invalid_response" | "cancelled";
1344
+ 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" | "dining.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" | "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";
1345
+ interface ChannelRequestObservation {
44
1346
  operation: ChannelOperation;
45
1347
  method: string;
46
1348
  outcome: ChannelRequestOutcome;
@@ -53,22 +1355,22 @@ export interface ChannelRequestObservation {
53
1355
  * Receives bounded request telemetry. Observations deliberately exclude URLs,
54
1356
  * headers, credentials, request bodies, response bodies and customer data.
55
1357
  */
56
- export type ChannelRequestObserver = (observation: ChannelRequestObservation) => void;
57
- export interface ChannelListParams {
1358
+ type ChannelRequestObserver = (observation: ChannelRequestObservation) => void;
1359
+ interface ChannelListParams {
58
1360
  cursor?: string;
59
1361
  limit?: number;
60
1362
  }
61
- export interface ChannelProductListParams extends ChannelListParams {
1363
+ interface ChannelProductListParams extends ChannelListParams {
62
1364
  currency?: string;
63
1365
  search?: string;
64
1366
  category_id?: string;
65
1367
  brand_id?: string;
66
1368
  type_id?: string;
67
1369
  }
68
- export interface ChannelSiteResolveParams {
1370
+ interface ChannelSiteResolveParams {
69
1371
  route?: string;
70
1372
  }
71
- export interface ChannelLeadInput {
1373
+ interface ChannelLeadInput {
72
1374
  name?: string;
73
1375
  email?: string;
74
1376
  phone?: string;
@@ -76,34 +1378,34 @@ export interface ChannelLeadInput {
76
1378
  source?: string;
77
1379
  meta?: Record<string, unknown>;
78
1380
  }
79
- export interface DashDirectoryListParams extends ChannelListParams {
1381
+ interface DashDirectoryListParams extends ChannelListParams {
80
1382
  category?: string;
81
1383
  region?: string;
82
1384
  }
83
- export interface ChannelMutationOptions {
1385
+ interface ChannelMutationOptions {
84
1386
  idempotencyKey?: string;
85
1387
  }
86
- export interface ChannelCheckoutStatusParams {
1388
+ interface ChannelCheckoutStatusParams {
87
1389
  cartToken?: string;
88
1390
  checkoutSessionId?: string;
89
1391
  }
90
- export interface ChannelSubscriptionListParams extends ChannelListParams {
1392
+ interface ChannelSubscriptionListParams extends ChannelListParams {
91
1393
  status?: string;
92
1394
  }
93
- export interface ChannelSubscriptionCancelParams {
1395
+ interface ChannelSubscriptionCancelParams {
94
1396
  immediate?: boolean;
95
1397
  }
96
- export interface ChannelInvoiceListParams extends ChannelListParams {
1398
+ interface ChannelInvoiceListParams extends ChannelListParams {
97
1399
  }
98
- export declare class ChannelAPIError extends Error {
1400
+ declare class ChannelAPIError extends Error {
99
1401
  readonly status: number;
100
1402
  readonly code: string;
101
1403
  readonly requestId: string;
102
1404
  constructor(message: string, status: number, code: string, requestId: string);
103
1405
  }
104
1406
  /** Works across duplicate package instances and transformed test bundles. */
105
- export declare function isChannelAPIError(error: unknown): error is ChannelAPIError;
106
- export declare function createChannelClient(options: CreateChannelClientOptions): {
1407
+ declare function isChannelAPIError(error: unknown): error is ChannelAPIError;
1408
+ declare function createChannelClient(options: CreateChannelClientOptions): {
107
1409
  /**
108
1410
  * Verify the channel token and see what it points at.
109
1411
  *
@@ -119,6 +1421,14 @@ export declare function createChannelClient(options: CreateChannelClientOptions)
119
1421
  readonly geo: {
120
1422
  readonly detect: () => Promise<ChannelGeo>;
121
1423
  };
1424
+ readonly payments: {
1425
+ /**
1426
+ * Read the platform-wide collection cutoff before rendering a money
1427
+ * action. The server returns `available: false` if its authority cannot
1428
+ * be read, so callers never need to interpret a missing state as safe.
1429
+ */
1430
+ readonly availability: () => Promise<PaymentCollectionAvailability>;
1431
+ };
122
1432
  /** Tenant-level data exposed only to a dash-scoped channel token. */
123
1433
  readonly dash: {
124
1434
  readonly profile: () => Promise<DashProfileResponse>;
@@ -201,7 +1511,7 @@ export declare function createChannelClient(options: CreateChannelClientOptions)
201
1511
  readonly get: (handle: string) => Promise<MenuResponse>;
202
1512
  };
203
1513
  readonly blog: {
204
- readonly list: (params?: ChannelListParams) => Promise<ListResponse<import("./types.js").BlogPost>>;
1514
+ readonly list: (params?: ChannelListParams) => Promise<ListResponse<BlogPost>>;
205
1515
  readonly get: (slug: string) => Promise<BlogPostResponse>;
206
1516
  };
207
1517
  readonly giving: {
@@ -343,3 +1653,5 @@ export declare function createChannelClient(options: CreateChannelClientOptions)
343
1653
  }>;
344
1654
  };
345
1655
  };
1656
+
1657
+ 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 };