@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.
- package/CHANGELOG.md +313 -0
- package/README.md +228 -102
- package/dist/client.cjs +556 -60
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +556 -60
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-B7rsTtVj.d.cts} +6 -6
- package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-C2sMvfme.d.ts} +6 -6
- package/dist/{const-JD8obaKg.d.ts → const-CRxPTDGt.d.ts} +2 -2
- package/dist/{const-D8LixhAJ.d.cts → const-D6ZRQLxI.d.cts} +2 -2
- package/dist/{index-B0Hjh3Ey.d.ts → index-1auUEYrl.d.ts} +24 -7
- package/dist/{index-Bu0kCc6o.d.cts → index-Bbpf5t-l.d.cts} +24 -7
- package/dist/index.cjs +573 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -12
- package/dist/index.d.ts +19 -12
- package/dist/index.js +573 -260
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BOsckg8B.d.cts → payload-types-BnIET0xU.d.cts} +567 -438
- package/dist/{payload-types-BOsckg8B.d.ts → payload-types-BnIET0xU.d.ts} +567 -438
- package/dist/query.cjs +62 -3
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +62 -3
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +557 -20
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +14 -8
- package/dist/server.d.ts +14 -8
- package/dist/server.js +557 -20
- package/dist/server.js.map +1 -1
- package/dist/{types-5ZlcAFuU.d.ts → types-D1y4TgQm.d.ts} +2 -2
- package/dist/{types-Bj8j7VHU.d.ts → types-DnRC3nLG.d.ts} +464 -16
- package/dist/{types-B14sEt1z.d.cts → types-Dp1oYpD3.d.cts} +2 -2
- package/dist/{types-CM5qiR2k.d.cts → types-Dzn0LD2N.d.cts} +464 -16
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.cjs +4 -2
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +4 -2
- package/dist/ui/video.d.ts +4 -2
- package/dist/ui/video.js +4 -2
- package/dist/ui/video.js.map +1 -1
- package/dist/webhook.cjs +13 -2
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/dist/webhook.js +13 -2
- package/dist/webhook.js.map +1 -1
- package/package.json +9 -28
- package/dist/analytics/react.cjs +0 -344
- package/dist/analytics/react.cjs.map +0 -1
- package/dist/analytics/react.d.cts +0 -24
- package/dist/analytics/react.d.ts +0 -24
- package/dist/analytics/react.js +0 -319
- package/dist/analytics/react.js.map +0 -1
- package/dist/analytics.cjs +0 -238
- package/dist/analytics.cjs.map +0 -1
- package/dist/analytics.d.cts +0 -39
- package/dist/analytics.d.ts +0 -39
- package/dist/analytics.js +0 -215
- package/dist/analytics.js.map +0 -1
package/dist/query.cjs
CHANGED
|
@@ -731,10 +731,13 @@ var CustomerHooks = class {
|
|
|
731
731
|
useCustomerLogout(options) {
|
|
732
732
|
return (0, import_react_query3.useMutation)({
|
|
733
733
|
mutationFn: async () => {
|
|
734
|
-
|
|
734
|
+
try {
|
|
735
|
+
await this.ensureCustomerAuth().logoutAsync();
|
|
736
|
+
} finally {
|
|
737
|
+
this.queryClient.removeQueries({ queryKey: customerKeys.all });
|
|
738
|
+
}
|
|
735
739
|
},
|
|
736
740
|
onSuccess: () => {
|
|
737
|
-
this.queryClient.removeQueries({ queryKey: customerKeys.all });
|
|
738
741
|
options?.onSuccess?.();
|
|
739
742
|
},
|
|
740
743
|
onError: options?.onError,
|
|
@@ -884,6 +887,11 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
|
884
887
|
detail: strictCommerceOperation("checkouts", "post", "/detail"),
|
|
885
888
|
query: strictCommerceOperation("checkouts", "post", "/query")
|
|
886
889
|
},
|
|
890
|
+
draftOrders: {
|
|
891
|
+
calculate: operation("draft-orders", "post", "/:id/calculate"),
|
|
892
|
+
complete: operation("draft-orders", "post", "/:id/complete"),
|
|
893
|
+
finalize: operation("draft-orders", "post", "/:id/finalize")
|
|
894
|
+
},
|
|
887
895
|
transactions: {
|
|
888
896
|
update: operation("transactions", "post", "/update")
|
|
889
897
|
},
|
|
@@ -983,8 +991,51 @@ var portOneStandardActionCapabilityOperations = /* @__PURE__ */ new Set([
|
|
|
983
991
|
]);
|
|
984
992
|
var MEMBERSHIP_ENDPOINT_OPERATIONS = {
|
|
985
993
|
subscribe: operation(null, "post", "/memberships/subscribe"),
|
|
994
|
+
billingCustody: operation(null, "post", "/memberships/billing-custody"),
|
|
986
995
|
cancel: operation(null, "post", "/memberships/:id/cancel"),
|
|
987
|
-
me: operation(null, "get", "/memberships/me")
|
|
996
|
+
me: operation(null, "get", "/memberships/me"),
|
|
997
|
+
chargeResult: operation(null, "post", "/memberships/:id/charge-result"),
|
|
998
|
+
refundResult: operation(null, "post", "/memberships/:id/refund-result"),
|
|
999
|
+
revoke: operation(null, "post", "/memberships/:id/revoke")
|
|
1000
|
+
};
|
|
1001
|
+
var EXTERNAL_EFFECT_CLAIM_ENDPOINT_OPERATIONS = {
|
|
1002
|
+
claim: operation(null, "post", "/external-effect-claims/claim"),
|
|
1003
|
+
get: operation(null, "post", "/external-effect-claims/get"),
|
|
1004
|
+
arm: operation(null, "post", "/external-effect-claims/arm"),
|
|
1005
|
+
release: operation(null, "post", "/external-effect-claims/release"),
|
|
1006
|
+
report: operation(null, "post", "/external-effect-claims/report"),
|
|
1007
|
+
recovery: operation(null, "post", "/external-effect-claims/recovery")
|
|
1008
|
+
};
|
|
1009
|
+
var INSTALLATION_CREDENTIAL_ENDPOINT_OPERATIONS = {
|
|
1010
|
+
create: operation(null, "post", "/installation-credentials/create"),
|
|
1011
|
+
get: operation(null, "post", "/installation-credentials/get"),
|
|
1012
|
+
replace: operation(null, "post", "/installation-credentials/replace"),
|
|
1013
|
+
dispose: operation(null, "post", "/installation-credentials/dispose")
|
|
1014
|
+
};
|
|
1015
|
+
var EXTERNAL_CUSTOMER_LINK_ENDPOINT_OPERATIONS = {
|
|
1016
|
+
connect: operation("customers", "post", "/external-links/connect"),
|
|
1017
|
+
get: operation("customers", "post", "/external-links/get"),
|
|
1018
|
+
list: operation("customers", "post", "/external-links/list"),
|
|
1019
|
+
unlink: operation("customers", "post", "/external-links/unlink"),
|
|
1020
|
+
capturePreviousState: operation(
|
|
1021
|
+
"customers",
|
|
1022
|
+
"post",
|
|
1023
|
+
"/external-links/capture-previous-state"
|
|
1024
|
+
),
|
|
1025
|
+
clearPreviousState: operation(
|
|
1026
|
+
"customers",
|
|
1027
|
+
"post",
|
|
1028
|
+
"/external-links/clear-previous-state"
|
|
1029
|
+
)
|
|
1030
|
+
};
|
|
1031
|
+
var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
|
|
1032
|
+
members: operation("customer-groups", "get", "/:id/members"),
|
|
1033
|
+
grant: operation("customer-groups", "post", "/:id/members/grant"),
|
|
1034
|
+
revoke: operation("customer-groups", "post", "/:id/members/revoke")
|
|
1035
|
+
};
|
|
1036
|
+
var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
|
|
1037
|
+
revokeRefresh: operation("customers", "post", "/revoke-refresh"),
|
|
1038
|
+
withdraw: operation("customers", "post", "/withdraw")
|
|
988
1039
|
};
|
|
989
1040
|
var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
990
1041
|
show: operation("tenants", "get", "/embedded-admin-app"),
|
|
@@ -1009,6 +1060,14 @@ var COMMUNITY_ENDPOINT_OPERATIONS = {
|
|
|
1009
1060
|
detail: operation("posts", "get", "/detail")
|
|
1010
1061
|
}
|
|
1011
1062
|
};
|
|
1063
|
+
var GALLERY_ENDPOINT_OPERATIONS = {
|
|
1064
|
+
items: {
|
|
1065
|
+
storefront: operation("gallery-items", "get", "/storefront")
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
var VIDEO_ENDPOINT_OPERATIONS = {
|
|
1069
|
+
playback: operation("videos", "post", "/:id/playback")
|
|
1070
|
+
};
|
|
1012
1071
|
function resolveOperationTemplate(descriptor) {
|
|
1013
1072
|
return descriptor.collection ? `/api/${descriptor.collection}${descriptor.path}` : `/api${descriptor.path}`;
|
|
1014
1073
|
}
|