@wix/agent-skills 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +60 -4
  3. package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
  4. package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
  5. package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
  6. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
  7. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
  8. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
  9. package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
  10. package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
  11. package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
  12. package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
  13. package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
  14. package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
  15. package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
  16. package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
  17. package/skills/wix-headless-fast/SKILL.md +61 -223
  18. package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
  19. package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +11 -12
  20. package/skills/wix-headless-fast/guides/existing-site.md +76 -0
  21. package/skills/wix-headless-fast/guides/reference-mode.md +97 -0
  22. package/skills/wix-headless-fast/install/AGENTS.md +6 -3
  23. package/skills/wix-headless-fast/install/attach.mjs +15 -47
  24. package/skills/wix-headless-fast/install/deploy.mjs +21 -60
  25. package/skills/wix-headless-fast/install/lock.mjs +55 -0
  26. package/skills/wix-headless-fast/install/setup.mjs +32 -12
  27. package/skills/wix-headless-fast/install/templates.mjs +168 -0
  28. package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
  29. package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
  30. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -303
  31. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
  32. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
  33. package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
  34. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
  35. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
  36. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
  37. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
  38. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
  39. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
  40. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
  41. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
  42. package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
  43. package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
  44. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
  45. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
  46. package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
  47. package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
  48. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
  49. package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
  50. package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +0 -22
  51. package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
  52. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -277
  53. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
  54. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
  55. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
  56. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
  57. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
  58. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
  59. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
  60. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
  61. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
  62. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
  63. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
  64. package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
  65. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
  66. package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
  67. package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
  68. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
  69. package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
  70. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
  71. package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +0 -28
  72. package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
  73. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -355
  74. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
  75. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
  76. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
  77. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
  78. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
  79. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
  80. package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
  81. package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
  82. package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
  83. package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
  84. package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
  85. package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +0 -20
  86. package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
  87. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -307
  88. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
  89. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
  90. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
  91. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
  92. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
  93. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
  94. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
  95. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
  96. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
  97. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
  98. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
  99. package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
  100. package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
  101. package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
  102. package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
  103. package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
  104. package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
  105. package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
  106. package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
  107. package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
  108. package/skills/wix-headless-fast/references/events/seed/read-site.mjs +0 -26
  109. package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
  110. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -340
  111. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
  112. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
  113. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
  114. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
  115. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
  116. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
  117. package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
  118. package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
  119. package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
  120. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
  121. package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
  122. package/skills/wix-headless-fast/references/forms/seed/read-site.mjs +0 -20
  123. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
  124. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -316
  125. package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
  126. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
  127. package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
  128. package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
  129. package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
  130. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
  131. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
  132. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
  133. package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
  134. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
  135. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
  136. package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
  137. package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
  138. package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
  139. package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
  140. package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
  141. package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
  142. package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
  143. package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
  144. package/skills/wix-headless-fast/references/members/seed/read-site.mjs +0 -15
  145. package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
  146. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -315
  147. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
  148. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
  149. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
  150. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
  151. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
  152. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
  153. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
  154. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
  155. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
  156. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
  157. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
  158. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
  159. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
  160. package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
  161. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
  162. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
  163. package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
  164. package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
  165. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
  166. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
  167. package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +0 -20
  168. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -256
  169. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -296
  170. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
  171. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
  172. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
  173. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
  174. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
  175. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
  176. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
  177. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
  178. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
  179. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
  180. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
  181. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
  182. package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
  183. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
  184. package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
  185. package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
  186. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
  187. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
  188. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
  189. package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +0 -21
  190. package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
  191. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -360
  192. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
  193. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
  194. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
  195. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
  196. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
  197. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
  198. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
  199. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
  200. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
  201. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
  202. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
  203. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
  204. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
  205. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
  206. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
  207. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
  208. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
  209. package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
  210. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
  211. package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
  212. package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
  213. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
  214. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
  215. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
  216. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
  217. package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +0 -25
  218. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -499
  219. package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
  220. package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
  221. package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
  222. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
  223. package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
  224. package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
  225. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
  226. package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
  227. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
  228. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
  229. package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
  230. package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
  231. package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
  232. package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
  233. package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
  234. package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +0 -99
  235. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -612
  236. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
  237. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
  238. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
  239. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
  240. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
  241. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
  242. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
  243. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
  244. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
  245. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
  246. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
  247. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -314
  248. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
  249. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
  250. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
  251. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -169
  252. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
  253. package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
  254. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
  255. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
  256. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -130
  257. package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +0 -38
  258. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -561
