@salesforce/b2c-tooling-sdk 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/data/guides/enrichment.json +291 -0
  2. package/data/guides/index.json +426 -37
  3. package/data/schemas/dw.schema.json +590 -0
  4. package/data/tooling/index.json +18 -9
  5. package/dist/esm/cli/base-command.d.ts +20 -1
  6. package/dist/esm/cli/base-command.js +61 -11
  7. package/dist/esm/cli/base-command.js.map +1 -1
  8. package/dist/esm/cli/cartridge-command.js +2 -1
  9. package/dist/esm/cli/cartridge-command.js.map +1 -1
  10. package/dist/esm/cli/command-search.d.ts +85 -0
  11. package/dist/esm/cli/command-search.js +147 -0
  12. package/dist/esm/cli/command-search.js.map +1 -0
  13. package/dist/esm/cli/config.d.ts +10 -1
  14. package/dist/esm/cli/config.js +18 -9
  15. package/dist/esm/cli/config.js.map +1 -1
  16. package/dist/esm/cli/hooks.d.ts +13 -0
  17. package/dist/esm/cli/hooks.js +11 -0
  18. package/dist/esm/cli/hooks.js.map +1 -1
  19. package/dist/esm/cli/index.d.ts +2 -0
  20. package/dist/esm/cli/index.js +2 -0
  21. package/dist/esm/cli/index.js.map +1 -1
  22. package/dist/esm/cli/instance-command.d.ts +1 -0
  23. package/dist/esm/cli/instance-command.js +2 -1
  24. package/dist/esm/cli/instance-command.js.map +1 -1
  25. package/dist/esm/cli/mrt-command.d.ts +3 -2
  26. package/dist/esm/cli/mrt-command.js +4 -4
  27. package/dist/esm/cli/mrt-command.js.map +1 -1
  28. package/dist/esm/cli/oauth-command.d.ts +1 -0
  29. package/dist/esm/cli/ods-command.d.ts +1 -0
  30. package/dist/esm/cli/webdav-command.d.ts +1 -0
  31. package/dist/esm/clients/custom-apis.d.ts +36 -2
  32. package/dist/esm/clients/custom-apis.js +57 -4
  33. package/dist/esm/clients/custom-apis.js.map +1 -1
  34. package/dist/esm/clients/index.d.ts +1 -1
  35. package/dist/esm/clients/index.js +1 -1
  36. package/dist/esm/clients/index.js.map +1 -1
  37. package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
  38. package/dist/esm/clients/scapi-backend-utils.js +28 -1
  39. package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
  40. package/dist/esm/clients/scapi-fallback-backend.js +2 -2
  41. package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
  42. package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
  43. package/dist/esm/compat/dispatcher.js +2 -2
  44. package/dist/esm/compat/dispatcher.js.map +1 -1
  45. package/dist/esm/config/config-origins.d.ts +19 -0
  46. package/dist/esm/config/config-origins.js +11 -0
  47. package/dist/esm/config/config-origins.js.map +1 -0
  48. package/dist/esm/config/config-write.d.ts +86 -0
  49. package/dist/esm/config/config-write.js +296 -0
  50. package/dist/esm/config/config-write.js.map +1 -0
  51. package/dist/esm/config/dw-json-schema.d.ts +14 -0
  52. package/dist/esm/config/dw-json-schema.js +269 -0
  53. package/dist/esm/config/dw-json-schema.js.map +1 -0
  54. package/dist/esm/config/dw-json.d.ts +2 -0
  55. package/dist/esm/config/dw-json.js +10 -6
  56. package/dist/esm/config/dw-json.js.map +1 -1
  57. package/dist/esm/config/index.d.ts +13 -4
  58. package/dist/esm/config/index.js +8 -3
  59. package/dist/esm/config/index.js.map +1 -1
  60. package/dist/esm/config/instance-manager.d.ts +64 -28
  61. package/dist/esm/config/instance-manager.js +145 -63
  62. package/dist/esm/config/instance-manager.js.map +1 -1
  63. package/dist/esm/config/mapping.d.ts +5 -0
  64. package/dist/esm/config/mapping.js +20 -1
  65. package/dist/esm/config/mapping.js.map +1 -1
  66. package/dist/esm/config/project-environment.d.ts +62 -0
  67. package/dist/esm/config/project-environment.js +113 -0
  68. package/dist/esm/config/project-environment.js.map +1 -1
  69. package/dist/esm/config/resolver.d.ts +22 -0
  70. package/dist/esm/config/resolver.js +106 -37
  71. package/dist/esm/config/resolver.js.map +1 -1
  72. package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
  73. package/dist/esm/config/sources/dw-json-source.js +59 -23
  74. package/dist/esm/config/sources/dw-json-source.js.map +1 -1
  75. package/dist/esm/config/sources/env-source.d.ts +70 -9
  76. package/dist/esm/config/sources/env-source.js +205 -47
  77. package/dist/esm/config/sources/env-source.js.map +1 -1
  78. package/dist/esm/config/sources/index.d.ts +1 -1
  79. package/dist/esm/config/sources/index.js +1 -1
  80. package/dist/esm/config/sources/index.js.map +1 -1
  81. package/dist/esm/config/types.d.ts +53 -3
  82. package/dist/esm/docs/search.js +3 -1
  83. package/dist/esm/docs/search.js.map +1 -1
  84. package/dist/esm/docs/types.d.ts +3 -1
  85. package/dist/esm/guidance/bundle.d.ts +33 -0
  86. package/dist/esm/guidance/bundle.js +268 -0
  87. package/dist/esm/guidance/bundle.js.map +1 -0
  88. package/dist/esm/guidance/catalog.d.ts +8 -1
  89. package/dist/esm/guidance/catalog.js +48 -6
  90. package/dist/esm/guidance/catalog.js.map +1 -1
  91. package/dist/esm/guidance/index.d.ts +1 -0
  92. package/dist/esm/guidance/index.js +1 -0
  93. package/dist/esm/guidance/index.js.map +1 -1
  94. package/dist/esm/guidance/types.d.ts +17 -1
  95. package/dist/esm/guidance/types.js.map +1 -1
  96. package/dist/esm/index.d.ts +1 -1
  97. package/dist/esm/index.js +1 -1
  98. package/dist/esm/index.js.map +1 -1
  99. package/dist/esm/operations/jobs/run-system-job.js +2 -2
  100. package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
  101. package/dist/esm/plugins/discovery.js +2 -1
  102. package/dist/esm/plugins/discovery.js.map +1 -1
  103. package/dist/esm/scapi/catalog.d.ts +5 -2
  104. package/dist/esm/scapi/catalog.js.map +1 -1
  105. package/dist/esm/scapi/index.d.ts +6 -2
  106. package/dist/esm/scapi/index.js +4 -2
  107. package/dist/esm/scapi/index.js.map +1 -1
  108. package/dist/esm/scapi/live.d.ts +14 -3
  109. package/dist/esm/scapi/live.js +33 -5
  110. package/dist/esm/scapi/live.js.map +1 -1
  111. package/dist/esm/scapi/local.d.ts +26 -0
  112. package/dist/esm/scapi/local.js +143 -0
  113. package/dist/esm/scapi/local.js.map +1 -0
  114. package/dist/esm/scapi/request.d.ts +2 -2
  115. package/dist/esm/scapi/request.js +4 -2
  116. package/dist/esm/scapi/request.js.map +1 -1
  117. package/dist/esm/scapi/runtime.d.ts +5 -0
  118. package/dist/esm/scapi/runtime.js.map +1 -1
  119. package/dist/esm/scapi/schema-source.d.ts +90 -0
  120. package/dist/esm/scapi/schema-source.js +146 -0
  121. package/dist/esm/scapi/schema-source.js.map +1 -0
  122. package/dist/esm/scapi/worker-source.js +31 -7
  123. package/dist/esm/scapi/worker-source.js.map +1 -1
  124. package/dist/esm/telemetry/telemetry.d.ts +1 -0
  125. package/dist/esm/telemetry/telemetry.js +18 -1
  126. package/dist/esm/telemetry/telemetry.js.map +1 -1
  127. package/dist/esm/telemetry/types.d.ts +9 -0
  128. package/dist/esm/test-utils/config-isolation.js +21 -15
  129. package/dist/esm/test-utils/config-isolation.js.map +1 -1
  130. package/dist/esm/ux/agent-context.d.ts +69 -0
  131. package/dist/esm/ux/agent-context.js +133 -0
  132. package/dist/esm/ux/agent-context.js.map +1 -0
  133. package/dist/esm/ux/confirm.d.ts +27 -0
  134. package/dist/esm/ux/confirm.js +32 -0
  135. package/dist/esm/ux/confirm.js.map +1 -1
  136. package/dist/esm/ux/index.d.ts +2 -1
  137. package/dist/esm/ux/index.js +2 -1
  138. package/dist/esm/ux/index.js.map +1 -1
  139. package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
  140. package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
  141. package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
  142. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
  143. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
  144. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
  145. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
  146. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
  147. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
  148. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
  149. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
  150. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
  151. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
  152. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
  153. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
  154. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
  155. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
  156. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
  157. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
  158. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
  159. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
  160. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
  161. package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
  162. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
  163. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
  164. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
  165. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
  166. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
  167. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
  168. package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
  169. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
  170. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
  171. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
  172. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
  173. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
  174. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
  175. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
  176. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
  177. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
  178. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
  179. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
  180. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
  181. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
  182. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
  183. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
  184. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
  185. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
  186. package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
  187. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
  188. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
  189. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
  190. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
  191. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
  192. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
  193. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
  194. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
  195. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
  196. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
  197. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
  198. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
  199. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
  200. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
  201. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
  202. package/package.json +5 -2
  203. package/specs/scapi-schemas-v1.yaml +4 -1
