@wix/agent-skills 1.19.2 → 1.20.1

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 (215) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/references/SERVICE_PLUGIN.md +14 -1
  3. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +7 -6
  4. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +4 -0
  5. package/skills/wix-app/references/service-plugin/AVAILABILITY-TIME-SLOTS-CONFIGURATION.md +118 -0
  6. package/skills/wix-app/references/service-plugin/BOOKING-POLICY.md +65 -0
  7. package/skills/wix-app/references/service-plugin/BOOKINGS-PRICING.md +71 -0
  8. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +11 -3
  9. package/skills/wix-app/references/service-plugin/BOOKINGS-VALIDATION.md +137 -0
  10. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +23 -16
  11. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
  12. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +4 -2
  13. package/skills/wix-app/references/service-plugin/REALTIME-PERMISSIONS.md +45 -0
  14. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +15 -0
  15. package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +4 -0
  16. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +4 -0
  17. package/skills/wix-headless/references/CAPABILITIES.md +2 -2
  18. package/skills/wix-headless/references/inline-recipes/experience-store.md +4 -3
  19. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +98 -18
  20. package/skills/wix-headless/references/managed/DEPLOYMENT.md +8 -8
  21. package/skills/wix-headless-fast/SKILL.md +200 -34
  22. package/skills/wix-headless-fast/entry/skill.md +10 -2
  23. package/skills/wix-headless-fast/install/attach.mjs +253 -0
  24. package/skills/wix-headless-fast/install/deploy.mjs +109 -9
  25. package/skills/wix-headless-fast/install/fast-path.mjs +28 -31
  26. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +224 -60
  27. package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +2 -3
  28. package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +2 -3
  29. package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +24 -116
  30. package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +16 -64
  31. package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +137 -0
  32. package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +78 -0
  33. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +117 -0
  34. package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +13 -60
  35. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +47 -0
  36. package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +10 -28
  37. package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +2 -4
  38. package/skills/wix-headless-fast/references/blog/rest/posts.ts +42 -0
  39. package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +62 -0
  40. package/skills/wix-headless-fast/references/blog/seed/SEED.md +9 -0
  41. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +179 -33
  42. package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +2 -1
  43. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +26 -132
  44. package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +18 -49
  45. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +218 -0
  46. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +169 -0
  47. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +57 -142
  48. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +92 -0
  49. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +90 -0
  50. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +22 -61
  51. package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +3 -1
  52. package/skills/wix-headless-fast/references/bookings/rest/booking.ts +113 -0
  53. package/skills/wix-headless-fast/references/bookings/rest/services.ts +55 -0
  54. package/skills/wix-headless-fast/references/bookings/seed/SEED.md +10 -0
  55. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +236 -62
  56. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +19 -52
  57. package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +16 -36
  58. package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +158 -0
  59. package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +93 -0
  60. package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +177 -0
  61. package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +13 -41
  62. package/skills/wix-headless-fast/references/cms/rest/items.ts +125 -0
  63. package/skills/wix-headless-fast/references/cms/seed/SEED.md +9 -0
  64. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +239 -83
  65. package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +1 -1
  66. package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +7 -5
  67. package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +2 -2
  68. package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +28 -110
  69. package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +19 -54
  70. package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +130 -0
  71. package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +97 -0
  72. package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +13 -94
  73. package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +113 -0
  74. package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +156 -0
  75. package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +38 -69
  76. package/skills/wix-headless-fast/references/events/rest/events.ts +57 -0
  77. package/skills/wix-headless-fast/references/events/rest/registration.ts +83 -0
  78. package/skills/wix-headless-fast/references/events/seed/SEED.md +9 -0
  79. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +214 -26
  80. package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +35 -267
  81. package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +332 -0
  82. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +238 -0
  83. package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +28 -243
  84. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +216 -0
  85. package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +32 -204
  86. package/skills/wix-headless-fast/references/forms/rest/forms.ts +34 -0
  87. package/skills/wix-headless-fast/references/forms/rest/submissions.ts +56 -0
  88. package/skills/wix-headless-fast/references/forms/seed/SEED.md +8 -0
  89. package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +15 -8
  90. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +314 -63
  91. package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +1 -1
  92. package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +105 -0
  93. package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +36 -65
  94. package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +1 -1
  95. package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +43 -0
  96. package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +11 -32
  97. package/skills/wix-headless-fast/references/members/rest/auth.ts +215 -0
  98. package/skills/wix-headless-fast/references/members/rest/members.ts +26 -0
  99. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +238 -59
  100. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +2 -2
  101. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +2 -2
  102. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +35 -0
  103. package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +8 -38
  104. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +23 -50
  105. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +16 -34
  106. package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +22 -49
  107. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +82 -0
  108. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +58 -0
  109. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +177 -0
  110. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +31 -118
  111. package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +81 -0
  112. package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +75 -0
  113. package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +8 -0
  114. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +212 -51
  115. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +9 -20
  116. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +7 -32
  117. package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +41 -0
  118. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +12 -33
  119. package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +17 -34
  120. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +54 -0
  121. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +106 -0
  122. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +64 -0
  123. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +7 -55
  124. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +43 -0
  125. package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +11 -34
  126. package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +31 -0
  127. package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +20 -0
  128. package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +8 -0
  129. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +240 -47
  130. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +2 -2
  131. package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +2 -2
  132. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +14 -35
  133. package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +28 -171
  134. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +155 -0
  135. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +89 -0
  136. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +23 -117
  137. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +124 -0
  138. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +45 -114
  139. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +193 -0
  140. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +94 -0
  141. package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +15 -87
  142. package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +60 -0
  143. package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +169 -0
  144. package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +68 -0
  145. package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +8 -0
  146. package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +23 -0
  147. package/skills/wix-headless-fast/references/shared/app/wix/media.ts +55 -1
  148. package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +13 -0
  149. package/skills/wix-headless-fast/references/shared/rest/client.ts +155 -0
  150. package/skills/wix-headless-fast/references/shared/rest/config.ts +3 -0
  151. package/skills/wix-headless-fast/references/shared/rest/media.ts +65 -0
  152. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +371 -81
  153. package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +37 -3
  154. package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +266 -0
  155. package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +95 -0
  156. package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +136 -0
  157. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +29 -130
  158. package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +26 -182
  159. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +121 -0
  160. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +53 -136
  161. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +309 -0
  162. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +73 -230
  163. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +147 -0
  164. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +289 -0
  165. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +62 -4
  166. package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +21 -2
  167. package/skills/wix-headless-fast/references/storefront/rest/cart.ts +132 -0
  168. package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +123 -0
  169. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +25 -5
  170. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +24 -0
  171. package/skills/wix-manage/SKILL.md +4 -1
  172. package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
  173. package/skills/wix-manage/references/events/create-wix-event.md +46 -0
  174. package/skills/wix-manage/references/events/manage-wix-events.md +51 -1
  175. package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +6 -6
  176. package/skills/wix-manage/references/seo/manage-seo-suggestions.md +351 -0
  177. package/skills/wix-vibe-headless/install/deploy.cjs +33 -2
  178. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +1 -1
  179. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -4
  180. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
  181. package/skills/wix-vibe-headless/platforms/base44.md +19 -4
  182. package/skills/wix-vibe-headless/platforms/generic.md +6 -0
  183. package/skills/wix-vibe-headless/references/_shared/nav/nav.tanstack.js +30 -0
  184. package/skills/wix-vibe-headless/references/_shared/routing.md +86 -0
  185. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +44 -0
  186. package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +1 -1
  187. package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +1 -1
  188. package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +1 -1
  189. package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +1 -1
  190. package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +1 -1
  191. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +42 -0
  192. package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +1 -1
  193. package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +1 -1
  194. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +42 -0
  195. package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +1 -1
  196. package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +1 -1
  197. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +42 -0
  198. package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +1 -1
  199. package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +1 -1
  200. package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +1 -1
  201. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +43 -0
  202. package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +1 -1
  203. package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +1 -1
  204. package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +1 -1
  205. package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +1 -1
  206. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +43 -0
  207. package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +1 -1
  208. package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +1 -1
  209. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +36 -0
  210. package/skills/wix-vibe-headless/references/shared/app/lib/nav.js +9 -0
  211. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +42 -41
  212. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +7 -1
  213. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +3 -0
  214. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs +6 -0
  215. package/skills/wix-headless-fast/install/pin-agents-md.mjs +0 -57
