@01.software/sdk 0.42.0 → 0.43.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +10 -4
  3. package/dist/client.cjs +99 -57
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +9 -6
  6. package/dist/client.d.ts +9 -6
  7. package/dist/client.js +99 -57
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-B-qVIBnJ.d.cts → collection-client-U70KizLf.d.cts} +3 -3
  10. package/dist/{collection-client-BhCMwIus.d.ts → collection-client-gWsA7BVP.d.ts} +3 -3
  11. package/dist/{const-pmHlwm3E.d.ts → const-BBynifk0.d.cts} +5 -5
  12. package/dist/{const-BiDujixF.d.cts → const-_WWHU-gX.d.ts} +5 -5
  13. package/dist/{index-B1UBDaKz.d.ts → index-DPi5NWU8.d.ts} +4 -4
  14. package/dist/{index-D78ki6Ij.d.cts → index-Dg4Y6Aq7.d.cts} +4 -4
  15. package/dist/index.cjs +111 -61
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +41 -8
  18. package/dist/index.d.ts +41 -8
  19. package/dist/index.js +111 -61
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-C7Ul4ElL.d.cts → payload-types-DLxkB7Mv.d.cts} +399 -27
  22. package/dist/{payload-types-C7Ul4ElL.d.ts → payload-types-DLxkB7Mv.d.ts} +399 -27
  23. package/dist/query.cjs +59 -7
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +59 -7
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/server.cjs +130 -57
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +12 -7
  34. package/dist/server.d.ts +12 -7
  35. package/dist/server.js +130 -57
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-ChV1t4ei.d.cts → types-B1ngKbWI.d.cts} +1 -1
  38. package/dist/{types-BL7M-EUV.d.cts → types-B9lGhZlB.d.ts} +95 -6
  39. package/dist/{types-Bf2iCjy8.d.ts → types-BiKNBwRA.d.ts} +1 -1
  40. package/dist/{types-D5dSNIGs.d.ts → types-Bpx5sYKo.d.cts} +95 -6
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.d.cts +1 -1
  44. package/dist/ui/video.d.ts +1 -1
  45. package/dist/webhook.cjs +3 -1
  46. package/dist/webhook.cjs.map +1 -1
  47. package/dist/webhook.d.cts +4 -4
  48. package/dist/webhook.d.ts +4 -4
  49. package/dist/webhook.js +3 -1
  50. package/dist/webhook.js.map +1 -1
  51. package/package.json +1 -1