@@ -2,7 +2,8 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Shopper Configurations",
5
- "version": "1.4.0",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-configurations/shopper-configurations-oas-v1-public.yaml)\n\n# API Overview\n\nThe Shopper Configurations API provides cacheable configuration data to shopper-facing applications, enabling them to make decisions based on merchant settings without requiring server-side logic.\n\nThis highly cacheable data encompasses toggles, preferences, and configuration information that allows the application to be reactive to changes performed by the merchant, admin, or support engineer.\n\nConfiguration types include:\n\n- siteConfiguration: Site-specific settings such as name, status, currencies, and locales\n- globalConfiguration: Instance-wide settings such as feature flags\n\n## Authentication & Authorization\n\nThe Shopper Configuration API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nYou must include `sfcc.shopper-configurations` in the client ID used to generate the SLAS token. For a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html) in the SLAS guides.\n\n## Customization\n\n### Hooks\n\nYou can extend the Shopper Configurations response with custom data using the `dw.shop.shopper_configuration.modifyGETResponse` hook. This is useful for adding custom site preferences to the response.\n\n```javascript\nexports.modifyGETResponse = function (configResp) {\n var customPreference = dw.system.Site.getCurrent().getCustomPreferenceValue(\n \"customerServiceEmail\"\n );\n configResp.c_customPrefs = {\n customerServiceEmail: customPreference || \"noreply@example.com\"\n };\n};\n```\n\nFor details on hook registration, see [Hook Method Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/hook-method-details.html). For general information on hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Response Details\n\n### Personalization\n\nResponses from this API are not personalized via the Shopper Context API.\n\n### Caching\n\nCaching is provided for this API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n### Timeouts\n\nShopper API requests must respond within 10 seconds, including any hook execution. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)\n\n## Use Cases\n\n### Get Site Configuration\n\nRetrieve site and global configuration settings (name, status, currencies, locales, feature flags).\n\n```sh\ncurl \"https://{shortCode}.api.commercecloud.salesforce.com/configuration/shopper-configurations/v1/organizations/{organizationId}/configurations?siteId=RefArch\" \\\n -H \"Authorization: Bearer {access_token}\"\n```\n\n\n### Site Identification and Availability\n\nRetrieve the site's display name and current operational status to determine if the storefront is online, offline, or in a maintenance state for shoppers.\n\n### Currency Configuration\n\nIdentify the default currency for the site and the list of all supported currencies to ensure correct price rendering and multi-currency support.\n\n### Locale and Language Settings\n\nAccess the default locale and the full set of supported locales to localize content, formatting, and language for the shopper's specific region.\n\n### Feature Enablement\n\nView the status of various storefront features and toggles to dynamically enable or disable application logic based on the merchant's active configuration.",
6
+ "version": "1.4.2",
6
7
  "x-api-type": "Shopper",