@@ -0,0 +1,123 @@
1
+ // Catalog reads over REST — the twin of app/wix/storefront/catalog.ts. Same exports, same DTOs; the
2
+ // rules and mappers come from catalog-core (the SAME file the SDK transport uses, deployed flat next
3
+ // to this one by deploy.mjs --stack static), so this file is only the transport: one fetch with a
4
+ // literal body per function. Every call here is safe from a
5
+ // browser with a visitor token. Porting: keep the paths, keep the bodies, port the core once.
6
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/search-products.md
7
+ // docs: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/get-category-by-slug.md
8
+ import { WixApiError, wixRequest } from "./client.js";
9
+ import { imgSrc, mediaKey } from "./media.js";
10
+ import {
11
+ CATALOG_SORTS,
12
+ DETAIL_FIELDS,
13
+ LIST_FIELDS,
14
+ catalogFilter,
15
+ resolveVariant,
16
+ searchQuery,
17
+ sellingPrice,
18
+ toCategory,
19
+ toDetail,
20
+ toFacetData,
21
+ toSummary,
22
+ type CatalogSearchOptions,
23
+ type CatalogSort,
24
+ type Raw,
25
+ } from "./catalog-core.js";
26
+ import type { Category, FacetData, ProductDetail, ProductSummary } from "./types.js";
27
+
28
+ export { CATALOG_SORTS, resolveVariant, sellingPrice, type CatalogSearchOptions, type CatalogSort };
29
+
30
+ const STORES_TREE = { appNamespace: "@wix/stores", treeKey: null };
31
+ const notFound = (e: unknown): boolean => e instanceof WixApiError && e.status === 404;
32
+
33
+ /**
34
+ * The gallery query: sort, filter, facets, search, and cursor paging, all applied by Wix across the
35
+ * whole catalog — never on a page already in hand. `total` is issued with the first page only.
36
+ * POST /stores/v3/products/search { fields, search: { filter, sort, search, cursorPaging } }
37
+ */
38
+ export async function searchCatalog(o: CatalogSearchOptions = {}): Promise<{ products: ProductSummary[]; nextCursor: string | null; total: number | null }> {
39
+ const search = searchQuery(o);
40
+ const res = await wixRequest<Raw>("/stores/v3/products/search", { body: { fields: LIST_FIELDS, search } });
41
+ let total: number | null = null;
42
+ if (!o.cursor) {
43
+ try {
44
+ const c = await wixRequest<Raw>("/stores/v3/products/count", { body: { filter: search.filter } });
45
+ total = typeof c?.count === "number" ? c.count : null;
46
+ } catch {
47
+ /* the count is a nicety — the page is still valid */
48
+ }
49
+ }
50
+ return {
51
+ products: ((res?.products ?? []) as Raw[]).map((p) => toSummary(p, imgSrc, mediaKey)),
52
+ nextCursor: res?.pagingMetadata?.cursors?.next ?? null,
53
+ total,
54
+ };
55
+ }
56
+
57
+ /** Facets and price bounds of a scope from one 100-product read. Non-fatal: empty on failure. */
58
+ export async function fetchFacetData({ categoryId }: { categoryId?: string | null } = {}): Promise<FacetData> {
59
+ try {
60
+ const res = await wixRequest<Raw>("/stores/v3/products/search", {
61
+ body: { fields: ["CURRENCY"], search: { filter: catalogFilter({ categoryId }), cursorPaging: { limit: 100 } } },
62
+ });
63
+ return toFacetData((res?.products ?? []) as Raw[]);
64
+ } catch {
65
+ return { facets: [], priceRange: null };
66
+ }
67
+ }
68
+
69
+ export async function fetchProducts({ limit = 24 } = {}): Promise<ProductSummary[]> {
70
+ return (await searchCatalog({ limit })).products;
71
+ }
72
+
73
+ export async function fetchProductsByCategory(categoryId: string, { limit = 24 } = {}): Promise<ProductSummary[]> {
74
+ return (await searchCatalog({ limit, categoryId })).products;
75
+ }
76
+
77
+ /**
78
+ * One complete product for the PDP; null when the slug doesn't resolve — a real 404, never a
79
+ * fallback to another product. GET /stores/v3/products/slug/{slug}?fields=…&fields=…
80
+ */
81
+ export async function fetchProductBySlug(slug: string): Promise<ProductDetail | null> {
82
+ try {
83
+ const res = await wixRequest<Raw>(`/stores/v3/products/slug/${encodeURIComponent(slug)}`, { method: "GET", query: { fields: DETAIL_FIELDS } });
84
+ return res?.product ? toDetail(res.product, imgSrc, mediaKey) : null;
85
+ } catch (e) {
86
+ if (notFound(e)) return null;
87
+ throw e;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * The live category tree for navigation — never a seeded list. The filter must be non-empty;
93
+ * `visible` is not filterable (dropped client-side); the auto-created "all-products" system
94
+ * category is skipped. Non-fatal: [] on failure. POST /categories/v1/categories/query
95
+ */
96
+ export async function fetchCategories(): Promise<Category[]> {
97
+ try {
98
+ const res = await wixRequest<Raw>("/categories/v1/categories/query", {
99
+ body: { treeReference: STORES_TREE, query: { filter: { name: { $exists: true } }, cursorPaging: { limit: 100 } } },
100
+ });
101
+ return ((res?.categories ?? []) as Raw[]).filter((c) => c.visible !== false && c.slug !== "all-products").map(toCategory);
102
+ } catch {
103
+ return [];
104
+ }
105
+ }
106
+
107
+ /**
108
+ * One category by URL slug (its id feeds searchCatalog). The response is WRAPPED: { category }.
109
+ * null when missing or hidden → a real 404. GET /categories/v1/categories/slug/{slug}
110
+ */
111
+ export async function fetchCategoryBySlug(slug: string): Promise<Category | null> {
112
+ try {
113
+ const res = await wixRequest<Raw>(`/categories/v1/categories/slug/${encodeURIComponent(slug)}`, {
114
+ method: "GET",
115
+ query: { "treeReference.appNamespace": "@wix/stores" },
116
+ });
117
+ const raw: Raw | undefined = res?.category;
118
+ return raw && raw.visible !== false ? toCategory(raw) : null;
119
+ } catch (e) {
120
+ if (notFound(e)) return null;
121
+ throw e;
122
+ }
123
+ }
@@ -15,6 +15,10 @@ not a store product.
15
15
  node <SKILL_ROOT>/references/storefront/seed/seed-store.mjs plan.json
16
16
  ```
17
17
 
18
+ Run this way, the result is the process itself: exit code `0` and the JSON on stdout (redirect it
19
+ to a file if you want it later). `.seed-exit` and `seed-result.json` are written by
20
+ `install/fast-path.mjs` when IT starts the seed — don't wait for them after a manual run.
21
+
18
22
  `plan.json` is plain data — write it from the brief:
19
23
 
20
24
  ```json
@@ -69,13 +73,29 @@ node <SKILL_ROOT>/references/storefront/seed/seed-store.mjs plan.json
69
73
  For a few seconds afterwards product reads can still report the old currency; that lag is
70
74
  expected and self-resolves, so don't re-verify it or retry.
71
75
 
72
- **Default to 3 products** unless the brief asks for a specific catalog — the seed shows the
73
- shape, not a full inventory; the owner adds the rest in the dashboard. **Make those 3 exercise
74
- the shipped UI**: give at least one product a color option and put one product on sale —
75
- truthfully to the business (a ceramics studio has glaze colors; a bakery doesn't).
76
+ **Default to 3 products** when you draft the catalog yourself — the seed shows the shape, not a
77
+ full inventory; the owner adds the rest in the dashboard. **Make those 3 exercise the shipped
78
+ UI**: give at least one product a color option and put one product on sale — truthfully to the
79
+ business (a ceramics studio has glaze colors; a bakery doesn't).
80
+
81
+ ## Supplied content
82
+
83
+ The general rules are in `references/shared/SUPPLIED-CONTENT.md`. For a store, each product the user
84
+ lists is one entry, whatever form the list arrives in. Its name, description and price become
85
+ `name`, `description` and `price`. A "was", "regular" or "compare at" price becomes `compareAtPrice`
86
+ when it is higher than the price. A stock count becomes `quantity`; "unlimited" or "made to order"
87
+ becomes `"inStock": true`. A category, collection or type becomes an entry in `categories`. A set of
88
+ choices the buyer picks from ("Small / Large", "S, M, L") becomes one `options` entry named after
89
+ what it is (Size, Flavor), `type: "text"`; use `type: "color"` only when the source gives color codes.
90
+ Their image becomes `imageUrl`. If a product has a separate price per size, seed it once at the
91
+ lowest price and tell the user the per-variant prices are set in the dashboard. If a product has no
92
+ price, ask; never invent one. Ribbons ("New", "Best Seller") and SKU codes are not seeded — say so.
76
93
 
77
94
  **Seeding is additive — never delete or overwrite existing content.** No cleanup, no removing
78
- "sample" data, no resets. If a cleanup genuinely seems needed, ask the user first.
95
+ "sample" data, no resets — not even on a site created a minute ago. The Stores install adds its
96
+ own sample products to a new catalog; they stay, and the owner removes them in the dashboard
97
+ (the Manage products link is in your summary). If a cleanup genuinely seems needed, ask the user
98
+ first. Categories are idempotent by name — a re-run reuses "Donuts" instead of creating a second one.
79
99
 
80
100
  **A bulk create can partially succeed.** The result carries `failures: [{ name, error }]` next
81
101
  to `products` — read it. A non-empty `failures` means those products are genuinely absent, not
@@ -331,11 +331,34 @@ async function stockOptionlessProducts(ctx, created) {
331
331
  }
332
332
  }
333
333
 
334
+ // Existing categories by name (for idempotent reruns) — a re-run of the seed must reuse
335
+ // "Donuts", not create a second one. Empty map on any failure (falls back to create).
336
+ export async function queryCategoriesByNames(ctx, names) {
337
+ const out = new Map();
338
+ if (!names.length) return out;
339
+ try {
340
+ const r = await req(ctx, "/categories/v1/categories/query", {
341
+ body: { treeReference: { appNamespace: "@wix/stores", treeKey: null }, query: { cursorPaging: { limit: 100 } } },
342
+ });
343
+ const wanted = new Set(names);
344
+ for (const c of r.categories ?? []) if (wanted.has(c.name) && !out.has(c.name)) out.set(c.name, c.id);
345
+ } catch (e) {
346
+ console.error(`category name pre-check failed (creating everything): ${String(e.message).slice(0, 120)}`);
347
+ }
348
+ return out;
349
+ }
350
+
334
351
  // Categories share the @wix/stores tree revision — concurrent creates 409, so: sequential.
352
+ // Idempotent by name: a name that already exists is reused, never duplicated.
335
353
  // docs: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/create-category.md
336
354
  export async function createCategories(ctx, names) {
355
+ const existing = await queryCategoriesByNames(ctx, names);
337
356
  const out = [];
338
357
  for (const name of names) {
358
+ if (existing.has(name)) {
359
+ out.push({ id: existing.get(name), name });
360
+ continue;
361
+ }
339
362
  const r = await req(ctx, "/categories/v1/categories", {
340
363
  body: { category: { name, visible: true }, treeReference: { appNamespace: "@wix/stores", treeKey: null } },
341
364
  });
@@ -344,6 +367,7 @@ export async function createCategories(ctx, names) {
344
367
  return out;
345
368
  }
346
369
 
370
+
347
371
  // docs: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/bulk-add-items-to-category.md
348
372
  export async function addProductsToCategories(ctx, mapping) {
349
373
  for (const [categoryId, productIds] of Object.entries(mapping)) {
@@ -48,6 +48,9 @@ Generate an SEO content plan and read its blog post topics, or troubleshoot an e
48
48
  ### [Manage Google Search Console for a Wix Site](references/seo/manage-google-search-console.md)
49
49
  "Connect a Wix site to Google Search Console and drive its setup through the public GSC Connection and Site Readiness APIs: check connection and readiness, start the Google authorization, verify ownership, add the property, submit the sitemap, request indexing, read search performance, run URL inspection, recover a stale connection, or disconnect. The site owner authorizes in their own browser via a single-use connect URL."
50
50
 
51
+ ### [Generate AI SEO Suggestions for a Wix Site](references/seo/manage-seo-suggestions.md)
52
+ "Generate AI-written SEO text for a Wix site through the public Tag Suggestions and Page Optimization APIs: title tag and meta description options for a page, alt text for the images of a page, store product, or blog post (one image or up to 20 per call), corrected heading levels for a page's headings, and a whole-page rewrite of title, description, headings, and body text aimed at the page's focus keyword, returned as before/after pairs. Use it when the user wants to improve, optimize, audit, or write the SEO text of a page or the homepage. Suggestions are returned for review; applying one is a separate SEO tags write."
53
+
51
54
  ---
52
55
 
53
56
  ## Accessibility
@@ -251,7 +254,7 @@ Buy a domain through Wix or connect one the user already owns — intent, availa
251
254
  "Creates an event with the Wix Events V3 API — the required request body, ISO-8601 date and time settings, venue/online/TBD location, RSVP vs ticketed registration, guest capacity, short vs rich-text descriptions, ticket tiers and pricing, and recurring series. Covers the exact field shapes and the API's misleading validation messages. Use when the user wants to create an event, set its date, location, description, guest limit or ticket prices, or set up a repeating event."
252
255
 
253
256
  ### [Manage Wix Events — Publishing, Cancelling, Cloning and Counting](references/events/manage-wix-events.md)
254
- "Operates on events that already exist with the Wix Events V3 API — publishing a draft, cancelling, deleting, cloning, updating an event's date or details, and counting events. Use when the user wants to publish or cancel an event, duplicate one, move an event's date, or count their events. Creating an event, its tickets or a recurring series is a separate recipe."
257
+ "Operates on events that already exist with the Wix Events V3 API — finding an event by title, publishing a draft, cancelling, deleting (one or by filter), cloning, updating an event's date or details, and counting events. Use when the user wants to find, publish or cancel an event, duplicate one, move an event's date, delete events in bulk, or count their events. Creating an event, its tickets or a recurring series is a separate recipe."
255
258
 
256
259
  ---
257
260
 
@@ -29,7 +29,7 @@ Set up and tune how a store ships — what rates to charge, which regions are co
29
29
 
30
30
  > - [Set up shipping rates / rules](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-set-up-rates) — tags: `[intent:setup-rates]` · priority 0
31
31
  > - [Set up delivery regions / coverage](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-set-up-regions) — tags: `[intent:setup-regions]` · priority 0
32
- > - [Set up store pickup / local delivery](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/local-delivery) — tags: `[intent:setup-pickup]` · priority 0
32
+ > - [Set up store pickup / local delivery](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-set-up-pickup-local-delivery) — tags: `[intent:setup-pickup]` · priority 0
33
33
  > - [Add free shipping over $X](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/shipping-add-free-shipping) — tags: `[intent:free-shipping]` · priority 0
34
34
 
35
35
  ### Optimize & fix
@@ -56,6 +56,32 @@ curl -X POST 'https://www.wixapis.com/events/v3/events' \
56
56
  `title`, `location`, `dateAndTimeSettings` and `registration.initialType` are required. The event
57
57
  is created published (`status: "UPCOMING"`).
58
58
 
59
+ **What comes back** — the created event under `event`; the id you need for every follow-up call is
60
+ `event.id`:
61
+
62
+ ```json
63
+ {
64
+ "event": {
65
+ "id": "<EVENT_ID>",
66
+ "title": "Summer Gala",
67
+ "slug": "summer-gala",
68
+ "status": "UPCOMING",
69
+ "location": { "name": "Grand Hall", "type": "VENUE", "locationTbd": false },
70
+ "dateAndTimeSettings": {
71
+ "startDate": "2026-09-15T19:00:00Z", "endDate": "2026-09-15T22:00:00Z",
72
+ "timeZoneId": "America/New_York", "recurrenceStatus": "ONE_TIME"
73
+ },
74
+ "createdDate": "...", "updatedDate": "..."
75
+ }
76
+ }
77
+ ```
78
+
79
+ Update, cancel, publish and clone return the same `{ "event": { ... } }`; delete returns
80
+ `{ "eventId": "..." }`. Some fields are returned only when the request's `fields` array asks for
81
+ them: `"DETAILS"` adds `shortDescription`, `"TEXTS"` adds `description`, `"REGISTRATION"` adds
82
+ `registration` (including `rsvp.limit`), `"URLS"` adds `eventPageUrl`. Without `fields`, read the
83
+ result from the top-level fields above and do not treat a missing `registration` as an error.
84
+
59
85
  > **Do not add `"draft": true` unless the user asked for a draft.** Draft events require the
60
86
  > `WIX_EVENTS.READ_DRAFT_EVENTS` permission, and without it every follow-up call fails `403` —
61
87
  > adding ticket definitions, querying the event, fetching it by slug, even publishing it. The
@@ -154,6 +180,26 @@ curl -X POST 'https://www.wixapis.com/events/v3/ticket-definitions' \
154
180
  | Free | `{ "fixedPrice": { "value": "0", "currency": "USD" } }` |
155
181
  | Donation, with a minimum | `{ "guestPrice": { "value": "5.00", "currency": "USD" } }` |
156
182
 
183
+ The response is the definition under `ticketDefinition`:
184
+
185
+ ```json
186
+ {
187
+ "ticketDefinition": {
188
+ "id": "<TICKET_DEFINITION_ID>",
189
+ "eventId": "<EVENT_ID>",
190
+ "revision": "1",
191
+ "name": "General Admission",
192
+ "limited": true, "initialLimit": 100, "actualLimit": 100,
193
+ "pricingMethod": { "fixedPrice": { "value": "25.00", "currency": "USD" } },
194
+ "feeType": "FEE_ADDED_AT_CHECKOUT",
195
+ "saleStatus": "SALE_STARTED"
196
+ }
197
+ }
198
+ ```
199
+
200
+ Keep `revision` — `PATCH /events/v3/ticket-definitions/{id}` requires the current value, and it
201
+ increments on every update.
202
+
157
203
  - **`feeType` is required** — `FEE_ADDED_AT_CHECKOUT` or `FEE_INCLUDED`.
158
204
  - **`value` is a string.** `"value": 10` fails `400 Unexpected value for field value`.
159
205
  - **No writable `free` flag** — `pricingMethod.free` is read-only; a free ticket is a `fixedPrice`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Manage Wix Events — Publishing, Cancelling, Cloning and Counting"
3
- description: "Operates on events that already exist with the Wix Events V3 API — publishing a draft, cancelling, deleting, cloning, updating an event's date or details, and counting events. Use when the user wants to publish or cancel an event, duplicate one, move an event's date, or count their events. Creating an event, its tickets or a recurring series is a separate recipe."
3
+ description: "Operates on events that already exist with the Wix Events V3 API — finding an event by title, publishing a draft, cancelling, deleting (one or by filter), cloning, updating an event's date or details, and counting events. Use when the user wants to find, publish or cancel an event, duplicate one, move an event's date, delete events in bulk, or count their events. Creating an event, its tickets or a recurring series is a separate recipe."
4
4
  ---
5
5
 
6
6
  # Manage Wix Events — Publishing, Cancelling, Cloning and Counting
@@ -28,6 +28,36 @@ curl -X POST 'https://www.wixapis.com/apps-installer-service/v1/app-instance/ins
28
28
  `appDefId` nests under `appInstance`, not at the root — at the root it fails with
29
29
  `400 appInstance must not be empty`. See [Install Wix Apps](../app-installation/install-wix-apps.md).
30
30
 
31
+ ## Find an event
32
+
33
+ Every action below takes an `eventId`. When the user names the event instead, look it up with
34
+ `POST /events/v3/events/query` — `title` supports `$eq` and, for several names at once, `$in`; there is
35
+ no contains match:
36
+
37
+ ```bash
38
+ curl -X POST 'https://www.wixapis.com/events/v3/events/query' \
39
+ -H 'Content-Type: application/json' \
40
+ -H 'Authorization: <AUTH>' \
41
+ --data-binary '{
42
+ "query": {
43
+ "filter": { "title": { "$eq": "Open House" } },
44
+ "paging": { "limit": 100 }
45
+ },
46
+ "fields": ["DETAILS"],
47
+ "includeDrafts": false
48
+ }'
49
+ ```
50
+
51
+ `filter` and `paging` are siblings under `query`; `paging` nested inside `filter` fails `400`. Matches
52
+ come back in `events[]` with the id at `events[].id`, and `pagingMetadata.total` is the count.
53
+
54
+ > **Keep `includeDrafts: false` unless the user is asking about draft events.** Setting it to `true`
55
+ > needs `WIX_EVENTS.READ_DRAFT_EVENTS`, and a caller without it gets
56
+ > `403 Requires WIX_EVENTS.READ_DRAFT_EVENTS permission` rather than more results — so do not flip
57
+ > it as a precaution on an ordinary lookup, and do not probe for it and fall back. If the user does
58
+ > want drafts and the call returns that `403`, say draft events are not readable from this
59
+ > connection instead of answering from published events alone.
60
+
31
61
  ## Publish, cancel and delete
32
62
 
33
63
  | Action | Call | Resulting `status` |
@@ -35,10 +65,27 @@ curl -X POST 'https://www.wixapis.com/apps-installer-service/v1/app-instance/ins
35
65
  | Publish a draft | `POST /events/v3/events/{eventId}/publish` | `UPCOMING` |
36
66
  | Cancel | `POST /events/v3/events/{eventId}/cancel` | `CANCELED` |
37
67
  | Delete | `DELETE /events/v3/events/{eventId}` | — |
68
+ | Delete several | `POST /events/v3/bulk/events/delete-by-filter` | — |
38
69
 
39
70
  Publish and cancel take an empty body. Publishing is irreversible — a published event cannot
40
71
  return to `DRAFT`. Cancelling closes registration but keeps the event; deleting removes it.
41
72
 
73
+ Publish, cancel, clone and update all return `{ "event": { "id", "title", "slug", "status", ... } }`
74
+ — the same event object [Create an Event](create-wix-event.md#create-the-event) shows in full.
75
+ Delete returns `{ "eventId": "..." }` and the bulk delete below returns `{}`.
76
+
77
+ To delete a set of events in one call, `POST /events/v3/bulk/events/delete-by-filter`:
78
+
79
+ ```json
80
+ { "filter": { "filter": { "id": { "$in": ["<EVENT_ID>", "<EVENT_ID>"] } } } }
81
+ ```
82
+
83
+ The request's one field, `filter`, takes a whole query-shaped object — the same object Query Events
84
+ takes under `query`, with the conditions under its own `filter` key — not a bare condition map. That
85
+ is why the key appears twice: `filter.filter.<field>`. A single level,
86
+ `{ "filter": { "id": { "$in": [...] } } }`, is not the documented shape. Resolve the ids with the
87
+ query above first; one `DELETE` per event also works but costs a call each.
88
+
42
89
  > **Draft events need the `WIX_EVENTS.READ_DRAFT_EVENTS` permission.** Without it, publishing a
43
90
  > draft fails `403` — as does querying it, fetching it by slug, or adding ticket definitions to
44
91
  > it. If you hit that `403`, the event was still created; the way forward is to create events
@@ -104,6 +151,9 @@ even when the site has events, so it is not the way to answer "how many events d
104
151
  - **An invalid enum value reports as a missing one** — a value outside an enum returns
105
152
  `<field> value is required` rather than "invalid value". If a field you *did* send is reported
106
153
  as required, suspect the value, not its presence.
154
+ - **`includeDrafts` stays `false` unless the request is about drafts** — see
155
+ [Find an event](#find-an-event). The `WIX_EVENTS.READ_DRAFT_EVENTS` note on the Query Events
156
+ reference describes the permission; it does not mean the caller has it.
107
157
  - Dates are always ISO-8601 strings, never `{seconds, nanos}`, and `timeZoneId` is required
108
158
  whenever `dateAndTimeSettings` is sent — see [Create an Event](create-wix-event.md).
109
159
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: "Manage Campaign Lifecycle"
3
- description: "Manages existing Google Ads campaigns on a Wix site: list/get, launch (first activation) vs resume (reactivate after a pause), pause a running campaign — optionally with a scheduled auto-resume date — update name/budget/targeting, change the daily budget, delete permanently, and read status history / change log. Use when the user wants to 'pause my Google ad', 'resume my campaign', 'stop the campaign', 'change my daily budget', 'rename the campaign', 'delete this campaign', 'list my Google Ads campaigns', or 'why did my campaign status change'. Requires an existing Google Ads account and campaign. REST base https://www.wixapis.com/google-ads/v1."
3
+ description: "Manages existing Google Ads campaigns on a Wix site: list/get, launch (first activation) vs resume (reactivate after a pause), pause a running campaign — optionally with a scheduled auto-resume date — update name/budget/targeting, change the daily budget, delete permanently, and read status history / change log. Use when the user wants to 'pause my Google ad', 'resume my campaign', 'stop the campaign', 'change my daily budget', 'rename the campaign', 'delete this campaign', 'list my Google Ads campaigns', or 'why did my campaign status change'. Requires an existing Google Ads account and campaign. REST base https://www.wixapis.com/_serverless/pa-google/v1."
4
4
  ---
5
5
  # RECIPE: Manage Campaign Lifecycle
6
6
 
7
- Operate on campaigns that already exist. Base URL: `https://www.wixapis.com/google-ads/v1`; `<AUTH>` = `Authorization` header, and body calls also need `Content-Type: application/json`.
7
+ Operate on campaigns that already exist. Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`; `<AUTH>` = `Authorization` header, and body calls also need `Content-Type: application/json`.
8
8
 
9
9
  **Answer directly.** When the user asks *how* to do something, give the endpoint, an example request, and the key behavior right away — use `{campaignId}` as a placeholder rather than asking which campaign. Only pause to confirm when you are about to **execute** a launch, resume, or delete on the user's behalf (those spend money or are irreversible); explaining how never requires confirmation.
10
10
 
@@ -21,14 +21,14 @@ Operate on campaigns that already exist. Base URL: `https://www.wixapis.com/goog
21
21
 
22
22
  ```bash
23
23
  # Launch (first activation) → status LIVE
24
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}/launch' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
24
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}/launch' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
25
25
 
26
26
  # Pause a running campaign (settings + data preserved) → status PAUSED
27
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}/pause' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
27
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}/pause' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
28
28
  -d '{ "scheduledResumeDate": "2024-04-15T08:00:00.000Z" }'
29
29
 
30
30
  # Resume a paused campaign → status LIVE
31
- curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}/resume' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
31
+ curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}/resume' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
32
32
  ```
33
33
 
34
34
  - **Pause** stops delivery immediately without losing configuration. Optional body fields: `scheduledResumeDate` (ISO 8601 — the campaign **auto-resumes** at that time; pass `null` to cancel a scheduled resume), `resumeReminderDate` (dashboard reminder), `turnAutoRenewOff`. Send `{}` to pause with no auto-resume. To temporarily stop a campaign, **pause it — never delete**.
@@ -39,7 +39,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}/resum
39
39
  `PATCH /v1/campaigns/{id}` — send only the fields you're changing, plus the required `id` and `accountId`. Budget is in **micros** (`20000000` = $20.00/day).
40
40
 
41
41
  ```bash
42
- curl -X PATCH 'https://www.wixapis.com/google-ads/v1/campaigns/{campaignId}' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
42
+ curl -X PATCH 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}' -H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
43
43
  -d '{ "campaign": { "id": "...", "accountId": "...", "name": "New name", "budget": { "amountMicros": "20000000" } } }'
44
44
  ```
45
45