@wix/agent-skills 1.14.0 → 1.15.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 (268) hide show
  1. package/README.md +12 -1
  2. package/package.json +1 -1
  3. package/skills/README.md +23 -0
  4. package/skills/wix-app/SKILL.md +10 -2
  5. package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +326 -0
  6. package/skills/wix-app/references/CODE_QUALITY.md +1 -0
  7. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +124 -115
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +3 -0
  9. package/skills/wix-app/references/DATA_COLLECTION.md +5 -3
  10. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +25 -9
  11. package/skills/wix-app/references/SITE_PLUGIN.md +1 -1
  12. package/skills/wix-app/references/STORES_VERSIONING.md +9 -211
  13. package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +115 -0
  14. package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +264 -0
  15. package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +37 -0
  16. package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +86 -0
  17. package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +119 -0
  18. package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +103 -0
  19. package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +76 -0
  20. package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +82 -0
  21. package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +89 -0
  22. package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +124 -0
  23. package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +91 -0
  24. package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +71 -0
  25. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +70 -0
  26. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +73 -0
  27. package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +98 -0
  28. package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +278 -0
  29. package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +94 -0
  30. package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +43 -0
  31. package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +66 -0
  32. package/skills/wix-app/references/auto-patterns-dashboard/views.md +76 -0
  33. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +5 -0
  34. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -14
  35. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +151 -0
  36. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +54 -29
  37. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +2 -2
  38. package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +57 -0
  39. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +23 -105
  40. package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +127 -0
  41. package/skills/wix-app/references/editor-react-component/PARTS.md +2 -1
  42. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +18 -16
  43. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +25 -53
  44. package/skills/wix-app/references/stores/CATEGORIES.md +22 -0
  45. package/skills/wix-app/references/stores/GET_PRODUCT.md +99 -0
  46. package/skills/wix-app/references/stores/INVENTORY.md +37 -0
  47. package/skills/wix-app/references/stores/QUERY.md +87 -0
  48. package/skills/wix-app/references/stores/WRITE.md +55 -0
  49. package/skills/wix-app/scripts/generate-auto-patterns.js +510 -0
  50. package/skills/wix-auth/SKILL.md +12 -0
  51. package/skills/wix-auth/references/device-flow.md +140 -0
  52. package/skills/wix-docs/SKILL.md +188 -0
  53. package/skills/wix-docs/references/API_SPEC_SEARCH.md +213 -0
  54. package/skills/wix-docs/references/EXTRACTING.md +120 -0
  55. package/skills/wix-headless/SKILL.md +89 -130
  56. package/skills/wix-headless/entry/bootstrap.mjs +93 -0
  57. package/skills/wix-headless/entry/skill.md +76 -0
  58. package/skills/wix-headless/references/AI_FEATURES.md +178 -0
  59. package/skills/wix-headless/references/CAPABILITIES.md +86 -0
  60. package/skills/wix-headless/references/DISCOVERY.md +34 -56
  61. package/skills/wix-headless/references/DOC_DISCOVERY.md +37 -0
  62. package/skills/wix-headless/references/FEEDBACK.md +129 -0
  63. package/skills/wix-headless/references/IMAGE_GENERATION.md +69 -0
  64. package/skills/wix-headless/references/SDK_HANDOFF.md +99 -0
  65. package/skills/wix-headless/references/SEED.md +45 -187
  66. package/skills/wix-headless/references/SETUP.md +32 -103
  67. package/skills/wix-headless/references/astro.md +98 -0
  68. package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +196 -0
  69. package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +236 -0
  70. package/skills/wix-headless/references/inline-recipes/how-to-code-bookings.md +279 -0
  71. package/skills/wix-headless/references/inline-recipes/how-to-code-cms.md +163 -0
  72. package/skills/wix-headless/references/inline-recipes/how-to-code-events.md +203 -0
  73. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +222 -0
  74. package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +124 -0
  75. package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +160 -0
  76. package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +118 -0
  77. package/skills/wix-headless/references/inline-recipes/how-to-code-portfolio.md +132 -0
  78. package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +124 -0
  79. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +188 -0
  80. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-reservations.md +213 -0
  81. package/skills/wix-headless/references/inline-recipes/how-to-code-restaurants.md +161 -0
  82. package/skills/wix-headless/references/inline-recipes/setup-blog.md +175 -0
  83. package/skills/wix-headless/references/inline-recipes/setup-bookings.md +232 -0
  84. package/skills/wix-headless/references/inline-recipes/setup-cms.md +200 -0
  85. package/skills/wix-headless/references/inline-recipes/setup-events.md +196 -0
  86. package/skills/wix-headless/references/inline-recipes/setup-forms.md +174 -0
  87. package/skills/wix-headless/references/inline-recipes/setup-online-store.md +192 -0
  88. package/skills/wix-headless/references/inline-recipes/setup-portfolio.md +155 -0
  89. package/skills/wix-headless/references/inline-recipes/setup-pricing-plans.md +229 -0
  90. package/skills/wix-headless/references/inline-recipes/setup-restaurant-experiences.md +73 -0
  91. package/skills/wix-headless/references/inline-recipes/setup-restaurant-orders.md +197 -0
  92. package/skills/wix-headless/references/inline-recipes/setup-restaurant-reservations.md +136 -0
  93. package/skills/wix-headless/references/inline-recipes/setup-restaurants.md +152 -0
  94. package/skills/wix-headless/references/managed/AUTHENTICATION.md +57 -0
  95. package/skills/wix-headless/references/managed/CONNECT.md +74 -0
  96. package/skills/wix-headless/references/managed/CREATE.md +130 -0
  97. package/skills/wix-headless/references/managed/DEPLOYMENT.md +79 -0
  98. package/skills/wix-headless/references/non-astro.md +59 -0
  99. package/skills/wix-headless/references/self-managed/AUTHENTICATION.md +22 -0
  100. package/skills/wix-headless/references/self-managed/DEPLOYMENT.md +15 -0
  101. package/skills/wix-headless/references/stripe/AUTHENTICATION.md +55 -0
  102. package/skills/wix-headless/references/stripe/DEPLOYMENT.md +71 -0
  103. package/skills/wix-manage/SKILL.md +29 -3
  104. package/skills/wix-manage/references/analytics/query-site-analytics.md +298 -0
  105. package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -0
  106. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +1 -1
  107. package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +6 -5
  108. package/skills/wix-manage/references/bookings/create-course-service.md +30 -5
  109. package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +299 -0
  110. package/skills/wix-manage/references/cms/cms-schema-management.md +6 -0
  111. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +30 -7
  112. package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +517 -0
  113. package/skills/wix-manage/references/marketing/generate-and-publish-marketing-plan.md +218 -0
  114. package/skills/wix-manage/references/rich-content/author-ricos-rich-content.md +249 -0
  115. package/skills/wix-manage/references/sites/site-import.md +270 -0
  116. package/skills/wix-manage/references/stores/create-product-from-image.md +8 -6
  117. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +57 -0
  118. package/skills/wix-vibe-headless/SKILL.md +142 -0
  119. package/skills/wix-vibe-headless/platforms/README.md +22 -0
  120. package/skills/wix-vibe-headless/platforms/base44.md +142 -0
  121. package/skills/wix-vibe-headless/platforms/generic.md +87 -0
  122. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +128 -0
  123. package/skills/wix-vibe-headless/references/blog/wix-blog.js +217 -0
  124. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +157 -0
  125. package/skills/wix-vibe-headless/references/bookings/wix-bookings-checkout.js +147 -0
  126. package/skills/wix-vibe-headless/references/bookings/wix-bookings-services.js +217 -0
  127. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +154 -0
  128. package/skills/wix-vibe-headless/references/cms/wix-cms.js +186 -0
  129. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +142 -0
  130. package/skills/wix-vibe-headless/references/events/wix-events-browse.js +136 -0
  131. package/skills/wix-vibe-headless/references/events/wix-events-registration.js +187 -0
  132. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +211 -0
  133. package/skills/wix-vibe-headless/references/members/wix-members-auth.js +387 -0
  134. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +111 -0
  135. package/skills/wix-vibe-headless/references/portfolio/wix-portfolio.js +223 -0
  136. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +127 -0
  137. package/skills/wix-vibe-headless/references/pricing-plans/wix-pricing-plans.js +157 -0
  138. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +138 -0
  139. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-menu.js +224 -0
  140. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-ordering.js +156 -0
  141. package/skills/wix-vibe-headless/references/restaurants/wix-restaurants-reservations.js +107 -0
  142. package/skills/wix-vibe-headless/references/shared/wix-client.js +186 -0
  143. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +164 -0
  144. package/skills/wix-vibe-headless/references/storefront/wix-store-cart.js +147 -0
  145. package/skills/wix-vibe-headless/references/storefront/wix-store-catalog.js +146 -0
  146. package/skills/wix-headless/references/BUILD-astro.md +0 -253
  147. package/skills/wix-headless/references/BUILD-own-build.md +0 -167
  148. package/skills/wix-headless/references/BUILD.md +0 -105
  149. package/skills/wix-headless/references/DESIGN_SYSTEM.md +0 -165
  150. package/skills/wix-headless/references/DISCOVERY-connect.md +0 -55
  151. package/skills/wix-headless/references/DISCOVERY-create.md +0 -238
  152. package/skills/wix-headless/references/PLAN-connect.md +0 -19
  153. package/skills/wix-headless/references/PLAN-create.md +0 -17
  154. package/skills/wix-headless/references/PLAN.md +0 -92
  155. package/skills/wix-headless/references/astro/blog/BLOG_PAGES.md +0 -300
  156. package/skills/wix-headless/references/astro/blog/BLOG_SETUP.md +0 -218
  157. package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +0 -45
  158. package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +0 -77
  159. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +0 -214
  160. package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +0 -231
  161. package/skills/wix-headless/references/astro/cms/PORTFOLIO.md +0 -453
  162. package/skills/wix-headless/references/astro/cms/RESOURCE_LIBRARY.md +0 -354
  163. package/skills/wix-headless/references/astro/cms/TEAM_DIRECTORY.md +0 -299
  164. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +0 -351
  165. package/skills/wix-headless/references/astro/ecom/CART_PAGES.md +0 -119
  166. package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +0 -103
  167. package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +0 -132
  168. package/skills/wix-headless/references/astro/forms/CONTACT_FORM.md +0 -463
  169. package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +0 -119
  170. package/skills/wix-headless/references/astro/gift-cards/PAGES.md +0 -129
  171. package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +0 -178
  172. package/skills/wix-headless/references/astro/stores/CATEGORY_PAGES.md +0 -85
  173. package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +0 -129
  174. package/skills/wix-headless/references/astro/stores/HOME_AND_NAV.md +0 -229
  175. package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +0 -215
  176. package/skills/wix-headless/references/astro/stores/SHARED_WIRING.md +0 -165
  177. package/skills/wix-headless/references/astro/templates/Layout.astro +0 -132
  178. package/skills/wix-headless/references/astro/templates/astro.config.mjs +0 -41
  179. package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +0 -374
  180. package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +0 -136
  181. package/skills/wix-headless/references/astro/templates/bookings/SeoTags.astro +0 -25
  182. package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +0 -71
  183. package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +0 -54
  184. package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +0 -49
  185. package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +0 -245
  186. package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +0 -424
  187. package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +0 -176
  188. package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +0 -181
  189. package/skills/wix-headless/references/astro/templates/ecom/CartBadge.tsx +0 -84
  190. package/skills/wix-headless/references/astro/templates/ecom/CartView.tsx +0 -543
  191. package/skills/wix-headless/references/astro/templates/ecom/cart.astro +0 -13
  192. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +0 -302
  193. package/skills/wix-headless/references/astro/templates/ecom/discounts.ts +0 -71
  194. package/skills/wix-headless/references/astro/templates/ecom/thank-you.astro +0 -24
  195. package/skills/wix-headless/references/astro/templates/gift-cards/GiftCardPurchase.tsx +0 -172
  196. package/skills/wix-headless/references/astro/templates/gift-cards/_home-teaser-snippet.astro +0 -42
  197. package/skills/wix-headless/references/astro/templates/gift-cards/_nav-snippet.astro +0 -11
  198. package/skills/wix-headless/references/astro/templates/gift-cards/components-gift-cards.css +0 -220
  199. package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.astro +0 -51
  200. package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.ts +0 -75
  201. package/skills/wix-headless/references/astro/templates/global.css +0 -288
  202. package/skills/wix-headless/references/astro/templates/stores/AddToCartButton.tsx +0 -77
  203. package/skills/wix-headless/references/astro/templates/stores/BackInStockForm.tsx +0 -176
  204. package/skills/wix-headless/references/astro/templates/stores/CategoryRail.astro +0 -69
  205. package/skills/wix-headless/references/astro/templates/stores/ProductCard.astro +0 -79
  206. package/skills/wix-headless/references/astro/templates/stores/ProductPurchase.tsx +0 -397
  207. package/skills/wix-headless/references/astro/templates/stores/SeoTags.astro +0 -21
  208. package/skills/wix-headless/references/astro/templates/stores/back-in-stock.ts +0 -67
  209. package/skills/wix-headless/references/astro/templates/stores/categories.ts +0 -155
  210. package/skills/wix-headless/references/astro/templates/stores/category/[slug].astro +0 -130
  211. package/skills/wix-headless/references/astro/templates/stores/components-stores.css +0 -400
  212. package/skills/wix-headless/references/astro/templates/stores/products/[slug].astro +0 -128
  213. package/skills/wix-headless/references/astro/templates/stores/products/index.astro +0 -101
  214. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +0 -161
  215. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +0 -32
  216. package/skills/wix-headless/references/bookings/FLOW.md +0 -246
  217. package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +0 -95
  218. package/skills/wix-headless/references/bookings/SERVICES_DATA.md +0 -355
  219. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +0 -176
  220. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +0 -71
  221. package/skills/wix-headless/references/commands/known-apps.json +0 -6
  222. package/skills/wix-headless/references/custom/CONNECTION_PLAN.md +0 -142
  223. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +0 -88
  224. package/skills/wix-headless/references/custom/blog/WIRING.md +0 -52
  225. package/skills/wix-headless/references/custom/bookings/WIRING.md +0 -197
  226. package/skills/wix-headless/references/custom/cms/WIRING.md +0 -97
  227. package/skills/wix-headless/references/custom/ecom/WIRING.md +0 -67
  228. package/skills/wix-headless/references/custom/forms/WIRING.md +0 -101
  229. package/skills/wix-headless/references/custom/stores/WIRING.md +0 -80
  230. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +0 -59
  231. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +0 -43
  232. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +0 -51
  233. package/skills/wix-headless/references/images/INSTRUCTIONS.md +0 -357
  234. package/skills/wix-headless/references/seed-recipes.md +0 -49
  235. package/skills/wix-headless/references/shared/AGENTS_MD.md +0 -47
  236. package/skills/wix-headless/references/shared/AUTHENTICATION.md +0 -108
  237. package/skills/wix-headless/references/shared/BUILD_NOISE.md +0 -8
  238. package/skills/wix-headless/references/shared/DESIGN_MD.md +0 -84
  239. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +0 -41
  240. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +0 -186
  241. package/skills/wix-headless/references/shared/IMPLEMENTER.md +0 -206
  242. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +0 -97
  243. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +0 -143
  244. package/skills/wix-headless/references/shared/STYLING.md +0 -140
  245. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +0 -126
  246. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +0 -252
  247. package/skills/wix-headless/references/verticals/_schema.json +0 -74
  248. package/skills/wix-headless/references/verticals/_schema.md +0 -95
  249. package/skills/wix-headless/references/verticals/blog.md +0 -31
  250. package/skills/wix-headless/references/verticals/bookings.md +0 -41
  251. package/skills/wix-headless/references/verticals/cms.md +0 -30
  252. package/skills/wix-headless/references/verticals/ecom.md +0 -25
  253. package/skills/wix-headless/references/verticals/forms.md +0 -26
  254. package/skills/wix-headless/references/verticals/gift-cards.md +0 -24
  255. package/skills/wix-headless/references/verticals/stores.md +0 -33
  256. package/skills/wix-headless/scripts/check-manifest.mjs +0 -335
  257. package/skills/wix-headless/scripts/compose.mjs +0 -520
  258. package/skills/wix-headless/scripts/emit-design-tokens.mjs +0 -157
  259. package/skills/wix-headless/scripts/flatten.sh +0 -61
  260. package/skills/wix-headless/scripts/generate-images.mjs +0 -242
  261. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +0 -154
  262. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +0 -190
  263. package/skills/wix-headless/scripts/scaffold.sh +0 -139
  264. package/skills/wix-headless/scripts/seed-utilities.sh +0 -93
  265. package/skills/wix-headless/scripts/write-decorative-json.mjs +0 -62
  266. package/skills/wix-headless/shared-utilities/analytics.ts +0 -40
  267. package/skills/wix-headless/shared-utilities/ricos.ts +0 -179
  268. package/skills/wix-headless/shared-utilities/wix-image.ts +0 -72