@@ -0,0 +1,47 @@
1
+ # Data Collection — permissions
2
+
3
+ > The scaffolded `dataPermissions` are placeholders. Set them from this file before shipping.
4
+
5
+ ## Permissions
6
+
7
+ Access levels control who can read, create, update, and delete items in collections.
8
+
9
+ | Level | Description |
10
+ | -------------------- | -------------------------------------------------- |
11
+ | `UNDEFINED` | Not set (inherits defaults) |
12
+ | `ANYONE` | Public access (including visitors) |
13
+ | `SITE_MEMBER` | Any signed-in user (members and collaborators) |
14
+ | `SITE_MEMBER_AUTHOR` | Signed-in users, but members only access own items |
15
+ | `CMS_EDITOR` | Site collaborators with CMS Access permission |
16
+ | `PRIVILEGED` | CMS administrators and privileged users |
17
+
18
+ **Common patterns:**
19
+
20
+ - Public content (default, recommended): `read: ANYONE, write: PRIVILEGED`
21
+ - User-generated content: `read: SITE_MEMBER, write: SITE_MEMBER_AUTHOR`
22
+ - Editorial workflow: `read: ANYONE, write: CMS_EDITOR`
23
+ - Private/admin: `read: PRIVILEGED, write: PRIVILEGED`
24
+
25
+ **Permission hierarchy** (most to least restrictive): `PRIVILEGED` > `CMS_EDITOR` > `SITE_MEMBER_AUTHOR` > `SITE_MEMBER` > `ANYONE` > `UNDEFINED`
26
+
27
+ ### Context-Based Permission Rules
28
+
29
+ **CRITICAL: Permissions must match where and how the data is accessed.** The consumer of the data determines the minimum permission level — setting permissions more restrictive than the access context will cause runtime failures (empty results or permission-denied errors).
30
+
31
+ **Determine permissions by asking: "Who interacts with this data, and from where?"**
32
+
33
+ | Access Context | Who Sees / Uses It | Implication |
34
+ |---|---|---|
35
+ | **Custom element widget** (`CUSTOM_ELEMENT_WIDGET`) | Any site visitor (public) | Reads must be `ANYONE`. If the widget accepts input (e.g., reviews, submissions), inserts must also be `ANYONE` or `SITE_MEMBER`. |
36
+ | **Embedded Script** | Any site visitor (public) | Same as custom element widget — reads must be `ANYONE`. Writes depend on whether visitors can submit data. |
37
+ | **Dashboard Page** (`DASHBOARD_PAGE`) | Site owner / collaborators only | Can use `CMS_EDITOR` or `PRIVILEGED` for all operations since only authorized users access the dashboard. |
38
+ | **Backend code (site-side)** | Runs in visitor context | If called from page code or site-side modules, the caller has visitor-level permissions — data must be readable/writable at the appropriate public level. |
39
+ | **Backend code (elevated)** | Runs with `auth.elevate()` from `@wix/essentials` | Can bypass permissions, but the collection still needs correct defaults for any non-elevated callers. |
40
+
41
+ Use `SITE_MEMBER_AUTHOR` on `itemUpdate` / `itemRemove` when members should only modify their **own** items (e.g., a member can edit only their own reviews).
42
+
43
+ **How to apply this:**
44
+
45
+ 1. **Identify every place the collection is read or written** — custom element widgets, dashboard pages, embedded scripts, backend APIs.
46
+ 2. **Use the least restrictive context as the floor.** If a custom element widget reads the data AND a dashboard page also reads it, `itemRead` must be `ANYONE` (because the widget is public).
47
+ 3. **Apply per-operation.** A collection can have `itemRead: ANYONE` (widget displays it) but `itemInsert: CMS_EDITOR` (only dashboard users add items). Each operation is independent.
@@ -0,0 +1,181 @@
1
+ # Data Collection — declaring the schema
2
+
3
+ > The `fields` and `indexes` you write inside a collection file.
4
+ > [DATA_COLLECTION.md](../DATA_COLLECTION.md) owns scaffolding, the file shape and the CLI
5
+ > constraints.
6
+
7
+ ## Field Types
8
+
9
+ | Type | Description | Use Case |
10
+ | ----------------- | -------------------------------- | ---------------------- |
11
+ | `TEXT` | Single-line text | Names, titles |
12
+ | `RICH_TEXT` | Formatted HTML text | Blog content |
13
+ | `RICH_CONTENT` | Rich content with embedded media | Complex blog posts |
14
+ | `NUMBER` | Decimal numbers | Prices, quantities |
15
+ | `BOOLEAN` | True/false | Toggles, flags |
16
+ | `DATE` | Date only | Birthdays |
17
+ | `DATETIME` | Date with time | Timestamps |
18
+ | `TIME` | Time only | Schedules |
19
+ | `IMAGE` | Single image | Thumbnails |
20
+ | `DOCUMENT` | File attachment | PDFs |
21
+ | `VIDEO` | Video file | Media |
22
+ | `AUDIO` | Audio file | Podcasts |
23
+ | `MEDIA_GALLERY` | Multiple media | Galleries |
24
+ | `REFERENCE` | Link to one item | Author → User |
25
+ | `MULTI_REFERENCE` | Link to many items | Post → Tags |
26
+ | `ADDRESS` | Structured address | Locations |
27
+ | `URL` | URL validation | Links |
28
+ | `PAGE_LINK` | Link to Wix page | Internal navigation |
29
+ | `LANGUAGE` | Language code | Multi-language content |
30
+ | `OBJECT` | JSON object | Flexible data |
31
+ | `ARRAY` | Array of values | Generic arrays |
32
+ | `ARRAY_STRING` | Array of strings | Tags list |
33
+ | `ARRAY_DOCUMENT` | Array of documents | File collections |
34
+ | `ANY` | Any type | Most flexible |
35
+
36
+ **CRITICAL: OBJECT fields require `objectOptions` with a `fields` array.** When using `type: "OBJECT"`, you MUST include `objectOptions: { fields: [] }` — the API will reject OBJECT fields without it. Use an empty `fields` array if you don't need a fixed schema (the object will still accept arbitrary JSON):
37
+
38
+ ```json
39
+ {
40
+ "key": "settings",
41
+ "displayName": "Settings",
42
+ "type": "OBJECT",
43
+ "objectOptions": { "fields": [] }
44
+ }
45
+ ```
46
+
47
+ > ⚠️ `objectOptions: {}` (without the `fields` key) is **not valid** and will cause a runtime error. Always include `fields`, even as an empty array.
48
+
49
+ For structured objects with a defined schema, list the nested fields inside `objectOptions.fields`:
50
+
51
+ ```json
52
+ {
53
+ "key": "triggerRules",
54
+ "displayName": "Trigger Rules",
55
+ "type": "OBJECT",
56
+ "objectOptions": {
57
+ "fields": [
58
+ { "key": "url", "displayName": "URL Condition", "type": "TEXT" },
59
+ {
60
+ "key": "scrollDepth",
61
+ "displayName": "Scroll Depth %",
62
+ "type": "NUMBER"
63
+ },
64
+ { "key": "dateStart", "displayName": "Start Date", "type": "DATE" }
65
+ ]
66
+ }
67
+ }
68
+ ```
69
+
70
+ ## Field Properties
71
+
72
+ ```ts
73
+ {
74
+ key: 'email', // required, lowerCamelCase ASCII
75
+ type: 'TEXT', // required, see Field Types above
76
+ displayName: 'Email Address', // optional, CMS label
77
+ description: "User's primary email", // optional, help text
78
+ encrypted: false, // optional, encrypt value at rest
79
+ // arrayOptions / objectOptions / referenceOptions / multiReferenceOptions
80
+ // only when type is ARRAY / OBJECT / REFERENCE / MULTI_REFERENCE
81
+ }
82
+ ```
83
+
84
+ | Property | Required | Description |
85
+ | ------------- | -------- | ------------------------------------ |
86
+ | `key` | yes | Field identifier (lowerCamelCase) |
87
+ | `type` | yes | Field data type (see Field Types) |
88
+ | `displayName` | no | Label shown in CMS |
89
+ | `description` | no | Help text |
90
+ | `encrypted` | no | Encrypt value at rest |
91
+
92
+ **There is no field-level `required`, `defaultValue`, or `unique`.** The `DevCenterDataCollectionField` type does not accept them and TypeScript will reject the build. Use these alternatives instead:
93
+
94
+ - **Required values:** Validate in the dashboard form and/or service-plugin handler before inserting. Do not rely on the collection schema to enforce presence.
95
+ - **Defaults:** Set defaults in the insert path (dashboard handler, service plugin) or via the collection's `initialData` for seeded rows.
96
+ - **Uniqueness:** Declare a unique index in the collection's `indexes` array (see [Indexes](#indexes)). Uniqueness is an index-level concern, not a field-level one.
97
+
98
+ ## Indexes
99
+
100
+ **Most collections need no index at all — ship `indexes: []` unless you can name the query that
101
+ needs one.** `_id` and `_createdDate` are indexed automatically, and the budget is small: **3 regular
102
+ indexes, 1 unique, 4 total** (the collection reports its own `capabilities.indexLimits`). "Index the
103
+ field the table sorts by" is not a reason — it spends a slot for a page that would page fine without
104
+ it.
105
+
106
+ When you do add one, it is `{ fields: [{ path, order? }], unique? }` — and **nothing else**. In
107
+ particular there is **no `name`**: the runtime Create Index API takes one, but the extension builder
108
+ does not and the platform derives it (a `date` DESC index arrives as `date_DESC`). Read
109
+ `DevCenterDataCollectionIndex` in the builders package if in doubt; a stray key is a compile error on
110
+ the `satisfies DataCollection` literal.
111
+
112
+ The `indexes` array on the collection accepts entries shaped like:
113
+
114
+ ```ts
115
+ indexes: [
116
+ {
117
+ fields: [{ path: 'email', order: 'ASC' }], // order is optional: 'ASC' | 'DESC'
118
+ unique: true, // optional, enforces uniqueness across items
119
+ },
120
+ {
121
+ fields: [
122
+ { path: 'category' },
123
+ { path: '_createdDate', order: 'DESC' },
124
+ ],
125
+ },
126
+ ],
127
+ ```
128
+
129
+ | Property | Required | Description |
130
+ | --------------- | -------- | ------------------------------------------------------ |
131
+ | `fields` | yes | One or more `{ path, order? }` entries (composite index when more than one) |
132
+ | `fields[].path` | yes | Field key to index |
133
+ | `fields[].order`| no | `'ASC'` (default) or `'DESC'` |
134
+ | `unique` | no | Enforce uniqueness on the indexed field(s) |
135
+
136
+ Leave `indexes: []` when no custom indexing is needed; the `_id` index is created automatically.
137
+
138
+ ## Naming Conventions
139
+
140
+ - **Field keys:** `lowerCamelCase`, ASCII only (e.g., `productName`, `isActive`, `createdAt`)
141
+ - **Collection IDs (`idSuffix`):** `lower-kebab-case` or `lower_underscore` (e.g., `product-categories`, `blog_posts`)
142
+ - **Display names:** Human-readable, can contain spaces (e.g., `"Product Name"`, `"Is Active"`)
143
+
144
+ ## System Fields (Automatic)
145
+
146
+ Every collection includes: `_id`, `_createdDate`, `_updatedDate`, `_owner`
147
+
148
+ ## Relationships
149
+
150
+ **One-to-One / Many-to-One (REFERENCE):**
151
+
152
+ ```json
153
+ {
154
+ "key": "category",
155
+ "displayName": "Category",
156
+ "type": "REFERENCE",
157
+ "referenceOptions": {
158
+ "referencedCollectionId": "categories"
159
+ }
160
+ }
161
+ ```
162
+
163
+ **Many-to-Many (MULTI_REFERENCE):**
164
+
165
+ ```json
166
+ {
167
+ "key": "tags",
168
+ "displayName": "Tags",
169
+ "type": "MULTI_REFERENCE",
170
+ "multiReferenceOptions": {
171
+ "referencedCollectionId": "tags"
172
+ }
173
+ }
174
+ ```
175
+
176
+ **CRITICAL Constraints:**
177
+
178
+ - REFERENCE/MULTI_REFERENCE fields can ONLY link to other custom CMS collections defined in your app
179
+ - The `referencedCollectionId` MUST be the `idSuffix` of another collection in the same plan
180
+ - **NEVER use REFERENCE fields to link to Wix business entities** (Products, Orders, Contacts, Members, etc.)
181
+ - Use Wix SDK APIs to access Wix business entities instead
@@ -1,39 +1,27 @@
1
1
  # Wix Data SDK Reference