7
8
  "x-api-family": "Configuration"
8
9
  },
@@ -11,6 +12,7 @@
11
12
  "url": "https://{shortCode}.api.commercecloud.salesforce.com/configuration/shopper-configurations/v1",
12
13
  "variables": {
13
14
  "shortCode": {
15
+ "description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
14
16
  "default": "shortCode"
15
17
  }
16
18
  }
@@ -19,56 +21,55 @@
19
21
  "paths": {
20
22
  "/organizations/{organizationId}/configurations": {
21
23
  "get": {
24
+ "summary": "Retrieves configurations",
25
+ "description": "Retrieves configurations for the specified organization and site.",
22
26
  "operationId": "getConfigurations",
23
27
  "parameters": [
24
28
  {
25
29
  "name": "organizationId",
26
30
  "in": "path",
31
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
27
32
  "required": true,
28
33
  "style": "simple",
29
34
  "explode": false,
30
35
  "schema": {
31
36
  "$ref": "#/components/schemas/OrganizationId"
32
- }
37
+ },
38
+ "example": "f_ecom_zzxy_prd"
33
39
  },
34
40
  {
35
41
  "name": "siteId",
36
42
  "in": "query",
43
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
37
44
  "required": true,
38
45
  "style": "form",
39
46
  "explode": true,
40
47
  "schema": {
41
48
  "$ref": "#/components/schemas/SiteId"
49
+ },
50
+ "examples": {
51
+ "SiteId": {
52
+ "value": "RefArch"
53
+ }
42
54
  }
43
55
  },
44
56
  {
45
57
  "name": "sfdc_usid",
46
58
  "in": "header",
59
+ "description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
47
60
  "required": false,
48
61
  "style": "simple",
49
62
  "explode": false,
50
63
  "schema": {
51
64
  "type": "string",
52
- "format": "uuid"
53
- }
54
- },
55
- {
56
- "name": "sfdc_dw_dnt",
57
- "in": "header",
58
- "required": false,
59
- "style": "simple",
60
- "explode": false,
61
- "schema": {
62
- "type": "string",
63
- "enum": [
64
- "0",
65
- "1"
66
- ]
65
+ "format": "uuid",
66
+ "example": "550e8400-e29b-41d4-a716-446655440000"
67
67
  }
68
68
  },
69
69
  {
70
70
  "name": "personalized",
71
71
  "in": "query",
72
+ "description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
72
73
  "required": false,
73
74
  "style": "form",
74
75
  "explode": true,
@@ -76,12 +77,14 @@
76
77
  "type": "string",
77
78
  "enum": [
78
79
  "none"
79
- ]
80
+ ],
81
+ "example": "none"
80
82
  }
81
83
  },
82
84
  {
83
85
  "name": "sfdc_shopper_context",
84
86
  "in": "header",
87
+ "description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
85
88
  "required": false,
86
89
  "style": "simple",
87
90
  "explode": false,
@@ -97,6 +100,11 @@
97
100
  "application/json": {
98
101
  "schema": {
99
102
  "$ref": "#/components/schemas/SiteConfiguration"
103
+ },
104
+ "examples": {
105
+ "ConfigurationsExample": {
106
+ "$ref": "#/components/examples/ConfigurationsExample"
107
+ }
100
108
  }
101
109
  }
102
110
  }
@@ -107,6 +115,11 @@
107
115
  "application/json": {
108
116
  "schema": {
109
117
  "$ref": "#/components/schemas/ErrorResponse"
118
+ },
119
+ "examples": {
120
+ "getShopperConfigurations400": {
121
+ "$ref": "#/components/examples/BadRequest"
122
+ }
110
123
  }
111
124
  }
112
125
  }