@@ -0,0 +1,140 @@
1
+ # Device Flow
2
+
3
+ Implements the OAuth 2.0 Device Authorization Grant (RFC 8628). The user approves in a browser while the agent polls for tokens.
4
+
5
+ Produces two kinds of token:
6
+ - **Account token** — works for account-level APIs (e.g. list sites). Expires in ~4 hours.
7
+ - **Site token** — required for any site-specific API (contacts, products, bookings, …). Derived on demand from the account `refreshToken` + a `siteId`. Expires in ~15 minutes.
8
+
9
+ ## Constants
10
+
11
+ ```
12
+ BASE_URL = https://manage.wix.com
13
+ CLIENT_ID = 6f95cec8-3e98-48b9-b4e5-1fb92fcd9973
14
+ ```
15
+
16
+ Required headers on every request:
17
+
18
+ ```
19
+ X-XSRF-TOKEN: nocheck
20
+ Cookie: XSRF-TOKEN=nocheck
21
+ User-Agent: wix-cli
22
+ Content-Type: application/json (on POST requests)
23
+ ```
24
+
25
+ ## Step 1 — Request a device code
26
+
27
+ ```
28
+ GET /oauth2/device/code?clientId=CLIENT_ID
29
+ ```
30
+
31
+ Response:
32
+
33
+ ```json
34
+ { "deviceCode": "…", "userCode": "XXXXXXXX", "verificationUri": "https://users.wix.com/login/device-login", "expiresIn": 600 }
35
+ ```
36
+
37
+ ## Step 2 — Ask the user to authorize
38
+
39
+ Show the user this URL and code:
40
+
41
+ ```
42
+ URL: {verificationUri}?color=developer&studio=true
43
+ Code: {userCode}
44
+ ```
45
+
46
+ Make sure the user has copied or noted the code **before** opening the link — they'll need to enter it on the page. Present the URL as a clickable link that opens in a new tab if your interface supports it.
47
+
48
+ ## Step 3 — Poll for the token
49
+
50
+ Every 3 seconds, POST:
51
+
52
+ ```
53
+ POST /oauth2/token
54
+ { "clientId": "CLIENT_ID", "grantType": "urn:ietf:params:oauth:grant-type:device_code", "scope": "offline_access", "deviceCode": "{deviceCode}" }
55
+ ```
56
+
57
+ - While waiting: server returns `400` with `{ "error": "authorization_pending" }` or `{ "message": "Device code is not yet verified" }` — keep polling.
58
+ - On approval: `200` with `{ "access_token": "…", "refresh_token": "…", "expires_in": 14400 }`.
59
+ - Stop polling after `expiresIn` seconds total.
60
+
61
+ ## Step 4 — Fetch user info
62
+
63
+ ```
64
+ GET /_serverless/wix-cli-userinfo/userinfo
65
+ Authorization: Bearer {access_token}
66
+ ```
67
+
68
+ Response: `{ "userId": "…", "email": "…" }`
69
+
70
+ ## Step 5 — Persist
71
+
72
+ At this point you already hold all the values in memory — store them securely to whatever credential store your platform provides (file, secrets manager, environment variables, etc.), without asking the user to enter them manually. **Treat these as secrets: never print them in the conversation, never include them in logs, and never send them to any service other than the Wix APIs.**
73
+
74
+ ```
75
+ accessToken string
76
+ refreshToken string
77
+ expiresIn number (seconds)
78
+ issuedAt number (Unix timestamp in seconds, recorded at the moment tokens were received)
79
+ userInfo { userId, email }
80
+ ```
81
+
82
+ ## Getting a valid token on subsequent calls
83
+
84
+ **Account token**
85
+
86
+ 1. Load stored credentials. If missing → run the device flow above.
87
+ 2. Check validity: `issuedAt + expiresIn - 600 > now` (10-min buffer).
88
+ 3. If expired → refresh silently:
89
+
90
+ ```
91
+ POST /oauth2/token
92
+ { "clientId": "CLIENT_ID", "grantType": "refresh_token", "refreshToken": "{refreshToken}" }
93
+ ```
94
+
95
+ Same response shape as Step 3. Persist the new tokens with a fresh `issuedAt`.
96
+
97
+ 4. If refresh returns `400 invalid_grant` → session revoked; run the device flow again.
98
+
99
+ **Site token**
100
+
101
+ The account token returns `403` on site-level endpoints. Derive a site token on demand:
102
+
103
+ ```
104
+ POST /oauth2/token
105
+ { "clientId": "CLIENT_ID", "grantType": "refresh_token", "refreshToken": "{refreshToken}", "siteId": "{siteId}" }
106
+ ```
107
+
108
+ Response: `{ "access_token": "…", "refresh_token": "…", "expires_in": 900 }`
109
+
110
+ Re-derive on each use rather than caching — it expires in 15 minutes.
111
+
112
+ ## Examples
113
+
114
+ **List sites (account token)**
115
+
116
+ ```
117
+ POST https://www.wixapis.com/site-list/v2/sites/query
118
+ Authorization: Bearer {accountToken}
119
+ { "query": { "filter": { "namespace": { "$in": ["WIX", "HEADLESS"] } }, "cursorPaging": { "limit": 100 } } }
120
+ ```
121
+
122
+ Returns `{ sites: [{ id, displayName, namespace, … }] }` — the `id` is the `siteId` for site-scoped calls.
123
+
124
+ > Without the `namespace` filter, headless sites are silently excluded from results.
125
+
126
+ **List contacts (site token)**
127
+
128
+ ```
129
+ POST https://www.wixapis.com/contacts/v4/contacts/query
130
+ Authorization: Bearer {siteToken}
131
+ { "query": { "paging": { "limit": 10 } } }
132
+ ```
133
+
134
+ Returns `{ contacts: […] }`.
135
+
136
+ ---
137
+
138
+ For the full Wix REST API reference — endpoints, request/response shapes, and field details — see [https://www.wix.com/skills/docs](https://www.wix.com/skills/docs).
139
+
140
+ For REST API recipes covering common management operations (stores, bookings, contacts, CMS, and more) — see [https://www.wix.com/skills/manage](https://www.wix.com/skills/manage).
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: wix-docs
3
+ description: "Look up the Wix API/SDK documentation to confirm an exact endpoint, HTTP method, request/response shape, field, enum, or error before writing Wix code — never guess a Wix API from memory. A lookup is a short flow: find the right page, then read it. Two ways: (1) plain `curl` (zero dependencies) — find a page by **semantic search** (`POST /mcp-docs-search/v1/docs/search`, natural-language `{ search_term, document_type }`) **or by browsing** the docs tree as a menu from the `llms.txt` root (append `.md` to any docs path), then read the page by appending `.md` to its URL; and (2) the Wix MCP doc tools when your agent has them. Triggers: look up a Wix API, find the Wix endpoint/method, confirm a Wix request body or field, verify a Wix API shape, explore Wix docs, which Wix API do I call, read a Wix method schema."
4
+ ---
5
+
6
+ # Wix Docs — look up the Wix API/SDK documentation
7
+
8
+ Get the **exact** truth about a Wix API — endpoint, HTTP method, request/response body, a field, an
9
+ enum, or an error. **Never invent a Wix endpoint, path, body, or enum from memory** — confirm it
10
+ here first.
11
+
12
+ A lookup is a short flow: **find the right page, then read it.** Do it with `curl` (default, below)
13
+ or the Wix MCP doc tools if your agent has them (Lane 2).
14
+
15
+ ## Lane 1 — `curl` (default)
16
+
17
+ The docs are one tree of markdown pages: **append `.md` to any `https://dev.wix.com/docs/…` URL**
18
+ to get that page as markdown. No SDK, no MCP.
19
+
20
+ ### 1. Find the page — search, browse, or query the index
21
+
22
+ Three ways to reach the right page — use whichever fits.
23
+
24
+ **A. Semantic search.** Describe what you want in natural language ("let a customer book an
25
+ appointment"), not just keywords; hits come back ranked by relevance. Same `POST` body for both
26
+ variants: `search_term` (required, 1–500), `document_type` (`REST` default · `SDK` · `WIX_HEADLESS` ·
27
+ `BUSINESS_SOLUTIONS` · `VELO` · `WDS` · `BUILD_APPS` · `CLI`), `maximum_results` (1–20, def 15),
28
+ `lines_in_each_result` (1–200, def 20). Two variants — pick by what you're doing:
29
+
30
+ **`/docs/search/markdown` → read it (start here).** Returns JSON with a single `content` field
31
+ holding one LLM-ready markdown string (extract it with `jq -r '.content'`) where each hit is a
32
+ **condensed method doc**: the API **endpoint**, **real request code examples**, the **response
33
+ shape**, and the **method description** (with its gotchas) — each truncated to `lines_in_each_result`
34
+ with a "read more" link. For *"how do I call X?"* this is usually all you need in **one call** — hand
35
+ it straight to the model; no page fetch, no schema dig.
36
+
37
+ ```bash
38
+ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdown' \
39
+ -H 'Content-Type: application/json' \
40
+ --data-raw '{"search_term":"create a booking","document_type":"REST","maximum_results":3}' \
41
+ | jq -r '.content' # no jq? → python3 -c 'import sys,json;print(json.load(sys.stdin)["content"])'
42
+ ```
43
+
44
+ **`/docs/search` (JSON) → route on it.** Returns `{ results: [ { title, url, content,
45
+ relevance_score, … } ] }` — structured hits. Use it when you want to **pick/route programmatically**:
46
+ grab a hit's `url` to read that page (§2) or feed it to the schema query (§C). (Method hits carry a
47
+ `url`; article hits keep their link inside `content`.)
48
+
49
+ ```bash
50
+ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search' \
51
+ -H 'Content-Type: application/json' \
52
+ --data-raw '{"search_term":"create a booking","document_type":"REST","maximum_results":5}' \
53
+ | jq -r '.results[] | select(.url) | "\(.title)\t\(.url)"'
54
+ # no jq? → python3 -c 'import sys,json;[print(r["title"],r["url"]) for r in json.load(sys.stdin)["results"] if r.get("url")]'
55
+ ```
56
+
57
+ **B. Browse the tree from the root, like a menu.** Every docs path has a `.md` twin, so you can
58
+ navigate the docs as a menu tree — no search needed. `curl https://dev.wix.com/docs/llms.txt` is the
59
+ top-level map; the portals under it:
60
+
61
+ | Portal | Start here for |
62
+ |---|---|
63
+ | [`api-reference.md`](https://dev.wix.com/docs/api-reference.md) | **All backend / business-solution APIs — the main one.** Each page documents **both** its REST and SDK usage (`.md?apiView=SDK` for the SDK view). |
64
+ | [`sdk.md`](https://dev.wix.com/docs/sdk.md) | **SDK-only surfaces not in the API reference:** client setup (`createClient`, `OAuthStrategy`), core modules (`@wix/sdk`, `@wix/essentials`), host modules (`dashboard`/`editor`/`site`), and frontend modules (`members`, `pay`, `seo`, `storage`, `pricing-plans`, …). |
65
+ | [`go-headless.md`](https://dev.wix.com/docs/go-headless.md) | Headless setup, auth, hosting, framework integration. |
66
+ | [`build-apps.md`](https://dev.wix.com/docs/build-apps.md) | Building Wix apps / extensions. |
67
+ | [`wix-cli.md`](https://dev.wix.com/docs/wix-cli.md) · [`velo.md`](https://dev.wix.com/docs/velo.md) | Wix CLI commands; Velo site-coding APIs. |
68
+
69
+ **Drill like a menu** — append `.md` to any path (a *section* → a menu of child links, a *leaf* →
70
+ the content/method page); truncate to go up, extend to go down. **Read the sibling intro / "About …"
71
+ / flow articles too**, not just the method page. Example — drill to the create-booking method,
72
+ grepping each menu for the next link:
73
+
74
+ ```bash
75
+ curl -sS https://dev.wix.com/docs/api-reference/business-solutions.md | grep -i bookings # → .../bookings.md
76
+ curl -sS https://dev.wix.com/docs/api-reference/business-solutions/bookings.md | grep -iE 'bookings|flow' # → resource/flow pages
77
+ curl -sS https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings.md | grep -i create # → the create method leaf
78
+ curl -sS https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/create-booking.md # read it
79
+ ```
80
+
81
+ A 2-level map of the API-reference portal (all verticals, one level down) is in
82
+ `references/EXTRACTING.md`.
83
+
84
+ **C. Query the API index — one call, structured.** The `code-mode` search endpoint runs a JS
85
+ function over `lightIndex` (the whole REST API spec: every resource + method with `operationId`,
86
+ `httpMethod`, `menuPath`, `docsUrl`, and executable `publicUrl`). Best when you want to
87
+ **enumerate/filter methods programmatically** — browse a vertical, or grep across *all* methods —
88
+ and get the `docsUrl` + `publicUrl` back in one shot, no menu-drilling:
89
+
90
+ ```bash
91
+ # pinpoint a method by keyword across the whole index → its docsUrl + executable publicUrl
92
+ curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: application/json' \
93
+ --data-raw '{"code":"async function(){ return lightIndex.flatMap(r=>r.methods).filter(m=>/createBooking$/i.test(m.operationId)).map(m=>({op:m.operationId, httpMethod:m.httpMethod, publicUrl:m.publicUrl, docsUrl:m.docsUrl})); }"}'
94
+ ```
95
+
96
+ **Filter narrowly and return only the fields you need** — the index is large, so an unfiltered dump
97
+ is huge. Scope: **REST API methods only** (not concept/guide articles, headless prose, or SDK-only
98
+ surfaces — use A/B for those). More examples (browse a whole vertical, `menuPath` walk,
99
+ whole-resource schema) and the `getResourceSchema` reader → **`references/API_SPEC_SEARCH.md`**.
100
+
101
+ If the Wix MCP is present, it exposes these same capabilities as native tools (no `curl`/JSON
102
+ boilerplate) — Lane 2.
103
+
104
+ ### 2. Read what you land on
105
+
106
+ Appending `.md` to a URL gives one of **three kinds of page**. Know which you're looking at, and
107
+ handle it accordingly:
108
+
109
+ - **Menu page** — a *section* path (from browsing, §1B). A list of child links, often tens of KB —
110
+ **don't read it whole; `grep` it** for the child you want, then drill into that page:
111
+
112
+ ```bash
113
+ curl -sS 'https://dev.wix.com/docs/api-reference/business-solutions/bookings.md' | grep -i 'booking'
114
+ ```
115
+
116
+ - **Article / guide** — introductions, concepts, sample-flow pages. Prose markdown, usually small —
117
+ **read it whole**:
118
+
119
+ ```bash
120
+ curl -sS 'https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/introduction.md'
121
+ ```
122
+
123
+ - **Method page** — one API method, and the heavy one: it carries **both** a REST and a JavaScript
124
+ SDK section, the full request/response schema, and code examples — often 100 KB+. **Don't swallow
125
+ the whole page** — map it, then pull the part you need (the examples are usually enough to model a
126
+ call):
127
+
128
+ ```bash
129
+ curl -sS "$URL.md" | grep -nE '^#{1,3} ' # 1. map the outline
130
+ curl -sS "$URL.md" | awk '/^## REST API/{r=1} r&&/^### Examples/{f=1} /^## JavaScript SDK/{f=0} f' # 2. just the REST examples
131
+ curl -sS "$URL.md" | grep -nE 'name: (selectedPaymentOption|totalParticipants)' # 3. grep specific schema fields
132
+ ```
133
+
134
+ More recipes (split REST vs SDK, resolve an enum) → `references/EXTRACTING.md`.
135
+
136
+ For the exact **structured** schema and enum values, don't hand-slice the markdown — query the API
137
+ spec with a `curl` `POST` to `https://mcp.wix.com/api/code-mode/search` (the no-MCP equivalent of
138
+ the MCP `SearchWixAPISpec`). The `code` is a JS function with `lightIndex` and
139
+ `getResourceSchemaByUrl(docsUrl)` in scope; return only what you need:
140
+
141
+ ```bash
142
+ # find a method by keyword → its docsUrl + executable publicUrl
143
+ curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: application/json' \
144
+ --data-raw '{"code":"async function(){ return lightIndex.flatMap(r=>r.methods).filter(m=>/createBooking$/i.test(m.operationId)).map(m=>({op:m.operationId, httpMethod:m.httpMethod, publicUrl:m.publicUrl, docsUrl:m.docsUrl})); }"}'
145
+
146
+ # pull one method's request/response schema by its docsUrl (resolve $circular refs via s.components.schemas)
147
+ curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: application/json' \
148
+ --data-raw '{"code":"async function(){ const u=\"https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/create-booking\"; const s=await getResourceSchemaByUrl(u); const m=s.methods.find(x=>x.docsUrl===u); return { publicUrl:m.publicUrl, requestBody:m.requestBody, responses:m.responses }; }"}'
149
+ ```
150
+
151
+ Full example set (resource listing, partial-URL resolution, enum/nested-ref expansion) →
152
+ `references/API_SPEC_SEARCH.md`.
153
+
154
+ ## Lane 2 — Wix MCP doc tools (only if your agent has them)
155
+
156
+ If the Wix MCP is connected, these are the **same backends as Lane 1** (the doc-search service and
157
+ the API-spec index) wrapped as native tools — schema-validated, response-size handled, no
158
+ `curl`/JSON boilerplate. A convenience over the curl lane, **not a richer data source**; use them
159
+ when present, fall back to Lane 1 when not. Optional — skip this lane if the tools aren't present.
160
+
161
+ | Tool | Use for |
162
+ |---|---|
163
+ | `SearchWixRESTDocumentation` | Find a REST method/recipe by keyword |
164
+ | `SearchWixSDKDocumentation` | Find an SDK method (surfaces runtime functions a module menu hides) |
165
+ | `SearchWixAPISpec` → `getResourceSchemaByUrl` | The **whole resource** — every method + shared object schema in one payload |
166
+ | `ReadFullDocsArticle` | Read a recipe/flow/article page in full |
167
+ | `BrowseWixRESTDocsMenu` | Walk the menu tree to drill to a method |
168
+
169
+ - **Prefer the whole-resource view** (`getResourceSchemaByUrl`) over a single method page: a
170
+ requirement is often documented on a *sibling* method (e.g. a `memberId` required on
171
+ single-create but omitted from the bulk-create page). The resource view carries both.
172
+ - **Look for the vertical's recipe/flow page first** — many verticals publish opinionated,
173
+ multi-step recipes under a `…/business-solutions/<vertical>/skills` node (search
174
+ `"<vertical> setup recipe"` or browse the menu). A recipe gives correct ordering,
175
+ cross-step gotchas, and the one bundled endpoint that does the whole job — which a
176
+ per-method schema won't flag.
177
+
178
+ ## The `.md` suffix
179
+
180
+ Append `.md` only when `curl`-ing a page directly. The MCP tools and the search endpoint take the
181
+ plain docs URL **without** `.md` — never feed a `.md` URL to an MCP tool.
182
+
183
+ ## Before you write the code
184
+
185
+ Confirm on the page — not from memory — the endpoint, the HTTP verb, the request body shape,
186
+ required fields, and any enum values. Then write the call. If you're extending a skill's shipped
187
+ client, keep the skill's existing transport/helper style; you're adding one call, not
188
+ re-architecting.
@@ -0,0 +1,213 @@
1
+ # Structured API-spec search over `curl` (no MCP)
2
+
3
+ A single `curl` endpoint that runs a JS query over the Wix REST API spec — the no-MCP equivalent of
4
+ the MCP `SearchWixAPISpec` / `getResourceSchemaByUrl` tools. It does two jobs:
5
+
6
+ - **Find / browse** — `lightIndex` is the whole API index (every resource + method with
7
+ `operationId`, `httpMethod`, `menuPath`, `docsUrl`, `publicUrl`). Filter or enumerate it to locate
8
+ methods programmatically — a third find-path alongside semantic search and `.md` browsing (`SKILL.md`).
9
+ - **Read the schema** — `getResourceSchemaByUrl(docsUrl)` returns the **exact request/response shape,
10
+ field types, enums, and error codes** for a method (the markdown pages bury these in huge inline
11
+ schemas).
12
+
13
+ > **Endpoint:** `POST https://mcp.wix.com/api/code-mode/search` — body `{ "code": "<async function() {…}>" }`.
14
+ > The `code` is a JS `async function()` that runs in a read-only sandbox and returns any
15
+ > JSON-serializable value. Response envelope: `{ "result": <return value> }` (or `{ "error": "<msg>" }`).
16
+
17
+ > Internal/undocumented and pre-GA — treat it as best-effort; the contract could change. For
18
+ > reading a single known page, the `.md` twin in `SKILL.md` is simpler — reach here when you
19
+ > specifically need the **structured spec**.
20
+
21
+ ## How to call it
22
+
23
+ Send the function as the JSON string `code`. Multi-line functions are easiest to send by encoding
24
+ with a helper (keeps quotes/newlines valid):
25
+
26
+ ```bash
27
+ read -r -d '' CODE <<'JS'
28
+ async function() {
29
+ return lightIndex.filter(r => r.menuPath.includes("bookings")).map(r => r.name);
30
+ }
31
+ JS
32
+ curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' \
33
+ -H 'Content-Type: application/json' \
34
+ --data "$(jq -n --arg code "$CODE" '{code:$code}')" # or: python3 -c 'import json,sys;print(json.dumps({"code":sys.stdin.read()}))'
35
+ ```
36
+
37
+ A short function can go inline: `--data-raw '{"code":"async function(){ return lightIndex.length; }"}'`.
38
+ **Shape the result inside the function and return only what you need** — a whole resource schema is
39
+ ~200 KB+, so never `return await getResourceSchema(id)` wholesale.
40
+
41
+ ## Sandbox globals
42
+
43
+ **`lightIndex`** — array of the REST API resources. Each entry:
44
+
45
+ | Field | Meaning |
46
+ |---|---|
47
+ | `name` | Resource display name (e.g. `"Products V3"`, `"Bookings Writer V2"`) |
48
+ | `resourceId` | Internal handle for `getResourceSchema()` |
49
+ | `docsUrl` | Resource docs page |
50
+ | `menuPath` | e.g. `["business-solutions","stores","catalog-v3","products-v3"]` |
51
+ | `methods[]` | `{ operationId, summary, httpMethod, path, docsUrl, publicUrl, publicBaseUrl, description }` |
52
+
53
+ **`getResourceSchemaByUrl(docsUrl)`** *(preferred when you have a URL)* and
54
+ **`getResourceSchema(resourceId)`** — return the full resource schema:
55
+
56
+ ```
57
+ { title, description, fqdn, docsUrl,
58
+ methods: [ { summary, description, operationId, httpMethod, path, docsUrl,
59
+ publicUrl, publicBaseUrl, requestBody, responses, parameters,
60
+ permissions, queryMethodData, legacyExamples: [ { content: { title, request, response } } ] } ],
61
+ components: { schemas: { …every referenced type… } } }
62
+ ```
63
+
64
+ **`articles`** — array of doc articles `{ name, resourceId, docsUrl, menuPath, description }`;
65
+ **`getArticleContentByUrl(docsUrl)`** / **`getArticleContent(resourceId)`** — return an article's
66
+ full markdown. Articles and resources share the same `menuPath` hierarchy.
67
+
68
+ ### Rules that matter
69
+
70
+ - **Execute with `method.publicUrl`** — the complete `https://www.wixapis.com/...` URL. `method.path`
71
+ is a *partial* path (omits the gateway prefix like `/stores`) — never build a URL from it, and
72
+ never use `method.servers[0]` (internal hosts).
73
+ - **Always return `responses` alongside `requestBody`** when inspecting a method — saves a re-run.
74
+ - **`$circular` refs:** schemas reference types as `{ "$circular": "TypeName" }`, resolved via
75
+ `schema.components.schemas["TypeName"]`. Expand only the types you need (see the nested-refs
76
+ example); a full recursive expand can be huge.
77
+ - **Filterable/sortable fields:** for query/search methods, `method.queryMethodData.queryFieldsCapabilitiesMap`
78
+ lists which fields accept filters (and their operators) and sorting. A field absent from the map
79
+ is rejected by the API — filter it client-side after fetching a bounded page.
80
+ - `getResourceSchemaByUrl` resolves **API method/resource** URLs only — not `/skills/…` or article
81
+ pages (use `getArticleContentByUrl` for those). On a miss, search `lightIndex` by keyword instead
82
+ of retrying the URL.
83
+
84
+ ## Examples
85
+
86
+ Each is an `async function()` — send it via the wrapper above.
87
+
88
+ **Find APIs by broad keywords** (when you don't have a docs URL):
89
+
90
+ ```javascript
91
+ async function() {
92
+ const words = ["stores", "query", "products"];
93
+ return lightIndex.flatMap(resource =>
94
+ resource.methods
95
+ .filter(method => {
96
+ const haystack = [
97
+ resource.name, resource.docsUrl, resource.menuPath.join("/"),
98
+ method.summary, method.operationId, method.description, method.path, method.docsUrl
99
+ ].join(" ").toLowerCase();
100
+ return words.every(word => haystack.includes(word));
101
+ })
102
+ .map(method => ({
103
+ title: method.summary, resource: resource.name,
104
+ httpMethod: method.httpMethod.toUpperCase(),
105
+ docsUrl: method.docsUrl, publicUrl: method.publicUrl
106
+ }))
107
+ );
108
+ }
109
+ ```
110
+
111
+ **Inspect one method by exact docs URL** (request + response + query capabilities + curl examples):
112
+
113
+ ```javascript
114
+ async function() {
115
+ const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
116
+ const schema = await getResourceSchemaByUrl(methodUrl);
117
+ const method = schema.methods.find(m => m.docsUrl === methodUrl);
118
+ if (!method) {
119
+ return { message: "No exact method match", methods: schema.methods.map(m => ({ title: m.summary, docsUrl: m.docsUrl, httpMethod: m.httpMethod.toUpperCase(), publicUrl: m.publicUrl })) };
120
+ }
121
+ return {
122
+ title: method.summary,
123
+ publicUrl: method.publicUrl,
124
+ httpMethod: method.httpMethod.toUpperCase(),
125
+ operationId: method.operationId,
126
+ permissions: method.permissions,
127
+ parameters: method.parameters,
128
+ requestBody: method.requestBody,
129
+ responses: method.responses,
130
+ queryFieldsCapabilities: method.queryMethodData?.queryFieldsCapabilitiesMap,
131
+ curlExamples: method.legacyExamples?.map(e => e.content)
132
+ };
133
+ }
134
+ ```
135
+
136
+ **Inspect a whole resource by its docs URL** (list its methods):
137
+
138
+ ```javascript
139
+ async function() {
140
+ const schema = await getResourceSchemaByUrl("https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3");
141
+ return {
142
+ resource: schema.title,
143
+ description: schema.description,
144
+ methods: schema.methods.map(m => ({ title: m.summary, httpMethod: m.httpMethod.toUpperCase(), docsUrl: m.docsUrl, publicUrl: m.publicUrl, operationId: m.operationId }))
145
+ };
146
+ }
147
+ ```
148
+
149
+ **Resolve one method from a partial docs URL** (when you only have a path fragment):
150
+
151
+ ```javascript
152
+ async function() {
153
+ const partial = "stores/catalog-v3/products-v3/query-products";
154
+ const resource = lightIndex.find(r =>
155
+ r.docsUrl.includes(partial) || r.methods.some(m => m.docsUrl?.includes(partial)));
156
+ if (!resource) return "No API resource found for this partial URL";
157
+ const schema = await getResourceSchemaByUrl(resource.methods.find(m => m.docsUrl?.includes(partial))?.docsUrl ?? resource.docsUrl);
158
+ const method = schema.methods.find(m => m.docsUrl?.includes(partial));
159
+ return method
160
+ ? { title: method.summary, publicUrl: method.publicUrl, httpMethod: method.httpMethod.toUpperCase(), requestBody: method.requestBody, responses: method.responses }
161
+ : { message: "Resource found, no exact method", methods: schema.methods.map(m => m.docsUrl) };
162
+ }
163
+ ```
164
+
165
+ **Expand selected nested `$circular` types** (targeted — resolve only what you need):
166
+
167
+ ```javascript
168
+ async function() {
169
+ const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
170
+ const schema = await getResourceSchemaByUrl(methodUrl);
171
+ const method = schema.methods.find(m => m.docsUrl === methodUrl);
172
+ return {
173
+ requestBody: method.requestBody,
174
+ selectedNestedTypes: {
175
+ product: schema.components.schemas["com.wix.stores.catalog.product.api.v3.Product"],
176
+ cursorPaging: schema.components.schemas["wix.stores.catalog.v3.upstream.wix.common.CursorPaging"]
177
+ }
178
+ };
179
+ }
180
+ ```
181
+
182
+ **Advanced — bounded recursive expansion** (only when top-level + selected refs aren't enough; keep
183
+ depth small, schemas balloon fast):
184
+
185
+ ```javascript
186
+ async function() {
187
+ const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
188
+ const schema = await getResourceSchemaByUrl(methodUrl);
189
+ const method = schema.methods.find(m => m.docsUrl === methodUrl);
190
+ function expand(value, depth = 0, seen = []) {
191
+ if (depth > 3) return value;
192
+ if (Array.isArray(value)) return value.map(v => expand(v, depth, seen));
193
+ if (!value || typeof value !== "object") return value;
194
+ if (value.$circular) {
195
+ const name = value.$circular;
196
+ if (seen.includes(name)) return { $ref: name, circular: true };
197
+ const target = schema.components?.schemas?.[name];
198
+ return target ? { $ref: name, schema: expand(target, depth + 1, seen.concat(name)) } : { $ref: name, missing: true };
199
+ }
200
+ return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, expand(v, depth, seen)]));
201
+ }
202
+ return { title: method.summary, publicUrl: method.publicUrl, requestBody: expand(method.requestBody), responses: expand(method.responses) };
203
+ }
204
+ ```
205
+
206
+ ## When to use this vs. the other lanes
207
+
208
+ - **Find by intent / read prose / a quick field** → `SKILL.md` (semantic doc-search, `.md` twin/browse).
209
+ - **Enumerate or filter API methods** (browse a vertical, grep across all methods, get `publicUrl`s) → `lightIndex`, here.
210
+ - **Exact structured schema, enums, error codes — and no MCP** → `getResourceSchema[ByUrl]`, here.
211
+ - **You have the Wix MCP** → prefer `SearchWixAPISpec` → `getResourceSchemaByUrl` (same data, native tool).
212
+
213
+ Always confirm the endpoint, HTTP verb, and body shape here before writing the call — never guess.
@@ -0,0 +1,120 @@
1
+ # Extracting what you need from big doc pages
2
+
3
+ `SKILL.md`'s flow — find a page, then read it — covers the common case. This is the detail for the
4
+ **two heavy pages** you hit along the way: big **menu** pages (when you navigate by hand) and big
5
+ **method** pages (the actual API reference). The goal both times: pull only the part you need with
6
+ `curl` + `grep`/`awk`, never swallow the whole page. No dependencies.
7
+
8
+ ## Menu pages — find the child link fast
9
+
10
+ A menu page (a section path + `.md`) is a list of links to its children and can be tens of KB. Don't
11
+ read it whole:
12
+
13
+ - **Grep it** for the child you're after, then drill into that URL:
14
+
15
+ ```bash
16
+ curl -sS 'https://dev.wix.com/docs/api-reference/business-solutions/bookings.md' | grep -i 'booking'
17
+ ```
18
+
19
+ - **Walk down** by extending the path and re-appending `.md` — e.g. the portal root
20
+ `https://dev.wix.com/docs/api-reference.md` → a vertical `…/business-solutions/bookings.md` → a
21
+ resource `…/bookings/bookings/bookings-writer-v2.md`.
22
+ - **The whole tree at once:** `https://dev.wix.com/docs/llms.txt` is the grep-able index of every
23
+ page; `https://dev.wix.com/docs/llms-full.txt` is the full concatenated corpus (very large — grep,
24
+ don't read).
25
+
26
+ ### A partial map to orient from
27
+
28
+ Paths under `https://dev.wix.com/docs/` — **append `.md` to any of them** to read that page.
29
+ **This is a pruned map, not the full tree** — `…` marks where real children were left out; the
30
+ deep leaves are cherry-picked to show how far it goes. Re-derive from the `.md` menus / `llms.txt`
31
+ for anything not shown.
32
+
33
+ ```text
34
+ dev.wix.com/docs/ ← append .md to any path below
35
+ ├── api-reference/ all backend APIs — REST + SDK on every page
36
+ │ ├── business-solutions/ vertical → app/version → resource → method
37
+ │ │ ├── stores/
38
+ │ │ │ └── catalog-v3/ V3 catalog (introduction · e-commerce-integration · …)
39
+ │ │ │ ├── products-v3/ the products resource
40
+ │ │ │ │ ├── query-products ← method page (leaf: schema + examples)
41
+ │ │ │ │ ├── create-product-with-inventory ← method (create + stock in one call)
42
+ │ │ │ │ └── get-product · search-products · update-product · count-products · …
43
+ │ │ │ └── inventory-items-v3/ · categories/ · customizations-v3/ · brands-v3/ · …
44
+ │ │ ├── bookings/
45
+ │ │ │ └── bookings/ core resource group (nested under the vertical)
46
+ │ │ │ ├── bookings-writer-v2/ writes
47
+ │ │ │ │ └── create-booking ← method (leaf); + bulk-create-booking · …
48
+ │ │ │ └── bookings-reader-v2/ · attendance/ · waitlist/ · …
49
+ │ │ ├── e-commerce/ cart, checkout, orders, discounts
50
+ │ │ ├── cms/ Wix Data — data-items, collections
51
+ │ │ └── blog/ · events/ · pricing-plans/ · restaurants/ · portfolio/ · gift-cards/ · coupons/ · donations/ · …
52
+ │ ├── crm/ contacts, members, forms, inbox, loyalty
53
+ │ ├── business-management/ payments, invoices, SEO, site-properties, automations
54
+ │ ├── app-management/ install apps, OAuth, app-instance/installations
55
+ │ ├── assets/ media, rich-content
56
+ │ └── account-level/ · site/ · tools/ · articles/ domains/sites, site config, auth/query guides
57
+ ├── sdk/ SDK-only surfaces (not in api-reference)
58
+ │ ├── articles/set-up-a-client createClient + OAuthStrategy setup
59
+ │ ├── core-modules/
60
+ │ │ ├── sdk/ @wix/sdk
61
+ │ │ │ ├── wix-client · oauth-strategy · setup client creation + auth strategies
62
+ │ │ │ └── media · api-key-strategy · app-strategy · …
63
+ │ │ └── essentials/ · realtime/ · web-methods/ elevate/host-bridge · realtime · web methods
64
+ │ ├── host-modules/ dashboard · editor · site (build on Wix surfaces)
65
+ │ └── frontend-modules/
66
+ │ ├── members/ introduction · custom-fields · …
67
+ │ └── pay/ · seo/ · storage/ · pricing-plans/ · location/ · …
68
+ ├── go-headless/ headless setup, auth, hosting, framework integration
69
+ ├── build-apps/ building Wix apps / extensions
70
+ ├── wix-cli/
71
+ │ ├── guides/ project-structure · about-the-wix-cli · …
72
+ │ └── command-reference/ project-creation · project-commands · global-commands
73
+ ├── velo/ · develop-websites/ Velo site-coding APIs + guides
74
+ └── … (full portal list: curl llms.txt)
75
+ ```
76
+
77
+ ## Method pages — slice, don't swallow
78
+
79
+ A method page is often **huge** (Create Booking's `.md` is ~144 KB / 900+ lines). It carries **both**
80
+ a `## REST API` and a `## JavaScript SDK` section (~70 KB each), and each has its own `### Schema`
81
+ (the bulk — 60 KB+ of inline, deeply-nested types) and a much smaller `### Examples`. Map it, then
82
+ cut to the one piece you need.
83
+
84
+ **1. Map first — outline only (cheap, ~18 lines):**
85
+
86
+ ```bash
87
+ curl -sS "$URL.md" | grep -nE '^#{1,3} '
88
+ # 26:## REST API 28:### Schema 329:### Examples 481:## JavaScript SDK 483:### Schema ...
89
+ ```
90
+
91
+ **2. Keep only the API you use** — halves the page. (Better: search with `document_type: REST` *or*
92
+ `SDK` so hits already point at the right half.)
93
+
94
+ ```bash
95
+ curl -sS "$URL.md" | awk '/^## REST API/{f=1} /^## JavaScript SDK/{f=0} f' # REST only
96
+ curl -sS "$URL.md" | awk '/^## JavaScript SDK/{f=1} f' # SDK only
97
+ ```
98
+
99
+ **3. Prefer Examples over Schema to model a call** — the examples block is small (~9 KB) and usually
100
+ enough to copy a working request:
101
+
102
+ ```bash
103
+ curl -sS "$URL.md" | awk '/^## REST API/{r=1} r&&/^### Examples/{f=1} /^## JavaScript SDK/{f=0} f'
104
+ ```
105
+
106
+ **4. Drill into a giant Schema by field — don't read it whole.** Schema lines are one-per-field:
107
+ `- name: <field> | type: <Type> | description: … | validation: …`. Grep the field(s) you care about
108
+ (each appears once for the request, once for the response — you get both shape + rules):
109
+
110
+ ```bash
111
+ curl -sS "$URL.md" | grep -nE 'name: (selectedPaymentOption|totalParticipants)'
112
+ # resolve a referenced type's enum values by grepping the Type name, e.g.: grep -nE 'SelectedPaymentOption'
113
+ ```
114
+
115
+ **5. Cap the search response** — on `…/docs/search/markdown`, pass `maximum_results` (1–20) and
116
+ `lines_in_each_result` (1–200) so each hit is truncated with a "Read more here: `<url>`" hint instead
117
+ of dumping full pages.
118
+
119
+ **For deep/nested schemas**, don't hand-slice markdown — query the structured spec instead
120
+ (`references/API_SPEC_SEARCH.md`, or the Wix MCP `SearchWixAPISpec → getResourceSchemaByUrl`).