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