2
2
 
3
- Complete reference for working with Wix Data collections.
4
-
5
3
  ## Installation
6
4
 
7
- **IMPORTANT**: The `@wix/data` package must be installed as a dependency before use.
8
-
9
- ```bash
10
- npm install @wix/data
11
- ```
12
-
13
- ### Troubleshooting
14
-
15
- **If you encounter: `Cannot find module '@wix/data'`**
5
+ `@wix/data` must be a dependency before use: `npm install @wix/data`.
16
6
 
17
- ❌ **WRONG**: Do not create mock implementations or workarounds
18
- ✅ **CORRECT**: Install the package using `npm install @wix/data`
19
-
20
- The `@wix/data` package is a real npm package that provides access to Wix Data collections.
21
- It must be installed before TypeScript compilation will succeed.
7
+ `Cannot find module '@wix/data'` means it is not installed. Install it — never mock it.
22
8
 
23
9
  ## SDK Methods & Interfaces
24
10
 
25
- | Method Call | Import | TypeScript Signature | Description |
26
- | --- | --- | --- | --- |
27
- | `items.get()` | `import { items } from '@wix/data'` | `(collectionId: string, itemId: string, options?: WixDataGetOptions) => Promise<WixDataItem \| null>` | Get a single item by ID |
28
- | `items.query()` | `import { items } from '@wix/data'` | `(collectionId: string) => WixDataQuery` | Build a chainable query (call `.find()` to execute) |
29
- | `items.insert()` | `import { items } from '@wix/data'` | `(collectionId: string, item: Partial<WixDataItem>, options?: WixDataInsertOptions) => Promise<WixDataItem>` | Add a new item to a collection |
30
- | `items.update()` | `import { items } from '@wix/data'` | `(collectionId: string, item: WixDataItem, options?: WixDataUpdateOptions) => Promise<WixDataItem>` | Replace an existing item (item MUST include `_id`) |
31
- | `items.save()` | `import { items } from '@wix/data'` | `(collectionId: string, item: Partial<WixDataItem>, options?: WixDataSaveOptions) => Promise<WixDataItem>` | Insert or update (upsert) based on `_id` |
32
- | `items.remove()` | `import { items } from '@wix/data'` | `(collectionId: string, itemId: string, options?: WixDataRemoveOptions) => Promise<WixDataItem \| null>` | Remove an item by ID |
33
- | `items.bulkInsert()` | `import { items } from '@wix/data'` | `(collectionId: string, items: Partial<WixDataItem>[], options?: WixDataOptions) => Promise<WixDataBulkResult>` | Insert multiple items (max 1000) |
34
- | `items.bulkUpdate()` | `import { items } from '@wix/data'` | `(collectionId: string, items: WixDataItem[], options?: WixDataBulkUpdateOptions) => Promise<WixDataBulkResult>` | Update multiple items (max 1000) |
35
- | `items.bulkRemove()` | `import { items } from '@wix/data'` | `(collectionId: string, itemIds: string[], options?: WixDataBulkRemoveOptions) => Promise<WixDataBulkResult>` | Remove multiple items (max 1000) |
36
- | `items.filter()` | `import { items } from '@wix/data'` | `() => WixDataFilter` | Create a standalone filter (for use with `.or()`, `.and()`, `.not()`) |
11
+ All of these come from `import { items } from '@wix/data'`.
12
+
13
+ | Method Call | TypeScript Signature | Description |
14
+ | --- | --- | --- |
15
+ | `items.get()` | `(collectionId: string, itemId: string, options?: WixDataGetOptions) => Promise<WixDataItem \| null>` | Get a single item by ID |
16
+ | `items.query()` | `(collectionId: string) => WixDataQuery` | Build a chainable query (call `.find()` to execute) |
17
+ | `items.insert()` | `(collectionId: string, item: Partial<WixDataItem>, options?: WixDataInsertOptions) => Promise<WixDataItem>` | Add a new item to a collection |
18
+ | `items.update()` | `(collectionId: string, item: WixDataItem, options?: WixDataUpdateOptions) => Promise<WixDataItem>` | Replace an existing item (item MUST include `_id`) |
19
+ | `items.save()` | `(collectionId: string, item: Partial<WixDataItem>, options?: WixDataSaveOptions) => Promise<WixDataItem>` | Insert or update (upsert) based on `_id` |
20
+ | `items.remove()` | `(collectionId: string, itemId: string, options?: WixDataRemoveOptions) => Promise<WixDataItem \| null>` | Remove an item by ID |
21
+ | `items.bulkInsert()` | `(collectionId: string, items: Partial<WixDataItem>[], options?: WixDataOptions) => Promise<WixDataBulkResult>` | Insert multiple items (max 1000) |
22
+ | `items.bulkUpdate()` | `(collectionId: string, items: WixDataItem[], options?: WixDataBulkUpdateOptions) => Promise<WixDataBulkResult>` | Update multiple items (max 1000) |
23
+ | `items.bulkRemove()` | `(collectionId: string, itemIds: string[], options?: WixDataBulkRemoveOptions) => Promise<WixDataBulkResult>` | Remove multiple items (max 1000) |
24
+ | `items.filter()` | `() => WixDataFilter` | Create a standalone filter (for use with `.or()`, `.and()`, `.not()`) |
37
25
 
