@medusajs/loyalty-plugin 2.21.2 → 2.22.0-preview-20261002093930
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.
|
@@ -26869,6 +26869,73 @@ const KeyboundForm = React__namespace.default.forwardRef(({ onSubmit, onKeyDown,
|
|
|
26869
26869
|
);
|
|
26870
26870
|
});
|
|
26871
26871
|
KeyboundForm.displayName = "KeyboundForm";
|
|
26872
|
+
const Note$1 = () => {
|
|
26873
|
+
const { id } = reactRouterDom.useParams();
|
|
26874
|
+
const {
|
|
26875
|
+
gift_card: giftCard,
|
|
26876
|
+
isPending,
|
|
26877
|
+
isError,
|
|
26878
|
+
error
|
|
26879
|
+
} = useGiftCard(id, {});
|
|
26880
|
+
if (isError) {
|
|
26881
|
+
throw error;
|
|
26882
|
+
}
|
|
26883
|
+
const isReady = !isPending && !!giftCard;
|
|
26884
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
26885
|
+
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
26886
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit note" }) }),
|
|
26887
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the note for the gift card" }) })
|
|
26888
|
+
] }),
|
|
26889
|
+
isReady && /* @__PURE__ */ jsxRuntime.jsx(GiftCardNoteForm, { giftCard })
|
|
26890
|
+
] });
|
|
26891
|
+
};
|
|
26892
|
+
const GiftCardNoteForm = ({ giftCard }) => {
|
|
26893
|
+
const form = useForm({
|
|
26894
|
+
defaultValues: {
|
|
26895
|
+
note: giftCard.note ?? ""
|
|
26896
|
+
},
|
|
26897
|
+
resolver: u(schema$3)
|
|
26898
|
+
});
|
|
26899
|
+
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
26900
|
+
const { handleSuccess } = useRouteModal();
|
|
26901
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
26902
|
+
await mutateAsync(
|
|
26903
|
+
{ note: data.note },
|
|
26904
|
+
{
|
|
26905
|
+
onSuccess: () => handleSuccess(),
|
|
26906
|
+
onError: (error) => ui.toast.error(error.message)
|
|
26907
|
+
}
|
|
26908
|
+
);
|
|
26909
|
+
});
|
|
26910
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26911
|
+
KeyboundForm,
|
|
26912
|
+
{
|
|
26913
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
26914
|
+
onSubmit,
|
|
26915
|
+
children: [
|
|
26916
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26917
|
+
Form$2.Field,
|
|
26918
|
+
{
|
|
26919
|
+
control: form.control,
|
|
26920
|
+
name: "note",
|
|
26921
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
26922
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Note" }),
|
|
26923
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Textarea, { ...field }) }),
|
|
26924
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
26925
|
+
] })
|
|
26926
|
+
}
|
|
26927
|
+
) }),
|
|
26928
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
26929
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
26930
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
26931
|
+
] }) })
|
|
26932
|
+
]
|
|
26933
|
+
}
|
|
26934
|
+
) });
|
|
26935
|
+
};
|
|
26936
|
+
const schema$3 = zod.z.object({
|
|
26937
|
+
note: zod.z.string().optional()
|
|
26938
|
+
});
|
|
26872
26939
|
const GiftCardExpiration = () => {
|
|
26873
26940
|
const { id } = reactRouterDom.useParams();
|
|
26874
26941
|
const { gift_card: giftCard, isPending, isError, error } = useGiftCard(id);
|
|
@@ -26889,7 +26956,7 @@ const GiftCardExpirationForm = ({ giftCard }) => {
|
|
|
26889
26956
|
defaultValues: {
|
|
26890
26957
|
expires_at: giftCard.expires_at ? new Date(giftCard.expires_at) : null
|
|
26891
26958
|
},
|
|
26892
|
-
resolver: u(schema$
|
|
26959
|
+
resolver: u(schema$2)
|
|
26893
26960
|
});
|
|
26894
26961
|
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
26895
26962
|
const { handleSuccess } = useRouteModal();
|
|
@@ -26984,75 +27051,8 @@ const GiftCardExpirationForm = ({ giftCard }) => {
|
|
|
26984
27051
|
}
|
|
26985
27052
|
) });
|
|
26986
27053
|
};
|
|
26987
|
-
const schema$3 = zod.z.object({
|
|
26988
|
-
expires_at: zod.z.date().nullish()
|
|
26989
|
-
});
|
|
26990
|
-
const Note$1 = () => {
|
|
26991
|
-
const { id } = reactRouterDom.useParams();
|
|
26992
|
-
const {
|
|
26993
|
-
gift_card: giftCard,
|
|
26994
|
-
isPending,
|
|
26995
|
-
isError,
|
|
26996
|
-
error
|
|
26997
|
-
} = useGiftCard(id, {});
|
|
26998
|
-
if (isError) {
|
|
26999
|
-
throw error;
|
|
27000
|
-
}
|
|
27001
|
-
const isReady = !isPending && !!giftCard;
|
|
27002
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
27003
|
-
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
27004
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit note" }) }),
|
|
27005
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the note for the gift card" }) })
|
|
27006
|
-
] }),
|
|
27007
|
-
isReady && /* @__PURE__ */ jsxRuntime.jsx(GiftCardNoteForm, { giftCard })
|
|
27008
|
-
] });
|
|
27009
|
-
};
|
|
27010
|
-
const GiftCardNoteForm = ({ giftCard }) => {
|
|
27011
|
-
const form = useForm({
|
|
27012
|
-
defaultValues: {
|
|
27013
|
-
note: giftCard.note ?? ""
|
|
27014
|
-
},
|
|
27015
|
-
resolver: u(schema$2)
|
|
27016
|
-
});
|
|
27017
|
-
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
27018
|
-
const { handleSuccess } = useRouteModal();
|
|
27019
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
27020
|
-
await mutateAsync(
|
|
27021
|
-
{ note: data.note },
|
|
27022
|
-
{
|
|
27023
|
-
onSuccess: () => handleSuccess(),
|
|
27024
|
-
onError: (error) => ui.toast.error(error.message)
|
|
27025
|
-
}
|
|
27026
|
-
);
|
|
27027
|
-
});
|
|
27028
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27029
|
-
KeyboundForm,
|
|
27030
|
-
{
|
|
27031
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
27032
|
-
onSubmit,
|
|
27033
|
-
children: [
|
|
27034
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27035
|
-
Form$2.Field,
|
|
27036
|
-
{
|
|
27037
|
-
control: form.control,
|
|
27038
|
-
name: "note",
|
|
27039
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
27040
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Note" }),
|
|
27041
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Textarea, { ...field }) }),
|
|
27042
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
27043
|
-
] })
|
|
27044
|
-
}
|
|
27045
|
-
) }),
|
|
27046
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
27047
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
27048
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
27049
|
-
] }) })
|
|
27050
|
-
]
|
|
27051
|
-
}
|
|
27052
|
-
) });
|
|
27053
|
-
};
|
|
27054
27054
|
const schema$2 = zod.z.object({
|
|
27055
|
-
|
|
27055
|
+
expires_at: zod.z.date().nullish()
|
|
27056
27056
|
});
|
|
27057
27057
|
const columnHelper$7 = createColumnHelper();
|
|
27058
27058
|
const useGiftCardProductsTableColumns = () => {
|
|
@@ -42891,13 +42891,13 @@ const routeModule = {
|
|
|
42891
42891
|
Component: GiftCardDetailsPage,
|
|
42892
42892
|
path: "/gift-cards/:id",
|
|
42893
42893
|
children: [
|
|
42894
|
-
{
|
|
42895
|
-
Component: GiftCardExpiration,
|
|
42896
|
-
path: "/gift-cards/:id/expiration"
|
|
42897
|
-
},
|
|
42898
42894
|
{
|
|
42899
42895
|
Component: Note$1,
|
|
42900
42896
|
path: "/gift-cards/:id/note"
|
|
42897
|
+
},
|
|
42898
|
+
{
|
|
42899
|
+
Component: GiftCardExpiration,
|
|
42900
|
+
path: "/gift-cards/:id/expiration"
|
|
42901
42901
|
}
|
|
42902
42902
|
]
|
|
42903
42903
|
},
|
|
@@ -26849,6 +26849,73 @@ const KeyboundForm = React__default.forwardRef(({ onSubmit, onKeyDown, ...rest }
|
|
|
26849
26849
|
);
|
|
26850
26850
|
});
|
|
26851
26851
|
KeyboundForm.displayName = "KeyboundForm";
|
|
26852
|
+
const Note$1 = () => {
|
|
26853
|
+
const { id } = useParams();
|
|
26854
|
+
const {
|
|
26855
|
+
gift_card: giftCard,
|
|
26856
|
+
isPending,
|
|
26857
|
+
isError,
|
|
26858
|
+
error
|
|
26859
|
+
} = useGiftCard(id, {});
|
|
26860
|
+
if (isError) {
|
|
26861
|
+
throw error;
|
|
26862
|
+
}
|
|
26863
|
+
const isReady = !isPending && !!giftCard;
|
|
26864
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
26865
|
+
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
26866
|
+
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit note" }) }),
|
|
26867
|
+
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the note for the gift card" }) })
|
|
26868
|
+
] }),
|
|
26869
|
+
isReady && /* @__PURE__ */ jsx(GiftCardNoteForm, { giftCard })
|
|
26870
|
+
] });
|
|
26871
|
+
};
|
|
26872
|
+
const GiftCardNoteForm = ({ giftCard }) => {
|
|
26873
|
+
const form = useForm({
|
|
26874
|
+
defaultValues: {
|
|
26875
|
+
note: giftCard.note ?? ""
|
|
26876
|
+
},
|
|
26877
|
+
resolver: u(schema$3)
|
|
26878
|
+
});
|
|
26879
|
+
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
26880
|
+
const { handleSuccess } = useRouteModal();
|
|
26881
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
26882
|
+
await mutateAsync(
|
|
26883
|
+
{ note: data.note },
|
|
26884
|
+
{
|
|
26885
|
+
onSuccess: () => handleSuccess(),
|
|
26886
|
+
onError: (error) => toast.error(error.message)
|
|
26887
|
+
}
|
|
26888
|
+
);
|
|
26889
|
+
});
|
|
26890
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
26891
|
+
KeyboundForm,
|
|
26892
|
+
{
|
|
26893
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
26894
|
+
onSubmit,
|
|
26895
|
+
children: [
|
|
26896
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
26897
|
+
Form$2.Field,
|
|
26898
|
+
{
|
|
26899
|
+
control: form.control,
|
|
26900
|
+
name: "note",
|
|
26901
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
26902
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Note" }),
|
|
26903
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Textarea, { ...field }) }),
|
|
26904
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
26905
|
+
] })
|
|
26906
|
+
}
|
|
26907
|
+
) }),
|
|
26908
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
26909
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
26910
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
26911
|
+
] }) })
|
|
26912
|
+
]
|
|
26913
|
+
}
|
|
26914
|
+
) });
|
|
26915
|
+
};
|
|
26916
|
+
const schema$3 = z.object({
|
|
26917
|
+
note: z.string().optional()
|
|
26918
|
+
});
|
|
26852
26919
|
const GiftCardExpiration = () => {
|
|
26853
26920
|
const { id } = useParams();
|
|
26854
26921
|
const { gift_card: giftCard, isPending, isError, error } = useGiftCard(id);
|
|
@@ -26869,7 +26936,7 @@ const GiftCardExpirationForm = ({ giftCard }) => {
|
|
|
26869
26936
|
defaultValues: {
|
|
26870
26937
|
expires_at: giftCard.expires_at ? new Date(giftCard.expires_at) : null
|
|
26871
26938
|
},
|
|
26872
|
-
resolver: u(schema$
|
|
26939
|
+
resolver: u(schema$2)
|
|
26873
26940
|
});
|
|
26874
26941
|
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
26875
26942
|
const { handleSuccess } = useRouteModal();
|
|
@@ -26964,75 +27031,8 @@ const GiftCardExpirationForm = ({ giftCard }) => {
|
|
|
26964
27031
|
}
|
|
26965
27032
|
) });
|
|
26966
27033
|
};
|
|
26967
|
-
const schema$3 = z.object({
|
|
26968
|
-
expires_at: z.date().nullish()
|
|
26969
|
-
});
|
|
26970
|
-
const Note$1 = () => {
|
|
26971
|
-
const { id } = useParams();
|
|
26972
|
-
const {
|
|
26973
|
-
gift_card: giftCard,
|
|
26974
|
-
isPending,
|
|
26975
|
-
isError,
|
|
26976
|
-
error
|
|
26977
|
-
} = useGiftCard(id, {});
|
|
26978
|
-
if (isError) {
|
|
26979
|
-
throw error;
|
|
26980
|
-
}
|
|
26981
|
-
const isReady = !isPending && !!giftCard;
|
|
26982
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
26983
|
-
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
26984
|
-
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit note" }) }),
|
|
26985
|
-
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the note for the gift card" }) })
|
|
26986
|
-
] }),
|
|
26987
|
-
isReady && /* @__PURE__ */ jsx(GiftCardNoteForm, { giftCard })
|
|
26988
|
-
] });
|
|
26989
|
-
};
|
|
26990
|
-
const GiftCardNoteForm = ({ giftCard }) => {
|
|
26991
|
-
const form = useForm({
|
|
26992
|
-
defaultValues: {
|
|
26993
|
-
note: giftCard.note ?? ""
|
|
26994
|
-
},
|
|
26995
|
-
resolver: u(schema$2)
|
|
26996
|
-
});
|
|
26997
|
-
const { mutateAsync, isPending } = useUpdateGiftCard(giftCard.id);
|
|
26998
|
-
const { handleSuccess } = useRouteModal();
|
|
26999
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
27000
|
-
await mutateAsync(
|
|
27001
|
-
{ note: data.note },
|
|
27002
|
-
{
|
|
27003
|
-
onSuccess: () => handleSuccess(),
|
|
27004
|
-
onError: (error) => toast.error(error.message)
|
|
27005
|
-
}
|
|
27006
|
-
);
|
|
27007
|
-
});
|
|
27008
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
27009
|
-
KeyboundForm,
|
|
27010
|
-
{
|
|
27011
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
27012
|
-
onSubmit,
|
|
27013
|
-
children: [
|
|
27014
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
27015
|
-
Form$2.Field,
|
|
27016
|
-
{
|
|
27017
|
-
control: form.control,
|
|
27018
|
-
name: "note",
|
|
27019
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
27020
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Note" }),
|
|
27021
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Textarea, { ...field }) }),
|
|
27022
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
27023
|
-
] })
|
|
27024
|
-
}
|
|
27025
|
-
) }),
|
|
27026
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
27027
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
27028
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
27029
|
-
] }) })
|
|
27030
|
-
]
|
|
27031
|
-
}
|
|
27032
|
-
) });
|
|
27033
|
-
};
|
|
27034
27034
|
const schema$2 = z.object({
|
|
27035
|
-
|
|
27035
|
+
expires_at: z.date().nullish()
|
|
27036
27036
|
});
|
|
27037
27037
|
const columnHelper$7 = createColumnHelper();
|
|
27038
27038
|
const useGiftCardProductsTableColumns = () => {
|
|
@@ -42871,13 +42871,13 @@ const routeModule = {
|
|
|
42871
42871
|
Component: GiftCardDetailsPage,
|
|
42872
42872
|
path: "/gift-cards/:id",
|
|
42873
42873
|
children: [
|
|
42874
|
-
{
|
|
42875
|
-
Component: GiftCardExpiration,
|
|
42876
|
-
path: "/gift-cards/:id/expiration"
|
|
42877
|
-
},
|
|
42878
42874
|
{
|
|
42879
42875
|
Component: Note$1,
|
|
42880
42876
|
path: "/gift-cards/:id/note"
|
|
42877
|
+
},
|
|
42878
|
+
{
|
|
42879
|
+
Component: GiftCardExpiration,
|
|
42880
|
+
path: "/gift-cards/:id/expiration"
|
|
42881
42881
|
}
|
|
42882
42882
|
]
|
|
42883
42883
|
},
|
|
@@ -125,7 +125,9 @@ exports.confirmCartCreditLinesWorkflow = (0, workflows_sdk_1.createWorkflow)("co
|
|
|
125
125
|
amount: cl.amount,
|
|
126
126
|
reference: "cart",
|
|
127
127
|
reference_id: cart.id,
|
|
128
|
-
note:
|
|
128
|
+
note: cl.reference === "gift-card"
|
|
129
|
+
? "Gift card usage"
|
|
130
|
+
: "Store credit usage",
|
|
129
131
|
};
|
|
130
132
|
});
|
|
131
133
|
});
|
|
@@ -134,4 +136,4 @@ exports.confirmCartCreditLinesWorkflow = (0, workflows_sdk_1.createWorkflow)("co
|
|
|
134
136
|
});
|
|
135
137
|
return new workflows_sdk_1.WorkflowResponse([]);
|
|
136
138
|
});
|
|
137
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
139
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1jYXJ0LWNyZWRpdC1saW5lcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvY2FydHMvd29ya2Zsb3dzL2NvbmZpcm0tY2FydC1jcmVkaXQtbGluZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQWdFO0FBQ2hFLDREQUFnRTtBQUNoRSxxRUFLMkM7QUFHM0Msd0RBQTZEO0FBQzdELGdGQUFvRjtBQWdCcEY7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXFCRztBQUNVLFFBQUEsOEJBQThCLEdBQUcsSUFBQSwwQkFBVSxFQUN0RCwrQkFBK0IsRUFDL0IsS0FBSyxXQUFXLEVBQ2QsU0FBUyxFQUNULG1CQUFtQixHQUNpQjtJQUNwQyxLQUFLLE1BQU0sUUFBUSxJQUFJLFNBQVMsRUFBRSxDQUFDO1FBQ2pDLE1BQU0sS0FBSyxHQUFHLG1CQUFtQixDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUVqRCxJQUFJLGNBQU0sQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLE9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FNBQVMsRUFBRSxNQUFNO2dCQUNqQixZQUFZLEVBQUUsSUFBSSxDQUFDLEVBQUU7Z0JBQ3JCLElBQUksRUFDRixFQUFFLENBQUMsU0FBUyxLQUFLLFdBQVc7b0JBQzFCLENBQUMsQ0FBQyxpQkFBaUI7b0JBQ25CLENBQUMsQ0FBQyxvQkFBb0I7YUFDM0IsQ0FBQztRQUNKLENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUNGLENBQUM7SUFFRixzQ0FBcUIsQ0FBQyxTQUFTLENBQUM7UUFDOUIsS0FBSyxFQUFFLGtCQUFrQjtLQUMxQixDQUFDLENBQUM7SUFFSCxPQUFPLElBQUksZ0NBQWdCLENBQUMsRUFBRSxDQUFDLENBQUM7QUFDbEMsQ0FBQyxDQUNGLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/loyalty-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0-preview-20261002093930",
|
|
4
4
|
"description": "Medusa Plugin: Loyalty - Gift Cards",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"watch": "medusa plugin:develop"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@medusajs/admin-sdk": "2.
|
|
59
|
-
"@medusajs/cli": "2.
|
|
60
|
-
"@medusajs/dashboard": "2.
|
|
61
|
-
"@medusajs/framework": "2.
|
|
62
|
-
"@medusajs/icons": "2.
|
|
63
|
-
"@medusajs/medusa": "2.
|
|
64
|
-
"@medusajs/test-utils": "2.
|
|
65
|
-
"@medusajs/types": "2.
|
|
66
|
-
"@medusajs/ui": "4.2.
|
|
67
|
-
"@medusajs/ui-preset": "2.
|
|
58
|
+
"@medusajs/admin-sdk": "2.22.0-preview-20261002093930",
|
|
59
|
+
"@medusajs/cli": "2.22.0-preview-20261002093930",
|
|
60
|
+
"@medusajs/dashboard": "2.22.0-preview-20261002093930",
|
|
61
|
+
"@medusajs/framework": "2.22.0-preview-20261002093930",
|
|
62
|
+
"@medusajs/icons": "2.22.0-preview-20261002093930",
|
|
63
|
+
"@medusajs/medusa": "2.22.0-preview-20261002093930",
|
|
64
|
+
"@medusajs/test-utils": "2.22.0-preview-20261002093930",
|
|
65
|
+
"@medusajs/types": "2.22.0-preview-20261002093930",
|
|
66
|
+
"@medusajs/ui": "4.2.7-preview-20261002093930",
|
|
67
|
+
"@medusajs/ui-preset": "2.22.0-preview-20261002093930",
|
|
68
68
|
"@swc/core": "1.5.7",
|
|
69
69
|
"@types/node": "^20.0.0",
|
|
70
70
|
"cross-env": "^7.0.3",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"typescript": "^5.7.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@medusajs/admin-sdk": "2.
|
|
76
|
-
"@medusajs/cli": "2.
|
|
77
|
-
"@medusajs/dashboard": "2.
|
|
78
|
-
"@medusajs/framework": "2.
|
|
79
|
-
"@medusajs/icons": "2.
|
|
80
|
-
"@medusajs/medusa": "2.
|
|
81
|
-
"@medusajs/test-utils": "2.
|
|
82
|
-
"@medusajs/ui": "4.2.
|
|
75
|
+
"@medusajs/admin-sdk": "2.22.0-preview-20261002093930",
|
|
76
|
+
"@medusajs/cli": "2.22.0-preview-20261002093930",
|
|
77
|
+
"@medusajs/dashboard": "2.22.0-preview-20261002093930",
|
|
78
|
+
"@medusajs/framework": "2.22.0-preview-20261002093930",
|
|
79
|
+
"@medusajs/icons": "2.22.0-preview-20261002093930",
|
|
80
|
+
"@medusajs/medusa": "2.22.0-preview-20261002093930",
|
|
81
|
+
"@medusajs/test-utils": "2.22.0-preview-20261002093930",
|
|
82
|
+
"@medusajs/ui": "4.2.7-preview-20261002093930",
|
|
83
83
|
"react": "^18.3.1",
|
|
84
84
|
"react-dom": "^18.3.1",
|
|
85
85
|
"react-router-dom": "^6.30.4 || ^7.0.0"
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"engines": {
|
|
117
|
-
"node": ">=
|
|
117
|
+
"node": ">=22.15.0"
|
|
118
118
|
},
|
|
119
119
|
"packageManager": "yarn@3.2.1"
|
|
120
120
|
}
|