From baea39d83dd64d9f2a61c6f687658772a1bce905 Mon Sep 17 00:00:00 2001 From: CharithaT07 Date: Mon, 1 Jun 2026 14:51:31 +0530 Subject: [PATCH 1/5] @W-22653726 adding XSD valiation in vs extension --- docs/vscode-extension/configuration.md | 32 + packages/b2c-vs-extension/package.json | 90 +- .../b2c-vs-extension/resources/xsd/abtest.xsd | 360 +++++ .../resources/xsd/abtestparticipants.xsd | 58 + .../resources/xsd/assignment.xsd | 158 ++ .../b2c-vs-extension/resources/xsd/bmext.xsd | 280 ++++ .../resources/xsd/cachesettings.xsd | 75 + .../resources/xsd/catalog.xsd | 1363 +++++++++++++++++ .../resources/xsd/commercefeaturestate.xsd | 101 ++ .../b2c-vs-extension/resources/xsd/coupon.xsd | 206 +++ .../resources/xsd/couponredemption.xsd | 58 + .../resources/xsd/csrfwhitelists.xsd | 81 + .../resources/xsd/customer.xsd | 411 +++++ .../resources/xsd/customeractivedata.xsd | 75 + .../resources/xsd/customercdnsettings.xsd | 36 + .../resources/xsd/customergroup.xsd | 276 ++++ .../resources/xsd/customerlist.xsd | 72 + .../resources/xsd/customerlist2.xsd | 52 + .../xsd/customerpaymentinstrument.xsd | 189 +++ .../resources/xsd/customobject.xsd | 68 + .../b2c-vs-extension/resources/xsd/dcext.xsd | 391 +++++ .../b2c-vs-extension/resources/xsd/feed.xsd | 76 + .../b2c-vs-extension/resources/xsd/form.xsd | 262 ++++ .../resources/xsd/geolocation.xsd | 68 + .../resources/xsd/giftcertificate.xsd | 186 +++ .../resources/xsd/inventory.xsd | 174 +++ .../b2c-vs-extension/resources/xsd/jobs.xsd | 408 +++++ .../resources/xsd/library.xsd | 580 +++++++ .../resources/xsd/locales.xsd | 172 +++ .../resources/xsd/metadata.xsd | 315 ++++ .../b2c-vs-extension/resources/xsd/oauth.xsd | 60 + .../b2c-vs-extension/resources/xsd/order.xsd | 1255 +++++++++++++++ .../resources/xsd/pagemetatag.xsd | 111 ++ .../resources/xsd/paymentmethod.xsd | 216 +++ .../resources/xsd/paymentprocessor.xsd | 86 ++ .../resources/xsd/preferences.xsd | 74 + .../resources/xsd/priceadjustmentlimits.xsd | 74 + .../resources/xsd/pricebook.xsd | 166 ++ .../resources/xsd/productlist.xsd | 246 +++ .../resources/xsd/promotion.xsd | 1019 ++++++++++++ .../resources/xsd/redirecturl.xsd | 120 ++ .../resources/xsd/returnimportfeed.xsd | 82 + .../resources/xsd/schedules.xsd | 246 +++ .../b2c-vs-extension/resources/xsd/search.xsd | 333 ++++ .../resources/xsd/search2.xsd | 478 ++++++ .../resources/xsd/services.xsd | 139 ++ .../resources/xsd/shipping.xsd | 487 ++++++ .../resources/xsd/shippingorderupdatefeed.xsd | 125 ++ .../b2c-vs-extension/resources/xsd/site.xsd | 89 ++ .../resources/xsd/sitemapconfiguration.xsd | 230 +++ .../b2c-vs-extension/resources/xsd/slot.xsd | 292 ++++ .../b2c-vs-extension/resources/xsd/sort.xsd | 328 ++++ .../resources/xsd/sourcecode.xsd | 188 +++ .../b2c-vs-extension/resources/xsd/store.xsd | 194 +++ .../resources/xsd/storefronts.xsd | 104 ++ .../b2c-vs-extension/resources/xsd/tax.xsd | 112 ++ .../resources/xsd/urlrules.xsd | 273 ++++ .../b2c-vs-extension/resources/xsd/xml.xsd | 54 + .../b2c-vs-extension/scripts/sync-xsd.mjs | 97 ++ packages/b2c-vs-extension/src/extension.ts | 3 + .../src/xml-validation/index.ts | 85 + 61 files changed, 14035 insertions(+), 4 deletions(-) create mode 100644 packages/b2c-vs-extension/resources/xsd/abtest.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/assignment.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/bmext.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/cachesettings.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/catalog.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/coupon.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/couponredemption.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customer.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customergroup.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customerlist.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customerlist2.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/customobject.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/dcext.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/feed.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/form.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/geolocation.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/inventory.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/jobs.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/library.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/locales.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/metadata.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/oauth.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/order.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/preferences.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/pricebook.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/productlist.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/promotion.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/redirecturl.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/schedules.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/search.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/search2.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/services.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/shipping.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/site.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/slot.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/sort.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/sourcecode.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/store.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/storefronts.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/tax.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/urlrules.xsd create mode 100644 packages/b2c-vs-extension/resources/xsd/xml.xsd create mode 100644 packages/b2c-vs-extension/scripts/sync-xsd.mjs create mode 100644 packages/b2c-vs-extension/src/xml-validation/index.ts diff --git a/docs/vscode-extension/configuration.md b/docs/vscode-extension/configuration.md index 140f24293..1e66d7efe 100644 --- a/docs/vscode-extension/configuration.md +++ b/docs/vscode-extension/configuration.md @@ -94,6 +94,38 @@ The B2C Script Debugger registers regardless of these toggles — it activates o | `b2c-dx.sandbox.pollingInterval` | `10` | Seconds between polls while a sandbox is in a transitional state (`creating`, `starting`, `stopping`, `deleting`, `cloning`). Range: 2–300. Polling stops automatically once the realm settles. | | `b2c-dx.telemetry.enabled` | `true` | Send anonymous usage telemetry. Honors VS Code's `telemetry.telemetryLevel` — disabling that disables this regardless of this setting. | +### XML schema validation + +The extension contributes XSD-based validation for common metadata XML files (via the VS Code XML extension). When a file path matches one of these folders, diagnostics are validated against the corresponding B2C schema: + +- `**/metadata/catalogs/*.xml` +- `**/metadata/customer-groups/*.xml` +- `**/metadata/customer-lists/*.xml` +- `**/metadata/custom-objects/*.xml` +- `**/metadata/inventory-lists/*.xml` +- `**/metadata/libraries/*.xml` +- `**/metadata/payment-methods/*.xml` +- `**/metadata/payment-processors/*.xml` +- `**/metadata/preferences/*.xml` +- `**/metadata/pricebooks/*.xml` +- `**/metadata/promotions/*.xml` +- `**/metadata/redirect-urls/*.xml` +- `**/metadata/search/*.xml` +- `**/metadata/shipping/*.xml` +- `**/metadata/sites/*.xml` +- `**/metadata/slots/*.xml` +- `**/metadata/sourcecodes/*.xml` +- `**/metadata/stores/*.xml` +- `**/metadata/url-rules/*.xml` + +To disable XML validation globally in your workspace, set: + +```jsonc +{ + "xml.validation.enabled": false +} +``` + ### Complete defaults (copy-paste) ```jsonc diff --git a/packages/b2c-vs-extension/package.json b/packages/b2c-vs-extension/package.json index a98d86496..168987f57 100644 --- a/packages/b2c-vs-extension/package.json +++ b/packages/b2c-vs-extension/package.json @@ -36,6 +36,9 @@ "onDebugResolve:b2c-script", "workspaceContains:**/commerce-app.json" ], + "extensionDependencies": [ + "redhat.vscode-xml" + ], "main": "./dist/extension.cjs", "contributes": { "typescriptServerPlugins": [ @@ -45,6 +48,84 @@ "configNamespace": "b2c-dx" } ], + "xmlValidation": [ + { + "fileMatch": "**/metadata/catalogs/*.xml", + "url": "./resources/xsd/catalog.xsd" + }, + { + "fileMatch": "**/metadata/customer-groups/*.xml", + "url": "./resources/xsd/customergroup.xsd" + }, + { + "fileMatch": "**/metadata/customer-lists/*.xml", + "url": "./resources/xsd/customerlist.xsd" + }, + { + "fileMatch": "**/metadata/custom-objects/*.xml", + "url": "./resources/xsd/customobject.xsd" + }, + { + "fileMatch": "**/metadata/inventory-lists/*.xml", + "url": "./resources/xsd/inventory.xsd" + }, + { + "fileMatch": "**/metadata/libraries/*.xml", + "url": "./resources/xsd/library.xsd" + }, + { + "fileMatch": "**/metadata/payment-methods/*.xml", + "url": "./resources/xsd/paymentmethod.xsd" + }, + { + "fileMatch": "**/metadata/payment-processors/*.xml", + "url": "./resources/xsd/paymentprocessor.xsd" + }, + { + "fileMatch": "**/metadata/preferences/*.xml", + "url": "./resources/xsd/preferences.xsd" + }, + { + "fileMatch": "**/metadata/pricebooks/*.xml", + "url": "./resources/xsd/pricebook.xsd" + }, + { + "fileMatch": "**/metadata/promotions/*.xml", + "url": "./resources/xsd/promotion.xsd" + }, + { + "fileMatch": "**/metadata/redirect-urls/*.xml", + "url": "./resources/xsd/redirecturl.xsd" + }, + { + "fileMatch": "**/metadata/search/*.xml", + "url": "./resources/xsd/search.xsd" + }, + { + "fileMatch": "**/metadata/shipping/*.xml", + "url": "./resources/xsd/shipping.xsd" + }, + { + "fileMatch": "**/metadata/sites/*.xml", + "url": "./resources/xsd/site.xsd" + }, + { + "fileMatch": "**/metadata/slots/*.xml", + "url": "./resources/xsd/slot.xsd" + }, + { + "fileMatch": "**/metadata/sourcecodes/*.xml", + "url": "./resources/xsd/sourcecode.xsd" + }, + { + "fileMatch": "**/metadata/stores/*.xml", + "url": "./resources/xsd/store.xsd" + }, + { + "fileMatch": "**/metadata/url-rules/*.xml", + "url": "./resources/xsd/urlrules.xsd" + } + ], "configuration": { "title": "B2C DX", "properties": { @@ -1216,10 +1297,11 @@ } }, "scripts": { - "build": "node scripts/esbuild-bundle.mjs", - "watch": "node scripts/esbuild-bundle.mjs --watch", - "vscode:prepublish": "pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && node scripts/esbuild-bundle.mjs", - "package": "pnpm exec vsce package --no-dependencies && node scripts/inject-script-types.mjs", + "sync:xsd": "node scripts/sync-xsd.mjs", + "build": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs", + "watch": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs --watch", + "vscode:prepublish": "pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && pnpm run sync:xsd && node scripts/esbuild-bundle.mjs", + "package": "pnpm run sync:xsd && pnpm exec vsce package --no-dependencies && node scripts/inject-script-types.mjs", "lint": "eslint", "lint:agent": "eslint --quiet", "typecheck:agent": "tsc -p . --noEmit --pretty false", diff --git a/packages/b2c-vs-extension/resources/xsd/abtest.xsd b/packages/b2c-vs-extension/resources/xsd/abtest.xsd new file mode 100644 index 000000000..88355b55b --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/abtest.xsd @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + End date may not be more than 90 days after start date. + + + + + + + + + + + + + + + + + + + + Synonym for pipeline call Search-Show?cgid=CATEGORYID + + + + + Synonym for pipeline call Home-Show + + + + + Pipeline name and start-node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lack of 'MatchMode' attribute defaults to legacy 'any' behavior. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Allocations must add up to 100. If not, the imported allocations will be scaled to add up to 100. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd b/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd new file mode 100644 index 000000000..71b5831ec --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/assignment.xsd b/packages/b2c-vs-extension/resources/xsd/assignment.xsd new file mode 100644 index 000000000..ef42657ec --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/assignment.xsd @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This attribute determines if all qualifiers must be satisfied in order + for the assignment to be applicable, or if only one must be satisfied. + If not specified during import, then "any" is assumed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/bmext.xsd b/packages/b2c-vs-extension/resources/xsd/bmext.xsd new file mode 100644 index 000000000..38bda44f7 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/bmext.xsd @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + Refers to one of the SLDS 'utility' icons (see https://www.lightningdesignsystem.com/icons/#utility ). In the 'Modern' BM UI, it is preferred over the regular icon. + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! + + + + + Please note: This element is NOT supported for custom menu actions. + + + + + SCAPI paths for BM module permissions. Please note: This element is NOT supported for custom menu actions. + + + + + Please note: This element is NOT supported for custom menu actions. + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! + + + + + + + + + + Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd b/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd new file mode 100644 index 000000000..e05bd77df --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/catalog.xsd b/packages/b2c-vs-extension/resources/xsd/catalog.xsd new file mode 100644 index 000000000..5221faf86 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/catalog.xsd @@ -0,0 +1,1363 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Used to control if specified variation values will be added to variation attribute, removed from variation attribute or replace + existing variation attribute value list. + Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not + sensible, because existing variation attribute values will always be removed from the variation attribute before importing the + variation attribute values specified in the import file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Please use element receipt-name which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + Deprecated. Please use element tax-class which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + Deprecated. Please use element force-price-flag which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + Deprecated. Please use element non-inventory-flag which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + Deprecated. Please use element non-revenue-flag which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + Deprecated. Please use element non-discountable-flag which held by element store-attributes (complexType.Product.StoreAttributes). + + + + + + + + Deprecated. Use inventory feature to maintain product availability. + + + + + + + + Deprecated. Please use the element images (complexType.Product.Images). + + + + + Deprecated. Please use the element images (complexType.Product.Images). + + + + + + + + + + + + + + + + + + + Deprecated please use the element product-set-products (complexType.Product.ProductSetProducts). + + + + + + + + + Deprecated please use the elements category-assignment (complexType.CategoryAssignment) and classification-category (complexType.Product.ClassificationCategory). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Used to control if specified image groups will be merged to or replace the existing image specification. + The values "merge" and "replace" are the only ones supported for the "merge-mode" attribute. + Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not + sensible, because existing image groups will always be removed before importing the image groups + specified in the import file. + + + + + + + + + + + This element, only relevant for variation masters, represents an ordered list of variation + attribute values. It is used to identify a set of variants to which the images in this group apply. + + - The image groups related to the product master will have zero of these elements. These + represent the "fallback" images. + - If an image group applies for all the red variants, for example, it will have one of these + elements, namely "color=red". + - If an image group applies for all the red, leather variants, for example, it will have two + of these elements, namely "color=red, fabric=leather". + + The list is ordered so that, within a master product, the same variation attribute must always + appear at the same index of the list. In our example, "color" would always be specified first + for each image group, and then "fabric" would always appear second. This ensures there are + clear fallback rules to identify which images relate to each variant. When retrieving the images + for a variant at runtime, the system chooses the most specific matching image groups possible. + + + + + + + + + Deprecated. Please use the variation elements (complexType.Product.ImageGroup.VariationAttributeValue). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use the element product-set-products (complexType.Product.ProductSetProducts). + + + + + + + + + Deprecated please use the element product-set-product (complexType.Product.ProductSetProduct) see complexType.Product.ProductSetProducts. + + + + + + + + + + + + + + + + + + + + + + Deprecated please use the elements category-assignment (complexType.CategoryAssignment) and classification-category (complexType.Product.ClassificationCategory). + + + + + + + + + + Deprecated please use the element category-assignment (complexType.CategoryAssignment). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use the elements variation-attribute (complexType.VariationAttribute) or shared-variation-attribute (complexType.Product.VariationAttribute.Reference). + + + + + + + + + + + + + + + + + + + + + + Used to control if specified variants will be added to master, removed from master or replace existing variant list. + Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not sensible, + because existing variants will always be removed from the master before importing the variants specified in the import file. + + + + + + + + + + + + + Reserved for Beta users. Variation groups will not be created and a warning will be logged if the Variation Groups (Beta) feature is disabled. + + + + + + + Used to control if specified variation groups will be added to master, removed from master or replace existing variation groups list. + Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not sensible, + because existing variation groups will always be removed from the master before importing the variation groups specified in the import file. + + + + + + + + + Reserved for Beta users. Variation groups will not be created and a warning will be logged if the Variation Groups (Beta) feature is disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated please use the elements variation-attribute (complexType.VariationAttribute) or shared-variation-attribute (complexType.Product.VariationAttribute.Reference). + + + + + + + + + + + + + Deprecated please use the element variation-attribute-values (complexType.VariationAttribute.Values) see complexType.VariationAttribute. + + + + + + + + + Deprecated please use the element variation-attribute-value (complexType.VariationAttribute.Value) see complexType.VariationAttribute.Values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If TRUE, the attribute marks a default bucket. It is used to represent the unbucketed values, if 'unbucketed-values-mode' is 'show-as-bucket'. Note: The element 'value-list' is not considered, since the unbucketed values are determined dynamically. + If the default bucket is not defined within import file the system creates a new one with an empty 'display-name'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Allowed string values are the 'int' values defined for the Recommendation.recommendationType attribute, and additionally the values 'cross-sell', 'up-sell', and 'other' for backward compatibility. + + + + + + + + + + + + + Used to control the behavior of list elements in import file. + + + + + Add specified objects at the end of the existing list. + + + + + + Update existing specified objects without changing their position in the list. + Add new specified objects at end of existing list. + Remove existing objects not specified in list. + + + + + + Remove specified objects from the existing list. + + + + + Replace existing list with specified objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd b/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd new file mode 100644 index 000000000..f9d852d02 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/coupon.xsd b/packages/b2c-vs-extension/resources/xsd/coupon.xsd new file mode 100644 index 000000000..5cbf0d292 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/coupon.xsd @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd b/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd new file mode 100644 index 000000000..34064f553 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd b/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd new file mode 100644 index 000000000..26f1b6840 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The start-node attribute is optional for a CSRF pipeline. If left blank, it means that all calls + with given pipeline name + regardless of start node are permitted. + + + + + + + + + + + + + + After adding instance specificity to CSRF user agent whitelists, this element is kept as it is for backward compatibility during import. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customer.xsd b/packages/b2c-vs-extension/resources/xsd/customer.xsd new file mode 100644 index 000000000..5511498a8 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customer.xsd @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + Elements of this type are import-only and will never be exported. + Furthermore, elements of this type will be handled only if included in + a customer import file (customer.xsd) but are ignored if included in a + customer list import (customerlist2.xsd). +

+ The reason for this discrepancy is that customer groups are site-specific, + and customer import is always done in the context of a site whereas customer + list import is not. + + + + + + + + + + + + + + This element will never appear in a customer list export file (customerlist2.xsd) + but may be included in a customer export (customer.xsd). This element will also + be ignored if specified in a customer list import but will be processed in + a customer import. +

