@01.software/sdk 0.70.1 → 0.72.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 (70) hide show
  1. package/CHANGELOG.md +143 -0
  2. package/MIGRATION.md +28 -0
  3. package/README.md +253 -11
  4. package/dist/client.cjs +396 -26
  5. package/dist/client.cjs.map +1 -1
  6. package/dist/client.d.cts +7 -6
  7. package/dist/client.d.ts +7 -6
  8. package/dist/client.js +396 -26
  9. package/dist/client.js.map +1 -1
  10. package/dist/{collection-client-BHLStm1K.d.cts → collection-client-B3CnqMDQ.d.cts} +14 -18
  11. package/dist/{collection-client-B1FSJ24_.d.ts → collection-client-uOgS_1bC.d.ts} +14 -18
  12. package/dist/{const-ty8u0TDI.d.ts → const-BJBK7jBl.d.ts} +1 -1
  13. package/dist/{const-BfQfV-rr.d.cts → const-_ZfJjRQG.d.cts} +1 -1
  14. package/dist/embedded-admin/server.cjs +117 -2
  15. package/dist/embedded-admin/server.cjs.map +1 -1
  16. package/dist/embedded-admin/server.d.cts +30 -2
  17. package/dist/embedded-admin/server.d.ts +30 -2
  18. package/dist/embedded-admin/server.js +117 -2
  19. package/dist/embedded-admin/server.js.map +1 -1
  20. package/dist/embedded-admin.cjs +135 -7
  21. package/dist/embedded-admin.cjs.map +1 -1
  22. package/dist/embedded-admin.d.cts +35 -2
  23. package/dist/embedded-admin.d.ts +35 -2
  24. package/dist/embedded-admin.js +135 -7
  25. package/dist/embedded-admin.js.map +1 -1
  26. package/dist/errors.cjs +2 -0
  27. package/dist/errors.cjs.map +1 -1
  28. package/dist/errors.d.cts +3 -3
  29. package/dist/errors.d.ts +3 -3
  30. package/dist/errors.js +2 -0
  31. package/dist/errors.js.map +1 -1
  32. package/dist/{index-DnKgjPGM.d.ts → index-CBaP4q8r.d.ts} +3 -3
  33. package/dist/{index-CX6si6YC.d.cts → index-CI_LFWiG.d.cts} +3 -3
  34. package/dist/index.cjs +396 -26
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +24 -9
  37. package/dist/index.d.ts +24 -9
  38. package/dist/index.js +396 -26
  39. package/dist/index.js.map +1 -1
  40. package/dist/{payload-types-DTAaWKrp.d.cts → payload-types-BRg8Yary.d.cts} +262 -177
  41. package/dist/{payload-types-DTAaWKrp.d.ts → payload-types-BRg8Yary.d.ts} +262 -177
  42. package/dist/query.cjs +20 -0
  43. package/dist/query.cjs.map +1 -1
  44. package/dist/query.d.cts +5 -5
  45. package/dist/query.d.ts +5 -5
  46. package/dist/query.js +20 -0
  47. package/dist/query.js.map +1 -1
  48. package/dist/realtime.d.cts +2 -2
  49. package/dist/realtime.d.ts +2 -2
  50. package/dist/server.cjs +459 -46
  51. package/dist/server.cjs.map +1 -1
  52. package/dist/server.d.cts +10 -8
  53. package/dist/server.d.ts +10 -8
  54. package/dist/server.js +459 -46
  55. package/dist/server.js.map +1 -1
  56. package/dist/storefront-cache.cjs +2 -0
  57. package/dist/storefront-cache.cjs.map +1 -1
  58. package/dist/storefront-cache.js +2 -0
  59. package/dist/storefront-cache.js.map +1 -1
  60. package/dist/{types-DdlhpNVv.d.ts → types-Cmnxxvuv.d.ts} +238 -21
  61. package/dist/{types-Bzgf4mTo.d.cts → types-CnkJQUez.d.cts} +238 -21
  62. package/dist/{types-DX8Z44yQ.d.ts → types-DLjSqL0P.d.ts} +2 -2
  63. package/dist/{types-CpSiyJud.d.cts → types-FyklqLAk.d.cts} +2 -2
  64. package/dist/ui/form.d.cts +1 -1
  65. package/dist/ui/form.d.ts +1 -1
  66. package/dist/ui/video.d.cts +1 -1
  67. package/dist/ui/video.d.ts +1 -1
  68. package/dist/webhook.d.cts +5 -5
  69. package/dist/webhook.d.ts +5 -5
  70. package/package.json +2 -4
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 { cN as ApiQueryOptions, cX as PayloadFindResponse, dd as PublicReadQueryOptions, cY 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, dp as ProductDetailParams, dq as ProductDetailCatalogResult, dr as ProductListingPageCatalogParams, ds as ProductListingPageResult, dt as ProductListingGroupsCatalogItem, du as ProductListingPageFullParams, dv as ProductListingGroupsItem, c$ as RootClient, c8 as RootServerClient } from './types-Bzgf4mTo.cjs';
4
- import './payload-types-DTAaWKrp.cjs';
5
- import { S as ServerCollection, P as PublicCollection } from './const-BfQfV-rr.cjs';
6
- import { C as CollectionClient } from './collection-client-BHLStm1K.cjs';
7
- import { C as CollectionType } from './types-CpSiyJud.cjs';
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';
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 { cN as ApiQueryOptions, cX as PayloadFindResponse, dd as PublicReadQueryOptions, cY 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, dp as ProductDetailParams, dq as ProductDetailCatalogResult, dr as ProductListingPageCatalogParams, ds as ProductListingPageResult, dt as ProductListingGroupsCatalogItem, du as ProductListingPageFullParams, dv as ProductListingGroupsItem, c$ as RootClient, c8 as RootServerClient } from './types-DdlhpNVv.js';
4
- import './payload-types-DTAaWKrp.js';
5
- import { S as ServerCollection, P as PublicCollection } from './const-ty8u0TDI.js';
6
- import { C as CollectionClient } from './collection-client-B1FSJ24_.js';
7
- import { C as CollectionType } from './types-DX8Z44yQ.js';
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';
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';
package/dist/query.js CHANGED
@@ -561,6 +561,7 @@ var COMMERCE_ERROR_CODES = [
561
561
  "cart_not_active",
562
562
  "cart_locked",
563
563
  "cart_empty",
564
+ "shipping_address_required",
564
565
  "cart_market_unavailable",
565
566
  "cart_market_mismatch",
566
567
  "checkout_not_open",
@@ -577,6 +578,7 @@ var COMMERCE_ERROR_CODES = [
577
578
  "price_changed",
578
579
  "pricing_fact_in_use",
579
580
  "insufficient_stock",
581
+ "credit_insufficient",
580
582
  "reservation_conflict",
581
583
  "stock_lock_unavailable",
582
584
  "variant_not_found",
@@ -978,6 +980,11 @@ var portOneStandardActionCapabilityOperations = /* @__PURE__ */ new Set([
978
980
  ]);
979
981
  var MEMBERSHIP_ENDPOINT_OPERATIONS = {
980
982
  subscribe: operation(null, "post", "/memberships/subscribe"),
983
+ endSubscribeIntent: operation(
984
+ null,
985
+ "post",
986
+ "/memberships/subscribe-intent/end"
987
+ ),
981
988
  billingCustody: operation(null, "post", "/memberships/billing-custody"),
982
989
  cancel: operation(null, "post", "/memberships/:id/cancel"),
983
990
  me: operation(null, "get", "/memberships/me"),
@@ -1023,6 +1030,19 @@ var BENEFIT_VOUCHER_ENDPOINT_OPERATIONS = {
1023
1030
  void: operation("customers", "post", "/benefit-vouchers/void"),
1024
1031
  listMine: operation("customers", "get", "/me/benefit-vouchers")
1025
1032
  };
1033
+ var CUSTOMER_CREDIT_ENDPOINT_OPERATIONS = {
1034
+ grant: strictCommerceOperation("customers", "post", "/credits/grant"),
1035
+ getGrant: strictCommerceOperation("customers", "post", "/credits/get-grant"),
1036
+ getAccount: strictCommerceOperation("customers", "post", "/credits/account"),
1037
+ revoke: strictCommerceOperation("customers", "post", "/credits/revoke"),
1038
+ mine: strictCommerceOperation("customers", "get", "/me/credits"),
1039
+ history: strictCommerceOperation("customers", "get", "/me/credits/history"),
1040
+ configure: strictCommerceOperation(
1041
+ "customers",
1042
+ "post",
1043
+ "/credits/configuration"
1044
+ )
1045
+ };
1026
1046
  var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
1027
1047
  members: operation("customer-groups", "get", "/:id/members"),
1028
1048
  grant: operation("customer-groups", "post", "/:id/members/grant"),