@wix/agent-skills 1.6.0 → 1.8.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 (195) hide show
  1. package/README.md +5 -9
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +51 -42
  4. package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
  6. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
  7. package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
  9. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
  10. package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
  11. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
  12. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
  13. package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
  14. package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
  15. package/skills/wix-app/references/STORES_VERSIONING.md +1 -0
  16. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
  17. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
  18. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
  19. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
  20. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
  21. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
  22. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
  23. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
  24. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
  25. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
  26. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
  27. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
  28. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
  29. package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
  30. package/skills/wix-design-system/SKILL.md +4 -0
  31. package/skills/wix-headless/SKILL.md +131 -386
  32. package/skills/wix-headless/references/BUILD-astro.md +246 -0
  33. package/skills/wix-headless/references/BUILD-own-build.md +167 -0
  34. package/skills/wix-headless/references/BUILD.md +105 -0
  35. package/skills/wix-headless/references/DESIGN_SYSTEM.md +175 -0
  36. package/skills/wix-headless/references/DISCOVERY-connect.md +55 -0
  37. package/skills/wix-headless/references/DISCOVERY-create.md +238 -0
  38. package/skills/wix-headless/references/DISCOVERY.md +50 -306
  39. package/skills/wix-headless/references/PLAN-connect.md +19 -0
  40. package/skills/wix-headless/references/PLAN-create.md +17 -0
  41. package/skills/wix-headless/references/PLAN.md +92 -0
  42. package/skills/wix-headless/references/SEED.md +214 -0
  43. package/skills/wix-headless/references/SETUP.md +73 -248
  44. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +6 -5
  45. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
  46. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +337 -0
  47. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +428 -0
  48. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
  49. package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +14 -12
  50. package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +15 -16
  51. package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +13 -15
  52. package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +11 -11
  53. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +354 -0
  54. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +8 -9
  55. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +6 -6
  56. package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +6 -6
  57. package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +18 -32
  58. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +3 -3
  59. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +2 -2
  60. package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +7 -7
  61. package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
  62. package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +7 -7
  63. package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
  64. package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +11 -9
  65. package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +8 -7
  66. package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
  67. package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
  68. package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
  69. package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
  70. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +218 -0
  71. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +194 -0
  72. package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +84 -0
  73. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +25 -0
  74. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +50 -0
  75. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +45 -0
  76. package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +34 -0
  77. package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +74 -0
  78. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +111 -0
  79. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +413 -0
  80. package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +76 -0
  81. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +81 -0
  82. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +65 -0
  83. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
  84. package/skills/wix-headless/references/astro/templates/global.css +286 -0
  85. package/skills/wix-headless/references/astro/templates/index.astro +56 -0
  86. package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
  87. package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
  88. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +28 -19
  89. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +6 -6
  90. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +106 -0
  91. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +295 -0
  92. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +35 -232
  93. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +39 -8
  94. package/skills/wix-headless/references/commands/known-apps.json +2 -1
  95. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +142 -0
  96. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +88 -0
  97. package/skills/wix-headless/references/custom/blog/WIRING.md +52 -0
  98. package/skills/wix-headless/references/custom/bookings/WIRING.md +88 -0
  99. package/skills/wix-headless/references/custom/cms/WIRING.md +97 -0
  100. package/skills/wix-headless/references/custom/ecom/WIRING.md +67 -0
  101. package/skills/wix-headless/references/custom/forms/WIRING.md +101 -0
  102. package/skills/wix-headless/references/custom/stores/WIRING.md +80 -0
  103. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +12 -12
  104. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +6 -6
  105. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +13 -13
  106. package/skills/wix-headless/references/images/INSTRUCTIONS.md +58 -60
  107. package/skills/wix-headless/references/seed-recipes.md +49 -0
  108. package/skills/wix-headless/references/shared/AGENTS_MD.md +47 -0
  109. package/skills/wix-headless/references/shared/AUTHENTICATION.md +108 -0
  110. package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
  111. package/skills/wix-headless/references/shared/DESIGN_MD.md +85 -0
  112. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
  113. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +40 -39
  114. package/skills/wix-headless/references/shared/IMPLEMENTER.md +92 -41
  115. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +3 -3
  116. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +32 -312
  117. package/skills/wix-headless/references/shared/STYLING.md +48 -21
  118. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +59 -29
  119. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +31 -28
  120. package/skills/wix-headless/references/verticals/_schema.json +31 -117
  121. package/skills/wix-headless/references/verticals/_schema.md +60 -150
  122. package/skills/wix-headless/references/verticals/blog.md +5 -99
  123. package/skills/wix-headless/references/verticals/bookings.md +41 -0
  124. package/skills/wix-headless/references/verticals/cms.md +9 -100
  125. package/skills/wix-headless/references/verticals/ecom.md +6 -77
  126. package/skills/wix-headless/references/verticals/forms.md +5 -85
  127. package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
  128. package/skills/wix-headless/references/verticals/stores.md +10 -144
  129. package/skills/wix-headless/scripts/check-manifest.mjs +148 -11
  130. package/skills/wix-headless/scripts/compose.mjs +540 -0
  131. package/skills/wix-headless/scripts/emit-design-tokens.mjs +136 -53
  132. package/skills/wix-headless/scripts/flatten.sh +61 -0
  133. package/skills/wix-headless/scripts/generate-images.mjs +242 -0
  134. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
  135. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
  136. package/skills/wix-headless/scripts/scaffold.sh +113 -27
  137. package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
  138. package/skills/wix-headless/scripts/write-decorative-json.mjs +62 -0
  139. package/skills/wix-manage/SKILL.md +4 -8
  140. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
  141. package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
  142. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
  143. package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
  144. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +10 -7
  145. package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
  146. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
  147. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
  148. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
  149. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
  150. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
  151. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
  152. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
  153. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
  154. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
  155. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
  156. package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
  157. package/skills/wix-manage/references/forms/create-form.md +50 -0
  158. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
  159. package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
  160. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +2 -0
  161. package/skills/wix-app/references/custom-element-widget/default-thumbnail.png +0 -0
  162. package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
  163. package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
  164. package/skills/wix-headless/references/commands/install-app.md +0 -42
  165. package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
  166. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
  167. package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
  168. package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
  169. package/skills/wix-headless/scripts/finalize-run-json.mjs +0 -141
  170. package/skills/wix-headless/scripts/init-site-json.mjs +0 -63
  171. package/skills/wix-headless/scripts/preview.sh +0 -45
  172. package/skills/wix-headless/scripts/release.sh +0 -73
  173. package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
  174. package/skills/wix-manage/references/events/list-events.md +0 -203
  175. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
  176. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
  177. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
  178. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
  179. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
  180. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
  181. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
  182. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
  183. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
  184. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
  185. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
  186. /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
  187. /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
  188. /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
  189. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
  190. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
  191. /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
  192. /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
  193. /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
  194. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
  195. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