@@ -117,6 +130,11 @@
117
130
  "application/json": {
118
131
  "schema": {
119
132
  "$ref": "#/components/schemas/ErrorResponse"
133
+ },
134
+ "examples": {
135
+ "getShopperConfigurations401": {
136
+ "$ref": "#/components/examples/Unauthorized"
137
+ }
120
138
  }
121
139
  }
122
140
  }
@@ -127,6 +145,11 @@
127
145
  "application/json": {
128
146
  "schema": {
129
147
  "$ref": "#/components/schemas/ErrorResponse"
148
+ },
149
+ "examples": {
150
+ "getShopperConfigurations404": {
151
+ "$ref": "#/components/examples/NotFound"
152
+ }
130
153
  }
131
154
  }
132
155
  }
@@ -153,25 +176,36 @@
153
176
  "schemas": {
154
177
  "OrganizationId": {
155
178
  "type": "string",
179
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
180
+ "example": "f_ecom_zzxy_prd",
156
181
  "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
157
182
  },
158
183
  "SiteId": {
159
184
  "type": "string",
185
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites",
186
+ "example": "RefArch",
160
187
  "maxLength": 32,
161
188
  "minLength": 1
162
189
  },
163
190
  "Configuration": {
164
191
  "type": "object",
192
+ "description": "Configuration object",
165
193
  "properties": {
166
194
  "id": {
167
195
  "type": "string",
196
+ "description": "identifier",
197
+ "example": "SalesforcePaymentsAllowed",
168
198
  "maxLength": 255
169
199
  },
170
200
  "value": {
201
+ "description": "value for identifier",
202
+ "example": true,
171
203
  "maxLength": 255
172
204
  },
173
205
  "configurationType": {
174
206
  "type": "string",
207
+ "description": "type of configuration value",
208
+ "example": "globalConfiguration",
175
209
  "maxLength": 255
176
210
  }
177
211
  },
@@ -182,9 +216,11 @@
182
216
  },
183
217
  "SiteConfiguration": {
184
218
  "type": "object",
219
+ "description": "Site Configuration object",
185
220
  "properties": {
186
221
  "configurations": {
187
222
  "type": "array",
223
+ "description": "List configurations for the instance and site",
188
224
  "items": {
189
225
  "$ref": "#/components/schemas/Configuration"
190
226
  },
@@ -201,17 +237,25 @@
201
237
  "properties": {
202
238
  "title": {
203
239
  "type": "string",
240
+ "description": "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n",
241
+ "example": "You do not have enough credit",
204
242
  "maxLength": 256
205
243
  },
206
244
  "type": {
207
245
  "type": "string",
246
+ "description": "A URI reference [RFC3986] that identifies the\nproblem type. This specification encourages that, when\ndereferenced, it provide human-readable documentation for the\nproblem type (e.g., using HTML [W3C.REC-html5-20141028]). When\nthis member is not present, its value is assumed to be\n\"about:blank\". It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
247
+ "example": "NotEnoughMoney",
208
248
  "maxLength": 2048
209
249
  },
210
250
  "detail": {
211
- "type": "string"
251
+ "type": "string",
252
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
253
+ "example": "Your current balance is 30, but that costs 50"
212
254
  },
213
255
  "instance": {
214
256
  "type": "string",
257
+ "description": "A URI reference that identifies the specific\noccurrence of the problem. It may or may not yield further\ninformation if dereferenced. It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
258
+ "example": "/account/12345/msgs/abc",
215
259
  "maxLength": 2048
216
260
  }
217
261
  },
@@ -226,51 +270,48 @@
226
270
  "organizationId": {
227
271
  "name": "organizationId",
228
272
  "in": "path",
273
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
229
274
  "required": true,
230
275
  "style": "simple",
231
276
  "explode": false,
232
277
  "schema": {
233
278
  "$ref": "#/components/schemas/OrganizationId"
234
- }
279
+ },
280
+ "example": "f_ecom_zzxy_prd"
235
281
  },
236
282
  "siteId": {
237
283
  "name": "siteId",
238
284
  "in": "query",
285
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
239
286
  "required": true,
240
287
  "style": "form",
241
288
  "explode": true,
242
289
  "schema": {
243
290
  "$ref": "#/components/schemas/SiteId"
291
+ },
292
+ "examples": {
293
+ "SiteId": {
294
+ "value": "RefArch"
295
+ }
244
296
  }
245
297
  },
246
298
  "sfdcUsid": {
247
299
  "name": "sfdc_usid",
248
300
  "in": "header",
301
+ "description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
249
302
  "required": false,
250
303
  "style": "simple",
251
304
  "explode": false,
252
305
  "schema": {
253
306
  "type": "string",
254
- "format": "uuid"
255
- }
256
- },
257
- "sfdcDwDnt": {
258
- "name": "sfdc_dw_dnt",
259
- "in": "header",
260
- "required": false,
261
- "style": "simple",
262
- "explode": false,
263
- "schema": {
264
- "type": "string",
265
- "enum": [
266
- "0",
267
- "1"
268
- ]
307
+ "format": "uuid",
308
+ "example": "550e8400-e29b-41d4-a716-446655440000"
269
309
  }
270
310
  },
271
311
  "personalized": {
272
312
  "name": "personalized",
273
313
  "in": "query",
314
+ "description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
274
315
  "required": false,
275
316
  "style": "form",
276
317
  "explode": true,
@@ -278,12 +319,14 @@
278
319
  "type": "string",
279
320
  "enum": [
280
321
  "none"
281
- ]
322
+ ],
323
+ "example": "none"
282
324
  }
283
325
  },
284
326
  "sfdcShopperContext": {
285
327
  "name": "sfdc_shopper_context",
286
328
  "in": "header",
329
+ "description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
287
330
  "required": false,
288
331
  "style": "simple",
289
332
  "explode": false,
@@ -292,9 +335,131 @@
292
335
  }
293
336
  }
