@c1m-public/channel-client 0.28.0 → 0.29.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.
@@ -0,0 +1,1360 @@
1
+ interface ListResponse<T> {
2
+ items: T[];
3
+ next_cursor?: string;
4
+ has_more?: boolean;
5
+ }
6
+ interface WorkspaceInfo {
7
+ id: string;
8
+ name: string;
9
+ slug: string;
10
+ is_active: boolean;
11
+ status?: string;
12
+ }
13
+ /**
14
+ * The server-decided public gate: the site's mode. Absent means visitors see
15
+ * the normal site. A `page` gate sends every non-exempt path to `path` —
16
+ * `redirect` for a waitlist (a trackable URL), `rewrite` with `status` for
17
+ * maintenance. `block` keeps the site and lets a page embed the signup form.
18
+ * Never participant data.
19
+ */
20
+ interface PublicGate {
21
+ /** `private`: a private site with no mode gate, rendered in place. */
22
+ kind: "waitlist" | "maintenance" | "private";
23
+ placement: "page" | "block";
24
+ path: string;
25
+ enforcement: "redirect" | "rewrite";
26
+ /** HTTP status of a rewritten gate page (503 for maintenance). */
27
+ status?: number;
28
+ /** Seconds until an announced maintenance end. */
29
+ retry_after?: number;
30
+ message?: string;
31
+ /** RFC 3339 end of a maintenance window. */
32
+ until?: string;
33
+ }
34
+ /**
35
+ * The standard site-decision block every bootstrap carries. Decide from it
36
+ * with `siteDecision` (`@c1m-public/channel-client/site`): site_enabled first,
37
+ * then lifecycle, then the gate. The top-level `gate`/`site` fields duplicate
38
+ * it until they are retired.
39
+ */
40
+ interface PublicSiteSignals {
41
+ site?: SiteRef;
42
+ gate?: PublicGate;
43
+ /** active, suspended, archived, pending or disabled. */
44
+ lifecycle: string;
45
+ visibility: "public" | "private";
46
+ site_enabled: boolean;
47
+ }
48
+ interface WaitlistGateStatus {
49
+ gate?: PublicGate;
50
+ }
51
+ interface WaitlistFormSettings {
52
+ gate?: PublicGate;
53
+ collect_marketing_consent: boolean;
54
+ }
55
+ /** First-touch context captured by the site; every field is a bounded hint. */
56
+ interface WaitlistAttribution {
57
+ utm_source?: string;
58
+ utm_medium?: string;
59
+ utm_campaign?: string;
60
+ utm_term?: string;
61
+ utm_content?: string;
62
+ referrer_host?: string;
63
+ landing_path?: string;
64
+ country?: string;
65
+ locale?: string;
66
+ }
67
+ interface WaitlistSubmission {
68
+ email: string;
69
+ name?: string;
70
+ source?: "waitlist_page" | "waitlist_block";
71
+ marketing_opt_in?: boolean;
72
+ attribution?: WaitlistAttribution;
73
+ }
74
+ interface WaitlistAcknowledgement {
75
+ accepted: boolean;
76
+ }
77
+ interface WaitlistVerification {
78
+ verified: boolean;
79
+ }
80
+ interface WaitlistUnsubscription {
81
+ unsubscribed: boolean;
82
+ }
83
+ interface PublicWorkspaceInit {
84
+ signals?: PublicSiteSignals;
85
+ workspace: WorkspaceInfo;
86
+ branding?: Record<string, unknown>;
87
+ preferences?: Record<string, unknown>;
88
+ profile?: Record<string, unknown>;
89
+ gate?: PublicGate;
90
+ features?: Array<{
91
+ key: string;
92
+ name: string;
93
+ is_enabled: boolean;
94
+ is_available: boolean;
95
+ }>;
96
+ modules?: unknown[];
97
+ custom?: Record<string, unknown>;
98
+ cache_control?: {
99
+ etag?: string;
100
+ max_age?: number;
101
+ };
102
+ }
103
+ /**
104
+ * The public origin of a dash or workspace, resolved server-side once:
105
+ * verified hostname (external → the channel bound to it) > active channel
106
+ * site_url > hosted managed host. Use it for `metadataBase`, canonical/OG
107
+ * URLs, robots and sitemaps instead of a hardcoded base URL.
108
+ */
109
+ interface SiteRef {
110
+ /** Absolute https origin, no trailing slash. */
111
+ url: string;
112
+ source: "hostname" | "channel" | "hosted";
113
+ /** The external channel that renders the site, when one does. */
114
+ channel_id?: string;
115
+ }
116
+ /**
117
+ * The headless bootstrap payload — one cached call carries identity,
118
+ * branding, features, locale, SEO defaults and the public origin. Navigation
119
+ * (`menus.get`) and theme (`theme.get`) stay separate, parallel reads.
120
+ */
121
+ interface LightInitResponse {
122
+ signals?: PublicSiteSignals;
123
+ gate?: PublicGate;
124
+ workspace_id: string;
125
+ workspace_name: string;
126
+ workspace_slug?: string;
127
+ primary_color: string;
128
+ logo_url?: string;
129
+ logo_light_url?: string;
130
+ logo_dark_url?: string;
131
+ logo_square_url?: string;
132
+ enabled_features: string[];
133
+ settings?: {
134
+ currency_code?: string;
135
+ locale?: string;
136
+ timezone?: string;
137
+ };
138
+ site?: SiteRef;
139
+ seo?: {
140
+ title?: string;
141
+ description?: string;
142
+ };
143
+ etag?: string;
144
+ }
145
+ interface DashTenantInfo {
146
+ id: string;
147
+ display_name: string;
148
+ managed_domain?: string;
149
+ status: string;
150
+ }
151
+ interface DashPublicProfileInfo {
152
+ discoverable: boolean;
153
+ category?: string;
154
+ headline?: string;
155
+ short_description?: string;
156
+ about?: string;
157
+ logo_url?: string;
158
+ header_media_url?: string;
159
+ pricing_summary?: string;
160
+ }
161
+ interface DashBrandingInfo {
162
+ primary_color?: string;
163
+ logo_url?: string;
164
+ logo_square_url?: string;
165
+ favicon_url?: string;
166
+ cover_url?: string;
167
+ }
168
+ interface DashLocaleInfo {
169
+ region?: string;
170
+ currency?: string;
171
+ locale?: string;
172
+ timezone?: string;
173
+ }
174
+ /**
175
+ * The dash bootstrap — one call for a marketing site's shell: identity,
176
+ * public profile, branding, locale, SEO defaults and the public origin.
177
+ * `dash.profile()` remains for the full profile page (gallery, about template).
178
+ */
179
+ interface DashInitResponse {
180
+ signals?: PublicSiteSignals;
181
+ gate?: PublicGate;
182
+ tenant: DashTenantInfo;
183
+ public_profile: DashPublicProfileInfo;
184
+ branding?: DashBrandingInfo;
185
+ locale?: DashLocaleInfo;
186
+ seo?: {
187
+ title?: string;
188
+ description?: string;
189
+ };
190
+ site?: SiteRef;
191
+ }
192
+ interface DashPublicPage {
193
+ profile: DashPublicProfileInfo & {
194
+ dash_id: string;
195
+ status: string;
196
+ display_name?: string;
197
+ is_private: boolean;
198
+ allow_free_memberships: boolean;
199
+ primary_color?: string;
200
+ logo_square_url?: string;
201
+ favicon_url?: string;
202
+ cover_url?: string;
203
+ gallery_items?: Array<{
204
+ url: string;
205
+ kind: string;
206
+ alt_text?: string;
207
+ caption?: string;
208
+ }>;
209
+ [key: string]: unknown;
210
+ };
211
+ owner_name?: string;
212
+ user_count: number;
213
+ workspace_counts: Record<string, number>;
214
+ media: Array<{
215
+ kind: string;
216
+ url: string;
217
+ alt_text?: string;
218
+ caption?: string;
219
+ }>;
220
+ }
221
+ interface DashProfileResponse {
222
+ page: DashPublicPage;
223
+ }
224
+ interface DashPlanPricing {
225
+ currency: string;
226
+ currency_symbol?: string;
227
+ monthly_price: number;
228
+ yearly_price: number;
229
+ }
230
+ interface DashPlan {
231
+ id: string;
232
+ name: string;
233
+ description: string;
234
+ level: number;
235
+ is_public: boolean;
236
+ is_free: boolean;
237
+ trial_days?: number;
238
+ highlights: string[];
239
+ limits: Record<string, number>;
240
+ pricing: Record<string, DashPlanPricing>;
241
+ }
242
+ interface DashPlanRegion {
243
+ code: string;
244
+ name: string;
245
+ currency: string;
246
+ locale: string;
247
+ timezone: string;
248
+ market_code?: string;
249
+ }
250
+ interface DashPlansResponse {
251
+ plans: DashPlan[];
252
+ regions: DashPlanRegion[];
253
+ default_region: string;
254
+ }
255
+ interface DashDirectoryRegion {
256
+ code: string;
257
+ label: string;
258
+ country_code?: string;
259
+ sort_order: number;
260
+ count: number;
261
+ }
262
+ interface DashDirectoryEntry {
263
+ workspace_id: string;
264
+ slug: string;
265
+ name: string;
266
+ tagline?: string;
267
+ category?: string;
268
+ logo_url?: string;
269
+ logo_square_url?: string;
270
+ primary_color?: string;
271
+ review_count: number;
272
+ average_rating: number;
273
+ verified: boolean;
274
+ service_tags: unknown;
275
+ major_region_code?: string;
276
+ major_region_label?: string;
277
+ upcoming_events?: unknown[];
278
+ }
279
+ interface DashDirectoryProfile extends DashDirectoryEntry {
280
+ display_name?: string;
281
+ description?: string;
282
+ logo_light_url?: string;
283
+ logo_dark_url?: string;
284
+ verified_at?: string;
285
+ created_at: string;
286
+ }
287
+ interface DashDirectoryProfileResponse {
288
+ profile: DashDirectoryProfile;
289
+ }
290
+ /** A requester's view of their quote requests, unlocked by a signed portal link. */
291
+ interface DashLeadPortalView {
292
+ email: string;
293
+ requests: DashLeadPortalRequest[];
294
+ }
295
+ type DashLeadPortalRequestStatus = "received" | "matching" | "matched" | "closed";
296
+ interface DashLeadPortalRequest {
297
+ reference: string;
298
+ submittedAt: string;
299
+ status: DashLeadPortalRequestStatus;
300
+ summary?: DashLeadPortalMovingSummary;
301
+ matches: DashLeadPortalMatch[];
302
+ }
303
+ interface DashLeadPortalMovingSummary {
304
+ from?: string;
305
+ to?: string;
306
+ moveDate?: string;
307
+ size?: string;
308
+ }
309
+ interface DashLeadPortalMatch {
310
+ workspaceId: string;
311
+ name: string;
312
+ category?: string;
313
+ logoUrl?: string;
314
+ coverageArea?: string;
315
+ verified?: boolean;
316
+ rating?: number;
317
+ reviewCount?: number;
318
+ responded?: boolean;
319
+ }
320
+ interface DashLeadPortalRequestLinkInput {
321
+ email: string;
322
+ }
323
+ /** Deliberately non-enumerating: the same shape whether or not the email exists. */
324
+ interface DashLeadPortalRequestLinkResponse {
325
+ ok: boolean;
326
+ message: string;
327
+ }
328
+ interface DashLead {
329
+ id: string;
330
+ owner_scope?: string;
331
+ owner_id?: string;
332
+ name?: string;
333
+ email?: string;
334
+ phone?: string;
335
+ message?: string;
336
+ source: string;
337
+ channel_id?: string;
338
+ status: string;
339
+ meta?: Record<string, unknown>;
340
+ created_at: string;
341
+ updated_at: string;
342
+ }
343
+ interface PublicPageSummary {
344
+ id: string;
345
+ dash_id: string;
346
+ workspace_id: string;
347
+ source: string;
348
+ route_kind: string;
349
+ route_pattern: string;
350
+ slug: string;
351
+ title: string;
352
+ status: string;
353
+ status_reason: string;
354
+ visibility: "hidden" | "visible";
355
+ edit_mode: string;
356
+ draft_revision: number;
357
+ created_at: string;
358
+ updated_at: string;
359
+ }
360
+ interface PublicPage extends PublicPageSummary {
361
+ owner_app?: string;
362
+ required_apps?: string[];
363
+ required_features?: string[];
364
+ seo_title?: string;
365
+ seo_description?: string;
366
+ draft_state?: unknown;
367
+ layout_state?: unknown;
368
+ published_at?: string;
369
+ manifest_key?: string;
370
+ manifest_version?: number;
371
+ template_key?: string;
372
+ theme_id?: string;
373
+ default_shell_template_id?: string;
374
+ }
375
+ interface Product {
376
+ id: string;
377
+ workspace_id: string;
378
+ title: string;
379
+ slug: string;
380
+ description?: string;
381
+ /** The product type, as a summary — the server has never sent a bare string here. */
382
+ type?: {
383
+ id: string;
384
+ name: string;
385
+ slug: string;
386
+ };
387
+ price_cents: number;
388
+ currency: string;
389
+ inventory_qty: number;
390
+ /**
391
+ * Stripe product tax code (e.g. `txcd_99999999`). Drives how Stripe Automatic Tax
392
+ * categorises the product at checkout — a book, a hot meal and a t-shirt are taxed
393
+ * differently in most places. Empty means the merchant's Stripe account default.
394
+ */
395
+ tax_code?: string;
396
+ status: "draft" | "published" | "archived";
397
+ primary_image_url?: string;
398
+ options?: unknown[];
399
+ variants?: unknown[];
400
+ categories?: Array<{
401
+ id: string;
402
+ name: string;
403
+ slug: string;
404
+ }>;
405
+ created_at: string;
406
+ updated_at: string;
407
+ }
408
+ interface ProductAsset {
409
+ id: string;
410
+ position: number;
411
+ is_featured: boolean;
412
+ asset: {
413
+ id: string;
414
+ source: string;
415
+ name: string;
416
+ alt_text?: string;
417
+ size_bytes: number;
418
+ mime_type?: string;
419
+ url?: string;
420
+ created_at: string;
421
+ };
422
+ created_at: string;
423
+ }
424
+ interface CatalogCategory {
425
+ id: string;
426
+ workspace_id: string;
427
+ name: string;
428
+ slug: string;
429
+ description?: string;
430
+ is_active: boolean;
431
+ sort_order: number;
432
+ product_count: number;
433
+ metadata: unknown;
434
+ created_at: string;
435
+ updated_at: string;
436
+ }
437
+ interface CatalogCollection {
438
+ id: string;
439
+ workspace_id: string;
440
+ title: string;
441
+ slug: string;
442
+ description?: string;
443
+ product_count?: number;
444
+ created_at: string;
445
+ updated_at: string;
446
+ }
447
+ interface CatalogBrand {
448
+ id: string;
449
+ workspace_id: string;
450
+ name: string;
451
+ slug: string;
452
+ description?: string;
453
+ website_url?: string;
454
+ is_active: boolean;
455
+ sort_order: number;
456
+ metadata: unknown;
457
+ created_at: string;
458
+ updated_at: string;
459
+ }
460
+ interface CatalogProduct {
461
+ id: string;
462
+ slug: string;
463
+ title: string;
464
+ price_cents: number;
465
+ currency: string;
466
+ base_price_cents?: number;
467
+ base_currency?: string;
468
+ price_source?: string;
469
+ fx_rate?: number;
470
+ fx_provider?: string;
471
+ fx_quoted_at?: string;
472
+ primary_image_url?: string;
473
+ status: string;
474
+ }
475
+ interface CatalogProductsResponse {
476
+ products: CatalogProduct[];
477
+ count: number;
478
+ }
479
+ interface Review {
480
+ id: string;
481
+ rating: number;
482
+ author_name: string;
483
+ author_email: string;
484
+ title: string;
485
+ body: string;
486
+ status: "pending" | "published" | "rejected";
487
+ source?: string;
488
+ created_at?: string;
489
+ [key: string]: unknown;
490
+ }
491
+ interface PublicSubmitReviewInput {
492
+ rating: number;
493
+ author_name?: string;
494
+ author_email?: string;
495
+ title?: string;
496
+ body?: string;
497
+ source?: string;
498
+ }
499
+ interface ReviewSummaryResponse {
500
+ summary: {
501
+ review_count: number;
502
+ average_rating: number;
503
+ };
504
+ }
505
+ interface LeadResponse {
506
+ id: string;
507
+ workspace_id: string;
508
+ name: string;
509
+ email: string;
510
+ phone?: string;
511
+ message?: string;
512
+ source: string;
513
+ status: string;
514
+ meta?: Record<string, unknown>;
515
+ created_at: string;
516
+ updated_at: string;
517
+ }
518
+ interface SiteSubject {
519
+ kind: "workspace";
520
+ id: string;
521
+ dash_id?: string;
522
+ display_name?: string;
523
+ }
524
+ interface SiteResolvedDocument {
525
+ state: "resolved";
526
+ subject: SiteSubject;
527
+ page: {
528
+ id: string;
529
+ workspace_id: string;
530
+ slug: string;
531
+ title: string;
532
+ layout_state?: unknown;
533
+ draft_state?: unknown;
534
+ [key: string]: unknown;
535
+ };
536
+ surface?: Record<string, unknown>;
537
+ route_params?: Record<string, string>;
538
+ theme?: Record<string, unknown> | null;
539
+ navigation: {
540
+ main_menu?: Record<string, unknown> | null;
541
+ footer_menu?: Record<string, unknown> | null;
542
+ };
543
+ init: PublicWorkspaceInit;
544
+ seo?: {
545
+ title?: string;
546
+ description?: string;
547
+ };
548
+ revisions?: Record<string, string | undefined>;
549
+ cache_control?: {
550
+ etag?: string;
551
+ max_age?: number;
552
+ };
553
+ }
554
+ interface SiteGatedDocument {
555
+ state: "gated";
556
+ subject: SiteSubject;
557
+ gate: {
558
+ kind: "private";
559
+ };
560
+ }
561
+ type SiteDocument = SiteResolvedDocument | SiteGatedDocument;
562
+ interface MenuItem {
563
+ id: string;
564
+ parent_id?: string;
565
+ title: string;
566
+ url: string;
567
+ resource_type?: string;
568
+ resource_id?: string;
569
+ position: number;
570
+ target?: Record<string, unknown>;
571
+ [key: string]: unknown;
572
+ }
573
+ interface Menu {
574
+ id: string;
575
+ workspace_id: string;
576
+ handle: string;
577
+ title: string;
578
+ items?: MenuItem[];
579
+ [key: string]: unknown;
580
+ }
581
+ interface MenuResponse {
582
+ menu: Menu;
583
+ }
584
+ interface BlogPost {
585
+ id: string;
586
+ workspace_id: string;
587
+ slug: string;
588
+ title: string;
589
+ status: string;
590
+ excerpt?: string;
591
+ cover_image_url?: string;
592
+ content?: unknown;
593
+ published_at?: string;
594
+ created_at?: string;
595
+ updated_at?: string;
596
+ [key: string]: unknown;
597
+ }
598
+ interface BlogPostResponse {
599
+ post: BlogPost;
600
+ }
601
+ interface GivingEntry {
602
+ id: string;
603
+ workspace_id: string;
604
+ slug: string;
605
+ title: string;
606
+ subtitle?: string;
607
+ variant: string;
608
+ default_amount_cents: number;
609
+ suggested_amounts_cents?: number[];
610
+ allow_custom_amount: boolean;
611
+ cta_label?: string;
612
+ is_active: boolean;
613
+ created_at: string;
614
+ updated_at: string;
615
+ }
616
+ interface GivingIntent {
617
+ id: string;
618
+ workspace_id: string;
619
+ status: string;
620
+ variant: string;
621
+ title: string;
622
+ description?: string;
623
+ currency: string;
624
+ amount_cents: number;
625
+ is_recurring: boolean;
626
+ is_anonymous: boolean;
627
+ display_name?: string;
628
+ email?: string;
629
+ message?: string;
630
+ session_id?: string;
631
+ recurring_agreement_id?: string;
632
+ source_invoice_id?: string;
633
+ created_at: string;
634
+ updated_at: string;
635
+ refunded_at?: string;
636
+ }
637
+ interface GivingIntentListResponse {
638
+ items: GivingIntent[];
639
+ }
640
+ interface SavedAddress {
641
+ id: string;
642
+ label: string;
643
+ name: string;
644
+ phone: string;
645
+ line1: string;
646
+ line2: string;
647
+ city: string;
648
+ region: string;
649
+ postal_code: string;
650
+ country_code: string;
651
+ is_default: boolean;
652
+ created_at: string;
653
+ updated_at: string;
654
+ }
655
+ interface SavedAddressInput {
656
+ name: string;
657
+ line1: string;
658
+ city: string;
659
+ country_code: string;
660
+ label?: string;
661
+ phone?: string;
662
+ line2?: string;
663
+ region?: string;
664
+ postal_code?: string;
665
+ is_default?: boolean;
666
+ }
667
+ type SavedAddressUpdateInput = SavedAddressInput;
668
+ interface SavedAddressResponse {
669
+ address: SavedAddress;
670
+ }
671
+ interface SavedPaymentMethod {
672
+ id: string;
673
+ provider: string;
674
+ status: string;
675
+ is_default: boolean;
676
+ display_brand?: string;
677
+ display_last4?: string;
678
+ exp_month?: number;
679
+ exp_year?: number;
680
+ created_at: string;
681
+ updated_at: string;
682
+ }
683
+ interface PaymentMethodSetupInput {
684
+ provider: string;
685
+ consent: boolean;
686
+ consent_version: "saved_payment_method_v1";
687
+ }
688
+ interface PaymentMethodSetupResult {
689
+ type: string;
690
+ client_secret?: string;
691
+ publishable_key?: string;
692
+ }
693
+ interface PaymentMethodConfirmInput {
694
+ provider: string;
695
+ setup_intent_id?: string;
696
+ payment_method_id?: string;
697
+ }
698
+ interface PaymentMethodMutationResponse {
699
+ success: boolean;
700
+ }
701
+ interface SubscriptionAgreement {
702
+ id: string;
703
+ workspace_id: string;
704
+ source_kind: string;
705
+ source_id: string;
706
+ end_user_ref?: string;
707
+ status: string;
708
+ provider: string;
709
+ provider_ref?: string;
710
+ provider_customer_ref?: string;
711
+ plan_id?: string;
712
+ initial_invoice_id?: string;
713
+ currency: string;
714
+ amount_cents: number;
715
+ interval: string;
716
+ current_period_start?: string;
717
+ current_period_end?: string;
718
+ trial_ends_at?: string;
719
+ cancel_at_period_end: boolean;
720
+ canceled_at?: string;
721
+ meta?: Record<string, unknown>;
722
+ created_at: string;
723
+ updated_at: string;
724
+ }
725
+ interface SubscriptionAgreementResponse {
726
+ agreement: SubscriptionAgreement;
727
+ }
728
+ interface SubscriptionListResponse {
729
+ items: SubscriptionAgreement[];
730
+ has_more: boolean;
731
+ next_cursor?: string;
732
+ }
733
+ interface SubscriptionInvoice {
734
+ id: string;
735
+ workspace_id: string;
736
+ agreement_id: string;
737
+ source_kind: string;
738
+ source_id: string;
739
+ invoice_number: string;
740
+ status: string;
741
+ currency: string;
742
+ subtotal_cents: number;
743
+ tax_cents: number;
744
+ total_cents: number;
745
+ paid_cents: number;
746
+ period_start?: string;
747
+ period_end?: string;
748
+ due_at?: string;
749
+ paid_at?: string;
750
+ payment_id?: string;
751
+ attempt_count: number;
752
+ failure_code?: string;
753
+ failure_message?: string;
754
+ meta?: Record<string, unknown>;
755
+ created_at: string;
756
+ updated_at: string;
757
+ }
758
+ interface SubscriptionInvoiceResponse {
759
+ invoice: SubscriptionInvoice;
760
+ }
761
+ interface SubscriptionInvoiceListResponse {
762
+ items: SubscriptionInvoice[];
763
+ has_more: boolean;
764
+ next_cursor?: string;
765
+ }
766
+ interface SubscriptionSourceDisplay {
767
+ source_app: string;
768
+ source_kind: string;
769
+ source_id: string;
770
+ app_label: string;
771
+ object_label: string;
772
+ subtitle?: string;
773
+ variant?: string;
774
+ admin_href?: string;
775
+ customer_href?: string;
776
+ status?: string;
777
+ }
778
+ interface SubscriptionSourceResponse {
779
+ source_display: SubscriptionSourceDisplay;
780
+ }
781
+ interface StartGivingInput {
782
+ variant?: string;
783
+ title?: string;
784
+ description?: string;
785
+ amount_cents: number;
786
+ currency?: string;
787
+ is_recurring?: boolean;
788
+ is_anonymous?: boolean;
789
+ display_name?: string;
790
+ email?: string;
791
+ message?: string;
792
+ success_url?: string;
793
+ cancel_url?: string;
794
+ }
795
+ interface StartGivingResponse {
796
+ giving: GivingIntent;
797
+ /** Present for one-time gifts. Recurring gifts start an account agreement. */
798
+ session?: {
799
+ session_id: string;
800
+ url: string;
801
+ payment_intent_id?: string;
802
+ };
803
+ }
804
+ /** Public, fail-closed view of the platform payment-collection cutoff. */
805
+ interface PaymentCollectionAvailability {
806
+ available: boolean;
807
+ code?: "payment_collection_disabled" | "payment_collection_unavailable";
808
+ message?: string;
809
+ }
810
+ interface PublicPaymentLink {
811
+ id: string;
812
+ title: string;
813
+ description?: string;
814
+ amount_cents: number;
815
+ currency: string;
816
+ allow_custom_amount: boolean;
817
+ minimum_amount_cents?: number;
818
+ maximum_amount_cents?: number;
819
+ }
820
+ interface PublicPaymentLinkResponse {
821
+ payment_link: PublicPaymentLink;
822
+ }
823
+ interface PaymentLinkCheckoutInput {
824
+ /** Omit for fixed-price links. Required when a custom-price link has no default. */
825
+ amount_cents?: number;
826
+ customer_email?: string;
827
+ customer_name?: string;
828
+ }
829
+ type PaymentLinkRedemptionStatus = "pending" | "checkout_ready" | "succeeded" | "failed" | "refunded" | "disputed" | "charged_back";
830
+ interface PaymentLinkCheckoutResponse {
831
+ redemption_id: string;
832
+ status: PaymentLinkRedemptionStatus;
833
+ session: {
834
+ session_id: string;
835
+ url: string;
836
+ payment_intent_id?: string;
837
+ };
838
+ }
839
+ interface PaymentLinkRedemptionStatusResponse {
840
+ redemption_id: string;
841
+ status: PaymentLinkRedemptionStatus;
842
+ failure_code?: string;
843
+ }
844
+ interface PrintPerPagePricing {
845
+ bw_cents: number;
846
+ colour_cents: number;
847
+ }
848
+ interface PrintPaperSize {
849
+ key: string;
850
+ label: string;
851
+ surcharge_cents: number;
852
+ enabled: boolean;
853
+ }
854
+ interface PrintPricingOption {
855
+ key: string;
856
+ label: string;
857
+ type: string;
858
+ surcharge_cents: number;
859
+ }
860
+ interface PrintPricing {
861
+ base_fee_cents: number;
862
+ per_page: PrintPerPagePricing;
863
+ paper_sizes: PrintPaperSize[];
864
+ options: PrintPricingOption[];
865
+ min_total_cents: number;
866
+ }
867
+ interface PrintBranding {
868
+ display_name?: string;
869
+ logo_url?: string;
870
+ accent?: string;
871
+ instructions?: string;
872
+ }
873
+ interface PrintIntakeLimits {
874
+ max_files: number;
875
+ max_file_bytes: number;
876
+ max_total_bytes: number;
877
+ allowed_extensions: string[];
878
+ }
879
+ interface PrintSettingsResponse {
880
+ accepting: boolean;
881
+ currency: string;
882
+ retention_days: number;
883
+ pricing: PrintPricing;
884
+ branding: PrintBranding;
885
+ intake_limits: PrintIntakeLimits;
886
+ }
887
+ interface PrintOptionsSelection {
888
+ paper_size: string;
889
+ colour: boolean;
890
+ pages: number;
891
+ copies: number;
892
+ extras?: Record<string, boolean>;
893
+ }
894
+ interface PrintPriceLine {
895
+ label: string;
896
+ amount_cents: number;
897
+ }
898
+ interface PrintPriceBreakdown {
899
+ lines: PrintPriceLine[];
900
+ total_cents: number;
901
+ currency: string;
902
+ }
903
+ interface PrintQuoteResponse {
904
+ price_cents: number;
905
+ currency: string;
906
+ breakdown: PrintPriceBreakdown;
907
+ }
908
+ interface PrintIntakeInput {
909
+ name: string;
910
+ email?: string;
911
+ phone?: string;
912
+ notes?: string;
913
+ options: PrintOptionsSelection;
914
+ files: Array<{
915
+ blob: Blob;
916
+ filename: string;
917
+ }>;
918
+ }
919
+ interface PrintJobFile {
920
+ id: string;
921
+ job_id: string;
922
+ file_name: string;
923
+ mime_type: string;
924
+ size_bytes: number;
925
+ page_count?: number;
926
+ sort_order: number;
927
+ created_at: string;
928
+ }
929
+ interface PrintJob {
930
+ id: string;
931
+ workspace_id: string;
932
+ reference: string;
933
+ customer_name: string;
934
+ customer_email?: string;
935
+ customer_phone?: string;
936
+ status: string;
937
+ payment_status: string;
938
+ payment_method: string;
939
+ options: PrintOptionsSelection;
940
+ price_cents: number;
941
+ currency: string;
942
+ price_breakdown: PrintPriceBreakdown;
943
+ notes?: string;
944
+ file_count?: number;
945
+ version: number;
946
+ files?: PrintJobFile[];
947
+ created_at: string;
948
+ updated_at: string;
949
+ }
950
+ interface DiningAvailabilityRule {
951
+ days?: string[];
952
+ start?: string;
953
+ end?: string;
954
+ starts_on?: string;
955
+ ends_on?: string;
956
+ }
957
+ interface DiningAvailability {
958
+ timezone?: string;
959
+ rules?: DiningAvailabilityRule[];
960
+ is_available_now: boolean;
961
+ next_change_at?: string;
962
+ }
963
+ interface DiningItemSize {
964
+ id: string;
965
+ name: string;
966
+ price_cents: number;
967
+ is_default: boolean;
968
+ sort_order: number;
969
+ is_active: boolean;
970
+ }
971
+ interface DiningModifier {
972
+ id: string;
973
+ name: string;
974
+ description?: string;
975
+ price_delta_cents: number;
976
+ is_default: boolean;
977
+ sort_order: number;
978
+ is_active: boolean;
979
+ }
980
+ interface DiningModifierGroup {
981
+ id: string;
982
+ name: string;
983
+ description?: string;
984
+ selection_type: string;
985
+ is_required: boolean;
986
+ min_selections: number;
987
+ max_selections?: number;
988
+ sort_order: number;
989
+ is_active: boolean;
990
+ modifiers: DiningModifier[];
991
+ }
992
+ interface DiningOfferBadge {
993
+ offer_id: string;
994
+ label: string;
995
+ type: string;
996
+ is_featured: boolean;
997
+ display_priority: number;
998
+ }
999
+ interface DiningComboChoice {
1000
+ id: string;
1001
+ item: {
1002
+ id: string;
1003
+ slug: string;
1004
+ name: string;
1005
+ description?: string;
1006
+ base_price_cents: number;
1007
+ image_url?: string;
1008
+ image_alt: string;
1009
+ badges: string[];
1010
+ status: string;
1011
+ dietary_flags: string[];
1012
+ allergens: string[];
1013
+ calories?: number;
1014
+ prep_time_mins?: number;
1015
+ spice_level?: number;
1016
+ kitchen_station?: string;
1017
+ sizes: DiningItemSize[];
1018
+ modifier_groups: DiningModifierGroup[];
1019
+ };
1020
+ label_override?: string;
1021
+ description_override?: string;
1022
+ price_delta_cents: number;
1023
+ is_default: boolean;
1024
+ sort_order: number;
1025
+ is_active: boolean;
1026
+ is_available: boolean;
1027
+ }
1028
+ interface DiningComboGroup {
1029
+ id: string;
1030
+ name: string;
1031
+ description?: string;
1032
+ min_selections: number;
1033
+ max_selections?: number;
1034
+ allow_repeats: boolean;
1035
+ sort_order: number;
1036
+ is_active: boolean;
1037
+ choices: DiningComboChoice[];
1038
+ }
1039
+ interface DiningOffer {
1040
+ id: string;
1041
+ name: string;
1042
+ badge_label?: string;
1043
+ type: string;
1044
+ code?: string;
1045
+ is_featured: boolean;
1046
+ display_priority: number;
1047
+ image_url?: string;
1048
+ availability?: DiningAvailability;
1049
+ is_active: boolean;
1050
+ }
1051
+ interface DiningMenuItem {
1052
+ id: string;
1053
+ slug: string;
1054
+ name: string;
1055
+ description?: string;
1056
+ item_kind: string;
1057
+ price_cents: number;
1058
+ price_from_cents: number;
1059
+ image_url?: string;
1060
+ image_alt: string;
1061
+ badges: string[];
1062
+ is_featured: boolean;
1063
+ is_available: boolean;
1064
+ status: string;
1065
+ dietary_flags: string[];
1066
+ allergens: string[];
1067
+ calories?: number;
1068
+ prep_time_mins?: number;
1069
+ spice_level?: number;
1070
+ sizes: DiningItemSize[];
1071
+ modifier_groups: DiningModifierGroup[];
1072
+ offer_badges: DiningOfferBadge[];
1073
+ combo_groups?: DiningComboGroup[];
1074
+ }
1075
+ interface DiningMenu {
1076
+ dash_id: string;
1077
+ workspace_id: string;
1078
+ board: {
1079
+ id: string;
1080
+ slug: string;
1081
+ name: string;
1082
+ description?: string;
1083
+ currency: string;
1084
+ applicable_order_types: string[];
1085
+ availability?: DiningAvailability;
1086
+ is_active: boolean;
1087
+ };
1088
+ sections: Array<{
1089
+ id: string;
1090
+ name: string;
1091
+ description?: string;
1092
+ sort_order: number;
1093
+ availability?: DiningAvailability;
1094
+ is_active: boolean;
1095
+ items: DiningMenuItem[];
1096
+ }>;
1097
+ offers: DiningOffer[];
1098
+ generated_at: string;
1099
+ }
1100
+ /** The published theme, as served to a channel that owns its own routing and
1101
+ * therefore never calls `site.resolve` (which otherwise bundles it). */
1102
+ interface ThemeResponse {
1103
+ theme: Record<string, unknown> | null;
1104
+ }
1105
+ interface Customer {
1106
+ id: string;
1107
+ email: string;
1108
+ name: string;
1109
+ email_verified?: boolean;
1110
+ is_active?: boolean;
1111
+ [key: string]: unknown;
1112
+ }
1113
+ /** Returned by verify-code and refresh. `access_token` is the session. */
1114
+ interface CustomerSession {
1115
+ access_token: string;
1116
+ refresh_token: string;
1117
+ token_type: string;
1118
+ expires_at: string;
1119
+ end_user: Customer;
1120
+ }
1121
+ interface CustomerSignupResponse {
1122
+ end_user: Customer;
1123
+ created: boolean;
1124
+ requires_email_verification: boolean;
1125
+ }
1126
+ interface SendCodeResponse {
1127
+ status: string;
1128
+ purpose: string;
1129
+ }
1130
+ interface CustomerResponse {
1131
+ end_user: Customer;
1132
+ }
1133
+ interface CustomerAuthSession {
1134
+ id: string;
1135
+ auth_method: string;
1136
+ device_type: string;
1137
+ browser_name: string;
1138
+ os_name: string;
1139
+ country_code?: string;
1140
+ created_at: string;
1141
+ last_seen_at: string;
1142
+ expires_at: string;
1143
+ revoked_at?: string;
1144
+ current: boolean;
1145
+ }
1146
+ interface CustomerSecurityActivity {
1147
+ id: string;
1148
+ event_type: string;
1149
+ category: string;
1150
+ severity: string;
1151
+ outcome: string;
1152
+ country_code?: string;
1153
+ session_id?: string;
1154
+ metadata?: Record<string, unknown>;
1155
+ occurred_at: string;
1156
+ }
1157
+ interface CustomerSecurityActivityPage {
1158
+ items: CustomerSecurityActivity[];
1159
+ next_cursor?: string;
1160
+ has_more: boolean;
1161
+ }
1162
+ interface ChannelGeo {
1163
+ country: string;
1164
+ countryName: string;
1165
+ currency: {
1166
+ code: string;
1167
+ symbol: string;
1168
+ };
1169
+ region: {
1170
+ code: string;
1171
+ name: string;
1172
+ currency: string;
1173
+ currencySymbol: string;
1174
+ locale: string;
1175
+ timezone: string;
1176
+ };
1177
+ ip: string;
1178
+ source: string;
1179
+ }
1180
+ interface Order {
1181
+ id: string;
1182
+ workspace_id?: string;
1183
+ order_number: string;
1184
+ cart_token?: string;
1185
+ channel_id?: string;
1186
+ status: string;
1187
+ payment_status: string;
1188
+ currency: string;
1189
+ source?: string;
1190
+ customer_email?: string;
1191
+ customer_name?: string;
1192
+ subtotal_cents?: number;
1193
+ shipping_amount_cents?: number;
1194
+ tax_amount_cents?: number;
1195
+ total_cents: number;
1196
+ items?: OrderItem[];
1197
+ version?: number;
1198
+ created_at: string;
1199
+ updated_at?: string;
1200
+ [key: string]: unknown;
1201
+ }
1202
+ interface OrderItem {
1203
+ id: string;
1204
+ order_id: string;
1205
+ product_id?: string;
1206
+ variant_id?: string;
1207
+ product_slug?: string;
1208
+ variant_title?: string;
1209
+ thumbnail_url?: string;
1210
+ title: string;
1211
+ quantity: number;
1212
+ unit_price_cents: number;
1213
+ line_total_cents: number;
1214
+ /** Stripe product tax code, snapshotted from the product at order time. */
1215
+ tax_code?: string;
1216
+ [key: string]: unknown;
1217
+ }
1218
+ interface CartResponse {
1219
+ order: Order;
1220
+ }
1221
+ interface AddCartItemInput {
1222
+ cart_token?: string;
1223
+ currency?: string;
1224
+ product_id: string;
1225
+ variant_id?: string;
1226
+ quantity: number;
1227
+ }
1228
+ interface UpdateCartItemInput {
1229
+ cart_token: string;
1230
+ quantity: number;
1231
+ }
1232
+ interface MergeCartInput {
1233
+ source_cart_token: string;
1234
+ target_cart_token: string;
1235
+ currency?: string;
1236
+ }
1237
+ interface CheckoutCustomerInput {
1238
+ cart_token: string;
1239
+ email: string;
1240
+ name: string;
1241
+ }
1242
+ interface CheckoutAddress {
1243
+ name?: string;
1244
+ phone?: string;
1245
+ line1: string;
1246
+ line2?: string;
1247
+ city: string;
1248
+ region?: string;
1249
+ postal_code?: string;
1250
+ country_code: string;
1251
+ }
1252
+ interface CheckoutAddressesInput {
1253
+ cart_token: string;
1254
+ shipping: CheckoutAddress;
1255
+ billing?: CheckoutAddress;
1256
+ }
1257
+ interface CheckoutFulfillmentInput {
1258
+ cart_token: string;
1259
+ method: "shipping" | "pickup";
1260
+ shipping_method_id?: string;
1261
+ }
1262
+ interface CheckoutPayInput {
1263
+ cart_token: string;
1264
+ return_url?: string;
1265
+ }
1266
+ interface CheckoutCancelInput {
1267
+ cart_token: string;
1268
+ }
1269
+ interface PaymentMethodOption {
1270
+ provider: string;
1271
+ name: string;
1272
+ type: string;
1273
+ is_available: boolean;
1274
+ [key: string]: unknown;
1275
+ }
1276
+ interface PaymentReadiness {
1277
+ ready: boolean;
1278
+ mode: string;
1279
+ reasons?: string[];
1280
+ providers_available?: string[];
1281
+ connect_required?: boolean;
1282
+ connect_configured?: boolean;
1283
+ }
1284
+ interface ShippingMethodOption {
1285
+ id: string;
1286
+ name?: string;
1287
+ code?: string;
1288
+ amount_cents?: number;
1289
+ [key: string]: unknown;
1290
+ }
1291
+ interface CheckoutOptions {
1292
+ checkout_variant: string;
1293
+ order: Order;
1294
+ checkout_active?: boolean;
1295
+ shipping_methods?: ShippingMethodOption[];
1296
+ payment_methods?: PaymentMethodOption[];
1297
+ payment_ready?: boolean;
1298
+ payment_readiness?: PaymentReadiness;
1299
+ [key: string]: unknown;
1300
+ }
1301
+ type CheckoutStatus = "finalizing" | "completed" | "failed" | "not_found";
1302
+ interface CheckoutStatusResponse {
1303
+ status: CheckoutStatus;
1304
+ order_status?: string;
1305
+ payment_status?: string;
1306
+ payment_reference?: string;
1307
+ updated_at?: string;
1308
+ reasons?: string[];
1309
+ [key: string]: unknown;
1310
+ }
1311
+ interface CheckoutPayResponse {
1312
+ order: Order;
1313
+ session?: Record<string, unknown>;
1314
+ checkout_variant?: string;
1315
+ payment?: Record<string, unknown>;
1316
+ status?: string;
1317
+ provider_ref?: string;
1318
+ checkout_session_id?: string;
1319
+ redirect_url?: string;
1320
+ [key: string]: unknown;
1321
+ }
1322
+ interface OrderSummary {
1323
+ base_currency: string;
1324
+ total_orders: number;
1325
+ [key: string]: unknown;
1326
+ }
1327
+ /** What the door reports about the token you just used. */
1328
+ interface ChannelPing {
1329
+ channel_id: string;
1330
+ workspace_id: string;
1331
+ dash_id: string;
1332
+ scope: "workspace" | "dash";
1333
+ api_version: string;
1334
+ attestation?: string;
1335
+ }
1336
+ /** A subscription plan a workspace offers. Mirrors Go PlanOffer. */
1337
+ interface SubscriptionPlanOffer {
1338
+ id: string;
1339
+ workspace_id: string;
1340
+ title: string;
1341
+ description?: string;
1342
+ currency: string;
1343
+ amount_cents: number;
1344
+ interval: string;
1345
+ is_active: boolean;
1346
+ created_at: string;
1347
+ updated_at: string;
1348
+ }
1349
+ interface SubscriptionPlanListResponse {
1350
+ items: SubscriptionPlanOffer[];
1351
+ }
1352
+ interface SubscriptionPlanResponse {
1353
+ plan: SubscriptionPlanOffer;
1354
+ }
1355
+ /** Customer-controlled subscription acquisition. Price and terms come from the plan. */
1356
+ interface StartSubscriptionInput {
1357
+ plan_id: string;
1358
+ }
1359
+
1360
+ export type { StartGivingResponse as $, AddCartItemInput as A, PublicPageSummary as B, CartResponse as C, DashProfileResponse as D, PublicPage as E, Product as F, ProductAsset as G, CatalogCategory as H, CatalogProductsResponse as I, CatalogCollection as J, CatalogBrand as K, ListResponse as L, MergeCartInput as M, ReviewSummaryResponse as N, Order as O, PaymentCollectionAvailability as P, PublicSubmitReviewInput as Q, Review as R, SiteDocument as S, ThemeResponse as T, UpdateCartItemInput as U, MenuResponse as V, WaitlistVerification as W, BlogPost as X, BlogPostResponse as Y, GivingEntry as Z, StartGivingInput as _, CheckoutOptions as a, DiningOfferBadge as a$, SubscriptionPlanListResponse as a0, SubscriptionPlanResponse as a1, PublicPaymentLinkResponse as a2, PaymentLinkCheckoutInput as a3, PaymentLinkCheckoutResponse as a4, PaymentLinkRedemptionStatusResponse as a5, PrintSettingsResponse as a6, PrintOptionsSelection as a7, PrintQuoteResponse as a8, PrintIntakeInput as a9, CatalogProduct as aA, CheckoutAddress as aB, CheckoutStatus as aC, Customer as aD, CustomerSecurityActivity as aE, DashBrandingInfo as aF, DashDirectoryProfile as aG, DashLeadPortalMatch as aH, DashLeadPortalMovingSummary as aI, DashLeadPortalRequest as aJ, DashLeadPortalRequestStatus as aK, DashLocaleInfo as aL, DashPlan as aM, DashPlanPricing as aN, DashPlanRegion as aO, DashPublicPage as aP, DashPublicProfileInfo as aQ, DashTenantInfo as aR, DiningAvailability as aS, DiningAvailabilityRule as aT, DiningComboChoice as aU, DiningComboGroup as aV, DiningItemSize as aW, DiningMenuItem as aX, DiningModifier as aY, DiningModifierGroup as aZ, DiningOffer as a_, PrintJob as aa, DiningMenu as ab, CustomerSignupResponse as ac, SendCodeResponse as ad, CustomerSession as ae, CustomerResponse as af, CustomerAuthSession as ag, CustomerSecurityActivityPage as ah, OrderSummary as ai, SavedAddress as aj, SavedAddressResponse as ak, SavedAddressInput as al, SavedAddressUpdateInput as am, SavedPaymentMethod as an, PaymentMethodSetupInput as ao, PaymentMethodSetupResult as ap, PaymentMethodConfirmInput as aq, PaymentMethodMutationResponse as ar, StartSubscriptionInput as as, SubscriptionAgreementResponse as at, SubscriptionListResponse as au, SubscriptionSourceResponse as av, SubscriptionInvoiceListResponse as aw, SubscriptionInvoiceResponse as ax, GivingIntentListResponse as ay, LeadResponse as az, CheckoutStatusResponse as b, GivingIntent as b0, Menu as b1, MenuItem as b2, OrderItem as b3, PaymentLinkRedemptionStatus as b4, PaymentMethodOption as b5, PaymentReadiness as b6, PrintBranding as b7, PrintIntakeLimits as b8, PrintJobFile as b9, PrintPaperSize as ba, PrintPerPagePricing as bb, PrintPriceBreakdown as bc, PrintPriceLine as bd, PrintPricing as be, PrintPricingOption as bf, PublicGate as bg, PublicPaymentLink as bh, PublicSiteSignals as bi, ShippingMethodOption as bj, SiteGatedDocument as bk, SiteRef as bl, SiteResolvedDocument as bm, SiteSubject as bn, SubscriptionAgreement as bo, SubscriptionInvoice as bp, SubscriptionPlanOffer as bq, SubscriptionSourceDisplay as br, WaitlistAttribution as bs, WorkspaceInfo as bt, CheckoutCustomerInput as c, CheckoutAddressesInput as d, CheckoutFulfillmentInput as e, CheckoutPayInput as f, CheckoutPayResponse as g, CheckoutCancelInput as h, ChannelPing as i, ChannelGeo as j, WaitlistUnsubscription as k, DashInitResponse as l, WaitlistGateStatus as m, WaitlistFormSettings as n, WaitlistSubmission as o, WaitlistAcknowledgement as p, DashPlansResponse as q, DashDirectoryRegion as r, DashDirectoryEntry as s, DashDirectoryProfileResponse as t, DashLead as u, DashLeadPortalRequestLinkInput as v, DashLeadPortalRequestLinkResponse as w, DashLeadPortalView as x, PublicWorkspaceInit as y, LightInitResponse as z };