@sellhapi/studio-runtime 0.1.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/dist/components/AppointmentBooker.d.ts +7 -0
- package/dist/components/AppointmentBooker.d.ts.map +1 -0
- package/dist/components/ArticleCard.d.ts +6 -0
- package/dist/components/ArticleCard.d.ts.map +1 -0
- package/dist/components/ArticleGrid.d.ts +8 -0
- package/dist/components/ArticleGrid.d.ts.map +1 -0
- package/dist/components/DonationCampaignGrid.d.ts +7 -0
- package/dist/components/DonationCampaignGrid.d.ts.map +1 -0
- package/dist/components/DonationForm.d.ts +9 -0
- package/dist/components/DonationForm.d.ts.map +1 -0
- package/dist/components/EventCard.d.ts +6 -0
- package/dist/components/EventCard.d.ts.map +1 -0
- package/dist/components/EventGrid.d.ts +8 -0
- package/dist/components/EventGrid.d.ts.map +1 -0
- package/dist/components/MembershipTiers.d.ts +6 -0
- package/dist/components/MembershipTiers.d.ts.map +1 -0
- package/dist/components/ProductCard.d.ts +6 -0
- package/dist/components/ProductCard.d.ts.map +1 -0
- package/dist/components/ProductGrid.d.ts +9 -0
- package/dist/components/ProductGrid.d.ts.map +1 -0
- package/dist/components/RSVPForm.d.ts +7 -0
- package/dist/components/RSVPForm.d.ts.map +1 -0
- package/dist/context.d.ts +26 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/hooks/useArticles.d.ts +12 -0
- package/dist/hooks/useArticles.d.ts.map +1 -0
- package/dist/hooks/useBookAppointment.d.ts +26 -0
- package/dist/hooks/useBookAppointment.d.ts.map +1 -0
- package/dist/hooks/useCart.d.ts +63 -0
- package/dist/hooks/useCart.d.ts.map +1 -0
- package/dist/hooks/useCheckoutConfig.d.ts +21 -0
- package/dist/hooks/useCheckoutConfig.d.ts.map +1 -0
- package/dist/hooks/useCollection.d.ts +12 -0
- package/dist/hooks/useCollection.d.ts.map +1 -0
- package/dist/hooks/useContentForm.d.ts +31 -0
- package/dist/hooks/useContentForm.d.ts.map +1 -0
- package/dist/hooks/useContentItems.d.ts +122 -0
- package/dist/hooks/useContentItems.d.ts.map +1 -0
- package/dist/hooks/useCreateRSVP.d.ts +10 -0
- package/dist/hooks/useCreateRSVP.d.ts.map +1 -0
- package/dist/hooks/useDigitalProducts.d.ts +8 -0
- package/dist/hooks/useDigitalProducts.d.ts.map +1 -0
- package/dist/hooks/useDonate.d.ts +8 -0
- package/dist/hooks/useDonate.d.ts.map +1 -0
- package/dist/hooks/useDonationCampaigns.d.ts +10 -0
- package/dist/hooks/useDonationCampaigns.d.ts.map +1 -0
- package/dist/hooks/useEvents.d.ts +10 -0
- package/dist/hooks/useEvents.d.ts.map +1 -0
- package/dist/hooks/useFetch.d.ts +14 -0
- package/dist/hooks/useFetch.d.ts.map +1 -0
- package/dist/hooks/useMemberships.d.ts +5 -0
- package/dist/hooks/useMemberships.d.ts.map +1 -0
- package/dist/hooks/useProductCheckout.d.ts +15 -0
- package/dist/hooks/useProductCheckout.d.ts.map +1 -0
- package/dist/hooks/useProducts.d.ts +19 -0
- package/dist/hooks/useProducts.d.ts.map +1 -0
- package/dist/hooks/usePurchaseTickets.d.ts +8 -0
- package/dist/hooks/usePurchaseTickets.d.ts.map +1 -0
- package/dist/hooks/useServices.d.ts +8 -0
- package/dist/hooks/useServices.d.ts.map +1 -0
- package/dist/hooks/useShippingRates.d.ts +12 -0
- package/dist/hooks/useShippingRates.d.ts.map +1 -0
- package/dist/hooks/useStudioEditMode.d.ts +19 -0
- package/dist/hooks/useStudioEditMode.d.ts.map +1 -0
- package/dist/hooks/useSubscribeMembership.d.ts +8 -0
- package/dist/hooks/useSubscribeMembership.d.ts.map +1 -0
- package/dist/hooks/useValidateDiscount.d.ts +21 -0
- package/dist/hooks/useValidateDiscount.d.ts.map +1 -0
- package/dist/index.cjs +1594 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1571 -0
- package/dist/types/index.d.ts +162 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface AppointmentBookerProps {
|
|
2
|
+
heading?: string;
|
|
3
|
+
subheading?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function AppointmentBooker({ heading, subheading, limit }: AppointmentBookerProps): import("react").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=AppointmentBooker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppointmentBooker.d.ts","sourceRoot":"","sources":["../../src/components/AppointmentBooker.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAO,MAAM,CAAC;CACrB;AAeD,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,sBAAsB,sCA8BvF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StorefrontArticle } from "../types/index.js";
|
|
2
|
+
export interface ArticleCardProps {
|
|
3
|
+
article: StorefrontArticle;
|
|
4
|
+
}
|
|
5
|
+
export declare function ArticleCard({ article }: ArticleCardProps): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ArticleCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleCard.d.ts","sourceRoot":"","sources":["../../src/components/ArticleCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAkBD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,+BAqBxD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ArticleGridProps {
|
|
2
|
+
heading?: string;
|
|
3
|
+
limit?: number;
|
|
4
|
+
category?: string;
|
|
5
|
+
tag?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ArticleGrid({ heading, limit, category, tag }: ArticleGridProps): import("react").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=ArticleGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleGrid.d.ts","sourceRoot":"","sources":["../../src/components/ArticleGrid.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAG,MAAM,CAAC;IAClB,KAAK,CAAC,EAAK,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAO,MAAM,CAAC;CACnB;AAuBD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,gBAAgB,sCA+B9E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface DonationCampaignGridProps {
|
|
2
|
+
heading?: string;
|
|
3
|
+
subheading?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function DonationCampaignGrid({ heading, subheading, limit }: DonationCampaignGridProps): import("react").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=DonationCampaignGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonationCampaignGrid.d.ts","sourceRoot":"","sources":["../../src/components/DonationCampaignGrid.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAO,MAAM,CAAC;CACrB;AA4BD,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,yBAAyB,sCAkD7F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface DonationFormProps {
|
|
2
|
+
campaignId: string;
|
|
3
|
+
heading?: string;
|
|
4
|
+
buttonLabel?: string;
|
|
5
|
+
primaryColor?: string;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function DonationForm({ campaignId, heading, buttonLabel, primaryColor, onSuccess }: DonationFormProps): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=DonationForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonationForm.d.ts","sourceRoot":"","sources":["../../src/components/DonationForm.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAK,MAAM,CAAC;IACtB,OAAO,CAAC,EAAO,MAAM,CAAC;IACtB,WAAW,CAAC,EAAG,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAK,MAAM,IAAI,CAAC;CAC3B;AAYD,wBAAgB,YAAY,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,WAAsB,EAAE,YAAwB,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAmGnI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventCard.d.ts","sourceRoot":"","sources":["../../src/components/EventCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,eAAe,CAAC;CACxB;AAkBD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,+BAmBlD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface EventGridProps {
|
|
2
|
+
heading?: string;
|
|
3
|
+
subheading?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function EventGrid({ heading, subheading, limit }: EventGridProps): import("react").JSX.Element | null;
|
|
7
|
+
export { EventCard } from "./EventCard.js";
|
|
8
|
+
//# sourceMappingURL=EventGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventGrid.d.ts","sourceRoot":"","sources":["../../src/components/EventGrid.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAO,MAAM,CAAC;CACrB;AAuBD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,cAAc,sCAiCvE;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MembershipTiers.d.ts","sourceRoot":"","sources":["../../src/components/MembershipTiers.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAeD,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,oBAAoB,sCAqC5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,CAAC;CACvB;AAkBD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,+BAgBxD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ProductGridProps {
|
|
2
|
+
heading?: string;
|
|
3
|
+
limit?: number;
|
|
4
|
+
categoryId?: string;
|
|
5
|
+
/** Pass "digital" to render only digital downloadable products */
|
|
6
|
+
type?: "digital";
|
|
7
|
+
}
|
|
8
|
+
export declare function ProductGrid({ heading, limit, categoryId, type }: ProductGridProps): import("react").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=ProductGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductGrid.d.ts","sourceRoot":"","sources":["../../src/components/ProductGrid.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,KAAK,CAAC,EAAO,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAQ,SAAS,CAAC;CACxB;AAyBD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,gBAAgB,sCAoCjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RSVPForm.d.ts","sourceRoot":"","sources":["../../src/components/RSVPForm.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAO,MAAM,CAAC;IACrB,OAAO,CAAC,EAAM,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAYD,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,WAAwB,EAAE,EAAE,aAAa,+BAuDrF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface SellHapiContextValue {
|
|
3
|
+
/** The vendor's workspace / workspace ID — used as the path segment in API calls */
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
/** Base URL of the SellHapi API, without trailing slash */
|
|
6
|
+
apiBase: string;
|
|
7
|
+
/** The vendor's store slug — available for link generation */
|
|
8
|
+
vendorSlug: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SellHapiProviderProps {
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
apiBase?: string;
|
|
13
|
+
vendorSlug: string;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Wrap your generated storefront in SellHapiProvider to give all hooks and
|
|
18
|
+
* components access to the vendor's workspaceId and API base URL.
|
|
19
|
+
*
|
|
20
|
+
* sell_store injects this automatically — AI-generated code does not need to
|
|
21
|
+
* render it manually.
|
|
22
|
+
*/
|
|
23
|
+
export declare function SellHapiProvider({ workspaceId, apiBase, vendorSlug, children, }: SellHapiProviderProps): import("react").JSX.Element;
|
|
24
|
+
/** Returns the SellHapi context. Throws if used outside SellHapiProvider. */
|
|
25
|
+
export declare function useSellHapi(): SellHapiContextValue;
|
|
26
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,OAAO,EAAM,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,EAAG,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAK,MAAM,CAAC;IACpB,UAAU,EAAG,MAAM,CAAC;IACpB,QAAQ,EAAK,SAAS,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,OAAoC,EACpC,UAAU,EACV,QAAQ,GACT,EAAE,qBAAqB,+BAMvB;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,IAAI,oBAAoB,CASlD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StorefrontArticle } from "../types/index.js";
|
|
2
|
+
import type { FetchState } from "./useFetch.js";
|
|
3
|
+
export interface UseArticlesOptions {
|
|
4
|
+
limit?: number;
|
|
5
|
+
category?: string;
|
|
6
|
+
tag?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Fetches published articles for the linked vendor */
|
|
9
|
+
export declare function useArticles(options?: UseArticlesOptions): FetchState<StorefrontArticle[]>;
|
|
10
|
+
/** Fetches a single published article by slug */
|
|
11
|
+
export declare function useArticle(slug: string): FetchState<StorefrontArticle | null>;
|
|
12
|
+
//# sourceMappingURL=useArticles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArticles.d.ts","sourceRoot":"","sources":["../../src/hooks/useArticles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAK,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAO,MAAM,CAAC;CACnB;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAY7F;AAED,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAI7E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AvailabilitySlot, BookAppointmentInput, CommerceActionResult } from "../types/index.js";
|
|
2
|
+
export interface UseAvailabilityOptions {
|
|
3
|
+
serviceId: string;
|
|
4
|
+
staffMemberId?: string;
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function useAvailability(options: UseAvailabilityOptions): import("./useFetch.js").FetchState<AvailabilitySlot[]>;
|
|
9
|
+
/** Simplified input accepted by the `book` alias — matches AI-generated component pattern. */
|
|
10
|
+
export interface BookAppointmentSimpleInput {
|
|
11
|
+
serviceId: string;
|
|
12
|
+
dateTime?: string;
|
|
13
|
+
customerName: string;
|
|
14
|
+
customerEmail: string;
|
|
15
|
+
customerPhone?: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UseBookAppointmentResult {
|
|
19
|
+
initiate: (input: BookAppointmentInput) => Promise<CommerceActionResult>;
|
|
20
|
+
/** Alias for initiate — also accepts the simplified flat format used by AI-generated components. */
|
|
21
|
+
book: (input: BookAppointmentInput | BookAppointmentSimpleInput) => Promise<CommerceActionResult>;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
error: string | null;
|
|
24
|
+
}
|
|
25
|
+
export declare function useBookAppointment(): UseBookAppointmentResult;
|
|
26
|
+
//# sourceMappingURL=useBookAppointment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBookAppointment.d.ts","sourceRoot":"","sources":["../../src/hooks/useBookAppointment.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAItG,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAO,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAY,MAAM,CAAC;IACvB,EAAE,EAAc,MAAM,CAAC;CACxB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,0DAe9D;AAID,8FAA8F;AAC9F,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAO,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAO,MAAM,CAAC;IACvB,YAAY,EAAI,MAAM,CAAC;IACvB,aAAa,EAAG,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAU,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzE,oGAAoG;IACpG,IAAI,EAAM,CAAC,KAAK,EAAE,oBAAoB,GAAG,0BAA0B,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtG,OAAO,EAAG,OAAO,CAAC;IAClB,KAAK,EAAK,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,wBAAgB,kBAAkB,IAAI,wBAAwB,CA2C7D"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useCart — localStorage-backed cart with cross-component sync.
|
|
3
|
+
*
|
|
4
|
+
* Module-level singleton store. Any component that calls useCart() gets the
|
|
5
|
+
* same cart state and re-renders when any other component changes it.
|
|
6
|
+
* No extra Provider needed — works anywhere in the tree.
|
|
7
|
+
*
|
|
8
|
+
* Cart is scoped per vendorId (workspaceId) so multiple vendor sites on the
|
|
9
|
+
* same domain don't bleed into each other.
|
|
10
|
+
*/
|
|
11
|
+
import type { CommerceCustomer, CommerceActionResult } from "../types/index.js";
|
|
12
|
+
export interface CartItem {
|
|
13
|
+
productId: string;
|
|
14
|
+
variantId?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
priceKobo: number;
|
|
17
|
+
/** Pre-discount price in kobo — set when the item has an automatic product discount */
|
|
18
|
+
originalPriceKobo?: number;
|
|
19
|
+
quantity: number;
|
|
20
|
+
imageUrl?: string | null;
|
|
21
|
+
type: "physical" | "digital";
|
|
22
|
+
/** Maximum purchasable quantity (enforced in addItem + updateQty) */
|
|
23
|
+
maxStock?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface CartState {
|
|
26
|
+
items: CartItem[];
|
|
27
|
+
}
|
|
28
|
+
export interface UseCartResult {
|
|
29
|
+
items: CartItem[];
|
|
30
|
+
count: number;
|
|
31
|
+
totalKobo: number;
|
|
32
|
+
/** Total saved from automatic product discounts (originalPriceKobo - priceKobo) × qty */
|
|
33
|
+
savingsKobo: number;
|
|
34
|
+
isEmpty: boolean;
|
|
35
|
+
addItem: (item: Omit<CartItem, "quantity"> & {
|
|
36
|
+
quantity?: number;
|
|
37
|
+
}) => void;
|
|
38
|
+
removeItem: (productId: string, variantId?: string) => void;
|
|
39
|
+
updateQty: (productId: string, quantity: number, variantId?: string) => void;
|
|
40
|
+
clear: () => void;
|
|
41
|
+
/** AI-generated code commonly calls openCart() to show a cart drawer.
|
|
42
|
+
* Dispatches a "sellhapi:open-cart" CustomEvent so any overlay component
|
|
43
|
+
* can listen. Safe no-op if nothing listens. */
|
|
44
|
+
openCart: () => void;
|
|
45
|
+
}
|
|
46
|
+
export declare function useCart(): UseCartResult;
|
|
47
|
+
export interface CartCheckoutOptions {
|
|
48
|
+
deliveryMethod?: "delivery" | "pickup";
|
|
49
|
+
destinationState?: string;
|
|
50
|
+
shippingRateId?: string;
|
|
51
|
+
shippingFeeName?: string;
|
|
52
|
+
shippingFeeKobo?: number;
|
|
53
|
+
customerNote?: string;
|
|
54
|
+
discountId?: string;
|
|
55
|
+
discountAmountKobo?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface UseCartCheckoutResult {
|
|
58
|
+
initiate: (customer: CommerceCustomer, options?: CartCheckoutOptions) => Promise<CommerceActionResult>;
|
|
59
|
+
loading: boolean;
|
|
60
|
+
error: string | null;
|
|
61
|
+
}
|
|
62
|
+
export declare function useCartCheckout(): UseCartCheckoutResult;
|
|
63
|
+
//# sourceMappingURL=useCart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCart.d.ts","sourceRoot":"","sources":["../../src/hooks/useCart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAIhF,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAW,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAU,MAAM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AK,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAK,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAQ,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAU,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACvG,OAAO,EAAG,OAAO,CAAC;IAClB,KAAK,EAAK,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,wBAAgB,eAAe,IAAI,qBAAqB,CAmDvD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface PickupConfig {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
address: string;
|
|
4
|
+
dayFrom: string;
|
|
5
|
+
dayTo: string;
|
|
6
|
+
hourFrom: string;
|
|
7
|
+
hourTo: string;
|
|
8
|
+
instructions?: string;
|
|
9
|
+
readyTime?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CheckoutConfig {
|
|
12
|
+
orderNotes: boolean;
|
|
13
|
+
pickup: boolean;
|
|
14
|
+
discounts: boolean;
|
|
15
|
+
pickupConfig: PickupConfig | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function useCheckoutConfig(): {
|
|
18
|
+
config: CheckoutConfig;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useCheckoutConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckoutConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckoutConfig.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAO,OAAO,CAAC;IACtB,OAAO,EAAO,MAAM,CAAC;IACrB,OAAO,EAAO,MAAM,CAAC;IACrB,KAAK,EAAS,MAAM,CAAC;IACrB,QAAQ,EAAM,MAAM,CAAC;IACrB,MAAM,EAAQ,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAI,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAI,OAAO,CAAC;IACtB,MAAM,EAAQ,OAAO,CAAC;IACtB,SAAS,EAAK,OAAO,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;CACnC;AASD,wBAAgB,iBAAiB,IAAI;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAchF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContentItem } from "./useContentItems.js";
|
|
2
|
+
export interface CollectionResult {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
slug: string | null;
|
|
6
|
+
description: string | null;
|
|
7
|
+
items: ContentItem[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
error: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function useCollection(slug: string): CollectionResult;
|
|
12
|
+
//# sourceMappingURL=useCollection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCollection.d.ts","sourceRoot":"","sources":["../../src/hooks/useCollection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAS,sBAAsB,CAAC;AAI3D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAW,MAAM,CAAC;IACpB,KAAK,EAAQ,MAAM,CAAC;IACpB,IAAI,EAAS,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAQ,WAAW,EAAE,CAAC;IAC3B,OAAO,EAAM,OAAO,CAAC;IACrB,KAAK,EAAQ,MAAM,GAAG,IAAI,CAAC;CAC5B;AAUD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CA0C5D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ContentFormField {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type: "text" | "email" | "phone" | "textarea" | "select" | "checkbox" | "date" | "number";
|
|
5
|
+
required: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
options?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface ContentFormSchema {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
fields: ContentFormField[];
|
|
14
|
+
submitButtonText: string;
|
|
15
|
+
successMessage: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UseContentFormResult {
|
|
18
|
+
form: ContentFormSchema | null;
|
|
19
|
+
data: ContentFormSchema | null;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
error: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface UseSubmitFormResult {
|
|
24
|
+
submit: (data: Record<string, unknown>) => Promise<void>;
|
|
25
|
+
submitting: boolean;
|
|
26
|
+
submitted: boolean;
|
|
27
|
+
error: string | null;
|
|
28
|
+
}
|
|
29
|
+
export declare function useContentForm(formId: string): UseContentFormResult;
|
|
30
|
+
export declare function useSubmitForm(formId: string): UseSubmitFormResult;
|
|
31
|
+
//# sourceMappingURL=useContentForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useContentForm.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAW,MAAM,CAAC;IACpB,KAAK,EAAQ,MAAM,CAAC;IACpB,IAAI,EAAS,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjG,QAAQ,EAAK,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAK,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAgB,MAAM,CAAC;IACzB,KAAK,EAAa,MAAM,CAAC;IACzB,WAAW,EAAO,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAY,gBAAgB,EAAE,CAAC;IACrC,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAI,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAK,iBAAiB,GAAG,IAAI,CAAC;IAClC,IAAI,EAAK,iBAAiB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAI,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAG,OAAO,CAAC;IACpB,KAAK,EAAO,MAAM,GAAG,IAAI,CAAC;CAC3B;AAKD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAiCnE;AAKD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAgCjE"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { FetchState } from "./useFetch.js";
|
|
2
|
+
export type ContentItemType = "image" | "video" | "video_url" | "audio" | "document" | "faq" | "testimonial" | "team_member" | "portfolio" | "press" | "social_link" | "brand_stat";
|
|
3
|
+
export interface ContentImage {
|
|
4
|
+
url: string;
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
sizeBytes?: number;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
altText?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ContentVideo {
|
|
12
|
+
url: string;
|
|
13
|
+
mimeType?: string;
|
|
14
|
+
durationSeconds?: number;
|
|
15
|
+
thumbnailUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ContentVideoUrl {
|
|
18
|
+
url: string;
|
|
19
|
+
platform: string;
|
|
20
|
+
embedUrl?: string;
|
|
21
|
+
thumbnailUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ContentAudio {
|
|
24
|
+
url: string;
|
|
25
|
+
mimeType?: string;
|
|
26
|
+
durationSeconds?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ContentDocument {
|
|
29
|
+
url: string;
|
|
30
|
+
mimeType?: string;
|
|
31
|
+
sizeBytes?: number;
|
|
32
|
+
pageCount?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ContentFaq {
|
|
35
|
+
question: string;
|
|
36
|
+
answer: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ContentTestimonial {
|
|
39
|
+
authorName: string;
|
|
40
|
+
authorTitle?: string;
|
|
41
|
+
authorPhotoUrl?: string;
|
|
42
|
+
body: string;
|
|
43
|
+
rating?: number;
|
|
44
|
+
source: "vendor" | "customer";
|
|
45
|
+
}
|
|
46
|
+
export interface ContentTeamMember {
|
|
47
|
+
name: string;
|
|
48
|
+
role: string;
|
|
49
|
+
bio?: string;
|
|
50
|
+
photoUrl?: string;
|
|
51
|
+
email?: string;
|
|
52
|
+
linkedin?: string;
|
|
53
|
+
twitter?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ContentPortfolio {
|
|
56
|
+
description?: string;
|
|
57
|
+
coverImageUrl?: string;
|
|
58
|
+
images?: string[];
|
|
59
|
+
tags?: string[];
|
|
60
|
+
link?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ContentPress {
|
|
63
|
+
publication: string;
|
|
64
|
+
headline: string;
|
|
65
|
+
quote?: string;
|
|
66
|
+
logoUrl?: string;
|
|
67
|
+
link?: string;
|
|
68
|
+
date?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ContentSocialLink {
|
|
71
|
+
platform: string;
|
|
72
|
+
url: string;
|
|
73
|
+
handle?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface ContentBrandStat {
|
|
76
|
+
label: string;
|
|
77
|
+
value: string;
|
|
78
|
+
icon?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ContentItem<T = unknown> {
|
|
81
|
+
id: string;
|
|
82
|
+
type: ContentItemType;
|
|
83
|
+
title: string;
|
|
84
|
+
slug: string | null;
|
|
85
|
+
tags: string[];
|
|
86
|
+
data: T;
|
|
87
|
+
order: number;
|
|
88
|
+
publishedAt: string | null;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
}
|
|
91
|
+
export interface UseContentItemsOptions {
|
|
92
|
+
/** One or more content types to fetch. Passed as comma-separated `types` param. */
|
|
93
|
+
types: ContentItemType[];
|
|
94
|
+
limit?: number;
|
|
95
|
+
/** Filter by tags — all provided tags must be present (AND match). */
|
|
96
|
+
tags?: string[];
|
|
97
|
+
/** Full-text search on title. */
|
|
98
|
+
q?: string;
|
|
99
|
+
/** Fetch only these specific item IDs (pinned/curated selection). */
|
|
100
|
+
ids?: string[];
|
|
101
|
+
}
|
|
102
|
+
export declare function useContentItems<T = unknown>(options: UseContentItemsOptions): FetchState<ContentItem<T>[]>;
|
|
103
|
+
export interface UseContentOptions {
|
|
104
|
+
limit?: number;
|
|
105
|
+
tags?: string[];
|
|
106
|
+
q?: string;
|
|
107
|
+
/** Fetch only these specific item IDs (pinned/curated selection). */
|
|
108
|
+
ids?: string[];
|
|
109
|
+
}
|
|
110
|
+
export declare const useContentImages: (opts?: UseContentOptions) => FetchState<ContentItem<ContentImage>[]>;
|
|
111
|
+
export declare const useContentVideos: (opts?: UseContentOptions) => FetchState<ContentItem<ContentVideo>[]>;
|
|
112
|
+
export declare const useContentVideoUrls: (opts?: UseContentOptions) => FetchState<ContentItem<ContentVideoUrl>[]>;
|
|
113
|
+
export declare const useContentAudio: (opts?: UseContentOptions) => FetchState<ContentItem<ContentAudio>[]>;
|
|
114
|
+
export declare const useContentDocuments: (opts?: UseContentOptions) => FetchState<ContentItem<ContentDocument>[]>;
|
|
115
|
+
export declare const useContentFaqs: (opts?: UseContentOptions) => FetchState<ContentItem<ContentFaq>[]>;
|
|
116
|
+
export declare const useContentTestimonials: (opts?: UseContentOptions) => FetchState<ContentItem<ContentTestimonial>[]>;
|
|
117
|
+
export declare const useContentTeamMembers: (opts?: UseContentOptions) => FetchState<ContentItem<ContentTeamMember>[]>;
|
|
118
|
+
export declare const useContentPortfolio: (opts?: UseContentOptions) => FetchState<ContentItem<ContentPortfolio>[]>;
|
|
119
|
+
export declare const useContentPress: (opts?: UseContentOptions) => FetchState<ContentItem<ContentPress>[]>;
|
|
120
|
+
export declare const useContentSocialLinks: (opts?: UseContentOptions) => FetchState<ContentItem<ContentSocialLink>[]>;
|
|
121
|
+
export declare const useContentBrandStats: (opts?: UseContentOptions) => FetchState<ContentItem<ContentBrandStat>[]>;
|
|
122
|
+
//# sourceMappingURL=useContentItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentItems.d.ts","sourceRoot":"","sources":["../../src/hooks/useContentItems.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,MAAM,eAAe,GACvB,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GACtD,KAAK,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,GACnD,OAAO,GAAG,aAAa,GAAG,YAAY,CAAC;AAI3C,MAAM,WAAW,YAAY;IAAQ,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE;AAC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
1
|
+
import type { RSVPInput } from "../types/index.js";
|
|
2
|
+
export interface UseCreateRSVPResult {
|
|
3
|
+
submit: (input: RSVPInput) => Promise<void>;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
success: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Submits a free RSVP for an event */
|
|
9
|
+
export declare function useCreateRSVP(): UseCreateRSVPResult;
|
|
10
|
+
//# sourceMappingURL=useCreateRSVP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateRSVP.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreateRSVP.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAG,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAI,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,uCAAuC;AACvC,wBAAgB,aAAa,IAAI,mBAAmB,CAiCnD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StoreProduct } from "../types/index.js";
|
|
2
|
+
import type { FetchState } from "./useFetch.js";
|
|
3
|
+
export interface UseDigitalProductsOptions {
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Fetches active digital (downloadable) products for the linked vendor */
|
|
7
|
+
export declare function useDigitalProducts(options?: UseDigitalProductsOptions): FetchState<StoreProduct[]>;
|
|
8
|
+
//# sourceMappingURL=useDigitalProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDigitalProducts.d.ts","sourceRoot":"","sources":["../../src/hooks/useDigitalProducts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B,GAAG,UAAU,CAAC,YAAY,EAAE,CAAC,CAStG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DonateInput, CommerceActionResult } from "../types/index.js";
|
|
2
|
+
export interface UseDonateResult {
|
|
3
|
+
initiate: (input: DonateInput) => Promise<CommerceActionResult>;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function useDonate(): UseDonateResult;
|
|
8
|
+
//# sourceMappingURL=useDonate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDonate.d.ts","sourceRoot":"","sources":["../../src/hooks/useDonate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChE,OAAO,EAAG,OAAO,CAAC;IAClB,KAAK,EAAK,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,wBAAgB,SAAS,IAAI,eAAe,CA2B3C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StorefrontDonationCampaign } from "../types/index.js";
|
|
2
|
+
import type { FetchState } from "./useFetch.js";
|
|
3
|
+
export interface UseDonationCampaignsOptions {
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Fetches active donation campaigns for the linked vendor */
|
|
7
|
+
export declare function useDonationCampaigns(options?: UseDonationCampaignsOptions): FetchState<StorefrontDonationCampaign[]>;
|
|
8
|
+
/** Fetches a single donation campaign by ID */
|
|
9
|
+
export declare function useDonationCampaign(campaignId: string): FetchState<StorefrontDonationCampaign | null>;
|
|
10
|
+
//# sourceMappingURL=useDonationCampaigns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDonationCampaigns.d.ts","sourceRoot":"","sources":["../../src/hooks/useDonationCampaigns.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC,GAAG,UAAU,CAAC,0BAA0B,EAAE,CAAC,CASxH;AAED,+CAA+C;AAC/C,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAKrG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StorefrontEvent } from "../types/index.js";
|
|
2
|
+
import type { FetchState } from "./useFetch.js";
|
|
3
|
+
export interface UseEventsOptions {
|
|
4
|
+
limit?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Fetches upcoming published events for the linked vendor */
|
|
7
|
+
export declare function useEvents(options?: UseEventsOptions): FetchState<StorefrontEvent[]>;
|
|
8
|
+
/** Fetches a single event by ID including ticket types */
|
|
9
|
+
export declare function useEvent(eventId: string): FetchState<StorefrontEvent | null>;
|
|
10
|
+
//# sourceMappingURL=useEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useEvents.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,UAAU,CAAC,eAAe,EAAE,CAAC,CASvF;AAED,0DAA0D;AAC1D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,eAAe,GAAG,IAAI,CAAC,CAK5E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FetchState<T> {
|
|
2
|
+
data: T;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: string | null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Shared fetch utility used by all list hooks.
|
|
8
|
+
* Fetches `url` on mount and whenever `url` changes.
|
|
9
|
+
* Returns `defaultValue` while loading or on error.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useFetch<T>(url: string, defaultValue: T): FetchState<T>;
|
|
12
|
+
/** Build a query URL against the storefront content/query endpoint */
|
|
13
|
+
export declare function buildQueryUrl(apiBase: string, workspaceId: string, capabilityId: string, queryId: string, filters?: Record<string, string | number | undefined>): string;
|
|
14
|
+
//# sourceMappingURL=useFetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetch.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetch.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAK,CAAC,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAI,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAmCvE;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAC3B,OAAO,EAAO,MAAM,EACpB,WAAW,EAAG,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAO,MAAM,EACpB,OAAO,GAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAM,GAC7D,MAAM,CAMR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StorefrontMembershipTier } from "../types/index.js";
|
|
2
|
+
import type { FetchState } from "./useFetch.js";
|
|
3
|
+
/** Fetches active membership tiers for the linked vendor */
|
|
4
|
+
export declare function useMemberships(): FetchState<StorefrontMembershipTier[]>;
|
|
5
|
+
//# sourceMappingURL=useMemberships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMemberships.d.ts","sourceRoot":"","sources":["../../src/hooks/useMemberships.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,4DAA4D;AAC5D,wBAAgB,cAAc,IAAI,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAOvE"}
|