294
337
  },
338
+ "examples": {
339
+ "ConfigurationsExample": {
340
+ "value": {
341
+ "configurations": [
342
+ {
343
+ "id": "id",
344
+ "value": "RefArch",
345
+ "configurationType": "siteConfiguration"
346
+ },
347
+ {
348
+ "id": "name",
349
+ "value": "Ref Arch",
350
+ "configurationType": "siteConfiguration"
351
+ },
352
+ {
353
+ "id": "status",
354
+ "value": "online",
355
+ "configurationType": "siteConfiguration"
356
+ },
357
+ {
358
+ "id": "timezone",
359
+ "value": "Etc/UTC",
360
+ "configurationType": "siteConfiguration"
361
+ },
362
+ {
363
+ "id": "timezoneOffset",
364
+ "value": 0,
365
+ "configurationType": "siteConfiguration"
366
+ },
367
+ {
368
+ "id": "defaultCurrency",
369
+ "value": "USD",
370
+ "configurationType": "siteConfiguration"
371
+ },
372
+ {
373
+ "id": "allowedCurrencies",
374
+ "value": [
375
+ "USD",
376
+ "EUR"
377
+ ],
378
+ "configurationType": "siteConfiguration"
379
+ },
380
+ {
381
+ "id": "defaultLocale",
382
+ "value": "en-US",
383
+ "configurationType": "siteConfiguration"
384
+ },
385
+ {
386
+ "id": "allowedLocales",
387
+ "value": [
388
+ {
389
+ "id": "en-US",
390
+ "country": "US",
391
+ "default": true,
392
+ "displayCountry": "United States",
393
+ "displayLanguage": "English",
394
+ "displayName": "English (United States)",
395
+ "iso3Country": "USA",
396
+ "iso3Language": "eng",
397
+ "language": "en",
398
+ "name": "English (United States)"
399
+ },
400
+ {
401
+ "id": "en-CA",
402
+ "country": "CA",
403
+ "default": false,
404
+ "displayCountry": "Canada",
405
+ "displayLanguage": "English",
406
+ "displayName": "English (Canada)",
407
+ "iso3Country": "CAN",
408
+ "iso3Language": "eng",
409
+ "language": "en",
410
+ "name": "English (Canada)"
411
+ }
412
+ ],
413
+ "configurationType": "siteConfiguration"
414
+ },
415
+ {
416
+ "id": "SalesforcePaymentsAllowed",
417
+ "value": true,
418
+ "configurationType": "globalConfiguration"
419
+ },
420
+ {
421
+ "id": "gcp",
422
+ "value": "abc123",
423
+ "configurationType": "globalConfiguration"
424
+ }
425
+ ]
426
+ }
427
+ },
428
+ "BadRequest": {
429
+ "summary": "Bad Request Error",
430
+ "description": "Example of a 400 Bad Request error response",
431
+ "value": {
432
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
433
+ "title": "Bad Request",
434
+ "detail": "The request could not be processed due to invalid parameters.",
435
+ "correlationId": "12345678-1234-1234-1234-123456789012"
436
+ }
437
+ },
438
+ "Unauthorized": {
439
+ "summary": "Unauthorized Error",
440
+ "description": "Example of a 401 Unauthorized error response",
441
+ "value": {
442
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
443
+ "title": "Unauthorized",
444
+ "detail": "Your shopper JWT is invalid and cannot be used to identify the API client.",
445
+ "correlationId": "12345678-1234-1234-1234-123456789012"
446
+ }
447
+ },
448
+ "NotFound": {
449
+ "summary": "Not Found Error",
450
+ "description": "Example of a 404 Not Found error response",
451
+ "value": {
452
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found",
453
+ "title": "Not Found",
454
+ "detail": "Configuration not found for the specified organization and site.",
455
+ "correlationId": "12345678-1234-1234-1234-123456789012"
456
+ }
457
+ }
458
+ },
295
459
  "securitySchemes": {
296
460
  "ShopperToken": {
297
461
  "type": "oauth2",
462
+ "description": "Shopper token flow.\n",
298
463
  "flows": {
299
464
  "clientCredentials": {
300
465
  "tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
@@ -313,6 +478,7 @@
313
478
  },
314
479
  "ShopperClientContextToken": {
315
480
  "type": "oauth2",
481
+ "description": "ShopperClientContextToken is a separate security scheme used to track and validate client context information.\nIt is valid for Guest shoppers flows only using SLAS private clients. For registered shoppers, use existing ShopperToken flows.\nFor authentication details, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nThis token allows access to Shopper API endpoints for guest shoppers only.\n",
316
482
  "flows": {
317
483
  "clientCredentials": {
318
484
  "tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",