+ The reason for this discrepancy is that customer groups are site-specific, + and customer export is always done in the context of a + site where as customer list export is not. + + + + + + + Value is ignored when imported on a production instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is for use with Salesforce Payments to track references of customer profiles between systems. + + + + + + + + + + + + + If a customer is managed externally (i.e. provider-id and external-id are specified) + then the password is always optional. Otherwise, a password is required for any of + the following scenarios: + * creation of a new customer + * importing a customer in REPLACE mode + * changing the login of a customer + + + + + + + + + The element 'provider-id' has been deprecated. Use external-profiles to manage provider-id/external-id pairs. + + + + + The element 'external-id' has been deprecated. Use external-profiles to manage provider-id/external-id pairs. + + + + + + + + + + + + + + + + + + + + + + + + + Support for the md5 encryption algorithm has changed. Passwords imported in md5 will be stored as an scrypt'd value. + + + + + + + + + + + Represents an encrypted or plain value and contains information on how to deal with it during import. + + Import: If the attribute 'encrypted' is set to false, the content of this tag will be encrypted + using the new scrypt algorithm. 'encryptionScheme' should be 'null' in this case. + If the attribute 'encrypted' is set to true, it is assumed that the given password was encrypted + with the algorithm in 'encryptionScheme' (md5, scrypt, or the internal implementation s0001). + The password will be imported 'as is'. + + Export: The attribute 'encrypted' will always be set to true. The attribute 'encryptionScheme' + will reflect the encryption scheme of the password in the database (md5 (deprecated), scrypt, or the internal implementation s0001). + The encrypted password will not be transformed during export. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents the assignment of a customer to a customer group. + + When a <group-assignment> element is imported, the customer with the specified + customer-no is assigned to the customer group with the specified group-id. If an assignment + already exists, no change is made. + + When an element is imported with attribute mode="delete", the assignment of the customer + with the specified customer-no to the customer group with the specified group-id is removed. + If the customer is not assigned to the group, no change is made. + + When mode="delete", either the customer-no or group-id attribute can be omitted to remove + multiple assignments of customers to customer groups. If only customer-no is present, any + existing assignments of the specified customer to groups are removed. If only group-id is + present, any existing assignments of customers to the specified group are removed. + + Assignments can only be created or removed for static customer groups. A warning message + is logged if a specified customer group is dynamic. + + + + + + + + + + + + + + + + + + + + + The ID of the payment account used to create the customer payment profile. + + + + + + + The type of the payment account used to create the customer payment profile. + + + + + + + The ID of the customer payment profile in the payment account. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Allowed string values are the 'int' values defined for the Customer.gender attribute, and additionally the values 'male' and 'female' for backward compatibility. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The allowed character set for the login element is + limited to [A-Z a-z 0-9 .@_-]. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd b/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd new file mode 100644 index 000000000..cbeffd3b0 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd b/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd new file mode 100644 index 000000000..4ae2ddd77 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/customergroup.xsd b/packages/b2c-vs-extension/resources/xsd/customergroup.xsd new file mode 100644 index 000000000..11b25c89f --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customergroup.xsd @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents the assignment of a customer to a customer group. + + When a <group-assignment> element is imported, the customer with the specified + customer-no is assigned to the customer group with the specified group-id. If an assignment + already exists, no change is made. + + When an element is imported with attribute mode="delete", the assignment of the customer + with the specified customer-no to the customer group with the specified group-id is removed. + If the customer is not assigned to the group, no change is made. + + When mode="delete", either the customer-no or group-id attribute can be omitted to remove + multiple assignments of customers to customer groups. If only customer-no is present, any + existing assignments of the specified customer to groups are removed. If only group-id is + present, any existing assignments of customers to the specified group are removed. + + Assignments can only be created or removed for static customer groups. A warning message + is logged if a specified customer group is dynamic. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customerlist.xsd b/packages/b2c-vs-extension/resources/xsd/customerlist.xsd new file mode 100644 index 000000000..353ce8bf1 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customerlist.xsd @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd b/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd new file mode 100644 index 000000000..d079b6102 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd b/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd new file mode 100644 index 000000000..0088398ab --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A positive value identifies a known encryption serial number, a value of -1 indicates no encryption + + + + + + + + + + + + + + + + + + + + + + + + + + + + The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. + + + + + + Creditcard tokenization - card-token is used to store the token provided by a creditcard tokenization service. When used, a masked creditcard number can be stored in the card-number and the ek-id is set to -1 to indicate the card-number is permenantly masked + + + + + + Some card types maintain a start date in addition to an expiration date (Amex, Solo, Switch, etc). Other card types may ignore these elements. + + + + + + + + Issue number is a concept supported by Solo/Switch cards in the UK, and is either a 1 or 2 digit number. + + + + + These are the custom attributes of the CustomerPaymentInstrument system object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/customobject.xsd b/packages/b2c-vs-extension/resources/xsd/customobject.xsd new file mode 100644 index 000000000..674431e47 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/customobject.xsd @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/dcext.xsd b/packages/b2c-vs-extension/resources/xsd/dcext.xsd new file mode 100644 index 000000000..5c15085f9 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/dcext.xsd @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The element 'catalog-id' is deprecated and will be removed in a future release. Use catalog-id in catalog-configuration to set the Facebook identifier of a product feed. + + + + + If the element, 'conversions-api-enabled-flag', is set to TRUE, then 'pixel-id' cannot be manually changed here as it is tied to the provided 'conversions-api-pixel-access-token'. + + + + + The element 'product-feed-id' is deprecated and will be removed in a future release. Use product-feed-id in catalog-configuration to set the Facebook identifier of a product feed. + + + + + The element 'country-code' is deprecated and will be removed in a future release. Use country-code in catalog-configuration to set the Facebook identifier of a product feed. + + + + + The element, 'access-token', is encrypted by the system and cannot be manually set here. + + + + + + If the element 'conversions-api-enabled-flag' is set to true, then the value of 'conversions-api-pixel-access-token' must also be set. + + + + + The element, 'conversions-api-pixel-access-token', is encrypted by the system and cannot be manually set here. + + + + + + The element 'redirect-action' is deprecated and will be removed in a future release. Use redirect-action in catalog-configuration to set the default redirect action for products in a Facebook product feed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The element 'environment' is deprecated and will be removed in a future release. Use test-environment-flag to enable/disable Android Pay test environment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/feed.xsd b/packages/b2c-vs-extension/resources/xsd/feed.xsd new file mode 100644 index 000000000..97ca7f4c4 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/feed.xsd @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/form.xsd b/packages/b2c-vs-extension/resources/xsd/form.xsd new file mode 100644 index 000000000..b6234503e --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/form.xsd @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/geolocation.xsd b/packages/b2c-vs-extension/resources/xsd/geolocation.xsd new file mode 100644 index 000000000..9e011ef18 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/geolocation.xsd @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd b/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd new file mode 100644 index 000000000..625ec652e --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + The original date and time the Gift Certificate was created. + + + + + The name of the person receiving the Gift Certificate. + + + + + The email address of the person receiving the Gift Certificate. + + + + + The name of the person sending the Gift Certificate. + + + + + The message to include with the Gift Certificate. + + + + + A description that can be used to qualify the Gift Certificate. + + + + + The Order number of the Order where the Gift Certificate was purchased. + + + + + The enabled state of the Gift Certificate. + + + + + The current usage status of the Gift Certificate. + + + + + The currency code of the Gift Certificate. + + + + + The original amount of the Gift Certificate. + + + + + Gift Certificate redemptions. + + + + + + + + + + + + + + + + + + + The date of the Gift Certificate transaction. + + + + + The amount of the Gift Certificate transaction. + + + + + The Order number of the Gift Certificate transaction. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/inventory.xsd b/packages/b2c-vs-extension/resources/xsd/inventory.xsd new file mode 100644 index 000000000..f65a4cbca --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/inventory.xsd @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated in favor of new "in-stock-datetime" element. + + + + + + + + This element is calculated as the allocation + preorderBackorderAllocation - turnover - on-order. + For this reason it is read only and cannot be imported. + + + + + + + On Order value is increased when an order is created. + It will be decreased and with that turnover will be increased when the order is exported. + For this reason it is read only and cannot be imported. + + + + + + + This element is calculated as the sum of all inventory transactions (decrements and increments) + that have been recorded subsequent to the allocation was reset date. + The quantity value can be negative due to higher quantity of inventory decrements than increments. + For this reason it is read only and cannot be imported. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/jobs.xsd b/packages/b2c-vs-extension/resources/xsd/jobs.xsd new file mode 100644 index 000000000..e682322a0 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/jobs.xsd @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reserved for Beta users. Priority will not be imported and a warning will be logged if the Schedule Prioritization feature is disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/library.xsd b/packages/b2c-vs-extension/resources/xsd/library.xsd new file mode 100644 index 000000000..ea8ec7d9e --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/library.xsd @@ -0,0 +1,580 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The type must either be a page ("page.*") or a component ("component.*"). Those types are defined + as part of the storefront cartridges, that should be assigned to the same sites to which the + given library is assigned to such that definition and data match. + + + + + + + The config can only be set for pages (see contentassetpageconfig.json) and + components (contentassetcomponentconfig.json). + + + + + + + The visibility-mode can only be set for pages. + + + + + + + The data can only be set for components (see contentassetcomponentdata.json). + + + + + + + The search-words are used for creating a search index on the content. + + + + + + + The aspect-type is only viable for Page Designer pages. + + + + + + + + + The searchable-flag cannot be set for components. + + + + + + + + + + Components cannot be assigned to folders. + + + + + + + The content-links can only be set for pages and components. Each can have multiple outgoing + links. Incoming links are only allowed for components (at most one per component). + + + + + + + The content-object-assignments can only be set for pages. Each page can be assigned to multiple + objects and each object can be assigned to multiple pages. + + + + + + + The content-variant-assignments can only be set for default content. Each default content can have + multiple variant content assigned in a specific order. + + + + + + + The sitemap-included-flag cannot be set for components. + + + + + + + The sitemap-changefrequency cannot be set for components. + + + + + + + The sitemap-priority cannot be set for components. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These links are only allowed between content elements of type page or component. + + + + + + + + + + + Each component can only have a single incoming content link (and pages cannot have incoming links). + + + + + + + + + + + + + + These links are only allowed between content elements of type page and other persistent objects. At the moment + only categories are supported. + + + + + + + + + + + Each object can be assigned to multiple pages (but only to one page per aspect type) and vice versa. + + + + + + + + + + + + These assignments represent variant content linked to a default content. Each default content can have + multiple variant content in a specific order. + + + + + + + + + + + Represents a variant content assignment with position for ordering. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/locales.xsd b/packages/b2c-vs-extension/resources/xsd/locales.xsd new file mode 100644 index 000000000..119e35878 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/locales.xsd @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/metadata.xsd b/packages/b2c-vs-extension/resources/xsd/metadata.xsd new file mode 100644 index 000000000..c2de4a9bd --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/metadata.xsd @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element attribute 'mandatory' is immutable and will be ignored during import and export. + + + + + + + Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import + and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searachable attributes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import + and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searchable attributes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import + and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searchable attributes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/oauth.xsd b/packages/b2c-vs-extension/resources/xsd/oauth.xsd new file mode 100644 index 000000000..a2a131143 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/oauth.xsd @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/order.xsd b/packages/b2c-vs-extension/resources/xsd/order.xsd new file mode 100644 index 000000000..a26069f5c --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/order.xsd @@ -0,0 +1,1255 @@ + + + + + + + + + + + + + + + + + + + + The export version which was used for the export. Since 18.5. Using version 19.2 + leads to a check during order import that guest element exist on customer node. + Specifying the guest flag brings additional safety because it reduces the + likelihood that orders are attached to another customer. Since version 20.6 the fields + product-name (4000), suite (256) and price-book-id (256) support longer string values + due to their implementation. Since version 20.8 the fields inventory-list-id and + custom-attributes of ProductShippingLineItem are exported. Since version 21.9 the + fields account-id and account-type are exported. Since version 22.9 details to a + Salesforce Payments payment are no longer exported in a custom method element. + + + + + + + + + + + + + + + + + + + Required except in delete mode. + + + + + + + Required except in delete mode. + + + + + + + Since version 15.4. + The taxation policy of the site at the time the order was placed. + + + + + + + + + + Information about the customer that placed the order. + + + + + + Order status information. + + + + + + + + + + + + + + Product line items of the order. + + + + + + + Shipments of the order. + + + + + + Since version 23.4 + True if this order was calculated with grouped taxation. + Not exported unless true. + + + + + + Order totals. + + + + + Payments used for the order. + + + + + + + + + + For internal use only. Element will not be contained in order.xml. + + + + + + Since version 19.5. + Value is ignored when imported on a production instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Assigns the product line item to a particular shipment of this order. The shipment referenced by the id must be defined in this order, otherwise the product line item is not valid. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Since version 15.6. + True if this price adjustment was applied manually to the order via a CSR application (e.g. as an appeasement). + Not exported unless true. + + + + + + + Since version 15.6. + Object representing the logical discount that was applied to the order. + This element is only exported for custom PriceAdjustments created using one of the the createPriceAdjustment(String, Discount) API methods. + + + + + + + Since version 15.6. + The ID of the user who manually applied this PriceAdjustment to the order. + This element is only only exported if the PriceAdjustment is manual. + + + + + + + Since version 15.6. + The date this PriceAdjustment was manually applied to the order. + This element is only only exported if the PriceAdjustment is manual. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Demandware order object. + + + + + + + + Was the order placed by a guest. Required with version 19.2 + + + + + + + Customer email address. + + + + + The customer billing address used with the order. + + + + + + + + + + The order processing status. Possible values are: CREATED NEW OPEN COMPLETED CANCELLED REPLACED FAILED + + + + + The overall order shipping status. Possible values are: NOT_SHIPPED PART_SHIPPED SHIPPED + + + + + The order confirmation status. Possible values are: NOT_CONFIRMED CONFIRMED + + + + + + The order payment status. Possible values are: NOT_PAID PART_PAID PAID + + + + + + The order export status. Possible values are: NOT_EXPORTED EXPORTED READY FAILED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID of the shipping method selected for the group. + + + + + + + + + + + + + + + + + The shipping status of the shipment. Possible values are: NOT_SHIPPED SHIPPED + + + + + + + + + + + + + + + + + + + Item-id must be unique per shipment. If not specified the default shipping of the shipment is used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Order-level merchandise price-adjustments are included within these totals. + + + + + + Order-level shipping price-adjustments are included within these totals. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Since version 21.9. + The ID of the payment account used to create the payment transaction. + + + + + + + Since version 21.9. + The type of the payment account used to create the payment transaction. + + + + + + These are the custom attributes of the PaymentTransaction system object. + + + + + + For internal use. A positive value identifies a known encryption serial number, a value of -1 indicates no encryption + + + + + + + + + + + + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. + + + + + + + Creditcard tokenization: field used to store token provided by creditcard tokenizer. The card-number is used for the permanantly masked creditcard number + + + + + Some card types maintain a start date in addition to an expiration date (Amex, Solo, Switch, etc). Other card types may ignore these elements. + + + + + + + + Issue number is a concept supported by Solo/Switch cards in the UK, and is either a 1 or 2 digit number. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. + + + + + The actual PAN of the card used for the Apple Pay transaction. The value will be in a format like XXXX-XXXX-XXXX-1234 with no more than 4 of the last digits unmasked. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. + + + + + The actual PAN of the card used for the Android Pay transaction. The value will be in a format like XXXX-XXXX-XXXX-1234 with no more than 4 of the last digits unmasked. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + + + + + + + + + + + + + + + Since version 22.9. + Payment instrument details for a payment made using Salesforce Payments. + + + + + + + + + + + + + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type bancontact. + + + + + + The last 4 digits of the account number. + + + + + The name of the bank used for the payment. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type card. + + + + + + The card brand, such as (but not limited to) amex, unionpay, or visa. + + + + + The last 4 digits of the card number. + + + + + The type of wallet used to present the card, such as (but not limited to) apple-pay or google-pay. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type ideal. + + + + + + The bank used for the payment, such as (but not limited to) abn_amro or ing. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type sepa_debit. + + + + + + The last 4 digits of the account number. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type paypal. + + + + + + The payer email address of the PayPal order. + + + + + ID of the capture to the PayPal order. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type klarna. + + + + + + The category of Klarna payment, such as (but not limited to) pay_later or pay_in_installments. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type eps. + + + + + + The bank used for the payment, such as (but not limited to) dolomitenbank or easybank_ag. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type venmo. + + + + + + The payer email address of the PayPal order used to make the Venmo payment. + + + + + ID of the capture to the PayPal order used to make the Venmo payment. + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + Since version 22.9. + Details to a Salesforce Payments payment of type afterpay_clearpay. + + + + + + These are the custom attributes of the OrderPaymentInstrument system object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Import mode delete can only be used on + non-production systems. One possible use case is to enable automated + testing by deleting the orders before or after each test run. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd b/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd new file mode 100644 index 000000000..c1ccde9df --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd b/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd new file mode 100644 index 000000000..56cfb0e58 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd b/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd new file mode 100644 index 000000000..c0f0d4642 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/preferences.xsd b/packages/b2c-vs-extension/resources/xsd/preferences.xsd new file mode 100644 index 000000000..9da472591 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/preferences.xsd @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd b/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd new file mode 100644 index 000000000..d22dfb222 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/pricebook.xsd b/packages/b2c-vs-extension/resources/xsd/pricebook.xsd new file mode 100644 index 000000000..4743a5d54 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/pricebook.xsd @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If this flag is set to true the pricebook is imported as feed based otherwise it is imported as web based + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/productlist.xsd b/packages/b2c-vs-extension/resources/xsd/productlist.xsd new file mode 100644 index 000000000..c49e8f6e9 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/productlist.xsd @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/promotion.xsd b/packages/b2c-vs-extension/resources/xsd/promotion.xsd new file mode 100644 index 000000000..688601e2c --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/promotion.xsd @@ -0,0 +1,1019 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + campaign-scope is part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. + + + + + + + + + + + + store-groups are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. + + + + + + + stores are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. + + + + + + + + + + + + + + + + + + + + + + + + Lack of 'MatchMode' attribute defaults to legacy 'any' behavior. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated in favor of "qualifiers" element of PromotionCampaignAssignment. + + + + + + + Deprecated in favor of "rank" element of PromotionCampaignAssignment. + + + + + + + + + + + + + + Deprecated in favor of "schedule" element of PromotionCampaignAssignment. + + + + + + + Deprecated in favor of "coupons" element of PromotionCampaignAssignment. + + + + + + + Deprecated in favor of "source-codes" element of PromotionCampaignAssignment. + + + + + + + + + + + + + + + + + + + Deprecated since promotions may now be assigned to multiple campaigns. + Use promotion-campaign-assignment instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is present only for product promotions of type "Buy X and Y / Get Z" + + + + + + + This element is present only for product promotions of types "With combination of products" and "Buy X and Y / Get Z" + + + + + + + + + + + + If set to true, the promotion requires that the qualifying products and discounted products + are all identical. The promotion may apply up to the application limit for each + separate product in the order. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Use excluded-products instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Method-id must be either the ID of a payment method in the system or a credit card type + prepended with the prefix "CREDIT_CARD" (e.g. CREDIT_CARD.Visa). + + + + + + + + + + + + + + + + + + + + Flag that controls behavior for shipping promotions with qualifying products. + If this flag is true, the promotion does not apply if the shipment contains any nonqualifying products, + even if the purchase conditions are otherwise satisfied. This is the default behavior if this element + is omitted from the import file. + If this flag is false, the promotion allows nonqualifying products in the shipment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. If used during import, it is assumed bonus product has price == 0.00. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This attribute determines if all qualifiers must be satisfied in order + for the promotion to be applicable, or if only one must be satisfied. + If not specified during import, then "any" is assumed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd b/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd new file mode 100644 index 000000000..729655a13 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd b/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd new file mode 100644 index 000000000..970db22b3 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/schedules.xsd b/packages/b2c-vs-extension/resources/xsd/schedules.xsd new file mode 100644 index 000000000..43381112b --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/schedules.xsd @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + Reserved for Beta users. Priority will not be imported and a warning will be logged if the Schedule Prioritization feature is disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Please use the element day-of-week (complexType.DayOfWeek.weekday). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/search.xsd b/packages/b2c-vs-extension/resources/xsd/search.xsd new file mode 100644 index 000000000..63df085fe --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/search.xsd @@ -0,0 +1,333 @@ + + + + + + + + + + + Deprecated. search.xsd is deprecated and has been replaced by search2.xsd, which supports all elements except 'indexes'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element 'text-relevance-attributes' is not longer supported and will be ignored during import + and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd. + + + + + + + Deprecated. The element 'sorting-attributes' is deprecated but still supported. + Please use the feature sorting rules with sort.xsd. + + + + + + + + + + + + + + Deprecated. The element 'stemmer' is deprecated and will be ignored. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element 'text-relevance-attribute' is not longer supported and will be ignored during import + and export. Please use the element 'searchable-attribute' (SearchableAttributes) of search2.xsd. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The element 'sorting-attribute' is deprecated but still supported. + Please use the feature sorting rules with sort.xsd. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Spelling index is no longer supported by the platform. + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/search2.xsd b/packages/b2c-vs-extension/resources/xsd/search2.xsd new file mode 100644 index 000000000..e184d0f91 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/search2.xsd @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/services.xsd b/packages/b2c-vs-extension/resources/xsd/services.xsd new file mode 100644 index 000000000..d1daa272e --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/services.xsd @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. The 'RSA' value is unsupported for 'encryption-type'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/shipping.xsd b/packages/b2c-vs-extension/resources/xsd/shipping.xsd new file mode 100644 index 000000000..a18648009 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/shipping.xsd @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ID of the external shipping method selected. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd b/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd new file mode 100644 index 000000000..c30278917 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/site.xsd b/packages/b2c-vs-extension/resources/xsd/site.xsd new file mode 100644 index 000000000..446cc6d11 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/site.xsd @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd b/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd new file mode 100644 index 000000000..1d5ebbe04 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Please use element custom-sitemap (complexType.CustomSitemap). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated. Please use complex type complexType.CustomSitemap. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/slot.xsd b/packages/b2c-vs-extension/resources/xsd/slot.xsd new file mode 100644 index 000000000..ecd16a25b --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/slot.xsd @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Determines if the slot-configuration is implicitly assigned to the site or not. + If not specified, defaults to true. + The elements rank, schedule, and customer-groups can only be set on slot-configurations assigned to the site. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reserved for Dynamic Recommendations Beta users. Will not be created and a warning will be logged if the Enable Dynamic Recommendations Beta feature is not enabled by Ops. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Slot configuration import in MERGE mode only updates content for locales + specified in the import file instead of replacing all previous ones. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/sort.xsd b/packages/b2c-vs-extension/resources/xsd/sort.xsd new file mode 100644 index 000000000..6a55dbd37 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/sort.xsd @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd b/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd new file mode 100644 index 000000000..6f0c1aeb7 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The element 'campaigns' has been deprecated. Use promotion import to assign source code groups to campaigns. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/store.xsd b/packages/b2c-vs-extension/resources/xsd/store.xsd new file mode 100644 index 000000000..232b5e439 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/store.xsd @@ -0,0 +1,194 @@ + + + + + + + + + + + + + store-group are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deprecated and will be removed in a future release. + Please use pos-enabled-flag instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/storefronts.xsd b/packages/b2c-vs-extension/resources/xsd/storefronts.xsd new file mode 100644 index 000000000..5ca54155e --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/storefronts.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/tax.xsd b/packages/b2c-vs-extension/resources/xsd/tax.xsd new file mode 100644 index 000000000..1d6856be7 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/tax.xsd @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/urlrules.xsd b/packages/b2c-vs-extension/resources/xsd/urlrules.xsd new file mode 100644 index 000000000..9ccf703a1 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/urlrules.xsd @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + URLSearchRefinements support only one URLSearchRefinement with constant 'true'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/b2c-vs-extension/resources/xsd/xml.xsd b/packages/b2c-vs-extension/resources/xsd/xml.xsd new file mode 100644 index 000000000..60756d193 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd/xml.xsd @@ -0,0 +1,54 @@ + + + + + + See http://www.w3.org/XML/1998/namespace.html and http://www.w3.org/TR/REC-xml for information about this namespace. + + + + + This schema defines attributes and an attribute group suitable for use by schemas wishing to allow xml:base, xml:lang or xml:space attributes on elements they define. + + To enable this, such a schema must import this schema for the XML namespace, e.g. as follows: <schema . . .> . . . <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes or the group defined below will have the desired effect, e.g. + + <type . . .> . . . <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance element with any of those attributes + + + + + In keeping with the XML Schema WG's standard versioning policy, this schema document will persist at http://www.w3.org/2001/03/xml.xsd. At the date of issue it can also be found at http://www.w3.org/2001/xml.xsd. The schema document at that URI may however change in the future, in order to remain compatible with the latest version of XML Schema itself. In other words, if the XML Schema namespace changes, the version of this document at http://www.w3.org/2001/xml.xsd will change accordingly; the version at http://www.w3.org/2001/03/xml.xsd will not change. + + + + + In due course, we should install the relevant ISO 2- and 3-letter codes as the enumerated possible values . . . + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for information about this attribute. + + + + + + + + + + diff --git a/packages/b2c-vs-extension/scripts/sync-xsd.mjs b/packages/b2c-vs-extension/scripts/sync-xsd.mjs new file mode 100644 index 000000000..207566610 --- /dev/null +++ b/packages/b2c-vs-extension/scripts/sync-xsd.mjs @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2025, Salesforce, Inc. + * SPDX-License-Identifier: Apache-2 + * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import {fileURLToPath} from 'node:url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const pkgRoot = path.resolve(__dirname, '..'); +const sdkXsdDir = path.resolve(pkgRoot, '..', 'b2c-tooling-sdk', 'data', 'xsd'); +const extensionXsdDir = path.join(pkgRoot, 'resources', 'xsd'); +const xmlValidationConfigPath = path.join(pkgRoot, 'src', 'xml-validation', 'index.ts'); + +function fail(message) { + console.error(`[xsd-sync] ${message}`); + process.exit(1); +} + +function listXsdFiles(directory) { + return fs + .readdirSync(directory) + .filter((name) => name.endsWith('.xsd')) + .sort((left, right) => left.localeCompare(right)); +} + +function readMappedSchemas() { + if (!fs.existsSync(xmlValidationConfigPath)) { + fail(`XML validation mapping file not found: ${xmlValidationConfigPath}`); + } + + const source = fs.readFileSync(xmlValidationConfigPath, 'utf8'); + const matches = [...source.matchAll(/schemaFile:\s*'([^']+)'/g)].map((match) => match[1]); + + if (matches.length === 0) { + fail('No schemaFile mappings found in src/xml-validation/index.ts'); + } + + return [...new Set(matches)].sort((left, right) => left.localeCompare(right)); +} + +function filesEqual(leftPath, rightPath) { + if (!fs.existsSync(leftPath) || !fs.existsSync(rightPath)) return false; + const left = fs.readFileSync(leftPath); + const right = fs.readFileSync(rightPath); + return left.equals(right); +} + +if (!fs.existsSync(sdkXsdDir)) { + fail(`SDK XSD source directory not found: ${sdkXsdDir}`); +} + +fs.mkdirSync(extensionXsdDir, {recursive: true}); + +const sourceFiles = listXsdFiles(sdkXsdDir); +if (sourceFiles.length === 0) { + fail(`No .xsd files found in source directory: ${sdkXsdDir}`); +} + +const mappedSchemas = readMappedSchemas(); +const sourceFileSet = new Set(sourceFiles); +for (const mappedSchema of mappedSchemas) { + if (!sourceFileSet.has(mappedSchema)) { + fail(`Mapped schema "${mappedSchema}" is missing from SDK source directory`); + } +} + +const destinationFiles = listXsdFiles(extensionXsdDir); +let removedCount = 0; +for (const destinationFile of destinationFiles) { + if (!sourceFileSet.has(destinationFile)) { + fs.rmSync(path.join(extensionXsdDir, destinationFile), {force: true}); + removedCount += 1; + } +} + +let copiedCount = 0; +let unchangedCount = 0; +for (const sourceFile of sourceFiles) { + const sourcePath = path.join(sdkXsdDir, sourceFile); + const destinationPath = path.join(extensionXsdDir, sourceFile); + + if (filesEqual(sourcePath, destinationPath)) { + unchangedCount += 1; + continue; + } + + fs.copyFileSync(sourcePath, destinationPath); + copiedCount += 1; +} + +console.log( + `[xsd-sync] complete: ${sourceFiles.length} source files, ${copiedCount} copied, ${unchangedCount} unchanged, ${removedCount} removed`, +); diff --git a/packages/b2c-vs-extension/src/extension.ts b/packages/b2c-vs-extension/src/extension.ts index 2eb5a7ab1..3ab0fe887 100644 --- a/packages/b2c-vs-extension/src/extension.ts +++ b/packages/b2c-vs-extension/src/extension.ts @@ -24,6 +24,7 @@ import {registerDebugger} from './debugger/index.js'; import {registerCodeSync} from './code-sync/index.js'; import {registerScriptTypes} from './script-types/index.js'; import {registerWebDavTree} from './webdav-tree/index.js'; +import {registerXmlValidation} from './xml-validation/index.js'; import {disposeTelemetry, initTelemetry, markFeatureUsed, sendEvent, sendException} from './telemetry.js'; import {registerCipAnalytics} from './cip-analytics/index.js'; @@ -436,6 +437,8 @@ async function activateInner(context: vscode.ExtensionContext, log: vscode.Outpu registerScriptTypes(context, cartridgeService, log); } + registerXmlValidation(context, log); + if (settings.get('features.cipAnalytics', true)) { registerCipAnalytics(context, configProvider, log); } diff --git a/packages/b2c-vs-extension/src/xml-validation/index.ts b/packages/b2c-vs-extension/src/xml-validation/index.ts new file mode 100644 index 000000000..49db626e3 --- /dev/null +++ b/packages/b2c-vs-extension/src/xml-validation/index.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2025, Salesforce, Inc. + * SPDX-License-Identifier: Apache-2 + * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 + */ +import * as vscode from 'vscode'; + +interface XmlFileAssociation { + pattern: string; + systemId: string; +} + +const XSD_MAPPINGS: ReadonlyArray<{pattern: string; schemaFile: string}> = [ + {pattern: '**/metadata/catalogs/*.xml', schemaFile: 'catalog.xsd'}, + {pattern: '**/metadata/customer-groups/*.xml', schemaFile: 'customergroup.xsd'}, + {pattern: '**/metadata/customer-lists/*.xml', schemaFile: 'customerlist.xsd'}, + {pattern: '**/metadata/custom-objects/*.xml', schemaFile: 'customobject.xsd'}, + {pattern: '**/metadata/inventory-lists/*.xml', schemaFile: 'inventory.xsd'}, + {pattern: '**/metadata/libraries/*.xml', schemaFile: 'library.xsd'}, + {pattern: '**/metadata/payment-methods/*.xml', schemaFile: 'paymentmethod.xsd'}, + {pattern: '**/metadata/payment-processors/*.xml', schemaFile: 'paymentprocessor.xsd'}, + {pattern: '**/metadata/preferences/*.xml', schemaFile: 'preferences.xsd'}, + {pattern: '**/metadata/pricebooks/*.xml', schemaFile: 'pricebook.xsd'}, + {pattern: '**/metadata/promotions/*.xml', schemaFile: 'promotion.xsd'}, + {pattern: '**/metadata/redirect-urls/*.xml', schemaFile: 'redirecturl.xsd'}, + {pattern: '**/metadata/search/*.xml', schemaFile: 'search.xsd'}, + {pattern: '**/metadata/shipping/*.xml', schemaFile: 'shipping.xsd'}, + {pattern: '**/metadata/sites/*.xml', schemaFile: 'site.xsd'}, + {pattern: '**/metadata/slots/*.xml', schemaFile: 'slot.xsd'}, + {pattern: '**/metadata/sourcecodes/*.xml', schemaFile: 'sourcecode.xsd'}, + {pattern: '**/metadata/stores/*.xml', schemaFile: 'store.xsd'}, + {pattern: '**/metadata/url-rules/*.xml', schemaFile: 'urlrules.xsd'}, +]; + +function getDesiredAssociations(extensionUri: vscode.Uri): XmlFileAssociation[] { + return XSD_MAPPINGS.map((mapping) => ({ + pattern: mapping.pattern, + systemId: vscode.Uri.joinPath(extensionUri, 'resources', 'xsd', mapping.schemaFile).toString(), + })); +} + +function normalizeAssociations(value: unknown): XmlFileAssociation[] { + if (!Array.isArray(value)) return []; + return value.filter( + (entry): entry is XmlFileAssociation => + Boolean(entry && typeof entry === 'object' && 'pattern' in entry && typeof entry.pattern === 'string') && + Boolean('systemId' in entry && typeof entry.systemId === 'string'), + ); +} + +function arraysEqual(left: XmlFileAssociation[], right: XmlFileAssociation[]): boolean { + if (left.length !== right.length) return false; + return left.every((item, idx) => item.pattern === right[idx]?.pattern && item.systemId === right[idx]?.systemId); +} + +export function registerXmlValidation(context: vscode.ExtensionContext, log: vscode.OutputChannel): void { + const applyAssociations = async (): Promise => { + const xmlConfig = vscode.workspace.getConfiguration('xml'); + const existing = normalizeAssociations(xmlConfig.get('fileAssociations', [])); + const desired = getDesiredAssociations(context.extensionUri); + const managedPatterns = new Set(desired.map((association) => association.pattern)); + + const retained = existing.filter((association) => !managedPatterns.has(association.pattern)); + const next = [...retained, ...desired]; + + if (arraysEqual(existing, next)) return; + + try { + await xmlConfig.update('fileAssociations', next, vscode.ConfigurationTarget.Workspace); + log.appendLine(`[XmlValidation] Registered ${desired.length} XML file association(s) for B2C metadata schemas.`); + } catch (err) { + log.appendLine(`[XmlValidation] Failed to register XML file associations: ${String(err)}`); + } + }; + + void applyAssociations(); + + const configChange = vscode.workspace.onDidChangeConfiguration((e) => { + if (e.affectsConfiguration('xml.fileAssociations')) { + void applyAssociations(); + } + }); + + context.subscriptions.push(configChange); +} From 18a432d2a397c4933b647bdaa1b46ccede98fb71 Mon Sep 17 00:00:00 2001 From: CharithaT07 Date: Wed, 3 Jun 2026 14:53:37 +0530 Subject: [PATCH 2/5] adding XSD valiation in vs extension --- .changeset/vs-extension-xml-validation.md | 10 + docs/vscode-extension/configuration.md | 31 +- packages/b2c-vs-extension/.gitignore | 1 + packages/b2c-vs-extension/package.json | 476 +++++- .../resources/xsd-mappings.json | 383 +++++ .../b2c-vs-extension/resources/xsd/abtest.xsd | 360 ----- .../resources/xsd/abtestparticipants.xsd | 58 - .../resources/xsd/assignment.xsd | 158 -- .../b2c-vs-extension/resources/xsd/bmext.xsd | 280 ---- .../resources/xsd/cachesettings.xsd | 75 - .../resources/xsd/catalog.xsd | 1363 ----------------- .../resources/xsd/commercefeaturestate.xsd | 101 -- .../b2c-vs-extension/resources/xsd/coupon.xsd | 206 --- .../resources/xsd/couponredemption.xsd | 58 - .../resources/xsd/csrfwhitelists.xsd | 81 - .../resources/xsd/customer.xsd | 411 ----- .../resources/xsd/customeractivedata.xsd | 75 - .../resources/xsd/customercdnsettings.xsd | 36 - .../resources/xsd/customergroup.xsd | 276 ---- .../resources/xsd/customerlist.xsd | 72 - .../resources/xsd/customerlist2.xsd | 52 - .../xsd/customerpaymentinstrument.xsd | 189 --- .../resources/xsd/customobject.xsd | 68 - .../b2c-vs-extension/resources/xsd/dcext.xsd | 391 ----- .../b2c-vs-extension/resources/xsd/feed.xsd | 76 - .../b2c-vs-extension/resources/xsd/form.xsd | 262 ---- .../resources/xsd/geolocation.xsd | 68 - .../resources/xsd/giftcertificate.xsd | 186 --- .../resources/xsd/inventory.xsd | 174 --- .../b2c-vs-extension/resources/xsd/jobs.xsd | 408 ----- .../resources/xsd/library.xsd | 580 ------- .../resources/xsd/locales.xsd | 172 --- .../resources/xsd/metadata.xsd | 315 ---- .../b2c-vs-extension/resources/xsd/oauth.xsd | 60 - .../b2c-vs-extension/resources/xsd/order.xsd | 1255 --------------- .../resources/xsd/pagemetatag.xsd | 111 -- .../resources/xsd/paymentmethod.xsd | 216 --- .../resources/xsd/paymentprocessor.xsd | 86 -- .../resources/xsd/preferences.xsd | 74 - .../resources/xsd/priceadjustmentlimits.xsd | 74 - .../resources/xsd/pricebook.xsd | 166 -- .../resources/xsd/productlist.xsd | 246 --- .../resources/xsd/promotion.xsd | 1019 ------------ .../resources/xsd/redirecturl.xsd | 120 -- .../resources/xsd/returnimportfeed.xsd | 82 - .../resources/xsd/schedules.xsd | 246 --- .../b2c-vs-extension/resources/xsd/search.xsd | 333 ---- .../resources/xsd/search2.xsd | 478 ------ .../resources/xsd/services.xsd | 139 -- .../resources/xsd/shipping.xsd | 487 ------ .../resources/xsd/shippingorderupdatefeed.xsd | 125 -- .../b2c-vs-extension/resources/xsd/site.xsd | 89 -- .../resources/xsd/sitemapconfiguration.xsd | 230 --- .../b2c-vs-extension/resources/xsd/slot.xsd | 292 ---- .../b2c-vs-extension/resources/xsd/sort.xsd | 328 ---- .../resources/xsd/sourcecode.xsd | 188 --- .../b2c-vs-extension/resources/xsd/store.xsd | 194 --- .../resources/xsd/storefronts.xsd | 104 -- .../b2c-vs-extension/resources/xsd/tax.xsd | 112 -- .../resources/xsd/urlrules.xsd | 273 ---- .../b2c-vs-extension/resources/xsd/xml.xsd | 54 - .../b2c-vs-extension/scripts/sync-xsd.mjs | 169 +- packages/b2c-vs-extension/src/extension.ts | 3 - .../src/test/xml-validation.test.ts | 80 + .../src/xml-validation/index.ts | 85 - 65 files changed, 1075 insertions(+), 13895 deletions(-) create mode 100644 .changeset/vs-extension-xml-validation.md create mode 100644 packages/b2c-vs-extension/resources/xsd-mappings.json delete mode 100644 packages/b2c-vs-extension/resources/xsd/abtest.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/assignment.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/bmext.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/cachesettings.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/catalog.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/coupon.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/couponredemption.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customer.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customergroup.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customerlist.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customerlist2.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/customobject.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/dcext.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/feed.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/form.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/geolocation.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/inventory.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/jobs.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/library.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/locales.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/metadata.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/oauth.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/order.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/preferences.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/pricebook.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/productlist.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/promotion.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/redirecturl.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/schedules.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/search.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/search2.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/services.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/shipping.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/site.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/slot.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/sort.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/sourcecode.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/store.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/storefronts.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/tax.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/urlrules.xsd delete mode 100644 packages/b2c-vs-extension/resources/xsd/xml.xsd create mode 100644 packages/b2c-vs-extension/src/test/xml-validation.test.ts delete mode 100644 packages/b2c-vs-extension/src/xml-validation/index.ts diff --git a/.changeset/vs-extension-xml-validation.md b/.changeset/vs-extension-xml-validation.md new file mode 100644 index 000000000..714319aca --- /dev/null +++ b/.changeset/vs-extension-xml-validation.md @@ -0,0 +1,10 @@ +--- +'b2c-vs-extension': minor +'@salesforce/b2c-dx-docs': patch +--- + +Add XSD-based validation for B2C metadata XML files. The extension now contributes 48 schemas (catalogs, promotions, jobs, services, customer feeds, A/B tests, page-meta-tags, sorting rules, source codes, content libraries, and more) so opening a B2C metadata XML produces inline diagnostics, autocomplete, and hover documentation. + +**File-glob coverage** spans both common workspace conventions: the canonical SFCC site-archive layout (`sites//promotions.xml`, `catalogs//catalog.xml`, …) and exploded-archive workspaces under a `metadata/` folder (`metadata/promotions/*.xml`, `metadata/catalogs/*.xml`, …). + +**New install requirement:** the extension declares `redhat.vscode-xml` as an extension dependency. VS Code installs it automatically the first time this extension activates after the upgrade. Users / teams whose policies block third-party extensions should disable `b2c-dx.features.xmlValidation` (or remove the dependency declaration) before deploying the upgrade. diff --git a/docs/vscode-extension/configuration.md b/docs/vscode-extension/configuration.md index 1e66d7efe..59cc3801f 100644 --- a/docs/vscode-extension/configuration.md +++ b/docs/vscode-extension/configuration.md @@ -96,27 +96,14 @@ The B2C Script Debugger registers regardless of these toggles — it activates o ### XML schema validation -The extension contributes XSD-based validation for common metadata XML files (via the VS Code XML extension). When a file path matches one of these folders, diagnostics are validated against the corresponding B2C schema: - -- `**/metadata/catalogs/*.xml` -- `**/metadata/customer-groups/*.xml` -- `**/metadata/customer-lists/*.xml` -- `**/metadata/custom-objects/*.xml` -- `**/metadata/inventory-lists/*.xml` -- `**/metadata/libraries/*.xml` -- `**/metadata/payment-methods/*.xml` -- `**/metadata/payment-processors/*.xml` -- `**/metadata/preferences/*.xml` -- `**/metadata/pricebooks/*.xml` -- `**/metadata/promotions/*.xml` -- `**/metadata/redirect-urls/*.xml` -- `**/metadata/search/*.xml` -- `**/metadata/shipping/*.xml` -- `**/metadata/sites/*.xml` -- `**/metadata/slots/*.xml` -- `**/metadata/sourcecodes/*.xml` -- `**/metadata/stores/*.xml` -- `**/metadata/url-rules/*.xml` +The extension contributes XSD-based validation for B2C metadata XML files via the [Red Hat XML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml), which is declared as an extension dependency and installed automatically. When a file path matches one of the contributed globs, diagnostics, autocomplete, and hover docs are driven by the corresponding B2C schema. + +Both common workspace conventions are recognized: + +- **Canonical site-archive layout** — `sites//`, `catalogs//`, `libraries//`, `customer_lists//`, `pricebooks/`, `inventory_lists/`, `meta/`. +- **Exploded `metadata/` workspace layout** — `metadata/sites//*.xml`, `metadata/catalogs/*.xml`, `metadata/promotions/*.xml`, etc. + +Schemas covered include catalog, promotion, slot, customer-group, customer-list, custom-object, inventory, library, payment-method, payment-processor, preference, pricebook, redirect-url, search/search2, shipping, site, sourcecode, store, url-rule, jobs, services, schedules, ab-test (and participants), assignment, cache-settings, commerce-feature-state, coupon (and redemption), csrf-allowlist, customer, customer-cdn-settings, dcext, form, geolocation, gift-certificate, locales, meta (system/custom-objecttype-extensions), oauth-providers, page-meta-tags, price-adjustment-limits, product-list, sitemap-configuration, sorting-rules, storefronts, and tax. The full mapping is at `packages/b2c-vs-extension/resources/xsd-mappings.json`. To disable XML validation globally in your workspace, set: @@ -126,6 +113,8 @@ To disable XML validation globally in your workspace, set: } ``` +To opt out of the Red Hat XML dependency entirely, uninstall this extension or pin to a release prior to the one that introduced XML validation. + ### Complete defaults (copy-paste) ```jsonc diff --git a/packages/b2c-vs-extension/.gitignore b/packages/b2c-vs-extension/.gitignore index 337d10fcb..19ab11ca4 100644 --- a/packages/b2c-vs-extension/.gitignore +++ b/packages/b2c-vs-extension/.gitignore @@ -5,3 +5,4 @@ node_modules .vsce-stage/ *.vsix /coverage +resources/xsd/ diff --git a/packages/b2c-vs-extension/package.json b/packages/b2c-vs-extension/package.json index 168987f57..09786e62c 100644 --- a/packages/b2c-vs-extension/package.json +++ b/packages/b2c-vs-extension/package.json @@ -2,7 +2,7 @@ "name": "b2c-vs-extension", "displayName": "B2C DX VSCE", "description": "VS Code extension for B2C Commerce developer experience (Page Designer assistant, B2C CLI integration)", - "version": "0.8.0", + "version": "0.8.2", "publisher": "Salesforce", "license": "Apache-2.0", "repository": "SalesforceCommerceCloud/b2c-developer-tooling", @@ -49,78 +49,550 @@ } ], "xmlValidation": [ + { + "fileMatch": "**/sites/*/ab-tests.xml", + "url": "./resources/xsd/abtest.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/ab-tests.xml", + "url": "./resources/xsd/abtest.xsd" + }, + { + "fileMatch": "**/metadata/ab-tests/*.xml", + "url": "./resources/xsd/abtest.xsd" + }, + { + "fileMatch": "**/sites/*/abtest-participants.xml", + "url": "./resources/xsd/abtestparticipants.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/abtest-participants.xml", + "url": "./resources/xsd/abtestparticipants.xsd" + }, + { + "fileMatch": "**/catalogs/*/assignments.xml", + "url": "./resources/xsd/assignment.xsd" + }, + { + "fileMatch": "**/sites/*/assignments.xml", + "url": "./resources/xsd/assignment.xsd" + }, + { + "fileMatch": "**/metadata/catalogs/*/assignments.xml", + "url": "./resources/xsd/assignment.xsd" + }, + { + "fileMatch": "**/sites/*/cache-settings.xml", + "url": "./resources/xsd/cachesettings.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/cache-settings.xml", + "url": "./resources/xsd/cachesettings.xsd" + }, + { + "fileMatch": "**/metadata/cache-settings/*.xml", + "url": "./resources/xsd/cachesettings.xsd" + }, + { + "fileMatch": "**/catalogs/*/catalog.xml", + "url": "./resources/xsd/catalog.xsd" + }, + { + "fileMatch": "**/metadata/catalogs/*/catalog.xml", + "url": "./resources/xsd/catalog.xsd" + }, { "fileMatch": "**/metadata/catalogs/*.xml", "url": "./resources/xsd/catalog.xsd" }, + { + "fileMatch": "**/commerce-feature-states.xml", + "url": "./resources/xsd/commercefeaturestate.xsd" + }, + { + "fileMatch": "**/sites/*/commerce-feature-states.xml", + "url": "./resources/xsd/commercefeaturestate.xsd" + }, + { + "fileMatch": "**/metadata/**/commerce-feature-states.xml", + "url": "./resources/xsd/commercefeaturestate.xsd" + }, + { + "fileMatch": "**/sites/*/coupons.xml", + "url": "./resources/xsd/coupon.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/coupons.xml", + "url": "./resources/xsd/coupon.xsd" + }, + { + "fileMatch": "**/metadata/coupons/*.xml", + "url": "./resources/xsd/coupon.xsd" + }, + { + "fileMatch": "**/sites/*/coupon-redemptions.xml", + "url": "./resources/xsd/couponredemption.xsd" + }, + { + "fileMatch": "**/metadata/**/coupon-redemptions.xml", + "url": "./resources/xsd/couponredemption.xsd" + }, + { + "fileMatch": "**/sites/*/csrf-whitelists.xml", + "url": "./resources/xsd/csrfwhitelists.xsd" + }, + { + "fileMatch": "**/sites/*/csrf-allowlists.xml", + "url": "./resources/xsd/csrfwhitelists.xsd" + }, + { + "fileMatch": "**/metadata/**/csrf-whitelists.xml", + "url": "./resources/xsd/csrfwhitelists.xsd" + }, + { + "fileMatch": "**/metadata/**/csrf-allowlists.xml", + "url": "./resources/xsd/csrfwhitelists.xsd" + }, + { + "fileMatch": "**/customer_lists/*/customers.xml", + "url": "./resources/xsd/customer.xsd" + }, + { + "fileMatch": "**/customer_lists/*/customers/*.xml", + "url": "./resources/xsd/customer.xsd" + }, + { + "fileMatch": "**/sites/*/customer-cdn-settings.xml", + "url": "./resources/xsd/customercdnsettings.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/customer-cdn-settings.xml", + "url": "./resources/xsd/customercdnsettings.xsd" + }, + { + "fileMatch": "**/metadata/customer-cdn-settings/*.xml", + "url": "./resources/xsd/customercdnsettings.xsd" + }, + { + "fileMatch": "**/sites/*/customer-groups.xml", + "url": "./resources/xsd/customergroup.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/customer-groups.xml", + "url": "./resources/xsd/customergroup.xsd" + }, { "fileMatch": "**/metadata/customer-groups/*.xml", "url": "./resources/xsd/customergroup.xsd" }, + { + "fileMatch": "**/customer_lists.xml", + "url": "./resources/xsd/customerlist.xsd" + }, { "fileMatch": "**/metadata/customer-lists/*.xml", "url": "./resources/xsd/customerlist.xsd" }, + { + "fileMatch": "**/customer_lists/*/customer-list.xml", + "url": "./resources/xsd/customerlist2.xsd" + }, + { + "fileMatch": "**/customer_lists/*.xml", + "url": "./resources/xsd/customerlist2.xsd" + }, + { + "fileMatch": "**/sites/*/custom-objects.xml", + "url": "./resources/xsd/customobject.xsd" + }, + { + "fileMatch": "**/sites/*/custom-objects/*.xml", + "url": "./resources/xsd/customobject.xsd" + }, { "fileMatch": "**/metadata/custom-objects/*.xml", "url": "./resources/xsd/customobject.xsd" }, + { + "fileMatch": "**/sites/*/dcext.xml", + "url": "./resources/xsd/dcext.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/dcext.xml", + "url": "./resources/xsd/dcext.xsd" + }, + { + "fileMatch": "**/metadata/dcext/*.xml", + "url": "./resources/xsd/dcext.xsd" + }, + { + "fileMatch": "**/cartridges/*/cartridge/forms/**/*.xml", + "url": "./resources/xsd/form.xsd" + }, + { + "fileMatch": "**/geolocations.xml", + "url": "./resources/xsd/geolocation.xsd" + }, + { + "fileMatch": "**/sites/*/geolocations.xml", + "url": "./resources/xsd/geolocation.xsd" + }, + { + "fileMatch": "**/metadata/**/geolocations.xml", + "url": "./resources/xsd/geolocation.xsd" + }, + { + "fileMatch": "**/gift_certificates/gift-certificates.xml", + "url": "./resources/xsd/giftcertificate.xsd" + }, + { + "fileMatch": "**/sites/*/gift-certificates.xml", + "url": "./resources/xsd/giftcertificate.xsd" + }, + { + "fileMatch": "**/metadata/**/gift-certificates.xml", + "url": "./resources/xsd/giftcertificate.xsd" + }, + { + "fileMatch": "**/inventory_lists/*.xml", + "url": "./resources/xsd/inventory.xsd" + }, + { + "fileMatch": "**/inventory_lists/*/inventory.xml", + "url": "./resources/xsd/inventory.xsd" + }, { "fileMatch": "**/metadata/inventory-lists/*.xml", "url": "./resources/xsd/inventory.xsd" }, + { + "fileMatch": "**/jobs.xml", + "url": "./resources/xsd/jobs.xsd" + }, + { + "fileMatch": "**/sites/*/jobs.xml", + "url": "./resources/xsd/jobs.xsd" + }, + { + "fileMatch": "**/metadata/**/jobs.xml", + "url": "./resources/xsd/jobs.xsd" + }, + { + "fileMatch": "**/libraries/*/library.xml", + "url": "./resources/xsd/library.xsd" + }, + { + "fileMatch": "**/sites/*/library.xml", + "url": "./resources/xsd/library.xsd" + }, { "fileMatch": "**/metadata/libraries/*.xml", "url": "./resources/xsd/library.xsd" }, + { + "fileMatch": "**/sites/*/locales.xml", + "url": "./resources/xsd/locales.xsd" + }, + { + "fileMatch": "**/locales.xml", + "url": "./resources/xsd/locales.xsd" + }, + { + "fileMatch": "**/metadata/**/locales.xml", + "url": "./resources/xsd/locales.xsd" + }, + { + "fileMatch": "**/meta/system-objecttype-extensions.xml", + "url": "./resources/xsd/metadata.xsd" + }, + { + "fileMatch": "**/meta/custom-objecttype-definitions.xml", + "url": "./resources/xsd/metadata.xsd" + }, + { + "fileMatch": "**/sites/*/meta/*.xml", + "url": "./resources/xsd/metadata.xsd" + }, + { + "fileMatch": "**/metadata/meta/*.xml", + "url": "./resources/xsd/metadata.xsd" + }, + { + "fileMatch": "**/sites/*/oauth-providers.xml", + "url": "./resources/xsd/oauth.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/oauth-providers.xml", + "url": "./resources/xsd/oauth.xsd" + }, + { + "fileMatch": "**/metadata/oauth-providers/*.xml", + "url": "./resources/xsd/oauth.xsd" + }, + { + "fileMatch": "**/sites/*/page-meta-tags.xml", + "url": "./resources/xsd/pagemetatag.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/page-meta-tags.xml", + "url": "./resources/xsd/pagemetatag.xsd" + }, + { + "fileMatch": "**/metadata/page-meta-tags/*.xml", + "url": "./resources/xsd/pagemetatag.xsd" + }, + { + "fileMatch": "**/sites/*/payment-methods.xml", + "url": "./resources/xsd/paymentmethod.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/payment-methods.xml", + "url": "./resources/xsd/paymentmethod.xsd" + }, { "fileMatch": "**/metadata/payment-methods/*.xml", "url": "./resources/xsd/paymentmethod.xsd" }, + { + "fileMatch": "**/sites/*/payment-processors.xml", + "url": "./resources/xsd/paymentprocessor.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/payment-processors.xml", + "url": "./resources/xsd/paymentprocessor.xsd" + }, { "fileMatch": "**/metadata/payment-processors/*.xml", "url": "./resources/xsd/paymentprocessor.xsd" }, + { + "fileMatch": "**/sites/*/preferences.xml", + "url": "./resources/xsd/preferences.xsd" + }, + { + "fileMatch": "**/preferences.xml", + "url": "./resources/xsd/preferences.xsd" + }, { "fileMatch": "**/metadata/preferences/*.xml", "url": "./resources/xsd/preferences.xsd" }, + { + "fileMatch": "**/price_adjustment_limits/price-adjustment-limits.xml", + "url": "./resources/xsd/priceadjustmentlimits.xsd" + }, + { + "fileMatch": "**/sites/*/price-adjustment-limits.xml", + "url": "./resources/xsd/priceadjustmentlimits.xsd" + }, + { + "fileMatch": "**/metadata/**/price-adjustment-limits.xml", + "url": "./resources/xsd/priceadjustmentlimits.xsd" + }, + { + "fileMatch": "**/pricebooks/*.xml", + "url": "./resources/xsd/pricebook.xsd" + }, + { + "fileMatch": "**/pricebooks/*/pricebook.xml", + "url": "./resources/xsd/pricebook.xsd" + }, { "fileMatch": "**/metadata/pricebooks/*.xml", "url": "./resources/xsd/pricebook.xsd" }, + { + "fileMatch": "**/customer_lists/*/product-lists/*.xml", + "url": "./resources/xsd/productlist.xsd" + }, + { + "fileMatch": "**/sites/*/product-lists.xml", + "url": "./resources/xsd/productlist.xsd" + }, + { + "fileMatch": "**/metadata/**/product-lists.xml", + "url": "./resources/xsd/productlist.xsd" + }, + { + "fileMatch": "**/sites/*/promotions.xml", + "url": "./resources/xsd/promotion.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/promotions.xml", + "url": "./resources/xsd/promotion.xsd" + }, { "fileMatch": "**/metadata/promotions/*.xml", "url": "./resources/xsd/promotion.xsd" }, + { + "fileMatch": "**/sites/*/redirect-urls.xml", + "url": "./resources/xsd/redirecturl.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/redirect-urls.xml", + "url": "./resources/xsd/redirecturl.xsd" + }, { "fileMatch": "**/metadata/redirect-urls/*.xml", "url": "./resources/xsd/redirecturl.xsd" }, + { + "fileMatch": "**/sites/*/schedules.xml", + "url": "./resources/xsd/schedules.xsd" + }, + { + "fileMatch": "**/metadata/**/schedules.xml", + "url": "./resources/xsd/schedules.xsd" + }, + { + "fileMatch": "**/sites/*/search.xml", + "url": "./resources/xsd/search.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/search.xml", + "url": "./resources/xsd/search.xsd" + }, { "fileMatch": "**/metadata/search/*.xml", "url": "./resources/xsd/search.xsd" }, + { + "fileMatch": "**/sites/*/search2.xml", + "url": "./resources/xsd/search2.xsd" + }, + { + "fileMatch": "**/metadata/**/search2.xml", + "url": "./resources/xsd/search2.xsd" + }, + { + "fileMatch": "**/sites/*/services.xml", + "url": "./resources/xsd/services.xsd" + }, + { + "fileMatch": "**/services.xml", + "url": "./resources/xsd/services.xsd" + }, + { + "fileMatch": "**/metadata/**/services.xml", + "url": "./resources/xsd/services.xsd" + }, + { + "fileMatch": "**/sites/*/shipping.xml", + "url": "./resources/xsd/shipping.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/shipping.xml", + "url": "./resources/xsd/shipping.xsd" + }, { "fileMatch": "**/metadata/shipping/*.xml", "url": "./resources/xsd/shipping.xsd" }, + { + "fileMatch": "**/sites/*/site.xml", + "url": "./resources/xsd/site.xsd" + }, { "fileMatch": "**/metadata/sites/*.xml", "url": "./resources/xsd/site.xsd" }, + { + "fileMatch": "**/metadata/sites/*/site.xml", + "url": "./resources/xsd/site.xsd" + }, + { + "fileMatch": "**/sites/*/sitemap-configuration.xml", + "url": "./resources/xsd/sitemapconfiguration.xsd" + }, + { + "fileMatch": "**/metadata/**/sitemap-configuration.xml", + "url": "./resources/xsd/sitemapconfiguration.xsd" + }, + { + "fileMatch": "**/sites/*/slots.xml", + "url": "./resources/xsd/slot.xsd" + }, + { + "fileMatch": "**/sites/*/slot-configurations.xml", + "url": "./resources/xsd/slot.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/slots.xml", + "url": "./resources/xsd/slot.xsd" + }, { "fileMatch": "**/metadata/slots/*.xml", "url": "./resources/xsd/slot.xsd" }, + { + "fileMatch": "**/sites/*/sorting-rules.xml", + "url": "./resources/xsd/sort.xsd" + }, + { + "fileMatch": "**/sites/*/sort.xml", + "url": "./resources/xsd/sort.xsd" + }, + { + "fileMatch": "**/metadata/**/sorting-rules.xml", + "url": "./resources/xsd/sort.xsd" + }, + { + "fileMatch": "**/sites/*/source-codes.xml", + "url": "./resources/xsd/sourcecode.xsd" + }, + { + "fileMatch": "**/sites/*/sourcecodes.xml", + "url": "./resources/xsd/sourcecode.xsd" + }, { "fileMatch": "**/metadata/sourcecodes/*.xml", "url": "./resources/xsd/sourcecode.xsd" }, + { + "fileMatch": "**/sites/*/stores.xml", + "url": "./resources/xsd/store.xsd" + }, + { + "fileMatch": "**/stores/stores.xml", + "url": "./resources/xsd/store.xsd" + }, { "fileMatch": "**/metadata/stores/*.xml", "url": "./resources/xsd/store.xsd" }, + { + "fileMatch": "**/sites/*/storefronts.xml", + "url": "./resources/xsd/storefronts.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/storefronts.xml", + "url": "./resources/xsd/storefronts.xsd" + }, + { + "fileMatch": "**/metadata/storefronts/*.xml", + "url": "./resources/xsd/storefronts.xsd" + }, + { + "fileMatch": "**/sites/*/tax.xml", + "url": "./resources/xsd/tax.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/tax.xml", + "url": "./resources/xsd/tax.xsd" + }, + { + "fileMatch": "**/metadata/tax/*.xml", + "url": "./resources/xsd/tax.xsd" + }, + { + "fileMatch": "**/sites/*/url-rules.xml", + "url": "./resources/xsd/urlrules.xsd" + }, + { + "fileMatch": "**/metadata/sites/*/url-rules.xml", + "url": "./resources/xsd/urlrules.xsd" + }, { "fileMatch": "**/metadata/url-rules/*.xml", "url": "./resources/xsd/urlrules.xsd" @@ -1300,7 +1772,7 @@ "sync:xsd": "node scripts/sync-xsd.mjs", "build": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs", "watch": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs --watch", - "vscode:prepublish": "pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && pnpm run sync:xsd && node scripts/esbuild-bundle.mjs", + "vscode:prepublish": "pnpm run sync:xsd && pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && node scripts/esbuild-bundle.mjs", "package": "pnpm run sync:xsd && pnpm exec vsce package --no-dependencies && node scripts/inject-script-types.mjs", "lint": "eslint", "lint:agent": "eslint --quiet", diff --git a/packages/b2c-vs-extension/resources/xsd-mappings.json b/packages/b2c-vs-extension/resources/xsd-mappings.json new file mode 100644 index 000000000..824ea679d --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd-mappings.json @@ -0,0 +1,383 @@ +{ + "$schema": "./xsd-mappings.schema.json", + "description": "Source-of-truth for XML→XSD validation contributed by this extension. The build step (scripts/sync-xsd.mjs) reads this file to (1) copy only the listed schemas from the SDK into resources/xsd/ and (2) regenerate package.json#contributes.xmlValidation. Each entry covers two workspace conventions: the canonical SFCC site-archive layout (sites//, catalogs//, …) and the exploded `metadata/` workspace convention used by sfcc-ci / prophet-style projects.", + "mappings": [ + { + "schema": "abtest.xsd", + "fileMatch": [ + "**/sites/*/ab-tests.xml", + "**/metadata/sites/*/ab-tests.xml", + "**/metadata/ab-tests/*.xml" + ] + }, + { + "schema": "abtestparticipants.xsd", + "fileMatch": [ + "**/sites/*/abtest-participants.xml", + "**/metadata/sites/*/abtest-participants.xml" + ] + }, + { + "schema": "assignment.xsd", + "fileMatch": [ + "**/catalogs/*/assignments.xml", + "**/sites/*/assignments.xml", + "**/metadata/catalogs/*/assignments.xml" + ] + }, + { + "schema": "cachesettings.xsd", + "fileMatch": [ + "**/sites/*/cache-settings.xml", + "**/metadata/sites/*/cache-settings.xml", + "**/metadata/cache-settings/*.xml" + ] + }, + { + "schema": "catalog.xsd", + "fileMatch": [ + "**/catalogs/*/catalog.xml", + "**/metadata/catalogs/*/catalog.xml", + "**/metadata/catalogs/*.xml" + ] + }, + { + "schema": "commercefeaturestate.xsd", + "fileMatch": [ + "**/commerce-feature-states.xml", + "**/sites/*/commerce-feature-states.xml", + "**/metadata/**/commerce-feature-states.xml" + ] + }, + { + "schema": "coupon.xsd", + "fileMatch": [ + "**/sites/*/coupons.xml", + "**/metadata/sites/*/coupons.xml", + "**/metadata/coupons/*.xml" + ] + }, + { + "schema": "couponredemption.xsd", + "fileMatch": [ + "**/sites/*/coupon-redemptions.xml", + "**/metadata/**/coupon-redemptions.xml" + ] + }, + { + "schema": "csrfwhitelists.xsd", + "fileMatch": [ + "**/sites/*/csrf-whitelists.xml", + "**/sites/*/csrf-allowlists.xml", + "**/metadata/**/csrf-whitelists.xml", + "**/metadata/**/csrf-allowlists.xml" + ] + }, + { + "schema": "customer.xsd", + "fileMatch": [ + "**/customer_lists/*/customers.xml", + "**/customer_lists/*/customers/*.xml" + ] + }, + { + "schema": "customercdnsettings.xsd", + "fileMatch": [ + "**/sites/*/customer-cdn-settings.xml", + "**/metadata/sites/*/customer-cdn-settings.xml", + "**/metadata/customer-cdn-settings/*.xml" + ] + }, + { + "schema": "customergroup.xsd", + "fileMatch": [ + "**/sites/*/customer-groups.xml", + "**/metadata/sites/*/customer-groups.xml", + "**/metadata/customer-groups/*.xml" + ] + }, + { + "schema": "customerlist.xsd", + "fileMatch": [ + "**/customer_lists.xml", + "**/metadata/customer-lists/*.xml" + ] + }, + { + "schema": "customerlist2.xsd", + "fileMatch": [ + "**/customer_lists/*/customer-list.xml", + "**/customer_lists/*.xml" + ] + }, + { + "schema": "customobject.xsd", + "fileMatch": [ + "**/sites/*/custom-objects.xml", + "**/sites/*/custom-objects/*.xml", + "**/metadata/custom-objects/*.xml" + ] + }, + { + "schema": "dcext.xsd", + "fileMatch": [ + "**/sites/*/dcext.xml", + "**/metadata/sites/*/dcext.xml", + "**/metadata/dcext/*.xml" + ] + }, + { + "schema": "form.xsd", + "fileMatch": [ + "**/cartridges/*/cartridge/forms/**/*.xml" + ] + }, + { + "schema": "geolocation.xsd", + "fileMatch": [ + "**/geolocations.xml", + "**/sites/*/geolocations.xml", + "**/metadata/**/geolocations.xml" + ] + }, + { + "schema": "giftcertificate.xsd", + "fileMatch": [ + "**/gift_certificates/gift-certificates.xml", + "**/sites/*/gift-certificates.xml", + "**/metadata/**/gift-certificates.xml" + ] + }, + { + "schema": "inventory.xsd", + "fileMatch": [ + "**/inventory_lists/*.xml", + "**/inventory_lists/*/inventory.xml", + "**/metadata/inventory-lists/*.xml" + ] + }, + { + "schema": "jobs.xsd", + "fileMatch": [ + "**/jobs.xml", + "**/sites/*/jobs.xml", + "**/metadata/**/jobs.xml" + ] + }, + { + "schema": "library.xsd", + "fileMatch": [ + "**/libraries/*/library.xml", + "**/sites/*/library.xml", + "**/metadata/libraries/*.xml" + ] + }, + { + "schema": "locales.xsd", + "fileMatch": [ + "**/sites/*/locales.xml", + "**/locales.xml", + "**/metadata/**/locales.xml" + ] + }, + { + "schema": "metadata.xsd", + "fileMatch": [ + "**/meta/system-objecttype-extensions.xml", + "**/meta/custom-objecttype-definitions.xml", + "**/sites/*/meta/*.xml", + "**/metadata/meta/*.xml" + ] + }, + { + "schema": "oauth.xsd", + "fileMatch": [ + "**/sites/*/oauth-providers.xml", + "**/metadata/sites/*/oauth-providers.xml", + "**/metadata/oauth-providers/*.xml" + ] + }, + { + "schema": "pagemetatag.xsd", + "fileMatch": [ + "**/sites/*/page-meta-tags.xml", + "**/metadata/sites/*/page-meta-tags.xml", + "**/metadata/page-meta-tags/*.xml" + ] + }, + { + "schema": "paymentmethod.xsd", + "fileMatch": [ + "**/sites/*/payment-methods.xml", + "**/metadata/sites/*/payment-methods.xml", + "**/metadata/payment-methods/*.xml" + ] + }, + { + "schema": "paymentprocessor.xsd", + "fileMatch": [ + "**/sites/*/payment-processors.xml", + "**/metadata/sites/*/payment-processors.xml", + "**/metadata/payment-processors/*.xml" + ] + }, + { + "schema": "preferences.xsd", + "fileMatch": [ + "**/sites/*/preferences.xml", + "**/preferences.xml", + "**/metadata/preferences/*.xml" + ] + }, + { + "schema": "priceadjustmentlimits.xsd", + "fileMatch": [ + "**/price_adjustment_limits/price-adjustment-limits.xml", + "**/sites/*/price-adjustment-limits.xml", + "**/metadata/**/price-adjustment-limits.xml" + ] + }, + { + "schema": "pricebook.xsd", + "fileMatch": [ + "**/pricebooks/*.xml", + "**/pricebooks/*/pricebook.xml", + "**/metadata/pricebooks/*.xml" + ] + }, + { + "schema": "productlist.xsd", + "fileMatch": [ + "**/customer_lists/*/product-lists/*.xml", + "**/sites/*/product-lists.xml", + "**/metadata/**/product-lists.xml" + ] + }, + { + "schema": "promotion.xsd", + "fileMatch": [ + "**/sites/*/promotions.xml", + "**/metadata/sites/*/promotions.xml", + "**/metadata/promotions/*.xml" + ] + }, + { + "schema": "redirecturl.xsd", + "fileMatch": [ + "**/sites/*/redirect-urls.xml", + "**/metadata/sites/*/redirect-urls.xml", + "**/metadata/redirect-urls/*.xml" + ] + }, + { + "schema": "schedules.xsd", + "fileMatch": [ + "**/sites/*/schedules.xml", + "**/metadata/**/schedules.xml" + ] + }, + { + "schema": "search.xsd", + "fileMatch": [ + "**/sites/*/search.xml", + "**/metadata/sites/*/search.xml", + "**/metadata/search/*.xml" + ] + }, + { + "schema": "search2.xsd", + "fileMatch": [ + "**/sites/*/search2.xml", + "**/metadata/**/search2.xml" + ] + }, + { + "schema": "services.xsd", + "fileMatch": [ + "**/sites/*/services.xml", + "**/services.xml", + "**/metadata/**/services.xml" + ] + }, + { + "schema": "shipping.xsd", + "fileMatch": [ + "**/sites/*/shipping.xml", + "**/metadata/sites/*/shipping.xml", + "**/metadata/shipping/*.xml" + ] + }, + { + "schema": "site.xsd", + "fileMatch": [ + "**/sites/*/site.xml", + "**/metadata/sites/*.xml", + "**/metadata/sites/*/site.xml" + ] + }, + { + "schema": "sitemapconfiguration.xsd", + "fileMatch": [ + "**/sites/*/sitemap-configuration.xml", + "**/metadata/**/sitemap-configuration.xml" + ] + }, + { + "schema": "slot.xsd", + "fileMatch": [ + "**/sites/*/slots.xml", + "**/sites/*/slot-configurations.xml", + "**/metadata/sites/*/slots.xml", + "**/metadata/slots/*.xml" + ] + }, + { + "schema": "sort.xsd", + "fileMatch": [ + "**/sites/*/sorting-rules.xml", + "**/sites/*/sort.xml", + "**/metadata/**/sorting-rules.xml" + ] + }, + { + "schema": "sourcecode.xsd", + "fileMatch": [ + "**/sites/*/source-codes.xml", + "**/sites/*/sourcecodes.xml", + "**/metadata/sourcecodes/*.xml" + ] + }, + { + "schema": "store.xsd", + "fileMatch": [ + "**/sites/*/stores.xml", + "**/stores/stores.xml", + "**/metadata/stores/*.xml" + ] + }, + { + "schema": "storefronts.xsd", + "fileMatch": [ + "**/sites/*/storefronts.xml", + "**/metadata/sites/*/storefronts.xml", + "**/metadata/storefronts/*.xml" + ] + }, + { + "schema": "tax.xsd", + "fileMatch": [ + "**/sites/*/tax.xml", + "**/metadata/sites/*/tax.xml", + "**/metadata/tax/*.xml" + ] + }, + { + "schema": "urlrules.xsd", + "fileMatch": [ + "**/sites/*/url-rules.xml", + "**/metadata/sites/*/url-rules.xml", + "**/metadata/url-rules/*.xml" + ] + } + ] +} diff --git a/packages/b2c-vs-extension/resources/xsd/abtest.xsd b/packages/b2c-vs-extension/resources/xsd/abtest.xsd deleted file mode 100644 index 88355b55b..000000000 --- a/packages/b2c-vs-extension/resources/xsd/abtest.xsd +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - End date may not be more than 90 days after start date. - - - - - - - - - - - - - - - - - - - - Synonym for pipeline call Search-Show?cgid=CATEGORYID - - - - - Synonym for pipeline call Home-Show - - - - - Pipeline name and start-node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lack of 'MatchMode' attribute defaults to legacy 'any' behavior. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Allocations must add up to 100. If not, the imported allocations will be scaled to add up to 100. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd b/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd deleted file mode 100644 index 71b5831ec..000000000 --- a/packages/b2c-vs-extension/resources/xsd/abtestparticipants.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/assignment.xsd b/packages/b2c-vs-extension/resources/xsd/assignment.xsd deleted file mode 100644 index ef42657ec..000000000 --- a/packages/b2c-vs-extension/resources/xsd/assignment.xsd +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This attribute determines if all qualifiers must be satisfied in order - for the assignment to be applicable, or if only one must be satisfied. - If not specified during import, then "any" is assumed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/bmext.xsd b/packages/b2c-vs-extension/resources/xsd/bmext.xsd deleted file mode 100644 index 38bda44f7..000000000 --- a/packages/b2c-vs-extension/resources/xsd/bmext.xsd +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Refers to one of the SLDS 'utility' icons (see https://www.lightningdesignsystem.com/icons/#utility ). In the 'Modern' BM UI, it is preferred over the regular icon. - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! - - - - - Please note: This element is NOT supported for custom menu actions. - - - - - SCAPI paths for BM module permissions. Please note: This element is NOT supported for custom menu actions. - - - - - Please note: This element is NOT supported for custom menu actions. - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! - - - - - - - - - - Deprecated please use elements sub-pipelines to register the pipelines of this menu at permission check. We encourage you to migrate it to version 2.6 or higher! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd b/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd deleted file mode 100644 index e05bd77df..000000000 --- a/packages/b2c-vs-extension/resources/xsd/cachesettings.xsd +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/catalog.xsd b/packages/b2c-vs-extension/resources/xsd/catalog.xsd deleted file mode 100644 index 5221faf86..000000000 --- a/packages/b2c-vs-extension/resources/xsd/catalog.xsd +++ /dev/null @@ -1,1363 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used to control if specified variation values will be added to variation attribute, removed from variation attribute or replace - existing variation attribute value list. - Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not - sensible, because existing variation attribute values will always be removed from the variation attribute before importing the - variation attribute values specified in the import file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Please use element receipt-name which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - Deprecated. Please use element tax-class which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - Deprecated. Please use element force-price-flag which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - Deprecated. Please use element non-inventory-flag which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - Deprecated. Please use element non-revenue-flag which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - Deprecated. Please use element non-discountable-flag which held by element store-attributes (complexType.Product.StoreAttributes). - - - - - - - - Deprecated. Use inventory feature to maintain product availability. - - - - - - - - Deprecated. Please use the element images (complexType.Product.Images). - - - - - Deprecated. Please use the element images (complexType.Product.Images). - - - - - - - - - - - - - - - - - - - Deprecated please use the element product-set-products (complexType.Product.ProductSetProducts). - - - - - - - - - Deprecated please use the elements category-assignment (complexType.CategoryAssignment) and classification-category (complexType.Product.ClassificationCategory). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used to control if specified image groups will be merged to or replace the existing image specification. - The values "merge" and "replace" are the only ones supported for the "merge-mode" attribute. - Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not - sensible, because existing image groups will always be removed before importing the image groups - specified in the import file. - - - - - - - - - - - This element, only relevant for variation masters, represents an ordered list of variation - attribute values. It is used to identify a set of variants to which the images in this group apply. - - - The image groups related to the product master will have zero of these elements. These - represent the "fallback" images. - - If an image group applies for all the red variants, for example, it will have one of these - elements, namely "color=red". - - If an image group applies for all the red, leather variants, for example, it will have two - of these elements, namely "color=red, fabric=leather". - - The list is ordered so that, within a master product, the same variation attribute must always - appear at the same index of the list. In our example, "color" would always be specified first - for each image group, and then "fabric" would always appear second. This ensures there are - clear fallback rules to identify which images relate to each variant. When retrieving the images - for a variant at runtime, the system chooses the most specific matching image groups possible. - - - - - - - - - Deprecated. Please use the variation elements (complexType.Product.ImageGroup.VariationAttributeValue). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use the element product-set-products (complexType.Product.ProductSetProducts). - - - - - - - - - Deprecated please use the element product-set-product (complexType.Product.ProductSetProduct) see complexType.Product.ProductSetProducts. - - - - - - - - - - - - - - - - - - - - - - Deprecated please use the elements category-assignment (complexType.CategoryAssignment) and classification-category (complexType.Product.ClassificationCategory). - - - - - - - - - - Deprecated please use the element category-assignment (complexType.CategoryAssignment). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use the elements variation-attribute (complexType.VariationAttribute) or shared-variation-attribute (complexType.Product.VariationAttribute.Reference). - - - - - - - - - - - - - - - - - - - - - - Used to control if specified variants will be added to master, removed from master or replace existing variant list. - Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not sensible, - because existing variants will always be removed from the master before importing the variants specified in the import file. - - - - - - - - - - - - - Reserved for Beta users. Variation groups will not be created and a warning will be logged if the Variation Groups (Beta) feature is disabled. - - - - - - - Used to control if specified variation groups will be added to master, removed from master or replace existing variation groups list. - Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not sensible, - because existing variation groups will always be removed from the master before importing the variation groups specified in the import file. - - - - - - - - - Reserved for Beta users. Variation groups will not be created and a warning will be logged if the Variation Groups (Beta) feature is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated please use the elements variation-attribute (complexType.VariationAttribute) or shared-variation-attribute (complexType.Product.VariationAttribute.Reference). - - - - - - - - - - - - - Deprecated please use the element variation-attribute-values (complexType.VariationAttribute.Values) see complexType.VariationAttribute. - - - - - - - - - Deprecated please use the element variation-attribute-value (complexType.VariationAttribute.Value) see complexType.VariationAttribute.Values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If TRUE, the attribute marks a default bucket. It is used to represent the unbucketed values, if 'unbucketed-values-mode' is 'show-as-bucket'. Note: The element 'value-list' is not considered, since the unbucketed values are determined dynamically. - If the default bucket is not defined within import file the system creates a new one with an empty 'display-name'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Allowed string values are the 'int' values defined for the Recommendation.recommendationType attribute, and additionally the values 'cross-sell', 'up-sell', and 'other' for backward compatibility. - - - - - - - - - - - - - Used to control the behavior of list elements in import file. - - - - - Add specified objects at the end of the existing list. - - - - - - Update existing specified objects without changing their position in the list. - Add new specified objects at end of existing list. - Remove existing objects not specified in list. - - - - - - Remove specified objects from the existing list. - - - - - Replace existing list with specified objects. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd b/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd deleted file mode 100644 index f9d852d02..000000000 --- a/packages/b2c-vs-extension/resources/xsd/commercefeaturestate.xsd +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/coupon.xsd b/packages/b2c-vs-extension/resources/xsd/coupon.xsd deleted file mode 100644 index 5cbf0d292..000000000 --- a/packages/b2c-vs-extension/resources/xsd/coupon.xsd +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd b/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd deleted file mode 100644 index 34064f553..000000000 --- a/packages/b2c-vs-extension/resources/xsd/couponredemption.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd b/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd deleted file mode 100644 index 26f1b6840..000000000 --- a/packages/b2c-vs-extension/resources/xsd/csrfwhitelists.xsd +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The start-node attribute is optional for a CSRF pipeline. If left blank, it means that all calls - with given pipeline name - regardless of start node are permitted. - - - - - - - - - - - - - - After adding instance specificity to CSRF user agent whitelists, this element is kept as it is for backward compatibility during import. - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customer.xsd b/packages/b2c-vs-extension/resources/xsd/customer.xsd deleted file mode 100644 index 5511498a8..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customer.xsd +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Elements of this type are import-only and will never be exported. - Furthermore, elements of this type will be handled only if included in - a customer import file (customer.xsd) but are ignored if included in a - customer list import (customerlist2.xsd). -

