@01.software/sdk 0.72.1 → 0.73.1

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 (43) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +40 -0
  3. package/dist/client.cjs +9 -2
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +9 -2
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-B3CnqMDQ.d.cts → collection-client-BH4dIZ6c.d.cts} +4 -4
  10. package/dist/{collection-client-uOgS_1bC.d.ts → collection-client-lLAl3xCZ.d.ts} +4 -4
  11. package/dist/{const-_ZfJjRQG.d.cts → const-BS2EaIp4.d.cts} +1 -1
  12. package/dist/{const-BJBK7jBl.d.ts → const-CCvoknRY.d.ts} +1 -1
  13. package/dist/{index-CI_LFWiG.d.cts → index-CHdrzJ8-.d.cts} +3 -3
  14. package/dist/{index-CBaP4q8r.d.ts → index-DVqNpmsc.d.ts} +3 -3
  15. package/dist/index.cjs +10 -3
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +14 -11
  18. package/dist/index.d.ts +14 -11
  19. package/dist/index.js +10 -3
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BRg8Yary.d.cts → payload-types-PXkmefhZ.d.cts} +77 -20
  22. package/dist/{payload-types-BRg8Yary.d.ts → payload-types-PXkmefhZ.d.ts} +77 -20
  23. package/dist/query.d.cts +5 -5
  24. package/dist/query.d.ts +5 -5
  25. package/dist/realtime.d.cts +2 -2
  26. package/dist/realtime.d.ts +2 -2
  27. package/dist/server.cjs +39 -10
  28. package/dist/server.cjs.map +1 -1
  29. package/dist/server.d.cts +8 -7
  30. package/dist/server.d.ts +8 -7
  31. package/dist/server.js +39 -10
  32. package/dist/server.js.map +1 -1
  33. package/dist/{types-DLjSqL0P.d.ts → types-CQRsG6sA.d.ts} +2 -2
  34. package/dist/{types-CnkJQUez.d.cts → types-Chwgg4CQ.d.cts} +21 -4
  35. package/dist/{types-FyklqLAk.d.cts → types-CyMz0Kzc.d.cts} +2 -2
  36. package/dist/{types-Cmnxxvuv.d.ts → types-lbzbJSZh.d.ts} +21 -4
  37. package/dist/ui/form.d.cts +1 -1
  38. package/dist/ui/form.d.ts +1 -1
  39. package/dist/ui/video.d.cts +1 -1
  40. package/dist/ui/video.d.ts +1 -1
  41. package/dist/webhook.d.cts +5 -5
  42. package/dist/webhook.d.ts +5 -5
  43. package/package.json +1 -1
