@salesforce/b2c-cli 2.3.1 → 2.4.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.
- package/bin/dev.js +8 -8
- package/bin/run.js +5 -7
- package/content/guidance/b2c/b2c-business-manager-extensions/SKILL.md +361 -0
- package/content/guidance/b2c/b2c-business-manager-extensions/references/EXTENSIONS-XML.md +458 -0
- package/content/guidance/b2c/b2c-controllers/SKILL.md +301 -0
- package/content/guidance/b2c/b2c-controllers/references/CLASSIC-PATTERNS.md +335 -0
- package/content/guidance/b2c/b2c-controllers/references/SFRA-PATTERNS.md +400 -0
- package/content/guidance/b2c/b2c-custom-api-development/SKILL.md +281 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/CONTRACT.md +142 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/IMPLEMENTATION.md +153 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/TESTING.md +118 -0
- package/content/guidance/b2c/b2c-custom-caches/SKILL.md +279 -0
- package/content/guidance/b2c/b2c-custom-job-steps/SKILL.md +520 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/CHUNK-ORIENTED.md +377 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/JOBS-XML.md +212 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/STEPTYPES-JSON.md +373 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/TASK-ORIENTED.md +344 -0
- package/content/guidance/b2c/b2c-custom-objects/SKILL.md +327 -0
- package/content/guidance/b2c/b2c-custom-objects/references/OCAPI-SEARCH.md +298 -0
- package/content/guidance/b2c/b2c-forms/SKILL.md +242 -0
- package/content/guidance/b2c/b2c-forms/references/FORM-XML.md +409 -0
- package/content/guidance/b2c/b2c-hooks/SKILL.md +500 -0
- package/content/guidance/b2c/b2c-hooks/references/OCAPI-SCAPI-HOOKS.md +403 -0
- package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +169 -0
- package/content/guidance/b2c/b2c-hooks/references/SYSTEM-HOOKS.md +433 -0
- package/content/guidance/b2c/b2c-isml/SKILL.md +320 -0
- package/content/guidance/b2c/b2c-isml/references/EXPRESSIONS.md +366 -0
- package/content/guidance/b2c/b2c-isml/references/TAGS.md +443 -0
- package/content/guidance/b2c/b2c-localization/SKILL.md +344 -0
- package/content/guidance/b2c/b2c-localization/references/PATTERNS.md +407 -0
- package/content/guidance/b2c/b2c-logging/SKILL.md +352 -0
- package/content/guidance/b2c/b2c-logging/references/LOG-FILES.md +282 -0
- package/content/guidance/b2c/b2c-metadata/SKILL.md +406 -0
- package/content/guidance/b2c/b2c-metadata/references/SYSTEM-OBJECTS.md +320 -0
- package/content/guidance/b2c/b2c-metadata/references/XML-EXAMPLES.md +366 -0
- package/content/guidance/b2c/b2c-onboarding/SKILL.md +154 -0
- package/content/guidance/b2c/b2c-ordering/SKILL.md +391 -0
- package/content/guidance/b2c/b2c-page-designer/SKILL.md +410 -0
- package/content/guidance/b2c/b2c-page-designer/references/ATTRIBUTE-TYPES.md +436 -0
- package/content/guidance/b2c/b2c-page-designer/references/META-DEFINITIONS.md +340 -0
- package/content/guidance/b2c/b2c-querying-data/SKILL.md +289 -0
- package/content/guidance/b2c/b2c-querying-data/references/PERFORMANCE-APIS.md +74 -0
- package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +53 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +440 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/INTEGRATION-PATTERNS.md +518 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/OAUTH-SCOPES.md +337 -0
- package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +56 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/CHECKOUT-FLOW.md +466 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +351 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/COMMON-PATTERNS.md +390 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/SCOPES.md +290 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/SKILL.md +420 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/PASSKEYS.md +126 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/SESSION-BRIDGE.md +267 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/TOKEN-LIFECYCLE.md +367 -0
- package/content/guidance/b2c/b2c-webservices/SKILL.md +318 -0
- package/content/guidance/b2c/b2c-webservices/references/FTP-SERVICES.md +524 -0
- package/content/guidance/b2c/b2c-webservices/references/HTTP-SERVICES.md +578 -0
- package/content/guidance/b2c/b2c-webservices/references/SERVICES-XML.md +351 -0
- package/content/guidance/b2c/b2c-webservices/references/SOAP-SERVICES.md +587 -0
- package/content/guidance/b2c-cli/b2c-am/SKILL.md +277 -0
- package/content/guidance/b2c-cli/b2c-bm-users-roles/SKILL.md +210 -0
- package/content/guidance/b2c-cli/b2c-cap/SKILL.md +131 -0
- package/content/guidance/b2c-cli/b2c-cip/SKILL.md +116 -0
- package/content/guidance/b2c-cli/b2c-cip/references/KNOWN_TABLES.md +105 -0
- package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +50 -0
- package/content/guidance/b2c-cli/b2c-cip/references/STARTER_QUERIES.md +147 -0
- package/content/guidance/b2c-cli/b2c-code/SKILL.md +146 -0
- package/content/guidance/b2c-cli/b2c-config/SKILL.md +462 -0
- package/content/guidance/b2c-cli/b2c-content/SKILL.md +176 -0
- package/content/guidance/b2c-cli/b2c-debug/SKILL.md +138 -0
- package/content/guidance/b2c-cli/b2c-docs/SKILL.md +301 -0
- package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +135 -0
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +97 -0
- package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +75 -0
- package/content/guidance/b2c-cli/b2c-import-set-migrations/SKILL.md +265 -0
- package/content/guidance/b2c-cli/b2c-job/SKILL.md +64 -0
- package/content/guidance/b2c-cli/b2c-job/references/EXPORT.md +121 -0
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +55 -0
- package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +119 -0
- package/content/guidance/b2c-cli/b2c-logs/SKILL.md +249 -0
- package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +315 -0
- package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +207 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/BUNDLE-COMMANDS.md +203 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/ENVIRONMENT-COMMANDS.md +218 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/PROJECT-COMMANDS.md +154 -0
- package/content/guidance/b2c-cli/b2c-sandbox/SKILL.md +112 -0
- package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +126 -0
- package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +66 -0
- package/content/guidance/b2c-cli/b2c-scapi-schemas/references/CLI-EXAMPLES.md +108 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +57 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/IMPORT-OPTIONS.md +118 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/METADATA-XML.md +381 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/WORKFLOWS.md +182 -0
- package/content/guidance/b2c-cli/b2c-sites/SKILL.md +112 -0
- package/content/guidance/b2c-cli/b2c-slas/SKILL.md +182 -0
- package/content/guidance/b2c-cli/b2c-webdav/SKILL.md +186 -0
- package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +68 -0
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +75 -0
- package/content/guidance/b2c-ops/b2c-job-health/references/job-logs.md +21 -0
- package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +66 -0
- package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +87 -0
- package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +87 -0
- package/content/guidance/b2c-ops/b2c-production-triage/references/escalation.md +57 -0
- package/content/guidance/index.json +1949 -0
- package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
- package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +127 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/content/guidance/storefront-next/sfnext-components/SKILL.md +153 -0
- package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
- package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +163 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +140 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +39 -0
- package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +127 -0
- package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +59 -0
- package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +118 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +68 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +79 -0
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +93 -0
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +86 -0
- package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +152 -0
- package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
- package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
- package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +202 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +111 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +168 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/content/guidance/storefront-next/sfnext-performance/SKILL.md +102 -0
- package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +147 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
- package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/content/guidance/storefront-next/sfnext-routing/SKILL.md +123 -0
- package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +65 -0
- package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
- package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
- package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
- package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
- package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +114 -0
- package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
- package/content/guidance/storefront-next/sfnext-testing/SKILL.md +151 -0
- package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
- package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +97 -0
- package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
- package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/dist/commands/cap/install.d.ts +1 -0
- package/dist/commands/cap/list.d.ts +1 -0
- package/dist/commands/cap/pull.d.ts +1 -0
- package/dist/commands/cap/tasks.d.ts +1 -0
- package/dist/commands/cap/uninstall.d.ts +1 -0
- package/dist/commands/cip/describe.d.ts +1 -0
- package/dist/commands/cip/query.d.ts +1 -0
- package/dist/commands/cip/report/bot-traffic-share.d.ts +1 -0
- package/dist/commands/cip/report/checkout-funnel-dropoff.d.ts +1 -0
- package/dist/commands/cip/report/controller-error-rate-trend.d.ts +1 -0
- package/dist/commands/cip/report/controller-health-scorecard.d.ts +1 -0
- package/dist/commands/cip/report/customer-registration-trends.d.ts +1 -0
- package/dist/commands/cip/report/discount-depth-breakdown.d.ts +1 -0
- package/dist/commands/cip/report/inventory-stockout-by-location.d.ts +1 -0
- package/dist/commands/cip/report/new-vs-returning-buyer-revenue.d.ts +1 -0
- package/dist/commands/cip/report/ocapi-client-usage.d.ts +1 -0
- package/dist/commands/cip/report/ocapi-requests.d.ts +1 -0
- package/dist/commands/cip/report/payment-method-performance.d.ts +1 -0
- package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +1 -0
- package/dist/commands/cip/report/promotion-discount-analysis.d.ts +1 -0
- package/dist/commands/cip/report/promotion-roi-leaderboard.d.ts +1 -0
- package/dist/commands/cip/report/recommender-effectiveness.d.ts +1 -0
- package/dist/commands/cip/report/remote-include-performance.d.ts +1 -0
- package/dist/commands/cip/report/revenue-by-channel.d.ts +1 -0
- package/dist/commands/cip/report/sales-analytics.d.ts +1 -0
- package/dist/commands/cip/report/sales-summary.d.ts +1 -0
- package/dist/commands/cip/report/scapi-cache-hit-ratio.d.ts +1 -0
- package/dist/commands/cip/report/scapi-error-rate-by-status.d.ts +1 -0
- package/dist/commands/cip/report/scapi-latency-distribution.d.ts +1 -0
- package/dist/commands/cip/report/scapi-traffic-latency.d.ts +1 -0
- package/dist/commands/cip/report/search-query-performance.d.ts +1 -0
- package/dist/commands/cip/report/top-referrers.d.ts +1 -0
- package/dist/commands/cip/report/top-selling-products.d.ts +1 -0
- package/dist/commands/cip/report/zero-result-searches.d.ts +1 -0
- package/dist/commands/cip/tables.d.ts +1 -0
- package/dist/commands/code/activate.d.ts +1 -0
- package/dist/commands/code/delete.d.ts +1 -0
- package/dist/commands/code/deploy.d.ts +1 -0
- package/dist/commands/code/download.d.ts +1 -0
- package/dist/commands/code/watch.d.ts +1 -0
- package/dist/commands/commands/search.d.ts +35 -0
- package/dist/commands/commands/search.js +85 -0
- package/dist/commands/commands/search.js.map +1 -0
- package/dist/commands/content/export.d.ts +1 -0
- package/dist/commands/content/list.d.ts +1 -0
- package/dist/commands/content/validate.d.ts +1 -0
- package/dist/commands/debug/cli.d.ts +1 -0
- package/dist/commands/debug/index.d.ts +1 -0
- package/dist/commands/docs/cache.d.ts +1 -0
- package/dist/commands/docs/download.d.ts +1 -0
- package/dist/commands/docs/read.d.ts +1 -0
- package/dist/commands/docs/schema.d.ts +1 -0
- package/dist/commands/docs/search.d.ts +1 -0
- package/dist/commands/docs/skill.d.ts +41 -0
- package/dist/commands/docs/skill.js +183 -0
- package/dist/commands/docs/skill.js.map +1 -0
- package/dist/commands/ecdn/cache/purge.d.ts +1 -0
- package/dist/commands/ecdn/certificates/add.d.ts +1 -0
- package/dist/commands/ecdn/certificates/delete.d.ts +1 -0
- package/dist/commands/ecdn/certificates/list.d.ts +1 -0
- package/dist/commands/ecdn/certificates/update.d.ts +1 -0
- package/dist/commands/ecdn/certificates/validate.d.ts +1 -0
- package/dist/commands/ecdn/cipher-suites/get.d.ts +1 -0
- package/dist/commands/ecdn/cipher-suites/update.d.ts +1 -0
- package/dist/commands/ecdn/firewall/create.d.ts +1 -0
- package/dist/commands/ecdn/firewall/delete.d.ts +1 -0
- package/dist/commands/ecdn/firewall/get.d.ts +1 -0
- package/dist/commands/ecdn/firewall/list.d.ts +1 -0
- package/dist/commands/ecdn/firewall/reorder.d.ts +1 -0
- package/dist/commands/ecdn/firewall/update.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/create.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/delete.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/get.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/list.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/update.d.ts +1 -0
- package/dist/commands/ecdn/logpush/ownership.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/create.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/delete.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/get.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/update.d.ts +1 -0
- package/dist/commands/ecdn/mtls/create.d.ts +1 -0
- package/dist/commands/ecdn/mtls/delete.d.ts +1 -0
- package/dist/commands/ecdn/mtls/get.d.ts +1 -0
- package/dist/commands/ecdn/mtls/issue.d.ts +1 -0
- package/dist/commands/ecdn/mtls/list.d.ts +1 -0
- package/dist/commands/ecdn/mtls/setup.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/delete.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/get.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/set.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/create.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/list.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/create.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/delete.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/get.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/list.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/update.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/scripts/get.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/scripts/list.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/create.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/delete.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/get.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/list.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/update.d.ts +1 -0
- package/dist/commands/ecdn/security/get.d.ts +1 -0
- package/dist/commands/ecdn/security/update.d.ts +1 -0
- package/dist/commands/ecdn/speed/get.d.ts +1 -0
- package/dist/commands/ecdn/speed/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/groups/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/groups/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/managed-rules/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/managed-rules/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/migrate.d.ts +1 -0
- package/dist/commands/ecdn/waf/owasp/get.d.ts +1 -0
- package/dist/commands/ecdn/waf/owasp/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/get.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/rulesets/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/rulesets/update.d.ts +1 -0
- package/dist/commands/ecdn/zones/create.d.ts +1 -0
- package/dist/commands/ecdn/zones/list.d.ts +1 -0
- package/dist/commands/job/execution/delete.d.ts +1 -0
- package/dist/commands/job/export.d.ts +1 -0
- package/dist/commands/job/import-set.d.ts +1 -0
- package/dist/commands/job/import.d.ts +1 -0
- package/dist/commands/job/log.d.ts +1 -0
- package/dist/commands/job/run.d.ts +1 -0
- package/dist/commands/job/search.d.ts +1 -0
- package/dist/commands/job/wait.d.ts +1 -0
- package/dist/commands/logs/get.d.ts +1 -0
- package/dist/commands/logs/list.d.ts +1 -0
- package/dist/commands/logs/tail.d.ts +1 -0
- package/dist/commands/metrics/controller.d.ts +1 -0
- package/dist/commands/metrics/ecdn.d.ts +1 -0
- package/dist/commands/metrics/mrt.d.ts +1 -0
- package/dist/commands/metrics/ocapi.d.ts +1 -0
- package/dist/commands/metrics/overall.d.ts +1 -0
- package/dist/commands/metrics/sales.d.ts +1 -0
- package/dist/commands/metrics/scapi-hooks.d.ts +1 -0
- package/dist/commands/metrics/scapi.d.ts +1 -0
- package/dist/commands/metrics/third-party.d.ts +1 -0
- package/dist/commands/mrt/bundle/delete.d.ts +1 -0
- package/dist/commands/mrt/bundle/deploy.d.ts +1 -0
- package/dist/commands/mrt/bundle/download.d.ts +1 -0
- package/dist/commands/mrt/bundle/history.d.ts +1 -0
- package/dist/commands/mrt/bundle/list.d.ts +1 -0
- package/dist/commands/mrt/bundle/save.d.ts +1 -0
- package/dist/commands/mrt/bundle/upload-v2.d.ts +1 -0
- package/dist/commands/mrt/env/access-control/list.d.ts +1 -0
- package/dist/commands/mrt/env/b2c.d.ts +1 -0
- package/dist/commands/mrt/env/clone.d.ts +1 -0
- package/dist/commands/mrt/env/create.d.ts +1 -0
- package/dist/commands/mrt/env/delete.d.ts +1 -0
- package/dist/commands/mrt/env/get.d.ts +1 -0
- package/dist/commands/mrt/env/invalidate.d.ts +1 -0
- package/dist/commands/mrt/env/list.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/clone.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/create.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/delete.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/list.d.ts +1 -0
- package/dist/commands/mrt/env/update.d.ts +1 -0
- package/dist/commands/mrt/env/var/delete.d.ts +1 -0
- package/dist/commands/mrt/env/var/list.d.ts +1 -0
- package/dist/commands/mrt/env/var/push.d.ts +1 -0
- package/dist/commands/mrt/env/var/set.d.ts +1 -0
- package/dist/commands/mrt/org/b2c.d.ts +1 -0
- package/dist/commands/mrt/org/cert/create.d.ts +1 -0
- package/dist/commands/mrt/org/cert/delete.d.ts +1 -0
- package/dist/commands/mrt/org/cert/get.d.ts +1 -0
- package/dist/commands/mrt/org/cert/list.d.ts +1 -0
- package/dist/commands/mrt/org/cert/restart-validation.d.ts +1 -0
- package/dist/commands/mrt/org/list.d.ts +1 -0
- package/dist/commands/mrt/org/member/add.d.ts +1 -0
- package/dist/commands/mrt/org/member/get.d.ts +1 -0
- package/dist/commands/mrt/org/member/list.d.ts +1 -0
- package/dist/commands/mrt/org/member/remove.d.ts +1 -0
- package/dist/commands/mrt/org/member/update.d.ts +1 -0
- package/dist/commands/mrt/project/create.d.ts +1 -0
- package/dist/commands/mrt/project/delete.d.ts +1 -0
- package/dist/commands/mrt/project/get.d.ts +1 -0
- package/dist/commands/mrt/project/list.d.ts +1 -0
- package/dist/commands/mrt/project/member/add.d.ts +1 -0
- package/dist/commands/mrt/project/member/get.d.ts +1 -0
- package/dist/commands/mrt/project/member/list.d.ts +1 -0
- package/dist/commands/mrt/project/member/remove.d.ts +1 -0
- package/dist/commands/mrt/project/member/update.d.ts +1 -0
- package/dist/commands/mrt/project/notification/delete.d.ts +1 -0
- package/dist/commands/mrt/project/notification/get.d.ts +1 -0
- package/dist/commands/mrt/project/update.d.ts +1 -0
- package/dist/commands/mrt/save-credentials.d.ts +1 -0
- package/dist/commands/mrt/tail-logs.d.ts +1 -0
- package/dist/commands/mrt/user/api-key.d.ts +1 -0
- package/dist/commands/mrt/user/email-prefs.d.ts +1 -0
- package/dist/commands/mrt/user/profile.d.ts +1 -0
- package/dist/commands/scaffold/init.js +2 -1
- package/dist/commands/scaffold/init.js.map +1 -1
- package/dist/commands/scapi/custom/status.d.ts +1 -0
- package/dist/commands/scapi/schemas/get.d.ts +1 -0
- package/dist/commands/scapi/schemas/list.d.ts +1 -0
- package/dist/commands/setup/ide/tsserver-plugin.d.ts +1 -0
- package/dist/commands/setup/ide/vscode-types.d.ts +1 -0
- package/dist/commands/setup/index.js +4 -3
- package/dist/commands/setup/index.js.map +1 -1
- package/dist/commands/setup/inspect.d.ts +1 -0
- package/dist/commands/setup/inspect.js +17 -2
- package/dist/commands/setup/inspect.js.map +1 -1
- package/dist/commands/setup/instance/create.d.ts +1 -0
- package/dist/commands/setup/instance/list.d.ts +1 -0
- package/dist/commands/setup/instance/remove.d.ts +1 -0
- package/dist/commands/setup/instance/set-active.d.ts +1 -0
- package/dist/commands/setup/openshell.d.ts +1 -0
- package/dist/commands/setup/skills.d.ts +1 -0
- package/dist/commands/slas/client/create.d.ts +1 -0
- package/dist/commands/slas/client/delete.d.ts +1 -0
- package/dist/commands/slas/client/get.d.ts +1 -0
- package/dist/commands/slas/client/list.d.ts +1 -0
- package/dist/commands/slas/client/open.d.ts +1 -0
- package/dist/commands/slas/client/update.d.ts +1 -0
- package/dist/commands/slas/token.d.ts +1 -0
- package/dist/commands/slas/token.js +2 -1
- package/dist/commands/slas/token.js.map +1 -1
- package/dist/commands/webdav/get.d.ts +1 -0
- package/dist/commands/webdav/rm.d.ts +1 -0
- package/dist/help.d.ts +25 -0
- package/dist/help.js +96 -0
- package/dist/help.js.map +1 -0
- package/dist/lib/scaffold/generate-helper.js +3 -2
- package/dist/lib/scaffold/generate-helper.js.map +1 -1
- package/dist/lib/skills.d.ts +19 -0
- package/dist/lib/skills.js +75 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/utils/cip/command.d.ts +1 -0
- package/dist/utils/ecdn/zone-command.d.ts +1 -0
- package/dist/utils/slas/client.d.ts +1 -0
- package/oclif.manifest.json +21814 -18473
- package/package.json +11 -5
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
# Form XML Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for B2C Commerce form definitions.
|
|
4
|
+
|
|
5
|
+
## XSD Schema Reference
|
|
6
|
+
|
|
7
|
+
For the authoritative XML schema definition, use the `b2c` CLI (if installed):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# View the form XSD schema
|
|
11
|
+
b2c docs schema form
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## XML Schema
|
|
15
|
+
|
|
16
|
+
```xml
|
|
17
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
18
|
+
<form xmlns="http://www.demandware.com/xml/form/2008-04-19">
|
|
19
|
+
<!-- Fields, groups, lists, and actions -->
|
|
20
|
+
</form>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Field Element
|
|
24
|
+
|
|
25
|
+
### All Attributes
|
|
26
|
+
|
|
27
|
+
```xml
|
|
28
|
+
<field
|
|
29
|
+
formid="fieldName" <!-- Required: unique identifier -->
|
|
30
|
+
label="resource.key" <!-- Resource key for label -->
|
|
31
|
+
type="string" <!-- Required: string|integer|number|boolean|date -->
|
|
32
|
+
mandatory="true" <!-- Required field (default: false) -->
|
|
33
|
+
default="value" <!-- Default value -->
|
|
34
|
+
max-length="100" <!-- Max string length -->
|
|
35
|
+
min-length="1" <!-- Min string length -->
|
|
36
|
+
max="1000" <!-- Max numeric value -->
|
|
37
|
+
min="0" <!-- Min numeric value -->
|
|
38
|
+
regexp="^pattern$" <!-- Validation regex -->
|
|
39
|
+
format="yyyy-MM-dd" <!-- Date format -->
|
|
40
|
+
binding="object.property" <!-- Object binding path -->
|
|
41
|
+
validation="${script}" <!-- Custom validation script -->
|
|
42
|
+
description="resource.key" <!-- Field description resource -->
|
|
43
|
+
missing-error="error.key" <!-- Error when mandatory field empty -->
|
|
44
|
+
parse-error="error.key" <!-- Error when format/type invalid -->
|
|
45
|
+
range-error="error.key" <!-- Error when out of range -->
|
|
46
|
+
value-error="error.key" <!-- General validation error -->
|
|
47
|
+
checked-value="yes" <!-- Value when boolean checked -->
|
|
48
|
+
unchecked-value="no" <!-- Value when boolean unchecked -->
|
|
49
|
+
/>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Field Types
|
|
53
|
+
|
|
54
|
+
### String Field
|
|
55
|
+
|
|
56
|
+
```xml
|
|
57
|
+
<field formid="firstName" type="string"
|
|
58
|
+
label="form.firstname.label"
|
|
59
|
+
mandatory="true"
|
|
60
|
+
max-length="50"
|
|
61
|
+
missing-error="form.firstname.required"/>
|
|
62
|
+
|
|
63
|
+
<field formid="email" type="string"
|
|
64
|
+
label="form.email.label"
|
|
65
|
+
mandatory="true"
|
|
66
|
+
regexp="^[\w.%+-]+@[\w.-]+\.\w{2,6}$"
|
|
67
|
+
parse-error="form.email.invalid"/>
|
|
68
|
+
|
|
69
|
+
<field formid="phone" type="string"
|
|
70
|
+
label="form.phone.label"
|
|
71
|
+
regexp="^\+?[\d\s-]{10,20}$"
|
|
72
|
+
parse-error="form.phone.invalid"/>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Integer Field
|
|
76
|
+
|
|
77
|
+
```xml
|
|
78
|
+
<field formid="quantity" type="integer"
|
|
79
|
+
label="form.quantity.label"
|
|
80
|
+
mandatory="true"
|
|
81
|
+
min="1"
|
|
82
|
+
max="99"
|
|
83
|
+
default="1"
|
|
84
|
+
range-error="form.quantity.range"/>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Number Field (Decimal)
|
|
88
|
+
|
|
89
|
+
```xml
|
|
90
|
+
<field formid="amount" type="number"
|
|
91
|
+
label="form.amount.label"
|
|
92
|
+
min="0.01"
|
|
93
|
+
max="10000.00"
|
|
94
|
+
range-error="form.amount.range"/>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Boolean Field
|
|
98
|
+
|
|
99
|
+
```xml
|
|
100
|
+
<field formid="subscribe" type="boolean"
|
|
101
|
+
label="form.subscribe.label"
|
|
102
|
+
checked-value="yes"
|
|
103
|
+
unchecked-value="no"/>
|
|
104
|
+
|
|
105
|
+
<field formid="termsAccepted" type="boolean"
|
|
106
|
+
label="form.terms.label"
|
|
107
|
+
mandatory="true"
|
|
108
|
+
missing-error="form.terms.required"/>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Date Field
|
|
112
|
+
|
|
113
|
+
```xml
|
|
114
|
+
<field formid="birthDate" type="date"
|
|
115
|
+
label="form.birthdate.label"
|
|
116
|
+
format="MM/dd/yyyy"
|
|
117
|
+
parse-error="form.birthdate.invalid"/>
|
|
118
|
+
|
|
119
|
+
<field formid="startDate" type="date"
|
|
120
|
+
label="form.startdate.label"
|
|
121
|
+
format="yyyy-MM-dd"
|
|
122
|
+
mandatory="true"/>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Validation Patterns
|
|
126
|
+
|
|
127
|
+
### Common Regular Expressions
|
|
128
|
+
|
|
129
|
+
```xml
|
|
130
|
+
<!-- Email -->
|
|
131
|
+
<field formid="email" regexp="^[\w.%+-]+@[\w.-]+\.\w{2,6}$"/>
|
|
132
|
+
|
|
133
|
+
<!-- US Phone -->
|
|
134
|
+
<field formid="phone" regexp="^\(?(\d{3})\)?[-.\s]?(\d{3})[-.\s]?(\d{4})$"/>
|
|
135
|
+
|
|
136
|
+
<!-- US Zip Code -->
|
|
137
|
+
<field formid="postalCode" regexp="^\d{5}(-\d{4})?$"/>
|
|
138
|
+
|
|
139
|
+
<!-- Credit Card (basic) -->
|
|
140
|
+
<field formid="cardNumber" regexp="^\d{13,19}$"/>
|
|
141
|
+
|
|
142
|
+
<!-- CVV -->
|
|
143
|
+
<field formid="cvv" regexp="^\d{3,4}$"/>
|
|
144
|
+
|
|
145
|
+
<!-- URL -->
|
|
146
|
+
<field formid="website" regexp="^https?://[\w.-]+\.\w{2,}"/>
|
|
147
|
+
|
|
148
|
+
<!-- Alpha only -->
|
|
149
|
+
<field formid="name" regexp="^[A-Za-z\s'-]+$"/>
|
|
150
|
+
|
|
151
|
+
<!-- Alphanumeric -->
|
|
152
|
+
<field formid="code" regexp="^[A-Za-z0-9]+$"/>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Custom Validation Script
|
|
156
|
+
|
|
157
|
+
```xml
|
|
158
|
+
<field formid="password" type="string"
|
|
159
|
+
validation="${require('*/cartridge/scripts/forms/validation').passwordStrength(formfield)}"
|
|
160
|
+
range-error="form.password.weak"/>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Validation script:**
|
|
164
|
+
```javascript
|
|
165
|
+
// scripts/forms/validation.js
|
|
166
|
+
exports.passwordStrength = function(formfield) {
|
|
167
|
+
var password = formfield.value;
|
|
168
|
+
if (!password || password.length < 8) return false;
|
|
169
|
+
if (!/[A-Z]/.test(password)) return false; // Uppercase
|
|
170
|
+
if (!/[a-z]/.test(password)) return false; // Lowercase
|
|
171
|
+
if (!/[0-9]/.test(password)) return false; // Number
|
|
172
|
+
return true;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
exports.matchField = function(formfield, otherFieldId) {
|
|
176
|
+
var form = formfield.parent;
|
|
177
|
+
return formfield.value === form[otherFieldId].value;
|
|
178
|
+
};
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Groups
|
|
182
|
+
|
|
183
|
+
Group related fields:
|
|
184
|
+
|
|
185
|
+
```xml
|
|
186
|
+
<group formid="billingAddress">
|
|
187
|
+
<field formid="firstName" type="string" mandatory="true"/>
|
|
188
|
+
<field formid="lastName" type="string" mandatory="true"/>
|
|
189
|
+
<field formid="address1" type="string" mandatory="true"/>
|
|
190
|
+
<field formid="address2" type="string"/>
|
|
191
|
+
<field formid="city" type="string" mandatory="true"/>
|
|
192
|
+
<field formid="state" type="string" mandatory="true"/>
|
|
193
|
+
<field formid="postalCode" type="string" mandatory="true"/>
|
|
194
|
+
<field formid="country" type="string" mandatory="true"/>
|
|
195
|
+
</group>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Access in controller:**
|
|
199
|
+
```javascript
|
|
200
|
+
var form = server.forms.getForm('checkout');
|
|
201
|
+
var firstName = form.billingAddress.firstName.value;
|
|
202
|
+
var city = form.billingAddress.city.value;
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Lists
|
|
206
|
+
|
|
207
|
+
Repeating field groups:
|
|
208
|
+
|
|
209
|
+
```xml
|
|
210
|
+
<list formid="lineItems" max="100">
|
|
211
|
+
<field formid="productId" type="string" mandatory="true"/>
|
|
212
|
+
<field formid="quantity" type="integer" min="1" default="1"/>
|
|
213
|
+
<field formid="note" type="string" max-length="255"/>
|
|
214
|
+
</list>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Access in controller:**
|
|
218
|
+
```javascript
|
|
219
|
+
var form = server.forms.getForm('order');
|
|
220
|
+
var items = form.lineItems;
|
|
221
|
+
for (var i = 0; i < items.length; i++) {
|
|
222
|
+
var productId = items[i].productId.value;
|
|
223
|
+
var quantity = items[i].quantity.value;
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Actions
|
|
228
|
+
|
|
229
|
+
```xml
|
|
230
|
+
<!-- Validates form before action -->
|
|
231
|
+
<action formid="submit" valid-form="true"/>
|
|
232
|
+
<action formid="save" valid-form="true"/>
|
|
233
|
+
|
|
234
|
+
<!-- Skips validation -->
|
|
235
|
+
<action formid="cancel" valid-form="false"/>
|
|
236
|
+
<action formid="back" valid-form="false"/>
|
|
237
|
+
<action formid="clear" valid-form="false"/>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**In template:**
|
|
241
|
+
```html
|
|
242
|
+
<button type="submit" name="submit">Submit</button>
|
|
243
|
+
<button type="submit" name="cancel">Cancel</button>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**In controller:**
|
|
247
|
+
```javascript
|
|
248
|
+
if (req.form.submit) {
|
|
249
|
+
// Submit button clicked, form.valid reflects validation
|
|
250
|
+
}
|
|
251
|
+
if (req.form.cancel) {
|
|
252
|
+
// Cancel clicked, no validation performed
|
|
253
|
+
res.redirect(URLUtils.url('Account-Show'));
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Object Binding
|
|
258
|
+
|
|
259
|
+
Bind fields to B2C objects:
|
|
260
|
+
|
|
261
|
+
```xml
|
|
262
|
+
<field formid="firstName" type="string" binding="profile.firstName"/>
|
|
263
|
+
<field formid="email" type="string" binding="profile.email"/>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Copy to object:**
|
|
267
|
+
```javascript
|
|
268
|
+
var form = server.forms.getForm('profile');
|
|
269
|
+
form.copyTo(customer.profile);
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Copy from object:**
|
|
273
|
+
```javascript
|
|
274
|
+
form.copyFrom(customer.profile);
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Complete Examples
|
|
278
|
+
|
|
279
|
+
### Login Form
|
|
280
|
+
|
|
281
|
+
```xml
|
|
282
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
283
|
+
<form xmlns="http://www.demandware.com/xml/form/2008-04-19">
|
|
284
|
+
<field formid="username" type="string"
|
|
285
|
+
label="form.login.username"
|
|
286
|
+
mandatory="true"
|
|
287
|
+
regexp="^[\w.%+-]+@[\w.-]+\.\w{2,6}$"
|
|
288
|
+
missing-error="form.login.username.missing"
|
|
289
|
+
parse-error="form.login.username.invalid"/>
|
|
290
|
+
|
|
291
|
+
<field formid="password" type="string"
|
|
292
|
+
label="form.login.password"
|
|
293
|
+
mandatory="true"
|
|
294
|
+
missing-error="form.login.password.missing"/>
|
|
295
|
+
|
|
296
|
+
<field formid="rememberMe" type="boolean"
|
|
297
|
+
label="form.login.remember"/>
|
|
298
|
+
|
|
299
|
+
<action formid="login" valid-form="true"/>
|
|
300
|
+
<action formid="forgotPassword" valid-form="false"/>
|
|
301
|
+
</form>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Address Form
|
|
305
|
+
|
|
306
|
+
```xml
|
|
307
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
308
|
+
<form xmlns="http://www.demandware.com/xml/form/2008-04-19">
|
|
309
|
+
<field formid="firstName" type="string"
|
|
310
|
+
label="form.address.firstname"
|
|
311
|
+
mandatory="true"
|
|
312
|
+
max-length="50"
|
|
313
|
+
binding="address.firstName"/>
|
|
314
|
+
|
|
315
|
+
<field formid="lastName" type="string"
|
|
316
|
+
label="form.address.lastname"
|
|
317
|
+
mandatory="true"
|
|
318
|
+
max-length="50"
|
|
319
|
+
binding="address.lastName"/>
|
|
320
|
+
|
|
321
|
+
<field formid="address1" type="string"
|
|
322
|
+
label="form.address.line1"
|
|
323
|
+
mandatory="true"
|
|
324
|
+
max-length="100"
|
|
325
|
+
binding="address.address1"/>
|
|
326
|
+
|
|
327
|
+
<field formid="address2" type="string"
|
|
328
|
+
label="form.address.line2"
|
|
329
|
+
max-length="100"
|
|
330
|
+
binding="address.address2"/>
|
|
331
|
+
|
|
332
|
+
<field formid="city" type="string"
|
|
333
|
+
label="form.address.city"
|
|
334
|
+
mandatory="true"
|
|
335
|
+
max-length="50"
|
|
336
|
+
binding="address.city"/>
|
|
337
|
+
|
|
338
|
+
<field formid="state" type="string"
|
|
339
|
+
label="form.address.state"
|
|
340
|
+
mandatory="true"
|
|
341
|
+
binding="address.stateCode"/>
|
|
342
|
+
|
|
343
|
+
<field formid="postalCode" type="string"
|
|
344
|
+
label="form.address.postalcode"
|
|
345
|
+
mandatory="true"
|
|
346
|
+
regexp="^\d{5}(-\d{4})?$"
|
|
347
|
+
parse-error="form.address.postalcode.invalid"
|
|
348
|
+
binding="address.postalCode"/>
|
|
349
|
+
|
|
350
|
+
<field formid="country" type="string"
|
|
351
|
+
label="form.address.country"
|
|
352
|
+
mandatory="true"
|
|
353
|
+
default="US"
|
|
354
|
+
binding="address.countryCode"/>
|
|
355
|
+
|
|
356
|
+
<field formid="phone" type="string"
|
|
357
|
+
label="form.address.phone"
|
|
358
|
+
regexp="^\+?[\d\s.-]{10,20}$"
|
|
359
|
+
parse-error="form.address.phone.invalid"
|
|
360
|
+
binding="address.phone"/>
|
|
361
|
+
|
|
362
|
+
<action formid="save" valid-form="true"/>
|
|
363
|
+
<action formid="cancel" valid-form="false"/>
|
|
364
|
+
</form>
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Registration Form with Password Confirmation
|
|
368
|
+
|
|
369
|
+
```xml
|
|
370
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
371
|
+
<form xmlns="http://www.demandware.com/xml/form/2008-04-19">
|
|
372
|
+
<field formid="email" type="string"
|
|
373
|
+
label="form.register.email"
|
|
374
|
+
mandatory="true"
|
|
375
|
+
regexp="^[\w.%+-]+@[\w.-]+\.\w{2,6}$"
|
|
376
|
+
missing-error="form.register.email.missing"
|
|
377
|
+
parse-error="form.register.email.invalid"/>
|
|
378
|
+
|
|
379
|
+
<field formid="password" type="string"
|
|
380
|
+
label="form.register.password"
|
|
381
|
+
mandatory="true"
|
|
382
|
+
min-length="8"
|
|
383
|
+
validation="${require('*/cartridge/scripts/forms/validation').passwordStrength(formfield)}"
|
|
384
|
+
missing-error="form.register.password.missing"
|
|
385
|
+
range-error="form.register.password.weak"/>
|
|
386
|
+
|
|
387
|
+
<field formid="confirmPassword" type="string"
|
|
388
|
+
label="form.register.confirmpassword"
|
|
389
|
+
mandatory="true"
|
|
390
|
+
missing-error="form.register.confirmpassword.missing"/>
|
|
391
|
+
|
|
392
|
+
<field formid="firstName" type="string"
|
|
393
|
+
label="form.register.firstname"
|
|
394
|
+
mandatory="true"
|
|
395
|
+
max-length="50"/>
|
|
396
|
+
|
|
397
|
+
<field formid="lastName" type="string"
|
|
398
|
+
label="form.register.lastname"
|
|
399
|
+
mandatory="true"
|
|
400
|
+
max-length="50"/>
|
|
401
|
+
|
|
402
|
+
<field formid="acceptTerms" type="boolean"
|
|
403
|
+
label="form.register.terms"
|
|
404
|
+
mandatory="true"
|
|
405
|
+
missing-error="form.register.terms.required"/>
|
|
406
|
+
|
|
407
|
+
<action formid="register" valid-form="true"/>
|
|
408
|
+
</form>
|
|
409
|
+
```
|