@@ -1,59 +1,88 @@
1
1
  #!/usr/bin/env node
2
- // Inject Image-Phase-1 decorative URLs into the designer-emitted page shells.
2
+ // Inject Image-Phase-1 decorative URLs into the page shells.
3
3
  //
4
- // The Phase 2 designer writes `<div data-decorative-slot="<key>">…</div>`
5
- // placeholders in src/pages/*.astro. Image Phase 1 writes resolved URLs to
6
- // .wix/image-urls.md. This script reads both, then injects an <img> element
7
- // as the first child of each matching slot div — pure string substitution,
8
- // no LLM, no file rewrites.
4
+ // The design-system Composer (index.astro) and the Phase 4 page designers write
5
+ // `<div data-decorative-slot="<key>">…</div>` placeholders in src/pages/*.astro. Image Phase 1 returns a slot→URL map
6
+ // in its JSON return; the orchestrator pipes that map (as JSON) into this
7
+ // script's stdin. This script reads the map + walks src/pages/*.astro,
8
+ // then injects an <img> as the first child of each matching slot div —
9
+ // pure string substitution, no LLM, no file rewrites.
9
10
  //
10
11
  // Usage:
11
- // node patch-decorative-slots.mjs <project-dir>
12
+ // echo '{"hero":"https://...","about":"https://..."}' \
13
+ // | node patch-decorative-slots.mjs <scaffold-dir>
14
+ //
15
+ // <scaffold-dir> is the dir that contains src/pages/. The orchestrator
16
+ // passes the scaffold subdir explicitly — no eval-dir vs scaffold-dir
17
+ // auto-detection is needed for the URL map (it's on stdin), but src/pages
18
+ // is still resolved per-input since the orchestrator may call this from
19
+ // either the scaffold subdir or the eval root.
12
20
  //
13
21
  // Behavior:
14
- // - If .wix/image-urls.md doesn't exist, exit 0 silently (Image Phase 1
15
- // timed out / failed; the slot placeholders look complete on their own).
22
+ // - Empty stdin or no slot→URL pairs → exit 0 status="skipped" (themed-
23
+ // blocks mode or Image Phase 1 had no URLs to publish).
24
+ // - src/pages missing at <scaffold-dir> and in any single subdir one
25
+ // level down → exit 2 status="error".
16
26
  // - For each `data-decorative-slot="<key>"` in src/pages/*.astro:
17
- // * If <key> has no URL in image-urls.md → leave the div alone.
18
- // * If the div is self-closing or already has a child element other
19
- // than whitespace/comments → skip with a warning (don't clobber).
27
+ // * Key has no URL in the input map → leave the div alone.
28
+ // * Div already has a non-comment child → skip with a warning.
20
29
  // * Otherwise inject <img …> as the first child.
21
- // - Output a JSON summary of patches/skips/warnings to stdout.
22
- // - Exit 0 even when some slots couldn't be patched — placeholders fall
23
- // back to the designer's aspect-ratio + background-color rendering.
30
+ // - Output JSON summary of patches/skips/warnings to stdout.
24
31
 
25
32
  import { readFileSync, writeFileSync, existsSync, readdirSync, statSync } from "node:fs";
26
33
  import { join } from "node:path";
27
34
 
28
35
  const projectDir = process.argv[2] ?? process.cwd();
29
36
 
