@01.software/sdk 0.51.0 → 0.65.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 (67) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/README.md +228 -102
  3. package/dist/client.cjs +556 -60
  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 +556 -60
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-B7rsTtVj.d.cts} +6 -6
  10. package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-C2sMvfme.d.ts} +6 -6
  11. package/dist/{const-JD8obaKg.d.ts → const-CRxPTDGt.d.ts} +2 -2
  12. package/dist/{const-D8LixhAJ.d.cts → const-D6ZRQLxI.d.cts} +2 -2
  13. package/dist/{index-B0Hjh3Ey.d.ts → index-1auUEYrl.d.ts} +24 -7
  14. package/dist/{index-Bu0kCc6o.d.cts → index-Bbpf5t-l.d.cts} +24 -7
  15. package/dist/index.cjs +573 -260
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +19 -12
  18. package/dist/index.d.ts +19 -12
  19. package/dist/index.js +573 -260
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BOsckg8B.d.cts → payload-types-BnIET0xU.d.cts} +567 -438
  22. package/dist/{payload-types-BOsckg8B.d.ts → payload-types-BnIET0xU.d.ts} +567 -438
  23. package/dist/query.cjs +62 -3
  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 +62 -3
  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 +557 -20
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +14 -8
  34. package/dist/server.d.ts +14 -8
  35. package/dist/server.js +557 -20
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-5ZlcAFuU.d.ts → types-D1y4TgQm.d.ts} +2 -2
  38. package/dist/{types-Bj8j7VHU.d.ts → types-DnRC3nLG.d.ts} +464 -16
  39. package/dist/{types-B14sEt1z.d.cts → types-Dp1oYpD3.d.cts} +2 -2
  40. package/dist/{types-CM5qiR2k.d.cts → types-Dzn0LD2N.d.cts} +464 -16
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.cjs +4 -2
  44. package/dist/ui/video.cjs.map +1 -1
  45. package/dist/ui/video.d.cts +4 -2
  46. package/dist/ui/video.d.ts +4 -2
  47. package/dist/ui/video.js +4 -2
  48. package/dist/ui/video.js.map +1 -1
  49. package/dist/webhook.cjs +13 -2
  50. package/dist/webhook.cjs.map +1 -1
  51. package/dist/webhook.d.cts +5 -5
  52. package/dist/webhook.d.ts +5 -5
  53. package/dist/webhook.js +13 -2
  54. package/dist/webhook.js.map +1 -1
  55. package/package.json +9 -28
  56. package/dist/analytics/react.cjs +0 -344
  57. package/dist/analytics/react.cjs.map +0 -1
  58. package/dist/analytics/react.d.cts +0 -24
  59. package/dist/analytics/react.d.ts +0 -24
  60. package/dist/analytics/react.js +0 -319
  61. package/dist/analytics/react.js.map +0 -1
  62. package/dist/analytics.cjs +0 -238
  63. package/dist/analytics.cjs.map +0 -1
  64. package/dist/analytics.d.cts +0 -39
  65. package/dist/analytics.d.ts +0 -39
  66. package/dist/analytics.js +0 -215
  67. package/dist/analytics.js.map +0 -1
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 { i as ApiQueryOptions, P as PayloadFindResponse, c4 as PublicReadQueryOptions, L as PayloadMutationResponse, c5 as CustomerAuth, c6 as CustomerProfile, c7 as CustomerAuthResponse, c8 as CustomerLoginData, c9 as CustomerRegisterResponse, ca as CustomerRegisterData, cb as CustomerRefreshResponse, cc as UpdateProfileData, cd as ProductListingPageParams, ce as ProductListingPageBaseParams, cf as ProductDetailParams, cg as ProductDetailCatalogResult, ch as ProductListingPageCatalogParams, ci as ProductListingPageResult, cj as ProductListingGroupsCatalogItem, ck as ProductListingPageFullParams, cl as ProductListingGroupsItem, al as RootClient, bL as RootServerClient } from './types-CM5qiR2k.cjs';
4
- import './payload-types-BOsckg8B.cjs';
5
- import { S as ServerCollection, P as PublicCollection } from './const-D8LixhAJ.cjs';
6
- import { C as CollectionClient } from './collection-client-CWAeuzV4.cjs';
7
- import { C as CollectionType } from './types-B14sEt1z.cjs';
3
+ import { i as ApiQueryOptions, P as PayloadFindResponse, cN as PublicReadQueryOptions, L as PayloadMutationResponse, cO as CustomerAuth, cP as CustomerProfile, cQ as CustomerAuthResponse, cR as CustomerLoginData, cS as CustomerRegisterResponse, cT as CustomerRegisterData, cU as CustomerRefreshResponse, cV as UpdateProfileData, cW as ProductListingPageParams, cX as ProductListingPageBaseParams, cY as ProductDetailParams, cZ as ProductDetailCatalogResult, c_ as ProductListingPageCatalogParams, c$ as ProductListingPageResult, d0 as ProductListingGroupsCatalogItem, d1 as ProductListingPageFullParams, d2 as ProductListingGroupsItem, al as RootClient, cp as RootServerClient } from './types-Dzn0LD2N.cjs';
4
+ import './payload-types-BnIET0xU.cjs';
5
+ import { S as ServerCollection, P as PublicCollection } from './const-D6ZRQLxI.cjs';
6
+ import { C as CollectionClient } from './collection-client-B7rsTtVj.cjs';
7
+ import { C as CollectionType } from './types-Dp1oYpD3.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 { i as ApiQueryOptions, P as PayloadFindResponse, c4 as PublicReadQueryOptions, L as PayloadMutationResponse, c5 as CustomerAuth, c6 as CustomerProfile, c7 as CustomerAuthResponse, c8 as CustomerLoginData, c9 as CustomerRegisterResponse, ca as CustomerRegisterData, cb as CustomerRefreshResponse, cc as UpdateProfileData, cd as ProductListingPageParams, ce as ProductListingPageBaseParams, cf as ProductDetailParams, cg as ProductDetailCatalogResult, ch as ProductListingPageCatalogParams, ci as ProductListingPageResult, cj as ProductListingGroupsCatalogItem, ck as ProductListingPageFullParams, cl as ProductListingGroupsItem, al as RootClient, bL as RootServerClient } from './types-Bj8j7VHU.js';
4
- import './payload-types-BOsckg8B.js';
5
- import { S as ServerCollection, P as PublicCollection } from './const-JD8obaKg.js';
6
- import { C as CollectionClient } from './collection-client-hYvVfHIm.js';
7
- import { C as CollectionType } from './types-5ZlcAFuU.js';
3
+ import { i as ApiQueryOptions, P as PayloadFindResponse, cN as PublicReadQueryOptions, L as PayloadMutationResponse, cO as CustomerAuth, cP as CustomerProfile, cQ as CustomerAuthResponse, cR as CustomerLoginData, cS as CustomerRegisterResponse, cT as CustomerRegisterData, cU as CustomerRefreshResponse, cV as UpdateProfileData, cW as ProductListingPageParams, cX as ProductListingPageBaseParams, cY as ProductDetailParams, cZ as ProductDetailCatalogResult, c_ as ProductListingPageCatalogParams, c$ as ProductListingPageResult, d0 as ProductListingGroupsCatalogItem, d1 as ProductListingPageFullParams, d2 as ProductListingGroupsItem, al as RootClient, cp as RootServerClient } from './types-DnRC3nLG.js';
4
+ import './payload-types-BnIET0xU.js';
5
+ import { S as ServerCollection, P as PublicCollection } from './const-CRxPTDGt.js';
6
+ import { C as CollectionClient } from './collection-client-C2sMvfme.js';
7
+ import { C as CollectionType } from './types-D1y4TgQm.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
@@ -703,10 +703,13 @@ var CustomerHooks = class {
703
703
  useCustomerLogout(options) {
704
704
  return useMutationOriginal2({
705
705
  mutationFn: async () => {
706
- this.ensureCustomerAuth().logout();
706
+ try {
707
+ await this.ensureCustomerAuth().logoutAsync();
708
+ } finally {
709
+ this.queryClient.removeQueries({ queryKey: customerKeys.all });
710
+ }
707
711
  },
708
712
  onSuccess: () => {
709
- this.queryClient.removeQueries({ queryKey: customerKeys.all });
710
713
  options?.onSuccess?.();
711
714
  },
712
715
  onError: options?.onError,
@@ -861,6 +864,11 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
861
864
  detail: strictCommerceOperation("checkouts", "post", "/detail"),
862
865
  query: strictCommerceOperation("checkouts", "post", "/query")
863
866
  },
867
+ draftOrders: {
868
+ calculate: operation("draft-orders", "post", "/:id/calculate"),
869
+ complete: operation("draft-orders", "post", "/:id/complete"),
870
+ finalize: operation("draft-orders", "post", "/:id/finalize")
871
+ },
864
872
  transactions: {
865
873
  update: operation("transactions", "post", "/update")
866
874
  },
@@ -960,8 +968,51 @@ var portOneStandardActionCapabilityOperations = /* @__PURE__ */ new Set([
960
968
  ]);
961
969
  var MEMBERSHIP_ENDPOINT_OPERATIONS = {
962
970
  subscribe: operation(null, "post", "/memberships/subscribe"),
971
+ billingCustody: operation(null, "post", "/memberships/billing-custody"),
963
972
  cancel: operation(null, "post", "/memberships/:id/cancel"),
964
- me: operation(null, "get", "/memberships/me")
973
+ me: operation(null, "get", "/memberships/me"),
974
+ chargeResult: operation(null, "post", "/memberships/:id/charge-result"),
975
+ refundResult: operation(null, "post", "/memberships/:id/refund-result"),
976
+ revoke: operation(null, "post", "/memberships/:id/revoke")
977
+ };
978
+ var EXTERNAL_EFFECT_CLAIM_ENDPOINT_OPERATIONS = {
979
+ claim: operation(null, "post", "/external-effect-claims/claim"),
980
+ get: operation(null, "post", "/external-effect-claims/get"),
981
+ arm: operation(null, "post", "/external-effect-claims/arm"),
982
+ release: operation(null, "post", "/external-effect-claims/release"),
983
+ report: operation(null, "post", "/external-effect-claims/report"),
984
+ recovery: operation(null, "post", "/external-effect-claims/recovery")
985
+ };
986
+ var INSTALLATION_CREDENTIAL_ENDPOINT_OPERATIONS = {
987
+ create: operation(null, "post", "/installation-credentials/create"),
988
+ get: operation(null, "post", "/installation-credentials/get"),
989
+ replace: operation(null, "post", "/installation-credentials/replace"),
990
+ dispose: operation(null, "post", "/installation-credentials/dispose")
991
+ };
992
+ var EXTERNAL_CUSTOMER_LINK_ENDPOINT_OPERATIONS = {
993
+ connect: operation("customers", "post", "/external-links/connect"),
994
+ get: operation("customers", "post", "/external-links/get"),
995
+ list: operation("customers", "post", "/external-links/list"),
996
+ unlink: operation("customers", "post", "/external-links/unlink"),
997
+ capturePreviousState: operation(
998
+ "customers",
999
+ "post",
1000
+ "/external-links/capture-previous-state"
1001
+ ),
1002
+ clearPreviousState: operation(
1003
+ "customers",
1004
+ "post",
1005
+ "/external-links/clear-previous-state"
1006
+ )
1007
+ };
1008
+ var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
1009
+ members: operation("customer-groups", "get", "/:id/members"),
1010
+ grant: operation("customer-groups", "post", "/:id/members/grant"),
1011
+ revoke: operation("customer-groups", "post", "/:id/members/revoke")
1012
+ };
1013
+ var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
1014
+ revokeRefresh: operation("customers", "post", "/revoke-refresh"),
1015
+ withdraw: operation("customers", "post", "/withdraw")
965
1016
  };
966
1017
  var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
967
1018
  show: operation("tenants", "get", "/embedded-admin-app"),
@@ -986,6 +1037,14 @@ var COMMUNITY_ENDPOINT_OPERATIONS = {
986
1037
  detail: operation("posts", "get", "/detail")
987
1038
  }
988
1039
  };
1040
+ var GALLERY_ENDPOINT_OPERATIONS = {
1041
+ items: {
1042
+ storefront: operation("gallery-items", "get", "/storefront")
1043
+ }
1044
+ };
1045
+ var VIDEO_ENDPOINT_OPERATIONS = {
1046
+ playback: operation("videos", "post", "/:id/playback")
1047
+ };
989
1048
  function resolveOperationTemplate(descriptor) {
990
1049
  return descriptor.collection ? `/api/${descriptor.collection}${descriptor.path}` : `/api${descriptor.path}`;
991
1050
  }