- The reason for this discrepancy is that customer groups are site-specific, - and customer import is always done in the context of a site whereas customer - list import is not. - - - - - - - - - - - - - - This element will never appear in a customer list export file (customerlist2.xsd) - but may be included in a customer export (customer.xsd). This element will also - be ignored if specified in a customer list import but will be processed in - a customer import. -

- The reason for this discrepancy is that customer groups are site-specific, - and customer export is always done in the context of a - site where as customer list export is not. - - - - - - - Value is ignored when imported on a production instance. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This element is for use with Salesforce Payments to track references of customer profiles between systems. - - - - - - - - - - - - - If a customer is managed externally (i.e. provider-id and external-id are specified) - then the password is always optional. Otherwise, a password is required for any of - the following scenarios: - * creation of a new customer - * importing a customer in REPLACE mode - * changing the login of a customer - - - - - - - - - The element 'provider-id' has been deprecated. Use external-profiles to manage provider-id/external-id pairs. - - - - - The element 'external-id' has been deprecated. Use external-profiles to manage provider-id/external-id pairs. - - - - - - - - - - - - - - - - - - - - - - - - - Support for the md5 encryption algorithm has changed. Passwords imported in md5 will be stored as an scrypt'd value. - - - - - - - - - - - Represents an encrypted or plain value and contains information on how to deal with it during import. - - Import: If the attribute 'encrypted' is set to false, the content of this tag will be encrypted - using the new scrypt algorithm. 'encryptionScheme' should be 'null' in this case. - If the attribute 'encrypted' is set to true, it is assumed that the given password was encrypted - with the algorithm in 'encryptionScheme' (md5, scrypt, or the internal implementation s0001). - The password will be imported 'as is'. - - Export: The attribute 'encrypted' will always be set to true. The attribute 'encryptionScheme' - will reflect the encryption scheme of the password in the database (md5 (deprecated), scrypt, or the internal implementation s0001). - The encrypted password will not be transformed during export. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Represents the assignment of a customer to a customer group. - - When a <group-assignment> element is imported, the customer with the specified - customer-no is assigned to the customer group with the specified group-id. If an assignment - already exists, no change is made. - - When an element is imported with attribute mode="delete", the assignment of the customer - with the specified customer-no to the customer group with the specified group-id is removed. - If the customer is not assigned to the group, no change is made. - - When mode="delete", either the customer-no or group-id attribute can be omitted to remove - multiple assignments of customers to customer groups. If only customer-no is present, any - existing assignments of the specified customer to groups are removed. If only group-id is - present, any existing assignments of customers to the specified group are removed. - - Assignments can only be created or removed for static customer groups. A warning message - is logged if a specified customer group is dynamic. - - - - - - - - - - - - - - - - - - - - - The ID of the payment account used to create the customer payment profile. - - - - - - - The type of the payment account used to create the customer payment profile. - - - - - - - The ID of the customer payment profile in the payment account. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Allowed string values are the 'int' values defined for the Customer.gender attribute, and additionally the values 'male' and 'female' for backward compatibility. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The allowed character set for the login element is - limited to [A-Z a-z 0-9 .@_-]. - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd b/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd deleted file mode 100644 index cbeffd3b0..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customeractivedata.xsd +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd b/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd deleted file mode 100644 index 4ae2ddd77..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customercdnsettings.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/customergroup.xsd b/packages/b2c-vs-extension/resources/xsd/customergroup.xsd deleted file mode 100644 index 11b25c89f..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customergroup.xsd +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Represents the assignment of a customer to a customer group. - - When a <group-assignment> element is imported, the customer with the specified - customer-no is assigned to the customer group with the specified group-id. If an assignment - already exists, no change is made. - - When an element is imported with attribute mode="delete", the assignment of the customer - with the specified customer-no to the customer group with the specified group-id is removed. - If the customer is not assigned to the group, no change is made. - - When mode="delete", either the customer-no or group-id attribute can be omitted to remove - multiple assignments of customers to customer groups. If only customer-no is present, any - existing assignments of the specified customer to groups are removed. If only group-id is - present, any existing assignments of customers to the specified group are removed. - - Assignments can only be created or removed for static customer groups. A warning message - is logged if a specified customer group is dynamic. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customerlist.xsd b/packages/b2c-vs-extension/resources/xsd/customerlist.xsd deleted file mode 100644 index 353ce8bf1..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customerlist.xsd +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd b/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd deleted file mode 100644 index d079b6102..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customerlist2.xsd +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd b/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd deleted file mode 100644 index 0088398ab..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customerpaymentinstrument.xsd +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A positive value identifies a known encryption serial number, a value of -1 indicates no encryption - - - - - - - - - - - - - - - - - - - - - - - - - - - - The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. - - - - - - Creditcard tokenization - card-token is used to store the token provided by a creditcard tokenization service. When used, a masked creditcard number can be stored in the card-number and the ek-id is set to -1 to indicate the card-number is permenantly masked - - - - - - Some card types maintain a start date in addition to an expiration date (Amex, Solo, Switch, etc). Other card types may ignore these elements. - - - - - - - - Issue number is a concept supported by Solo/Switch cards in the UK, and is either a 1 or 2 digit number. - - - - - These are the custom attributes of the CustomerPaymentInstrument system object. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/customobject.xsd b/packages/b2c-vs-extension/resources/xsd/customobject.xsd deleted file mode 100644 index 674431e47..000000000 --- a/packages/b2c-vs-extension/resources/xsd/customobject.xsd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/dcext.xsd b/packages/b2c-vs-extension/resources/xsd/dcext.xsd deleted file mode 100644 index 5c15085f9..000000000 --- a/packages/b2c-vs-extension/resources/xsd/dcext.xsd +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The element 'catalog-id' is deprecated and will be removed in a future release. Use catalog-id in catalog-configuration to set the Facebook identifier of a product feed. - - - - - If the element, 'conversions-api-enabled-flag', is set to TRUE, then 'pixel-id' cannot be manually changed here as it is tied to the provided 'conversions-api-pixel-access-token'. - - - - - The element 'product-feed-id' is deprecated and will be removed in a future release. Use product-feed-id in catalog-configuration to set the Facebook identifier of a product feed. - - - - - The element 'country-code' is deprecated and will be removed in a future release. Use country-code in catalog-configuration to set the Facebook identifier of a product feed. - - - - - The element, 'access-token', is encrypted by the system and cannot be manually set here. - - - - - - If the element 'conversions-api-enabled-flag' is set to true, then the value of 'conversions-api-pixel-access-token' must also be set. - - - - - The element, 'conversions-api-pixel-access-token', is encrypted by the system and cannot be manually set here. - - - - - - The element 'redirect-action' is deprecated and will be removed in a future release. Use redirect-action in catalog-configuration to set the default redirect action for products in a Facebook product feed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The element 'environment' is deprecated and will be removed in a future release. Use test-environment-flag to enable/disable Android Pay test environment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/feed.xsd b/packages/b2c-vs-extension/resources/xsd/feed.xsd deleted file mode 100644 index 97ca7f4c4..000000000 --- a/packages/b2c-vs-extension/resources/xsd/feed.xsd +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/form.xsd b/packages/b2c-vs-extension/resources/xsd/form.xsd deleted file mode 100644 index b6234503e..000000000 --- a/packages/b2c-vs-extension/resources/xsd/form.xsd +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/geolocation.xsd b/packages/b2c-vs-extension/resources/xsd/geolocation.xsd deleted file mode 100644 index 9e011ef18..000000000 --- a/packages/b2c-vs-extension/resources/xsd/geolocation.xsd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd b/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd deleted file mode 100644 index 625ec652e..000000000 --- a/packages/b2c-vs-extension/resources/xsd/giftcertificate.xsd +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - The original date and time the Gift Certificate was created. - - - - - The name of the person receiving the Gift Certificate. - - - - - The email address of the person receiving the Gift Certificate. - - - - - The name of the person sending the Gift Certificate. - - - - - The message to include with the Gift Certificate. - - - - - A description that can be used to qualify the Gift Certificate. - - - - - The Order number of the Order where the Gift Certificate was purchased. - - - - - The enabled state of the Gift Certificate. - - - - - The current usage status of the Gift Certificate. - - - - - The currency code of the Gift Certificate. - - - - - The original amount of the Gift Certificate. - - - - - Gift Certificate redemptions. - - - - - - - - - - - - - - - - - - - The date of the Gift Certificate transaction. - - - - - The amount of the Gift Certificate transaction. - - - - - The Order number of the Gift Certificate transaction. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/inventory.xsd b/packages/b2c-vs-extension/resources/xsd/inventory.xsd deleted file mode 100644 index f65a4cbca..000000000 --- a/packages/b2c-vs-extension/resources/xsd/inventory.xsd +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated in favor of new "in-stock-datetime" element. - - - - - - - - This element is calculated as the allocation + preorderBackorderAllocation - turnover - on-order. - For this reason it is read only and cannot be imported. - - - - - - - On Order value is increased when an order is created. - It will be decreased and with that turnover will be increased when the order is exported. - For this reason it is read only and cannot be imported. - - - - - - - This element is calculated as the sum of all inventory transactions (decrements and increments) - that have been recorded subsequent to the allocation was reset date. - The quantity value can be negative due to higher quantity of inventory decrements than increments. - For this reason it is read only and cannot be imported. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/jobs.xsd b/packages/b2c-vs-extension/resources/xsd/jobs.xsd deleted file mode 100644 index e682322a0..000000000 --- a/packages/b2c-vs-extension/resources/xsd/jobs.xsd +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Reserved for Beta users. Priority will not be imported and a warning will be logged if the Schedule Prioritization feature is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/library.xsd b/packages/b2c-vs-extension/resources/xsd/library.xsd deleted file mode 100644 index ea8ec7d9e..000000000 --- a/packages/b2c-vs-extension/resources/xsd/library.xsd +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The type must either be a page ("page.*") or a component ("component.*"). Those types are defined - as part of the storefront cartridges, that should be assigned to the same sites to which the - given library is assigned to such that definition and data match. - - - - - - - The config can only be set for pages (see contentassetpageconfig.json) and - components (contentassetcomponentconfig.json). - - - - - - - The visibility-mode can only be set for pages. - - - - - - - The data can only be set for components (see contentassetcomponentdata.json). - - - - - - - The search-words are used for creating a search index on the content. - - - - - - - The aspect-type is only viable for Page Designer pages. - - - - - - - - - The searchable-flag cannot be set for components. - - - - - - - - - - Components cannot be assigned to folders. - - - - - - - The content-links can only be set for pages and components. Each can have multiple outgoing - links. Incoming links are only allowed for components (at most one per component). - - - - - - - The content-object-assignments can only be set for pages. Each page can be assigned to multiple - objects and each object can be assigned to multiple pages. - - - - - - - The content-variant-assignments can only be set for default content. Each default content can have - multiple variant content assigned in a specific order. - - - - - - - The sitemap-included-flag cannot be set for components. - - - - - - - The sitemap-changefrequency cannot be set for components. - - - - - - - The sitemap-priority cannot be set for components. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These links are only allowed between content elements of type page or component. - - - - - - - - - - - Each component can only have a single incoming content link (and pages cannot have incoming links). - - - - - - - - - - - - - - These links are only allowed between content elements of type page and other persistent objects. At the moment - only categories are supported. - - - - - - - - - - - Each object can be assigned to multiple pages (but only to one page per aspect type) and vice versa. - - - - - - - - - - - - These assignments represent variant content linked to a default content. Each default content can have - multiple variant content in a specific order. - - - - - - - - - - - Represents a variant content assignment with position for ordering. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/locales.xsd b/packages/b2c-vs-extension/resources/xsd/locales.xsd deleted file mode 100644 index 119e35878..000000000 --- a/packages/b2c-vs-extension/resources/xsd/locales.xsd +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/metadata.xsd b/packages/b2c-vs-extension/resources/xsd/metadata.xsd deleted file mode 100644 index c2de4a9bd..000000000 --- a/packages/b2c-vs-extension/resources/xsd/metadata.xsd +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element attribute 'mandatory' is immutable and will be ignored during import and export. - - - - - - - Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import - and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searachable attributes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import - and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searchable attributes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element 'searchable-flag' is not longer supported and will be ignored during import - and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd to define searchable attributes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/oauth.xsd b/packages/b2c-vs-extension/resources/xsd/oauth.xsd deleted file mode 100644 index a2a131143..000000000 --- a/packages/b2c-vs-extension/resources/xsd/oauth.xsd +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/order.xsd b/packages/b2c-vs-extension/resources/xsd/order.xsd deleted file mode 100644 index a26069f5c..000000000 --- a/packages/b2c-vs-extension/resources/xsd/order.xsd +++ /dev/null @@ -1,1255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - The export version which was used for the export. Since 18.5. Using version 19.2 - leads to a check during order import that guest element exist on customer node. - Specifying the guest flag brings additional safety because it reduces the - likelihood that orders are attached to another customer. Since version 20.6 the fields - product-name (4000), suite (256) and price-book-id (256) support longer string values - due to their implementation. Since version 20.8 the fields inventory-list-id and - custom-attributes of ProductShippingLineItem are exported. Since version 21.9 the - fields account-id and account-type are exported. Since version 22.9 details to a - Salesforce Payments payment are no longer exported in a custom method element. - - - - - - - - - - - - - - - - - - - Required except in delete mode. - - - - - - - Required except in delete mode. - - - - - - - Since version 15.4. - The taxation policy of the site at the time the order was placed. - - - - - - - - - - Information about the customer that placed the order. - - - - - - Order status information. - - - - - - - - - - - - - - Product line items of the order. - - - - - - - Shipments of the order. - - - - - - Since version 23.4 - True if this order was calculated with grouped taxation. - Not exported unless true. - - - - - - Order totals. - - - - - Payments used for the order. - - - - - - - - - - For internal use only. Element will not be contained in order.xml. - - - - - - Since version 19.5. - Value is ignored when imported on a production instance. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Assigns the product line item to a particular shipment of this order. The shipment referenced by the id must be defined in this order, otherwise the product line item is not valid. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Since version 15.6. - True if this price adjustment was applied manually to the order via a CSR application (e.g. as an appeasement). - Not exported unless true. - - - - - - - Since version 15.6. - Object representing the logical discount that was applied to the order. - This element is only exported for custom PriceAdjustments created using one of the the createPriceAdjustment(String, Discount) API methods. - - - - - - - Since version 15.6. - The ID of the user who manually applied this PriceAdjustment to the order. - This element is only only exported if the PriceAdjustment is manual. - - - - - - - Since version 15.6. - The date this PriceAdjustment was manually applied to the order. - This element is only only exported if the PriceAdjustment is manual. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Demandware order object. - - - - - - - - Was the order placed by a guest. Required with version 19.2 - - - - - - - Customer email address. - - - - - The customer billing address used with the order. - - - - - - - - - - The order processing status. Possible values are: CREATED NEW OPEN COMPLETED CANCELLED REPLACED FAILED - - - - - The overall order shipping status. Possible values are: NOT_SHIPPED PART_SHIPPED SHIPPED - - - - - The order confirmation status. Possible values are: NOT_CONFIRMED CONFIRMED - - - - - - The order payment status. Possible values are: NOT_PAID PART_PAID PAID - - - - - - The order export status. Possible values are: NOT_EXPORTED EXPORTED READY FAILED - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ID of the shipping method selected for the group. - - - - - - - - - - - - - - - - - The shipping status of the shipment. Possible values are: NOT_SHIPPED SHIPPED - - - - - - - - - - - - - - - - - - - Item-id must be unique per shipment. If not specified the default shipping of the shipment is used. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Order-level merchandise price-adjustments are included within these totals. - - - - - - Order-level shipping price-adjustments are included within these totals. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Since version 21.9. - The ID of the payment account used to create the payment transaction. - - - - - - - Since version 21.9. - The type of the payment account used to create the payment transaction. - - - - - - These are the custom attributes of the PaymentTransaction system object. - - - - - - For internal use. A positive value identifies a known encryption serial number, a value of -1 indicates no encryption - - - - - - - - - - - - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. - - - - - - - Creditcard tokenization: field used to store token provided by creditcard tokenizer. The card-number is used for the permanantly masked creditcard number - - - - - Some card types maintain a start date in addition to an expiration date (Amex, Solo, Switch, etc). Other card types may ignore these elements. - - - - - - - - Issue number is a concept supported by Solo/Switch cards in the UK, and is either a 1 or 2 digit number. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. - - - - - The actual PAN of the card used for the Apple Pay transaction. The value will be in a format like XXXX-XXXX-XXXX-1234 with no more than 4 of the last digits unmasked. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - The type of the card. Some recognized card types are exported in different formats than they are stored internally: Visa, Master, Amex, Discover are exported in all capital letters: VISA, MASTER, AMEX, DISCOVER. All other card types are exported precisely as they are stored. - - - - - The actual PAN of the card used for the Android Pay transaction. The value will be in a format like XXXX-XXXX-XXXX-1234 with no more than 4 of the last digits unmasked. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - - - - - - - - - - - - - - - Since version 22.9. - Payment instrument details for a payment made using Salesforce Payments. - - - - - - - - - - - - - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type bancontact. - - - - - - The last 4 digits of the account number. - - - - - The name of the bank used for the payment. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type card. - - - - - - The card brand, such as (but not limited to) amex, unionpay, or visa. - - - - - The last 4 digits of the card number. - - - - - The type of wallet used to present the card, such as (but not limited to) apple-pay or google-pay. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type ideal. - - - - - - The bank used for the payment, such as (but not limited to) abn_amro or ing. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type sepa_debit. - - - - - - The last 4 digits of the account number. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type paypal. - - - - - - The payer email address of the PayPal order. - - - - - ID of the capture to the PayPal order. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type klarna. - - - - - - The category of Klarna payment, such as (but not limited to) pay_later or pay_in_installments. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type eps. - - - - - - The bank used for the payment, such as (but not limited to) dolomitenbank or easybank_ag. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type venmo. - - - - - - The payer email address of the PayPal order used to make the Venmo payment. - - - - - ID of the capture to the PayPal order used to make the Venmo payment. - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - Since version 22.9. - Details to a Salesforce Payments payment of type afterpay_clearpay. - - - - - - These are the custom attributes of the OrderPaymentInstrument system object. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Import mode delete can only be used on - non-production systems. One possible use case is to enable automated - testing by deleting the orders before or after each test run. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd b/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd deleted file mode 100644 index c1ccde9df..000000000 --- a/packages/b2c-vs-extension/resources/xsd/pagemetatag.xsd +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd b/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd deleted file mode 100644 index 56cfb0e58..000000000 --- a/packages/b2c-vs-extension/resources/xsd/paymentmethod.xsd +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd b/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd deleted file mode 100644 index c0f0d4642..000000000 --- a/packages/b2c-vs-extension/resources/xsd/paymentprocessor.xsd +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/preferences.xsd b/packages/b2c-vs-extension/resources/xsd/preferences.xsd deleted file mode 100644 index 9da472591..000000000 --- a/packages/b2c-vs-extension/resources/xsd/preferences.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd b/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd deleted file mode 100644 index d22dfb222..000000000 --- a/packages/b2c-vs-extension/resources/xsd/priceadjustmentlimits.xsd +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/pricebook.xsd b/packages/b2c-vs-extension/resources/xsd/pricebook.xsd deleted file mode 100644 index 4743a5d54..000000000 --- a/packages/b2c-vs-extension/resources/xsd/pricebook.xsd +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If this flag is set to true the pricebook is imported as feed based otherwise it is imported as web based - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/productlist.xsd b/packages/b2c-vs-extension/resources/xsd/productlist.xsd deleted file mode 100644 index c49e8f6e9..000000000 --- a/packages/b2c-vs-extension/resources/xsd/productlist.xsd +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/promotion.xsd b/packages/b2c-vs-extension/resources/xsd/promotion.xsd deleted file mode 100644 index 688601e2c..000000000 --- a/packages/b2c-vs-extension/resources/xsd/promotion.xsd +++ /dev/null @@ -1,1019 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - campaign-scope is part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. - - - - - - - - - - - - store-groups are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. - - - - - - - stores are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. - - - - - - - - - - - - - - - - - - - - - - - - Lack of 'MatchMode' attribute defaults to legacy 'any' behavior. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated in favor of "qualifiers" element of PromotionCampaignAssignment. - - - - - - - Deprecated in favor of "rank" element of PromotionCampaignAssignment. - - - - - - - - - - - - - - Deprecated in favor of "schedule" element of PromotionCampaignAssignment. - - - - - - - Deprecated in favor of "coupons" element of PromotionCampaignAssignment. - - - - - - - Deprecated in favor of "source-codes" element of PromotionCampaignAssignment. - - - - - - - - - - - - - - - - - - - Deprecated since promotions may now be assigned to multiple campaigns. - Use promotion-campaign-assignment instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This element is present only for product promotions of type "Buy X and Y / Get Z" - - - - - - - This element is present only for product promotions of types "With combination of products" and "Buy X and Y / Get Z" - - - - - - - - - - - - If set to true, the promotion requires that the qualifying products and discounted products - are all identical. The promotion may apply up to the application limit for each - separate product in the order. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Use excluded-products instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Method-id must be either the ID of a payment method in the system or a credit card type - prepended with the prefix "CREDIT_CARD" (e.g. CREDIT_CARD.Visa). - - - - - - - - - - - - - - - - - - - - Flag that controls behavior for shipping promotions with qualifying products. - If this flag is true, the promotion does not apply if the shipment contains any nonqualifying products, - even if the purchase conditions are otherwise satisfied. This is the default behavior if this element - is omitted from the import file. - If this flag is false, the promotion allows nonqualifying products in the shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. If used during import, it is assumed bonus product has price == 0.00. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This attribute determines if all qualifiers must be satisfied in order - for the promotion to be applicable, or if only one must be satisfied. - If not specified during import, then "any" is assumed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd b/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd deleted file mode 100644 index 729655a13..000000000 --- a/packages/b2c-vs-extension/resources/xsd/redirecturl.xsd +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd b/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd deleted file mode 100644 index 970db22b3..000000000 --- a/packages/b2c-vs-extension/resources/xsd/returnimportfeed.xsd +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/schedules.xsd b/packages/b2c-vs-extension/resources/xsd/schedules.xsd deleted file mode 100644 index 43381112b..000000000 --- a/packages/b2c-vs-extension/resources/xsd/schedules.xsd +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Reserved for Beta users. Priority will not be imported and a warning will be logged if the Schedule Prioritization feature is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Please use the element day-of-week (complexType.DayOfWeek.weekday). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/search.xsd b/packages/b2c-vs-extension/resources/xsd/search.xsd deleted file mode 100644 index 63df085fe..000000000 --- a/packages/b2c-vs-extension/resources/xsd/search.xsd +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - Deprecated. search.xsd is deprecated and has been replaced by search2.xsd, which supports all elements except 'indexes'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element 'text-relevance-attributes' is not longer supported and will be ignored during import - and export. Please use the element 'searchable-attributes' (SearchableAttributes) of search2.xsd. - - - - - - - Deprecated. The element 'sorting-attributes' is deprecated but still supported. - Please use the feature sorting rules with sort.xsd. - - - - - - - - - - - - - - Deprecated. The element 'stemmer' is deprecated and will be ignored. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element 'text-relevance-attribute' is not longer supported and will be ignored during import - and export. Please use the element 'searchable-attribute' (SearchableAttributes) of search2.xsd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The element 'sorting-attribute' is deprecated but still supported. - Please use the feature sorting rules with sort.xsd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Spelling index is no longer supported by the platform. - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/search2.xsd b/packages/b2c-vs-extension/resources/xsd/search2.xsd deleted file mode 100644 index e184d0f91..000000000 --- a/packages/b2c-vs-extension/resources/xsd/search2.xsd +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/services.xsd b/packages/b2c-vs-extension/resources/xsd/services.xsd deleted file mode 100644 index d1daa272e..000000000 --- a/packages/b2c-vs-extension/resources/xsd/services.xsd +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. The 'RSA' value is unsupported for 'encryption-type'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/shipping.xsd b/packages/b2c-vs-extension/resources/xsd/shipping.xsd deleted file mode 100644 index a18648009..000000000 --- a/packages/b2c-vs-extension/resources/xsd/shipping.xsd +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - ID of the external shipping method selected. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd b/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd deleted file mode 100644 index c30278917..000000000 --- a/packages/b2c-vs-extension/resources/xsd/shippingorderupdatefeed.xsd +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/site.xsd b/packages/b2c-vs-extension/resources/xsd/site.xsd deleted file mode 100644 index 446cc6d11..000000000 --- a/packages/b2c-vs-extension/resources/xsd/site.xsd +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd b/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd deleted file mode 100644 index 1d5ebbe04..000000000 --- a/packages/b2c-vs-extension/resources/xsd/sitemapconfiguration.xsd +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Please use element custom-sitemap (complexType.CustomSitemap). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated. Please use complex type complexType.CustomSitemap. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/b2c-vs-extension/resources/xsd/slot.xsd b/packages/b2c-vs-extension/resources/xsd/slot.xsd deleted file mode 100644 index ecd16a25b..000000000 --- a/packages/b2c-vs-extension/resources/xsd/slot.xsd +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Determines if the slot-configuration is implicitly assigned to the site or not. - If not specified, defaults to true. - The elements rank, schedule, and customer-groups can only be set on slot-configurations assigned to the site. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Reserved for Dynamic Recommendations Beta users. Will not be created and a warning will be logged if the Enable Dynamic Recommendations Beta feature is not enabled by Ops. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Slot configuration import in MERGE mode only updates content for locales - specified in the import file instead of replacing all previous ones. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/sort.xsd b/packages/b2c-vs-extension/resources/xsd/sort.xsd deleted file mode 100644 index 6a55dbd37..000000000 --- a/packages/b2c-vs-extension/resources/xsd/sort.xsd +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd b/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd deleted file mode 100644 index 6f0c1aeb7..000000000 --- a/packages/b2c-vs-extension/resources/xsd/sourcecode.xsd +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The element 'campaigns' has been deprecated. Use promotion import to assign source code groups to campaigns. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/store.xsd b/packages/b2c-vs-extension/resources/xsd/store.xsd deleted file mode 100644 index 232b5e439..000000000 --- a/packages/b2c-vs-extension/resources/xsd/store.xsd +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - store-group are part of "DemandwareStore" beta feature. This element will be ignored on import if the feature is not enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated and will be removed in a future release. - Please use pos-enabled-flag instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/storefronts.xsd b/packages/b2c-vs-extension/resources/xsd/storefronts.xsd deleted file mode 100644 index 5ca54155e..000000000 --- a/packages/b2c-vs-extension/resources/xsd/storefronts.xsd +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/tax.xsd b/packages/b2c-vs-extension/resources/xsd/tax.xsd deleted file mode 100644 index 1d6856be7..000000000 --- a/packages/b2c-vs-extension/resources/xsd/tax.xsd +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/urlrules.xsd b/packages/b2c-vs-extension/resources/xsd/urlrules.xsd deleted file mode 100644 index 9ccf703a1..000000000 --- a/packages/b2c-vs-extension/resources/xsd/urlrules.xsd +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - URLSearchRefinements support only one URLSearchRefinement with constant 'true'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/b2c-vs-extension/resources/xsd/xml.xsd b/packages/b2c-vs-extension/resources/xsd/xml.xsd deleted file mode 100644 index 60756d193..000000000 --- a/packages/b2c-vs-extension/resources/xsd/xml.xsd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - See http://www.w3.org/XML/1998/namespace.html and http://www.w3.org/TR/REC-xml for information about this namespace. - - - - - This schema defines attributes and an attribute group suitable for use by schemas wishing to allow xml:base, xml:lang or xml:space attributes on elements they define. - - To enable this, such a schema must import this schema for the XML namespace, e.g. as follows: <schema . . .> . . . <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> - - Subsequently, qualified reference to any of the attributes or the group defined below will have the desired effect, e.g. - - <type . . .> . . . <attributeGroup ref="xml:specialAttrs"/> - - will define a type which will schema-validate an instance element with any of those attributes - - - - - In keeping with the XML Schema WG's standard versioning policy, this schema document will persist at http://www.w3.org/2001/03/xml.xsd. At the date of issue it can also be found at http://www.w3.org/2001/xml.xsd. The schema document at that URI may however change in the future, in order to remain compatible with the latest version of XML Schema itself. In other words, if the XML Schema namespace changes, the version of this document at http://www.w3.org/2001/xml.xsd will change accordingly; the version at http://www.w3.org/2001/03/xml.xsd will not change. - - - - - In due course, we should install the relevant ISO 2- and 3-letter codes as the enumerated possible values . . . - - - - - - - - - - - - - - - See http://www.w3.org/TR/xmlbase/ for information about this attribute. - - - - - - - - - - diff --git a/packages/b2c-vs-extension/scripts/sync-xsd.mjs b/packages/b2c-vs-extension/scripts/sync-xsd.mjs index 207566610..562309539 100644 --- a/packages/b2c-vs-extension/scripts/sync-xsd.mjs +++ b/packages/b2c-vs-extension/scripts/sync-xsd.mjs @@ -4,6 +4,19 @@ * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 */ +/* + * Single source of truth: resources/xsd-mappings.json + * + * This script: + * 1. Reads the mappings file. + * 2. Copies the listed XSDs from the SDK (`b2c-tooling-sdk/data/xsd/`) into + * `resources/xsd/`. Any unrelated *.xsd previously written under that dir + * is removed so the bundle never carries unused schemas. + * 3. Regenerates the `contributes.xmlValidation` block in package.json from + * the same mappings — keeping the VS Code contribution and the bundled + * schemas in lockstep. CI may invoke with `--check` to fail on drift. + */ + import fs from 'node:fs'; import path from 'node:path'; import {fileURLToPath} from 'node:url'; @@ -13,85 +26,137 @@ const __dirname = path.dirname(__filename); const pkgRoot = path.resolve(__dirname, '..'); const sdkXsdDir = path.resolve(pkgRoot, '..', 'b2c-tooling-sdk', 'data', 'xsd'); const extensionXsdDir = path.join(pkgRoot, 'resources', 'xsd'); -const xmlValidationConfigPath = path.join(pkgRoot, 'src', 'xml-validation', 'index.ts'); +const mappingsPath = path.join(pkgRoot, 'resources', 'xsd-mappings.json'); +const packageJsonPath = path.join(pkgRoot, 'package.json'); + +const checkMode = process.argv.includes('--check'); function fail(message) { console.error(`[xsd-sync] ${message}`); process.exit(1); } +function readMappings() { + if (!fs.existsSync(mappingsPath)) { + fail(`Mappings file not found: ${mappingsPath}`); + } + const parsed = JSON.parse(fs.readFileSync(mappingsPath, 'utf8')); + const entries = parsed?.mappings; + if (!Array.isArray(entries) || entries.length === 0) { + fail('xsd-mappings.json must contain a non-empty "mappings" array'); + } + for (const entry of entries) { + if (typeof entry?.schema !== 'string' || !entry.schema.endsWith('.xsd')) { + fail(`Invalid mapping entry — "schema" must end in .xsd: ${JSON.stringify(entry)}`); + } + if (!Array.isArray(entry.fileMatch) || entry.fileMatch.length === 0) { + fail(`Mapping for ${entry.schema} must have a non-empty fileMatch[]`); + } + } + return entries; +} + function listXsdFiles(directory) { + if (!fs.existsSync(directory)) return []; return fs .readdirSync(directory) .filter((name) => name.endsWith('.xsd')) .sort((left, right) => left.localeCompare(right)); } -function readMappedSchemas() { - if (!fs.existsSync(xmlValidationConfigPath)) { - fail(`XML validation mapping file not found: ${xmlValidationConfigPath}`); - } - - const source = fs.readFileSync(xmlValidationConfigPath, 'utf8'); - const matches = [...source.matchAll(/schemaFile:\s*'([^']+)'/g)].map((match) => match[1]); - - if (matches.length === 0) { - fail('No schemaFile mappings found in src/xml-validation/index.ts'); - } - - return [...new Set(matches)].sort((left, right) => left.localeCompare(right)); -} - function filesEqual(leftPath, rightPath) { if (!fs.existsSync(leftPath) || !fs.existsSync(rightPath)) return false; - const left = fs.readFileSync(leftPath); - const right = fs.readFileSync(rightPath); - return left.equals(right); + return fs.readFileSync(leftPath).equals(fs.readFileSync(rightPath)); } -if (!fs.existsSync(sdkXsdDir)) { - fail(`SDK XSD source directory not found: ${sdkXsdDir}`); -} +function syncSchemas(mappings) { + if (!fs.existsSync(sdkXsdDir)) { + fail(`SDK XSD source directory not found: ${sdkXsdDir}`); + } + fs.mkdirSync(extensionXsdDir, {recursive: true}); -fs.mkdirSync(extensionXsdDir, {recursive: true}); + const sourceFiles = new Set(listXsdFiles(sdkXsdDir)); + const requested = new Set(mappings.map((m) => m.schema)); -const sourceFiles = listXsdFiles(sdkXsdDir); -if (sourceFiles.length === 0) { - fail(`No .xsd files found in source directory: ${sdkXsdDir}`); -} + for (const schema of requested) { + if (!sourceFiles.has(schema)) { + fail(`Mapped schema "${schema}" is missing from SDK source directory ${sdkXsdDir}`); + } + } -const mappedSchemas = readMappedSchemas(); -const sourceFileSet = new Set(sourceFiles); -for (const mappedSchema of mappedSchemas) { - if (!sourceFileSet.has(mappedSchema)) { - fail(`Mapped schema "${mappedSchema}" is missing from SDK source directory`); + let removedCount = 0; + for (const file of listXsdFiles(extensionXsdDir)) { + if (!requested.has(file)) { + fs.rmSync(path.join(extensionXsdDir, file), {force: true}); + removedCount += 1; + } } -} -const destinationFiles = listXsdFiles(extensionXsdDir); -let removedCount = 0; -for (const destinationFile of destinationFiles) { - if (!sourceFileSet.has(destinationFile)) { - fs.rmSync(path.join(extensionXsdDir, destinationFile), {force: true}); - removedCount += 1; + let copiedCount = 0; + let unchangedCount = 0; + for (const schema of requested) { + const src = path.join(sdkXsdDir, schema); + const dest = path.join(extensionXsdDir, schema); + if (filesEqual(src, dest)) { + unchangedCount += 1; + continue; + } + if (checkMode) { + fail(`Drift: ${schema} in resources/xsd/ does not match the SDK source. Run \`pnpm run sync:xsd\`.`); + } + fs.copyFileSync(src, dest); + copiedCount += 1; } + + return {total: requested.size, copiedCount, unchangedCount, removedCount}; } -let copiedCount = 0; -let unchangedCount = 0; -for (const sourceFile of sourceFiles) { - const sourcePath = path.join(sdkXsdDir, sourceFile); - const destinationPath = path.join(extensionXsdDir, sourceFile); +function buildContribution(mappings) { + const entries = []; + for (const mapping of mappings) { + for (const fileMatch of mapping.fileMatch) { + entries.push({fileMatch, url: `./resources/xsd/${mapping.schema}`}); + } + } + return entries; +} - if (filesEqual(sourcePath, destinationPath)) { - unchangedCount += 1; - continue; +function writeContribution(generated) { + const raw = fs.readFileSync(packageJsonPath, 'utf8'); + const trailingNewline = raw.endsWith('\n'); + const pkg = JSON.parse(raw); + pkg.contributes ??= {}; + const existing = pkg.contributes.xmlValidation ?? []; + const desired = generated; + + const sameLength = existing.length === desired.length; + const sameContent = + sameLength && + existing.every((entry, idx) => entry?.fileMatch === desired[idx].fileMatch && entry?.url === desired[idx].url); + + if (sameContent) return false; + + if (checkMode) { + fail( + 'Drift: package.json#contributes.xmlValidation is out of sync with xsd-mappings.json. Run `pnpm run sync:xsd`.', + ); } - fs.copyFileSync(sourcePath, destinationPath); - copiedCount += 1; + pkg.contributes.xmlValidation = desired; + const next = JSON.stringify(pkg, null, 2) + (trailingNewline ? '\n' : ''); + fs.writeFileSync(packageJsonPath, next); + return true; } -console.log( - `[xsd-sync] complete: ${sourceFiles.length} source files, ${copiedCount} copied, ${unchangedCount} unchanged, ${removedCount} removed`, -); +const mappings = readMappings(); +const stats = syncSchemas(mappings); +const contributionEntries = buildContribution(mappings); +const wrotePackageJson = writeContribution(contributionEntries); + +if (checkMode) { + console.log(`[xsd-sync] check OK: ${stats.total} schemas, ${contributionEntries.length} fileMatch entries`); +} else { + console.log( + `[xsd-sync] complete: ${stats.total} schemas (${stats.copiedCount} copied, ${stats.unchangedCount} unchanged, ${stats.removedCount} removed); ${contributionEntries.length} fileMatch entries${wrotePackageJson ? ' — wrote package.json' : ''}`, + ); +} diff --git a/packages/b2c-vs-extension/src/extension.ts b/packages/b2c-vs-extension/src/extension.ts index 3ab0fe887..2eb5a7ab1 100644 --- a/packages/b2c-vs-extension/src/extension.ts +++ b/packages/b2c-vs-extension/src/extension.ts @@ -24,7 +24,6 @@ import {registerDebugger} from './debugger/index.js'; import {registerCodeSync} from './code-sync/index.js'; import {registerScriptTypes} from './script-types/index.js'; import {registerWebDavTree} from './webdav-tree/index.js'; -import {registerXmlValidation} from './xml-validation/index.js'; import {disposeTelemetry, initTelemetry, markFeatureUsed, sendEvent, sendException} from './telemetry.js'; import {registerCipAnalytics} from './cip-analytics/index.js'; @@ -437,8 +436,6 @@ async function activateInner(context: vscode.ExtensionContext, log: vscode.Outpu registerScriptTypes(context, cartridgeService, log); } - registerXmlValidation(context, log); - if (settings.get('features.cipAnalytics', true)) { registerCipAnalytics(context, configProvider, log); } diff --git a/packages/b2c-vs-extension/src/test/xml-validation.test.ts b/packages/b2c-vs-extension/src/test/xml-validation.test.ts new file mode 100644 index 000000000..f65919a73 --- /dev/null +++ b/packages/b2c-vs-extension/src/test/xml-validation.test.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2025, Salesforce, Inc. + * SPDX-License-Identifier: Apache-2 + * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 + */ + +import * as assert from 'assert'; +import * as fs from 'fs'; +import * as path from 'path'; +import {fileURLToPath} from 'url'; + +const pkgRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..'); +const packageJsonPath = path.join(pkgRoot, 'package.json'); +const mappingsPath = path.join(pkgRoot, 'resources', 'xsd-mappings.json'); +const xsdDir = path.join(pkgRoot, 'resources', 'xsd'); + +interface XmlValidationEntry { + fileMatch: string; + url: string; +} + +interface MappingEntry { + schema: string; + fileMatch: string[]; +} + +function readPackageJson(): {contributes?: {xmlValidation?: XmlValidationEntry[]}} { + return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); +} + +function readMappings(): MappingEntry[] { + return JSON.parse(fs.readFileSync(mappingsPath, 'utf8')).mappings; +} + +suite('XML schema validation contribution', () => { + test('package.json has xmlValidation entries', () => { + const entries = readPackageJson().contributes?.xmlValidation ?? []; + assert.ok(entries.length > 0, 'expected at least one xmlValidation entry'); + }); + + test('every xmlValidation url resolves to an XSD file on disk', () => { + const entries = readPackageJson().contributes?.xmlValidation ?? []; + for (const entry of entries) { + assert.ok(entry.url.startsWith('./resources/xsd/'), `unexpected url shape: ${entry.url}`); + const abs = path.resolve(pkgRoot, entry.url); + assert.ok(fs.existsSync(abs), `XSD file is missing for ${entry.fileMatch}: ${abs}`); + } + }); + + test('xsd-mappings.json drives package.json contributes.xmlValidation (no drift)', () => { + const mappings = readMappings(); + const expected: XmlValidationEntry[] = []; + for (const mapping of mappings) { + for (const fileMatch of mapping.fileMatch) { + expected.push({fileMatch, url: `./resources/xsd/${mapping.schema}`}); + } + } + const actual = readPackageJson().contributes?.xmlValidation ?? []; + assert.deepStrictEqual( + actual, + expected, + 'package.json#contributes.xmlValidation is out of sync with resources/xsd-mappings.json — run `pnpm run sync:xsd`.', + ); + }); + + test('every schema referenced in mappings exists under resources/xsd/', () => { + for (const {schema} of readMappings()) { + const abs = path.join(xsdDir, schema); + assert.ok(fs.existsSync(abs), `Mapped schema not found on disk: ${schema}`); + } + }); + + test('resources/xsd/ contains no XSDs that are not declared in mappings', () => { + const declared = new Set(readMappings().map((m) => m.schema)); + const onDisk = fs.readdirSync(xsdDir).filter((name) => name.endsWith('.xsd')); + for (const file of onDisk) { + assert.ok(declared.has(file), `Stray XSD on disk (not in mappings): ${file}`); + } + }); +}); diff --git a/packages/b2c-vs-extension/src/xml-validation/index.ts b/packages/b2c-vs-extension/src/xml-validation/index.ts deleted file mode 100644 index 49db626e3..000000000 --- a/packages/b2c-vs-extension/src/xml-validation/index.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2025, Salesforce, Inc. - * SPDX-License-Identifier: Apache-2 - * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 - */ -import * as vscode from 'vscode'; - -interface XmlFileAssociation { - pattern: string; - systemId: string; -} - -const XSD_MAPPINGS: ReadonlyArray<{pattern: string; schemaFile: string}> = [ - {pattern: '**/metadata/catalogs/*.xml', schemaFile: 'catalog.xsd'}, - {pattern: '**/metadata/customer-groups/*.xml', schemaFile: 'customergroup.xsd'}, - {pattern: '**/metadata/customer-lists/*.xml', schemaFile: 'customerlist.xsd'}, - {pattern: '**/metadata/custom-objects/*.xml', schemaFile: 'customobject.xsd'}, - {pattern: '**/metadata/inventory-lists/*.xml', schemaFile: 'inventory.xsd'}, - {pattern: '**/metadata/libraries/*.xml', schemaFile: 'library.xsd'}, - {pattern: '**/metadata/payment-methods/*.xml', schemaFile: 'paymentmethod.xsd'}, - {pattern: '**/metadata/payment-processors/*.xml', schemaFile: 'paymentprocessor.xsd'}, - {pattern: '**/metadata/preferences/*.xml', schemaFile: 'preferences.xsd'}, - {pattern: '**/metadata/pricebooks/*.xml', schemaFile: 'pricebook.xsd'}, - {pattern: '**/metadata/promotions/*.xml', schemaFile: 'promotion.xsd'}, - {pattern: '**/metadata/redirect-urls/*.xml', schemaFile: 'redirecturl.xsd'}, - {pattern: '**/metadata/search/*.xml', schemaFile: 'search.xsd'}, - {pattern: '**/metadata/shipping/*.xml', schemaFile: 'shipping.xsd'}, - {pattern: '**/metadata/sites/*.xml', schemaFile: 'site.xsd'}, - {pattern: '**/metadata/slots/*.xml', schemaFile: 'slot.xsd'}, - {pattern: '**/metadata/sourcecodes/*.xml', schemaFile: 'sourcecode.xsd'}, - {pattern: '**/metadata/stores/*.xml', schemaFile: 'store.xsd'}, - {pattern: '**/metadata/url-rules/*.xml', schemaFile: 'urlrules.xsd'}, -]; - -function getDesiredAssociations(extensionUri: vscode.Uri): XmlFileAssociation[] { - return XSD_MAPPINGS.map((mapping) => ({ - pattern: mapping.pattern, - systemId: vscode.Uri.joinPath(extensionUri, 'resources', 'xsd', mapping.schemaFile).toString(), - })); -} - -function normalizeAssociations(value: unknown): XmlFileAssociation[] { - if (!Array.isArray(value)) return []; - return value.filter( - (entry): entry is XmlFileAssociation => - Boolean(entry && typeof entry === 'object' && 'pattern' in entry && typeof entry.pattern === 'string') && - Boolean('systemId' in entry && typeof entry.systemId === 'string'), - ); -} - -function arraysEqual(left: XmlFileAssociation[], right: XmlFileAssociation[]): boolean { - if (left.length !== right.length) return false; - return left.every((item, idx) => item.pattern === right[idx]?.pattern && item.systemId === right[idx]?.systemId); -} - -export function registerXmlValidation(context: vscode.ExtensionContext, log: vscode.OutputChannel): void { - const applyAssociations = async (): Promise => { - const xmlConfig = vscode.workspace.getConfiguration('xml'); - const existing = normalizeAssociations(xmlConfig.get('fileAssociations', [])); - const desired = getDesiredAssociations(context.extensionUri); - const managedPatterns = new Set(desired.map((association) => association.pattern)); - - const retained = existing.filter((association) => !managedPatterns.has(association.pattern)); - const next = [...retained, ...desired]; - - if (arraysEqual(existing, next)) return; - - try { - await xmlConfig.update('fileAssociations', next, vscode.ConfigurationTarget.Workspace); - log.appendLine(`[XmlValidation] Registered ${desired.length} XML file association(s) for B2C metadata schemas.`); - } catch (err) { - log.appendLine(`[XmlValidation] Failed to register XML file associations: ${String(err)}`); - } - }; - - void applyAssociations(); - - const configChange = vscode.workspace.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration('xml.fileAssociations')) { - void applyAssociations(); - } - }); - - context.subscriptions.push(configChange); -} From 6d42ae64ce2564a7973f2efa92b999df880ce511 Mon Sep 17 00:00:00 2001 From: CharithaT07 Date: Thu, 4 Jun 2026 10:56:10 +0530 Subject: [PATCH 3/5] adding XSD valiation in vs extension --- packages/b2c-vs-extension/package.json | 9 +- .../resources/xsd-mappings.json | 14 +- .../scripts/esbuild-bundle.mjs | 5 + .../b2c-vs-extension/scripts/sync-xsd.mjs | 167 +++++++++++------- .../src/test/xml-validation.test.ts | 67 ++++++- 5 files changed, 193 insertions(+), 69 deletions(-) diff --git a/packages/b2c-vs-extension/package.json b/packages/b2c-vs-extension/package.json index 09786e62c..c06cb7d9b 100644 --- a/packages/b2c-vs-extension/package.json +++ b/packages/b2c-vs-extension/package.json @@ -1769,11 +1769,10 @@ } }, "scripts": { - "sync:xsd": "node scripts/sync-xsd.mjs", - "build": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs", - "watch": "pnpm run sync:xsd && node scripts/esbuild-bundle.mjs --watch", - "vscode:prepublish": "pnpm run sync:xsd && pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && node scripts/esbuild-bundle.mjs", - "package": "pnpm run sync:xsd && pnpm exec vsce package --no-dependencies && node scripts/inject-script-types.mjs", + "build": "node scripts/esbuild-bundle.mjs", + "watch": "node scripts/esbuild-bundle.mjs --watch", + "vscode:prepublish": "pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && node scripts/esbuild-bundle.mjs", + "package": "pnpm run build && pnpm exec vsce package --no-dependencies && node scripts/inject-script-types.mjs", "lint": "eslint", "lint:agent": "eslint --quiet", "typecheck:agent": "tsc -p . --noEmit --pretty false", diff --git a/packages/b2c-vs-extension/resources/xsd-mappings.json b/packages/b2c-vs-extension/resources/xsd-mappings.json index 824ea679d..9b42a902a 100644 --- a/packages/b2c-vs-extension/resources/xsd-mappings.json +++ b/packages/b2c-vs-extension/resources/xsd-mappings.json @@ -1,6 +1,18 @@ { "$schema": "./xsd-mappings.schema.json", - "description": "Source-of-truth for XML→XSD validation contributed by this extension. The build step (scripts/sync-xsd.mjs) reads this file to (1) copy only the listed schemas from the SDK into resources/xsd/ and (2) regenerate package.json#contributes.xmlValidation. Each entry covers two workspace conventions: the canonical SFCC site-archive layout (sites//, catalogs//, …) and the exploded `metadata/` workspace convention used by sfcc-ci / prophet-style projects.", + "description": "Source-of-truth for XML→XSD validation contributed by this extension. The build step (scripts/sync-xsd.mjs) reads this file to (1) copy the listed schemas from the SDK into resources/xsd/ and (2) regenerate package.json#contributes.xmlValidation. Each `mappings` entry covers two workspace conventions: the canonical SFCC site-archive layout (sites//, catalogs//, …) and the exploded `metadata/` workspace convention used by sfcc-ci / prophet-style projects. Every SDK schema must appear in `mappings` (bundled + contributed as fileMatch), `bundleOnly` (bundled because another schema imports it, but never the validation target itself), or `skipped` (excluded entirely). The build fails if any SDK schema is in none of those lists — this prevents new schemas from silently missing validation.", + "bundleOnly": [ + "xml.xsd" + ], + "skipped": [ + "bmext.xsd", + "customeractivedata.xsd", + "customerpaymentinstrument.xsd", + "feed.xsd", + "order.xsd", + "returnimportfeed.xsd", + "shippingorderupdatefeed.xsd" + ], "mappings": [ { "schema": "abtest.xsd", diff --git a/packages/b2c-vs-extension/scripts/esbuild-bundle.mjs b/packages/b2c-vs-extension/scripts/esbuild-bundle.mjs index 52713b54e..3b0b4b468 100644 --- a/packages/b2c-vs-extension/scripts/esbuild-bundle.mjs +++ b/packages/b2c-vs-extension/scripts/esbuild-bundle.mjs @@ -11,6 +11,7 @@ import esbuild from 'esbuild'; import fs from 'node:fs'; import path from 'path'; import {fileURLToPath} from 'url'; +import {syncXsd} from './sync-xsd.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -18,6 +19,10 @@ const __dirname = path.dirname(__filename); // scripts/ -> package root const pkgRoot = path.resolve(__dirname, '..'); +// Keep XSDs and package.json#contributes.xmlValidation in lockstep with +// resources/xsd-mappings.json before any bundling happens. +syncXsd({pkgRoot}); + // In CJS there is no import.meta; SDK's version.js uses createRequire(import.meta.url). Shim it. // Use globalThis so the value is visible inside all module wrappers in the bundle. const IMPORT_META_URL_SHIM = diff --git a/packages/b2c-vs-extension/scripts/sync-xsd.mjs b/packages/b2c-vs-extension/scripts/sync-xsd.mjs index 562309539..a4d568855 100644 --- a/packages/b2c-vs-extension/scripts/sync-xsd.mjs +++ b/packages/b2c-vs-extension/scripts/sync-xsd.mjs @@ -7,14 +7,16 @@ /* * Single source of truth: resources/xsd-mappings.json * - * This script: - * 1. Reads the mappings file. - * 2. Copies the listed XSDs from the SDK (`b2c-tooling-sdk/data/xsd/`) into + * Reads the mappings file and: + * 1. Copies the listed XSDs from the SDK (`b2c-tooling-sdk/data/xsd/`) into * `resources/xsd/`. Any unrelated *.xsd previously written under that dir * is removed so the bundle never carries unused schemas. - * 3. Regenerates the `contributes.xmlValidation` block in package.json from + * 2. Regenerates the `contributes.xmlValidation` block in package.json from * the same mappings — keeping the VS Code contribution and the bundled - * schemas in lockstep. CI may invoke with `--check` to fail on drift. + * schemas in lockstep. + * + * Invoked automatically at the start of esbuild-bundle.mjs (build/watch), + * so a developer never needs to run it as a separate step. */ import fs from 'node:fs'; @@ -23,64 +25,95 @@ import {fileURLToPath} from 'node:url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const pkgRoot = path.resolve(__dirname, '..'); -const sdkXsdDir = path.resolve(pkgRoot, '..', 'b2c-tooling-sdk', 'data', 'xsd'); -const extensionXsdDir = path.join(pkgRoot, 'resources', 'xsd'); -const mappingsPath = path.join(pkgRoot, 'resources', 'xsd-mappings.json'); -const packageJsonPath = path.join(pkgRoot, 'package.json'); +const defaultPkgRoot = path.resolve(__dirname, '..'); -const checkMode = process.argv.includes('--check'); +function listXsdFiles(directory) { + if (!fs.existsSync(directory)) return []; + return fs + .readdirSync(directory) + .filter((name) => name.endsWith('.xsd')) + .sort((left, right) => left.localeCompare(right)); +} -function fail(message) { - console.error(`[xsd-sync] ${message}`); - process.exit(1); +function filesEqual(leftPath, rightPath) { + if (!fs.existsSync(leftPath) || !fs.existsSync(rightPath)) return false; + return fs.readFileSync(leftPath).equals(fs.readFileSync(rightPath)); } -function readMappings() { +function readMappings(mappingsPath) { if (!fs.existsSync(mappingsPath)) { - fail(`Mappings file not found: ${mappingsPath}`); + throw new Error(`[xsd-sync] Mappings file not found: ${mappingsPath}`); } const parsed = JSON.parse(fs.readFileSync(mappingsPath, 'utf8')); const entries = parsed?.mappings; + const bundleOnly = parsed?.bundleOnly ?? []; + const skipped = parsed?.skipped ?? []; if (!Array.isArray(entries) || entries.length === 0) { - fail('xsd-mappings.json must contain a non-empty "mappings" array'); + throw new Error('[xsd-sync] xsd-mappings.json must contain a non-empty "mappings" array'); + } + if (!Array.isArray(bundleOnly)) { + throw new Error('[xsd-sync] xsd-mappings.json "bundleOnly" must be an array of filenames'); + } + if (!Array.isArray(skipped)) { + throw new Error('[xsd-sync] xsd-mappings.json "skipped" must be an array of filenames'); } for (const entry of entries) { if (typeof entry?.schema !== 'string' || !entry.schema.endsWith('.xsd')) { - fail(`Invalid mapping entry — "schema" must end in .xsd: ${JSON.stringify(entry)}`); + throw new Error(`[xsd-sync] Invalid mapping entry — "schema" must end in .xsd: ${JSON.stringify(entry)}`); } if (!Array.isArray(entry.fileMatch) || entry.fileMatch.length === 0) { - fail(`Mapping for ${entry.schema} must have a non-empty fileMatch[]`); + throw new Error(`[xsd-sync] Mapping for ${entry.schema} must have a non-empty fileMatch[]`); } } - return entries; + for (const name of [...bundleOnly, ...skipped]) { + if (typeof name !== 'string' || !name.endsWith('.xsd')) { + throw new Error( + `[xsd-sync] Invalid bundleOnly/skipped entry — must be a filename ending in .xsd: ${JSON.stringify(name)}`, + ); + } + } + return {mappings: entries, bundleOnly, skipped}; } -function listXsdFiles(directory) { - if (!fs.existsSync(directory)) return []; - return fs - .readdirSync(directory) - .filter((name) => name.endsWith('.xsd')) - .sort((left, right) => left.localeCompare(right)); -} +function assertFullSdkCoverage(mappings, bundleOnly, skipped, sdkXsdDir) { + const sdkFiles = new Set(listXsdFiles(sdkXsdDir)); + const accounted = new Set([...mappings.map((m) => m.schema), ...bundleOnly, ...skipped]); + + const unaccounted = [...sdkFiles].filter((file) => !accounted.has(file)).sort(); + if (unaccounted.length > 0) { + const list = unaccounted.map((f) => ` - ${f}`).join('\n'); + throw new Error( + `[xsd-sync] ${unaccounted.length} SDK schema(s) are not accounted for:\n${list}\n` + + `[xsd-sync] Edit resources/xsd-mappings.json — add each to one of:\n` + + `[xsd-sync] mappings[] (bundled + contributed as fileMatch) for user-facing schemas\n` + + `[xsd-sync] bundleOnly[] (bundled, no fileMatch) for schemas imported by other XSDs\n` + + `[xsd-sync] skipped[] (excluded entirely) for internal/feed/non-workspace schemas.`, + ); + } -function filesEqual(leftPath, rightPath) { - if (!fs.existsSync(leftPath) || !fs.existsSync(rightPath)) return false; - return fs.readFileSync(leftPath).equals(fs.readFileSync(rightPath)); + const phantom = [...accounted].filter((file) => !sdkFiles.has(file)).sort(); + if (phantom.length > 0) { + const list = phantom.map((f) => ` - ${f}`).join('\n'); + throw new Error( + `[xsd-sync] ${phantom.length} schema(s) listed in xsd-mappings.json no longer exist in the SDK:\n${list}\n` + + `[xsd-sync] Remove them from mappings[]/bundleOnly[]/skipped[] in resources/xsd-mappings.json.`, + ); + } } -function syncSchemas(mappings) { +function syncSchemas(mappings, bundleOnly, sdkXsdDir, extensionXsdDir) { if (!fs.existsSync(sdkXsdDir)) { - fail(`SDK XSD source directory not found: ${sdkXsdDir}`); + throw new Error(`[xsd-sync] SDK XSD source directory not found: ${sdkXsdDir}`); } fs.mkdirSync(extensionXsdDir, {recursive: true}); const sourceFiles = new Set(listXsdFiles(sdkXsdDir)); - const requested = new Set(mappings.map((m) => m.schema)); + // Bundle both: schemas users validate against AND their transitive imports. + const requested = new Set([...mappings.map((m) => m.schema), ...bundleOnly]); for (const schema of requested) { if (!sourceFiles.has(schema)) { - fail(`Mapped schema "${schema}" is missing from SDK source directory ${sdkXsdDir}`); + throw new Error(`[xsd-sync] Schema "${schema}" is missing from SDK source directory ${sdkXsdDir}`); } } @@ -101,9 +134,6 @@ function syncSchemas(mappings) { unchangedCount += 1; continue; } - if (checkMode) { - fail(`Drift: ${schema} in resources/xsd/ does not match the SDK source. Run \`pnpm run sync:xsd\`.`); - } fs.copyFileSync(src, dest); copiedCount += 1; } @@ -121,42 +151,61 @@ function buildContribution(mappings) { return entries; } -function writeContribution(generated) { +function writeContribution(packageJsonPath, generated) { const raw = fs.readFileSync(packageJsonPath, 'utf8'); const trailingNewline = raw.endsWith('\n'); const pkg = JSON.parse(raw); pkg.contributes ??= {}; const existing = pkg.contributes.xmlValidation ?? []; - const desired = generated; - const sameLength = existing.length === desired.length; const sameContent = - sameLength && - existing.every((entry, idx) => entry?.fileMatch === desired[idx].fileMatch && entry?.url === desired[idx].url); + existing.length === generated.length && + existing.every((entry, idx) => entry?.fileMatch === generated[idx].fileMatch && entry?.url === generated[idx].url); if (sameContent) return false; - if (checkMode) { - fail( - 'Drift: package.json#contributes.xmlValidation is out of sync with xsd-mappings.json. Run `pnpm run sync:xsd`.', - ); - } - - pkg.contributes.xmlValidation = desired; - const next = JSON.stringify(pkg, null, 2) + (trailingNewline ? '\n' : ''); - fs.writeFileSync(packageJsonPath, next); + pkg.contributes.xmlValidation = generated; + fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + (trailingNewline ? '\n' : '')); return true; } -const mappings = readMappings(); -const stats = syncSchemas(mappings); -const contributionEntries = buildContribution(mappings); -const wrotePackageJson = writeContribution(contributionEntries); +/** + * Run the full sync. Safe to call multiple times — copies only when source/dest + * differ and rewrites package.json only when the contribution array would change. + */ +export function syncXsd({pkgRoot = defaultPkgRoot} = {}) { + const sdkXsdDir = path.resolve(pkgRoot, '..', 'b2c-tooling-sdk', 'data', 'xsd'); + const extensionXsdDir = path.join(pkgRoot, 'resources', 'xsd'); + const mappingsPath = path.join(pkgRoot, 'resources', 'xsd-mappings.json'); + const packageJsonPath = path.join(pkgRoot, 'package.json'); + + const {mappings, bundleOnly, skipped} = readMappings(mappingsPath); + assertFullSdkCoverage(mappings, bundleOnly, skipped, sdkXsdDir); + const stats = syncSchemas(mappings, bundleOnly, sdkXsdDir, extensionXsdDir); + const contribution = buildContribution(mappings); + const wrotePkg = writeContribution(packageJsonPath, contribution); -if (checkMode) { - console.log(`[xsd-sync] check OK: ${stats.total} schemas, ${contributionEntries.length} fileMatch entries`); -} else { console.log( - `[xsd-sync] complete: ${stats.total} schemas (${stats.copiedCount} copied, ${stats.unchangedCount} unchanged, ${stats.removedCount} removed); ${contributionEntries.length} fileMatch entries${wrotePackageJson ? ' — wrote package.json' : ''}`, + `[xsd-sync] ${mappings.length} mapped, ${bundleOnly.length} bundleOnly, ${skipped.length} skipped; ${contribution.length} fileMatch entries (${stats.copiedCount} copied, ${stats.unchangedCount} unchanged, ${stats.removedCount} removed)${wrotePkg ? ' — wrote package.json' : ''}`, ); + return { + ...stats, + mappedCount: mappings.length, + bundleOnlyCount: bundleOnly.length, + skippedCount: skipped.length, + contributionEntries: contribution.length, + wrotePackageJson: wrotePkg, + }; +} + +// Allow direct invocation (e.g. `node scripts/sync-xsd.mjs`) for emergencies, +// even though the build pipeline calls syncXsd() directly. +const isDirectInvoke = process.argv[1] && path.resolve(process.argv[1]) === __filename; +if (isDirectInvoke) { + try { + syncXsd(); + } catch (err) { + console.error(err instanceof Error ? err.message : String(err)); + process.exit(1); + } } diff --git a/packages/b2c-vs-extension/src/test/xml-validation.test.ts b/packages/b2c-vs-extension/src/test/xml-validation.test.ts index f65919a73..60f01066b 100644 --- a/packages/b2c-vs-extension/src/test/xml-validation.test.ts +++ b/packages/b2c-vs-extension/src/test/xml-validation.test.ts @@ -24,6 +24,12 @@ interface MappingEntry { fileMatch: string[]; } +interface MappingsFile { + mappings: MappingEntry[]; + bundleOnly: string[]; + skipped: string[]; +} + function readPackageJson(): {contributes?: {xmlValidation?: XmlValidationEntry[]}} { return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); } @@ -32,6 +38,19 @@ function readMappings(): MappingEntry[] { return JSON.parse(fs.readFileSync(mappingsPath, 'utf8')).mappings; } +function readMappingsFile(): MappingsFile { + const parsed = JSON.parse(fs.readFileSync(mappingsPath, 'utf8')); + return {mappings: parsed.mappings, bundleOnly: parsed.bundleOnly ?? [], skipped: parsed.skipped ?? []}; +} + +function listSdkXsds(): string[] { + const sdkXsdDir = path.resolve(pkgRoot, '..', 'b2c-tooling-sdk', 'data', 'xsd'); + return fs + .readdirSync(sdkXsdDir) + .filter((name) => name.endsWith('.xsd')) + .sort(); +} + suite('XML schema validation contribution', () => { test('package.json has xmlValidation entries', () => { const entries = readPackageJson().contributes?.xmlValidation ?? []; @@ -59,7 +78,7 @@ suite('XML schema validation contribution', () => { assert.deepStrictEqual( actual, expected, - 'package.json#contributes.xmlValidation is out of sync with resources/xsd-mappings.json — run `pnpm run sync:xsd`.', + 'package.json#contributes.xmlValidation is out of sync with resources/xsd-mappings.json — run `pnpm run build`.', ); }); @@ -70,11 +89,51 @@ suite('XML schema validation contribution', () => { } }); - test('resources/xsd/ contains no XSDs that are not declared in mappings', () => { - const declared = new Set(readMappings().map((m) => m.schema)); + test('resources/xsd/ contains no XSDs that are not declared in mappings or bundleOnly', () => { + const {mappings, bundleOnly} = readMappingsFile(); + const declared = new Set([...mappings.map((m) => m.schema), ...bundleOnly]); const onDisk = fs.readdirSync(xsdDir).filter((name) => name.endsWith('.xsd')); for (const file of onDisk) { - assert.ok(declared.has(file), `Stray XSD on disk (not in mappings): ${file}`); + assert.ok(declared.has(file), `Stray XSD on disk (not in mappings or bundleOnly): ${file}`); + } + }); + + test('every SDK XSD is mapped, bundleOnly, or skipped (no silent gaps)', () => { + const {mappings, bundleOnly, skipped} = readMappingsFile(); + const accounted = new Set([...mappings.map((m) => m.schema), ...bundleOnly, ...skipped]); + const sdkXsds = listSdkXsds(); + + const unaccounted = sdkXsds.filter((file) => !accounted.has(file)); + assert.deepStrictEqual( + unaccounted, + [], + `SDK schemas not accounted for — add to mappings[], bundleOnly[], or skipped[] in resources/xsd-mappings.json: ${unaccounted.join(', ')}`, + ); + + const sdkSet = new Set(sdkXsds); + const phantom = [...accounted].filter((file) => !sdkSet.has(file)); + assert.deepStrictEqual( + phantom, + [], + `Schemas listed in xsd-mappings.json that no longer exist in the SDK: ${phantom.join(', ')}`, + ); + }); + + test('schemas imported by mapped XSDs are present (transitive bundling)', () => { + const {mappings} = readMappingsFile(); + const declared = new Set(fs.readdirSync(xsdDir).filter((name) => name.endsWith('.xsd'))); + const importPattern = /schemaLocation\s*=\s*"([^"]+\.xsd)"/g; + + for (const {schema} of mappings) { + const content = fs.readFileSync(path.join(xsdDir, schema), 'utf8'); + let match: RegExpExecArray | null; + while ((match = importPattern.exec(content)) !== null) { + const imported = match[1].split('/').pop()!; + assert.ok( + declared.has(imported), + `${schema} imports "${imported}" but it is not bundled — add it to bundleOnly[] in resources/xsd-mappings.json`, + ); + } } }); }); From 7e1246573b469d52e8a2f9d2b314e073aa6cef99 Mon Sep 17 00:00:00 2001 From: CharithaT07 Date: Thu, 4 Jun 2026 17:57:53 +0530 Subject: [PATCH 4/5] adding XSD valiation in vs extension --- .github/workflows/ci-vs-extension.yml | 1 + .github/workflows/ci.yml | 1 + packages/b2c-vs-extension/package.json | 3 +- .../resources/xsd-mappings.schema.json | 61 +++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 packages/b2c-vs-extension/resources/xsd-mappings.schema.json diff --git a/.github/workflows/ci-vs-extension.yml b/.github/workflows/ci-vs-extension.yml index c3f1acbd0..4aa699579 100644 --- a/.github/workflows/ci-vs-extension.yml +++ b/.github/workflows/ci-vs-extension.yml @@ -13,6 +13,7 @@ on: pull_request: branches: - main + - develop paths: - 'packages/b2c-vs-extension/**' - 'packages/b2c-tooling-sdk/**' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbad74c3a..e9886aac1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: pull_request: branches: - main + - develop - 'release/**' workflow_dispatch: diff --git a/packages/b2c-vs-extension/package.json b/packages/b2c-vs-extension/package.json index c06cb7d9b..05c32d7ef 100644 --- a/packages/b2c-vs-extension/package.json +++ b/packages/b2c-vs-extension/package.json @@ -1769,6 +1769,7 @@ } }, "scripts": { + "sync:xsd": "node scripts/sync-xsd.mjs", "build": "node scripts/esbuild-bundle.mjs", "watch": "node scripts/esbuild-bundle.mjs --watch", "vscode:prepublish": "pnpm run typecheck:agent && pnpm --filter @salesforce/b2c-tooling-sdk run build && node scripts/esbuild-bundle.mjs", @@ -1778,7 +1779,7 @@ "typecheck:agent": "tsc -p . --noEmit --pretty false", "format": "prettier --write src", "format:check": "prettier --check src", - "pretest": "tsc -p tsconfig.test.json", + "pretest": "pnpm run sync:xsd && tsc -p tsconfig.test.json", "test": "vscode-test", "posttest": "pnpm run lint", "analyze": "ANALYZE_BUNDLE=1 node scripts/esbuild-bundle.mjs" diff --git a/packages/b2c-vs-extension/resources/xsd-mappings.schema.json b/packages/b2c-vs-extension/resources/xsd-mappings.schema.json new file mode 100644 index 000000000..e0eb2ebb4 --- /dev/null +++ b/packages/b2c-vs-extension/resources/xsd-mappings.schema.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://salesforce.com/b2c-vs-extension/xsd-mappings.schema.json", + "title": "B2C VS Extension XSD Mappings", + "description": "Source-of-truth for XML→XSD validation contributed by the B2C VS extension. Read by scripts/sync-xsd.mjs at build time to (1) bundle the listed schemas from the SDK into resources/xsd/ and (2) regenerate package.json#contributes.xmlValidation.", + "type": "object", + "additionalProperties": false, + "required": ["mappings"], + "properties": { + "$schema": { + "type": "string", + "description": "Reference to this JSON Schema for editor validation." + }, + "description": { + "type": "string", + "description": "Human-readable explanation of how this file is used." + }, + "mappings": { + "type": "array", + "description": "Schemas that are bundled AND contributed as fileMatch entries to package.json#contributes.xmlValidation. These are the user-facing validation targets.", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": ["schema", "fileMatch"], + "properties": { + "schema": { + "type": "string", + "description": "Filename of the XSD inside packages/b2c-tooling-sdk/data/xsd/ (e.g., \"catalog.xsd\").", + "pattern": "^[a-zA-Z0-9_-]+\\.xsd$" + }, + "fileMatch": { + "type": "array", + "description": "VS Code glob patterns (relative to the workspace root) that should validate against this schema.", + "minItems": 1, + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + }, + "bundleOnly": { + "type": "array", + "description": "Schemas that are bundled because they are imported by other XSDs (e.g., xml.xsd providing the W3C xml: namespace), but never the validation target themselves. These are NOT contributed to package.json.", + "items": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+\\.xsd$" + } + }, + "skipped": { + "type": "array", + "description": "Schemas intentionally excluded from the extension entirely — typically internal data feeds, OMS integration files, or schemas with no canonical workspace location.", + "items": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+\\.xsd$" + } + } + } +} From 42087a6a3dfe77ea72dc260ea1c3d8142dcbdf89 Mon Sep 17 00:00:00 2001 From: CharithaT07 Date: Thu, 4 Jun 2026 18:52:12 +0530 Subject: [PATCH 5/5] adding XSD valiation in vs extension --- .github/workflows/ci-vs-extension.yml | 1 - .github/workflows/ci.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/ci-vs-extension.yml b/.github/workflows/ci-vs-extension.yml index 4aa699579..c3f1acbd0 100644 --- a/.github/workflows/ci-vs-extension.yml +++ b/.github/workflows/ci-vs-extension.yml @@ -13,7 +13,6 @@ on: pull_request: branches: - main - - develop paths: - 'packages/b2c-vs-extension/**' - 'packages/b2c-tooling-sdk/**' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9886aac1..bbad74c3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ on: pull_request: branches: - main - - develop - 'release/**' workflow_dispatch: