@salesforce/b2c-cli 2.3.1 → 2.5.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 (442) hide show
  1. package/bin/dev.js +8 -8
  2. package/bin/run.js +5 -7
  3. package/content/guidance/b2c/b2c-business-manager-extensions/SKILL.md +361 -0
  4. package/content/guidance/b2c/b2c-business-manager-extensions/references/EXTENSIONS-XML.md +458 -0
  5. package/content/guidance/b2c/b2c-controllers/SKILL.md +301 -0
  6. package/content/guidance/b2c/b2c-controllers/references/CLASSIC-PATTERNS.md +335 -0
  7. package/content/guidance/b2c/b2c-controllers/references/SFRA-PATTERNS.md +400 -0
  8. package/content/guidance/b2c/b2c-custom-api-development/SKILL.md +281 -0
  9. package/content/guidance/b2c/b2c-custom-api-development/references/CONTRACT.md +142 -0
  10. package/content/guidance/b2c/b2c-custom-api-development/references/IMPLEMENTATION.md +153 -0
  11. package/content/guidance/b2c/b2c-custom-api-development/references/TESTING.md +118 -0
  12. package/content/guidance/b2c/b2c-custom-caches/SKILL.md +279 -0
  13. package/content/guidance/b2c/b2c-custom-job-steps/SKILL.md +520 -0
  14. package/content/guidance/b2c/b2c-custom-job-steps/references/CHUNK-ORIENTED.md +377 -0
  15. package/content/guidance/b2c/b2c-custom-job-steps/references/JOBS-XML.md +212 -0
  16. package/content/guidance/b2c/b2c-custom-job-steps/references/STEPTYPES-JSON.md +373 -0
  17. package/content/guidance/b2c/b2c-custom-job-steps/references/TASK-ORIENTED.md +344 -0
  18. package/content/guidance/b2c/b2c-custom-objects/SKILL.md +327 -0
  19. package/content/guidance/b2c/b2c-custom-objects/references/OCAPI-SEARCH.md +298 -0
  20. package/content/guidance/b2c/b2c-forms/SKILL.md +242 -0
  21. package/content/guidance/b2c/b2c-forms/references/FORM-XML.md +409 -0
  22. package/content/guidance/b2c/b2c-hooks/SKILL.md +500 -0
  23. package/content/guidance/b2c/b2c-hooks/references/OCAPI-SCAPI-HOOKS.md +403 -0
  24. package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +169 -0
  25. package/content/guidance/b2c/b2c-hooks/references/SYSTEM-HOOKS.md +433 -0
  26. package/content/guidance/b2c/b2c-isml/SKILL.md +320 -0
  27. package/content/guidance/b2c/b2c-isml/references/EXPRESSIONS.md +366 -0
  28. package/content/guidance/b2c/b2c-isml/references/TAGS.md +443 -0
  29. package/content/guidance/b2c/b2c-localization/SKILL.md +344 -0
  30. package/content/guidance/b2c/b2c-localization/references/PATTERNS.md +407 -0
  31. package/content/guidance/b2c/b2c-logging/SKILL.md +352 -0
  32. package/content/guidance/b2c/b2c-logging/references/LOG-FILES.md +282 -0
  33. package/content/guidance/b2c/b2c-metadata/SKILL.md +406 -0
  34. package/content/guidance/b2c/b2c-metadata/references/SYSTEM-OBJECTS.md +320 -0
  35. package/content/guidance/b2c/b2c-metadata/references/XML-EXAMPLES.md +366 -0
  36. package/content/guidance/b2c/b2c-onboarding/SKILL.md +154 -0
  37. package/content/guidance/b2c/b2c-ordering/SKILL.md +391 -0
  38. package/content/guidance/b2c/b2c-page-designer/SKILL.md +410 -0
  39. package/content/guidance/b2c/b2c-page-designer/references/ATTRIBUTE-TYPES.md +436 -0
  40. package/content/guidance/b2c/b2c-page-designer/references/META-DEFINITIONS.md +340 -0
  41. package/content/guidance/b2c/b2c-querying-data/SKILL.md +289 -0
  42. package/content/guidance/b2c/b2c-querying-data/references/PERFORMANCE-APIS.md +74 -0
  43. package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +53 -0
  44. package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +440 -0
  45. package/content/guidance/b2c/b2c-scapi-admin/references/INTEGRATION-PATTERNS.md +518 -0
  46. package/content/guidance/b2c/b2c-scapi-admin/references/OAUTH-SCOPES.md +337 -0
  47. package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +56 -0
  48. package/content/guidance/b2c/b2c-scapi-shopper/references/CHECKOUT-FLOW.md +466 -0
  49. package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +351 -0
  50. package/content/guidance/b2c/b2c-scapi-shopper/references/COMMON-PATTERNS.md +390 -0
  51. package/content/guidance/b2c/b2c-scapi-shopper/references/SCOPES.md +290 -0
  52. package/content/guidance/b2c/b2c-slas-auth-patterns/SKILL.md +420 -0
  53. package/content/guidance/b2c/b2c-slas-auth-patterns/references/PASSKEYS.md +126 -0
  54. package/content/guidance/b2c/b2c-slas-auth-patterns/references/SESSION-BRIDGE.md +267 -0
  55. package/content/guidance/b2c/b2c-slas-auth-patterns/references/TOKEN-LIFECYCLE.md +367 -0
  56. package/content/guidance/b2c/b2c-webservices/SKILL.md +318 -0
  57. package/content/guidance/b2c/b2c-webservices/references/FTP-SERVICES.md +524 -0
  58. package/content/guidance/b2c/b2c-webservices/references/HTTP-SERVICES.md +578 -0
  59. package/content/guidance/b2c/b2c-webservices/references/SERVICES-XML.md +351 -0
  60. package/content/guidance/b2c/b2c-webservices/references/SOAP-SERVICES.md +587 -0
  61. package/content/guidance/b2c-cli/b2c-am/SKILL.md +277 -0
  62. package/content/guidance/b2c-cli/b2c-bm-users-roles/SKILL.md +210 -0
  63. package/content/guidance/b2c-cli/b2c-cap/SKILL.md +131 -0
  64. package/content/guidance/b2c-cli/b2c-cip/SKILL.md +116 -0
  65. package/content/guidance/b2c-cli/b2c-cip/references/KNOWN_TABLES.md +105 -0
  66. package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +50 -0
  67. package/content/guidance/b2c-cli/b2c-cip/references/STARTER_QUERIES.md +147 -0
  68. package/content/guidance/b2c-cli/b2c-code/SKILL.md +146 -0
  69. package/content/guidance/b2c-cli/b2c-config/SKILL.md +481 -0
  70. package/content/guidance/b2c-cli/b2c-content/SKILL.md +176 -0
  71. package/content/guidance/b2c-cli/b2c-debug/SKILL.md +138 -0
  72. package/content/guidance/b2c-cli/b2c-docs/SKILL.md +301 -0
  73. package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +137 -0
  74. package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +97 -0
  75. package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +75 -0
  76. package/content/guidance/b2c-cli/b2c-import-set-migrations/SKILL.md +265 -0
  77. package/content/guidance/b2c-cli/b2c-job/SKILL.md +70 -0
  78. package/content/guidance/b2c-cli/b2c-job/references/EXPORT.md +121 -0
  79. package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +55 -0
  80. package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +148 -0
  81. package/content/guidance/b2c-cli/b2c-logs/SKILL.md +249 -0
  82. package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +315 -0
  83. package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +207 -0
  84. package/content/guidance/b2c-cli/b2c-mrt/references/BUNDLE-COMMANDS.md +203 -0
  85. package/content/guidance/b2c-cli/b2c-mrt/references/ENVIRONMENT-COMMANDS.md +218 -0
  86. package/content/guidance/b2c-cli/b2c-mrt/references/PROJECT-COMMANDS.md +154 -0
  87. package/content/guidance/b2c-cli/b2c-sandbox/SKILL.md +112 -0
  88. package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +126 -0
  89. package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +70 -0
  90. package/content/guidance/b2c-cli/b2c-scapi-schemas/references/CLI-EXAMPLES.md +108 -0
  91. package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +57 -0
  92. package/content/guidance/b2c-cli/b2c-site-import-export/references/IMPORT-OPTIONS.md +118 -0
  93. package/content/guidance/b2c-cli/b2c-site-import-export/references/METADATA-XML.md +381 -0
  94. package/content/guidance/b2c-cli/b2c-site-import-export/references/WORKFLOWS.md +182 -0
  95. package/content/guidance/b2c-cli/b2c-sites/SKILL.md +112 -0
  96. package/content/guidance/b2c-cli/b2c-slas/SKILL.md +182 -0
  97. package/content/guidance/b2c-cli/b2c-webdav/SKILL.md +186 -0
  98. package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +68 -0
  99. package/content/guidance/b2c-ops/b2c-edge-traffic-triage/SKILL.md +69 -0
  100. package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +80 -0
  101. package/content/guidance/b2c-ops/b2c-job-health/references/job-logs.md +21 -0
  102. package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +66 -0
  103. package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +87 -0
  104. package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +88 -0
  105. package/content/guidance/b2c-ops/b2c-production-triage/references/escalation.md +57 -0
  106. package/content/guidance/index.json +1969 -0
  107. package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
  108. package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
  109. package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
  110. package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  111. package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +127 -0
  112. package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
  113. package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  114. package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
  115. package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  116. package/content/guidance/storefront-next/sfnext-components/SKILL.md +153 -0
  117. package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  118. package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  119. package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
  120. package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  121. package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  122. package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +163 -0
  123. package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  124. package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  125. package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +140 -0
  126. package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
  127. package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  128. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
  129. package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +39 -0
  130. package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +127 -0
  131. package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +59 -0
  132. package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +118 -0
  133. package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  134. package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +68 -0
  135. package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  136. package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +79 -0
  137. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +93 -0
  138. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +86 -0
  139. package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +152 -0
  140. package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
  141. package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
  142. package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +202 -0
  143. package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  144. package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +111 -0
  145. package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +168 -0
  146. package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  147. package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  148. package/content/guidance/storefront-next/sfnext-performance/SKILL.md +102 -0
  149. package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  150. package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  151. package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +147 -0
  152. package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -0
  153. package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
  154. package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  155. package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
  156. package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  157. package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
  158. package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  159. package/content/guidance/storefront-next/sfnext-routing/SKILL.md +123 -0
  160. package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +65 -0
  161. package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  162. package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
  163. package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  164. package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
  165. package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  166. package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
  167. package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
  168. package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  169. package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
  170. package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +114 -0
  171. package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
  172. package/content/guidance/storefront-next/sfnext-testing/SKILL.md +151 -0
  173. package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
  174. package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +97 -0
  175. package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  176. package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
  177. package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  178. package/dist/commands/cap/install.d.ts +1 -0
  179. package/dist/commands/cap/list.d.ts +1 -0
  180. package/dist/commands/cap/pull.d.ts +1 -0
  181. package/dist/commands/cap/tasks.d.ts +1 -0
  182. package/dist/commands/cap/uninstall.d.ts +1 -0
  183. package/dist/commands/cip/describe.d.ts +1 -0
  184. package/dist/commands/cip/query.d.ts +1 -0
  185. package/dist/commands/cip/report/bot-traffic-share.d.ts +1 -0
  186. package/dist/commands/cip/report/checkout-funnel-dropoff.d.ts +1 -0
  187. package/dist/commands/cip/report/controller-error-rate-trend.d.ts +1 -0
  188. package/dist/commands/cip/report/controller-health-scorecard.d.ts +1 -0
  189. package/dist/commands/cip/report/customer-registration-trends.d.ts +1 -0
  190. package/dist/commands/cip/report/discount-depth-breakdown.d.ts +1 -0
  191. package/dist/commands/cip/report/inventory-stockout-by-location.d.ts +1 -0
  192. package/dist/commands/cip/report/new-vs-returning-buyer-revenue.d.ts +1 -0
  193. package/dist/commands/cip/report/ocapi-client-usage.d.ts +1 -0
  194. package/dist/commands/cip/report/ocapi-requests.d.ts +1 -0
  195. package/dist/commands/cip/report/payment-method-performance.d.ts +1 -0
  196. package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +1 -0
  197. package/dist/commands/cip/report/promotion-discount-analysis.d.ts +1 -0
  198. package/dist/commands/cip/report/promotion-roi-leaderboard.d.ts +1 -0
  199. package/dist/commands/cip/report/recommender-effectiveness.d.ts +1 -0
  200. package/dist/commands/cip/report/remote-include-performance.d.ts +1 -0
  201. package/dist/commands/cip/report/revenue-by-channel.d.ts +1 -0
  202. package/dist/commands/cip/report/sales-analytics.d.ts +1 -0
  203. package/dist/commands/cip/report/sales-summary.d.ts +1 -0
  204. package/dist/commands/cip/report/scapi-cache-hit-ratio.d.ts +1 -0
  205. package/dist/commands/cip/report/scapi-error-rate-by-status.d.ts +1 -0
  206. package/dist/commands/cip/report/scapi-latency-distribution.d.ts +1 -0
  207. package/dist/commands/cip/report/scapi-traffic-latency.d.ts +1 -0
  208. package/dist/commands/cip/report/search-query-performance.d.ts +1 -0
  209. package/dist/commands/cip/report/top-referrers.d.ts +1 -0
  210. package/dist/commands/cip/report/top-selling-products.d.ts +1 -0
  211. package/dist/commands/cip/report/zero-result-searches.d.ts +1 -0
  212. package/dist/commands/cip/tables.d.ts +1 -0
  213. package/dist/commands/code/activate.d.ts +1 -0
  214. package/dist/commands/code/delete.d.ts +1 -0
  215. package/dist/commands/code/deploy.d.ts +1 -0
  216. package/dist/commands/code/download.d.ts +1 -0
  217. package/dist/commands/code/watch.d.ts +1 -0
  218. package/dist/commands/commands/search.d.ts +35 -0
  219. package/dist/commands/commands/search.js +85 -0
  220. package/dist/commands/commands/search.js.map +1 -0
  221. package/dist/commands/content/export.d.ts +1 -0
  222. package/dist/commands/content/list.d.ts +1 -0
  223. package/dist/commands/content/validate.d.ts +1 -0
  224. package/dist/commands/debug/cli.d.ts +1 -0
  225. package/dist/commands/debug/index.d.ts +1 -0
  226. package/dist/commands/docs/cache.d.ts +1 -0
  227. package/dist/commands/docs/download.d.ts +1 -0
  228. package/dist/commands/docs/read.d.ts +1 -0
  229. package/dist/commands/docs/schema.d.ts +1 -0
  230. package/dist/commands/docs/search.d.ts +1 -0
  231. package/dist/commands/docs/skill.d.ts +41 -0
  232. package/dist/commands/docs/skill.js +183 -0
  233. package/dist/commands/docs/skill.js.map +1 -0
  234. package/dist/commands/ecdn/cache/purge.d.ts +1 -0
  235. package/dist/commands/ecdn/certificates/add.d.ts +1 -0
  236. package/dist/commands/ecdn/certificates/delete.d.ts +1 -0
  237. package/dist/commands/ecdn/certificates/list.d.ts +1 -0
  238. package/dist/commands/ecdn/certificates/update.d.ts +1 -0
  239. package/dist/commands/ecdn/certificates/validate.d.ts +1 -0
  240. package/dist/commands/ecdn/cipher-suites/get.d.ts +1 -0
  241. package/dist/commands/ecdn/cipher-suites/update.d.ts +1 -0
  242. package/dist/commands/ecdn/firewall/create.d.ts +1 -0
  243. package/dist/commands/ecdn/firewall/delete.d.ts +1 -0
  244. package/dist/commands/ecdn/firewall/get.d.ts +1 -0
  245. package/dist/commands/ecdn/firewall/list.d.ts +1 -0
  246. package/dist/commands/ecdn/firewall/reorder.d.ts +1 -0
  247. package/dist/commands/ecdn/firewall/update.d.ts +1 -0
  248. package/dist/commands/ecdn/logpush/jobs/create.d.ts +1 -0
  249. package/dist/commands/ecdn/logpush/jobs/delete.d.ts +1 -0
  250. package/dist/commands/ecdn/logpush/jobs/get.d.ts +1 -0
  251. package/dist/commands/ecdn/logpush/jobs/list.d.ts +1 -0
  252. package/dist/commands/ecdn/logpush/jobs/update.d.ts +1 -0
  253. package/dist/commands/ecdn/logpush/ownership.d.ts +1 -0
  254. package/dist/commands/ecdn/mrt-rules/create.d.ts +1 -0
  255. package/dist/commands/ecdn/mrt-rules/delete.d.ts +1 -0
  256. package/dist/commands/ecdn/mrt-rules/get.d.ts +1 -0
  257. package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +1 -0
  258. package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +1 -0
  259. package/dist/commands/ecdn/mrt-rules/update.d.ts +1 -0
  260. package/dist/commands/ecdn/mtls/create.d.ts +1 -0
  261. package/dist/commands/ecdn/mtls/delete.d.ts +1 -0
  262. package/dist/commands/ecdn/mtls/get.d.ts +1 -0
  263. package/dist/commands/ecdn/mtls/issue.d.ts +1 -0
  264. package/dist/commands/ecdn/mtls/list.d.ts +1 -0
  265. package/dist/commands/ecdn/mtls/setup.d.ts +1 -0
  266. package/dist/commands/ecdn/origin-headers/delete.d.ts +1 -0
  267. package/dist/commands/ecdn/origin-headers/get.d.ts +1 -0
  268. package/dist/commands/ecdn/origin-headers/set.d.ts +1 -0
  269. package/dist/commands/ecdn/page-shield/notifications/create.d.ts +1 -0
  270. package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +1 -0
  271. package/dist/commands/ecdn/page-shield/notifications/list.d.ts +1 -0
  272. package/dist/commands/ecdn/page-shield/policies/create.d.ts +1 -0
  273. package/dist/commands/ecdn/page-shield/policies/delete.d.ts +1 -0
  274. package/dist/commands/ecdn/page-shield/policies/get.d.ts +1 -0
  275. package/dist/commands/ecdn/page-shield/policies/list.d.ts +1 -0
  276. package/dist/commands/ecdn/page-shield/policies/update.d.ts +1 -0
  277. package/dist/commands/ecdn/page-shield/scripts/get.d.ts +1 -0
  278. package/dist/commands/ecdn/page-shield/scripts/list.d.ts +1 -0
  279. package/dist/commands/ecdn/rate-limit/create.d.ts +1 -0
  280. package/dist/commands/ecdn/rate-limit/delete.d.ts +1 -0
  281. package/dist/commands/ecdn/rate-limit/get.d.ts +1 -0
  282. package/dist/commands/ecdn/rate-limit/list.d.ts +1 -0
  283. package/dist/commands/ecdn/rate-limit/update.d.ts +1 -0
  284. package/dist/commands/ecdn/security/get.d.ts +1 -0
  285. package/dist/commands/ecdn/security/update.d.ts +1 -0
  286. package/dist/commands/ecdn/speed/get.d.ts +1 -0
  287. package/dist/commands/ecdn/speed/update.d.ts +1 -0
  288. package/dist/commands/ecdn/waf/groups/list.d.ts +1 -0
  289. package/dist/commands/ecdn/waf/groups/update.d.ts +1 -0
  290. package/dist/commands/ecdn/waf/managed-rules/list.d.ts +1 -0
  291. package/dist/commands/ecdn/waf/managed-rules/update.d.ts +1 -0
  292. package/dist/commands/ecdn/waf/migrate.d.ts +1 -0
  293. package/dist/commands/ecdn/waf/owasp/get.d.ts +1 -0
  294. package/dist/commands/ecdn/waf/owasp/update.d.ts +1 -0
  295. package/dist/commands/ecdn/waf/rules/get.d.ts +1 -0
  296. package/dist/commands/ecdn/waf/rules/list.d.ts +1 -0
  297. package/dist/commands/ecdn/waf/rules/update.d.ts +1 -0
  298. package/dist/commands/ecdn/waf/rulesets/list.d.ts +1 -0
  299. package/dist/commands/ecdn/waf/rulesets/update.d.ts +1 -0
  300. package/dist/commands/ecdn/zones/create.d.ts +1 -0
  301. package/dist/commands/ecdn/zones/list.d.ts +1 -0
  302. package/dist/commands/job/execution/delete.d.ts +1 -0
  303. package/dist/commands/job/export.d.ts +1 -0
  304. package/dist/commands/job/import-set.d.ts +1 -0
  305. package/dist/commands/job/import.d.ts +1 -0
  306. package/dist/commands/job/log.d.ts +1 -0
  307. package/dist/commands/job/run.d.ts +1 -0
  308. package/dist/commands/job/run.js +1 -1
  309. package/dist/commands/job/run.js.map +1 -1
  310. package/dist/commands/job/search.d.ts +1 -0
  311. package/dist/commands/job/wait.d.ts +1 -0
  312. package/dist/commands/logs/get.d.ts +1 -0
  313. package/dist/commands/logs/list.d.ts +1 -0
  314. package/dist/commands/logs/tail.d.ts +1 -0
  315. package/dist/commands/metrics/controller.d.ts +1 -0
  316. package/dist/commands/metrics/ecdn.d.ts +1 -0
  317. package/dist/commands/metrics/mrt.d.ts +1 -0
  318. package/dist/commands/metrics/ocapi.d.ts +1 -0
  319. package/dist/commands/metrics/overall.d.ts +1 -0
  320. package/dist/commands/metrics/sales.d.ts +1 -0
  321. package/dist/commands/metrics/scapi-hooks.d.ts +1 -0
  322. package/dist/commands/metrics/scapi.d.ts +1 -0
  323. package/dist/commands/metrics/third-party.d.ts +1 -0
  324. package/dist/commands/mrt/bundle/delete.d.ts +1 -0
  325. package/dist/commands/mrt/bundle/deploy.d.ts +1 -0
  326. package/dist/commands/mrt/bundle/download.d.ts +1 -0
  327. package/dist/commands/mrt/bundle/history.d.ts +1 -0
  328. package/dist/commands/mrt/bundle/list.d.ts +1 -0
  329. package/dist/commands/mrt/bundle/save.d.ts +1 -0
  330. package/dist/commands/mrt/bundle/upload-v2.d.ts +1 -0
  331. package/dist/commands/mrt/env/access-control/list.d.ts +1 -0
  332. package/dist/commands/mrt/env/b2c.d.ts +1 -0
  333. package/dist/commands/mrt/env/clone.d.ts +1 -0
  334. package/dist/commands/mrt/env/create.d.ts +1 -0
  335. package/dist/commands/mrt/env/delete.d.ts +1 -0
  336. package/dist/commands/mrt/env/get.d.ts +1 -0
  337. package/dist/commands/mrt/env/invalidate.d.ts +1 -0
  338. package/dist/commands/mrt/env/list.d.ts +1 -0
  339. package/dist/commands/mrt/env/redirect/clone.d.ts +1 -0
  340. package/dist/commands/mrt/env/redirect/create.d.ts +1 -0
  341. package/dist/commands/mrt/env/redirect/delete.d.ts +1 -0
  342. package/dist/commands/mrt/env/redirect/list.d.ts +1 -0
  343. package/dist/commands/mrt/env/update.d.ts +1 -0
  344. package/dist/commands/mrt/env/var/delete.d.ts +1 -0
  345. package/dist/commands/mrt/env/var/list.d.ts +1 -0
  346. package/dist/commands/mrt/env/var/push.d.ts +1 -0
  347. package/dist/commands/mrt/env/var/set.d.ts +1 -0
  348. package/dist/commands/mrt/org/b2c.d.ts +1 -0
  349. package/dist/commands/mrt/org/cert/create.d.ts +1 -0
  350. package/dist/commands/mrt/org/cert/delete.d.ts +1 -0
  351. package/dist/commands/mrt/org/cert/get.d.ts +1 -0
  352. package/dist/commands/mrt/org/cert/list.d.ts +1 -0
  353. package/dist/commands/mrt/org/cert/restart-validation.d.ts +1 -0
  354. package/dist/commands/mrt/org/list.d.ts +1 -0
  355. package/dist/commands/mrt/org/member/add.d.ts +1 -0
  356. package/dist/commands/mrt/org/member/get.d.ts +1 -0
  357. package/dist/commands/mrt/org/member/list.d.ts +1 -0
  358. package/dist/commands/mrt/org/member/remove.d.ts +1 -0
  359. package/dist/commands/mrt/org/member/update.d.ts +1 -0
  360. package/dist/commands/mrt/project/create.d.ts +1 -0
  361. package/dist/commands/mrt/project/delete.d.ts +1 -0
  362. package/dist/commands/mrt/project/get.d.ts +1 -0
  363. package/dist/commands/mrt/project/list.d.ts +1 -0
  364. package/dist/commands/mrt/project/member/add.d.ts +1 -0
  365. package/dist/commands/mrt/project/member/get.d.ts +1 -0
  366. package/dist/commands/mrt/project/member/list.d.ts +1 -0
  367. package/dist/commands/mrt/project/member/remove.d.ts +1 -0
  368. package/dist/commands/mrt/project/member/update.d.ts +1 -0
  369. package/dist/commands/mrt/project/notification/delete.d.ts +1 -0
  370. package/dist/commands/mrt/project/notification/get.d.ts +1 -0
  371. package/dist/commands/mrt/project/update.d.ts +1 -0
  372. package/dist/commands/mrt/save-credentials.d.ts +1 -0
  373. package/dist/commands/mrt/tail-logs.d.ts +1 -0
  374. package/dist/commands/mrt/user/api-key.d.ts +1 -0
  375. package/dist/commands/mrt/user/email-prefs.d.ts +1 -0
  376. package/dist/commands/mrt/user/profile.d.ts +1 -0
  377. package/dist/commands/scaffold/init.js +2 -1
  378. package/dist/commands/scaffold/init.js.map +1 -1
  379. package/dist/commands/scapi/custom/status.d.ts +1 -0
  380. package/dist/commands/scapi/schemas/get.d.ts +9 -0
  381. package/dist/commands/scapi/schemas/get.js +51 -19
  382. package/dist/commands/scapi/schemas/get.js.map +1 -1
  383. package/dist/commands/scapi/schemas/list.d.ts +6 -0
  384. package/dist/commands/scapi/schemas/list.js +28 -18
  385. package/dist/commands/scapi/schemas/list.js.map +1 -1
  386. package/dist/commands/setup/get.d.ts +36 -0
  387. package/dist/commands/setup/get.js +67 -0
  388. package/dist/commands/setup/get.js.map +1 -0
  389. package/dist/commands/setup/ide/tsserver-plugin.d.ts +1 -0
  390. package/dist/commands/setup/ide/vscode-types.d.ts +1 -0
  391. package/dist/commands/setup/index.js +4 -3
  392. package/dist/commands/setup/index.js.map +1 -1
  393. package/dist/commands/setup/inspect.d.ts +1 -0
  394. package/dist/commands/setup/inspect.js +15 -4
  395. package/dist/commands/setup/inspect.js.map +1 -1
  396. package/dist/commands/setup/instance/create.d.ts +9 -0
  397. package/dist/commands/setup/instance/create.js +22 -6
  398. package/dist/commands/setup/instance/create.js.map +1 -1
  399. package/dist/commands/setup/instance/list.d.ts +1 -0
  400. package/dist/commands/setup/instance/list.js +3 -4
  401. package/dist/commands/setup/instance/list.js.map +1 -1
  402. package/dist/commands/setup/instance/remove.d.ts +1 -0
  403. package/dist/commands/setup/instance/remove.js +5 -5
  404. package/dist/commands/setup/instance/remove.js.map +1 -1
  405. package/dist/commands/setup/instance/set-active.d.ts +6 -0
  406. package/dist/commands/setup/instance/set-active.js +20 -5
  407. package/dist/commands/setup/instance/set-active.js.map +1 -1
  408. package/dist/commands/setup/openshell.d.ts +1 -0
  409. package/dist/commands/setup/set.d.ts +37 -0
  410. package/dist/commands/setup/set.js +87 -0
  411. package/dist/commands/setup/set.js.map +1 -0
  412. package/dist/commands/setup/skills.d.ts +1 -0
  413. package/dist/commands/setup/unset.d.ts +37 -0
  414. package/dist/commands/setup/unset.js +55 -0
  415. package/dist/commands/setup/unset.js.map +1 -0
  416. package/dist/commands/slas/client/create.d.ts +1 -0
  417. package/dist/commands/slas/client/delete.d.ts +1 -0
  418. package/dist/commands/slas/client/get.d.ts +1 -0
  419. package/dist/commands/slas/client/list.d.ts +1 -0
  420. package/dist/commands/slas/client/open.d.ts +1 -0
  421. package/dist/commands/slas/client/update.d.ts +1 -0
  422. package/dist/commands/slas/token.d.ts +1 -0
  423. package/dist/commands/slas/token.js +2 -1
  424. package/dist/commands/slas/token.js.map +1 -1
  425. package/dist/commands/webdav/get.d.ts +1 -0
  426. package/dist/commands/webdav/rm.d.ts +1 -0
  427. package/dist/help.d.ts +25 -0
  428. package/dist/help.js +96 -0
  429. package/dist/help.js.map +1 -0
  430. package/dist/lib/scaffold/generate-helper.js +3 -2
  431. package/dist/lib/scaffold/generate-helper.js.map +1 -1
  432. package/dist/lib/skills.d.ts +19 -0
  433. package/dist/lib/skills.js +75 -0
  434. package/dist/lib/skills.js.map +1 -0
  435. package/dist/utils/cip/command.d.ts +1 -0
  436. package/dist/utils/ecdn/zone-command.d.ts +1 -0
  437. package/dist/utils/setup/config-field-command.d.ts +25 -0
  438. package/dist/utils/setup/config-field-command.js +41 -0
  439. package/dist/utils/setup/config-field-command.js.map +1 -0
  440. package/dist/utils/slas/client.d.ts +1 -0
  441. package/oclif.manifest.json +20802 -16968
  442. package/package.json +11 -5
