@wix/agent-skills 1.25.0 → 1.27.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/README.md +1 -0
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +18 -17
- package/skills/wix-app/references/BUSINESS_MANAGER_THEME.md +1 -2
- package/skills/wix-app/references/BUSINESS_MANAGER_TOKENS.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +12 -12
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +3 -2
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +75 -66
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +4 -5
- package/skills/wix-app/references/data-collection/LIFECYCLE.md +6 -4
- package/skills/wix-headless-kit/SKILL.md +31 -14
- package/skills/wix-headless-kit/guides/existing-site.md +12 -5
- package/skills/wix-headless-kit/install/attach.mjs +55 -10
- package/skills/wix-headless-kit/install/check.mjs +5 -5
- package/skills/wix-headless-kit/install/deploy.mjs +7 -3
- package/skills/wix-headless-kit/install/templates.mjs +21 -17
- package/skills/wix-headless-templates/SKILL.md +43 -0
- package/skills/wix-headless-templates/blank/project/README.md +15 -0
- package/skills/wix-headless-templates/blank/project/astro.config.mjs +20 -0
- package/skills/wix-headless-templates/blank/project/package.json +34 -0
- package/skills/wix-headless-templates/blank/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blank/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blank/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blank/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blank/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blank/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blank/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blank/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/INSTRUCTIONS.md +418 -0
- package/skills/wix-headless-templates/blog/app/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/app/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/app/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/app/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/app/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/app-astro/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/app-astro/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/README.md +15 -0
- package/skills/wix-headless-templates/blog/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/blog/project/package-lock.json +14699 -0
- package/skills/wix-headless-templates/blog/project/package.json +39 -0
- package/skills/wix-headless-templates/blog/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/blog/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/blog/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/blog/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/blog/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/BlogFeedView.tsx +191 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/CommentsView.tsx +206 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostLikeButton.tsx +62 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/PostView.tsx +139 -0
- package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useBlogFeed.ts +31 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/useComments.ts +26 -0
- package/skills/wix-headless-templates/blog/project/src/hooks/blog/usePost.ts +25 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/blog/project/src/layouts/SiteLayout.astro +44 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/[...slug].astro +148 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/category/[slug].astro +97 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog/tag/[slug].astro +51 -0
- package/skills/wix-headless-templates/blog/project/src/pages/blog.astro +34 -0
- package/skills/wix-headless-templates/blog/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/blog/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors-core.ts +51 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/authors.ts +50 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/blog-feed-store.ts +156 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-core.ts +189 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments-store.ts +214 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/comments.ts +84 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-likes.ts +42 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/post-store.ts +158 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts-core.ts +347 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/posts.ts +132 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy-core.ts +80 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/taxonomy.ts +78 -0
- package/skills/wix-headless-templates/blog/project/src/wix/blog/types.ts +161 -0
- package/skills/wix-headless-templates/blog/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/blog/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/blog/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/blog/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/blog/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/blog/rest/authors.ts +39 -0
- package/skills/wix-headless-templates/blog/rest/comments.ts +64 -0
- package/skills/wix-headless-templates/blog/rest/post-likes.ts +37 -0
- package/skills/wix-headless-templates/blog/rest/posts.ts +123 -0
- package/skills/wix-headless-templates/blog/rest/taxonomy.ts +79 -0
- package/skills/wix-headless-templates/blog/seed/SEED.md +81 -0
- package/skills/wix-headless-templates/blog/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +337 -0
- package/skills/wix-headless-templates/bookings/INSTRUCTIONS.md +356 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/app/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/app/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/app/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/app-astro/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/README.md +15 -0
- package/skills/wix-headless-templates/bookings/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/bookings/project/package-lock.json +10546 -0
- package/skills/wix-headless-templates/bookings/project/package.json +41 -0
- package/skills/wix-headless-templates/bookings/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/bookings/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/bookings/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServiceBookingView.tsx +369 -0
- package/skills/wix-headless-templates/bookings/project/src/components/bookings/ServicesView.tsx +193 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useBookingFlow.ts +56 -0
- package/skills/wix-headless-templates/bookings/project/src/hooks/bookings/useServices.ts +23 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/bookings/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services/[slug].astro +81 -0
- package/skills/wix-headless-templates/bookings/project/src/pages/services.astro +40 -0
- package/skills/wix-headless-templates/bookings/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-core.ts +614 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking-flow-store.ts +410 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-core.ts +366 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services-store.ts +213 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/services.ts +100 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/bookings/types.ts +236 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/bookings/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/bookings/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/bookings/rest/booking.ts +227 -0
- package/skills/wix-headless-templates/bookings/rest/services.ts +94 -0
- package/skills/wix-headless-templates/bookings/seed/SEED.md +109 -0
- package/skills/wix-headless-templates/bookings/seed/read-site.mjs +28 -0
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +407 -0
- package/skills/wix-headless-templates/cms/INSTRUCTIONS.md +399 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/app/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/app/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/README.md +15 -0
- package/skills/wix-headless-templates/cms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/cms/project/package-lock.json +9798 -0
- package/skills/wix-headless-templates/cms/project/package.json +37 -0
- package/skills/wix-headless-templates/cms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/cms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/cms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/cms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/cms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useCollection.ts +82 -0
- package/skills/wix-headless-templates/cms/project/src/hooks/cms/useItem.ts +37 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/cms/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/cms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/cms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collection-store.ts +220 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections-core.ts +41 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/collections.ts +28 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/item-store.ts +93 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items-core.ts +259 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/items.ts +182 -0
- package/skills/wix-headless-templates/cms/project/src/wix/cms/types.ts +138 -0
- package/skills/wix-headless-templates/cms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/cms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/cms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/cms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/cms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/cms/rest/collections.ts +25 -0
- package/skills/wix-headless-templates/cms/rest/items.ts +189 -0
- package/skills/wix-headless-templates/cms/seed/SEED.md +116 -0
- package/skills/wix-headless-templates/cms/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +321 -0
- package/skills/wix-headless-templates/compose.mjs +83 -0
- package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +349 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/app/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/app/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/app-astro/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/app-astro/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/app-astro/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/README.md +15 -0
- package/skills/wix-headless-templates/donations/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/donations/project/package-lock.json +10266 -0
- package/skills/wix-headless-templates/donations/project/package.json +39 -0
- package/skills/wix-headless-templates/donations/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/donations/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/donations/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/donations/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/donations/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/CampaignPage.astro +43 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +155 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +46 -0
- package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +49 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useCampaigns.ts +21 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonation.ts +27 -0
- package/skills/wix-headless-templates/donations/project/src/hooks/donations/useDonationReceipt.ts +19 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/donations/project/src/layouts/SiteLayout.astro +45 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/[id].astro +28 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/index.astro +51 -0
- package/skills/wix-headless-templates/donations/project/src/pages/donate/thank-you.astro +13 -0
- package/skills/wix-headless-templates/donations/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/donations/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/donations/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns-store.ts +59 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +83 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +95 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +163 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +466 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/receipt-store.ts +55 -0
- package/skills/wix-headless-templates/donations/project/src/wix/donations/types.ts +121 -0
- package/skills/wix-headless-templates/donations/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/donations/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/donations/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/donations/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +76 -0
- package/skills/wix-headless-templates/donations/rest/donate.ts +90 -0
- package/skills/wix-headless-templates/donations/seed/SEED.md +90 -0
- package/skills/wix-headless-templates/donations/seed/read-site.mjs +33 -0
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +250 -0
- package/skills/wix-headless-templates/events/INSTRUCTIONS.md +387 -0
- package/skills/wix-headless-templates/events/app/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/app/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/app/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/app/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/app/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/app/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/app/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/app/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/app/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/app/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/app-astro/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/README.md +15 -0
- package/skills/wix-headless-templates/events/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/events/project/package-lock.json +10497 -0
- package/skills/wix-headless-templates/events/project/package.json +39 -0
- package/skills/wix-headless-templates/events/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/events/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/events/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/events/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/events/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventConfirmationView.tsx +139 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventRegistrationView.tsx +375 -0
- package/skills/wix-headless-templates/events/project/src/components/events/EventsView.tsx +134 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventConfirmation.ts +21 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEventRegistration.ts +40 -0
- package/skills/wix-headless-templates/events/project/src/hooks/events/useEvents.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/events/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/events/project/src/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-templates/events/project/src/pages/events/[slug].astro +104 -0
- package/skills/wix-headless-templates/events/project/src/pages/events.astro +23 -0
- package/skills/wix-headless-templates/events/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/events/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/events/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-core.ts +379 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events-store.ts +175 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/events.ts +124 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/order-store.ts +143 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders-core.ts +86 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/orders.ts +30 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-core.ts +415 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration-store.ts +237 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/registration.ts +109 -0
- package/skills/wix-headless-templates/events/project/src/wix/events/types.ts +249 -0
- package/skills/wix-headless-templates/events/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/events/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/events/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/events/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/events/rest/events.ts +112 -0
- package/skills/wix-headless-templates/events/rest/orders.ts +28 -0
- package/skills/wix-headless-templates/events/rest/registration.ts +96 -0
- package/skills/wix-headless-templates/events/seed/SEED.md +115 -0
- package/skills/wix-headless-templates/events/seed/read-site.mjs +26 -0
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +322 -0
- package/skills/wix-headless-templates/faq/INSTRUCTIONS.md +317 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/app/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/app/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/app/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/app-astro/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/README.md +15 -0
- package/skills/wix-headless-templates/faq/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/faq/project/package-lock.json +8837 -0
- package/skills/wix-headless-templates/faq/project/package.json +37 -0
- package/skills/wix-headless-templates/faq/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/faq/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/faq/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/faq/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/faq/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqAccordion.tsx +159 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqCategoryNav.tsx +46 -0
- package/skills/wix-headless-templates/faq/project/src/components/faq/FaqSearch.tsx +56 -0
- package/skills/wix-headless-templates/faq/project/src/hooks/faq/useFaq.ts +53 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/faq/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/faq/project/src/pages/faq.astro +39 -0
- package/skills/wix-headless-templates/faq/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/faq/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/faq/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-core.ts +428 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq-store.ts +212 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/faq.ts +72 -0
- package/skills/wix-headless-templates/faq/project/src/wix/faq/types.ts +63 -0
- package/skills/wix-headless-templates/faq/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/faq/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/faq/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/faq/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/faq/rest/faq.ts +71 -0
- package/skills/wix-headless-templates/faq/seed/SEED.md +104 -0
- package/skills/wix-headless-templates/faq/seed/read-site.mjs +23 -0
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +302 -0
- package/skills/wix-headless-templates/forms/INSTRUCTIONS.md +417 -0
- package/skills/wix-headless-templates/forms/app/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/app/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/README.md +15 -0
- package/skills/wix-headless-templates/forms/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/forms/project/package-lock.json +9102 -0
- package/skills/wix-headless-templates/forms/project/package.json +37 -0
- package/skills/wix-headless-templates/forms/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/forms/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/forms/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/forms/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/forms/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/forms/project/src/hooks/forms/useWixForm.ts +108 -0
- package/skills/wix-headless-templates/forms/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/forms/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/forms/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/address-templates.generated.ts +13 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/form-store.ts +533 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms-core.ts +671 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/forms.ts +57 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions-core.ts +423 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/submissions.ts +95 -0
- package/skills/wix-headless-templates/forms/project/src/wix/forms/types.ts +284 -0
- package/skills/wix-headless-templates/forms/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/forms/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/forms/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/forms/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/forms/rest/forms.ts +37 -0
- package/skills/wix-headless-templates/forms/rest/submissions.ts +83 -0
- package/skills/wix-headless-templates/forms/seed/SEED.md +225 -0
- package/skills/wix-headless-templates/forms/seed/read-site.mjs +53 -0
- package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +574 -0
- package/skills/wix-headless-templates/forms/tooling/address-templates.mjs +96 -0
- package/skills/wix-headless-templates/members/INSTRUCTIONS.md +345 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/app/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/app/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/app/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/app/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/app/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/app/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/app/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/app-astro/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/README.md +15 -0
- package/skills/wix-headless-templates/members/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/members/project/package-lock.json +8892 -0
- package/skills/wix-headless-templates/members/project/package.json +37 -0
- package/skills/wix-headless-templates/members/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/members/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/members/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/members/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/members/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountPage.tsx +16 -0
- package/skills/wix-headless-templates/members/project/src/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-templates/members/project/src/components/members/LoginForm.tsx +165 -0
- package/skills/wix-headless-templates/members/project/src/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-templates/members/project/src/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-templates/members/project/src/hooks/members/useMember.ts +67 -0
- package/skills/wix-headless-templates/members/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/members/project/src/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-templates/members/project/src/pages/account.astro +9 -0
- package/skills/wix-headless-templates/members/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/members/project/src/pages/login.astro +11 -0
- package/skills/wix-headless-templates/members/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/members/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/members/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth-core.ts +160 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/auth.ts +117 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/client.ts +27 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/member-store.ts +133 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members-core.ts +43 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/members.ts +29 -0
- package/skills/wix-headless-templates/members/project/src/wix/members/types.ts +21 -0
- package/skills/wix-headless-templates/members/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/members/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/members/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/members/rest/auth.ts +224 -0
- package/skills/wix-headless-templates/members/rest/members.ts +26 -0
- package/skills/wix-headless-templates/members/seed/SEED.md +39 -0
- package/skills/wix-headless-templates/members/seed/read-site.mjs +15 -0
- package/skills/wix-headless-templates/members/seed/seed-members.mjs +91 -0
- package/skills/wix-headless-templates/portfolio/INSTRUCTIONS.md +315 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/app/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/app/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/README.md +15 -0
- package/skills/wix-headless-templates/portfolio/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/portfolio/project/package-lock.json +8760 -0
- package/skills/wix-headless-templates/portfolio/project/package.json +37 -0
- package/skills/wix-headless-templates/portfolio/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/portfolio/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/GalleryMedia.tsx +35 -0
- package/skills/wix-headless-templates/portfolio/project/src/components/portfolio/ProjectDetailView.tsx +85 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollectionProjects.ts +32 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useCollections.ts +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/hooks/portfolio/useProjectDetail.ts +31 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/portfolio/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro +21 -0
- package/skills/wix-headless-templates/portfolio/project/src/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-templates/portfolio/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collection-projects-store.ts +82 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/collections-store.ts +58 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio-core.ts +177 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/portfolio.ts +78 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/project-detail-store.ts +81 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-templates/portfolio/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/portfolio/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +75 -0
- package/skills/wix-headless-templates/portfolio/seed/SEED.md +86 -0
- package/skills/wix-headless-templates/portfolio/seed/read-site.mjs +20 -0
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +253 -0
- package/skills/wix-headless-templates/pricing-plans/INSTRUCTIONS.md +376 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/app/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/app/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/README.md +15 -0
- package/skills/wix-headless-templates/pricing-plans/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/package-lock.json +9799 -0
- package/skills/wix-headless-templates/pricing-plans/project/package.json +38 -0
- package/skills/wix-headless-templates/pricing-plans/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlanDetailView.tsx +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/PlansView.tsx +108 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/RequirePlan.tsx +87 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/components/pricing-plans/SubscribeButton.tsx +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanAccess.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlanPurchase.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/hooks/pricing-plans/usePlans.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans/[slug].astro +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/pages/plans.astro +21 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-core.ts +29 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access-store.ts +92 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-access.ts +37 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plan-purchase-store.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-core.ts +212 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans-store.ts +64 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/plans.ts +54 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase-core.ts +43 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/purchase.ts +22 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/pricing-plans/types.ts +52 -0
- package/skills/wix-headless-templates/pricing-plans/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/pricing-plans/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +31 -0
- package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +58 -0
- package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +20 -0
- package/skills/wix-headless-templates/pricing-plans/seed/SEED.md +93 -0
- package/skills/wix-headless-templates/pricing-plans/seed/read-site.mjs +22 -0
- package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +301 -0
- package/skills/wix-headless-templates/rentals/INSTRUCTIONS.md +309 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/app/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/app/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/app/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/app-astro/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/README.md +15 -0
- package/skills/wix-headless-templates/rentals/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/rentals/project/package-lock.json +10545 -0
- package/skills/wix-headless-templates/rentals/project/package.json +40 -0
- package/skills/wix-headless-templates/rentals/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/rentals/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/rentals/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalBookingView.tsx +195 -0
- package/skills/wix-headless-templates/rentals/project/src/components/rentals/RentalsView.tsx +89 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentalFlow.ts +31 -0
- package/skills/wix-headless-templates/rentals/project/src/hooks/rentals/useRentals.ts +23 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/rentals/project/src/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals/[slug].astro +81 -0
- package/skills/wix-headless-templates/rentals/project/src/pages/rentals.astro +24 -0
- package/skills/wix-headless-templates/rentals/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rental-flow-store.ts +283 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-core.ts +435 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals-store.ts +112 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/rentals.ts +173 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/rentals/types.ts +113 -0
- package/skills/wix-headless-templates/rentals/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/rentals/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/rentals/rest/rentals.ts +153 -0
- package/skills/wix-headless-templates/rentals/seed/SEED.md +95 -0
- package/skills/wix-headless-templates/rentals/seed/read-site.mjs +34 -0
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +321 -0
- package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +468 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/README.md +15 -0
- package/skills/wix-headless-templates/restaurants/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/restaurants/project/package-lock.json +11038 -0
- package/skills/wix-headless-templates/restaurants/project/package.json +40 -0
- package/skills/wix-headless-templates/restaurants/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/restaurants/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/MenuView.tsx +257 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/ReservationView.tsx +212 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useMenus.ts +34 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +52 -0
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useReservation.ts +49 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/menu.astro +22 -0
- package/skills/wix-headless-templates/restaurants/project/src/pages/reservations.astro +12 -0
- package/skills/wix-headless-templates/restaurants/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-core.ts +333 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu-store.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/menu.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +141 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +287 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +237 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservation-store.ts +279 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations-core.ts +218 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/reservations.ts +109 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/time-core.ts +118 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +337 -0
- package/skills/wix-headless-templates/restaurants/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/restaurants/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +96 -0
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +222 -0
- package/skills/wix-headless-templates/restaurants/rest/reservations.ts +102 -0
- package/skills/wix-headless-templates/restaurants/seed/SEED.md +118 -0
- package/skills/wix-headless-templates/restaurants/seed/read-site.mjs +25 -0
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +577 -0
- package/skills/wix-headless-templates/shared/CONTENT.md +22 -0
- package/skills/wix-headless-templates/shared/CUSTOM_OPERATIONS.md +100 -0
- package/skills/wix-headless-templates/shared/DESIGN.md +37 -0
- package/skills/wix-headless-templates/shared/SUPPLIED-CONTENT.md +27 -0
- package/skills/wix-headless-templates/shared/app/styles/global.css +57 -0
- package/skills/wix-headless-templates/shared/app/wix/config.ts +16 -0
- package/skills/wix-headless-templates/shared/app/wix/media.ts +106 -0
- package/skills/wix-headless-templates/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-templates/shared/app/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-templates/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +69 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/INSTRUCTIONS.md +194 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchBox.tsx +136 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchHit.tsx +50 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/components/site-search/SearchResults.tsx +300 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSearch.ts +31 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/hooks/site-search/useSuggest.ts +26 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-core.ts +520 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search-store.ts +235 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/search.ts +80 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/suggest-store.ts +178 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app/wix/site-search/types.ts +158 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/app-astro/pages/search.astro +33 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +82 -0
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +43 -0
- package/skills/wix-headless-templates/shared/rest/client.ts +155 -0
- package/skills/wix-headless-templates/shared/rest/config.ts +4 -0
- package/skills/wix-headless-templates/shared/rest/media.ts +92 -0
- package/skills/wix-headless-templates/shared/seed/images.mjs +183 -0
- package/skills/wix-headless-templates/shared/seed/read-site.mjs +97 -0
- package/skills/wix-headless-templates/shared/seed/site-context.mjs +70 -0
- package/skills/wix-headless-templates/shared/seed/site.mjs +48 -0
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +44 -0
- package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +685 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/app/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/app/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/app/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/app-astro/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/README.md +15 -0
- package/skills/wix-headless-templates/storefront/project/astro.config.mjs +22 -0
- package/skills/wix-headless-templates/storefront/project/package-lock.json +10786 -0
- package/skills/wix-headless-templates/storefront/project/package.json +41 -0
- package/skills/wix-headless-templates/storefront/project/public/favicon.svg +9 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/astro.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/background.svg +1 -0
- package/skills/wix-headless-templates/storefront/project/src/assets/wix.svg +18 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Hero.astro +77 -0
- package/skills/wix-headless-templates/storefront/project/src/components/Welcome.astro +95 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/CartDrawer.tsx +239 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/FilterPanel.tsx +267 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/OptionPicker.tsx +171 -0
- package/skills/wix-headless-templates/storefront/project/src/components/storefront/QuickAdd.tsx +148 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useCart.ts +59 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useProductDetail.ts +42 -0
- package/skills/wix-headless-templates/storefront/project/src/hooks/storefront/useShop.ts +34 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/Layout.astro +22 -0
- package/skills/wix-headless-templates/storefront/project/src/layouts/SiteLayout.astro +65 -0
- package/skills/wix-headless-templates/storefront/project/src/pages/index.astro +8 -0
- package/skills/wix-headless-templates/storefront/project/src/styles/global.css +57 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/config.ts +16 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/media.ts +106 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/money.ts +24 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/sdk.ts +89 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-core.ts +220 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart-store.ts +134 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/cart.ts +187 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog-core.ts +698 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/catalog.ts +260 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/product-detail-store.ts +280 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/shop-store.ts +341 -0
- package/skills/wix-headless-templates/storefront/project/src/wix/storefront/types.ts +305 -0
- package/skills/wix-headless-templates/storefront/project/tsconfig.json +5 -0
- package/skills/wix-headless-templates/storefront/rest/cart.ts +183 -0
- package/skills/wix-headless-templates/storefront/rest/catalog.ts +267 -0
- package/skills/wix-headless-templates/storefront/seed/SEED.md +169 -0
- package/skills/wix-headless-templates/storefront/seed/read-site.mjs +38 -0
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +839 -0
- package/skills/wix-manage/SKILL.md +11 -7
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +1 -1
- package/skills/wix-manage/references/custom-apps/use-app-skills-and-app-tools.md +206 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +17 -24
- package/skills/wix-manage/references/sites/create-headless-site.md +2 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +262 -171
- package/skills/wix-manage/references/stores/update-product-with-options.md +1 -1
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +0 -184
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +0 -204
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +0 -44
- package/skills/wix-headless/entry/bootstrap.mjs +0 -156
- package/skills/wix-headless/entry/skill.md +0 -78
- package/skills/wix-headless-kit/cold-start/bootstrap.mjs +0 -156
- package/skills/wix-headless-kit/cold-start/cold-start.md +0 -111
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +0 -423
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// Events seed — a BUILD-TIME script, never shipped in the app. Run from the project root
|
|
2
|
+
// (where wix.config.json lives) with a plan file:
|
|
3
|
+
//
|
|
4
|
+
// node <SKILL_ROOT>/templates/events/seed/seed-events.mjs plan.json
|
|
5
|
+
//
|
|
6
|
+
// It mints its own site token via the Wix CLI, installs the Wix Events app if needed,
|
|
7
|
+
// resolves the site currency, then per event: create DRAFT → (TICKETING) add ticket tiers →
|
|
8
|
+
// publish — the order two one-way constraints force (registration.initialType is immutable
|
|
9
|
+
// after create; publishing is one-way). Then it creates + assigns categories and
|
|
10
|
+
// imports+attaches images. Prints a JSON result to stdout.
|
|
11
|
+
//
|
|
12
|
+
// Plan shape (see SEED.md):
|
|
13
|
+
// { "events": [{ "title", "shortDescription"?, "type": "TICKETING"|"RSVP",
|
|
14
|
+
// "startDate", "endDate" (future ISO-8601 UTC), "timeZoneId",
|
|
15
|
+
// "location" ({name,type:"VENUE",address} | {name,type:"ONLINE"} | {locationTbd:true,name}),
|
|
16
|
+
// "ticketTiers"?: [{ "name" (≤30 chars), "price" (decimal STRING), "description"?, "initialLimit"?, "feeType"? }],
|
|
17
|
+
// "category"? (name), "imageUrl"? | "imagePrompt"?, "rsvpResponseType"? }] }
|
|
18
|
+
//
|
|
19
|
+
// Seeding is ADDITIVE — never deletes or overwrites existing content. Unexpected shapes →
|
|
20
|
+
// read the live API reference; every call below
|
|
21
|
+
// carries a docs: line with its reference page.
|
|
22
|
+
import { setSiteCurrency } from "../../shared/seed/site.mjs";
|
|
23
|
+
import { readFileSync } from "node:fs";
|
|
24
|
+
import { resolveItemImages } from "../../shared/seed/images.mjs";
|
|
25
|
+
import { seedSiteId } from "../../shared/seed/site-context.mjs";
|
|
26
|
+
import { wixToken } from "../../shared/seed/wix-cli.mjs";
|
|
27
|
+
|
|
28
|
+
const API = "https://www.wixapis.com";
|
|
29
|
+
const EVENTS_APP_ID = "140603ad-af8d-84a5-2c80-a0f60cb47351";
|
|
30
|
+
|
|
31
|
+
export function makeCtx({ cwd = process.cwd() } = {}) {
|
|
32
|
+
// The content site: the config's site, or the parent on a migration preview (site-context.mjs stops
|
|
33
|
+
// a seed there unless --allow-parent is passed after the user confirmed).
|
|
34
|
+
const siteId = seedSiteId({ cwd, argv: process.argv });
|
|
35
|
+
const token = wixToken(siteId, cwd);
|
|
36
|
+
return { token, siteId };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function req(ctx, path, { method = "POST", body } = {}) {
|
|
40
|
+
const res = await fetch(API + path, {
|
|
41
|
+
method,
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${ctx.token}`,
|
|
44
|
+
"wix-site-id": ctx.siteId,
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
},
|
|
47
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
48
|
+
});
|
|
49
|
+
const json = await res.json().catch(() => ({}));
|
|
50
|
+
if (!res.ok) throw new Error(`${method} ${path} -> ${res.status}: ${JSON.stringify(json).slice(0, 400)}`);
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// {type:"TICKETING"|"RSVP", …} -> the registration block. TICKETING carries a tickets{}
|
|
55
|
+
// config; RSVP carries rsvp{responseType} and seeds NO form fields (name+email is built-in).
|
|
56
|
+
// initialType is IMMUTABLE after create — set from the plan, never plan to convert.
|
|
57
|
+
function buildRegistration(ev) {
|
|
58
|
+
if (ev.type === "TICKETING") {
|
|
59
|
+
return {
|
|
60
|
+
initialType: "TICKETING",
|
|
61
|
+
tickets: {
|
|
62
|
+
ticketLimitPerOrder: ev.ticketLimitPerOrder ?? 8,
|
|
63
|
+
currency: ev.currency ?? "USD", // setupEvents threads the site currency; USD is the last resort
|
|
64
|
+
reservationDurationInMinutes: ev.reservationDurationInMinutes ?? 20,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
initialType: "RSVP",
|
|
70
|
+
rsvp: {
|
|
71
|
+
responseType: ev.rsvpResponseType ?? "YES_ONLY", // "YES_ONLY" | "YES_AND_NO"
|
|
72
|
+
...(Number.isInteger(ev.rsvpLimit) && ev.rsvpLimit > 0 ? { limit: ev.rsvpLimit } : {}),
|
|
73
|
+
...(ev.waitlist === true ? { waitlistEnabled: true } : {}),
|
|
74
|
+
// A future start date schedules the opening: the event publishes with status SCHEDULED_RSVP and
|
|
75
|
+
// the page says when registration opens; before it, an RSVP is refused. The API requires the
|
|
76
|
+
// window's END with its start (run 152: "both start and end dates"); it defaults to the event's
|
|
77
|
+
// start, the moment registration stops making sense.
|
|
78
|
+
...(ev.registrationOpensAt ? { startDate: ev.registrationOpensAt, endDate: ev.registrationClosesAt ?? ev.startDate } : {}),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// {guests: N} on an RSVP event -> the registration form's guest control, added through the Events
|
|
84
|
+
// Forms API AFTER the event exists (Create Event ignores form.controls; probed live 2026-09-28). The
|
|
85
|
+
// control lands as a count input (options "0".."N") plus a names list capped at N — the shape the
|
|
86
|
+
// site's form reader (events-core toRsvpForm) reads its max from — and takes effect at once.
|
|
87
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/forms/add-control.md
|
|
88
|
+
export async function addGuestControl(ctx, eventId, guests) {
|
|
89
|
+
const n = Number(guests);
|
|
90
|
+
if (!Number.isInteger(n) || n < 1) return false;
|
|
91
|
+
await req(ctx, `/events/v1/events/${eventId}/form/control`, { body: {
|
|
92
|
+
additionalGuests: { maxGuests: n, namesMandatory: false, labels: { single: "Bringing a guest?", multiple: "How many guests?" } },
|
|
93
|
+
} });
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ---- operations ----------------------------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
// Idempotent: re-installing an already-installed app returns 200.
|
|
100
|
+
// docs: https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix.md
|
|
101
|
+
export async function installEventsApp(ctx) {
|
|
102
|
+
try {
|
|
103
|
+
await req(ctx, "/apps-installer-service/v1/app-instance/install", { body: {
|
|
104
|
+
tenant: { tenantType: "SITE", id: ctx.siteId },
|
|
105
|
+
appInstance: { appDefId: EVENTS_APP_ID, enabled: true },
|
|
106
|
+
} });
|
|
107
|
+
} catch {
|
|
108
|
+
/* already installed is fine */
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// The ticket-definitions API REQUIRES currency and uses whatever you pass verbatim (it does
|
|
113
|
+
// NOT fall back to the site currency) — resolve it once, or a non-USD site gets mis-priced.
|
|
114
|
+
// docs: https://dev.wix.com/docs/api-reference/business-management/site-properties/properties/get-site-properties.md
|
|
115
|
+
export async function getSiteCurrency(ctx) {
|
|
116
|
+
try {
|
|
117
|
+
const r = await req(ctx, "/site-properties/v4/properties", { method: "GET" });
|
|
118
|
+
return r?.properties?.paymentCurrency || "USD";
|
|
119
|
+
} catch {
|
|
120
|
+
return "USD";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* STEP 1 — create ONE event as a draft (no bulk endpoint; loop for multiple). Dates MUST be
|
|
126
|
+
* in the future — a past event isn't registerable and won't show in the live listing.
|
|
127
|
+
* Returns { id, slug } — id feeds the tier/publish steps; slug is the URL identifier.
|
|
128
|
+
* docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/create-event.md
|
|
129
|
+
*/
|
|
130
|
+
export async function createEvent(ctx, ev) {
|
|
131
|
+
const body = {
|
|
132
|
+
draft: true,
|
|
133
|
+
event: {
|
|
134
|
+
title: ev.title,
|
|
135
|
+
shortDescription: ev.shortDescription,
|
|
136
|
+
location: ev.location,
|
|
137
|
+
dateAndTimeSettings: {
|
|
138
|
+
startDate: ev.startDate,
|
|
139
|
+
endDate: ev.endDate,
|
|
140
|
+
timeZoneId: ev.timeZoneId,
|
|
141
|
+
showTimeZone: ev.showTimeZone ?? true,
|
|
142
|
+
},
|
|
143
|
+
registration: buildRegistration(ev),
|
|
144
|
+
},
|
|
145
|
+
fields: ["DETAILS", "TEXTS", "REGISTRATION", "URLS"],
|
|
146
|
+
};
|
|
147
|
+
const r = await req(ctx, "/events/v3/events", { body });
|
|
148
|
+
return { id: r.event?.id, slug: r.event?.slug };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* STEP 2 — ticket tiers for a TICKETING event (skip for RSVP). Must run BEFORE publish —
|
|
153
|
+
* publishing a ticketed event with no tiers ships an event with nothing to buy, and there is
|
|
154
|
+
* no un-publish. price is a decimal STRING ("65.00", never a number); name ≤ 30 chars; omit
|
|
155
|
+
* initialLimit for unlimited. `feeType` is FEE_INCLUDED (the Wix fee comes out of the price),
|
|
156
|
+
* FEE_ADDED_AT_CHECKOUT (the buyer pays it on top) or NO_FEE (free tickets and sites that don't
|
|
157
|
+
* require a fee). Tiers are independent — fired as one parallel batch.
|
|
158
|
+
* docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/ticket-definitions-v3/create-ticket-definition.md
|
|
159
|
+
*/
|
|
160
|
+
export async function createTicketTiers(ctx, eventId, tiers) {
|
|
161
|
+
return Promise.all(tiers.map(async (t) => {
|
|
162
|
+
const body = (feeType) => ({
|
|
163
|
+
ticketDefinition: {
|
|
164
|
+
eventId,
|
|
165
|
+
name: t.name,
|
|
166
|
+
description: t.description,
|
|
167
|
+
...(t.initialLimit != null ? { initialLimit: t.initialLimit } : {}),
|
|
168
|
+
pricingMethod: { fixedPrice: { value: String(t.price), currency: t.currency ?? "USD" } },
|
|
169
|
+
feeType,
|
|
170
|
+
},
|
|
171
|
+
fields: ["SALES_DETAILS"],
|
|
172
|
+
});
|
|
173
|
+
// INVALID_FEE_TYPE ("feeType=FEE_INCLUDED feeRequired=false") means this site doesn't take a
|
|
174
|
+
// fee on this tier — right after the Events app is installed the fee settings can also lag a
|
|
175
|
+
// few seconds (seen on a fresh site, 2026-09-27). So the retries change the fee type instead
|
|
176
|
+
// of re-sending the same one: the plan's (default FEE_INCLUDED), then NO_FEE, then
|
|
177
|
+
// FEE_ADDED_AT_CHECKOUT after a five-second pause for the install race. Anything else, or a
|
|
178
|
+
// third failure, throws as before.
|
|
179
|
+
const feeTypes = [t.feeType ?? "FEE_INCLUDED", "NO_FEE", "FEE_ADDED_AT_CHECKOUT"];
|
|
180
|
+
for (let attempt = 0; ; attempt++) {
|
|
181
|
+
try {
|
|
182
|
+
const r = await req(ctx, "/events/v3/ticket-definitions", { body: body(feeTypes[attempt]) });
|
|
183
|
+
return { id: r.ticketDefinition?.id, feeType: feeTypes[attempt] };
|
|
184
|
+
} catch (e) {
|
|
185
|
+
if (!/INVALID_FEE_TYPE/.test(e.message) || attempt >= 2) throw e;
|
|
186
|
+
if (attempt === 1) await new Promise((res) => setTimeout(res, 5000));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// STEP 3 — publish (one-way; for TICKETING only after its tiers exist).
|
|
193
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/publish-draft-event.md
|
|
194
|
+
export async function publishEvent(ctx, eventId) {
|
|
195
|
+
return req(ctx, `/events/v3/events/${eventId}/publish`, { body: {} });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// STEP 4 (optional) — group events by a format/track. Categories are the v1 API (NOT v3).
|
|
199
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/categories/create-category.md
|
|
200
|
+
export async function createEventCategories(ctx, names) {
|
|
201
|
+
const out = [];
|
|
202
|
+
for (const name of names) {
|
|
203
|
+
const r = await req(ctx, "/events/v1/categories", { body: { category: { name } } });
|
|
204
|
+
out.push({ id: r.category?.id, name });
|
|
205
|
+
}
|
|
206
|
+
return out;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Assign events to a category. Path is /{categoryId}/events (NOT /assign); body key is
|
|
210
|
+
// `eventId` — an ARRAY despite the singular name.
|
|
211
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/categories/assign-events.md
|
|
212
|
+
export async function assignEventsToCategory(ctx, categoryId, eventIds) {
|
|
213
|
+
return req(ctx, `/events/v1/categories/${categoryId}/events`, { body: { eventId: eventIds } });
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Events binds mainImage by Wix Media file ID — an external url must be imported first
|
|
217
|
+
// (a raw url as the id stores 200 but renders nothing); a plan `imagePrompt` is generated
|
|
218
|
+
// (Wix AI, 1 credit) then imported. Both live in the shared util (parallel, resilient,
|
|
219
|
+
// never blocks the seed).
|
|
220
|
+
export { importImage } from "../../shared/seed/images.mjs";
|
|
221
|
+
|
|
222
|
+
// mainImage is an Image OBJECT; height/width are REQUIRED or it won't render. Events V3 uses
|
|
223
|
+
// NO revision — partial PATCH keyed by event.id. Works before OR after publish.
|
|
224
|
+
// docs: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/update-event.md
|
|
225
|
+
export async function setEventMainImage(ctx, it) {
|
|
226
|
+
return req(ctx, `/events/v3/events/${it.eventId}`, {
|
|
227
|
+
method: "PATCH",
|
|
228
|
+
body: {
|
|
229
|
+
event: {
|
|
230
|
+
id: it.eventId,
|
|
231
|
+
mainImage: { id: it.id, url: it.url, height: it.height ?? 1024, width: it.width ?? 1024, altText: it.altText },
|
|
232
|
+
},
|
|
233
|
+
fields: ["DETAILS"], // mainImage reads back only under DETAILS
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* ONE-CALL seed: install → site currency → per event create DRAFT → tiers → publish →
|
|
240
|
+
* categories → images, ids threaded in memory. The default path.
|
|
241
|
+
*/
|
|
242
|
+
export async function setupEvents(ctx, { events = [], currency } = {}) {
|
|
243
|
+
// Before any event exists: a ticket tier's currency is fixed at creation.
|
|
244
|
+
if (currency) await setSiteCurrency(ctx, currency);
|
|
245
|
+
await installEventsApp(ctx);
|
|
246
|
+
const siteCurrency = currency ?? await getSiteCurrency(ctx);
|
|
247
|
+
|
|
248
|
+
const created = [];
|
|
249
|
+
for (const ev of events) {
|
|
250
|
+
const e = await createEvent(ctx, { ...ev, currency: ev.currency ?? siteCurrency });
|
|
251
|
+
if (!e.id) throw new Error(`Event "${ev.title}" was not created — no id returned.`);
|
|
252
|
+
const tiers = ev.type === "TICKETING" && ev.ticketTiers?.length
|
|
253
|
+
? await createTicketTiers(ctx, e.id, ev.ticketTiers.map((t) => ({ ...t, currency: t.currency ?? siteCurrency })))
|
|
254
|
+
: [];
|
|
255
|
+
// The guest control goes on the draft's form before publish; a refusal leaves the event without it
|
|
256
|
+
// (the owner adds it in the dashboard) and the result says so.
|
|
257
|
+
let guestControl = false;
|
|
258
|
+
if (ev.type !== "TICKETING" && ev.guests) {
|
|
259
|
+
try { guestControl = await addGuestControl(ctx, e.id, ev.guests); }
|
|
260
|
+
catch (err) { console.error(`guest control skipped for "${ev.title}": ${err.message}`); }
|
|
261
|
+
}
|
|
262
|
+
await publishEvent(ctx, e.id);
|
|
263
|
+
created.push({ ...e, category: ev.category, imageUrl: ev.imageUrl, imagePrompt: ev.imagePrompt, ticketCount: tiers.length, feeTypes: tiers.map((t) => t.feeType), ...(ev.guests ? { guestControl } : {}) });
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const names = [...new Set(created.map((e) => e.category).filter(Boolean))];
|
|
267
|
+
const categories = names.length ? await createEventCategories(ctx, names) : [];
|
|
268
|
+
for (const c of categories) {
|
|
269
|
+
const eventIds = created.filter((e) => e.category === c.name).map((e) => e.id);
|
|
270
|
+
if (eventIds.length) await assignEventsToCategory(ctx, c.id, eventIds);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Pass 2 — images: resolve (import by url / generate by prompt) in one parallel wave, then
|
|
274
|
+
// attach. Failures leave the event text-only; the seed's exit never depends on images.
|
|
275
|
+
const files = await resolveItemImages(ctx, created.map((e) => ({
|
|
276
|
+
url: e.imageUrl,
|
|
277
|
+
path: e.imagePath,
|
|
278
|
+
prompt: e.imagePrompt,
|
|
279
|
+
displayName: `${e.slug || "event"}.png`,
|
|
280
|
+
})));
|
|
281
|
+
let imagesAttached = 0;
|
|
282
|
+
for (let i = 0; i < created.length; i++) {
|
|
283
|
+
const e = created[i];
|
|
284
|
+
if (!files[i]) continue;
|
|
285
|
+
try {
|
|
286
|
+
await setEventMainImage(ctx, { eventId: e.id, id: files[i].id, url: files[i].url, height: 1024, width: 1024, altText: e.slug });
|
|
287
|
+
imagesAttached++;
|
|
288
|
+
} catch {
|
|
289
|
+
/* never block on image failure — the event stays text-only */
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
events: created.map((e) => ({ id: e.id, slug: e.slug, ticketCount: e.ticketCount, feeTypes: e.feeTypes, category: e.category ?? null })),
|
|
295
|
+
categories,
|
|
296
|
+
imagesAttached,
|
|
297
|
+
// Completing a PAID purchase needs a premium plan + a configured payment method in the
|
|
298
|
+
// dashboard — not a seeding failure; surface it to the owner. Free/RSVP need neither.
|
|
299
|
+
notes: created.some((e) => e.ticketCount > 0)
|
|
300
|
+
? ["Paid tickets require a premium plan + a configured payment method in the dashboard to complete a purchase."]
|
|
301
|
+
: [],
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// ---- CLI entry ----------------------------------------------------------------------------------
|
|
306
|
+
|
|
307
|
+
const invokedDirectly = process.argv[1] && import.meta.url.endsWith(process.argv[1].split("/").pop());
|
|
308
|
+
if (invokedDirectly) {
|
|
309
|
+
const planPath = process.argv[2];
|
|
310
|
+
if (!planPath) {
|
|
311
|
+
console.error("usage: node seed-events.mjs <plan.json> (run from the project root)");
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
314
|
+
const plan = JSON.parse(readFileSync(planPath, "utf8"));
|
|
315
|
+
const ctx = makeCtx();
|
|
316
|
+
setupEvents(ctx, plan)
|
|
317
|
+
.then((result) => console.log(JSON.stringify(result, null, 2)))
|
|
318
|
+
.catch((e) => {
|
|
319
|
+
console.error(e.message);
|
|
320
|
+
process.exit(1);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# FAQ — playbook
|
|
2
|
+
|
|
3
|
+
The FAQ machinery ships as files — category and question reads over the Wix FAQ app (owner order,
|
|
4
|
+
the Ricos answer rendered to sanitized HTML), one shared state machine for the page (category
|
|
5
|
+
filter, search, the accordion, the URL), its React binding, and reference components, typed
|
|
6
|
+
end-to-end. **The presentation is yours to design** on the shipped hook/DTOs: the accordion's look,
|
|
7
|
+
the category nav, the search box, the FAQ page, the home page's "top questions" strip, and the brand.
|
|
8
|
+
You never write FAQ data logic; you never skip designing. The vertical is **read-only** — visitors
|
|
9
|
+
read; authoring stays in the dashboard.
|
|
10
|
+
|
|
11
|
+
## The file map (deployed into `src/`)
|
|
12
|
+
|
|
13
|
+
**On Astro and React the shipped files are tested and work as they are** — this table and the
|
|
14
|
+
contracts below are everything you need to use them, so don't spend the run reading their source;
|
|
15
|
+
wire them and build your surfaces. Reading them is the right move when something is off (a runtime
|
|
16
|
+
error, a field this playbook doesn't cover) or when the brief wants a behaviour they don't offer —
|
|
17
|
+
then read the file that owns it and change or extend it. On `lib`, `static`, and a port the hooks
|
|
18
|
+
and components don't deploy at all; the store behind them does, and each wiring section below says
|
|
19
|
+
how to bind it. Files you edit: `SiteLayout.astro`, `styles/global.css`, and the shipped page's
|
|
20
|
+
template. Files you **create**: your accordion island (skeleton below) and your home page.
|
|
21
|
+
|
|
22
|
+
| file | what it is |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `wix/config.ts` · `wix/sdk.ts` | shared auth seam (deploy configures it — nothing to set by hand) |
|
|
25
|
+
| `wix/media.ts` · `wix/money.ts` | shared helpers; an answer's inline images are already resolved https URLs inside `answerHtml` |
|
|
26
|
+
| `wix/faq/types.ts` | the DTOs (`FaqCategory`, `FaqQuestion`, `FaqSection`, `FaqData`, `FaqQuestionPage`) — contracts below |
|
|
27
|
+
| `wix/faq/faq.ts` | `fetchFaq` (everything the page needs), `fetchCategories`, `fetchQuestions` (one cursor page, optionally one category), `fetchQuestionById` — the transport; the rules and DTO mappers are in `faq-core.ts` beside it (shared with the REST layer) |
|
|
28
|
+
| `wix/faq/faq-core.ts` | the rules: owner ordering, grouping into sections, client-side search, the deep-link spelling (`anchorId`, `faqDeepLink`, `parseDeepLink`), `faqJsonLd` (schema.org FAQPage), the Ricos-to-HTML subset, the wire spelling of a query |
|
|
29
|
+
| `wix/faq/faq-store.ts` | the page's state machine, framework-free and **module-scoped** (one store per page, not per surface — the nav, the search, and the accordion share it across islands): `seedFaq`, `getFaqState`/`subscribeFaq` + actions; the hook binds it to React, every other stack uses it directly |
|
|
30
|
+
| `hooks/faq/useFaq.ts` | React binding of `faq-store.ts` — contract below |
|
|
31
|
+
| `components/faq/FaqAccordion.tsx` · `FaqCategoryNav.tsx` · `FaqSearch.tsx` | **reference implementations** — correct, plain, accessible; build your own instead of shipping them |
|
|
32
|
+
| `styles/global.css` | **the design system**: Tailwind v4 + the `@theme` token block (shared across verticals). Everything, shipped and yours, styles from these tokens |
|
|
33
|
+
|
|
34
|
+
Astro stack additionally gets:
|
|
35
|
+
|
|
36
|
+
| file | what it is |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `layouts/SiteLayout.astro` | site chrome — **yours to brand** (keep the `seo-tags` slot + global.css import). If another vertical is also deployed, its layout won — add an FAQ nav link there |
|
|
39
|
+
| `pages/faq.astro` | SSR FAQ page — **keep the frontmatter** (the fetch, the `?category=` pre-selection, the FAQPage JSON-LD in the `seo-tags` slot); swap the island imports to YOUR components. Not a Wix item page: there is no owner-editable SEO type for FAQ, so `<title>`/description come from the layout props |
|
|
40
|
+
|
|
41
|
+
## What you build — the design job
|
|
42
|
+
|
|
43
|
+
1. **The accordion** — your question row (the question as the button, your open/closed affordance)
|
|
44
|
+
and answer panel (the HTML body, the per-question link) on `useFaq`, grouped under category
|
|
45
|
+
headings in owner order; skeletons while `data === null`, an honest empty state, a "no results"
|
|
46
|
+
state with a clear control while searching, an error line with retry.
|
|
47
|
+
2. **The category nav + search** — pills for the categories that have questions (only when more
|
|
48
|
+
than one), "All" first; a labelled search input debounced into `setQuery`, the results count
|
|
49
|
+
announced. Three islands or one — the store is shared either way.
|
|
50
|
+
3. **The FAQ page** — restyle `pages/faq.astro`'s template around your islands (heading, intro copy
|
|
51
|
+
from the brief, the islands). Keep the frontmatter.
|
|
52
|
+
4. **The home page** — what the business is, and a "top questions" strip: the first few questions
|
|
53
|
+
of the first category (`fetchFaq()` in the frontmatter → your markup), each linking to
|
|
54
|
+
`faqDeepLink(q)`.
|
|
55
|
+
|
|
56
|
+
Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass). Style
|
|
57
|
+
everything with Tailwind utilities on the tokens; the answer's HTML is plain tags (`p`, `h4`,
|
|
58
|
+
`ul`/`ol`/`li`, `blockquote`, `pre`/`code`, `a`, `img`, `hr`, `strong`/`em`/`u`/`s`) — style them
|
|
59
|
+
through descendant variants on your wrapper (`[&_p]:my-2 [&_ul]:list-disc …`), as the reference does.
|
|
60
|
+
|
|
61
|
+
### What a complete FAQ shows (recommended defaults)
|
|
62
|
+
|
|
63
|
+
Defaults for a brief that says nothing about them; the prompt wins where it differs. Look at the
|
|
64
|
+
seeded content before designing (how many categories, how long the answers run, whether they carry
|
|
65
|
+
lists or images) and design for this content, not for a stereotype of an FAQ.
|
|
66
|
+
|
|
67
|
+
- **FAQ page:** the heading and one line of intro in the first screen, then the category nav (only
|
|
68
|
+
when more than one category has questions), the search, and the first questions — at 390px too;
|
|
69
|
+
the questions collapsed by default, one open at a time; a copied link reopens the same question.
|
|
70
|
+
- **Search:** results as you type (debounced); the count announced; "No results for '…'" with a
|
|
71
|
+
clear control, never an empty page.
|
|
72
|
+
- **Home:** the business first, then real questions under a truthful heading, each a link to
|
|
73
|
+
`/faq#q-<slug>`; not a copy of the FAQ page.
|
|
74
|
+
- **Copy:** nothing the owner didn't write — no invented questions, view counts, or "popular" labels;
|
|
75
|
+
no Wix IDs or technical words in visible text.
|
|
76
|
+
|
|
77
|
+
### The contracts your components consume
|
|
78
|
+
|
|
79
|
+
Tested and working as they are; read the source when something is off or the brief wants more.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
// FaqCategory: { id, title, sortOrder /* number | null */, questionCount /* hide empty categories with it */ }
|
|
83
|
+
// FaqQuestion: { id, slug /* "" when absent */, question,
|
|
84
|
+
// answerHtml /* sanitized HTML — render via set:html / dangerouslySetInnerHTML on a wrapper */,
|
|
85
|
+
// answerText /* plain text — snippets, search, JSON-LD */,
|
|
86
|
+
// categoryId, sortOrder, shareLink /* Wix's own widget URL, "" unless asked */, labels /* not for visitors */ }
|
|
87
|
+
// FaqSection: { category, questions } // one category's questions in owner order
|
|
88
|
+
// FaqData: { categories, questions, truncated /* true → more than MAX_QUESTIONS (500) exist */ }
|
|
89
|
+
|
|
90
|
+
// fetchFaq() → FaqData // categories (counted) + every question, owner order
|
|
91
|
+
// fetchQuestions({ categoryId?, limit? /* ≤100 */, cursor? }) → { questions, nextCursor }
|
|
92
|
+
// fetchCategories() → FaqCategory[] // questionCount is 0 here; fetchFaq fills it
|
|
93
|
+
// fetchQuestionById(id) → FaqQuestion | null
|
|
94
|
+
|
|
95
|
+
// useFaq({ initialData?, initialCategoryId?, expandOnlyOne? /* true */, openFirst? /* false */, syncUrl? /* true */ }) →
|
|
96
|
+
// { data: FaqData|null /* null = loading → skeletons */,
|
|
97
|
+
// sections: FaqSection[] /* the VISIBLE questions grouped by category — render these */,
|
|
98
|
+
// visible: FaqQuestion[], activeCategoryId, selectCategory(id|null),
|
|
99
|
+
// query, setQuery(q), resultsCount /* visible.length while a query is typed */,
|
|
100
|
+
// expandedIds, isExpanded(id), toggleQuestion(id), expandQuestion(id), collapseAll(),
|
|
101
|
+
// loading, error, retry() }
|
|
102
|
+
// One store per page: every island that calls useFaq sees the same state. Pass the page's SSR props
|
|
103
|
+
// to EVERY island (the first to render seeds; the rest are no-ops) so server HTML and first paint agree.
|
|
104
|
+
|
|
105
|
+
// anchorId(q) → "q-<slug || id>" // put it as the id of every question's wrapper
|
|
106
|
+
// faqDeepLink(q, base = "/faq", categoryId?) → "/faq?category=…#q-<slug>"
|
|
107
|
+
// faqJsonLd(questions, pageUrl?) → the FAQPage object (the page already emits it)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### The island you create — skeleton
|
|
111
|
+
|
|
112
|
+
The Astro page ships; its frontmatter is machinery (SSR fetch → DTO props → islands; the JSON-LD; the
|
|
113
|
+
category pre-selection) and stays as shipped. What you create is the accordion island `faq.astro`
|
|
114
|
+
mounts (and your nav and search, or one island holding all three). Hooks first, branches after (an
|
|
115
|
+
early return above a hook changes hook order and React throws). Islands render on the server too,
|
|
116
|
+
after the 200 is sent — nothing in a render path may throw.
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
// src/components/faq/<YourAccordion>.tsx — YOU build it; faq.astro mounts it (swap the import there).
|
|
120
|
+
import { useFaq } from "../../hooks/faq/useFaq";
|
|
121
|
+
import { anchorId, faqDeepLink } from "../../wix/faq/faq-core";
|
|
122
|
+
import type { FaqData } from "../../wix/faq/types";
|
|
123
|
+
|
|
124
|
+
export default function YourAccordion(props: {
|
|
125
|
+
initialData?: FaqData; // SSR props from faq.astro — pass straight to useFaq;
|
|
126
|
+
initialCategoryId?: string | null; // omitted in a SPA (client fetch)
|
|
127
|
+
}) {
|
|
128
|
+
const { data, sections, query, setQuery, isExpanded, toggleQuestion, error, retry } = useFaq(props);
|
|
129
|
+
// …you implement the render:
|
|
130
|
+
// • data === null → skeleton rows; data.questions.length === 0 → your honest empty state
|
|
131
|
+
// • error → a short inline message with a retry control
|
|
132
|
+
// • query set and sections empty → "No results for '…'" with a clear control (setQuery(""))
|
|
133
|
+
// • else per section: the category title (an <h2>) and per question a wrapper
|
|
134
|
+
// <div id={anchorId(q)}> holding an <h3><button aria-expanded={isExpanded(q.id)}
|
|
135
|
+
// aria-controls={panelId} onClick={() => toggleQuestion(q.id)}>{q.question}</button></h3>
|
|
136
|
+
// and a <div id={panelId} role="region" hidden={!isExpanded(q.id)}> with the answer:
|
|
137
|
+
// <div dangerouslySetInnerHTML={{ __html: q.answerHtml }} /> — the ONLY HTML render — and a
|
|
138
|
+
// link to faqDeepLink(q) (plus a "copy link" control if you like)
|
|
139
|
+
// • data.truncated → one honest line ("Showing the first N questions")
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### The reference files for stacks where the components don't deploy
|
|
144
|
+
|
|
145
|
+
On `lib`, `static`, and a port, nothing under `components/` or `hooks/` arrives. The state machine
|
|
146
|
+
behind the hook does arrive — `wix/faq/faq-store.ts` — so you never rewrite it: `seedFaq(options)`
|
|
147
|
+
once, `subscribeFaq`, render from `getFaqState()`, call its actions. Its `FaqState` interface is the
|
|
148
|
+
render contract; read it. What you write is the rendering — the accordion, the nav, the search — and
|
|
149
|
+
for that read these first; they are tested code for exactly that behaviour:
|
|
150
|
+
|
|
151
|
+
1. `components/faq/FaqAccordion.tsx` — the button-in-heading + region pattern with `aria-expanded`,
|
|
152
|
+
`aria-controls` and `hidden`; the states in order (skeleton → error → empty → no results →
|
|
153
|
+
sections); the copy-link control; the truncation line.
|
|
154
|
+
2. `components/faq/FaqCategoryNav.tsx` — "All" first, only categories with questions, `aria-pressed`
|
|
155
|
+
on the active pill, the `asLinks` no-JS variant.
|
|
156
|
+
3. `components/faq/FaqSearch.tsx` — the 250 ms debounce with immediate flush on Enter and on clear,
|
|
157
|
+
the `aria-live` results count.
|
|
158
|
+
|
|
159
|
+
All under `templates/faq/app/`.
|
|
160
|
+
|
|
161
|
+
### Wiring — Astro (default)
|
|
162
|
+
|
|
163
|
+
1. Set the `@theme` tokens (one edit); brand `SiteLayout.astro` (one pass — merge into the other
|
|
164
|
+
vertical's layout instead if both are deployed).
|
|
165
|
+
2. Write your island(s) under `src/components/faq/` (new names — don't overwrite the references) and
|
|
166
|
+
swap the island imports in `pages/faq.astro`; restyle its template (keep the frontmatter).
|
|
167
|
+
**Author your surfaces in as few messages as possible** — batch multiple Writes per message.
|
|
168
|
+
3. Write `pages/index.astro` (home) — it exists from the scaffold; Read it before overwriting.
|
|
169
|
+
|
|
170
|
+
### Wiring — another JS framework (`--stack lib`: Vue, Svelte, Solid, plain Vite)
|
|
171
|
+
|
|
172
|
+
Read the reference files listed above before writing any surface.
|
|
173
|
+
|
|
174
|
+
`deploy.mjs faq --stack lib` put the data layer in `src/wix/` and nothing else: `sdk.ts` (the
|
|
175
|
+
visitor client, configured with the public client id), `media.ts`, `money.ts`, and `wix/faq/` —
|
|
176
|
+
`faq.ts`, `types.ts`, `faq-core.ts`, and the store `faq-store.ts`. None of it is React. The hook and
|
|
177
|
+
components don't ship on this stack; the store replaces the hook, and you write the components in
|
|
178
|
+
your framework to the contracts on this page:
|
|
179
|
+
|
|
180
|
+
- bind the store with your framework's external-store primitive (Vue: `shallowRef` updated in
|
|
181
|
+
`subscribeFaq`; Svelte: `readable(getFaqState(), (set) => subscribeFaq(() => set(getFaqState())))`;
|
|
182
|
+
Solid: a signal set in `subscribeFaq`). `seedFaq({ initialData? })` once when the page's data is
|
|
183
|
+
known (a SPA passes nothing and the first subscription fetches); `groupByCategory(state.data.categories,
|
|
184
|
+
state.visible)` from `faq-core` gives the sections. State in, actions out — exactly the hook's
|
|
185
|
+
contract above.
|
|
186
|
+
|
|
187
|
+
Route `/faq` (`?category=` and `#q-…` are read and written by the store); dev server on 4321; a
|
|
188
|
+
static build goes through `npx @wix/cli@latest release` with `site.outputDirectory` pointing at the
|
|
189
|
+
build folder, an SSR build is hosted by you. Page tags from the first questions.
|
|
190
|
+
|
|
191
|
+
### Wiring — static site (`--stack static`, no bundler)
|
|
192
|
+
|
|
193
|
+
Read the reference files listed above before writing any surface.
|
|
194
|
+
|
|
195
|
+
`deploy.mjs faq --stack static --out site` put the REST layer in `site/js/wix/` (browser ESM, the
|
|
196
|
+
`.ts` beside each `.js` for reading). Everything the visitor loads lives under `site/` — pages,
|
|
197
|
+
styles, `js/` — and `wix.config.json`'s `site.outputDirectory` is `"./site"`; the project root
|
|
198
|
+
(config, plan, seed output) is never the upload. Same function names and DTOs as the table above,
|
|
199
|
+
so the contracts on this page hold unchanged: `fetchFaq`, `fetchQuestions`, `fetchCategories`,
|
|
200
|
+
`fetchQuestionById` from `./js/wix/faq.js`; `anchorId`, `faqDeepLink`, `groupByCategory` from
|
|
201
|
+
`./js/wix/faq-core.js`. The state machine ships too: `seedFaq`, `subscribeFaq`, `getFaqState` and
|
|
202
|
+
the actions from `./js/wix/faq-store.js` (the first `subscribeFaq` in a browser fetches when nothing
|
|
203
|
+
was seeded). No components ship — you write the rendering in plain JS: one render function per
|
|
204
|
+
surface that reads `getFaqState()`, called from `subscribeFaq`, with the controls calling the store's
|
|
205
|
+
actions; the answer goes in through `innerHTML` (it is the core's sanitized HTML). The page is
|
|
206
|
+
`faq.html` (Wix static hosting serves files, not directories — name the file and link to it).
|
|
207
|
+
Structured data built in the browser is not read by search engines — an FAQ that needs the FAQPage
|
|
208
|
+
markup indexed stays on Astro; say so in the closing message. Set `document.title` from the first
|
|
209
|
+
questions once they load. The visitor token persists in `localStorage` on its own; never mint per
|
|
210
|
+
page. `npx @wix/cli@latest release` uploads `site/`.
|
|
211
|
+
|
|
212
|
+
### Wiring — server-rendered, another language (Flask, Laravel, Rails, …)
|
|
213
|
+
|
|
214
|
+
Read the reference files listed above before writing any surface.
|
|
215
|
+
|
|
216
|
+
Run `deploy.mjs faq --stack static` in the project folder anyway: `js/wix/` is both the browser-side
|
|
217
|
+
code and the readable spec. Reads render on the server: port `js/wix/faq.ts` and `faq-core.ts` to
|
|
218
|
+
your language — the same four functions returning the same DTO shapes as dicts, one anonymous
|
|
219
|
+
visitor token per process for these public reads (mint and refresh per `client.ts`) — the
|
|
220
|
+
Ricos-to-HTML subset ports with the core (escape text, allow only http(s) links, the node table in
|
|
221
|
+
`faq-core.ts`), and the FAQPage JSON-LD is server-rendered from the same DTOs, so questions and
|
|
222
|
+
answers are in the HTML. Nothing in this vertical runs on the visitor's behalf, so the browser side
|
|
223
|
+
is optional: the category filter, the search, and the accordion can run client-side on
|
|
224
|
+
`./js/wix/faq-store.js` exactly as the static wiring above, or as plain server routes
|
|
225
|
+
(`/faq?category=<id>`, answers rendered open when there is no script). Route stays `/faq`.
|
|
226
|
+
|
|
227
|
+
**Pre-rendered (Frozen-Flask, Pelican, any static-site generator) → Wix-hosted.** Same port for the
|
|
228
|
+
reads, run at build time with one anonymous token — walk `fetchQuestions` by `nextCursor` until it
|
|
229
|
+
is null (or call the ported `fetchFaq`). Run `deploy.mjs faq --stack static --out <build dir>` so
|
|
230
|
+
`js/wix/` is inside the output the page imports from, point `site.outputDirectory` at that folder,
|
|
231
|
+
`wix release`. Give the templates one base path to `js/wix/` (root-relative `/js/wix/…`), never a
|
|
232
|
+
relative `./js/wix/`. The frozen page is the first paint; filter, search, and the accordion still run
|
|
233
|
+
client-side on `./js/wix/faq-store.js`. Close with the live URL, the rebuild + release command, and
|
|
234
|
+
one line for the owner: questions edited in the dashboard reach the site when that command runs.
|
|
235
|
+
|
|
236
|
+
### Wiring — React SPA (Vite etc.)
|
|
237
|
+
|
|
238
|
+
Import `./styles/global.css` once at the app entry (needs `@tailwindcss/vite` in the vite plugins —
|
|
239
|
+
deploy added the dep). Route `/faq` → your islands on `useFaq()` (no `initialData` — the store
|
|
240
|
+
fetches on mount and reads `?category=`/`#q-…` from the address bar). Deploy wrote the public client
|
|
241
|
+
id into `wix/config.ts`; nothing else to configure.
|
|
242
|
+
|
|
243
|
+
Routes on Wix hosting: the host serves files only, so a clean route answers 404 when loaded directly — hash routes, or one HTML file per route, decided before the first route is written; any URL handed to Wix as a return target must be one the host serves (SKILL.md step 1).
|
|
244
|
+
|
|
245
|
+
## Hard rules
|
|
246
|
+
|
|
247
|
+
- **Data only through the shipped exports** — never import `@wix/faq` in a component, never
|
|
248
|
+
re-derive a request shape; extend by adding a function in `wix/faq/` (API contracts: the
|
|
249
|
+
`wix-docs` skill).
|
|
250
|
+
- **`answerHtml` is HTML, `answerText` is copy** — render the body with `set:html` /
|
|
251
|
+
`dangerouslySetInnerHTML` on a wrapper you control, and only that field; never interpolate it as
|
|
252
|
+
text, never innerHTML anything else (question, titles, labels are text).
|
|
253
|
+
- **Search and category filtering are client-side over the loaded set — by design.** The API filters
|
|
254
|
+
`question` by prefix only and has no full-text search, so the whole FAQ is loaded once (capped at
|
|
255
|
+
`MAX_QUESTIONS`, 500) and filtered in the store; this is the one vertical where "page at the source"
|
|
256
|
+
does not apply. Never re-implement search against the API, never raise the cap; render
|
|
257
|
+
`data.truncated` honestly.
|
|
258
|
+
- **Question and category order is the owner's** (`sortOrder`, already applied) — never sort
|
|
259
|
+
alphabetically or by length unless the brief says so.
|
|
260
|
+
- **Deep links are `/faq#q-<slug>`** — every question's wrapper carries `id={anchorId(q)}`; links to a
|
|
261
|
+
question go through `faqDeepLink(q)`; never hand-build them from ids. `shareLink` is Wix's widget
|
|
262
|
+
URL, not this site's — don't surface it as the share target.
|
|
263
|
+
- **The accordion is accessible by construction**: the question is a `<button aria-expanded
|
|
264
|
+
aria-controls>` inside a heading, the answer a `role="region"` panel it labels, collapsed with
|
|
265
|
+
`hidden` (still in the DOM — that is what makes the FAQPage markup honest). Never collapse by
|
|
266
|
+
unmounting the answer.
|
|
267
|
+
- **Pass the page's SSR props to every island** that calls `useFaq` (the store seeds once) — an island
|
|
268
|
+
without them renders skeletons on the server and flashes on hydration.
|
|
269
|
+
- Where the shipped components deploy: theme via the `@theme` tokens, your markup in Tailwind utilities
|
|
270
|
+
on the same tokens; no parallel theme files, no hardcoded palettes. Where they don't (`lib`,
|
|
271
|
+
`static`, a port): style with what your stack does well, on one token set of your own.
|
|
272
|
+
- Live data or an honest empty state — never mock questions, counts, or "helpful" votes; the DTOs don't
|
|
273
|
+
carry them.
|
|
274
|
+
- **Call every hook before any conditional return.** Hooks first, branches after.
|
|
275
|
+
|
|
276
|
+
## Point the user to their dashboard
|
|
277
|
+
|
|
278
|
+
Hand the owner this link — `{siteId}` is `siteId` in `wix.config.json` (the deploy JSON prints it as
|
|
279
|
+
`dashboardUrl`).
|
|
280
|
+
|
|
281
|
+
| page | `https://manage.wix.com/dashboard/{siteId}/` + |
|
|
282
|
+
|---|---|
|
|
283
|
+
| FAQ (categories and questions) | `app/14c92d28-031e-7910-c9a8-a670011e062d` — the app-id form, which redirects to the FAQ app's own dashboard page |
|
|
284
|
+
|
|
285
|
+
Every category and question in the dashboard appears on the site; the API exposes no draft state.
|
|
286
|
+
|
|
287
|
+
## Seeding
|
|
288
|
+
|
|
289
|
+
Per `seed/SEED.md` — plain-data `plan.json` into `seed-faq.mjs` from the project root. Seed
|
|
290
|
+
questions that exercise the UI (2–4 categories, 2–4 questions each, at least one answer with a list
|
|
291
|
+
or several paragraphs). A fresh FAQ install carries Wix's sample categories and questions ("General",
|
|
292
|
+
"Setting up FAQs"), and the page shows them. Never delete them, or anything else on the site: the
|
|
293
|
+
result's `preexisting[]` names what is on the page, and the closing message says so with the
|
|
294
|
+
dashboard link so the owner removes them there — never release a site that shows "Setting up FAQs"
|
|
295
|
+
without telling the owner.
|
|
296
|
+
|
|
297
|
+
## Verification caveats
|
|
298
|
+
|
|
299
|
+
The FAQ API's reference exists (`https://dev.wix.com/docs/rest/business-management/faq-app/…`) and the
|
|
300
|
+
shipped calls follow it: `POST /faq/v2/categories/query`, `POST /faq/v2/question-entries/query`, the
|
|
301
|
+
`RICH_CONTENT` content format and the `SHARE_LINKS` field set. Not confirmed on a live site, and
|
|
302
|
+
guarded in the code:
|
|
303
|
+
|
|
304
|
+
- **Anonymous visitor reads.** Both endpoints carry the app's READ scope; the reference's SDK example
|
|
305
|
+
is elevated. If `fetchFaq` answers 403 for a visitor (the SSR fetch is guarded — the page then
|
|
306
|
+
renders the empty state), the read belongs behind a narrow server endpoint per
|
|
307
|
+
`templates/shared/CUSTOM_OPERATIONS.md`; on managed Astro the SSR call already runs server-side.
|
|
308
|
+
- **Answer format.** A question stored as plain text may come back as `plainText` even when
|
|
309
|
+
`RICH_CONTENT` is requested; the core renders `richContent`, then `plainText`, then a minimal
|
|
310
|
+
Draft.js read (paragraphs, lists, headings — no inline styles), so every format shows something.
|
|
311
|
+
- **Cursor pages of a filtered query.** Page 2 of `fetchQuestions({ categoryId })` sends the cursor
|
|
312
|
+
alone (the cursor carries the filter, as Blog's does); `fetchFaq` pages the unfiltered set, so the
|
|
313
|
+
page never depends on it.
|
|
314
|
+
- **Default content on install** and a question **visibility control** (the reference's sample flow
|
|
315
|
+
mentions a `status` the entity does not expose): the seed reads before writing and reports what it
|
|
316
|
+
found; the read layer shows what the API returns.
|
|
317
|
+
- **The dashboard slug** is not confirmed; the app-id link above always redirects to it.
|