@@ -61,6 +61,7 @@ interface Config {
61
61
  'shipping-policies': ShippingPolicy;
62
62
  'shipping-zones': ShippingZone;
63
63
  'tenant-commerce-config': TenantCommerceConfig;
64
+ markets: Market;
64
65
  customers: Customer;
65
66
  'customer-profiles': CustomerProfile;
66
67
  'customer-profile-stats': CustomerProfileStat;
@@ -119,6 +120,11 @@ interface Config {
119
120
  'event-tags': EventTag;
120
121
  'event-occurrences': EventOccurrence;
121
122
  'event-registrations': EventRegistration;
123
+ 'membership-plans': MembershipPlan;
124
+ 'customer-payment-methods': CustomerPaymentMethod;
125
+ 'customer-memberships': CustomerMembership;
126
+ 'membership-charges': MembershipCharge;
127
+ 'tenant-payment-credentials': TenantPaymentCredential;
122
128
  'direct-upload-sessions': DirectUploadSession;
123
129
  forms: Form;
124
130
  'form-submissions': FormSubmission;
@@ -251,6 +257,7 @@ interface Config {
251
257
  'shipping-policies': ShippingPoliciesSelect<false> | ShippingPoliciesSelect<true>;
252
258
  'shipping-zones': ShippingZonesSelect<false> | ShippingZonesSelect<true>;
253
259
  'tenant-commerce-config': TenantCommerceConfigSelect<false> | TenantCommerceConfigSelect<true>;
260
+ markets: MarketsSelect<false> | MarketsSelect<true>;
254
261
  customers: CustomersSelect<false> | CustomersSelect<true>;
255
262
  'customer-profiles': CustomerProfilesSelect<false> | CustomerProfilesSelect<true>;
256
263
  'customer-profile-stats': CustomerProfileStatsSelect<false> | CustomerProfileStatsSelect<true>;
@@ -309,6 +316,11 @@ interface Config {
309
316
  'event-tags': EventTagsSelect<false> | EventTagsSelect<true>;
310
317
  'event-occurrences': EventOccurrencesSelect<false> | EventOccurrencesSelect<true>;
311
318
  'event-registrations': EventRegistrationsSelect<false> | EventRegistrationsSelect<true>;
319
+ 'membership-plans': MembershipPlansSelect<false> | MembershipPlansSelect<true>;
320
+ 'customer-payment-methods': CustomerPaymentMethodsSelect<false> | CustomerPaymentMethodsSelect<true>;
321
+ 'customer-memberships': CustomerMembershipsSelect<false> | CustomerMembershipsSelect<true>;
322
+ 'membership-charges': MembershipChargesSelect<false> | MembershipChargesSelect<true>;
323
+ 'tenant-payment-credentials': TenantPaymentCredentialsSelect<false> | TenantPaymentCredentialsSelect<true>;
312
324
  'direct-upload-sessions': DirectUploadSessionsSelect<false> | DirectUploadSessionsSelect<true>;
313
325
  forms: FormsSelect<false> | FormsSelect<true>;
314
326
  'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
@@ -545,6 +557,10 @@ interface Tenant {
545
557
  draftPath?: string | null;
546
558
  id?: string | null;
547
559
  }[] | null;
560
+ /**
561
+ * Base currency for the tenant store.
562
+ */
563
+ shopCurrency?: string | null;
548
564
  /**
549
565
  * Tenant owner. Only the owner can delete the tenant or transfer ownership.
550
566
  */
@@ -552,7 +568,7 @@ interface Tenant {
552
568
  /**
553
569
  * Only features checked above will be enabled for this tenant.
554
570
  */
555
- enabledFeatures?: ('ecommerce' | 'customers' | 'playlists' | 'galleries' | 'links' | 'forms' | 'articles' | 'documents' | 'canvas' | 'videos' | 'live-streaming' | 'community' | 'events')[] | null;
571
+ enabledFeatures?: ('ecommerce' | 'customers' | 'playlists' | 'galleries' | 'links' | 'forms' | 'articles' | 'documents' | 'canvas' | 'videos' | 'live-streaming' | 'community' | 'events' | 'membership')[] | null;
556
572
  /**
557
573
  * Only selected relationship recipes are active for this tenant. Recipes whose required features are disabled keep their stored intent but remain inactive at runtime.
558
574
  */
@@ -562,7 +578,7 @@ interface Tenant {
562
578
  [k: string]: unknown;
563
579
  } | unknown[] | string | number | boolean | null;
564
580
  /**
565
- * Tenant status. Managed automatically.
581
+ * Tenant lifecycle status. Managed automatically.
566
582
  */
567
583
  status?: ('active' | 'paused' | 'past_due' | 'canceled' | 'pending_deletion') | null;
568
584
  /**
@@ -600,6 +616,14 @@ interface Tenant {
600
616
  * Allow customer email sends for this event.
601
617
  */
602
618
  returnRequested?: boolean | null;
619
+ /**
620
+ * Allow customer email sends for this event.
621
+ */
622
+ returnApproved?: boolean | null;
623
+ /**
624
+ * Allow customer email sends for this event.
625
+ */
626
+ returnRejected?: boolean | null;
603
627
  /**
604
628
  * Allow customer email sends for this event.
605
629
  */
@@ -853,7 +877,7 @@ interface EmailLog {
853
877
  * Commerce notification send audit metadata. Consent classification remains owned by recipientConsent.
854
878
  */
855
879
  commerceNotification?: {
856
- event?: ('orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnCompleted') | null;
880
+ event?: ('orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnApproved' | 'returnRejected' | 'returnCompleted') | null;
857
881
  intent?: (string | null) | CommerceNotificationIntent;
858
882
  dedupeKey?: string | null;
859
883
  order?: (string | null) | Order;
@@ -875,7 +899,7 @@ interface CommerceNotificationIntent {
875
899
  * Stable key that prevents duplicate notification intents within a tenant.
876
900
  */
877
901
  dedupeKey: string;
878
- event: 'orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnCompleted';
902
+ event: 'orderPaid' | 'orderCanceled' | 'fulfillmentShipped' | 'orderDelivered' | 'returnRequested' | 'returnApproved' | 'returnRejected' | 'returnCompleted';
879
903
  status: 'queued' | 'processing' | 'sent' | 'failed' | 'canceled';
880
904
  /**
881
905
  * Customer email address targeted by this notification.
@@ -1100,7 +1124,7 @@ interface Customer {
1100
1124
  defaultShippingAddress?: (string | null) | CustomerAddress;
1101
1125
  defaultBillingAddress?: (string | null) | CustomerAddress;
1102
1126
  /**
1103
- * Number of this customer's completed orders. Counted automatically.
1127
+ * Read-only number of this customer's completed orders. Counted automatically.
1104
1128
  */
1105
1129
  totalOrderCount?: number | null;
1106
1130
  lifetimeValue?: number | null;
@@ -1312,7 +1336,7 @@ interface CustomerProfile {
1312
1336
  tenant?: (string | null) | Tenant;
1313
1337
  customer: string | Customer;
1314
1338
  /**
1315
- * Public username shown like @01works. Must be unique within the workspace.
1339
+ * Public username shown like @01works. Store 3-30 characters without @, using lowercase ASCII letters, numbers, hyphens, or underscores, and keep it unique within the tenant.
1316
1340
  */
1317
1341
  handle?: string | null;
1318
1342
  displayName?: string | null;
@@ -1459,6 +1483,10 @@ interface Product {
1459
1483
  * Brand used for storefront filtering.
1460
1484
  */
1461
1485
  brand?: (string | null) | Brand;
1486
+ /**
1487
+ * Markets where this product is available. Leave empty to exclude it from market-aware catalogs.
1488
+ */
1489
+ markets?: (string | Market)[] | null;
1462
1490
  /**
1463
1491
  * Shipping policy for this product.
1464
1492
  */
@@ -2008,6 +2036,10 @@ interface Return {
2008
2036
  * Reason category for the return or refund request. Used for reporting and operations.
2009
2037
  */
2010
2038
  reason?: ('change_of_mind' | 'defective' | 'wrong_delivery' | 'damaged' | 'other') | null;
2039
+ /**
2040
+ * Structured return rejection reason code, set automatically on rejection and used in the customer notification.
2041
+ */
2042
+ rejectionReasonCode?: ('window_expired' | 'used_or_damaged' | 'non_returnable' | 'other') | null;
2011
2043
  /**
2012
2044
  * Detailed return reason
2013
2045
  */
@@ -2421,6 +2453,28 @@ interface BrandLogo {
2421
2453
  };
2422
2454
  };
2423
2455
  }
2456
+ /**
2457
+ * Manage selling countries, base currencies, and product availability.
2458
+ *
2459
+ * This interface was referenced by `Config`'s JSON-Schema
2460
+ * via the `definition` "markets".
2461
+ */
2462
+ interface Market {
2463
+ id: string;
2464
+ tenant?: (string | null) | Tenant;
2465
+ name: string;
2466
+ handle: string;
2467
+ countryCode: string;
2468
+ currency: string;
2469
+ isPrimary?: boolean | null;
2470
+ isActive?: boolean | null;
2471
+ metadata?: {
2472
+ [k: string]: unknown;
2473
+ } | unknown[] | string | number | boolean | null;
2474
+ updatedAt: string;
2475
+ createdAt: string;
2476
+ deletedAt?: string | null;
2477
+ }
2424
2478
  /**
2425
2479
  * Manage shipping fee rules and default shipping policies.
2426
2480
  *
@@ -2773,21 +2827,21 @@ interface ApiKey {
2773
2827
  */
2774
2828
  scopes?: ('read' | 'write' | 'webhook' | 'analytics' | 'super-admin')[] | null;
2775
2829
  /**
2776
- * User who issued the key.
2830
+ * User who issued the key for audit traceability.
2777
2831
  */
2778
2832
  createdBy?: (string | null) | User;
2779
2833
  /**
2780
- * IP address of the key creation request.
2834
+ * Privacy-bearing IP address of the key creation request.
2781
2835
  */
2782
2836
  createdByIp?: string | null;
2783
2837
  lastUsedAt?: string | null;
2784
2838
  /**
2785
- * Last IP address that used the key.
2839
+ * Privacy-bearing last IP address that used the key.
2786
2840
  */
2787
2841
  lastUsedIp?: string | null;
2788
2842
  revokedAt?: string | null;
2789
2843
  /**
2790
- * User who revoked the key.
2844
+ * User who revoked the key for audit traceability.
2791
2845
  */
2792
2846
  revokedBy?: (string | null) | User;
2793
2847
  /**
@@ -2823,17 +2877,17 @@ interface PersonalAccessToken {
2823
2877
  */
2824
2878
  defaultTenant?: string | null;
2825
2879
  /**
2826
- * IP address of the PAT creation request.
2880
+ * Privacy-bearing IP address of the PAT creation request.
2827
2881
  */
2828
2882
  createdByIp?: string | null;
2829
2883
  lastUsedAt?: string | null;
2830
2884
  /**
2831
- * Last IP address that used the PAT.
2885
+ * Privacy-bearing last IP address that used the PAT.
2832
2886
  */
2833
2887
  lastUsedIp?: string | null;
2834
2888
  revokedAt?: string | null;
2835
2889
  /**
2836
- * User who revoked the PAT.
2890
+ * User who revoked the PAT for audit traceability.
2837
2891
  */
2838
2892
  revokedBy?: (string | null) | User;
2839
2893
  /**
@@ -3004,7 +3058,7 @@ interface Webhook {
3004
3058
  /**
3005
3059
  * Receives create/update events for this collection.
3006
3060
  */
3007
- collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillment-orders' | 'fulfillment-order-items' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'post-tags' | 'customer-profile-stats' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags' | 'canvas-nodes' | 'canvas-edges';
3061
+ collection: 'tenant-metadata' | 'tenant-logos' | 'images' | 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-categories' | 'product-tags' | 'product-collections' | 'markets' | 'brands' | 'brand-logos' | 'orders' | 'order-items' | 'transactions' | 'fulfillment-orders' | 'fulfillment-order-items' | 'fulfillments' | 'fulfillment-items' | 'returns' | 'return-items' | 'carts' | 'cart-items' | 'discounts' | 'shipping-policies' | 'shipping-zones' | 'customers' | 'customer-profiles' | 'customer-addresses' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-items' | 'gallery-categories' | 'gallery-tags' | 'links' | 'link-categories' | 'link-tags' | 'forms' | 'form-submissions' | 'articles' | 'article-authors' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'canvases' | 'canvas-node-types' | 'canvas-edge-types' | 'canvas-categories' | 'canvas-tags' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'post-tags' | 'customer-profile-stats' | 'customer-profile-lists' | 'event-calendars' | 'events' | 'event-categories' | 'event-occurrences' | 'event-tags' | 'membership-plans' | 'canvas-nodes' | 'canvas-edges';
3008
3062
  id?: string | null;
3009
3063
  }[] | null;
3010
3064
  isActive?: boolean | null;
@@ -3296,7 +3350,7 @@ interface TenantEntitlement {
3296
3350
  priority: number;
3297
3351
  startsAt: string;
3298
3352
  /**
3299
- * Entitlement end date. Required for promo / trial sources.
3353
+ * Entitlement end date. Hook validation requires it for promo / trial sources.
3300
3354
  */
3301
3355
  endsAt?: string | null;
3302
3356
  reason?: string | null;
@@ -3452,7 +3506,7 @@ interface Plan {
3452
3506
  /**
3453
3507
  * Reference-only feature list; enforced elsewhere.
3454
3508
  */
3455
- featuresAllowed?: ('ecommerce' | 'customers' | 'playlists' | 'galleries' | 'links' | 'forms' | 'articles' | 'documents' | 'canvas' | 'videos' | 'live-streaming' | 'community' | 'events')[] | null;
3509
+ featuresAllowed?: ('ecommerce' | 'customers' | 'playlists' | 'galleries' | 'links' | 'forms' | 'articles' | 'documents' | 'canvas' | 'videos' | 'live-streaming' | 'community' | 'events' | 'membership')[] | null;
3456
3510
  /**
3457
3511
  * Reference-only quotas such as storageBytes; enforced by entitlement and usage policy elsewhere.
3458
3512
  */
@@ -3891,6 +3945,10 @@ interface CartItem {
3891
3945
  * Price at the time of adding to cart
3892
3946
  */
3893
3947
  unitPrice: number;
3948
+ /**
3949
+ * Shipping requirement snapshot from the time this line was added to the cart.
3950
+ */
3951
+ requiresShipping?: boolean | null;
3894
3952
  /**
3895
3953
  * Header discount allocated to this line. Calculated automatically.
3896
3954
  */
@@ -3931,6 +3989,10 @@ interface CheckoutItem {
3931
3989
  */
3932
3990
  unitPrice: number;
3933
3991
  totalPrice: number;
3992
+ /**
3993
+ * Shipping requirement snapshot from the time this checkout line was created.
3994
+ */
3995
+ requiresShipping?: boolean | null;
3934
3996
  discountAllocation?: number | null;
3935
3997
  discountedUnitPrice?: number | null;
3936
3998
  discountedTotalPrice?: number | null;
@@ -4039,6 +4101,10 @@ interface TenantCommerceConfig {
4039
4101
  multiReturnInitialShippingRefund?: 'once_only' | null;
4040
4102
  legacyOrderPolicyMode?: 'shipping_amount_manual_cap' | null;
4041
4103
  };
4104
+ /**
4105
+ * Non-shipping workspaces hide shipping setup, notifications, and order-view copy, and new variants start as non-shipping.
4106
+ */
4107
+ fulfillmentMode?: ('shipping' | 'none') | null;
4042
4108
  /**
4043
4109
  * Reusable option name and value lists for the Product Editor. Up to 20 presets.
4044
4110
  */
@@ -4082,15 +4148,15 @@ interface CustomerProfileStat {
4082
4148
  tenant?: (string | null) | Tenant;
4083
4149
  profile: string | CustomerProfile;
4084
4150
  /**
4085
- * Number of community posts authored by this profile. Counted automatically.
4151
+ * Read-only number of community posts authored by this profile. Counted automatically.
4086
4152
  */
4087
4153
  postCount?: number | null;
4088
4154
  /**
4089
- * Number of community comments authored by this profile. Counted automatically.
4155
+ * Read-only number of community comments authored by this profile. Counted automatically.
4090
4156
  */
4091
4157
  commentCount?: number | null;
4092
4158
  /**
4093
- * Number of community reactions made by this profile. Counted automatically.
4159
+ * Read-only number of community reactions made by this profile. Counted automatically.
4094
4160
  */
4095
4161
  reactionCount?: number | null;
4096
4162
  }
@@ -5588,11 +5654,11 @@ interface Post {
5588
5654
  */
5589
5655
  viewCount?: number | null;
5590
5656
  /**
5591
- * Number of comments on this post. Counted automatically.
5657
+ * Read-only number of comments on this post. Counted automatically.
5592
5658
  */
5593
5659
  commentCount?: number | null;
5594
5660
  /**
5595
- * Number of reactions on this post. Counted automatically.
5661
+ * Read-only number of reactions on this post. Counted automatically.
5596
5662
  */
5597
5663
  reactionCount?: number | null;
5598
5664
  /**
@@ -5726,7 +5792,7 @@ interface Comment {
5726
5792
  editedAt?: string | null;
5727
5793
  isEdited?: boolean | null;
5728
5794
  /**
5729
- * Number of reactions on this comment. Counted automatically.
5795
+ * Read-only number of reactions on this comment. Counted automatically.
5730
5796
  */
5731
5797
  reactionCount?: number | null;
5732
5798
  /**
@@ -5734,7 +5800,7 @@ interface Comment {
5734
5800
  */
5735
5801
  reportCount?: number | null;
5736
5802
  /**
5737
- * Number of replies to this comment. Counted automatically.
5803
+ * Read-only number of replies to this comment. Counted automatically.
5738
5804
  */
5739
5805
  replyCount?: number | null;
5740
5806
  metadata?: {
@@ -5864,7 +5930,6 @@ interface CommunityBan {
5864
5930
  */
5865
5931
  interface EventCalendar {
5866
5932
  id: string;
5867
- _order?: string | null;
5868
5933
  tenant?: (string | null) | Tenant;
5869
5934
  title?: string | null;
5870
5935
  /**
@@ -6134,6 +6199,9 @@ interface Event {
6134
6199
  */
6135
6200
  generateSlug?: boolean | null;
6136
6201
  slug?: string | null;
6202
+ /**
6203
+ * Only published events are public API and occurrence materialization candidates. Archived is an operator archive state; canceled marks a canceled event.
6204
+ */
6137
6205
  status?: ('draft' | 'published' | 'archived' | 'canceled') | null;
6138
6206
  coverImage?: (string | null) | Image;
6139
6207
  /**
@@ -6250,6 +6318,9 @@ interface EventOccurrence {
6250
6318
  * Occurrence end time.
6251
6319
  */
6252
6320
  endsAt: string;
6321
+ /**
6322
+ * IANA time zone used for occurrence identity. Existing occurrences cannot change it.
6323
+ */
6253
6324
  timezone?: string | null;
6254
6325
  isAllDay?: boolean | null;
6255
6326
  status?: ('scheduled' | 'canceled' | 'completed') | null;
@@ -6340,7 +6411,7 @@ interface EventRegistration {
6340
6411
  phone?: string | null;
6341
6412
  };
6342
6413
  /**
6343
- * Internal attendee email. This is PII and is hidden from publishable-key reads.
6414
+ * Internal attendee email PII. Duplicates the registration-time snapshot email for search/listing and is hidden from publishable-key reads.
6344
6415
  */
6345
6416
  attendeeEmail?: string | null;
6346
6417
  /**
@@ -6382,7 +6453,7 @@ interface EventRegistration {
6382
6453
  */
6383
6454
  guestTokenExpiresAt?: string | null;
6384
6455
  /**
6385
- * Retention deadline for attendee PII. Cleanup may redact PII after this timestamp.
6456
+ * Retention deadline for attendee PII. Owned by retention cleanup, which may redact PII after this timestamp.
6386
6457
  */
6387
6458
  piiRetentionUntil?: string | null;
6388
6459
  /**
@@ -6396,6 +6467,164 @@ interface EventRegistration {
6396
6467
  createdAt: string;
6397
6468
  deletedAt?: string | null;
6398
6469
  }
6470
+ /**
6471
+ * Manage paid membership plans and billing intervals.
6472
+ *
6473
+ * This interface was referenced by `Config`'s JSON-Schema
6474
+ * via the `definition` "membership-plans".
6475
+ */
6476
+ interface MembershipPlan {
6477
+ id: string;
6478
+ _order?: string | null;
6479
+ tenant?: (string | null) | Tenant;
6480
+ title?: string | null;
6481
+ /**
6482
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
6483
+ */
6484
+ generateSlug?: boolean | null;
6485
+ slug?: string | null;
6486
+ /**
6487
+ * Short summary for listing/cards
6488
+ */
6489
+ description?: string | null;
6490
+ /**
6491
+ * Charge amount (integer minor unit of currency)
6492
+ */
6493
+ price: number;
6494
+ currency: 'KRW' | 'USD' | 'EUR' | 'JPY';
6495
+ billingInterval: 'month' | 'year';
6496
+ /**
6497
+ * e.g. quarterly = month × 3
6498
+ */
6499
+ intervalCount: number;
6500
+ /**
6501
+ * Free trial days (optional)
6502
+ */
6503
+ trialDays?: number | null;
6504
+ /**
6505
+ * Customer group active members are auto-added to (benefit join point)
6506
+ */
6507
+ memberGroup: string | CustomerGroup;
6508
+ isActive?: boolean | null;
6509
+ displayOrder?: number | null;
6510
+ publicTitle?: string | null;
6511
+ publicDescription?: string | null;
6512
+ updatedAt: string;
6513
+ createdAt: string;
6514
+ deletedAt?: string | null;
6515
+ }
6516
+ /**
6517
+ * This interface was referenced by `Config`'s JSON-Schema
6518
+ * via the `definition` "customer-payment-methods".
6519
+ */
6520
+ interface CustomerPaymentMethod {
6521
+ id: string;
6522
+ tenant?: (string | null) | Tenant;
6523
+ customer: string | Customer;
6524
+ provider: string;
6525
+ /**
6526
+ * Pinned at issuance; the cron resolves the adapter from this
6527
+ */
6528
+ mode: 'connect' | 'backend-charge' | 'delegated';
6529
+ /**
6530
+ * Encrypted payment token (written in P2)
6531
+ */
6532
+ token?: string | null;
6533
+ customerRef?: string | null;
6534
+ connectedAccountRef?: string | null;
6535
+ submallRef?: string | null;
6536
+ channelRef?: string | null;
6537
+ card?: {
6538
+ last4?: string | null;
6539
+ brand?: string | null;
6540
+ };
6541
+ status: 'active' | 'revoked';
6542
+ revokedAt?: string | null;
6543
+ updatedAt: string;
6544
+ createdAt: string;
6545
+ deletedAt?: string | null;
6546
+ }
6547
+ /**
6548
+ * Review customer membership status and renewal schedules.
6549
+ *
6550
+ * This interface was referenced by `Config`'s JSON-Schema
6551
+ * via the `definition` "customer-memberships".
6552
+ */
6553
+ interface CustomerMembership {
6554
+ id: string;
6555
+ tenant?: (string | null) | Tenant;
6556
+ customer: string | Customer;
6557
+ plan: string | MembershipPlan;
6558
+ paymentMethod?: (string | null) | CustomerPaymentMethod;
6559
+ status: 'incomplete' | 'trialing' | 'active' | 'past_due' | 'cancelled' | 'expired';
6560
+ /**
6561
+ * Price snapshot at subscribe (renewals charge this)
6562
+ */
6563
+ amount?: number | null;
6564
+ currency?: ('KRW' | 'USD' | 'EUR' | 'JPY') | null;
6565
+ currentPeriodStart?: string | null;
6566
+ currentPeriodEnd?: string | null;
6567
+ nextBillingAt?: string | null;
6568
+ nextRetryAt?: string | null;
6569
+ cancelAtPeriodEnd?: boolean | null;
6570
+ startedAt?: string | null;
6571
+ cancelledAt?: string | null;
6572
+ pastDueAt?: string | null;
6573
+ failureCount?: number | null;
6574
+ /**
6575
+ * First-charge idempotency anchor (unique index added in migration)
6576
+ */
6577
+ subscribeIntentKey?: string | null;
6578
+ updatedAt: string;
6579
+ createdAt: string;
6580
+ deletedAt?: string | null;
6581
+ }
6582
+ /**
6583
+ * This interface was referenced by `Config`'s JSON-Schema
6584
+ * via the `definition` "membership-charges".
6585
+ */
6586
+ interface MembershipCharge {
6587
+ id: string;
6588
+ tenant?: (string | null) | Tenant;
6589
+ membership: string | CustomerMembership;
6590
+ customer?: (string | null) | Customer;
6591
+ amount: number;
6592
+ currency: 'KRW' | 'USD' | 'EUR' | 'JPY';
6593
+ status: 'pending' | 'paid' | 'failed' | 'refunded' | 'voided' | 'disputed';
6594
+ refundedAmount?: number | null;
6595
+ pgPaymentId?: string | null;
6596
+ pgRefundId?: string | null;
6597
+ pgProvider?: string | null;
6598
+ periodStart: string;
6599
+ periodEnd?: string | null;
6600
+ paidAt?: string | null;
6601
+ idempotencyKey?: string | null;
6602
+ updatedAt: string;
6603
+ createdAt: string;
6604
+ }
6605
+ /**
6606
+ * This interface was referenced by `Config`'s JSON-Schema
6607
+ * via the `definition` "tenant-payment-credentials".
6608
+ */
6609
+ interface TenantPaymentCredential {
6610
+ id: string;
6611
+ tenant?: (string | null) | Tenant;
6612
+ provider: string;
6613
+ mode: 'connect' | 'backend-charge' | 'delegated';
6614
+ connectedAccountRef?: string | null;
6615
+ submallRef?: string | null;
6616
+ secretKey?: string | null;
6617
+ clientKey?: string | null;
6618
+ storeId?: string | null;
6619
+ channelKey?: string | null;
6620
+ webhookSecret?: string | null;
6621
+ delegateChargeUrl?: string | null;
6622
+ isActive?: boolean | null;
6623
+ connectedAt?: string | null;
6624
+ updatedAt: string;
6625
+ createdAt: string;
6626
+ deletedAt?: string | null;
6627
+ }
6399
6628
  /**
6400
6629
  * This interface was referenced by `Config`'s JSON-Schema
6401
6630
  * via the `definition` "direct-upload-sessions".
@@ -7025,6 +7254,7 @@ interface TenantsSelect<T extends boolean = true> {
7025
7254
  draftPath?: T;
7026
7255
  id?: T;
7027
7256
  };
7257
+ shopCurrency?: T;
7028
7258
  owner?: T;
7029
7259
  enabledFeatures?: T;
7030
7260
  enabledRelationshipRecipes?: T;
@@ -7042,6 +7272,8 @@ interface TenantsSelect<T extends boolean = true> {
7042
7272
  fulfillmentShipped?: T;
7043
7273
  orderDelivered?: T;
7044
7274
  returnRequested?: T;
7275
+ returnApproved?: T;
7276
+ returnRejected?: T;
7045
7277
  returnCompleted?: T;
7046
7278
  senderDisplayName?: T;
7047
7279
  senderReplyTo?: T;
@@ -7520,6 +7752,7 @@ interface ProductsSelect<T extends boolean = true> {
7520
7752
  categories?: T;
7521
7753
  tags?: T;
7522
7754
  brand?: T;
7755
+ markets?: T;
7523
7756
  shippingPolicy?: T;
7524
7757
  weight?: T;
7525
7758
  vendor?: T;
@@ -8137,6 +8370,7 @@ interface ReturnsSelect<T extends boolean = true> {
8137
8370
  exchangeOrder?: T;
8138
8371
  status?: T;
8139
8372
  reason?: T;
8373
+ rejectionReasonCode?: T;
8140
8374
  reasonDetail?: T;
8141
8375
  items?: T;
8142
8376
  adminNotes?: T;
@@ -8252,6 +8486,7 @@ interface TenantCommerceConfigSelect<T extends boolean = true> {
8252
8486
  multiReturnInitialShippingRefund?: T;
8253
8487
  legacyOrderPolicyMode?: T;
8254
8488
  };
8489
+ fulfillmentMode?: T;
8255
8490
  optionPresets?: T | {
8256
8491
  name?: T;
8257
8492
  options?: T | {
@@ -8268,6 +8503,23 @@ interface TenantCommerceConfigSelect<T extends boolean = true> {
8268
8503
  createdAt?: T;
8269
8504
  deletedAt?: T;
8270
8505
  }
8506
+ /**
8507
+ * This interface was referenced by `Config`'s JSON-Schema
8508
+ * via the `definition` "markets_select".
8509
+ */
8510
+ interface MarketsSelect<T extends boolean = true> {
8511
+ tenant?: T;
8512
+ name?: T;
8513
+ handle?: T;
8514
+ countryCode?: T;
8515
+ currency?: T;
8516
+ isPrimary?: T;
8517
+ isActive?: T;
8518
+ metadata?: T;
8519
+ updatedAt?: T;
8520
+ createdAt?: T;
8521
+ deletedAt?: T;
8522
+ }
8271
8523
  /**
8272
8524
  * This interface was referenced by `Config`'s JSON-Schema
8273
8525
  * via the `definition` "customers_select".
@@ -8502,6 +8754,7 @@ interface CartItemsSelect<T extends boolean = true> {
8502
8754
  variant?: T;
8503
8755
  quantity?: T;
8504
8756
  unitPrice?: T;
8757
+ requiresShipping?: T;
8505
8758
  discountAllocation?: T;
8506
8759
  discountedUnitPrice?: T;
8507
8760
  discountedTotalPrice?: T;
@@ -8567,6 +8820,7 @@ interface CheckoutItemsSelect<T extends boolean = true> {
8567
8820
  optionSelection?: T;
8568
8821
  unitPrice?: T;
8569
8822
  totalPrice?: T;
8823
+ requiresShipping?: T;
8570
8824
  discountAllocation?: T;
8571
8825
  discountedUnitPrice?: T;
8572
8826
  discountedTotalPrice?: T;
@@ -9611,7 +9865,6 @@ interface CommunityBansSelect<T extends boolean = true> {
9611
9865
  * via the `definition` "event-calendars_select".
9612
9866
  */
9613
9867
  interface EventCalendarsSelect<T extends boolean = true> {
9614
- _order?: T;
9615
9868
  tenant?: T;
9616
9869
  title?: T;
9617
9870
  subtitle?: T;
@@ -9844,6 +10097,125 @@ interface EventRegistrationsSelect<T extends boolean = true> {
9844
10097
  createdAt?: T;
9845
10098
  deletedAt?: T;
9846
10099
  }
10100
+ /**
10101
+ * This interface was referenced by `Config`'s JSON-Schema
10102
+ * via the `definition` "membership-plans_select".
10103
+ */
10104
+ interface MembershipPlansSelect<T extends boolean = true> {
10105
+ _order?: T;
10106
+ tenant?: T;
10107
+ title?: T;
10108
+ generateSlug?: T;
10109
+ slug?: T;
10110
+ description?: T;
10111
+ price?: T;
10112
+ currency?: T;
10113
+ billingInterval?: T;
10114
+ intervalCount?: T;
10115
+ trialDays?: T;
10116
+ memberGroup?: T;
10117
+ isActive?: T;
10118
+ displayOrder?: T;
10119
+ publicTitle?: T;
10120
+ publicDescription?: T;
10121
+ updatedAt?: T;
10122
+ createdAt?: T;
10123
+ deletedAt?: T;
10124
+ }
10125
+ /**
10126
+ * This interface was referenced by `Config`'s JSON-Schema
10127
+ * via the `definition` "customer-payment-methods_select".
10128
+ */
10129
+ interface CustomerPaymentMethodsSelect<T extends boolean = true> {
10130
+ tenant?: T;
10131
+ customer?: T;
10132
+ provider?: T;
10133
+ mode?: T;
10134
+ token?: T;
10135
+ customerRef?: T;
10136
+ connectedAccountRef?: T;
10137
+ submallRef?: T;
10138
+ channelRef?: T;
10139
+ card?: T | {
10140
+ last4?: T;
10141
+ brand?: T;
10142
+ };
10143
+ status?: T;
10144
+ revokedAt?: T;
10145
+ updatedAt?: T;
10146
+ createdAt?: T;
10147
+ deletedAt?: T;
10148
+ }
10149
+ /**
10150
+ * This interface was referenced by `Config`'s JSON-Schema
10151
+ * via the `definition` "customer-memberships_select".
10152
+ */
10153
+ interface CustomerMembershipsSelect<T extends boolean = true> {
10154
+ tenant?: T;
10155
+ customer?: T;
10156
+ plan?: T;
10157
+ paymentMethod?: T;
10158
+ status?: T;
10159
+ amount?: T;
10160
+ currency?: T;
10161
+ currentPeriodStart?: T;
10162
+ currentPeriodEnd?: T;
10163
+ nextBillingAt?: T;
10164
+ nextRetryAt?: T;
10165
+ cancelAtPeriodEnd?: T;
10166
+ startedAt?: T;
10167
+ cancelledAt?: T;
10168
+ pastDueAt?: T;
10169
+ failureCount?: T;
10170
+ subscribeIntentKey?: T;
10171
+ updatedAt?: T;
10172
+ createdAt?: T;
10173
+ deletedAt?: T;
10174
+ }
10175
+ /**
10176
+ * This interface was referenced by `Config`'s JSON-Schema
10177
+ * via the `definition` "membership-charges_select".
10178
+ */
10179
+ interface MembershipChargesSelect<T extends boolean = true> {
10180
+ tenant?: T;
10181
+ membership?: T;
10182
+ customer?: T;
10183
+ amount?: T;
10184
+ currency?: T;
10185
+ status?: T;
10186
+ refundedAmount?: T;
10187
+ pgPaymentId?: T;
10188
+ pgRefundId?: T;
10189
+ pgProvider?: T;
10190
+ periodStart?: T;
10191
+ periodEnd?: T;
10192
+ paidAt?: T;
10193
+ idempotencyKey?: T;
10194
+ updatedAt?: T;
10195
+ createdAt?: T;
10196
+ }
10197
+ /**
10198
+ * This interface was referenced by `Config`'s JSON-Schema
10199
+ * via the `definition` "tenant-payment-credentials_select".
10200
+ */
10201
+ interface TenantPaymentCredentialsSelect<T extends boolean = true> {
10202
+ tenant?: T;
10203
+ provider?: T;
10204
+ mode?: T;
10205
+ connectedAccountRef?: T;
10206
+ submallRef?: T;
10207
+ secretKey?: T;
10208
+ clientKey?: T;
10209
+ storeId?: T;
10210
+ channelKey?: T;
10211
+ webhookSecret?: T;
10212
+ delegateChargeUrl?: T;
10213
+ isActive?: T;
10214
+ connectedAt?: T;
10215
+ updatedAt?: T;
10216
+ createdAt?: T;
10217
+ deletedAt?: T;
10218
+ }
9847
10219
  /**
9848
10220
  * This interface was referenced by `Config`'s JSON-Schema
9849
10221
  * via the `definition` "direct-upload-sessions_select".