38
26
  ## ⚠️ Common Wrong Method Names (DO NOT USE)
39
27
 
@@ -67,8 +55,8 @@ interface WixDataItem {
67
55
  ```ts
68
56
  interface WixDataResult {
69
57
  readonly items: WixDataItem[];
70
- readonly totalCount: number | undefined; // only when returnTotalCount: true
71
- readonly totalPages: number | undefined; // only when returnTotalCount: true
58
+ readonly totalCount: number | undefined; // both only when returnTotalCount: true
59
+ readonly totalPages: number | undefined;
72
60
  readonly pageSize: number | undefined;
73
61
  readonly currentPage: number | undefined;
74
62
  readonly length: number;
@@ -81,7 +69,7 @@ interface WixDataResult {
81
69
 
82
70
  ### WixDataQuery (returned by `items.query()`)
83
71
 
84
- Chainable query builder. Build filters, then call `.find()`, `.count()`, or `.distinct()`.
72
+ Chainable. Build filters, then `.find()`, `.count()` or `.distinct()`.
85
73
 
86
74
  ```ts
87
75
  interface WixDataQuery {
@@ -149,25 +137,9 @@ interface WixDataGetOptions extends WixDataReadOptions {
149
137
  includeFieldGroups?: string[];
150
138
  }
151
139
 
152
- interface WixDataInsertOptions extends WixDataOptions {}
153
-
154
- interface WixDataUpdateOptions extends WixDataOptions {
155
- condition?: WixDataFilter; // only update if condition is met
156
- }
157
-
158
- interface WixDataSaveOptions extends WixDataOptions {}
159
-
160
- interface WixDataRemoveOptions extends WixDataOptions {
161
- condition?: WixDataFilter; // only remove if condition is met
162
- }
163
-
164
- interface WixDataBulkUpdateOptions extends WixDataOptions {
165
- condition?: WixDataFilter;
166
- }
167
-
168
- interface WixDataBulkRemoveOptions extends WixDataOptions {
169
- condition?: WixDataFilter;
170
- }
140
+ // Insert/Save options add nothing to WixDataOptions.
141
+ // Update/Remove/BulkUpdate/BulkRemove options add an optional guard:
142
+ // condition?: WixDataFilter — only apply when the condition is met
171
143
  ```
172
144
 
173
145
  ### WixDataBulkResult (returned by bulk operations)
@@ -184,12 +156,8 @@ interface WixDataBulkResult {
184
156
  removedItemIds: string[];
185
157
  }
186
158
 
187
- interface WixDataBulkError extends Error {
188
- message: string;
189
- code: string;
190
- originalIndex: number; // index in the request array
191
- item: WixDataItem | string; // the failed item or ID
192
- }
159
+ // WixDataBulkError extends Error with `code`, `originalIndex` (position in the
160
+ // request array) and `item` (the failed item or its id).
193
161
  ```
194
162
 
195
163
  ## Usage Examples
@@ -211,12 +179,18 @@ const result = await items.query("MyCollection")
211
179
  // result.items: WixDataItem[]
212
180
 
213
181
  // --- Compound query with or/and ---
214
- const filter1 = items.filter().eq("status", "pending");
215
- const filter2 = items.filter().eq("status", "active");
216
- const result = await items.query("MyCollection")
217
- .or(filter1)
218
- .or(filter2)
219
- .find();
182
+ // `or()` COMBINES two filters; it is not a condition. Called on a query or
183
+ // filter that holds no condition yet, it contributes an empty `{}` branch, and
184
+ // `{} OR x` matches the whole collection. Seed with the first condition, `or()`
185
+ // the rest onto it, then `and()` the result onto the query.
186
+ const pendingOrActive = items.filter().eq("status", "pending")
187
+ .or(items.filter().eq("status", "active"));
188
+ const result = await items.query("MyCollection").and(pendingOrActive).find();
189
+
190
+ // ❌ WRONG — or() onto a query holding no condition: matches every row
191
+ items.query("MyCollection").or(filter1).or(filter2);
192
+ // ❌ WRONG — or() onto the query itself: `country` is dropped from branch two
193
+ items.query("MyCollection").eq("country", "IL").contains("name", t).or(filter2);
220
194
 
221
195
  // --- Insert ---
222
196
  const created = await items.insert("MyCollection", {
@@ -249,10 +223,8 @@ const bulkResult = await items.bulkInsert("MyCollection", [
249
223
 
250
224
  ## Collection Schema Rules
251
225
 
252
- - Always use the exact field keys defined in your collection schema
253
- - Use the collection ID exactly as defined in the schema
254
- - Use the schema's exact field types for all operations
255
- - Custom fields are stored in the `[key: string]: any` part of `WixDataItem`
226
+ Use the collection id, field keys and field types exactly as the schema defines them. Custom fields
227
+ live in the `[key: string]: any` part of `WixDataItem`.
256
228
 
257
229
  ## Permissions
258
230