30
- const imageUrlsPath = join(projectDir, ".wix/image-urls.md");
31
- if (!existsSync(imageUrlsPath)) {
32
- console.log(JSON.stringify({ status: "skipped", reason: "no .wix/image-urls.md (Image Phase 1 didn't write — failed or timed out)" }));
37
+ let urlMap = {};
38
+ if (!process.stdin.isTTY) {
39
+ const raw = readFileSync(0, "utf8").trim();
40
+ if (raw) {
41
+ try {
42
+ urlMap = JSON.parse(raw);
43
+ } catch (e) {
44
+ console.error(JSON.stringify({ status: "error", reason: `stdin is not valid JSON (${e.message})` }));
45
+ process.exit(2);
46
+ }
47
+ if (!urlMap || typeof urlMap !== "object" || Array.isArray(urlMap)) {
48
+ console.error(JSON.stringify({ status: "error", reason: "expected a JSON object mapping slot keys to URLs" }));
49
+ process.exit(2);
50
+ }
51
+ }
52
+ }
53
+
54
+ if (Object.keys(urlMap).length === 0) {
55
+ console.log(JSON.stringify({ status: "skipped", reason: "no slot→URL pairs on stdin (themed-blocks mode or Image Phase 1 produced none)" }));
33
56
  process.exit(0);
34
57
  }
35
58
 
36
- // Parse `## <key>\n- url: <url>` blocks from .wix/image-urls.md.
37
- const imageUrlsRaw = readFileSync(imageUrlsPath, "utf8");
38
- const urlMap = {};
39
- // Match `## key\n…- url: <url>` per section. The inner `(?:(?!^##\s)[\s\S])*?`
40
- // forbids the lazy span from crossing into the next `## ` line — without
41
- // that guard, an empty `- url:` for one slot silently steals the next
42
- // section's URL on partial-failure runs.
43
- const sectionRegex = /^##\s+(\S+)\s*\n(?:(?!^##\s)[\s\S])*?-\s*url:\s*(https?:\/\/\S+)/gm;
44
- let m;
45
- while ((m = sectionRegex.exec(imageUrlsRaw)) !== null) {
46
- urlMap[m[1]] = m[2];
59
+ function findPagesDir() {
60
+ const direct = join(projectDir, "src/pages");
61
+ if (existsSync(direct)) return { path: direct, source: "projectDir" };
62
+ const hits = [];
63
+ for (const entry of readdirSync(projectDir, { withFileTypes: true })) {
64
+ if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
65
+ const candidate = join(projectDir, entry.name, "src/pages");
66
+ if (existsSync(candidate)) hits.push(candidate);
67
+ }
68
+ if (hits.length === 1) return { path: hits[0], source: "scaffold-subdir" };
69
+ if (hits.length > 1) return { path: null, source: "ambiguous", hits };
70
+ return { path: null, source: "missing" };
47
71
  }
48
72
 
49
- if (Object.keys(urlMap).length === 0) {
50
- console.log(JSON.stringify({ status: "skipped", reason: ".wix/image-urls.md exists but has no parseable `## key` + `- url:` blocks" }));
51
- process.exit(0);
73
+ const pagesResolved = findPagesDir();
74
+ if (!pagesResolved.path) {
75
+ console.error(JSON.stringify({
76
+ status: "error",
77
+ reason: "src/pages not found at <projectDir>/src/pages or in any scaffold subdir; pass the scaffold dir explicitly",
78
+ projectDir,
79
+ pagesSearchedAt: pagesResolved.source === "ambiguous" ? pagesResolved.hits : [join(projectDir, "src/pages")],
80
+ }, null, 2));
81
+ process.exit(2);
52
82
  }
53
83
 
54
- // Find candidate page files: src/pages/*.astro, recursively (designer may emit
55
- // /about.astro at top level OR /pages/about.astro).
56
- const pagesDir = join(projectDir, "src/pages");
84
+ const pagesDir = pagesResolved.path;
85
+
57
86
  const candidates = [];
58
87
  const walk = (dir) => {
59
88
  if (!existsSync(dir)) return;
@@ -80,22 +109,17 @@ for (const file of candidates) {
80
109
  modified = modified.replace(SLOT_DIV_REGEX, (match, openTag, slotKey, inner, closeTag) => {
81
110
  const url = urlMap[slotKey];
82
111
  if (!url) {
83
- skipped.push({ file, slot: slotKey, reason: "no URL for this slot in image-urls.md" });
112
+ skipped.push({ file, slot: slotKey, reason: "no URL for this slot in input map" });
84
113
  return match;
85
114
  }
86
115
 
87
- // Strip HTML comments before any content checks — the designer's placeholder
88
- // is a comment like `<!-- orchestrator injects <img> here -->`, which would
89
- // otherwise false-positive both the idempotency and clobber-guard checks.
90
116
  const stripped = inner.replace(/<!--[\s\S]*?-->/g, "").trim();
91
117
 
92
- // Skip if div already contains an <img> element (idempotency).
93
118
  if (/<img\b/i.test(stripped)) {
94
119
  skipped.push({ file, slot: slotKey, reason: "div already contains an <img> tag (idempotent skip)" });
95
120
  return match;
96
121
  }
97
122
 
98
- // Skip if div has substantive child content beyond whitespace/comments.
99
123
  if (stripped.length > 0) {
100
124
  warnings.push({ file, slot: slotKey, reason: "div has existing non-image child content; not patching to avoid clobber" });
101
125
  return match;
@@ -104,7 +128,6 @@ for (const file of candidates) {
104
128
  fileChanged = true;
105
129
  const img = `<img src="${url}" alt="" loading="lazy" decoding="async" class="decorative-slot-img" />`;
106
130
  patched.push({ file, slot: slotKey });
107
- // Preserve any whitespace inside the div (e.g., the newline + indent).
108
131
  return `${openTag}\n ${img}${inner}${closeTag}`;
109
132
  });
110
133
 
@@ -115,10 +138,11 @@ for (const file of candidates) {
115
138
 
116
139
  const summary = {
117
140
  status: warnings.length > 0 ? "partial" : "ok",
118
- imageUrls: Object.keys(urlMap),
141
+ slots: Object.keys(urlMap),
119
142
  filesScanned: candidates.length,
120
143
  patched,
121
144
  skipped,
122
145
  warnings,
146
+ pagesFrom: pagesResolved.source,
123
147
  };
124
148
  console.log(JSON.stringify(summary, null, 2));
@@ -9,8 +9,8 @@
9
9
  //
10
10
  // waves — Runware generation requests, grouped into waves of <waveSize>
11
11
  // (default 3) to match the google:4@2 throttle. Each wave is
12
- // one orchestration step with N parallel CallWixSiteAPI tool
13
- // calls; each tool call sends one task in the body array.
12
+ // one orchestration step with N parallel curls in one shell,
13
+ // backgrounded with `&`; each curl sends one task in the body array.
14
14
  //
15
15
  // imports — POST /site-media/v1/files/import requests, one per generated
16
16
  // image. Indexed by taskUUID so the orchestrator threads the
@@ -155,7 +155,7 @@ for (const p of prompts) {
155
155
  process.exit(1);
156
156
  }
157
157
  // Read-merge-PUT: echo every existing data field, set the image field
158
- // to the placeholder URL. Wipes nothing (the bug observed in 2026-04-19).
158
+ // to the placeholder URL. Echoing every existing field is what prevents wiping the rest of the record.
159
159
  const mergedData = { ...detail.data, [detail.imageField]: "__IMAGE_URL__" };
160
160
  patches.push({
161
161
  taskUUID: p.taskUUID,
@@ -1,53 +1,139 @@
1
1
  #!/usr/bin/env bash
2
- # Scaffold a new Wix Managed Headless project with the pure-headless blank template.
2
+ # Scaffold a new Wix Managed Headless project using the CLI's preset blank template.
3
3
  #
4
4
  # Usage:
5
- # bash <SKILL_ROOT>/scripts/scaffold.sh <project-slug> "<Brand Name>"
5
+ # bash <SKILL_ROOT>/scripts/scaffold.sh <folder-name> "<Brand Name>" [--frontend astro|custom]
6
6
  #
7
- # <project-slug>: 3-20 lowercase alphanumeric chars (no hyphens, no spaces) — the
8
- # Wix CLI rejects anything else. Becomes the project directory name.
9
- # <Brand Name>: human-readable business name; quote if it contains spaces.
7
+ # <folder-name>: lowercase letters, numbers, and hyphens only; must start with a
8
+ # letter or number. The CLI scaffolds into a subdir of this name,
9
+ # which this script then FLATTENS into the current directory (see
10
+ # "In-place flatten" below) — so the project ends up *in CWD*, not
11
+ # in a nested folder. The name is still required (the CLI mandates
12
+ # it) but the local folder is transient.
13
+ # <Brand Name>: human-readable business name; quote if it contains spaces. The
14
+ # CLI derives the Wix project display-name and URL slug from it, so
15
+ # it must include at least one English letter or number.
16
+ # --frontend: the frontend axis. Defaults to "astro" — the only supported (and
17
+ # only scaffolded) frontend. "custom" (any non-astro frontend) is
18
+ # NOT scaffolded yet: Discovery routes custom to the not-available
19
+ # stub (references/custom/INSTRUCTIONS.md) before scaffold ever runs,
20
+ # so this script should only ever be invoked with "astro". If it is
21
+ # invoked with "custom" it exits 4 (recognized, not staged).
10
22
  #
11
- # After scaffold succeeds, read <project-slug>/wix.config.json to extract appId
12
- # (project's appId) and siteId (used for MCP calls). The orchestrator does that
13
- # read; this script just runs the npm create.
23
+ # After scaffold succeeds, the project lives in the CURRENT directory (the subdir
24
+ # was flattened away). Read ./wix.config.json to extract appId (project's appId)
25
+ # and siteId (used as --site for `wix token` and in REST call bodies). The
26
+ # orchestrator does that read; this script runs the npm create + the flatten.
14
27
  #
15
28
  # Behavior:
16
- # - Pre-flight validates the slug (regex ^[a-z0-9]{3,20}$).
17
- # - Pre-flight requires both args.
29
+ # - Pre-flight validates the folder name syntax (regex ^[a-z0-9][a-z0-9-]*$).
30
+ # - Pre-flight requires both positional args.
18
31
  # - Runs `npm create @wix/new@latest headless` with --no-publish + --skip-install
19
32
  # so the orchestrator can deferred-install with its own package set.
20
- # - Template ID is the pure-headless blank (vibe-compatible templates trigger
21
- # an interactive prompt that blocks non-TTY runs).
33
+ # - Passes bare `--site-template` so non-interactive scaffolding stays on the
34
+ # blank starter. Without it, @wix/create-new (>=0.0.72) prompts for a template
35
+ # choice and aborts in a non-TTY agent shell ("not supported in non-interactive
36
+ # terminals").
37
+ # - FLATTENS the scaffolded subdir into CWD (single-folder layout: one `.wix`,
38
+ # CWD == project == site-root). Interim until the CLI supports in-place create.
22
39
  #
23
40
  # Exit codes:
24
41
  # 0 — ok
25
- # 2 — argument validation failed
42
+ # 2 — argument validation failed (bad folder name, missing args, unknown --frontend value)
43
+ # 3 — Wix CLI not logged in (defensive; the Discovery pre-flight is the primary check)
44
+ # 4 — frontend value recognized but not scaffolded yet (custom today)
45
+ # 5 — scaffold succeeded but the subdir could not be flattened into CWD (name collision)
26
46
  # <other> — npm create failed; stderr surfaced to caller for orchestrator-side
27
- # recovery (auth / invalid-template ladder lives in the orchestrator).
47
+ # recovery (auth / other scaffold failures live in the orchestrator).
28
48
 
29
49
  set -euo pipefail
30
50
 
31
- if [[ $# -lt 2 || -z "${1:-}" || -z "${2:-}" ]]; then
32
- echo "scaffold.sh: both args required. Got project-slug='${1:-}' brand-name='${2:-}'." >&2
33
- echo "Usage: bash scaffold.sh <slug> \"<Brand Name>\" — slug first, brand quoted." >&2
51
+ FRONTEND="astro"
52
+ POSITIONAL=()
53
+ while [[ $# -gt 0 ]]; do
54
+ case "$1" in
55
+ --frontend)
56
+ if [[ $# -lt 2 ]]; then
57
+ echo "scaffold.sh: --frontend requires a value (astro|custom)." >&2
58
+ exit 2
59
+ fi
60
+ FRONTEND="$2"
61
+ shift 2
62
+ ;;
63
+ --frontend=*)
64
+ FRONTEND="${1#--frontend=}"
65
+ shift
66
+ ;;
67
+ *)
68
+ POSITIONAL+=("$1")
69
+ shift
70
+ ;;
71
+ esac
72
+ done
73
+
74
+ if [[ ${#POSITIONAL[@]} -lt 2 || -z "${POSITIONAL[0]:-}" || -z "${POSITIONAL[1]:-}" ]]; then
75
+ echo "scaffold.sh: both positional args required. Got folder-name='${POSITIONAL[0]:-}' brand-name='${POSITIONAL[1]:-}'." >&2
76
+ echo "Usage: bash scaffold.sh <folder-name> \"<Brand Name>\" [--frontend astro|custom] — folder name first, brand quoted." >&2
34
77
  exit 2
35
78
  fi
36
79
 
37
- if [[ ! "$1" =~ ^[a-z0-9]{3,20}$ ]]; then
38
- echo "scaffold.sh: project-slug='$1' is not valid." >&2
39
- echo "Slug must be 3-20 lowercase alphanumeric chars (no hyphens, no spaces)." >&2
40
- echo "Derive from the brand: lowercase, strip non-[a-z0-9], truncate to 20." >&2
80
+ case "$FRONTEND" in
81
+ astro)
82
+ ;;
83
+ custom)
84
+ echo "scaffold.sh: --frontend=custom is not scaffolded yet — astro is the only supported frontend." >&2
85
+ echo "Discovery routes custom (non-astro) frontends to references/custom/INSTRUCTIONS.md (the not-available stub) before scaffold; this script should not be invoked with 'custom'." >&2
86
+ exit 4
87
+ ;;
88
+ *)
89
+ echo "scaffold.sh: unknown --frontend value '$FRONTEND'. Allowed: astro, custom." >&2
90
+ exit 2
91
+ ;;
92
+ esac
93
+
94
+ if [[ ! "${POSITIONAL[0]}" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
95
+ echo "scaffold.sh: folder-name='${POSITIONAL[0]}' is not valid." >&2
96
+ echo "Folder name must contain only lowercase letters, numbers, and hyphens, and start with a letter or number." >&2
97
+ echo "Derive it from the brand as a lowercase, npm-safe directory name." >&2
41
98
  exit 2
42
99
  fi
43
100
 
44
- # Pure-headless blank template. Vibe-compatible templates show an interactive
45
- # vibe setup prompt that blocks non-TTY contexts — do not substitute.
46
- TEMPLATE_ID="blank"
101
+ # Defensive auth check — DISCOVERY.md's pre-flight should have caught this
102
+ # already, but scaffold.sh is also a documented standalone entry point
103
+ # (SKILL.md § "When NOT to use this skill"). `npm create @wix/new` requires
104
+ # an active CLI session and otherwise fails mid-run with an opaque error.
105
+ # `wix whoami` exits non-zero on a logged-out session and prints the
106
+ # authenticated email + user id when logged in.
107
+ if ! npx @wix/cli@latest whoami >/dev/null 2>&1; then
108
+ echo "scaffold.sh: not logged in to Wix CLI." >&2
109
+ echo "Run 'npx @wix/cli@latest login' and retry." >&2
110
+ exit 3
111
+ fi
112
+
113
+ FOLDER="${POSITIONAL[0]}"
47
114
 
48
115
  npm create @wix/new@latest headless -- \
49
- --business-name "$2" \
50
- --project-name "$1" \
51
- --site-template "$TEMPLATE_ID" \
116
+ --business-name "${POSITIONAL[1]}" \
117
+ --folder-name "$FOLDER" \
118
+ --site-template \
52
119
  --no-publish \
53
120
  --skip-install
121
+
122
+ # --- In-place flatten (interim hack) -----------------------------------------
123
+ # The CLI always scaffolds into a named subdir; there is NO in-place option —
124
+ # `headless init` regex-rejects `--folder-name .` ("must contain only lowercase
125
+ # letters, numbers, and hyphens") and offers no --cwd/--here flag. To keep the
126
+ # whole run single-folder (one `.wix`, CWD == project == site-root, no nested
127
+ # `.wix` to reason about), fold the scaffolded subdir up into the current dir.
128
+ #
129
+ # The .wix-merge + mv -n + rmdir logic is identical to flatten.sh (the own-build
130
+ # path's framework-agnostic flatten), so we delegate to it rather than duplicate.
131
+ # flatten.sh lives next to this script; resolve its path relative to our own dir
132
+ # so the call works regardless of CWD. (Both exit 5 on the same name-collision.)
133
+ # When the CLI gains `--folder-name .` (or --cwd), the TODO to drop the flatten
134
+ # lives in flatten.sh.
135
+ if [[ -d "$FOLDER" ]]; then
136
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
137
+ bash "$SCRIPT_DIR/flatten.sh" "$FOLDER"
138
+ fi
139
+ # -----------------------------------------------------------------------------
@@ -1,21 +1,30 @@
1
1
  #!/usr/bin/env bash
2
- # Copy the skill's shared utilities into the project's src/utils/ and strip the
3
- # Astro starter cruft that ships with the blank template.
2
+ # Frontend-track project prep: copy the skill's shared utilities into the
3
+ # project's src/utils/ and strip the Astro starter cruft that ships with the
4
+ # blank template. This is local-project (frontend) work, not backend seeding —
5
+ # the orchestrator only runs it in scaffold mode (integrate mode has no
6
+ # skill-written frontend to prep, so it is never invoked there).
4
7
  #
5
8
  # Usage (both modes work):
6
- # bash <SKILL_ROOT>/scripts/seed-utilities.sh # installed tgz
7
- # bash <(curl -s https://dev.wix.com/skills/wix-headless/scripts/seed-utilities.sh)
9
+ # bash <SKILL_ROOT>/scripts/seed-utilities.sh --template astro
10
+ # bash <(curl -s https://dev.wix.com/skills/wix-headless/scripts/seed-utilities.sh) --template astro
8
11
  #
9
- # Run from the project directory (CWD = <project>/). The script auto-detects
12
+ # --template (optional, default astro): astro
13
+ # Astro is the only frontend the skill scaffolds and preps, so the value is
14
+ # always "astro". Custom (non-astro) frontends route to the not-available stub
15
+ # (references/custom/INSTRUCTIONS.md) and never reach this script.
16
+ #
17
+ # Run from the project directory (CWD = <scaffold>/). The script auto-detects
10
18
  # whether shared-utilities is available on disk (tgz install) and falls back
11
19
  # to fetching from the well-known URL when streamed via process substitution
12
20
  # (BASH_SOURCE is /dev/fd/N, so the on-disk lookup naturally falls through).
13
21
  #
14
22
  # Behavior:
15
- # - Copies the three shared utility files into src/utils/ — never overwrites
16
- # an existing file (users can drop in their own version to override).
17
- # - Removes Astro starter cruft (Welcome.astro + marketing SVGs) that ships
18
- # with the blank template but is never imported by the build skill.
23
+ # - Copies the three shared utility files into src/utils/ for both templates —
24
+ # never overwrites an existing file (users can drop in their own version).
25
+ # - On --template=astro, removes Astro starter cruft (Welcome.astro + marketing
26
+ # SVGs) that ships with the blank template but is never imported by the build
27
+ # skill.
19
28
  #
20
29
  # Shared utilities copied:
21
30
  # - wix-image.ts — media URL resolver (used by stores, blog, cms)
@@ -27,6 +36,33 @@ set -euo pipefail
27
36
  SKILL_URL="https://dev.wix.com/skills/wix-headless"
28
37
  UTILS=(analytics.ts ricos.ts wix-image.ts)
29
38
 
39
+ TEMPLATE="astro"
40
+ while [[ $# -gt 0 ]]; do
41
+ case "$1" in
42
+ --template)
43
+ TEMPLATE="$2"
44
+ shift 2
45
+ ;;
46
+ --template=*)
47
+ TEMPLATE="${1#--template=}"
48
+ shift
49
+ ;;
50
+ *)
51
+ echo "seed-utilities.sh: unexpected arg: $1" >&2
52
+ exit 2
53
+ ;;
54
+ esac
55
+ done
56
+
57
+ case "$TEMPLATE" in
58
+ astro) ;;
59
+ *)
60
+ echo "seed-utilities.sh: --template must be 'astro' (the only supported frontend); got $TEMPLATE" >&2
61
+ echo "(Custom non-astro frontends route to the stub and never reach this script.)" >&2
62
+ exit 2
63
+ ;;
64
+ esac
65
+
30
66
  # Mode detection: prefer on-disk skill root if the sibling dir exists, else
31
67
  # fetch over HTTP. Covers both tgz install and `bash <(curl ...)` streaming.
32
68
  SHARED_UTILS_DIR=""
@@ -50,6 +86,8 @@ for f in "${UTILS[@]}"; do
50
86
  fi
51
87
  done
52
88
 
53
- # Astro starter cruft cleanup.
54
- rm -f src/components/Welcome.astro
55
- rm -f src/assets/astro.svg src/assets/wix.svg src/assets/background.svg
89
+ # Astro starter cruft cleanup — astro template only.
90
+ if [[ "$TEMPLATE" == "astro" ]]; then
91
+ rm -f src/components/Welcome.astro
92
+ rm -f src/assets/astro.svg src/assets/wix.svg src/assets/background.svg
93
+ fi
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ // Write the decorative slot→URL map to src/decorative-images.json for a
3
+ // framework-SPA (`own`) frontend. This is the `own`-branch analog of
4
+ // patch-decorative-slots.mjs (which injects <img> into .astro source) — but
5
+ // instead of patching framework source, the generated SPA *imports* this JSON
6
+ // and its hero/about components read it, with a themed-block fallback when a
7
+ // slot is empty/absent. This avoids fragile JSX/Vue/Svelte string-patching and
8
+ // mirrors how the SPA already imports .wix/design-tokens.css.
9
+ //
10
+ // It is called twice in the `own` flow (BUILD-own-build.md):
11
+ // 1. At bootstrap, with EMPTY stdin → writes `{}` (placeholder), so the app
12
+ // builds + renders themed blocks even if Image Phase 1 never runs.
13
+ // 2. At the seed gate (ai-generated only), with Image Phase 1's data.slots
14
+ // piped in → OVERWRITES the file with the real URLs. This MUST happen
15
+ // before `npm run build` (Vite resolves the JSON import at build time).
16
+ //
17
+ // Writes to src/decorative-images.json (inside the Vite root, so it is always
18
+ // importable — unlike .wix/, which may sit outside the bundler root).
19
+ //
20
+ // Usage:
21
+ // echo '{"hero":"https://...","about":"https://..."}' \
22
+ // | node write-decorative-json.mjs <project-dir>
23
+ // : | node write-decorative-json.mjs <project-dir> # placeholder {}
24
+
25
+ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
26
+ import { join } from "node:path";
27
+
28
+ const projectDir = process.argv[2] ?? process.cwd();
29
+
30
+ let slots = {};
31
+ if (!process.stdin.isTTY) {
32
+ const raw = readFileSync(0, "utf8").trim();
33
+ if (raw) {
34
+ try {
35
+ slots = JSON.parse(raw);
36
+ } catch (e) {
37
+ console.error(JSON.stringify({ status: "error", reason: `stdin is not valid JSON (${e.message})` }));
38
+ process.exit(2);
39
+ }
40
+ if (!slots || typeof slots !== "object" || Array.isArray(slots)) {
41
+ console.error(JSON.stringify({ status: "error", reason: "expected a JSON object mapping slot keys to URLs" }));
42
+ process.exit(2);
43
+ }
44
+ }
45
+ }
46
+
47
+ // Drop empty/falsy URLs so the component's themed-block fallback kicks in.
48
+ const clean = {};
49
+ for (const [k, v] of Object.entries(slots)) {
50
+ if (typeof v === "string" && v.trim()) clean[k] = v.trim();
51
+ }
52
+
53
+ const srcDir = join(projectDir, "src");
54
+ mkdirSync(srcDir, { recursive: true });
55
+ const dest = join(srcDir, "decorative-images.json");
56
+ writeFileSync(dest, JSON.stringify(clean, null, 2) + "\n");
57
+
58
+ console.log(JSON.stringify({
59
+ status: Object.keys(clean).length ? "ok" : "placeholder",
60
+ file: dest,
61
+ slots: Object.keys(clean),
62
+ }, null, 2));
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  name: wix-manage
3
- description: "Wix business solution management recipes — REST API operations for configuring and managing Wix business solutions. Routes to: stores, bookings, get-paid, CMS, contacts, events, forms, media, app-installation, pricing-plans, restaurants, rich-content, sites, blog, calendar, domains, site-properties, ecommerce."
3
+ description: "Wix business solution management recipes — REST API operations for configuring and managing Wix business solutions. Routes to: stores, bookings, get-paid, CMS, contacts, forms, media, app-installation, pricing-plans, restaurants, rich-content, sites, blog, calendar, domains, site-properties, ecommerce."
4
4
  compatibility: Requires Wix REST API access (API key or OAuth).
5
5
  ---
6
6
 
7
7
  # Management Recipes Index
8
8
 
9
+ > **Standard call shape for every curl example across these recipes.** The `<AUTH>` placeholder in example curls is shorthand for the `Authorization` header only; body-bearing calls also need `Content-Type: application/json`.
10
+
9
11
  ## What Are Management Recipes?
10
12
 
11
13
  **Management recipes are for REST API operations** that configure, set up, and manage Wix business entities on your site. These recipes use REST API calls and are designed for:
@@ -155,6 +157,7 @@ These recipes do NOT cover frontend development or SDK usage for displaying data
155
157
 
156
158
  #### Config & API References
157
159
  - [API: Recommendation Tracking](references/ecommerce/api-recommendation-tracking.md)
160
+ - [API: Shipping Delivery](references/ecommerce/api-shipping.md)
158
161
  - [Setup: Discount Rules](references/ecommerce/setup-discount-rules.md)
159
162
  - [Setup: Coupons](references/ecommerce/setup-coupons.md)
160
163
  - [Setup: Shipping Regions](references/ecommerce/setup-shipping-regions.md)
@@ -171,13 +174,6 @@ These recipes do NOT cover frontend development or SDK usage for displaying data
171
174
 
172
175
  ---
173
176
 
174
- ## Events
175
-
176
- ### [List Events](references/events/list-events.md)
177
- **Technical:** Queries events from Wix Events using Events API. Covers field sets (DETAILS, URLS, REGISTRATION), filtering by status/date, and pagination.
178
-
179
- ---
180
-
181
177
  ## Forms
182
178
 
183
179
  ### [Create Form](references/forms/create-form.md)
@@ -5,6 +5,8 @@ description: Creates and publishes blog posts using Blog Posts API. Covers Ricos
5
5
 
6
6
  **Article: Create and Publish Blog Posts with Rich Content and Images**
7
7
 
8
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
9
+
8
10
  ---
9
11
 
10
12
  ## Description
@@ -4,6 +4,8 @@ description: "Add, query, update, and delete items in CMS collections. Use this
4
4
  ---
5
5
  # CMS Data Items CRUD
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
8
+
7
9
  This recipe covers basic Create, Read, Update, Delete (CRUD) operations for Wix CMS data items.
8
10
 
9
11
  ## Prerequisites
@@ -365,6 +367,8 @@ curl -X DELETE \
365
367
  | `IMAGE` | Image reference (HTTP url or wix:image://v1/{mediaId}/{friendlyName}) | `"wix:image://v1/3f72369f2219e2ee853e9e3df0217ce1.jpg/Colorful%20Business%20Cards.jpg"` |
366
368
  | `VIDEO` | Video reference (HTTP url or wix:video://v1/{mediaId}/{friendlyName}) | `"wix:video://v1/11062b_484182533ede4b9a81329daf20238867/Sketching%20Design%20Concepts#posterUri=11062b_484182533ede4b9a81329daf20238867f000.jpg&posterWidth=1920&posterHeight=1080"` |
367
369
  | `DOCUMENT` | Document reference (HTTP url or wix:document://v1/{mediaId}) | `"wix:document://v1/..."` |
370
+ | `MEDIA_IMAGE` | Wix Media Image | `{ "url": "http://...", "height": 640, "width": 480, "alt": "Picture" }` |
371
+ | `MEDIA_VECTOR_ART` | Wix Media Vector Art | `{ "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" }` |
368
372
  | `URL` | Web URL | `"https://example.com"` |
369
373
  | `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
370
374
  | `EMAIL` | Email | `"example@wix.com"` |
@@ -4,6 +4,8 @@ description: "Add, replace, or remove items from MULTI_REFERENCE fields. Use ins
4
4
  ---
5
5
  # CMS References & Relationships
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
8
+
7
9
  This recipe covers linking CMS collections together using reference fields.
8
10
 
9
11
  ## Prerequisites
@@ -4,6 +4,8 @@ description: Create and modify CMS collection structures. Covers listing collect
4
4
  ---
5
5
  # CMS Schema Management
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
8
+
7
9
  This recipe covers managing the structure (schema) of Wix CMS collections using the REST API.
8
10
 
9
11
  ## Prerequisites
@@ -120,6 +122,8 @@ curl -X GET \
120
122
  | `DATE` | Date only | `"2024-01-15"` |
121
123
  | `DATETIME` | Date and time | `{ "$date": "2024-01-15T10:00:00.000Z" }` |
122
124
  | `IMAGE` | Image reference | `"wix:image://v1/..."` |
125
+ | `MEDIA_IMAGE` | Wix Media Image | `{ "url": "http://...", "height": 640, "width": 480, "alt": "Picture" }` |
126
+ | `MEDIA_VECTOR_ART` | Wix Media Vector Art | `{ "uri": "wix:vector://v1/...", "viewBox": "0 0 100 100", "contentType": "shape", "svgContent": "<svg>...</svg>" }` |
123
127
  | `URL` | Web URL | `"https://example.com"` |
124
128
  | `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
125
129
  | `ARRAY_STRING` | Array of strings | `["tag1", "tag2"]` |