@@ -0,0 +1,340 @@
1
+ # Page Designer Meta Definitions Reference
2
+
3
+ Complete JSON schema for page types and component types.
4
+
5
+ ## Page Type Schema
6
+
7
+ ```json
8
+ {
9
+ "name": "Page Type Name",
10
+ "description": "Description shown in editor",
11
+ "region_definitions": [
12
+ {
13
+ "id": "regionId",
14
+ "name": "Region Name",
15
+ "max_components": 5,
16
+ "component_type_exclusions": [],
17
+ "component_type_inclusions": []
18
+ }
19
+ ]
20
+ }
21
+ ```
22
+
23
+ ### Page Type Properties
24
+
25
+ | Property | Type | Required | Description |
26
+ |----------|------|----------|-------------|
27
+ | `name` | string | Yes | Display name in editor |
28
+ | `description` | string | No | Description shown when selecting page type |
29
+ | `region_definitions` | array | Yes | List of content regions |
30
+
31
+ ### Region Definition Properties
32
+
33
+ | Property | Type | Required | Description |
34
+ |----------|------|----------|-------------|
35
+ | `id` | string | Yes | Unique identifier (alphanumeric, underscore) |
36
+ | `name` | string | Yes | Display name in editor |
37
+ | `max_components` | integer | No | Maximum components allowed |
38
+ | `component_type_exclusions` | array | No | Components NOT allowed in region |
39
+ | `component_type_inclusions` | array | No | ONLY these components allowed |
40
+
41
+ ## Component Type Schema
42
+
43
+ ```json
44
+ {
45
+ "name": "Component Name",
46
+ "description": "Component description",
47
+ "group": "content",
48
+ "attribute_definition_groups": [
49
+ {
50
+ "id": "groupId",
51
+ "name": "Group Name",
52
+ "description": "Group description",
53
+ "attribute_definitions": [
54
+ {
55
+ "id": "attributeId",
56
+ "name": "Attribute Name",
57
+ "description": "Help text",
58
+ "type": "string",
59
+ "required": false,
60
+ "default_value": "default"
61
+ }
62
+ ]
63
+ }
64
+ ],
65
+ "region_definitions": []
66
+ }
67
+ ```
68
+
69
+ ### Component Type Properties
70
+
71
+ | Property | Type | Required | Description |
72
+ |----------|------|----------|-------------|
73
+ | `name` | string | Yes | Display name |
74
+ | `description` | string | No | Description in editor |
75
+ | `group` | string | No | Sidebar group (content, products, etc.) |
76
+ | `attribute_definition_groups` | array | Yes | Grouped attribute definitions |
77
+ | `region_definitions` | array | No | Nested regions (for container components) |
78
+
79
+ ### Attribute Definition Properties
80
+
81
+ | Property | Type | Required | Description |
82
+ |----------|------|----------|-------------|
83
+ | `id` | string | Yes | Attribute identifier |
84
+ | `name` | string | Yes | Display name |
85
+ | `description` | string | No | Help text |
86
+ | `type` | string | Yes | Attribute type |
87
+ | `required` | boolean | No | Whether required (default false) |
88
+ | `default_value` | varies | No | Default value |
89
+ | `values` | array | No | Options for enum type |
90
+
91
+ ## Complete Page Type Example
92
+
93
+ ```json
94
+ {
95
+ "name": "Product Landing Page",
96
+ "description": "Landing page for product campaigns with hero, features, and product grid",
97
+ "region_definitions": [
98
+ {
99
+ "id": "hero",
100
+ "name": "Hero Section",
101
+ "max_components": 1,
102
+ "component_type_inclusions": [
103
+ { "type_id": "hero-banner" },
104
+ { "type_id": "video-hero" }
105
+ ]
106
+ },
107
+ {
108
+ "id": "features",
109
+ "name": "Features Section",
110
+ "max_components": 4,
111
+ "component_type_inclusions": [
112
+ { "type_id": "feature-card" },
113
+ { "type_id": "icon-block" }
114
+ ]
115
+ },
116
+ {
117
+ "id": "products",
118
+ "name": "Product Grid",
119
+ "max_components": 1,
120
+ "component_type_inclusions": [
121
+ { "type_id": "product-grid" },
122
+ { "type_id": "product-carousel" }
123
+ ]
124
+ },
125
+ {
126
+ "id": "content",
127
+ "name": "Additional Content",
128
+ "component_type_exclusions": [
129
+ { "type_id": "hero-banner" },
130
+ { "type_id": "video-hero" }
131
+ ]
132
+ },
133
+ {
134
+ "id": "cta",
135
+ "name": "Call to Action",
136
+ "max_components": 1
137
+ }
138
+ ]
139
+ }
140
+ ```
141
+
142
+ ## Complete Component Type Example
143
+
144
+ ```json
145
+ {
146
+ "name": "Product Card",
147
+ "description": "Display a single product with image, name, price, and add to cart",
148
+ "group": "products",
149
+ "attribute_definition_groups": [
150
+ {
151
+ "id": "product",
152
+ "name": "Product Selection",
153
+ "attribute_definitions": [
154
+ {
155
+ "id": "product",
156
+ "name": "Product",
157
+ "description": "Select the product to display",
158
+ "type": "product",
159
+ "required": true
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "id": "display",
165
+ "name": "Display Options",
166
+ "attribute_definitions": [
167
+ {
168
+ "id": "showPrice",
169
+ "name": "Show Price",
170
+ "type": "boolean",
171
+ "default_value": true
172
+ },
173
+ {
174
+ "id": "showRating",
175
+ "name": "Show Rating",
176
+ "type": "boolean",
177
+ "default_value": true
178
+ },
179
+ {
180
+ "id": "showAddToCart",
181
+ "name": "Show Add to Cart Button",
182
+ "type": "boolean",
183
+ "default_value": true
184
+ },
185
+ {
186
+ "id": "imageSize",
187
+ "name": "Image Size",
188
+ "type": "enum",
189
+ "values": ["small", "medium", "large"],
190
+ "default_value": "medium"
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "id": "style",
196
+ "name": "Styling",
197
+ "attribute_definitions": [
198
+ {
199
+ "id": "cardStyle",
200
+ "name": "Card Style",
201
+ "type": "enum",
202
+ "values": ["default", "bordered", "shadow", "minimal"],
203
+ "default_value": "default"
204
+ },
205
+ {
206
+ "id": "backgroundColor",
207
+ "name": "Background Color",
208
+ "description": "CSS color value (e.g., #ffffff or white)",
209
+ "type": "string"
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ ```
216
+
217
+ ## Container Component Example
218
+
219
+ Component with nested regions:
220
+
221
+ ```json
222
+ {
223
+ "name": "Two Column Layout",
224
+ "description": "Container with two side-by-side columns",
225
+ "group": "layout",
226
+ "attribute_definition_groups": [
227
+ {
228
+ "id": "layout",
229
+ "name": "Layout Options",
230
+ "attribute_definitions": [
231
+ {
232
+ "id": "leftWidth",
233
+ "name": "Left Column Width",
234
+ "type": "enum",
235
+ "values": ["25%", "33%", "50%", "66%", "75%"],
236
+ "default_value": "50%"
237
+ },
238
+ {
239
+ "id": "gap",
240
+ "name": "Column Gap",
241
+ "type": "enum",
242
+ "values": ["none", "small", "medium", "large"],
243
+ "default_value": "medium"
244
+ }
245
+ ]
246
+ }
247
+ ],
248
+ "region_definitions": [
249
+ {
250
+ "id": "left",
251
+ "name": "Left Column"
252
+ },
253
+ {
254
+ "id": "right",
255
+ "name": "Right Column"
256
+ }
257
+ ]
258
+ }
259
+ ```
260
+
261
+ **Script for container:**
262
+
263
+ > This follows SFRA's container-component pattern: build the region registry with
264
+ > `PageRenderHelper.getRegionModelRegistry(component)`, pass it to the template as `regions`, and
265
+ > call `RegionModel.render()` in ISML. The region model preserves SFRA's region and component render
266
+ > settings before delegating to `PageMgr.renderRegion()`.
267
+
268
+ ```javascript
269
+ 'use strict';
270
+
271
+ var Template = require('dw/util/Template');
272
+ var HashMap = require('dw/util/HashMap');
273
+ var PageRenderHelper = require('*/cartridge/experience/utilities/PageRenderHelper');
274
+
275
+ module.exports.render = function (context) {
276
+ var model = new HashMap();
277
+ var component = context.component;
278
+
279
+ model.regions = PageRenderHelper.getRegionModelRegistry(component);
280
+
281
+ return new Template('experience/components/twocolumn').render(model).text;
282
+ };
283
+ ```
284
+
285
+ **Template for container:**
286
+
287
+ ```html
288
+ <div class="two-column">
289
+ <div class="left-column">
290
+ <isprint value="${pdict.regions.left.render()}" encoding="off"/>
291
+ </div>
292
+ <div class="right-column">
293
+ <isprint value="${pdict.regions.right.render()}" encoding="off"/>
294
+ </div>
295
+ </div>
296
+ ```
297
+
298
+ ## Page Script Context
299
+
300
+ > Illustrative context API; confirm current PageScriptContext properties with `docs_read dw.experience.PageScriptContext` (note: renderParameters is deprecated, use getRuntimeParameters() instead).
301
+
302
+ Properties available in `context` parameter:
303
+
304
+ ```javascript
305
+ module.exports.render = function (context) {
306
+ var page = context.page; // dw.experience.Page
307
+ var renderParameters = context.renderParameters; // DEPRECATED - use context.getRuntimeParameters()
308
+
309
+ // Page methods
310
+ var pageId = page.ID;
311
+ var pageName = page.name;
312
+ var isVisible = page.isVisible();
313
+ var region = page.getRegion('regionId'); // dw.experience.Region
314
+ };
315
+ ```
316
+
317
+ ## Component Script Context
318
+
319
+ > Illustrative context API; confirm current ComponentScriptContext properties with `docs_read dw.experience.ComponentScriptContext`.
320
+
321
+ Properties available in `context` parameter:
322
+
323
+ ```javascript
324
+ module.exports.render = function (context) {
325
+ var component = context.component; // dw.experience.Component
326
+ var content = context.content; // HashMap of attribute values
327
+ var componentRenderSettings = context.componentRenderSettings;
328
+
329
+ // Access attributes
330
+ var image = content.image; // dw.experience.image.Image
331
+ var product = content.product; // dw.catalog.Product
332
+ var category = content.category; // dw.catalog.Category
333
+ var text = content.headline; // String
334
+ var enabled = content.showPrice; // Boolean
335
+ var url = content.ctaUrl; // String (URL)
336
+
337
+ // For container components
338
+ var region = component.getRegion('regionId');
339
+ };
340
+ ```
@@ -0,0 +1,289 @@
1
+ ---
2
+ name: b2c-querying-data
3
+ description: Write efficient data queries in B2C Commerce for products, customers, and orders. Use this skill whenever the user needs to search products on a storefront page, look up customer profiles, query orders, paginate search results, or fix slow category pages. Also use when they ask about performance problems with data access, replacing database-intensive APIs with index-backed alternatives, or choosing between search vs query methods — even if they just say "my category page is slow" or "how do I find customers by email".
4
+ ---
5
+
6
+ # Querying Data in B2C Commerce
7
+
8
+ Efficient data querying is critical for storefront performance and job stability. B2C Commerce provides index-backed search APIs and database query APIs—choosing the right one for each use case avoids performance problems.
9
+
10
+ ## Product Search (Storefront)
11
+
12
+ Use `ProductSearchModel` for all storefront product searches. It is index-backed and designed for high-traffic pages.
13
+
14
+ ### Basic Product Search
15
+
16
+ ```javascript
17
+ var ProductSearchModel = require('dw/catalog/ProductSearchModel');
18
+
19
+ var psm = new ProductSearchModel();
20
+ psm.setCategoryID('electronics');
21
+ psm.setOrderableProductsOnly(true); // Only in-stock products
22
+ psm.setSearchPhrase('laptop');
23
+ psm.search();
24
+
25
+ var hits = psm.getProductSearchHits();
26
+ while (hits.hasNext()) {
27
+ var hit = hits.next();
28
+ var productID = hit.productID;
29
+ var minPrice = hit.minPrice;
30
+ var maxPrice = hit.maxPrice;
31
+ }
32
+ hits.close();
33
+ ```
34
+
35
+ ### Paging Search Results
36
+
37
+ Always page results—never load the full result set:
38
+
39
+ ```javascript
40
+ var ProductSearchModel = require('dw/catalog/ProductSearchModel');
41
+ var PagingModel = require('dw/web/PagingModel');
42
+
43
+ var psm = new ProductSearchModel();
44
+ psm.setCategoryID('mens-clothing');
45
+ psm.setOrderableProductsOnly(true);
46
+ psm.search();
47
+
48
+ var pagingModel = new PagingModel(psm.getProductSearchHits(), psm.count);
49
+ pagingModel.setPageSize(12);
50
+ pagingModel.setStart(0); // page offset
51
+
52
+ var pageElements = pagingModel.pageElements;
53
+ while (pageElements.hasNext()) {
54
+ var hit = pageElements.next();
55
+ // Render product tile
56
+ }
57
+ ```
58
+
59
+ ### Getting Variation Data from Search Hits
60
+
61
+ Use `ProductSearchHit` methods instead of loading full product objects:
62
+
63
+ ```javascript
64
+ // GOOD: Get variation info from the search hit (index-backed)
65
+ var representedColors = hit.getRepresentedVariationValues('color');
66
+ var representedIDs = hit.getRepresentedProductIDs();
67
+ var minPrice = hit.getMinPrice();
68
+ var maxPrice = hit.getMaxPrice();
69
+
70
+ // BAD: Loading the full product and iterating variants (database-intensive)
71
+ var product = hit.product;
72
+ var variants = product.getVariants(); // Expensive!
73
+ var priceModel = product.getPriceModel(); // Expensive!
74
+ ```
75
+
76
+ ### Search Refinements
77
+
78
+ ```javascript
79
+ var psm = new ProductSearchModel();
80
+ psm.setCategoryID('shoes');
81
+ psm.addRefinementValues('color', 'blue');
82
+ psm.addRefinementValues('size', '10');
83
+ psm.setPriceMin(50);
84
+ psm.setPriceMax(200);
85
+ psm.search();
86
+
87
+ // Get available refinement values for the current result set
88
+ var refinements = psm.getRefinements();
89
+ var colorValues = refinements.getAllRefinementValues('color');
90
+ ```
91
+
92
+ ### ProductSearchModel API Summary
93
+
94
+ | Method | Description |
95
+ |--------|-------------|
96
+ | `search()` | Execute the search |
97
+ | `setCategoryID(id)` | Filter by category |
98
+ | `setSearchPhrase(phrase)` | Set search keywords |
99
+ | `setOrderableProductsOnly(flag)` | Exclude out-of-stock |
100
+ | `addRefinementValues(name, value)` | Add refinement filter |
101
+ | `setPriceMin(price)` / `setPriceMax(price)` | Price range filter |
102
+ | `setSortingRule(rule)` | Set sorting rule |
103
+ | `getProductSearchHits()` | Get result iterator |
104
+ | `getRefinements()` | Get available refinements |
105
+ | `count` | Total result count |
106
+
107
+ ## Order Queries
108
+
109
+ ### OrderMgr.searchOrders / queryOrders
110
+
111
+ Use `searchOrders` for index-backed order lookups and `queryOrders` for database queries:
112
+
113
+ ```javascript
114
+ var OrderMgr = require('dw/order/OrderMgr');
115
+ var Order = require('dw/order/Order');
116
+
117
+ // Index-backed search (preferred for common lookups)
118
+ var orders = OrderMgr.searchOrders(
119
+ 'customerEmail = {0} AND status != {1}',
120
+ 'creationDate desc',
121
+ 'customer@example.com',
122
+ Order.ORDER_STATUS_FAILED
123
+ );
124
+
125
+ while (orders.hasNext()) {
126
+ var order = orders.next();
127
+ // Process order
128
+ }
129
+ orders.close(); // Always close iterators
130
+ ```
131
+
132
+ ### Query by Date Range
133
+
134
+ ```javascript
135
+ var OrderMgr = require('dw/order/OrderMgr');
136
+ var Calendar = require('dw/util/Calendar');
137
+ var Order = require('dw/order/Order');
138
+
139
+ var startDate = new Calendar();
140
+ startDate.add(Calendar.DAY_OF_YEAR, -7);
141
+
142
+ var orders = OrderMgr.searchOrders(
143
+ 'creationDate >= {0} AND status = {1}',
144
+ 'creationDate desc',
145
+ startDate.time,
146
+ Order.ORDER_STATUS_NEW
147
+ );
148
+
149
+ while (orders.hasNext()) {
150
+ var order = orders.next();
151
+ // Process
152
+ }
153
+ orders.close();
154
+ ```
155
+
156
+ ### searchOrders vs queryOrders
157
+
158
+ | Aspect | `searchOrders` | `queryOrders` |
159
+ |--------|---------------|---------------|
160
+ | Backing | Search index | Database |
161
+ | Performance | Fast for indexed fields | Slower, full table scan possible |
162
+ | Use when | Querying indexed attributes (status, email, dates) | Querying non-indexed or custom attributes |
163
+ | Result limit | Up to 1000 hits | No hard limit (but use paging) |
164
+
165
+ **Prefer `searchOrders`** for storefront and high-traffic code paths. Use `queryOrders` only when you need to query attributes not available in the search index.
166
+
167
+ ## Customer / Profile Queries
168
+
169
+ ### CustomerMgr (Preferred)
170
+
171
+ Use `searchProfiles` for index-backed searches and `processProfiles` for batch processing in jobs:
172
+
173
+ ```javascript
174
+ var CustomerMgr = require('dw/customer/CustomerMgr');
175
+
176
+ // Index-backed search (storefront use)
177
+ var profiles = CustomerMgr.searchProfiles(
178
+ 'email = {0}',
179
+ 'lastLoginTime desc',
180
+ 'customer@example.com'
181
+ );
182
+
183
+ while (profiles.hasNext()) {
184
+ var profile = profiles.next();
185
+ // Process profile
186
+ }
187
+ profiles.close();
188
+ ```
189
+
190
+ ### Batch Processing (Jobs)
191
+
192
+ Use `processProfiles` for jobs that need to iterate over many profiles—it has optimized memory management:
193
+
194
+ ```javascript
195
+ var CustomerMgr = require('dw/customer/CustomerMgr');
196
+
197
+ function processProfile(profile) {
198
+ // Process each profile individually
199
+ // Memory is managed automatically
200
+ }
201
+
202
+ // Process all profiles matching the query
203
+ CustomerMgr.processProfiles('gender = {0}', processProfile, 1);
204
+ ```
205
+
206
+ **Important:** `processProfiles` replaces the older `queryProfiles` and `SystemObjectMgr.querySystemObjects` for customer data. It uses the full-text search service with better performance and memory characteristics.
207
+
208
+ ### Customer Query Behaviors
209
+
210
+ - Wildcards (`*`, `%`, `+`) are filtered from queries and replaced by spaces
211
+ - `LIKE` and `ILIKE` execute as full-text queries (match whole words, not substrings)
212
+ - `LIKE` is case-insensitive
213
+ - Combining `AND` and `OR` in the same query degrades performance
214
+ - Range queries (e.g., `a > b`) impact performance
215
+ - Results are limited to the first 1000 hits
216
+
217
+ ## System Object Queries (SystemObjectMgr)
218
+
219
+ For querying system objects other than customers (e.g., SitePreferences, catalogs):
220
+
221
+ ```javascript
222
+ var SystemObjectMgr = require('dw/object/SystemObjectMgr');
223
+
224
+ // Query system objects
225
+ var results = SystemObjectMgr.querySystemObjects(
226
+ 'Profile',
227
+ 'custom.loyaltyTier = {0}',
228
+ 'lastLoginTime desc',
229
+ 'Gold'
230
+ );
231
+
232
+ while (results.hasNext()) {
233
+ var obj = results.next();
234
+ // Process
235
+ }
236
+ results.close();
237
+ ```
238
+
239
+ **Note:** For customer profiles specifically, prefer `CustomerMgr.searchProfiles` or `CustomerMgr.processProfiles` over `SystemObjectMgr.querySystemObjects`—they use the search index and perform significantly better.
240
+
241
+ ## Database-Intensive APIs to Avoid
242
+
243
+ These APIs hit the database directly and are expensive on high-traffic pages. Replace them with index-friendly alternatives. See [Performance-Critical APIs](references/PERFORMANCE-APIS.md) for the complete list with impact details.
244
+
245
+ | Avoid (Database-Intensive) | Use Instead (Index-Friendly) |
246
+ |----------------------------|------------------------------|
247
+ | `Category.getProducts()` / `getOnlineProducts()` | `ProductSearchModel.setCategoryID()` |
248
+ | `ProductMgr.queryAllSiteProducts()` | `ProductSearchModel.search()` |
249
+ | `Product.getVariants()` / `getVariationModel()` | `ProductSearchHit` methods |
250
+ | `Product.getPriceModel()` (in loops) | `ProductSearchHit.getMinPrice()` / `getMaxPrice()` |
251
+ | `CustomerMgr.queryProfiles()` | `CustomerMgr.searchProfiles()` or `processProfiles()` |
252
+
253
+ ## Related Skills
254
+
255
+ - `b2c-ordering` skill — Order lifecycle, status transitions, creation flows
256
+ - `b2c-custom-objects` skill — Custom object CRUD, OCAPI search queries
257
+
258
+ ## Best Practices
259
+
260
+ ### Do
261
+
262
+ - **Always close iterators** — unclosed iterators leak resources (`results.close()`)
263
+ - **Page results** — use `PagingModel` or limit result counts; never load unbounded result sets
264
+ - **Put all filtering in the query** — don't post-process or filter results in custom code
265
+ - **Use index-backed APIs** — `ProductSearchModel`, `searchOrders`, `searchProfiles` for storefront pages
266
+ - **Use `processProfiles`** for batch customer operations in jobs (optimized memory)
267
+ - **Limit page size** — maximum ~120 products per page for search result pages
268
+ - **Use `setOrderableProductsOnly(true)`** — to filter unavailable products at the search level
269
+
270
+ ### Don't
271
+
272
+ - **Don't iterate over product variants on search result pages** — use `ProductSearchHit` methods instead
273
+ - **Don't post-process search results** — all criteria must go into the query for efficient execution
274
+ - **Don't use `queryAllSiteProducts()`** on storefront pages — it bypasses the search index
275
+ - **Don't combine AND + OR** in customer queries — it degrades performance
276
+ - **Don't rely on getting more than 1000 results** — search APIs cap at 1000 hits
277
+ - **Don't call database-intensive APIs on high-traffic pages** — category pages, search results, PDPs, and homepage
278
+
279
+ ### Job-Specific Guidelines
280
+
281
+ - Use `processProfiles` over `queryProfiles` for large customer data sets
282
+ - Design loop logic so memory consumption doesn't grow with result set size
283
+ - Keep only the currently processed object in memory; don't retain references
284
+ - Stream data to files regularly; don't build large structures in memory
285
+ - Limit transaction size to under 1000 modified business objects
286
+
287
+ ## Detailed References
288
+
289
+ - [Performance-Critical APIs](references/PERFORMANCE-APIS.md) — full list of index-friendly vs database-intensive APIs