@@ -24,6 +24,7 @@ interface Config {
24
24
  'webhook-deliveries': WebhookDelivery;
25
25
  'webhook-outbox-deliveries': WebhookOutboxDelivery;
26
26
  projects: Project;
27
+ 'project-invitations': ProjectInvitation;
27
28
  tenants: Tenant;
28
29
  'tenant-metadata': TenantMetadatum;
29
30
  'tenant-entitlements': TenantEntitlement;
@@ -273,6 +274,7 @@ interface Config {
273
274
  'webhook-deliveries': WebhookDeliveriesSelect<false> | WebhookDeliveriesSelect<true>;
274
275
  'webhook-outbox-deliveries': WebhookOutboxDeliveriesSelect<false> | WebhookOutboxDeliveriesSelect<true>;
275
276
  projects: ProjectsSelect<false> | ProjectsSelect<true>;
277
+ 'project-invitations': ProjectInvitationsSelect<false> | ProjectInvitationsSelect<true>;
276
278
  tenants: TenantsSelect<false> | TenantsSelect<true>;
277
279
  'tenant-metadata': TenantMetadataSelect<false> | TenantMetadataSelect<true>;
278
280
  'tenant-entitlements': TenantEntitlementsSelect<false> | TenantEntitlementsSelect<true>;
@@ -668,7 +670,7 @@ interface Tenant {
668
670
  */
669
671
  slug?: string | null;
670
672
  /**
671
- * Workspace-owned frontend origins that can open saved-record preview. Storefronts, docs sites, community sites, and other workspace frontends register here. Managed separately from API CORS origins.
673
+ * Register workspace-owned frontend origins for saved-record previews. Configure them separately from API CORS.
672
674
  */
673
675
  previewDestinations?: {
674
676
  origin: string;
@@ -683,7 +685,7 @@ interface Tenant {
683
685
  id?: string | null;
684
686
  }[] | null;
685
687
  /**
686
- * Base currency for the workspace store. Stored amounts carry no currency of their own, so changing this re-denominates the catalog and order amounts in place with no conversion (KRW 15000 becomes USD 15,000). The change is refused once live variants or unsettled orders exist.
688
+ * Currency for product prices and order amounts. Changing it re-denominates stored amounts with no conversion (KRW 15000 becomes USD 15,000), so it is refused once products or unsettled orders exist.
687
689
  */
688
690
  shopCurrency?: string | null;
689
691
  /**
@@ -719,11 +721,11 @@ interface Tenant {
719
721
  */
720
722
  status?: ('active' | 'paused' | 'past_due' | 'canceled' | 'pending_deletion') | null;
721
723
  /**
722
- * A public key that is safe to include in browser code. (Starts with pk01_)
724
+ * A public key that identifies the workspace.
723
725
  */
724
726
  publishableKey: string;
725
727
  /**
726
- * Origins allowed to call this workspace API with a Publishable Key from a browser. Separate from saved-record preview destinations. Leave empty to block browser API calls.
728
+ * Allowed origins for browser API calls. Browser API calls are blocked when empty.
727
729
  */
728
730
  cors?: {
729
731
  origin: string;
@@ -769,19 +771,19 @@ interface Tenant {
769
771
  };
770
772
  };
771
773
  /**
772
- * Workspace-wide email sender settings. Applies to every send, including commerce notifications and password resets.
774
+ * Sender settings for notification and customer authentication emails.
773
775
  */
774
776
  senderIdentity?: {
775
777
  /**
776
- * Brand name shown in the recipient's inbox. If blank, commerce and event notifications use the workspace name; customer authentication emails (password reset, sign-in codes) use the platform default sender. A verified sending domain uses an address on that domain. If the domain is unverified or the sender address settings disagree, the platform address is used.
778
+ * Sender name shown in the recipient's inbox.
777
779
  */
778
780
  displayName?: string | null;
779
781
  /**
780
- * Address that receives customer replies to notification emails. Leave blank to omit reply-to.
782
+ * Address that receives customer replies.
781
783
  */
782
784
  replyTo?: string | null;
783
785
  /**
784
- * Your own sending domain (e.g. mail.example.com). After registration and verification, mail is sent from this domain. Until verified, sending safely falls back to the platform sender.
786
+ * The platform sender address is used until verification.
785
787
  */
786
788
  domain?: string | null;
787
789
  /**
@@ -940,7 +942,11 @@ interface Project {
940
942
  interface User {
941
943
  id: string;
942
944
  _users_members_order?: string | null;
945
+ invitationEmailVerified?: boolean | null;
943
946
  roles: ('super-admin' | 'user')[];
947
+ /**
948
+ * Manage Project workspace (Live/Sandbox) members in Settings > Workspace > Project environments.
949
+ */
944
950
  tenants?: {
945
951
  tenant: string | Tenant;
946
952
  roles: ('tenant-admin' | 'tenant-editor' | 'tenant-viewer')[];
@@ -1662,7 +1668,7 @@ interface CustomerAddress {
1662
1668
  */
1663
1669
  jibunAddress?: string | null;
1664
1670
  /**
1665
- * City (KR: 시/군 — e.g. "Seoul", "Busan"; non-KR: city/town).
1671
+ * City (KR: 시/군, e.g. "Seoul", "Busan"; non-KR: city/town).
1666
1672
  */
1667
1673
  city?: string | null;
1668
1674
  /**
@@ -2406,7 +2412,7 @@ interface Market {
2406
2412
  }[];
2407
2413
  currency: string;
2408
2414
  /**
2409
- * Exchange rate used to convert shop-currency prices into this market currency.
2415
+ * Rate used to convert base-currency prices into this market currency.
2410
2416
  */
2411
2417
  fxRateFromShopCurrency: number;
2412
2418
  /**
@@ -3062,11 +3068,11 @@ interface ShippingPolicy {
3062
3068
  */
3063
3069
  title?: string | null;
3064
3070
  /**
3065
- * Read-only rollout field. Edit the shipping rates array instead.
3071
+ * Read-only value from the previous rate model. Edit Shipping rates below.
3066
3072
  */
3067
3073
  baseAmount?: number | null;
3068
3074
  /**
3069
- * Read-only rollout field. Set up free shipping with an order-amount rate row priced at 0, or with an automatic free_shipping discount that sets a minimum order amount. When you use a rate row, change the existing paid row's Condition to Order amount and cap it with a Max order amount below the free-shipping threshold so both rows never apply together.
3075
+ * Read-only value from the previous rate model. Set up free shipping with an order-amount rate row priced at 0, or with an automatic discount whose Discount type is 'Free Shipping' and Min order amount is set. When you use a rate row, change the existing paid row's Condition to Order amount and cap it with a Max order amount below the free-shipping threshold so both rows never apply together.
3070
3076
  */
3071
3077
  freeShippingMinAmount?: number | null;
3072
3078
  rates?: {
@@ -4578,7 +4584,7 @@ interface Transaction {
4578
4584
  _title?: string | null;
4579
4585
  type: 'payment' | 'refund';
4580
4586
  /**
4581
- * Shopify-style OrderTransaction kind. The legacy type field remains the payment/refund channel.
4587
+ * Payment operation recorded by this transaction: authorization, sale, capture, void, or refund. See 'Type' for the payment/refund distinction.
4582
4588
  */
4583
4589
  kind: 'authorization' | 'sale' | 'capture' | 'void' | 'refund';
4584
4590
  /**
@@ -4936,31 +4942,31 @@ interface Webhook {
4936
4942
  */
4937
4943
  name: string;
4938
4944
  /**
4939
- * Webhook endpoint HTTPS URL. Treat this endpoint as a recipient of sensitive workspace events.
4945
+ * Only HTTPS addresses are allowed. This address receives sensitive workspace events.
4940
4946
  */
4941
4947
  url: string;
4942
4948
  /**
4943
- * HMAC signing secret (encrypted at rest, never returned on read). Reveal or rotate in Admin.
4949
+ * The secret is stored encrypted.
4944
4950
  */
4945
4951
  secret?: string | null;
4946
4952
  /**
4947
- * When the signing secret was first revealed to a tenant-admin (one time).
4953
+ * When the secret was first shown.
4948
4954
  */
4949
4955
  secretRevealedAt?: string | null;
4950
4956
  /**
4951
- * Last webhook signing secret rotation time.
4957
+ * When the secret was last replaced.
4952
4958
  */
4953
4959
  secretRotatedAt?: string | null;
4954
4960
  /**
4955
- * User who last rotated the webhook signing secret.
4961
+ * User who last replaced the secret.
4956
4962
  */
4957
4963
  secretRotatedBy?: (string | null) | User;
4958
4964
  /**
4959
- * Collections to subscribe to. Leaving this empty is a wildcard for ordinary collection create/update events only. Generic collections receive raw create/update; shaped-only entries receive semantic commerce notifications only. Commerce notifications for orders, fulfillments, returns, and customer-memberships require explicit selection.
4965
+ * When empty, only ordinary item creation and update notifications are received. Some collections receive only commerce notifications; notifications for orders, fulfillments, returns, and customer memberships are received only when selected.
4960
4966
  */
4961
4967
  subscriptions?: {
4962
4968
  /**
4963
- * Receives create/update events for this collection, plus commerce notifications whose source is this collection.
4969
+ * Receives creation and update notifications and commerce notifications for the selected collection.
4964
4970
  */
4965
4971
  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' | 'membership-plan-prices' | 'canvas-nodes' | 'canvas-edges' | 'payment-sessions' | 'payment-refund-attempts' | 'customer-memberships';
4966
4972
  id?: string | null;
@@ -5001,6 +5007,32 @@ interface WebhookOutboxDelivery {
5001
5007
  updatedAt: string;
5002
5008
  createdAt: string;
5003
5009
  }
5010
+ /**
5011
+ * This interface was referenced by `Config`'s JSON-Schema
5012
+ * via the `definition` "project-invitations".
5013
+ */
5014
+ interface ProjectInvitation {
5015
+ id: string;
5016
+ project: string | Project;
5017
+ email: string;
5018
+ liveRoles?: {
5019
+ [k: string]: unknown;
5020
+ } | unknown[] | string | number | boolean | null;
5021
+ sandboxRoles?: {
5022
+ [k: string]: unknown;
5023
+ } | unknown[] | string | number | boolean | null;
5024
+ status: 'pending' | 'accepted' | 'revoked';
5025
+ tokenHash: string;
5026
+ tokenVersion: number;
5027
+ expiresAt: string;
5028
+ invitedBy?: (string | null) | User;
5029
+ acceptedBy?: (string | null) | User;
5030
+ acceptedAt?: string | null;
5031
+ revokedBy?: (string | null) | User;
5032
+ revokedAt?: string | null;
5033
+ updatedAt: string;
5034
+ createdAt: string;
5035
+ }
5004
5036
  /**
5005
5037
  * This interface was referenced by `Config`'s JSON-Schema
5006
5038
  * via the `definition` "tenant-metadata".
@@ -9023,6 +9055,9 @@ interface Form {
9023
9055
  redirect?: {
9024
9056
  url: string;
9025
9057
  };
9058
+ /**
9059
+ * Form submission emails are not sent. Settings are retained for compatibility.
9060
+ */
9026
9061
  emails?: {
9027
9062
  emailTo?: string | null;
9028
9063
  cc?: string | null;
@@ -9139,6 +9174,7 @@ interface PayloadMigration {
9139
9174
  */
9140
9175
  interface UsersSelect<T extends boolean = true> {
9141
9176
  _users_members_order?: T;
9177
+ invitationEmailVerified?: T;
9142
9178
  roles?: T;
9143
9179
  tenants?: T | {
9144
9180
  tenant?: T;
@@ -9510,6 +9546,27 @@ interface ProjectsSelect<T extends boolean = true> {
9510
9546
  updatedAt?: T;
9511
9547
  createdAt?: T;
9512
9548
  }
9549
+ /**
9550
+ * This interface was referenced by `Config`'s JSON-Schema
9551
+ * via the `definition` "project-invitations_select".
9552
+ */
9553
+ interface ProjectInvitationsSelect<T extends boolean = true> {
9554
+ project?: T;
9555
+ email?: T;
9556
+ liveRoles?: T;
9557
+ sandboxRoles?: T;
9558
+ status?: T;
9559
+ tokenHash?: T;
9560
+ tokenVersion?: T;
9561
+ expiresAt?: T;
9562
+ invitedBy?: T;
9563
+ acceptedBy?: T;
9564
+ acceptedAt?: T;
9565
+ revokedBy?: T;
9566
+ revokedAt?: T;
9567
+ updatedAt?: T;
9568
+ createdAt?: T;
9569
+ }
9513
9570
  /**
9514
9571
  * This interface was referenced by `Config`'s JSON-Schema
9515
9572
  * via the `definition` "tenants_select".
@@ -24,6 +24,7 @@ interface Config {
24
24
  'webhook-deliveries': WebhookDelivery;
25
25
  'webhook-outbox-deliveries': WebhookOutboxDelivery;
26
26
  projects: Project;
27
+ 'project-invitations': ProjectInvitation;
27
28
  tenants: Tenant;
28
29
  'tenant-metadata': TenantMetadatum;
29
30
  'tenant-entitlements': TenantEntitlement;
@@ -273,6 +274,7 @@ interface Config {
273
274
  'webhook-deliveries': WebhookDeliveriesSelect<false> | WebhookDeliveriesSelect<true>;
274
275
  'webhook-outbox-deliveries': WebhookOutboxDeliveriesSelect<false> | WebhookOutboxDeliveriesSelect<true>;
275
276
  projects: ProjectsSelect<false> | ProjectsSelect<true>;
277
+ 'project-invitations': ProjectInvitationsSelect<false> | ProjectInvitationsSelect<true>;
276
278
  tenants: TenantsSelect<false> | TenantsSelect<true>;
277
279
  'tenant-metadata': TenantMetadataSelect<false> | TenantMetadataSelect<true>;
278
280
  'tenant-entitlements': TenantEntitlementsSelect<false> | TenantEntitlementsSelect<true>;
@@ -668,7 +670,7 @@ interface Tenant {
668
670
  */
669
671
  slug?: string | null;
670
672
  /**
671
- * Workspace-owned frontend origins that can open saved-record preview. Storefronts, docs sites, community sites, and other workspace frontends register here. Managed separately from API CORS origins.
673
+ * Register workspace-owned frontend origins for saved-record previews. Configure them separately from API CORS.
672
674
  */
673
675
  previewDestinations?: {
674
676
  origin: string;
@@ -683,7 +685,7 @@ interface Tenant {
683
685
  id?: string | null;
684
686
  }[] | null;
685
687
  /**
686
- * Base currency for the workspace store. Stored amounts carry no currency of their own, so changing this re-denominates the catalog and order amounts in place with no conversion (KRW 15000 becomes USD 15,000). The change is refused once live variants or unsettled orders exist.
688
+ * Currency for product prices and order amounts. Changing it re-denominates stored amounts with no conversion (KRW 15000 becomes USD 15,000), so it is refused once products or unsettled orders exist.
687
689
  */
688
690
  shopCurrency?: string | null;
689
691
  /**
@@ -719,11 +721,11 @@ interface Tenant {
719
721
  */
720
722
  status?: ('active' | 'paused' | 'past_due' | 'canceled' | 'pending_deletion') | null;
721
723
  /**
722
- * A public key that is safe to include in browser code. (Starts with pk01_)
724
+ * A public key that identifies the workspace.
723
725
  */
724
726
  publishableKey: string;
725
727
  /**
726
- * Origins allowed to call this workspace API with a Publishable Key from a browser. Separate from saved-record preview destinations. Leave empty to block browser API calls.
728
+ * Allowed origins for browser API calls. Browser API calls are blocked when empty.
727
729
  */
728
730
  cors?: {
729
731
  origin: string;
@@ -769,19 +771,19 @@ interface Tenant {
769
771
  };
770
772
  };
771
773
  /**
772
- * Workspace-wide email sender settings. Applies to every send, including commerce notifications and password resets.
774
+ * Sender settings for notification and customer authentication emails.
773
775
  */
774
776
  senderIdentity?: {
775
777
  /**
776
- * Brand name shown in the recipient's inbox. If blank, commerce and event notifications use the workspace name; customer authentication emails (password reset, sign-in codes) use the platform default sender. A verified sending domain uses an address on that domain. If the domain is unverified or the sender address settings disagree, the platform address is used.
778
+ * Sender name shown in the recipient's inbox.
777
779
  */
778
780
  displayName?: string | null;
779
781
  /**
780
- * Address that receives customer replies to notification emails. Leave blank to omit reply-to.
782
+ * Address that receives customer replies.
781
783
  */
782
784
  replyTo?: string | null;
783
785
  /**
784
- * Your own sending domain (e.g. mail.example.com). After registration and verification, mail is sent from this domain. Until verified, sending safely falls back to the platform sender.
786
+ * The platform sender address is used until verification.
785
787
  */
786
788
  domain?: string | null;
787
789
  /**
@@ -940,7 +942,11 @@ interface Project {
940
942
  interface User {
941
943
  id: string;
942
944
  _users_members_order?: string | null;
945
+ invitationEmailVerified?: boolean | null;
943
946
  roles: ('super-admin' | 'user')[];
947
+ /**
948
+ * Manage Project workspace (Live/Sandbox) members in Settings > Workspace > Project environments.
949
+ */
944
950
  tenants?: {
945
951
  tenant: string | Tenant;
946
952
  roles: ('tenant-admin' | 'tenant-editor' | 'tenant-viewer')[];
@@ -1662,7 +1668,7 @@ interface CustomerAddress {
1662
1668
  */
1663
1669
  jibunAddress?: string | null;
1664
1670
  /**
1665
- * City (KR: 시/군 — e.g. "Seoul", "Busan"; non-KR: city/town).
1671
+ * City (KR: 시/군, e.g. "Seoul", "Busan"; non-KR: city/town).
1666
1672
  */
1667
1673
  city?: string | null;
1668
1674
  /**
@@ -2406,7 +2412,7 @@ interface Market {
2406
2412
  }[];
2407
2413
  currency: string;
2408
2414
  /**
2409
- * Exchange rate used to convert shop-currency prices into this market currency.
2415
+ * Rate used to convert base-currency prices into this market currency.
2410
2416
  */
2411
2417
  fxRateFromShopCurrency: number;
2412
2418
  /**
@@ -3062,11 +3068,11 @@ interface ShippingPolicy {
3062
3068
  */
3063
3069
  title?: string | null;
3064
3070
  /**
3065
- * Read-only rollout field. Edit the shipping rates array instead.
3071
+ * Read-only value from the previous rate model. Edit Shipping rates below.
3066
3072
  */
3067
3073
  baseAmount?: number | null;
3068
3074
  /**
3069
- * Read-only rollout field. Set up free shipping with an order-amount rate row priced at 0, or with an automatic free_shipping discount that sets a minimum order amount. When you use a rate row, change the existing paid row's Condition to Order amount and cap it with a Max order amount below the free-shipping threshold so both rows never apply together.
3075
+ * Read-only value from the previous rate model. Set up free shipping with an order-amount rate row priced at 0, or with an automatic discount whose Discount type is 'Free Shipping' and Min order amount is set. When you use a rate row, change the existing paid row's Condition to Order amount and cap it with a Max order amount below the free-shipping threshold so both rows never apply together.
3070
3076
  */
3071
3077
  freeShippingMinAmount?: number | null;
3072
3078
  rates?: {
@@ -4578,7 +4584,7 @@ interface Transaction {
4578
4584
  _title?: string | null;
4579
4585
  type: 'payment' | 'refund';
4580
4586
  /**
4581
- * Shopify-style OrderTransaction kind. The legacy type field remains the payment/refund channel.
4587
+ * Payment operation recorded by this transaction: authorization, sale, capture, void, or refund. See 'Type' for the payment/refund distinction.
4582
4588
  */
4583
4589
  kind: 'authorization' | 'sale' | 'capture' | 'void' | 'refund';
4584
4590
  /**
@@ -4936,31 +4942,31 @@ interface Webhook {
4936
4942
  */
4937
4943
  name: string;
4938
4944
  /**
4939
- * Webhook endpoint HTTPS URL. Treat this endpoint as a recipient of sensitive workspace events.
4945
+ * Only HTTPS addresses are allowed. This address receives sensitive workspace events.
4940
4946
  */
4941
4947
  url: string;
4942
4948
  /**
4943
- * HMAC signing secret (encrypted at rest, never returned on read). Reveal or rotate in Admin.
4949
+ * The secret is stored encrypted.
4944
4950
  */
4945
4951
  secret?: string | null;
4946
4952
  /**
4947
- * When the signing secret was first revealed to a tenant-admin (one time).
4953
+ * When the secret was first shown.
4948
4954
  */
4949
4955
  secretRevealedAt?: string | null;
4950
4956
  /**
4951
- * Last webhook signing secret rotation time.
4957
+ * When the secret was last replaced.
4952
4958
  */
4953
4959
  secretRotatedAt?: string | null;
4954
4960
  /**
4955
- * User who last rotated the webhook signing secret.
4961
+ * User who last replaced the secret.
4956
4962
  */
4957
4963
  secretRotatedBy?: (string | null) | User;
4958
4964
  /**
4959
- * Collections to subscribe to. Leaving this empty is a wildcard for ordinary collection create/update events only. Generic collections receive raw create/update; shaped-only entries receive semantic commerce notifications only. Commerce notifications for orders, fulfillments, returns, and customer-memberships require explicit selection.
4965
+ * When empty, only ordinary item creation and update notifications are received. Some collections receive only commerce notifications; notifications for orders, fulfillments, returns, and customer memberships are received only when selected.
4960
4966
  */
4961
4967
  subscriptions?: {
4962
4968
  /**
4963
- * Receives create/update events for this collection, plus commerce notifications whose source is this collection.
4969
+ * Receives creation and update notifications and commerce notifications for the selected collection.
4964
4970
  */
4965
4971
  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' | 'membership-plan-prices' | 'canvas-nodes' | 'canvas-edges' | 'payment-sessions' | 'payment-refund-attempts' | 'customer-memberships';
4966
4972
  id?: string | null;
@@ -5001,6 +5007,32 @@ interface WebhookOutboxDelivery {
5001
5007
  updatedAt: string;
5002
5008
  createdAt: string;
5003
5009
  }
5010
+ /**
5011
+ * This interface was referenced by `Config`'s JSON-Schema
5012
+ * via the `definition` "project-invitations".
5013
+ */
5014
+ interface ProjectInvitation {
5015
+ id: string;
5016
+ project: string | Project;
5017
+ email: string;
5018
+ liveRoles?: {
5019
+ [k: string]: unknown;
5020
+ } | unknown[] | string | number | boolean | null;
5021
+ sandboxRoles?: {
5022
+ [k: string]: unknown;
5023
+ } | unknown[] | string | number | boolean | null;
5024
+ status: 'pending' | 'accepted' | 'revoked';
5025
+ tokenHash: string;
5026
+ tokenVersion: number;
5027
+ expiresAt: string;
5028
+ invitedBy?: (string | null) | User;
5029
+ acceptedBy?: (string | null) | User;
5030
+ acceptedAt?: string | null;
5031
+ revokedBy?: (string | null) | User;
5032
+ revokedAt?: string | null;
5033
+ updatedAt: string;
5034
+ createdAt: string;
5035
+ }
5004
5036
  /**
5005
5037
  * This interface was referenced by `Config`'s JSON-Schema
5006
5038
  * via the `definition` "tenant-metadata".
@@ -9023,6 +9055,9 @@ interface Form {
9023
9055
  redirect?: {
9024
9056
  url: string;
9025
9057
  };
9058
+ /**
9059
+ * Form submission emails are not sent. Settings are retained for compatibility.
9060
+ */
9026
9061
  emails?: {
9027
9062
  emailTo?: string | null;
9028
9063
  cc?: string | null;
@@ -9139,6 +9174,7 @@ interface PayloadMigration {
9139
9174
  */
9140
9175
  interface UsersSelect<T extends boolean = true> {
9141
9176
  _users_members_order?: T;
9177
+ invitationEmailVerified?: T;
9142
9178
  roles?: T;
9143
9179
  tenants?: T | {
9144
9180
  tenant?: T;
@@ -9510,6 +9546,27 @@ interface ProjectsSelect<T extends boolean = true> {
9510
9546
  updatedAt?: T;
9511
9547
  createdAt?: T;
9512
9548
  }
9549
+ /**
9550
+ * This interface was referenced by `Config`'s JSON-Schema
9551
+ * via the `definition` "project-invitations_select".
9552
+ */
9553
+ interface ProjectInvitationsSelect<T extends boolean = true> {
9554
+ project?: T;
9555
+ email?: T;
9556
+ liveRoles?: T;
9557
+ sandboxRoles?: T;
9558
+ status?: T;
9559
+ tokenHash?: T;
9560
+ tokenVersion?: T;
9561
+ expiresAt?: T;
9562
+ invitedBy?: T;
9563
+ acceptedBy?: T;
9564
+ acceptedAt?: T;
9565
+ revokedBy?: T;
9566
+ revokedAt?: T;
9567
+ updatedAt?: T;
9568
+ createdAt?: T;
9569
+ }
9513
9570
  /**
9514
9571
  * This interface was referenced by `Config`'s JSON-Schema
9515
9572
  * via the `definition` "tenants_select".
package/dist/query.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
3
- import { d6 as ApiQueryOptions, dg as PayloadFindResponse, dB as PublicReadQueryOptions, dh as PayloadMutationResponse, dC as CustomerAuth, dD as CustomerProfile, dE as CustomerAuthResponse, dF as CustomerLoginData, dG as CustomerRegisterResponse, dH as CustomerRegisterData, dI as CustomerRefreshResponse, dJ as UpdateProfileData, dK as ProductListingPageParams, dL as ProductListingPageBaseParams, dM as ProductDetailParams, dN as ProductDetailCatalogResult, dO as ProductListingPageCatalogParams, dP as ProductListingPageResult, dQ as ProductListingGroupsCatalogItem, dR as ProductListingPageFullParams, dS as ProductListingGroupsItem, dk as RootClient, cn as RootServerClient } from './types-CnkJQUez.cjs';
4
- import './payload-types-BRg8Yary.cjs';
5
- import { S as ServerCollection, P as PublicCollection } from './const-_ZfJjRQG.cjs';
6
- import { C as CollectionClient } from './collection-client-B3CnqMDQ.cjs';
7
- import { C as CollectionType } from './types-FyklqLAk.cjs';
3
+ import { d8 as ApiQueryOptions, di as PayloadFindResponse, dD as PublicReadQueryOptions, dj as PayloadMutationResponse, dE as CustomerAuth, dF as CustomerProfile, dG as CustomerAuthResponse, dH as CustomerLoginData, dI as CustomerRegisterResponse, dJ as CustomerRegisterData, dK as CustomerRefreshResponse, dL as UpdateProfileData, dM as ProductListingPageParams, dN as ProductListingPageBaseParams, dO as ProductDetailParams, dP as ProductDetailCatalogResult, dQ as ProductListingPageCatalogParams, dR as ProductListingPageResult, dS as ProductListingGroupsCatalogItem, dT as ProductListingPageFullParams, dU as ProductListingGroupsItem, dm as RootClient, cp as RootServerClient } from './types-Chwgg4CQ.cjs';
4
+ import './payload-types-PXkmefhZ.cjs';
5
+ import { S as ServerCollection, P as PublicCollection } from './const-BS2EaIp4.cjs';
6
+ import { C as CollectionClient } from './collection-client-BH4dIZ6c.cjs';
7
+ import { C as CollectionType } from './types-CyMz0Kzc.cjs';
8
8
  import { SDKError } from './errors.cjs';
9
9
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
10
10
  import './metadata.cjs';
package/dist/query.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
3
- import { d6 as ApiQueryOptions, dg as PayloadFindResponse, dB as PublicReadQueryOptions, dh as PayloadMutationResponse, dC as CustomerAuth, dD as CustomerProfile, dE as CustomerAuthResponse, dF as CustomerLoginData, dG as CustomerRegisterResponse, dH as CustomerRegisterData, dI as CustomerRefreshResponse, dJ as UpdateProfileData, dK as ProductListingPageParams, dL as ProductListingPageBaseParams, dM as ProductDetailParams, dN as ProductDetailCatalogResult, dO as ProductListingPageCatalogParams, dP as ProductListingPageResult, dQ as ProductListingGroupsCatalogItem, dR as ProductListingPageFullParams, dS as ProductListingGroupsItem, dk as RootClient, cn as RootServerClient } from './types-Cmnxxvuv.js';
4
- import './payload-types-BRg8Yary.js';
5
- import { S as ServerCollection, P as PublicCollection } from './const-BJBK7jBl.js';
6
- import { C as CollectionClient } from './collection-client-uOgS_1bC.js';
7
- import { C as CollectionType } from './types-DLjSqL0P.js';
3
+ import { d8 as ApiQueryOptions, di as PayloadFindResponse, dD as PublicReadQueryOptions, dj as PayloadMutationResponse, dE as CustomerAuth, dF as CustomerProfile, dG as CustomerAuthResponse, dH as CustomerLoginData, dI as CustomerRegisterResponse, dJ as CustomerRegisterData, dK as CustomerRefreshResponse, dL as UpdateProfileData, dM as ProductListingPageParams, dN as ProductListingPageBaseParams, dO as ProductDetailParams, dP as ProductDetailCatalogResult, dQ as ProductListingPageCatalogParams, dR as ProductListingPageResult, dS as ProductListingGroupsCatalogItem, dT as ProductListingPageFullParams, dU as ProductListingGroupsItem, dm as RootClient, cp as RootServerClient } from './types-lbzbJSZh.js';
4
+ import './payload-types-PXkmefhZ.js';
5
+ import { S as ServerCollection, P as PublicCollection } from './const-CCvoknRY.js';
6
+ import { C as CollectionClient } from './collection-client-lLAl3xCZ.js';
7
+ import { C as CollectionType } from './types-CQRsG6sA.js';
8
8
  import { SDKError } from './errors.js';
9
9
  export { a as RealtimeConnection, R as RealtimeEvent, b as RealtimeListener } from './realtime-D7HtUpqt.js';
10
10
  import './metadata.js';
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.cjs';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
3
- import { P as PublicCollection } from './const-_ZfJjRQG.cjs';
4
- import './payload-types-BRg8Yary.cjs';
3
+ import { P as PublicCollection } from './const-BS2EaIp4.cjs';
4
+ import './payload-types-PXkmefhZ.cjs';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.js';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.js';
3
- import { P as PublicCollection } from './const-BJBK7jBl.js';
4
- import './payload-types-BRg8Yary.js';
3
+ import { P as PublicCollection } from './const-CCvoknRY.js';
4
+ import './payload-types-PXkmefhZ.js';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
package/dist/server.cjs CHANGED
@@ -911,7 +911,7 @@ async function httpFetch(url, options) {
911
911
  );
912
912
  const usageError = attachRequestId(
913
913
  createUsageLimitError(
914
- `Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
914
+ `Monthly API usage limit exceeded (${current.toLocaleString("en-US")}/${limit.toLocaleString("en-US")})`,
915
915
  { limit, current, remaining },
916
916
  {
917
917
  url,
@@ -4968,6 +4968,11 @@ function getRelationID(value) {
4968
4968
  }
4969
4969
  return void 0;
4970
4970
  }
4971
+ function compareOrdinal(left, right) {
4972
+ if (left < right) return -1;
4973
+ if (left > right) return 1;
4974
+ return 0;
4975
+ }
4971
4976
  function extractEntityId(value) {
4972
4977
  if (typeof value === "string") return value;
4973
4978
  if (typeof value === "number") return String(value);
@@ -5580,7 +5585,7 @@ function compareVariantOrder(a, b) {
5580
5585
  }
5581
5586
  const aId = String(getRelationID(a.id) ?? "");
5582
5587
  const bId = String(getRelationID(b.id) ?? "");
5583
- return aId.localeCompare(bId);
5588
+ return compareOrdinal(aId, bId);
5584
5589
  }
5585
5590
  function getVariantAvailableForSale(variant) {
5586
5591
  if (variant.isActive === false) return false;
@@ -6787,6 +6792,8 @@ function buildRangeEndpoint(params) {
6787
6792
  function buildAdmissionAvailabilityEndpoint(params) {
6788
6793
  const urlParams = new URLSearchParams();
6789
6794
  urlParams.set("occurrence", params.occurrence);
6795
+ const normalizedMarket2 = params.market?.trim();
6796
+ if (normalizedMarket2) urlParams.set("market", normalizedMarket2);
6790
6797
  return resolveOperationPath(
6791
6798
  EVENTS_ENDPOINT_OPERATIONS.occurrences.admissionAvailability,
6792
6799
  { query: urlParams }
@@ -6989,16 +6996,37 @@ var MembershipApi = class extends BaseApi {
6989
6996
  }
6990
6997
  /**
6991
6998
  * Store/read only app-encrypted billing ciphertext for the Membership's
6992
- * method. The tenant server receives the non-secret restore generation from
6993
- * its platform operator's integration configuration; it is not discovered
6994
- * from an unauthenticated endpoint.
6999
+ * method. Obtain generation from billingCustodyContext before a new upload
7000
+ * or read, and retain that same generation for every mutation based on the
7001
+ * read. Never rediscover and retry a mutation after a generation mismatch.
6995
7002
  */
6996
7003
  async billingCustody(params) {
6997
7004
  const { webhookSecret, ...input } = params;
6998
- const body = {
6999
- kind: "billing-custody.v1",
7000
- ...input
7001
- };
7005
+ return this.requestBillingCustody(
7006
+ {
7007
+ kind: "billing-custody.v1",
7008
+ ...input
7009
+ },
7010
+ webhookSecret
7011
+ );
7012
+ }
7013
+ /** Requires the same server key, Membership and delegated HMAC as custody. */
7014
+ async billingCustodyContext(params) {
7015
+ const result = await this.requestBillingCustody(
7016
+ {
7017
+ kind: "billing-custody.v1",
7018
+ action: "context",
7019
+ membershipId: params.membershipId
7020
+ },
7021
+ params.webhookSecret
7022
+ );
7023
+ if (!result || typeof result !== "object" || Array.isArray(result) || Object.keys(result).length !== 2 || !("action" in result) || result.action !== "context" || !("generation" in result) || typeof result.generation !== "string" || !/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(
7024
+ result.generation
7025
+ ))
7026
+ throw new Error("Invalid billing custody context response");
7027
+ return { action: "context", generation: result.generation };
7028
+ }
7029
+ async requestBillingCustody(body, webhookSecret) {
7002
7030
  const timestamp2 = Date.now().toString();
7003
7031
  const deliveryId = crypto.randomUUID();
7004
7032
  const signature = await custodySignature(
@@ -7362,7 +7390,8 @@ var ServerClient = class _ServerClient {
7362
7390
  subscribe: membershipApi.subscribe.bind(membershipApi),
7363
7391
  endSubscribeIntent: membershipApi.endSubscribeIntent.bind(membershipApi),
7364
7392
  cancel: membershipApi.cancel.bind(membershipApi),
7365
- billingCustody: membershipApi.billingCustody.bind(membershipApi)
7393
+ billingCustody: membershipApi.billingCustody.bind(membershipApi),
7394
+ billingCustodyContext: membershipApi.billingCustodyContext.bind(membershipApi)
7366
7395
  };
7367
7396
  this.customerGroups = new CustomerGroupApi(serverOptions);
7368
7397
  this.externalEffectClaims = new ExternalEffectClaimsApi(serverOptions);