@salesforce/storefront-next-runtime 0.4.2 → 1.0.0-alpha.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 (60) hide show
  1. package/README.md +9 -3
  2. package/dist/config.d.ts +33 -221
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +34 -116
  5. package/dist/config.js.map +1 -1
  6. package/dist/data-store.d.ts +185 -15
  7. package/dist/data-store.d.ts.map +1 -1
  8. package/dist/data-store.js +412 -10
  9. package/dist/data-store.js.map +1 -1
  10. package/dist/design-data.d.ts +266 -62
  11. package/dist/design-data.d.ts.map +1 -1
  12. package/dist/design-data.js +399 -14
  13. package/dist/design-data.js.map +1 -1
  14. package/dist/design-mode.d.ts +3 -2
  15. package/dist/design-mode.d.ts.map +1 -1
  16. package/dist/design-react-core.d.ts +2 -2
  17. package/dist/events.d.ts +32 -6
  18. package/dist/events.d.ts.map +1 -1
  19. package/dist/i18n-client.d.ts.map +1 -1
  20. package/dist/i18n-client.js.map +1 -1
  21. package/dist/i18n.d.ts +1 -2
  22. package/dist/i18n.d.ts.map +1 -1
  23. package/dist/modeDetection.js +0 -18
  24. package/dist/modeDetection.js.map +1 -1
  25. package/dist/scapi.d.ts +2185 -466
  26. package/dist/scapi.d.ts.map +1 -1
  27. package/dist/scapi.js +1 -1
  28. package/dist/scapi.js.map +1 -1
  29. package/dist/schema.d.ts +17 -15
  30. package/dist/schema.d.ts.map +1 -1
  31. package/dist/site-context.d.ts +43 -27
  32. package/dist/site-context.d.ts.map +1 -1
  33. package/dist/site-context.js +2 -2
  34. package/dist/site-context2.js +41 -31
  35. package/dist/site-context2.js.map +1 -1
  36. package/dist/types.d.ts +19 -3
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/types2.d.ts +89 -63
  39. package/dist/types2.d.ts.map +1 -1
  40. package/package.json +1 -19
  41. package/dist/custom-global-preferences.d.ts +0 -20
  42. package/dist/custom-global-preferences.d.ts.map +0 -1
  43. package/dist/custom-global-preferences.js +0 -31
  44. package/dist/custom-global-preferences.js.map +0 -1
  45. package/dist/custom-site-preferences.d.ts +0 -20
  46. package/dist/custom-site-preferences.d.ts.map +0 -1
  47. package/dist/custom-site-preferences.js +0 -31
  48. package/dist/custom-site-preferences.js.map +0 -1
  49. package/dist/data-store-custom-global-preferences.d.ts +0 -2
  50. package/dist/data-store-custom-global-preferences.js +0 -6
  51. package/dist/data-store-custom-site-preferences.d.ts +0 -2
  52. package/dist/data-store-custom-site-preferences.js +0 -6
  53. package/dist/data-store-gcp-preferences.d.ts +0 -2
  54. package/dist/data-store-gcp-preferences.js +0 -6
  55. package/dist/gcp-preferences.d.ts +0 -52
  56. package/dist/gcp-preferences.d.ts.map +0 -1
  57. package/dist/gcp-preferences.js +0 -64
  58. package/dist/gcp-preferences.js.map +0 -1
  59. package/dist/utils.js +0 -90
  60. package/dist/utils.js.map +0 -1
package/dist/scapi.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scapi.js","names":["createClient","Request","operations","body: ErrorDetail","rawBody: string","queryString: string[]","tokenResult","result","headers: Record<string, string>","BASE_PATH","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","operations","globalParams: GlobalRequestParameters","globalParamsWithoutLocale: GlobalRequestParameters","createBaseClient","shopperBasketsV1Ops","shopperBasketsV2Ops","shopperConfigurationsOps","shopperConsentsOps","shopperContextOps","shopperCustomersOps","shopperExperienceOps","shopperGiftCertificatesOps","shopperLoginOps","shopperOrdersOps","shopperPaymentsOps","shopperProductsOps","shopperPromotionsOps","shopperSearchOps","shopperSeoOps","shopperStoresOps","workspaceOrgIdMiddleware: Middleware"],"sources":["../../../node_modules/.pnpm/openapi-fetch@0.15.0/node_modules/openapi-fetch/dist/index.mjs","../src/scapi-client/ApiError.ts","../src/scapi-client/AuthTokenInvalidError.ts","../src/scapi-client/constants.ts","../src/scapi-client/createClient.ts","../src/scapi-client/defaultQuerySerializer.ts","../src/scapi-client/auth/utils.ts","../src/scapi-client/auth/index.ts","../src/scapi-client/basket/index.ts","../src/workspace/index.ts","../src/scapi-client/generated/shopper-baskets-v1.operations.ts","../src/scapi-client/generated/shopper-baskets-v2.operations.ts","../src/scapi-client/generated/shopper-configurations-v1.operations.ts","../src/scapi-client/generated/shopper-consents-v1.operations.ts","../src/scapi-client/generated/shopper-context-v1.operations.ts","../src/scapi-client/generated/shopper-customers-v1.operations.ts","../src/scapi-client/generated/shopper-experience-v1.operations.ts","../src/scapi-client/generated/shopper-gift-certificates-v1.operations.ts","../src/scapi-client/generated/shopper-login-v1.operations.ts","../src/scapi-client/generated/shopper-orders-v1.operations.ts","../src/scapi-client/generated/shopper-payments-v1.operations.ts","../src/scapi-client/generated/shopper-products-v1.operations.ts","../src/scapi-client/generated/shopper-promotions-v1.operations.ts","../src/scapi-client/generated/shopper-search-v1.operations.ts","../src/scapi-client/generated/shopper-seo-v1.operations.ts","../src/scapi-client/generated/shopper-stores-v1.operations.ts","../src/scapi-client/createClients.ts"],"sourcesContent":["const PATH_PARAM_RE = /\\{[^{}]+\\}/g;\nconst supportsRequestInitExt = () => {\n return typeof process === \"object\" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;\n};\nfunction randomID() {\n return Math.random().toString(36).slice(2, 11);\n}\nfunction createClient(clientOptions) {\n let {\n baseUrl = \"\",\n Request: CustomRequest = globalThis.Request,\n fetch: baseFetch = globalThis.fetch,\n querySerializer: globalQuerySerializer,\n bodySerializer: globalBodySerializer,\n headers: baseHeaders,\n requestInitExt = void 0,\n ...baseOptions\n } = { ...clientOptions };\n requestInitExt = supportsRequestInitExt() ? requestInitExt : void 0;\n baseUrl = removeTrailingSlash(baseUrl);\n const globalMiddlewares = [];\n async function coreFetch(schemaPath, fetchOptions) {\n const {\n baseUrl: localBaseUrl,\n fetch = baseFetch,\n Request = CustomRequest,\n headers,\n params = {},\n parseAs = \"json\",\n querySerializer: requestQuerySerializer,\n bodySerializer = globalBodySerializer ?? defaultBodySerializer,\n body,\n middleware: requestMiddlewares = [],\n ...init\n } = fetchOptions || {};\n let finalBaseUrl = baseUrl;\n if (localBaseUrl) {\n finalBaseUrl = removeTrailingSlash(localBaseUrl) ?? baseUrl;\n }\n let querySerializer = typeof globalQuerySerializer === \"function\" ? globalQuerySerializer : createQuerySerializer(globalQuerySerializer);\n if (requestQuerySerializer) {\n querySerializer = typeof requestQuerySerializer === \"function\" ? requestQuerySerializer : createQuerySerializer({\n ...typeof globalQuerySerializer === \"object\" ? globalQuerySerializer : {},\n ...requestQuerySerializer\n });\n }\n const serializedBody = body === void 0 ? void 0 : bodySerializer(\n body,\n // Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:\n // bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,\n // the result of this ALSO sets the lowest-priority content-type header. So we re-merge below,\n // setting the content-type at the very beginning to be overwritten.\n // Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.\n mergeHeaders(baseHeaders, headers, params.header)\n );\n const finalHeaders = mergeHeaders(\n // with no body, we should not to set Content-Type\n serializedBody === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression\n serializedBody instanceof FormData ? {} : {\n \"Content-Type\": \"application/json\"\n },\n baseHeaders,\n headers,\n params.header\n );\n const finalMiddlewares = [...globalMiddlewares, ...requestMiddlewares];\n const requestInit = {\n redirect: \"follow\",\n ...baseOptions,\n ...init,\n body: serializedBody,\n headers: finalHeaders\n };\n let id;\n let options;\n let request = new Request(\n createFinalURL(schemaPath, { baseUrl: finalBaseUrl, params, querySerializer }),\n requestInit\n );\n let response;\n for (const key in init) {\n if (!(key in request)) {\n request[key] = init[key];\n }\n }\n if (finalMiddlewares.length) {\n id = randomID();\n options = Object.freeze({\n baseUrl: finalBaseUrl,\n fetch,\n parseAs,\n querySerializer,\n bodySerializer\n });\n for (const m of finalMiddlewares) {\n if (m && typeof m === \"object\" && typeof m.onRequest === \"function\") {\n const result = await m.onRequest({\n request,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Request) {\n request = result;\n } else if (result instanceof Response) {\n response = result;\n break;\n } else {\n throw new Error(\"onRequest: must return new Request() or Response() when modifying the request\");\n }\n }\n }\n }\n }\n if (!response) {\n try {\n response = await fetch(request, requestInitExt);\n } catch (error2) {\n let errorAfterMiddleware = error2;\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onError === \"function\") {\n const result = await m.onError({\n request,\n error: errorAfterMiddleware,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Response) {\n errorAfterMiddleware = void 0;\n response = result;\n break;\n }\n if (result instanceof Error) {\n errorAfterMiddleware = result;\n continue;\n }\n throw new Error(\"onError: must return new Response() or instance of Error\");\n }\n }\n }\n }\n if (errorAfterMiddleware) {\n throw errorAfterMiddleware;\n }\n }\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onResponse === \"function\") {\n const result = await m.onResponse({\n request,\n response,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (!(result instanceof Response)) {\n throw new Error(\"onResponse: must return new Response() when modifying the response\");\n }\n response = result;\n }\n }\n }\n }\n }\n if (response.status === 204 || request.method === \"HEAD\" || response.headers.get(\"Content-Length\") === \"0\") {\n return response.ok ? { data: void 0, response } : { error: void 0, response };\n }\n if (response.ok) {\n if (parseAs === \"stream\") {\n return { data: response.body, response };\n }\n return { data: await response[parseAs](), response };\n }\n let error = await response.text();\n try {\n error = JSON.parse(error);\n } catch {\n }\n return { error, response };\n }\n return {\n request(method, url, init) {\n return coreFetch(url, { ...init, method: method.toUpperCase() });\n },\n /** Call a GET endpoint */\n GET(url, init) {\n return coreFetch(url, { ...init, method: \"GET\" });\n },\n /** Call a PUT endpoint */\n PUT(url, init) {\n return coreFetch(url, { ...init, method: \"PUT\" });\n },\n /** Call a POST endpoint */\n POST(url, init) {\n return coreFetch(url, { ...init, method: \"POST\" });\n },\n /** Call a DELETE endpoint */\n DELETE(url, init) {\n return coreFetch(url, { ...init, method: \"DELETE\" });\n },\n /** Call a OPTIONS endpoint */\n OPTIONS(url, init) {\n return coreFetch(url, { ...init, method: \"OPTIONS\" });\n },\n /** Call a HEAD endpoint */\n HEAD(url, init) {\n return coreFetch(url, { ...init, method: \"HEAD\" });\n },\n /** Call a PATCH endpoint */\n PATCH(url, init) {\n return coreFetch(url, { ...init, method: \"PATCH\" });\n },\n /** Call a TRACE endpoint */\n TRACE(url, init) {\n return coreFetch(url, { ...init, method: \"TRACE\" });\n },\n /** Register middleware */\n use(...middleware) {\n for (const m of middleware) {\n if (!m) {\n continue;\n }\n if (typeof m !== \"object\" || !(\"onRequest\" in m || \"onResponse\" in m || \"onError\" in m)) {\n throw new Error(\"Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`\");\n }\n globalMiddlewares.push(m);\n }\n },\n /** Unregister middleware */\n eject(...middleware) {\n for (const m of middleware) {\n const i = globalMiddlewares.indexOf(m);\n if (i !== -1) {\n globalMiddlewares.splice(i, 1);\n }\n }\n }\n };\n}\nclass PathCallForwarder {\n constructor(client, url) {\n this.client = client;\n this.url = url;\n }\n GET = (init) => {\n return this.client.GET(this.url, init);\n };\n PUT = (init) => {\n return this.client.PUT(this.url, init);\n };\n POST = (init) => {\n return this.client.POST(this.url, init);\n };\n DELETE = (init) => {\n return this.client.DELETE(this.url, init);\n };\n OPTIONS = (init) => {\n return this.client.OPTIONS(this.url, init);\n };\n HEAD = (init) => {\n return this.client.HEAD(this.url, init);\n };\n PATCH = (init) => {\n return this.client.PATCH(this.url, init);\n };\n TRACE = (init) => {\n return this.client.TRACE(this.url, init);\n };\n}\nclass PathClientProxyHandler {\n constructor() {\n this.client = null;\n }\n // Assume the property is an URL.\n get(coreClient, url) {\n const forwarder = new PathCallForwarder(coreClient, url);\n this.client[url] = forwarder;\n return forwarder;\n }\n}\nfunction wrapAsPathBasedClient(coreClient) {\n const handler = new PathClientProxyHandler();\n const proxy = new Proxy(coreClient, handler);\n function Client() {\n }\n Client.prototype = proxy;\n const client = new Client();\n handler.client = client;\n return client;\n}\nfunction createPathBasedClient(clientOptions) {\n return wrapAsPathBasedClient(createClient(clientOptions));\n}\nfunction serializePrimitiveParam(name, value, options) {\n if (value === void 0 || value === null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n throw new Error(\n \"Deeply-nested arrays/objects aren\\u2019t supported. Provide your own `querySerializer()` to handle these.\"\n );\n }\n return `${name}=${options?.allowReserved === true ? value : encodeURIComponent(value)}`;\n}\nfunction serializeObjectParam(name, value, options) {\n if (!value || typeof value !== \"object\") {\n return \"\";\n }\n const values = [];\n const joiner = {\n simple: \",\",\n label: \".\",\n matrix: \";\"\n }[options.style] || \"&\";\n if (options.style !== \"deepObject\" && options.explode === false) {\n for (const k in value) {\n values.push(k, options.allowReserved === true ? value[k] : encodeURIComponent(value[k]));\n }\n const final2 = values.join(\",\");\n switch (options.style) {\n case \"form\": {\n return `${name}=${final2}`;\n }\n case \"label\": {\n return `.${final2}`;\n }\n case \"matrix\": {\n return `;${name}=${final2}`;\n }\n default: {\n return final2;\n }\n }\n }\n for (const k in value) {\n const finalName = options.style === \"deepObject\" ? `${name}[${k}]` : k;\n values.push(serializePrimitiveParam(finalName, value[k], options));\n }\n const final = values.join(joiner);\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${final}` : final;\n}\nfunction serializeArrayParam(name, value, options) {\n if (!Array.isArray(value)) {\n return \"\";\n }\n if (options.explode === false) {\n const joiner2 = { form: \",\", spaceDelimited: \"%20\", pipeDelimited: \"|\" }[options.style] || \",\";\n const final = (options.allowReserved === true ? value : value.map((v) => encodeURIComponent(v))).join(joiner2);\n switch (options.style) {\n case \"simple\": {\n return final;\n }\n case \"label\": {\n return `.${final}`;\n }\n case \"matrix\": {\n return `;${name}=${final}`;\n }\n // case \"spaceDelimited\":\n // case \"pipeDelimited\":\n default: {\n return `${name}=${final}`;\n }\n }\n }\n const joiner = { simple: \",\", label: \".\", matrix: \";\" }[options.style] || \"&\";\n const values = [];\n for (const v of value) {\n if (options.style === \"simple\" || options.style === \"label\") {\n values.push(options.allowReserved === true ? v : encodeURIComponent(v));\n } else {\n values.push(serializePrimitiveParam(name, v, options));\n }\n }\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${values.join(joiner)}` : values.join(joiner);\n}\nfunction createQuerySerializer(options) {\n return function querySerializer(queryParams) {\n const search = [];\n if (queryParams && typeof queryParams === \"object\") {\n for (const name in queryParams) {\n const value = queryParams[name];\n if (value === void 0 || value === null) {\n continue;\n }\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n search.push(\n serializeArrayParam(name, value, {\n style: \"form\",\n explode: true,\n ...options?.array,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n if (typeof value === \"object\") {\n search.push(\n serializeObjectParam(name, value, {\n style: \"deepObject\",\n explode: true,\n ...options?.object,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n search.push(serializePrimitiveParam(name, value, options));\n }\n }\n return search.join(\"&\");\n };\n}\nfunction defaultPathSerializer(pathname, pathParams) {\n let nextURL = pathname;\n for (const match of pathname.match(PATH_PARAM_RE) ?? []) {\n let name = match.substring(1, match.length - 1);\n let explode = false;\n let style = \"simple\";\n if (name.endsWith(\"*\")) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n if (name.startsWith(\".\")) {\n style = \"label\";\n name = name.substring(1);\n } else if (name.startsWith(\";\")) {\n style = \"matrix\";\n name = name.substring(1);\n }\n if (!pathParams || pathParams[name] === void 0 || pathParams[name] === null) {\n continue;\n }\n const value = pathParams[name];\n if (Array.isArray(value)) {\n nextURL = nextURL.replace(match, serializeArrayParam(name, value, { style, explode }));\n continue;\n }\n if (typeof value === \"object\") {\n nextURL = nextURL.replace(match, serializeObjectParam(name, value, { style, explode }));\n continue;\n }\n if (style === \"matrix\") {\n nextURL = nextURL.replace(match, `;${serializePrimitiveParam(name, value)}`);\n continue;\n }\n nextURL = nextURL.replace(match, style === \"label\" ? `.${encodeURIComponent(value)}` : encodeURIComponent(value));\n }\n return nextURL;\n}\nfunction defaultBodySerializer(body, headers) {\n if (body instanceof FormData) {\n return body;\n }\n if (headers) {\n const contentType = headers.get instanceof Function ? headers.get(\"Content-Type\") ?? headers.get(\"content-type\") : headers[\"Content-Type\"] ?? headers[\"content-type\"];\n if (contentType === \"application/x-www-form-urlencoded\") {\n return new URLSearchParams(body).toString();\n }\n }\n return JSON.stringify(body);\n}\nfunction createFinalURL(pathname, options) {\n let finalURL = `${options.baseUrl}${pathname}`;\n if (options.params?.path) {\n finalURL = defaultPathSerializer(finalURL, options.params.path);\n }\n let search = options.querySerializer(options.params.query ?? {});\n if (search.startsWith(\"?\")) {\n search = search.substring(1);\n }\n if (search) {\n finalURL += `?${search}`;\n }\n return finalURL;\n}\nfunction mergeHeaders(...allHeaders) {\n const finalHeaders = new Headers();\n for (const h of allHeaders) {\n if (!h || typeof h !== \"object\") {\n continue;\n }\n const iterator = h instanceof Headers ? h.entries() : Object.entries(h);\n for (const [k, v] of iterator) {\n if (v === null) {\n finalHeaders.delete(k);\n } else if (Array.isArray(v)) {\n for (const v2 of v) {\n finalHeaders.append(k, v2);\n }\n } else if (v !== void 0) {\n finalHeaders.set(k, v);\n }\n }\n }\n return finalHeaders;\n}\nfunction removeTrailingSlash(url) {\n if (url.endsWith(\"/\")) {\n return url.substring(0, url.length - 1);\n }\n return url;\n}\n\nexport { createFinalURL, createPathBasedClient, createQuerySerializer, createClient as default, defaultBodySerializer, defaultPathSerializer, mergeHeaders, randomID, removeTrailingSlash, serializeArrayParam, serializeObjectParam, serializePrimitiveParam, wrapAsPathBasedClient };\n//# sourceMappingURL=index.mjs.map\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @see https://datatracker.ietf.org/doc/html/rfc7807\n */\nexport interface ErrorDetail {\n /** A URI reference that identifies the problem type */\n type: string;\n /** A short, human-readable summary of the problem type */\n title: string;\n /** A human-readable explanation specific to this occurrence of the problem */\n detail: string;\n /** Additional properties that may be included in the error response */\n [key: string]: unknown;\n}\n\n/**\n * Custom error class for API errors\n *\n * This error is thrown when an API request returns a non-2xx status code.\n * It includes comprehensive information about the error including the parsed\n * and raw response bodies, headers, status code, and request details.\n *\n * The error body is always typed as ErrorDetail (RFC 7807), which matches\n * the standard error format used by Salesforce Commerce APIs. If the response\n * cannot be parsed as JSON, an empty ErrorDetail object is returned.\n *\n * @example\n * ```typescript\n * try {\n * const { data } = await client.getProduct({ params: { path: { id: 'invalid' } } });\n * } catch (error) {\n * if (error instanceof ApiError) {\n * console.log(error.status); // 404\n * console.log(error.statusText); // \"Not Found\"\n * console.log(error.body.title); // \"Product Not Found\" (always typed!)\n * console.log(error.body.detail); // Detailed error message (always typed!)\n * console.log(error.rawBody); // Raw response text\n * console.log(error.headers.get('content-type')); // Access headers\n * console.log(error.url); // Request URL\n * console.log(error.method); // HTTP method\n * }\n * }\n * ```\n */\nexport class ApiError extends Error {\n /**\n * HTTP status code (e.g., 404, 500)\n */\n readonly status: number;\n\n /**\n * HTTP status text (e.g., \"Not Found\", \"Internal Server Error\")\n */\n readonly statusText: string;\n\n /**\n * Response headers\n */\n readonly headers: Headers;\n\n /**\n * Parsed response body as ErrorDetail\n * Automatically parsed from JSON if the response is valid JSON.\n * If parsing fails, returns an empty ErrorDetail object with empty strings.\n */\n readonly body: ErrorDetail;\n\n /**\n * Raw response body as text\n * Useful for debugging when the body couldn't be parsed as JSON\n */\n readonly rawBody: string;\n\n /**\n * Request URL that caused the error\n */\n readonly url: string;\n\n /**\n * HTTP method used for the request (e.g., \"GET\", \"POST\")\n */\n readonly method: string;\n\n /**\n * Creates an ApiError instance\n *\n * @param options - Error details\n * @param options.status - HTTP status code\n * @param options.statusText - HTTP status message\n * @param options.headers - Response headers\n * @param options.body - Parsed response body as ErrorDetail\n * @param options.rawBody - Raw response body text\n * @param options.url - Request URL\n * @param options.method - HTTP method\n */\n constructor(options: {\n status: number;\n statusText: string;\n headers: Headers;\n body: ErrorDetail;\n rawBody: string;\n url: string;\n method: string;\n }) {\n // Create a descriptive error message\n const message = `API Error ${options.status}: ${options.statusText} (${options.method} ${options.url})`;\n super(message);\n\n this.name = 'ApiError';\n this.status = options.status;\n this.statusText = options.statusText;\n this.headers = options.headers;\n this.body = options.body;\n this.rawBody = options.rawBody;\n this.url = options.url;\n this.method = options.method;\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ApiError);\n }\n }\n\n /**\n * Returns a JSON representation of the error\n * Useful for logging and debugging\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n status: this.status,\n statusText: this.statusText,\n body: this.body,\n rawBody: this.rawBody,\n url: this.url,\n method: this.method,\n // Convert headers to a plain object for JSON serialization\n headers: Object.fromEntries(this.headers.entries()),\n };\n }\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class AuthTokenInvalidError extends Error {\n constructor(message = 'Access token is invalid or revoked') {\n super(message);\n this.name = 'AuthTokenInvalidError';\n }\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Path patterns for SLAS authentication endpoints.\n * These endpoints handle their own authentication (Basic auth, PKCE, etc.)\n * and should NOT have Bearer tokens auto-injected by middleware.\n *\n * Use with URL.pathname.includes() to check if a request targets a SLAS auth endpoint.\n *\n * @example\n * ```typescript\n * const isSlasAuthEndpoint = SLAS_AUTH_ENDPOINTS.some(path => url.pathname.includes(path));\n * if (isSlasAuthEndpoint) {\n * // Skip Bearer token injection - endpoint handles its own auth\n * return request;\n * }\n * ```\n */\nexport const SLAS_AUTH_ENDPOINTS = [\n '/oauth2/token',\n '/oauth2/authorize',\n '/oauth2/logout',\n '/oauth2/login',\n '/oauth2/passwordless',\n '/oauth2/password',\n '/oauth2/session-bridge',\n '/oauth2/trusted-agent',\n '/oauth2/trusted-system',\n '/oauth2/revoke',\n '/oauth2/introspect',\n] as const;\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Proxy client factory for operation-based API calls\n *\n * This module creates a proxied version of an openapi-fetch client that\n * allows calling operations by their operation name instead of using\n * HTTP methods and path strings.\n *\n * Example transformation:\n * Before: client.GET('/organizations/{organizationId}/categories', options)\n * After: client.getCategories(options)\n *\n * The proxy maintains full type safety and has minimal runtime overhead.\n */\nimport type { Client } from 'openapi-fetch';\nimport type { OperationMap, ProxyClient } from './proxy-types';\nimport { ApiError, type ErrorDetail } from './ApiError';\nimport { AuthTokenInvalidError } from './AuthTokenInvalidError';\nimport { SLAS_AUTH_ENDPOINTS } from './constants';\n\n/**\n * Optional hooks for client behavior.\n */\nexport interface CreateClientOptions {\n /** Callback invoked when an auth token is deemed invalid */\n onAuthTokenInvalid?: (response: Response) => void;\n}\n\n/**\n * Global request parameters that are automatically merged into every API call.\n *\n * When provided to createClient, these values will be merged into every\n * operation call, eliminating the need to pass them manually each time.\n */\nexport interface GlobalRequestParameters {\n /** Organization ID to merge into path parameters */\n organizationId: string;\n /** Site ID to merge into query parameters */\n siteId: string;\n /** Locale to merge into query parameters (optional) */\n locale?: string;\n}\n\n/**\n * Build request options by applying global request parameters as defaults.\n *\n * This function specifically places:\n * - organizationId into params.path\n * - siteId and locale into params.query\n *\n * Caller-provided values take precedence over global defaults, allowing\n * overrides when needed while reducing boilerplate for the common case.\n *\n * @param options - The options provided by the caller (may be undefined)\n * @param globalParams - The global request parameters containing organizationId, siteId, and locale\n * @returns Options with global values applied as defaults\n */\nfunction buildRequestOptions(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options: any,\n globalParams?: GlobalRequestParameters\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n if (!globalParams) return options;\n\n return {\n ...options,\n params: {\n ...options?.params,\n path: {\n organizationId: globalParams.organizationId, // Global default\n ...options?.params?.path, // Caller-provided overrides\n },\n query: {\n siteId: globalParams.siteId, // Global default\n ...(globalParams.locale ? { locale: globalParams.locale } : {}), // Global default (if provided)\n ...options?.params?.query, // Caller-provided overrides\n },\n },\n };\n}\n\nconst isSlasAuthResponse = (url: string): boolean => {\n try {\n const parsedUrl = new URL(url);\n return SLAS_AUTH_ENDPOINTS.some((path) => parsedUrl.pathname.includes(path));\n } catch {\n return SLAS_AUTH_ENDPOINTS.some((path) => url.includes(path));\n }\n};\n\n/**\n * Create a proxied client with operation methods\n *\n * This function wraps an openapi-fetch client with a JavaScript Proxy that\n * intercepts property access. When an operation method is called, it:\n *\n * 1. Looks up the operation in the operation map\n * 2. Extracts the HTTP method (m) and path (b + s)\n * 3. Reconstructs the full path from base + suffix\n * 4. Calls the appropriate client method with the path and options\n *\n * Operation format uses abbreviated keys for bundle size optimization:\n * - m: HTTP method (GET, POST, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * All other property accesses (like .use(), .eject(), etc.) are passed\n * through to the original client unchanged.\n *\n * @typeParam TClient - The openapi-fetch Client type\n * @typeParam TOperations - The operation map type\n *\n * @param client - The base openapi-fetch client instance\n * @param operations - The operation map object (generated at build time)\n * @param globalParams - Optional global request parameters to merge into every call (organizationId, siteId)\n * @returns A proxied client with operation methods\n *\n * @example\n * ```typescript\n * import createClient from 'openapi-fetch';\n * import { operations } from './generated/shopper-products-v1.operations';\n * import type { paths } from './generated/shopper-products-v1';\n *\n * const baseClient = createClient<paths>({ baseUrl: 'https://api.example.com' });\n *\n * // Without global params - caller must provide organizationId and siteId\n * const client = createClient(baseClient, operations);\n *\n * // With global params - organizationId and siteId are automatically merged\n * const clientWithGlobalParams = createClient(baseClient, operations, {\n * organizationId: 'f_ecom_xxx',\n * siteId: 'RefArch'\n * });\n *\n * // Now you can call operations without passing organizationId/siteId:\n * const response = await clientWithGlobalParams.getCategories({\n * params: {\n * query: { ids: ['root'] }\n * }\n * });\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createClient<TClient extends Client<any, any>, TOperations extends OperationMap>(\n client: TClient,\n operations: TOperations,\n globalParams?: GlobalRequestParameters,\n options?: CreateClientOptions\n): ProxyClient<TClient, TOperations> {\n // Create and return the proxy\n return new Proxy(client, {\n /**\n * Proxy get trap - intercepts property access\n *\n * When a property is accessed on the proxy client:\n * 1. Check if it's an operation method name\n * 2. If yes, return a function that calls the appropriate HTTP method\n * 3. If no, return the original client property\n *\n * @param target - The original client instance\n * @param prop - The property being accessed\n * @returns The property value or operation method function\n */\n get(target, prop) {\n // Check if this is an operation method\n if (typeof prop === 'string' && prop in operations) {\n const operationInfo = operations[prop];\n\n // Extract operation info with abbreviated keys\n // m: HTTP method, b: base path, s: suffix path\n const { m: method, b: base, s: suffix } = operationInfo;\n\n // Reconstruct the full path from base + suffix\n const path = base + suffix;\n\n // Return an async function that calls the HTTP method and handles errors\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return async function (this: any, callOptions?: any) {\n // Get the HTTP method function (GET, POST, etc.)\n const httpMethod = method.toUpperCase();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const clientMethod = (target as any)[httpMethod];\n\n if (typeof clientMethod !== 'function') {\n throw new Error(\n `Client method ${httpMethod} not found. This is likely a bug in the proxy client.`\n );\n }\n\n // Build request options with global params (organizationId, siteId) applied as defaults\n const mergedOptions = buildRequestOptions(callOptions, globalParams);\n\n // Call the HTTP method with the path and merged options\n // The path is bound, options are passed from the operation call\n // openapi-fetch returns { data, error, response }\n // Only pass options if they're defined (maintains backward compatibility)\n const result =\n mergedOptions !== undefined\n ? await clientMethod.call(target, path, mergedOptions)\n : await clientMethod.call(target, path);\n\n // If there's an error, throw ApiError with the parsed error from openapi-fetch\n if (result.error !== undefined) {\n const response = result.response;\n\n if (response.status === 401 && !isSlasAuthResponse(response.url)) {\n options?.onAuthTokenInvalid?.(response);\n throw new AuthTokenInvalidError();\n }\n\n // openapi-fetch has already parsed the response body into result.error\n // Don't try to clone/read the response again as the body is already consumed\n const parsedError = result.error;\n\n // Convert to ErrorDetail structure\n let body: ErrorDetail;\n if (\n parsedError &&\n typeof parsedError === 'object' &&\n 'type' in parsedError &&\n 'title' in parsedError &&\n 'detail' in parsedError\n ) {\n // Valid ErrorDetail response - use it directly\n body = parsedError as ErrorDetail;\n } else {\n // Non-ErrorDetail response (string, HTML, or other format)\n // Create a generic ErrorDetail with helpful defaults\n body = {\n type: 'Unknown Error',\n title: response.statusText || 'API Error',\n detail: `The API returned a ${response.status} error. See rawBody for details.`,\n };\n }\n\n // Try to stringify the error for rawBody\n let rawBody: string;\n try {\n rawBody = typeof parsedError === 'string' ? parsedError : JSON.stringify(parsedError);\n } catch {\n rawBody = String(parsedError);\n }\n\n // Throw a typed ApiError with all response details\n throw new ApiError({\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n body,\n rawBody,\n url: response.url,\n method: httpMethod,\n });\n }\n\n // On success, return { data, response } without the error property\n return {\n data: result.data,\n response: result.response,\n };\n };\n }\n\n // Only pass through middleware methods (use, eject)\n // All other properties (GET, POST, etc.) are intentionally hidden\n if (prop === 'use' || prop === 'eject') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const value = (target as any)[prop];\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n\n // Undefined for any other property access\n return undefined;\n },\n }) as ProxyClient<TClient, TOperations>;\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createQuerySerializer } from 'openapi-fetch';\n\n/**\n * Parameters that should use repeated format (explode: true)\n * e.g., refine=price=(0..10)&refine=c_refinementColor=green\n */\nconst EXPLODED_PARAMS = ['refine'];\n\n/**\n * Parameters that need automatic grouping by attribute ID\n * These parameters accept arrays like ['attrId=val1', 'attrId=val2', 'otherId=val3']\n * and group same attributes: ['attrId=val1|val2', 'otherId=val3']\n */\nconst GROUPED_PARAMS = ['refine'];\n\n/**\n * Groups refinement-style parameters by attribute ID\n * e.g., ['c_color=Black', 'c_color=Green', 'price=(0..20)']\n * => ['c_color=Black|Green', 'price=(0..20)']\n */\nfunction groupByAttribute(values: string[]): string[] {\n const groupMap = new Map<string, string[]>();\n\n for (const item of values) {\n const separatorIndex = item.indexOf('=');\n if (separatorIndex === -1) {\n // No separator found, keep as-is\n continue;\n }\n\n const attrId = item.substring(0, separatorIndex);\n const attrValue = item.substring(separatorIndex + 1);\n\n if (!groupMap.has(attrId)) {\n groupMap.set(attrId, []);\n }\n const attrValues = groupMap.get(attrId);\n if (attrValues) {\n attrValues.push(attrValue);\n }\n }\n\n return Array.from(groupMap.entries()).map(([attrId, attrValues]) => `${attrId}=${attrValues.join('|')}`);\n}\n\n/**\n * Default query serializer for Commerce Cloud APIs\n * - Most arrays use comma-separated format (explode: false)\n * e.g., expand=promotions,variations,prices\n * - Certain parameters use repeated format (explode: true)\n * e.g., refine=price=(0..10)&refine=c_refinementColor=green\n * - Some parameters are automatically grouped by attribute ID before serialization\n * e.g., ['c_color=Black', 'c_color=Green'] => 'c_color=Black|Green'\n */\nexport function defaultQuerySerializer(queryParams: Record<string, unknown>): string {\n if (!queryParams || typeof queryParams !== 'object') return '';\n\n const defaultSerializer = createQuerySerializer({\n array: { style: 'form', explode: false },\n });\n\n const explodedSerializer = createQuerySerializer({\n array: { style: 'form', explode: true },\n });\n\n const queryString: string[] = [];\n for (const [name, value] of Object.entries(queryParams)) {\n if (value === undefined || value === null) continue;\n\n let processedValue = value;\n\n // Apply grouping for parameters that need it\n if (GROUPED_PARAMS.includes(name) && Array.isArray(value)) {\n processedValue = groupByAttribute(value as string[]);\n }\n\n const serializer = EXPLODED_PARAMS.includes(name) ? explodedSerializer : defaultSerializer;\n const serialized = serializer({ [name]: processedValue });\n if (serialized) queryString.push(serialized);\n }\n return queryString.join('&');\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * PKCE and authentication utilities using native Web Crypto APIs.\n *\n * This module provides cryptographic utilities for OAuth 2.0 PKCE flow\n * without any external dependencies, using only native browser/Node.js APIs.\n */\n\n/**\n * Base64 URL-safe encoding of an ArrayBuffer.\n * Converts standard base64 to URL-safe format by replacing +/= characters.\n *\n * @param buffer - The ArrayBuffer to encode\n * @returns URL-safe base64 encoded string\n */\nexport function base64UrlEncode(buffer: ArrayBuffer): string {\n const bytes = new Uint8Array(buffer);\n let binary = '';\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n const base64 = btoa(binary);\n // Convert to URL-safe base64\n return base64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n}\n\n/**\n * Creates a cryptographically secure random code verifier for PKCE.\n *\n * Uses native Web Crypto API (crypto.getRandomValues) which provides\n * cryptographically secure random values. The output is 128 characters\n * using URL-safe alphabet (A-Za-z0-9-_).\n *\n * @returns A 128-character URL-safe random string suitable for PKCE code_verifier\n */\nexport function createCodeVerifier(): string {\n const URL_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n const randomBytes = new Uint8Array(128);\n crypto.getRandomValues(randomBytes);\n\n let result = '';\n for (let i = 0; i < randomBytes.length; i++) {\n result += URL_ALPHABET[randomBytes[i] % URL_ALPHABET.length];\n }\n return result;\n}\n\n/**\n * Generates a code challenge from a code verifier using SHA-256.\n *\n * Uses native Web Crypto API (crypto.subtle.digest) to hash the verifier.\n * The result is base64url encoded without padding.\n *\n * @param codeVerifier - The code verifier to hash\n * @returns Promise resolving to the base64url-encoded SHA-256 hash\n * @throws Error if code challenge generation fails\n */\nexport async function generateCodeChallenge(codeVerifier: string): Promise<string> {\n const encoder = new TextEncoder();\n const data = encoder.encode(codeVerifier);\n const digest = await crypto.subtle.digest('SHA-256', data);\n const challenge = base64UrlEncode(digest);\n\n if (challenge.length === 0) {\n throw new Error('Problem generating code challenge');\n }\n\n return challenge;\n}\n\n/**\n * Parse out the code and usid from a redirect URL.\n *\n * @param urlString - A URL that contains `code` and `usid` query parameters,\n * typically returned when calling a Shopper Login endpoint\n * @returns An object containing the code and usid\n */\nexport function getCodeAndUsidFromUrl(urlString: string): { code: string; usid: string } {\n const url = new URL(urlString);\n const urlParams = new URLSearchParams(url.search);\n const usid = urlParams.get('usid') ?? '';\n const code = urlParams.get('code') ?? '';\n\n return { code, usid };\n}\n\n/**\n * Creates a Basic Authentication header value from client credentials.\n *\n * @param clientId - The client ID\n * @param clientSecret - The client secret\n * @returns The Basic auth header value (e.g., \"Basic base64encoded...\")\n */\nexport function createBasicAuthHeader(clientId: string, clientSecret: string): string {\n const credentials = `${clientId}:${clientSecret}`;\n const encoded = btoa(credentials);\n return `Basic ${encoded}`;\n}\n\n/**\n * Extract a cookie value from the Set-Cookie response header.\n *\n * @param response - The fetch Response object\n * @param cookieName - The name of the cookie to extract\n * @returns The cookie value if found, undefined otherwise\n *\n * @example\n * ```typescript\n * const dwsid = extractCookieFromResponse(response, 'dwsid');\n * ```\n */\nexport function extractCookieFromResponse(response: Response, cookieName: string): string | undefined {\n // Headers.get() is case-insensitive per the Fetch API spec\n // (handles Set-Cookie, set-cookie, SET-COOKIE, etc.)\n const setCookieHeader = response.headers.get('set-cookie');\n if (!setCookieHeader) return undefined;\n\n // Parse Set-Cookie header for the specified cookie (format: \"name=value; Path=/; ...\")\n const regex = new RegExp(`${cookieName}=([^;]+)`);\n const match = setCookieHeader.match(regex);\n return match?.[1];\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n AuthConfig,\n AuthNamespace,\n AuthResponse,\n TokenResponse,\n RawTokenResult,\n LoginAsGuestOptions,\n LoginWithCredentialsOptions,\n RefreshTokenOptions,\n LogoutOptions,\n PasswordlessAuthorizeOptions,\n PasswordlessExchangeTokenOptions,\n PasswordRequestResetOptions,\n PasswordResetOptions,\n SocialGetAuthorizationUrlOptions,\n SocialAuthorizationUrlResult,\n SocialExchangeCodeOptions,\n} from './types';\nimport {\n createCodeVerifier,\n generateCodeChallenge,\n getCodeAndUsidFromUrl,\n createBasicAuthHeader,\n extractCookieFromResponse,\n} from './utils';\n\n// Content-Type header for form-urlencoded endpoints (required by openapi-fetch for proper serialization)\nconst FORM_URLENCODED_HEADER = { 'Content-Type': 'application/x-www-form-urlencoded' };\n\n// Cookie name for DemandWare Session ID (used for hybrid storefront session bridge)\nconst COOKIE_DWSID = 'dwsid';\n\n// Re-export types for convenience\nexport type { AuthConfig, AuthNamespace, AuthResponse, TokenResponse, PasswordActionMode } from './types';\nexport type { LoginAsGuestOptions, LoginWithCredentialsOptions, RefreshTokenOptions, LogoutOptions } from './types';\nexport type { PasswordlessAuthorizeOptions, PasswordlessExchangeTokenOptions } from './types';\nexport type { PasswordRequestResetOptions, PasswordResetOptions } from './types';\nexport type {\n SocialGetAuthorizationUrlOptions,\n SocialAuthorizationUrlResult,\n SocialExchangeCodeOptions,\n} from './types';\n\n/**\n * Creates the auth helpers namespace.\n *\n * This factory function creates an auth namespace with methods for:\n * - Guest login (public or private SLAS client)\n * - Registered user login with credentials\n * - Token refresh\n * - Logout\n *\n * @param config - Configuration containing the ShopperLogin client and auth parameters\n * @returns The auth namespace with all authentication methods\n *\n * @example\n * ```typescript\n * const auth = createAuthHelpers({\n * shopperLoginClient: clients.shopperLogin,\n * clientId: 'your-client-id',\n * clientSecret: process.env.SLAS_SECRET, // optional, for private client\n * redirectUri: 'https://example.com/callback',\n * organizationId: 'f_ecom_xxx',\n * siteId: 'RefArch',\n * });\n *\n * const tokens = await auth.loginAsGuest();\n * ```\n */\nexport function createAuthHelpers(config: AuthConfig): AuthNamespace {\n const { shopperLoginClient, clientId, clientSecret, redirectUri, siteId, baseUrl, organizationId, proxyHost } =\n config;\n\n const isPrivateClient = !!clientSecret;\n\n /**\n * Adds the dwsid value to TokenResponse (extracted from Set-Cookie header).\n */\n function addDwsidToTokenData(result: RawTokenResult): AuthResponse {\n const dwsid = extractCookieFromResponse(result.response, COOKIE_DWSID);\n return { ...result.data, dwsid };\n }\n\n /**\n * Guest login using client_credentials grant.\n * Used for private SLAS clients (with clientSecret) and workspace environments.\n * Authorization header is included only when clientSecret is available.\n */\n async function loginGuestClientCredentials(options: LoginAsGuestOptions = {}): Promise<RawTokenResult> {\n const { usid, dnt } = options;\n\n const result = await shopperLoginClient.getAccessToken({\n params: {\n ...(clientSecret && {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n }),\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'client_credentials',\n channel_id: siteId,\n ...(usid && { usid }),\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return { data: result.data, response: result.response };\n }\n\n /**\n * Guest login for public SLAS client using PKCE flow.\n */\n async function loginGuestPublic(options: LoginAsGuestOptions = {}): Promise<RawTokenResult> {\n const { usid, dnt } = options;\n\n // Step 1: Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n // Step 2: Call authorize endpoint to get authorization code\n // The authorizeCustomer endpoint returns a 303 redirect with code and usid\n // IMPORTANT: Use redirect: 'manual' to prevent fetch from following the redirect\n // Otherwise, fetch would follow the redirect to our callback URL, triggering\n // the auth middleware again and causing an infinite loop\n const authorizeResult = await shopperLoginClient.authorizeCustomer({\n params: {\n query: {\n client_id: clientId,\n channel_id: siteId,\n redirect_uri: redirectUri,\n response_type: 'code',\n hint: 'guest',\n code_challenge: codeChallenge,\n ...(usid && { usid }),\n },\n },\n redirect: 'manual',\n });\n\n // Extract code and usid from the Location header (since we used redirect: 'manual')\n const redirectUrl = authorizeResult.response.headers.get('location') || '';\n const { code, usid: returnedUsid } = getCodeAndUsidFromUrl(redirectUrl);\n\n if (!code) {\n throw new Error('Failed to get authorization code from guest login');\n }\n\n // Step 3: Exchange authorization code for tokens\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'authorization_code_pkce',\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: redirectUri,\n usid: returnedUsid,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return { data: tokenResult.data, response: tokenResult.response };\n }\n\n return {\n /**\n * Login as a guest user.\n * Automatically uses the appropriate flow based on configuration:\n * - Private client or workspace (clientSecret or proxyHost set): client_credentials grant\n * - Public client: PKCE flow\n */\n loginAsGuest: async (options: LoginAsGuestOptions = {}): Promise<AuthResponse> => {\n const result =\n proxyHost || isPrivateClient\n ? await loginGuestClientCredentials(options)\n : await loginGuestPublic(options);\n return addDwsidToTokenData(result);\n },\n\n /**\n * Login with username and password credentials.\n * Uses the B2C registered user login flow with PKCE.\n */\n loginWithCredentials: async (credentials: LoginWithCredentialsOptions): Promise<AuthResponse> => {\n const { username, password, usid, dnt } = credentials;\n\n // Step 1: Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n // Step 2: Authenticate customer with username/password\n // This returns a 303 redirect with authorization code\n // IMPORTANT: Use redirect: 'manual' to prevent fetch from following the redirect\n // Note: Authorization goes in params.header (OpenAPI-defined), Content-Type in headers (request-level)\n const authResult = await shopperLoginClient.authenticateCustomer({\n params: {\n header: {\n Authorization: `Basic ${btoa(`${username}:${password}`)}`,\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n client_id: clientId,\n channel_id: siteId,\n redirect_uri: redirectUri,\n response_type: 'code',\n code_challenge: codeChallenge,\n ...(usid && { usid }),\n },\n redirect: 'manual',\n });\n\n // Extract code and usid from the Location header (since we used redirect: 'manual')\n const redirectUrl = authResult.response.headers.get('location') || '';\n const { code, usid: returnedUsid } = getCodeAndUsidFromUrl(redirectUrl);\n\n if (!code) {\n throw new Error('Failed to get authorization code from credentials login');\n }\n\n // Step 3: Exchange authorization code for tokens\n const tokenBody = {\n grant_type: 'authorization_code_pkce' as const,\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: redirectUri,\n usid: returnedUsid,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n }\n\n // For public client, no auth header needed\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n },\n\n /**\n * Refresh an access token using a refresh token.\n */\n refreshToken: async (options: RefreshTokenOptions): Promise<AuthResponse> => {\n const { refreshToken, dnt } = options;\n\n const body = {\n grant_type: 'refresh_token' as const,\n refresh_token: refreshToken,\n client_id: clientId,\n channel_id: siteId,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const result = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body,\n });\n return addDwsidToTokenData({ data: result.data, response: result.response });\n }\n\n // For public client, no auth header needed\n const result = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body,\n });\n return addDwsidToTokenData({ data: result.data, response: result.response });\n },\n\n /**\n * Logout a shopper and revoke tokens.\n */\n logout: async (options: LogoutOptions): Promise<TokenResponse> => {\n const { accessToken, refreshToken } = options;\n\n const result = await shopperLoginClient.logoutCustomer({\n params: {\n header: {\n Authorization: `Bearer ${accessToken}`,\n },\n query: {\n client_id: clientId,\n channel_id: siteId,\n refresh_token: refreshToken,\n },\n },\n });\n\n return result.data;\n },\n\n /**\n * Social/IDP login namespace.\n * Provides methods for social login via Google, Facebook, Apple, etc.\n */\n social: {\n getAuthorizationUrl: async (\n options: SocialGetAuthorizationUrlOptions\n ): Promise<SocialAuthorizationUrlResult> => {\n const { hint, redirectUri: overrideRedirectUri, usid } = options;\n\n // Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n const effectiveRedirectUri = overrideRedirectUri || redirectUri;\n\n // Construct the full authorization URL by appending to the baseUrl.\n // The baseUrl may include a proxy path (e.g., '/mobify/proxy/api'), so we use\n // a relative path (no leading /) to ensure proper concatenation.\n const normalizedBaseUrl = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;\n const authorizePath = `shopper/auth/v1/organizations/${organizationId}/oauth2/authorize`;\n const authorizeUrl = new URL(authorizePath, normalizedBaseUrl);\n\n authorizeUrl.searchParams.set('client_id', clientId);\n authorizeUrl.searchParams.set('channel_id', siteId);\n authorizeUrl.searchParams.set('redirect_uri', effectiveRedirectUri);\n authorizeUrl.searchParams.set('response_type', 'code');\n authorizeUrl.searchParams.set('hint', hint);\n authorizeUrl.searchParams.set('code_challenge', codeChallenge);\n if (usid) {\n authorizeUrl.searchParams.set('usid', usid);\n }\n\n return {\n url: authorizeUrl.toString(),\n codeVerifier,\n };\n },\n\n exchangeCode: async (options: SocialExchangeCodeOptions): Promise<AuthResponse> => {\n const { code, codeVerifier, redirectUri: callbackRedirectUri, usid, dnt } = options;\n\n const tokenBody = {\n grant_type: 'authorization_code_pkce' as const,\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: callbackRedirectUri,\n ...(usid && { usid }),\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n }\n\n // For public client, no auth header needed\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n },\n },\n\n /**\n * Passwordless login namespace.\n * Only available when clientSecret is configured (private SLAS client).\n */\n passwordless: {\n authorize: async (options: PasswordlessAuthorizeOptions) => {\n const {\n userId,\n callbackUri,\n usid,\n mode = 'email',\n locale,\n registerCustomer,\n lastName,\n email,\n firstName,\n phoneNumber,\n customerNo,\n } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for passwordless login');\n }\n\n if (mode === 'callback' && !callbackUri) {\n throw new Error('callbackUri is required for callback mode');\n }\n\n const requestBody = {\n user_id: userId,\n mode,\n channel_id: siteId,\n ...(mode === 'callback' && callbackUri && { callback_uri: callbackUri }),\n ...(usid && { usid }),\n ...(locale && { locale }),\n ...(registerCustomer && lastName && { last_name: lastName }),\n ...(registerCustomer && email && { email }),\n ...(registerCustomer && firstName && { first_name: firstName }),\n ...(phoneNumber && { phone_number: phoneNumber }),\n ...(customerNo && { customer_no: customerNo }),\n };\n\n return shopperLoginClient.authorizePasswordlessCustomer({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n ...(registerCustomer === true && {\n query: {\n register_customer: 'true',\n },\n }),\n },\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n },\n\n exchangeToken: async (options: PasswordlessExchangeTokenOptions): Promise<AuthResponse> => {\n const { pwdlessLoginToken, usid, dnt } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for passwordless token exchange');\n }\n\n const codeVerifier = createCodeVerifier();\n\n const result = await shopperLoginClient.getPasswordLessAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'client_credentials' as const,\n hint: 'pwdless_login',\n pwdless_login_token: pwdlessLoginToken,\n code_verifier: codeVerifier,\n ...(usid && { usid }),\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return addDwsidToTokenData({ data: result.data, response: result.response });\n },\n },\n\n /**\n * Password management namespace.\n */\n password: {\n requestReset: async (options: PasswordRequestResetOptions) => {\n const { userId, callbackUri, mode = 'email', locale, codeChallenge, hint = 'cross_device' } = options;\n\n if (mode === 'callback' && !callbackUri) {\n throw new Error('callbackUri is required when mode is \"callback\"');\n }\n\n const headers: Record<string, string> = {\n ...FORM_URLENCODED_HEADER,\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n headers.Authorization = createBasicAuthHeader(clientId, clientSecret);\n }\n\n return shopperLoginClient.getPasswordResetToken({\n params: {},\n headers,\n body: {\n user_id: userId,\n mode,\n channel_id: siteId,\n client_id: clientId,\n ...(mode === 'callback' && callbackUri && { callback_uri: callbackUri }),\n hint,\n ...(locale && { locale }),\n ...(codeChallenge && { code_challenge: codeChallenge }),\n },\n });\n },\n\n reset: async (options: PasswordResetOptions) => {\n const { userId, token, newPassword, codeVerifier, hint = 'cross_device' } = options;\n\n const requestBody = {\n client_id: clientId,\n user_id: userId,\n pwd_action_token: token,\n new_password: newPassword,\n channel_id: siteId,\n hint,\n ...(codeVerifier && { code_verifier: codeVerifier }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n return shopperLoginClient.resetPassword({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n }\n\n return shopperLoginClient.resetPassword({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n },\n },\n };\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiError } from '../ApiError';\nimport type { Basket, BasketHelpersConfig, BasketHelpersNamespace, GetOrCreateBasketOptions } from './types';\n\nexport type {\n Basket,\n BasketHelpersConfig,\n BasketHelpersNamespace,\n GetOrCreateBasketOptions,\n ShopperBasketsV2Client,\n} from './types';\n\n/**\n * Get an existing basket or create a new one when missing/unavailable.\n *\n * Currency is passed via the basket request body (Shopper Baskets V2).\n *\n * @param config - Helper configuration containing the Shopper Baskets client\n * @param options - Basket identifiers and create options\n * @returns Basket instance (existing or newly created)\n *\n * @example\n * ```ts\n * const basketHelpers = createBasketHelpers({ shopperBasketsClient: clients.shopperBasketsV2 });\n * const basket = await basketHelpers.getOrCreateBasket({\n * params: { path: { basketId } },\n * body: { currency: 'USD' },\n * });\n * ```\n */\nexport function createBasketHelpers(config: BasketHelpersConfig): BasketHelpersNamespace {\n const { shopperBasketsClient } = config;\n\n /**\n * Get an existing basket or create a new one when missing/unavailable.\n *\n * @param options - Request options matching ShopperBasketsV2.getBasket style\n * @returns Basket instance (existing or newly created)\n *\n * @example\n * ```ts\n * const basketHelpers = createBasketHelpers({ shopperBasketsClient: clients.shopperBasketsV2 });\n * const basket = await basketHelpers.getOrCreateBasket({\n * params: { path: { basketId } },\n * body: { currency: 'USD' },\n * });\n * ```\n */\n async function getOrCreateBasket(options: GetOrCreateBasketOptions): Promise<Basket> {\n const basketId = options.params?.path?.basketId;\n const currency = options.body.currency;\n\n const createBasket = async (): Promise<Basket> => {\n try {\n const { data } = await shopperBasketsClient.createBasket({\n params: {\n query: {\n populateCustomerDetails: true,\n },\n },\n body: { currency },\n });\n return data;\n } catch (error) {\n if (error instanceof ApiError) {\n const basketIds = error.body?.basketIds;\n const fallbackId = (Array.isArray(basketIds) ? basketIds : [basketIds].filter(Boolean)).at(0);\n // Quota exceeded sometimes returns 429 (or 400) with basketIds; reuse the provided basket if present.\n if ((error.status === 429 || error.status === 400) && fallbackId) {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId: fallbackId as string } },\n });\n return data;\n }\n }\n throw error;\n }\n };\n\n if (basketId) {\n try {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId } },\n });\n return data;\n } catch (error) {\n if (error instanceof ApiError) {\n // Not found or bad request -> create a fresh basket.\n if (error.status === 404 || error.status === 400) {\n return createBasket();\n }\n\n // Quota exceeded: API returns 429 with basketIds to reuse.\n const basketIds = error.body?.basketIds;\n const fallbackId = (Array.isArray(basketIds) ? basketIds : [basketIds].filter(Boolean)).at(0);\n if (error.status === 429 && fallbackId) {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId: fallbackId as string } },\n });\n return data;\n }\n }\n throw error;\n }\n }\n\n return createBasket();\n }\n\n return { getOrCreateBasket };\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Detects if the application is running in a Salesforce Workspace environment.\n *\n * Salesforce Workspaces set specific SFW_* environment variables that are only present\n * in workspace environments. This detection method is inspired by the ecom gradle build\n * which checks `environmentName == 'ws'`.\n *\n * The presence of these environment variables reliably indicates a workspace environment:\n * - SFW_FALCON_INSTANCE: The Falcon instance ID (e.g., 'aws-dev2-uswest2')\n * - SFW_SERVICE_INSTANCE: The service instance name\n * - SFW_LOCATION: The workspace location code\n *\n * @returns true if running in a Salesforce Workspace environment, false otherwise\n */\nexport function isWorkspaceEnvironment(): boolean {\n // Only check on server-side\n if (typeof window !== 'undefined') {\n return false;\n }\n\n // Check for Salesforce Workspace environment variables\n // These are only set when running in a workspace environment\n const hasSfwVars =\n !!process.env.SFW_FALCON_INSTANCE || !!process.env.SFW_SERVICE_INSTANCE || !!process.env.SFW_LOCATION;\n\n return hasSfwVars;\n}\n\n/**\n * Strips the 'f_ecom_' prefix from organization ID for SLAS authentication in workspace environments.\n *\n * In Salesforce Commerce Cloud Workspace (SCW) environments, organization IDs have different formats\n * depending on the API endpoint:\n * - SLAS auth endpoints: Use base organization ID without prefix (e.g., 'zzzz_s01')\n * - Product/Search APIs: Use full organization ID with prefix (e.g., 'f_ecom_zzzz_s01')\n *\n * @param orgId - The full organization ID (e.g., 'f_ecom_zzzz_s01')\n * @returns The base organization ID without prefix (e.g., 'zzzz_s01')\n */\nexport function getWorkspaceSlasOrgId(orgId: string): string {\n // Strip the 'f_ecom_' prefix if present\n return orgId.replace(/^f_ecom_/, '');\n}\n","/**\n * Auto-generated operation map for shopper-baskets-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1443 bytes\n * - Abbreviated keys: Saves ~481 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1924 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/baskets' as const;\n\nexport const operations = {\n createBasket: { m: 'POST' as const, b: BASE_PATH, s: '' },\n transferBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/transfer' },\n mergeBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/merge' },\n getBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}' },\n deleteBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}' },\n updateBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}' },\n updateAsAgentBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/agent' },\n updateBillingAddressForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/billing-address' },\n addCouponToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/coupons' },\n removeCouponFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/coupons/{couponItemId}' },\n updateCustomerForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/customer' },\n addGiftCertificateItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items' },\n removeGiftCertificateItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n updateGiftCertificateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n addItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/items' },\n updateItemsInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items' },\n removeItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n updateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n addTaxesForBasketItem: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}/taxes' },\n addPaymentInstrumentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments' },\n removePaymentInstrumentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/payment-methods' },\n addPriceAdjustmentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments' },\n removePriceAdjustmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n updatePriceAdjustmentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n getPriceBooksForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n addPriceBooksToBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n createShipmentForBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/shipments' },\n removeShipmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShipmentForBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShippingAddressForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-address' },\n updateShippingMethodForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-method' },\n getShippingMethodsForShipment: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-methods' },\n updateAsStorefrontBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/storefront' },\n getTaxesFromBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/taxes' },\n addTaxesForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-baskets-v2\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1443 bytes\n * - Abbreviated keys: Saves ~481 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1924 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/baskets' as const;\n\nexport const operations = {\n createBasket: { m: 'POST' as const, b: BASE_PATH, s: '' },\n transferBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/transfer' },\n mergeBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/merge' },\n getBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}' },\n deleteBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}' },\n updateBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}' },\n updateAsAgentBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/agent' },\n updateBillingAddressForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/billing-address' },\n addCouponToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/coupons' },\n removeCouponFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/coupons/{couponItemId}' },\n updateCustomerForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/customer' },\n addGiftCertificateItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items' },\n removeGiftCertificateItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n updateGiftCertificateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n addItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/items' },\n updateItemsInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items' },\n removeItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n updateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n addTaxesForBasketItem: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}/taxes' },\n addPaymentInstrumentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments' },\n removePaymentInstrumentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/payment-methods' },\n addPriceAdjustmentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments' },\n removePriceAdjustmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n updatePriceAdjustmentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n getPriceBooksForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n addPriceBooksToBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n createShipmentForBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/shipments' },\n removeShipmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShipmentForBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShippingAddressForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-address' },\n updateShippingMethodForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-method' },\n getShippingMethodsForShipment: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-methods' },\n updateAsStorefrontBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/storefront' },\n getTaxesFromBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/taxes' },\n addTaxesForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-configurations-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getConfigurations: { m: 'GET' as const, b: BASE_PATH, s: '/configurations' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-consents-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~135 bytes\n * - Abbreviated keys: Saves ~39 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~174 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/subscriptions' as const;\n\nexport const operations = {\n getSubscriptions: { m: 'GET' as const, b: BASE_PATH, s: '' },\n updateSubscription: { m: 'POST' as const, b: BASE_PATH, s: '' },\n updateSubscriptions: { m: 'POST' as const, b: BASE_PATH, s: '/actions/bulk' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-context-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~216 bytes\n * - Abbreviated keys: Saves ~52 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~268 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/shopper-context/{usid}' as const;\n\nexport const operations = {\n getShopperContext: { m: 'GET' as const, b: BASE_PATH, s: '' },\n createShopperContext: { m: 'PUT' as const, b: BASE_PATH, s: '' },\n deleteShopperContext: { m: 'DELETE' as const, b: BASE_PATH, s: '' },\n updateShopperContext: { m: 'PATCH' as const, b: BASE_PATH, s: '' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-customers-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~961 bytes\n * - Abbreviated keys: Saves ~403 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1364 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n registerCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/customers' },\n resetPassword: { m: 'POST' as const, b: BASE_PATH, s: '/customers/password/actions/reset' },\n getResetPasswordToken: { m: 'POST' as const, b: BASE_PATH, s: '/customers/password/actions/create-reset-token' },\n getExternalProfile: { m: 'GET' as const, b: BASE_PATH, s: '/customers/external-profile' },\n registerExternalProfile: { m: 'POST' as const, b: BASE_PATH, s: '/customers/external-profile' },\n getCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}' },\n updateCustomer: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}' },\n createCustomerAddress: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses' },\n getCustomerAddress: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n removeCustomerAddress: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n updateCustomerAddress: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n getCustomerBaskets: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/baskets' },\n getCustomerOrders: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/orders' },\n updateCustomerPassword: { m: 'PUT' as const, b: BASE_PATH, s: '/customers/{customerId}/password' },\n createCustomerPaymentInstrument: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments' },\n getCustomerPaymentInstrument: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n deleteCustomerPaymentInstrument: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n updateCustomerPaymentInstrument: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n getCustomerProductLists: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists' },\n createCustomerProductList: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists' },\n getCustomerProductList: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n deleteCustomerProductList: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n updateCustomerProductList: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n createCustomerProductListItem: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items' },\n getCustomerProductListItem: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n deleteCustomerProductListItem: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n updateCustomerProductListItem: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n getPublicProductListsBySearchTerm: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists' },\n getPublicProductList: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}' },\n getPublicProductListItems: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}/items' },\n getProductListItem: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}/items/{itemId}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-experience-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~248 bytes\n * - Abbreviated keys: Saves ~104 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~352 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getPages: { m: 'GET' as const, b: BASE_PATH, s: '/pages' },\n getPage: { m: 'GET' as const, b: BASE_PATH, s: '/pages/{pageId}' },\n getContent: { m: 'GET' as const, b: BASE_PATH, s: '/contents/{id}' },\n getMultipleContent: { m: 'GET' as const, b: BASE_PATH, s: '/contents' },\n searchContent: { m: 'GET' as const, b: BASE_PATH, s: '/content-search' },\n getContentFolder: { m: 'GET' as const, b: BASE_PATH, s: '/folders/{id}' },\n getContentFolders: { m: 'GET' as const, b: BASE_PATH, s: '/folders' },\n resolveQualifiers: { m: 'POST' as const, b: BASE_PATH, s: '/qualifiers/resolve' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-gift-certificates-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getGiftCertificate: { m: 'POST' as const, b: BASE_PATH, s: '/gift-certificate' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-login-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~836 bytes\n * - Abbreviated keys: Saves ~286 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1122 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/oauth2' as const;\n\nexport const operations = {\n authenticateCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/login' },\n authorizePasswordlessCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/passwordless/login' },\n logoutCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/logout' },\n authorizeCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/authorize' },\n getAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/token' },\n getSessionBridgeAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/session-bridge/token' },\n getTrustedSystemAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/trusted-system/token' },\n getTrustedAgentAuthorizationToken: { m: 'GET' as const, b: BASE_PATH, s: '/trusted-agent/authorize' },\n getTrustedAgentAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/trusted-agent/token' },\n getPasswordResetToken: { m: 'POST' as const, b: BASE_PATH, s: '/password/reset' },\n resetPassword: { m: 'POST' as const, b: BASE_PATH, s: '/password/action' },\n getPasswordLessAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/passwordless/token' },\n revokeToken: { m: 'POST' as const, b: BASE_PATH, s: '/revoke' },\n introspectToken: { m: 'POST' as const, b: BASE_PATH, s: '/introspect' },\n getUserInfo: { m: 'GET' as const, b: BASE_PATH, s: '/userinfo' },\n getWellknownOpenidConfiguration: { m: 'GET' as const, b: BASE_PATH, s: '/.well-known/openid-configuration' },\n getJwksUri: { m: 'GET' as const, b: BASE_PATH, s: '/jwks' },\n authorizeWebauthnRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/authorize' },\n startWebauthnUserRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/start' },\n finishWebauthnUserRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/finish' },\n startWebauthnAuthentication: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/authenticate/start' },\n finishWebauthnAuthentication: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/authenticate/finish' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-orders-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~342 bytes\n * - Abbreviated keys: Saves ~117 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~459 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/orders' as const;\n\nexport const operations = {\n createOrder: { m: 'POST' as const, b: BASE_PATH, s: '' },\n getOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}' },\n guestOrderLookup: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/lookup' },\n failOrder: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/actions/fail' },\n createPaymentInstrumentForOrder: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments' },\n removePaymentInstrumentFromOrder: { m: 'DELETE' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentForOrder: { m: 'PATCH' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}/payment-methods' },\n getTaxesFromOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-payments-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getPaymentConfiguration: { m: 'GET' as const, b: BASE_PATH, s: '/payment-configuration' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-products-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~124 bytes\n * - Abbreviated keys: Saves ~52 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~176 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getProducts: { m: 'GET' as const, b: BASE_PATH, s: '/products' },\n getProduct: { m: 'GET' as const, b: BASE_PATH, s: '/products/{id}' },\n getCategories: { m: 'GET' as const, b: BASE_PATH, s: '/categories' },\n getCategory: { m: 'GET' as const, b: BASE_PATH, s: '/categories/{id}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-promotions-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~84 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~110 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/promotions' as const;\n\nexport const operations = {\n getPromotions: { m: 'GET' as const, b: BASE_PATH, s: '' },\n getPromotionsForCampaign: { m: 'GET' as const, b: BASE_PATH, s: '/campaigns/{campaignId}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-search-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~62 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~88 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n productSearch: { m: 'GET' as const, b: BASE_PATH, s: '/product-search' },\n getSearchSuggestions: { m: 'GET' as const, b: BASE_PATH, s: '/search-suggestions' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-seo-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getUrlMapping: { m: 'GET' as const, b: BASE_PATH, s: '/url-mapping' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-stores-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~74 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~100 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/store' as const;\n\nexport const operations = {\n getStores: { m: 'GET' as const, b: BASE_PATH, s: 's' },\n searchStores: { m: 'GET' as const, b: BASE_PATH, s: '-search' }\n} as const;\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport createBaseClient, { type Middleware, type ClientOptions, type Client } from 'openapi-fetch';\nimport type {\n ShopperBasketsV1,\n ShopperBasketsV2,\n ShopperConfigurations,\n ShopperConsents,\n ShopperContext,\n ShopperCustomers,\n ShopperExperience,\n ShopperGiftCertificates,\n ShopperLogin,\n ShopperOrders,\n ShopperPayments,\n ShopperProducts,\n ShopperPromotions,\n ShopperSearch,\n ShopperSeo,\n ShopperStores,\n} from './types';\nimport { createClient, type GlobalRequestParameters } from './createClient';\nimport { defaultQuerySerializer } from './defaultQuerySerializer';\nimport type { ProxyClient } from './proxy-types';\nimport { createAuthHelpers, type AuthNamespace } from './auth';\nimport { createBasketHelpers, type BasketHelpersNamespace } from './basket';\nimport { SLAS_AUTH_ENDPOINTS } from './constants';\nimport { getWorkspaceSlasOrgId } from '../workspace';\n\n/**\n * Configuration for creating Commerce API clients.\n *\n * Extends openapi-fetch ClientOptions with required organizationId and siteId\n * which will be automatically merged into all API calls as global request parameters.\n */\nexport interface CommerceApiClientConfig extends ClientOptions {\n /** Base URL for Commerce API (required for building auth URLs) */\n baseUrl: string;\n /** Organization ID - automatically merged into path parameters */\n organizationId: string;\n /** Site ID - automatically merged into query parameters */\n siteId: string;\n /** Locale - automatically merged into query parameters (optional) */\n locale?: string;\n /** SLAS client ID - required for auth operations */\n clientId: string;\n /** SLAS client secret - required for private client auth operations */\n clientSecret?: string;\n /** OAuth redirect URI - must be registered in SLAS configuration */\n redirectUri: string;\n /** Optional callback when access token is invalidated */\n onAuthTokenInvalid?: (response: Response) => void;\n /**\n * Direct SCAPI proxy URL for workspace environments (e.g., 'https://scw:25010').\n * When set, the SDK automatically:\n * - Strips 'f_ecom_' prefix from organizationId for SLAS auth endpoints\n * - Rewrites org IDs back to full form for product/search API endpoints\n * - Uses client_credentials grant for guest login (no PKCE)\n */\n proxyHost?: string;\n}\n\n// Import operation maps for all APIs\nimport { operations as shopperBasketsV1Ops } from './generated/shopper-baskets-v1.operations';\nimport { operations as shopperBasketsV2Ops } from './generated/shopper-baskets-v2.operations';\nimport { operations as shopperConfigurationsOps } from './generated/shopper-configurations-v1.operations';\nimport { operations as shopperConsentsOps } from './generated/shopper-consents-v1.operations';\nimport { operations as shopperContextOps } from './generated/shopper-context-v1.operations';\nimport { operations as shopperCustomersOps } from './generated/shopper-customers-v1.operations';\nimport { operations as shopperExperienceOps } from './generated/shopper-experience-v1.operations';\nimport { operations as shopperGiftCertificatesOps } from './generated/shopper-gift-certificates-v1.operations';\nimport { operations as shopperLoginOps } from './generated/shopper-login-v1.operations';\nimport { operations as shopperOrdersOps } from './generated/shopper-orders-v1.operations';\nimport { operations as shopperPaymentsOps } from './generated/shopper-payments-v1.operations';\nimport { operations as shopperProductsOps } from './generated/shopper-products-v1.operations';\nimport { operations as shopperPromotionsOps } from './generated/shopper-promotions-v1.operations';\nimport { operations as shopperSearchOps } from './generated/shopper-search-v1.operations';\nimport { operations as shopperSeoOps } from './generated/shopper-seo-v1.operations';\nimport { operations as shopperStoresOps } from './generated/shopper-stores-v1.operations';\n\nexport type Clients = {\n shopperBasketsV1: ProxyClient<Client<ShopperBasketsV1.endpoints>, typeof shopperBasketsV1Ops>;\n shopperBasketsV2: ProxyClient<Client<ShopperBasketsV2.endpoints>, typeof shopperBasketsV2Ops>;\n shopperConfigurations: ProxyClient<Client<ShopperConfigurations.endpoints>, typeof shopperConfigurationsOps>;\n shopperConsents: ProxyClient<Client<ShopperConsents.endpoints>, typeof shopperConsentsOps>;\n shopperContext: ProxyClient<Client<ShopperContext.endpoints>, typeof shopperContextOps>;\n shopperCustomers: ProxyClient<Client<ShopperCustomers.endpoints>, typeof shopperCustomersOps>;\n shopperExperience: ProxyClient<Client<ShopperExperience.endpoints>, typeof shopperExperienceOps>;\n shopperGiftCertificates: ProxyClient<Client<ShopperGiftCertificates.endpoints>, typeof shopperGiftCertificatesOps>;\n shopperLogin: ProxyClient<Client<ShopperLogin.endpoints>, typeof shopperLoginOps>;\n shopperOrders: ProxyClient<Client<ShopperOrders.endpoints>, typeof shopperOrdersOps>;\n shopperPayments: ProxyClient<Client<ShopperPayments.endpoints>, typeof shopperPaymentsOps>;\n shopperProducts: ProxyClient<Client<ShopperProducts.endpoints>, typeof shopperProductsOps>;\n shopperPromotions: ProxyClient<Client<ShopperPromotions.endpoints>, typeof shopperPromotionsOps>;\n shopperSearch: ProxyClient<Client<ShopperSearch.endpoints>, typeof shopperSearchOps>;\n shopperSeo: ProxyClient<Client<ShopperSeo.endpoints>, typeof shopperSeoOps>;\n shopperStores: ProxyClient<Client<ShopperStores.endpoints>, typeof shopperStoresOps>;\n /** Authentication helpers for SLAS operations */\n auth: AuthNamespace;\n /** Basket helper utilities */\n basket: BasketHelpersNamespace;\n use: (middleware: Middleware) => void;\n};\n\nexport function createCommerceApiClients(config: CommerceApiClientConfig): Clients {\n const {\n baseUrl,\n fetch: customFetch,\n querySerializer,\n organizationId: rawOrganizationId,\n siteId,\n locale,\n clientId,\n clientSecret,\n redirectUri,\n onAuthTokenInvalid,\n proxyHost,\n ...rest\n } = config;\n\n // In workspace environments (proxyHost set), SLAS auth endpoints use the org ID\n // without the 'f_ecom_' prefix, but product/search APIs need the full org ID.\n // We pass the stripped org ID to the SDK and use middleware to rewrite for non-SLAS endpoints.\n const isWorkspace = !!proxyHost;\n const organizationId = isWorkspace ? getWorkspaceSlasOrgId(rawOrganizationId) : rawOrganizationId;\n\n // Validate required parameters\n const requiredParams = { baseUrl, organizationId, siteId, clientId, redirectUri } as const;\n const missingParams = Object.entries(requiredParams)\n .filter(([, value]) => !value)\n .map(([key]) => key);\n if (missingParams.length > 0) {\n throw new Error(\n `Missing required configuration: ${missingParams.join(', ')}. These parameters are required for creating Commerce API clients.`\n );\n }\n\n const clientOptions = {\n ...(customFetch ? { fetch: customFetch } : {}),\n querySerializer: querySerializer || defaultQuerySerializer,\n ...rest,\n };\n\n // Global request parameters to merge organizationId, siteId, and locale into all calls\n const globalParams: GlobalRequestParameters = {\n organizationId,\n siteId,\n ...(locale ? { locale } : {}),\n };\n\n const createClientOptions = onAuthTokenInvalid ? { onAuthTokenInvalid } : undefined;\n\n // Some APIs don't support locale parameter - exclude it for those clients\n const globalParamsWithoutLocale: GlobalRequestParameters = {\n organizationId,\n siteId,\n };\n\n // Create base clients and wrap with proxy for operation methods\n const shopperBasketsV1 = createClient(\n createBaseClient<ShopperBasketsV1.endpoints>({\n baseUrl: `${baseUrl}/checkout/shopper-baskets/v1`,\n ...clientOptions,\n }),\n shopperBasketsV1Ops,\n globalParams,\n createClientOptions\n );\n const shopperBasketsV2 = createClient(\n createBaseClient<ShopperBasketsV2.endpoints>({\n baseUrl: `${baseUrl}/checkout/shopper-baskets/v2`,\n ...clientOptions,\n }),\n shopperBasketsV2Ops,\n globalParams,\n createClientOptions\n );\n const shopperConfigurations = createClient(\n createBaseClient<ShopperConfigurations.endpoints>({\n baseUrl: `${baseUrl}/configuration/shopper-configurations/v1`,\n ...clientOptions,\n }),\n shopperConfigurationsOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperConsents = createClient(\n createBaseClient<ShopperConsents.endpoints>({\n baseUrl: `${baseUrl}/shopper/shopper-consents/v1`,\n ...clientOptions,\n }),\n shopperConsentsOps,\n globalParams,\n createClientOptions\n );\n const shopperContext = createClient(\n createBaseClient<ShopperContext.endpoints>({\n baseUrl: `${baseUrl}/shopper/shopper-context/v1`,\n ...clientOptions,\n }),\n shopperContextOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperCustomers = createClient(\n createBaseClient<ShopperCustomers.endpoints>({\n baseUrl: `${baseUrl}/customer/shopper-customers/v1`,\n ...clientOptions,\n }),\n shopperCustomersOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperExperience = createClient(\n createBaseClient<ShopperExperience.endpoints>({\n baseUrl: `${baseUrl}/experience/shopper-experience/v1`,\n ...clientOptions,\n }),\n shopperExperienceOps,\n globalParams,\n createClientOptions\n );\n const shopperGiftCertificates = createClient(\n createBaseClient<ShopperGiftCertificates.endpoints>({\n baseUrl: `${baseUrl}/pricing/shopper-gift-certificates/v1`,\n ...clientOptions,\n }),\n shopperGiftCertificatesOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperLogin = createClient(\n createBaseClient<ShopperLogin.endpoints>({\n baseUrl: `${baseUrl}/shopper/auth/v1`,\n ...clientOptions,\n }),\n shopperLoginOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperOrders = createClient(\n createBaseClient<ShopperOrders.endpoints>({\n baseUrl: `${baseUrl}/checkout/shopper-orders/v1`,\n ...clientOptions,\n }),\n shopperOrdersOps,\n globalParams,\n createClientOptions\n );\n const shopperPayments = createClient(\n createBaseClient<ShopperPayments.endpoints>({\n baseUrl: `${baseUrl}/checkout/shopper-payments/v1`,\n ...clientOptions,\n }),\n shopperPaymentsOps,\n globalParamsWithoutLocale, // API does not accept locale parameter\n createClientOptions\n );\n const shopperProducts = createClient(\n createBaseClient<ShopperProducts.endpoints>({\n baseUrl: `${baseUrl}/product/shopper-products/v1`,\n ...clientOptions,\n }),\n shopperProductsOps,\n globalParams,\n createClientOptions\n );\n const shopperPromotions = createClient(\n createBaseClient<ShopperPromotions.endpoints>({\n baseUrl: `${baseUrl}/pricing/shopper-promotions/v1`,\n ...clientOptions,\n }),\n shopperPromotionsOps,\n globalParams,\n createClientOptions\n );\n const shopperSearch = createClient(\n createBaseClient<ShopperSearch.endpoints>({\n baseUrl: `${baseUrl}/search/shopper-search/v1`,\n ...clientOptions,\n }),\n shopperSearchOps,\n globalParams,\n createClientOptions\n );\n const shopperSeo = createClient(\n createBaseClient<ShopperSeo.endpoints>({\n baseUrl: `${baseUrl}/site/shopper-seo/v1`,\n ...clientOptions,\n }),\n shopperSeoOps,\n globalParams,\n createClientOptions\n );\n const shopperStores = createClient(\n createBaseClient<ShopperStores.endpoints>({\n baseUrl: `${baseUrl}/store/shopper-stores/v1`,\n ...clientOptions,\n }),\n shopperStoresOps,\n globalParams,\n createClientOptions\n );\n\n const allClients = [\n shopperBasketsV1,\n shopperBasketsV2,\n shopperConfigurations,\n shopperConsents,\n shopperContext,\n shopperCustomers,\n shopperExperience,\n shopperGiftCertificates,\n shopperLogin,\n shopperOrders,\n shopperPayments,\n shopperProducts,\n shopperPromotions,\n shopperSearch,\n shopperSeo,\n shopperStores,\n ];\n\n // In workspace environments, automatically register middleware to rewrite org IDs.\n // SLAS auth endpoints use the stripped org ID (e.g., 'zzzz_s01') while\n // product/search APIs need the full org ID (e.g., 'f_ecom_zzzz_s01').\n if (isWorkspace && organizationId !== rawOrganizationId) {\n const workspaceOrgIdMiddleware: Middleware = {\n onRequest({ request }) {\n const url = new URL(request.url);\n const isSlasAuthEndpoint = SLAS_AUTH_ENDPOINTS.some((path) => url.pathname.includes(path));\n\n // Only rewrite non-SLAS endpoints (product, search, etc.)\n if (!isSlasAuthEndpoint) {\n url.pathname = url.pathname.replace(\n `/organizations/${organizationId}/`,\n `/organizations/${rawOrganizationId}/`\n );\n return new Request(url, request);\n }\n\n return request;\n },\n };\n allClients.forEach((client) => client.use(workspaceOrgIdMiddleware));\n }\n\n // Create auth helpers namespace\n const auth = createAuthHelpers({\n shopperLoginClient: shopperLogin,\n clientId,\n clientSecret,\n redirectUri,\n organizationId,\n siteId,\n baseUrl,\n proxyHost,\n });\n const basket = createBasketHelpers({ shopperBasketsClient: shopperBasketsV2 });\n\n return {\n shopperBasketsV1,\n shopperBasketsV2,\n shopperConfigurations,\n shopperConsents,\n shopperContext,\n shopperCustomers,\n shopperExperience,\n shopperGiftCertificates,\n shopperLogin,\n shopperOrders,\n shopperPayments,\n shopperProducts,\n shopperPromotions,\n shopperSearch,\n shopperSeo,\n shopperStores,\n auth,\n basket,\n use: (middleware: Middleware) => {\n allClients.forEach((client) => client.use(middleware));\n },\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"AAAA,MAAM,EAAgB,cAChB,MACG,OAAO,SAAY,UAAY,OAAO,SAAS,SAAS,UAAU,MAAM,UAAU,EAAG,EAAE,CAAC,EAAI,IAAM,QAAQ,SAAS,OAE5H,SAAS,GAAW,CAClB,OAAO,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAG,GAAG,CAEhD,SAASA,EAAa,EAAe,CACnC,GAAI,CACF,UAAU,GACV,QAAS,EAAgB,WAAW,QACpC,MAAO,EAAY,WAAW,MAC9B,gBAAiB,EACjB,eAAgB,EAChB,QAAS,EACT,iBAAiB,IAAK,GACtB,GAAG,GACD,CAAE,GAAG,EAAe,CACxB,EAAiB,GAAwB,CAAG,EAAiB,IAAK,GAClE,EAAU,EAAoB,EAAQ,CACtC,IAAM,EAAoB,EAAE,CAC5B,eAAe,EAAU,EAAY,E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pB,GAAG,EACN,CAAC,CACFa,GACA,EACA,EACH,CACK,EAAgB,EAClBb,EAA0C,CACtC,QAAS,GAAG,EAAQ,2BACpB,GAAG,EACN,CAAC,CACFc,GACA,EACA,EACH,CACK,EAAa,EACfd,EAAuC,CACnC,QAAS,GAAG,EAAQ,sBACpB,GAAG,EACN,CAAC,CACFe,GACA,EACA,EACH,CACK,EAAgB,EAClBf,EAA0C,CACtC,QAAS,GAAG,EAAQ,0BACpB,GAAG,EACN,CAAC,CACFgB,GACA,EACA,EACH,CAEK,EAAa,CACf,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACH,CAKD,GAAI,GAAe,IAAmB,EAAmB,CACrD,IAAMC,EAAuC,CACzC,UAAU,CAAE,WAAW,CACnB,IAAM,EAAM,IAAI,IAAI,EAAQ,IAAI,CAYhC,OAX2B,EAAoB,KAAM,GAAS,EAAI,SAAS,SAAS,EAAK,CAAC,CAWnF,GAPH,EAAI,SAAW,EAAI,SAAS,QACxB,kBAAkB,EAAe,GACjC,kBAAkB,EAAkB,GACvC,CACM,IAAI,QAAQ,EAAK,EAAQ,GAK3C,CACD,EAAW,QAAS,GAAW,EAAO,IAAI,EAAyB,CAAC,CAgBxE,MAAO,CACH,mBACA,mBACA,wBACA,kBACA,iBACA,mBACA,oBACA,0BACA,eACA,gBACA,kBACA,kBACA,oBACA,gBACA,aACA,gBACA,KA7BS,EAAkB,CAC3B,mBAAoB,EACpB,WACA,eACA,cACA,iBACA,SACA,UACA,YACH,CAAC,CAqBE,OApBW,EAAoB,CAAE,qBAAsB,EAAkB,CAAC,CAqB1E,IAAM,GAA2B,CAC7B,EAAW,QAAS,GAAW,EAAO,IAAI,EAAW,CAAC,EAE7D"}
1
+ {"version":3,"file":"scapi.js","names":["createClient","Request","operations","body: ErrorDetail","rawBody: string","queryString: string[]","tokenResult","result","query: Record<string, string>","headers: Record<string, string>","BASE_PATH","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","BASE_PATH","operations","operations","globalParams: GlobalRequestParameters","globalParamsWithoutLocale: GlobalRequestParameters","createBaseClient","shopperAvailabilityOps","shopperBasketsV1Ops","shopperBasketsV2Ops","shopperConfigurationsOps","shopperConsentsOps","shopperContextOps","shopperCustomersOps","shopperExperienceOps","shopperGiftCertificatesOps","shopperLoginOps","shopperOrdersOps","shopperPaymentsOps","shopperProductsOps","shopperPromotionsOps","shopperSearchOps","shopperSeoOps","shopperStoresOps","workspaceOrgIdMiddleware: Middleware"],"sources":["../../../node_modules/.pnpm/openapi-fetch@0.15.0/node_modules/openapi-fetch/dist/index.mjs","../src/scapi-client/ApiError.ts","../src/scapi-client/AuthTokenInvalidError.ts","../src/scapi-client/constants.ts","../src/scapi-client/createClient.ts","../src/scapi-client/defaultQuerySerializer.ts","../src/scapi-client/auth/utils.ts","../src/scapi-client/auth/index.ts","../src/scapi-client/basket/index.ts","../src/scapi-client/built-in-clients.ts","../src/workspace/index.ts","../src/scapi-client/generated/shopper-availability-v1.operations.ts","../src/scapi-client/generated/shopper-baskets-v1.operations.ts","../src/scapi-client/generated/shopper-baskets-v2.operations.ts","../src/scapi-client/generated/shopper-configurations-v1.operations.ts","../src/scapi-client/generated/shopper-consents-v1.operations.ts","../src/scapi-client/generated/shopper-context-v1.operations.ts","../src/scapi-client/generated/shopper-customers-v1.operations.ts","../src/scapi-client/generated/shopper-experience-v1.operations.ts","../src/scapi-client/generated/shopper-gift-certificates-v1.operations.ts","../src/scapi-client/generated/auth-v1.operations.ts","../src/scapi-client/generated/shopper-orders-v1.operations.ts","../src/scapi-client/generated/shopper-payments-v1.operations.ts","../src/scapi-client/generated/shopper-products-v1.operations.ts","../src/scapi-client/generated/shopper-promotions-v1.operations.ts","../src/scapi-client/generated/shopper-search-v1.operations.ts","../src/scapi-client/generated/shopper-seo-v1.operations.ts","../src/scapi-client/generated/shopper-stores-v1.operations.ts","../src/scapi-client/createClients.ts"],"sourcesContent":["const PATH_PARAM_RE = /\\{[^{}]+\\}/g;\nconst supportsRequestInitExt = () => {\n return typeof process === \"object\" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;\n};\nfunction randomID() {\n return Math.random().toString(36).slice(2, 11);\n}\nfunction createClient(clientOptions) {\n let {\n baseUrl = \"\",\n Request: CustomRequest = globalThis.Request,\n fetch: baseFetch = globalThis.fetch,\n querySerializer: globalQuerySerializer,\n bodySerializer: globalBodySerializer,\n headers: baseHeaders,\n requestInitExt = void 0,\n ...baseOptions\n } = { ...clientOptions };\n requestInitExt = supportsRequestInitExt() ? requestInitExt : void 0;\n baseUrl = removeTrailingSlash(baseUrl);\n const globalMiddlewares = [];\n async function coreFetch(schemaPath, fetchOptions) {\n const {\n baseUrl: localBaseUrl,\n fetch = baseFetch,\n Request = CustomRequest,\n headers,\n params = {},\n parseAs = \"json\",\n querySerializer: requestQuerySerializer,\n bodySerializer = globalBodySerializer ?? defaultBodySerializer,\n body,\n middleware: requestMiddlewares = [],\n ...init\n } = fetchOptions || {};\n let finalBaseUrl = baseUrl;\n if (localBaseUrl) {\n finalBaseUrl = removeTrailingSlash(localBaseUrl) ?? baseUrl;\n }\n let querySerializer = typeof globalQuerySerializer === \"function\" ? globalQuerySerializer : createQuerySerializer(globalQuerySerializer);\n if (requestQuerySerializer) {\n querySerializer = typeof requestQuerySerializer === \"function\" ? requestQuerySerializer : createQuerySerializer({\n ...typeof globalQuerySerializer === \"object\" ? globalQuerySerializer : {},\n ...requestQuerySerializer\n });\n }\n const serializedBody = body === void 0 ? void 0 : bodySerializer(\n body,\n // Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:\n // bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,\n // the result of this ALSO sets the lowest-priority content-type header. So we re-merge below,\n // setting the content-type at the very beginning to be overwritten.\n // Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.\n mergeHeaders(baseHeaders, headers, params.header)\n );\n const finalHeaders = mergeHeaders(\n // with no body, we should not to set Content-Type\n serializedBody === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression\n serializedBody instanceof FormData ? {} : {\n \"Content-Type\": \"application/json\"\n },\n baseHeaders,\n headers,\n params.header\n );\n const finalMiddlewares = [...globalMiddlewares, ...requestMiddlewares];\n const requestInit = {\n redirect: \"follow\",\n ...baseOptions,\n ...init,\n body: serializedBody,\n headers: finalHeaders\n };\n let id;\n let options;\n let request = new Request(\n createFinalURL(schemaPath, { baseUrl: finalBaseUrl, params, querySerializer }),\n requestInit\n );\n let response;\n for (const key in init) {\n if (!(key in request)) {\n request[key] = init[key];\n }\n }\n if (finalMiddlewares.length) {\n id = randomID();\n options = Object.freeze({\n baseUrl: finalBaseUrl,\n fetch,\n parseAs,\n querySerializer,\n bodySerializer\n });\n for (const m of finalMiddlewares) {\n if (m && typeof m === \"object\" && typeof m.onRequest === \"function\") {\n const result = await m.onRequest({\n request,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Request) {\n request = result;\n } else if (result instanceof Response) {\n response = result;\n break;\n } else {\n throw new Error(\"onRequest: must return new Request() or Response() when modifying the request\");\n }\n }\n }\n }\n }\n if (!response) {\n try {\n response = await fetch(request, requestInitExt);\n } catch (error2) {\n let errorAfterMiddleware = error2;\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onError === \"function\") {\n const result = await m.onError({\n request,\n error: errorAfterMiddleware,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (result instanceof Response) {\n errorAfterMiddleware = void 0;\n response = result;\n break;\n }\n if (result instanceof Error) {\n errorAfterMiddleware = result;\n continue;\n }\n throw new Error(\"onError: must return new Response() or instance of Error\");\n }\n }\n }\n }\n if (errorAfterMiddleware) {\n throw errorAfterMiddleware;\n }\n }\n if (finalMiddlewares.length) {\n for (let i = finalMiddlewares.length - 1; i >= 0; i--) {\n const m = finalMiddlewares[i];\n if (m && typeof m === \"object\" && typeof m.onResponse === \"function\") {\n const result = await m.onResponse({\n request,\n response,\n schemaPath,\n params,\n options,\n id\n });\n if (result) {\n if (!(result instanceof Response)) {\n throw new Error(\"onResponse: must return new Response() when modifying the response\");\n }\n response = result;\n }\n }\n }\n }\n }\n if (response.status === 204 || request.method === \"HEAD\" || response.headers.get(\"Content-Length\") === \"0\") {\n return response.ok ? { data: void 0, response } : { error: void 0, response };\n }\n if (response.ok) {\n if (parseAs === \"stream\") {\n return { data: response.body, response };\n }\n return { data: await response[parseAs](), response };\n }\n let error = await response.text();\n try {\n error = JSON.parse(error);\n } catch {\n }\n return { error, response };\n }\n return {\n request(method, url, init) {\n return coreFetch(url, { ...init, method: method.toUpperCase() });\n },\n /** Call a GET endpoint */\n GET(url, init) {\n return coreFetch(url, { ...init, method: \"GET\" });\n },\n /** Call a PUT endpoint */\n PUT(url, init) {\n return coreFetch(url, { ...init, method: \"PUT\" });\n },\n /** Call a POST endpoint */\n POST(url, init) {\n return coreFetch(url, { ...init, method: \"POST\" });\n },\n /** Call a DELETE endpoint */\n DELETE(url, init) {\n return coreFetch(url, { ...init, method: \"DELETE\" });\n },\n /** Call a OPTIONS endpoint */\n OPTIONS(url, init) {\n return coreFetch(url, { ...init, method: \"OPTIONS\" });\n },\n /** Call a HEAD endpoint */\n HEAD(url, init) {\n return coreFetch(url, { ...init, method: \"HEAD\" });\n },\n /** Call a PATCH endpoint */\n PATCH(url, init) {\n return coreFetch(url, { ...init, method: \"PATCH\" });\n },\n /** Call a TRACE endpoint */\n TRACE(url, init) {\n return coreFetch(url, { ...init, method: \"TRACE\" });\n },\n /** Register middleware */\n use(...middleware) {\n for (const m of middleware) {\n if (!m) {\n continue;\n }\n if (typeof m !== \"object\" || !(\"onRequest\" in m || \"onResponse\" in m || \"onError\" in m)) {\n throw new Error(\"Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`\");\n }\n globalMiddlewares.push(m);\n }\n },\n /** Unregister middleware */\n eject(...middleware) {\n for (const m of middleware) {\n const i = globalMiddlewares.indexOf(m);\n if (i !== -1) {\n globalMiddlewares.splice(i, 1);\n }\n }\n }\n };\n}\nclass PathCallForwarder {\n constructor(client, url) {\n this.client = client;\n this.url = url;\n }\n GET = (init) => {\n return this.client.GET(this.url, init);\n };\n PUT = (init) => {\n return this.client.PUT(this.url, init);\n };\n POST = (init) => {\n return this.client.POST(this.url, init);\n };\n DELETE = (init) => {\n return this.client.DELETE(this.url, init);\n };\n OPTIONS = (init) => {\n return this.client.OPTIONS(this.url, init);\n };\n HEAD = (init) => {\n return this.client.HEAD(this.url, init);\n };\n PATCH = (init) => {\n return this.client.PATCH(this.url, init);\n };\n TRACE = (init) => {\n return this.client.TRACE(this.url, init);\n };\n}\nclass PathClientProxyHandler {\n constructor() {\n this.client = null;\n }\n // Assume the property is an URL.\n get(coreClient, url) {\n const forwarder = new PathCallForwarder(coreClient, url);\n this.client[url] = forwarder;\n return forwarder;\n }\n}\nfunction wrapAsPathBasedClient(coreClient) {\n const handler = new PathClientProxyHandler();\n const proxy = new Proxy(coreClient, handler);\n function Client() {\n }\n Client.prototype = proxy;\n const client = new Client();\n handler.client = client;\n return client;\n}\nfunction createPathBasedClient(clientOptions) {\n return wrapAsPathBasedClient(createClient(clientOptions));\n}\nfunction serializePrimitiveParam(name, value, options) {\n if (value === void 0 || value === null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n throw new Error(\n \"Deeply-nested arrays/objects aren\\u2019t supported. Provide your own `querySerializer()` to handle these.\"\n );\n }\n return `${name}=${options?.allowReserved === true ? value : encodeURIComponent(value)}`;\n}\nfunction serializeObjectParam(name, value, options) {\n if (!value || typeof value !== \"object\") {\n return \"\";\n }\n const values = [];\n const joiner = {\n simple: \",\",\n label: \".\",\n matrix: \";\"\n }[options.style] || \"&\";\n if (options.style !== \"deepObject\" && options.explode === false) {\n for (const k in value) {\n values.push(k, options.allowReserved === true ? value[k] : encodeURIComponent(value[k]));\n }\n const final2 = values.join(\",\");\n switch (options.style) {\n case \"form\": {\n return `${name}=${final2}`;\n }\n case \"label\": {\n return `.${final2}`;\n }\n case \"matrix\": {\n return `;${name}=${final2}`;\n }\n default: {\n return final2;\n }\n }\n }\n for (const k in value) {\n const finalName = options.style === \"deepObject\" ? `${name}[${k}]` : k;\n values.push(serializePrimitiveParam(finalName, value[k], options));\n }\n const final = values.join(joiner);\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${final}` : final;\n}\nfunction serializeArrayParam(name, value, options) {\n if (!Array.isArray(value)) {\n return \"\";\n }\n if (options.explode === false) {\n const joiner2 = { form: \",\", spaceDelimited: \"%20\", pipeDelimited: \"|\" }[options.style] || \",\";\n const final = (options.allowReserved === true ? value : value.map((v) => encodeURIComponent(v))).join(joiner2);\n switch (options.style) {\n case \"simple\": {\n return final;\n }\n case \"label\": {\n return `.${final}`;\n }\n case \"matrix\": {\n return `;${name}=${final}`;\n }\n // case \"spaceDelimited\":\n // case \"pipeDelimited\":\n default: {\n return `${name}=${final}`;\n }\n }\n }\n const joiner = { simple: \",\", label: \".\", matrix: \";\" }[options.style] || \"&\";\n const values = [];\n for (const v of value) {\n if (options.style === \"simple\" || options.style === \"label\") {\n values.push(options.allowReserved === true ? v : encodeURIComponent(v));\n } else {\n values.push(serializePrimitiveParam(name, v, options));\n }\n }\n return options.style === \"label\" || options.style === \"matrix\" ? `${joiner}${values.join(joiner)}` : values.join(joiner);\n}\nfunction createQuerySerializer(options) {\n return function querySerializer(queryParams) {\n const search = [];\n if (queryParams && typeof queryParams === \"object\") {\n for (const name in queryParams) {\n const value = queryParams[name];\n if (value === void 0 || value === null) {\n continue;\n }\n if (Array.isArray(value)) {\n if (value.length === 0) {\n continue;\n }\n search.push(\n serializeArrayParam(name, value, {\n style: \"form\",\n explode: true,\n ...options?.array,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n if (typeof value === \"object\") {\n search.push(\n serializeObjectParam(name, value, {\n style: \"deepObject\",\n explode: true,\n ...options?.object,\n allowReserved: options?.allowReserved || false\n })\n );\n continue;\n }\n search.push(serializePrimitiveParam(name, value, options));\n }\n }\n return search.join(\"&\");\n };\n}\nfunction defaultPathSerializer(pathname, pathParams) {\n let nextURL = pathname;\n for (const match of pathname.match(PATH_PARAM_RE) ?? []) {\n let name = match.substring(1, match.length - 1);\n let explode = false;\n let style = \"simple\";\n if (name.endsWith(\"*\")) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n if (name.startsWith(\".\")) {\n style = \"label\";\n name = name.substring(1);\n } else if (name.startsWith(\";\")) {\n style = \"matrix\";\n name = name.substring(1);\n }\n if (!pathParams || pathParams[name] === void 0 || pathParams[name] === null) {\n continue;\n }\n const value = pathParams[name];\n if (Array.isArray(value)) {\n nextURL = nextURL.replace(match, serializeArrayParam(name, value, { style, explode }));\n continue;\n }\n if (typeof value === \"object\") {\n nextURL = nextURL.replace(match, serializeObjectParam(name, value, { style, explode }));\n continue;\n }\n if (style === \"matrix\") {\n nextURL = nextURL.replace(match, `;${serializePrimitiveParam(name, value)}`);\n continue;\n }\n nextURL = nextURL.replace(match, style === \"label\" ? `.${encodeURIComponent(value)}` : encodeURIComponent(value));\n }\n return nextURL;\n}\nfunction defaultBodySerializer(body, headers) {\n if (body instanceof FormData) {\n return body;\n }\n if (headers) {\n const contentType = headers.get instanceof Function ? headers.get(\"Content-Type\") ?? headers.get(\"content-type\") : headers[\"Content-Type\"] ?? headers[\"content-type\"];\n if (contentType === \"application/x-www-form-urlencoded\") {\n return new URLSearchParams(body).toString();\n }\n }\n return JSON.stringify(body);\n}\nfunction createFinalURL(pathname, options) {\n let finalURL = `${options.baseUrl}${pathname}`;\n if (options.params?.path) {\n finalURL = defaultPathSerializer(finalURL, options.params.path);\n }\n let search = options.querySerializer(options.params.query ?? {});\n if (search.startsWith(\"?\")) {\n search = search.substring(1);\n }\n if (search) {\n finalURL += `?${search}`;\n }\n return finalURL;\n}\nfunction mergeHeaders(...allHeaders) {\n const finalHeaders = new Headers();\n for (const h of allHeaders) {\n if (!h || typeof h !== \"object\") {\n continue;\n }\n const iterator = h instanceof Headers ? h.entries() : Object.entries(h);\n for (const [k, v] of iterator) {\n if (v === null) {\n finalHeaders.delete(k);\n } else if (Array.isArray(v)) {\n for (const v2 of v) {\n finalHeaders.append(k, v2);\n }\n } else if (v !== void 0) {\n finalHeaders.set(k, v);\n }\n }\n }\n return finalHeaders;\n}\nfunction removeTrailingSlash(url) {\n if (url.endsWith(\"/\")) {\n return url.substring(0, url.length - 1);\n }\n return url;\n}\n\nexport { createFinalURL, createPathBasedClient, createQuerySerializer, createClient as default, defaultBodySerializer, defaultPathSerializer, mergeHeaders, randomID, removeTrailingSlash, serializeArrayParam, serializeObjectParam, serializePrimitiveParam, wrapAsPathBasedClient };\n//# sourceMappingURL=index.mjs.map\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @see https://datatracker.ietf.org/doc/html/rfc7807\n */\nexport interface ErrorDetail {\n /** A URI reference that identifies the problem type */\n type: string;\n /** A short, human-readable summary of the problem type */\n title: string;\n /** A human-readable explanation specific to this occurrence of the problem */\n detail: string;\n /** Additional properties that may be included in the error response */\n [key: string]: unknown;\n}\n\n/**\n * Custom error class for API errors\n *\n * This error is thrown when an API request returns a non-2xx status code.\n * It includes comprehensive information about the error including the parsed\n * and raw response bodies, headers, status code, and request details.\n *\n * The error body is always typed as ErrorDetail (RFC 7807), which matches\n * the standard error format used by Salesforce Commerce APIs. If the response\n * cannot be parsed as JSON, an empty ErrorDetail object is returned.\n *\n * @example\n * ```typescript\n * try {\n * const { data } = await client.getProduct({ params: { path: { id: 'invalid' } } });\n * } catch (error) {\n * if (error instanceof ApiError) {\n * console.log(error.status); // 404\n * console.log(error.statusText); // \"Not Found\"\n * console.log(error.body.title); // \"Product Not Found\" (always typed!)\n * console.log(error.body.detail); // Detailed error message (always typed!)\n * console.log(error.rawBody); // Raw response text\n * console.log(error.headers.get('content-type')); // Access headers\n * console.log(error.url); // Request URL\n * console.log(error.method); // HTTP method\n * }\n * }\n * ```\n */\nexport class ApiError extends Error {\n /**\n * HTTP status code (e.g., 404, 500)\n */\n readonly status: number;\n\n /**\n * HTTP status text (e.g., \"Not Found\", \"Internal Server Error\")\n */\n readonly statusText: string;\n\n /**\n * Response headers\n */\n readonly headers: Headers;\n\n /**\n * Parsed response body as ErrorDetail\n * Automatically parsed from JSON if the response is valid JSON.\n * If parsing fails, returns an empty ErrorDetail object with empty strings.\n */\n readonly body: ErrorDetail;\n\n /**\n * Raw response body as text\n * Useful for debugging when the body couldn't be parsed as JSON\n */\n readonly rawBody: string;\n\n /**\n * Request URL that caused the error\n */\n readonly url: string;\n\n /**\n * HTTP method used for the request (e.g., \"GET\", \"POST\")\n */\n readonly method: string;\n\n /**\n * Creates an ApiError instance\n *\n * @param options - Error details\n * @param options.status - HTTP status code\n * @param options.statusText - HTTP status message\n * @param options.headers - Response headers\n * @param options.body - Parsed response body as ErrorDetail\n * @param options.rawBody - Raw response body text\n * @param options.url - Request URL\n * @param options.method - HTTP method\n */\n constructor(options: {\n status: number;\n statusText: string;\n headers: Headers;\n body: ErrorDetail;\n rawBody: string;\n url: string;\n method: string;\n }) {\n // Create a descriptive error message\n const message = `API Error ${options.status}: ${options.statusText} (${options.method} ${options.url})`;\n super(message);\n\n this.name = 'ApiError';\n this.status = options.status;\n this.statusText = options.statusText;\n this.headers = options.headers;\n this.body = options.body;\n this.rawBody = options.rawBody;\n this.url = options.url;\n this.method = options.method;\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ApiError);\n }\n }\n\n /**\n * Returns a JSON representation of the error\n * Useful for logging and debugging\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n status: this.status,\n statusText: this.statusText,\n body: this.body,\n rawBody: this.rawBody,\n url: this.url,\n method: this.method,\n // Convert headers to a plain object for JSON serialization\n headers: Object.fromEntries(this.headers.entries()),\n };\n }\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class AuthTokenInvalidError extends Error {\n constructor(message = 'Access token is invalid or revoked') {\n super(message);\n this.name = 'AuthTokenInvalidError';\n }\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Path patterns for SLAS authentication endpoints.\n * These endpoints handle their own authentication (Basic auth, PKCE, etc.)\n * and should NOT have Bearer tokens auto-injected by middleware.\n *\n * Use with URL.pathname.includes() to check if a request targets a SLAS auth endpoint.\n *\n * @example\n * ```typescript\n * const isSlasAuthEndpoint = SLAS_AUTH_ENDPOINTS.some(path => url.pathname.includes(path));\n * if (isSlasAuthEndpoint) {\n * // Skip Bearer token injection - endpoint handles its own auth\n * return request;\n * }\n * ```\n */\nexport const SLAS_AUTH_ENDPOINTS = [\n '/oauth2/token',\n '/oauth2/authorize',\n '/oauth2/logout',\n '/oauth2/login',\n '/oauth2/passwordless',\n '/oauth2/password',\n '/oauth2/session-bridge',\n '/oauth2/trusted-agent',\n '/oauth2/trusted-system',\n '/oauth2/revoke',\n '/oauth2/introspect',\n] as const;\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Proxy client factory for operation-based API calls\n *\n * This module creates a proxied version of an openapi-fetch client that\n * allows calling operations by their operation name instead of using\n * HTTP methods and path strings.\n *\n * Example transformation:\n * Before: client.GET('/organizations/{organizationId}/categories', options)\n * After: client.getCategories(options)\n *\n * The proxy maintains full type safety and has minimal runtime overhead.\n */\nimport type { Client } from 'openapi-fetch';\nimport type { OperationMap, ProxyClient } from './proxy-types';\nimport { ApiError, type ErrorDetail } from './ApiError';\nimport { AuthTokenInvalidError } from './AuthTokenInvalidError';\nimport { SLAS_AUTH_ENDPOINTS } from './constants';\n\n/**\n * Optional hooks for client behavior.\n */\nexport interface CreateClientOptions {\n /** Callback invoked when an auth token is deemed invalid */\n onAuthTokenInvalid?: (response: Response) => void;\n}\n\n/**\n * Global request parameters that are automatically merged into every API call.\n *\n * When provided to createClient, these values will be merged into every\n * operation call, eliminating the need to pass them manually each time.\n */\nexport interface GlobalRequestParameters {\n /** Organization ID to merge into path parameters */\n organizationId: string;\n /** Site ID to merge into query parameters */\n siteId: string;\n /** Locale to merge into query parameters (optional) */\n locale?: string;\n}\n\n/**\n * Build request options by applying global request parameters as defaults.\n *\n * This function specifically places:\n * - organizationId into params.path\n * - siteId and locale into params.query\n *\n * Caller-provided values take precedence over global defaults, allowing\n * overrides when needed while reducing boilerplate for the common case.\n *\n * @param options - The options provided by the caller (may be undefined)\n * @param globalParams - The global request parameters containing organizationId, siteId, and locale\n * @returns Options with global values applied as defaults\n */\nfunction buildRequestOptions(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options: any,\n globalParams?: GlobalRequestParameters\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n if (!globalParams) return options;\n\n return {\n ...options,\n params: {\n ...options?.params,\n path: {\n organizationId: globalParams.organizationId, // Global default\n ...options?.params?.path, // Caller-provided overrides\n },\n query: {\n siteId: globalParams.siteId, // Global default\n ...(globalParams.locale ? { locale: globalParams.locale } : {}), // Global default (if provided)\n ...options?.params?.query, // Caller-provided overrides\n },\n },\n };\n}\n\nconst isSlasAuthResponse = (url: string): boolean => {\n try {\n const parsedUrl = new URL(url);\n return SLAS_AUTH_ENDPOINTS.some((path) => parsedUrl.pathname.includes(path));\n } catch {\n return SLAS_AUTH_ENDPOINTS.some((path) => url.includes(path));\n }\n};\n\nconst isOtpEndpoint = (url: string): boolean => {\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.pathname.includes('/oauth2/otp/');\n } catch {\n return url.includes('/oauth2/otp/');\n }\n};\n\n/**\n * Create a proxied client with operation methods\n *\n * This function wraps an openapi-fetch client with a JavaScript Proxy that\n * intercepts property access. When an operation method is called, it:\n *\n * 1. Looks up the operation in the operation map\n * 2. Extracts the HTTP method (m) and path (b + s)\n * 3. Reconstructs the full path from base + suffix\n * 4. Calls the appropriate client method with the path and options\n *\n * Operation format uses abbreviated keys for bundle size optimization:\n * - m: HTTP method (GET, POST, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * All other property accesses (like .use(), .eject(), etc.) are passed\n * through to the original client unchanged.\n *\n * @typeParam TClient - The openapi-fetch Client type\n * @typeParam TOperations - The operation map type\n *\n * @param client - The base openapi-fetch client instance\n * @param operations - The operation map object (generated at build time)\n * @param globalParams - Optional global request parameters to merge into every call (organizationId, siteId)\n * @returns A proxied client with operation methods\n *\n * @example\n * ```typescript\n * import createClient from 'openapi-fetch';\n * import { operations } from './generated/shopper-products-v1.operations';\n * import type { paths } from './generated/shopper-products-v1';\n *\n * const baseClient = createClient<paths>({ baseUrl: 'https://api.example.com' });\n *\n * // Without global params - caller must provide organizationId and siteId\n * const client = createClient(baseClient, operations);\n *\n * // With global params - organizationId and siteId are automatically merged\n * const clientWithGlobalParams = createClient(baseClient, operations, {\n * organizationId: 'f_ecom_xxx',\n * siteId: 'RefArch'\n * });\n *\n * // Now you can call operations without passing organizationId/siteId:\n * const response = await clientWithGlobalParams.getCategories({\n * params: {\n * query: { ids: ['root'] }\n * }\n * });\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createClient<TClient extends Client<any, any>, TOperations extends OperationMap>(\n client: TClient,\n operations: TOperations,\n globalParams?: GlobalRequestParameters,\n options?: CreateClientOptions\n): ProxyClient<TClient, TOperations> {\n // Create and return the proxy\n return new Proxy(client, {\n /**\n * Proxy get trap - intercepts property access\n *\n * When a property is accessed on the proxy client:\n * 1. Check if it's an operation method name\n * 2. If yes, return a function that calls the appropriate HTTP method\n * 3. If no, return the original client property\n *\n * @param target - The original client instance\n * @param prop - The property being accessed\n * @returns The property value or operation method function\n */\n get(target, prop) {\n // Check if this is an operation method\n if (typeof prop === 'string' && prop in operations) {\n const operationInfo = operations[prop];\n\n // Extract operation info with abbreviated keys\n // m: HTTP method, b: base path, s: suffix path\n const { m: method, b: base, s: suffix } = operationInfo;\n\n // Reconstruct the full path from base + suffix\n const path = base + suffix;\n\n // Return an async function that calls the HTTP method and handles errors\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return async function (this: any, callOptions?: any) {\n // Get the HTTP method function (GET, POST, etc.)\n const httpMethod = method.toUpperCase();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const clientMethod = (target as any)[httpMethod];\n\n if (typeof clientMethod !== 'function') {\n throw new Error(\n `Client method ${httpMethod} not found. This is likely a bug in the proxy client.`\n );\n }\n\n // Build request options with global params (organizationId, siteId) applied as defaults\n const mergedOptions = buildRequestOptions(callOptions, globalParams);\n\n // Call the HTTP method with the path and merged options\n // The path is bound, options are passed from the operation call\n // openapi-fetch returns { data, error, response }\n // Only pass options if they're defined (maintains backward compatibility)\n const result =\n mergedOptions !== undefined\n ? await clientMethod.call(target, path, mergedOptions)\n : await clientMethod.call(target, path);\n\n // If there's an error, throw ApiError with the parsed error from openapi-fetch\n if (result.error !== undefined) {\n const response = result.response;\n\n // OTP endpoints return 401 for invalid OTP codes, not invalid tokens\n // Don't treat OTP 401s as auth token invalidation\n if (\n response.status === 401 &&\n !isSlasAuthResponse(response.url) &&\n !isOtpEndpoint(response.url)\n ) {\n options?.onAuthTokenInvalid?.(response);\n throw new AuthTokenInvalidError();\n }\n\n // openapi-fetch has already parsed the response body into result.error\n // Don't try to clone/read the response again as the body is already consumed\n const parsedError = result.error;\n\n // Convert to ErrorDetail structure\n let body: ErrorDetail;\n if (\n parsedError &&\n typeof parsedError === 'object' &&\n 'type' in parsedError &&\n 'title' in parsedError &&\n 'detail' in parsedError\n ) {\n // Valid ErrorDetail response - use it directly\n body = parsedError as ErrorDetail;\n } else {\n // Non-ErrorDetail response (string, HTML, or other format)\n // Create a generic ErrorDetail with helpful defaults\n body = {\n type: 'Unknown Error',\n title: response.statusText || 'API Error',\n detail: `The API returned a ${response.status} error. See rawBody for details.`,\n };\n }\n\n // Try to stringify the error for rawBody\n let rawBody: string;\n try {\n rawBody = typeof parsedError === 'string' ? parsedError : JSON.stringify(parsedError);\n } catch {\n rawBody = String(parsedError);\n }\n\n // Throw a typed ApiError with all response details\n throw new ApiError({\n status: response.status,\n statusText: response.statusText,\n headers: response.headers,\n body,\n rawBody,\n url: response.url,\n method: httpMethod,\n });\n }\n\n // On success, return { data, response } without the error property\n return {\n data: result.data,\n response: result.response,\n };\n };\n }\n\n // Only pass through middleware methods (use, eject)\n // All other properties (GET, POST, etc.) are intentionally hidden\n if (prop === 'use' || prop === 'eject') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const value = (target as any)[prop];\n if (typeof value === 'function') {\n return value.bind(target);\n }\n return value;\n }\n\n // Undefined for any other property access\n return undefined;\n },\n }) as ProxyClient<TClient, TOperations>;\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createQuerySerializer } from 'openapi-fetch';\n\n/**\n * Parameters that should use repeated format (explode: true)\n * e.g., refine=price=(0..10)&refine=c_refinementColor=green\n */\nconst EXPLODED_PARAMS = ['refine'];\n\n/**\n * Parameters that need automatic grouping by attribute ID\n * These parameters accept arrays like ['attrId=val1', 'attrId=val2', 'otherId=val3']\n * and group same attributes: ['attrId=val1|val2', 'otherId=val3']\n */\nconst GROUPED_PARAMS = ['refine'];\n\n/**\n * Groups refinement-style parameters by attribute ID\n * e.g., ['c_color=Black', 'c_color=Green', 'price=(0..20)']\n * => ['c_color=Black|Green', 'price=(0..20)']\n */\nfunction groupByAttribute(values: string[]): string[] {\n const groupMap = new Map<string, string[]>();\n\n for (const item of values) {\n const separatorIndex = item.indexOf('=');\n if (separatorIndex === -1) {\n // No separator found, keep as-is\n continue;\n }\n\n const attrId = item.substring(0, separatorIndex);\n const attrValue = item.substring(separatorIndex + 1);\n\n if (!groupMap.has(attrId)) {\n groupMap.set(attrId, []);\n }\n const attrValues = groupMap.get(attrId);\n if (attrValues) {\n attrValues.push(attrValue);\n }\n }\n\n return Array.from(groupMap.entries()).map(([attrId, attrValues]) => `${attrId}=${attrValues.join('|')}`);\n}\n\n/**\n * Default query serializer for Commerce Cloud APIs\n * - Most arrays use comma-separated format (explode: false)\n * e.g., expand=promotions,variations,prices\n * - Certain parameters use repeated format (explode: true)\n * e.g., refine=price=(0..10)&refine=c_refinementColor=green\n * - Some parameters are automatically grouped by attribute ID before serialization\n * e.g., ['c_color=Black', 'c_color=Green'] => 'c_color=Black|Green'\n */\nexport function defaultQuerySerializer(queryParams: Record<string, unknown>): string {\n if (!queryParams || typeof queryParams !== 'object') return '';\n\n const defaultSerializer = createQuerySerializer({\n array: { style: 'form', explode: false },\n });\n\n const explodedSerializer = createQuerySerializer({\n array: { style: 'form', explode: true },\n });\n\n const queryString: string[] = [];\n for (const [name, value] of Object.entries(queryParams)) {\n if (value === undefined || value === null) continue;\n\n let processedValue = value;\n\n // Apply grouping for parameters that need it\n if (GROUPED_PARAMS.includes(name) && Array.isArray(value)) {\n processedValue = groupByAttribute(value as string[]);\n }\n\n const serializer = EXPLODED_PARAMS.includes(name) ? explodedSerializer : defaultSerializer;\n const serialized = serializer({ [name]: processedValue });\n if (serialized) queryString.push(serialized);\n }\n return queryString.join('&');\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * PKCE and authentication utilities using native Web Crypto APIs.\n *\n * This module provides cryptographic utilities for OAuth 2.0 PKCE flow\n * without any external dependencies, using only native browser/Node.js APIs.\n */\n\n/**\n * Base64 URL-safe encoding of an ArrayBuffer.\n * Converts standard base64 to URL-safe format by replacing +/= characters.\n *\n * @param buffer - The ArrayBuffer to encode\n * @returns URL-safe base64 encoded string\n */\nexport function base64UrlEncode(buffer: ArrayBuffer): string {\n const bytes = new Uint8Array(buffer);\n let binary = '';\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n const base64 = btoa(binary);\n // Convert to URL-safe base64\n return base64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n}\n\n/**\n * Creates a cryptographically secure random code verifier for PKCE.\n *\n * Uses native Web Crypto API (crypto.getRandomValues) which provides\n * cryptographically secure random values. The output is 128 characters\n * using URL-safe alphabet (A-Za-z0-9-_).\n *\n * @returns A 128-character URL-safe random string suitable for PKCE code_verifier\n */\nexport function createCodeVerifier(): string {\n const URL_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n const randomBytes = new Uint8Array(128);\n crypto.getRandomValues(randomBytes);\n\n let result = '';\n for (let i = 0; i < randomBytes.length; i++) {\n result += URL_ALPHABET[randomBytes[i] % URL_ALPHABET.length];\n }\n return result;\n}\n\n/**\n * Generates a code challenge from a code verifier using SHA-256.\n *\n * Uses native Web Crypto API (crypto.subtle.digest) to hash the verifier.\n * The result is base64url encoded without padding.\n *\n * @param codeVerifier - The code verifier to hash\n * @returns Promise resolving to the base64url-encoded SHA-256 hash\n * @throws Error if code challenge generation fails\n */\nexport async function generateCodeChallenge(codeVerifier: string): Promise<string> {\n const encoder = new TextEncoder();\n const data = encoder.encode(codeVerifier);\n const digest = await crypto.subtle.digest('SHA-256', data);\n const challenge = base64UrlEncode(digest);\n\n if (challenge.length === 0) {\n throw new Error('Problem generating code challenge');\n }\n\n return challenge;\n}\n\n/**\n * Parse out the code and usid from a redirect URL.\n *\n * @param urlString - A URL that contains `code` and `usid` query parameters,\n * typically returned when calling a Shopper Login endpoint\n * @returns An object containing the code and usid\n */\nexport function getCodeAndUsidFromUrl(urlString: string): { code: string; usid: string } {\n const url = new URL(urlString);\n const urlParams = new URLSearchParams(url.search);\n const usid = urlParams.get('usid') ?? '';\n const code = urlParams.get('code') ?? '';\n\n return { code, usid };\n}\n\n/**\n * Creates a Basic Authentication header value from client credentials.\n *\n * @param clientId - The client ID\n * @param clientSecret - The client secret\n * @returns The Basic auth header value (e.g., \"Basic base64encoded...\")\n */\nexport function createBasicAuthHeader(clientId: string, clientSecret: string): string {\n const credentials = `${clientId}:${clientSecret}`;\n const encoded = btoa(credentials);\n return `Basic ${encoded}`;\n}\n\n/**\n * Extract a cookie value from the Set-Cookie response header.\n *\n * @param response - The fetch Response object\n * @param cookieName - The name of the cookie to extract\n * @returns The cookie value if found, undefined otherwise\n *\n * @example\n * ```typescript\n * const dwsid = extractCookieFromResponse(response, 'dwsid');\n * ```\n */\nexport function extractCookieFromResponse(response: Response, cookieName: string): string | undefined {\n // Headers.get() is case-insensitive per the Fetch API spec\n // (handles Set-Cookie, set-cookie, SET-COOKIE, etc.)\n const setCookieHeader = response.headers.get('set-cookie');\n if (!setCookieHeader) return undefined;\n\n // Parse Set-Cookie header for the specified cookie (format: \"name=value; Path=/; ...\")\n const regex = new RegExp(`${cookieName}=([^;]+)`);\n const match = setCookieHeader.match(regex);\n return match?.[1];\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n AuthConfig,\n AuthNamespace,\n AuthResponse,\n TokenResponse,\n RawTokenResult,\n LoginAsGuestOptions,\n LoginWithCredentialsOptions,\n RefreshTokenOptions,\n LogoutOptions,\n PasswordlessAuthorizeOptions,\n PasswordlessExchangeTokenOptions,\n PasswordRequestResetOptions,\n PasswordResetOptions,\n OtpRequestOptions,\n OtpVerifyOptions,\n SocialGetAuthorizationUrlOptions,\n SocialAuthorizationUrlResult,\n SocialExchangeCodeOptions,\n} from './types';\nimport {\n createCodeVerifier,\n generateCodeChallenge,\n getCodeAndUsidFromUrl,\n createBasicAuthHeader,\n extractCookieFromResponse,\n} from './utils';\n\n// Content-Type header for form-urlencoded endpoints (required by openapi-fetch for proper serialization)\nconst FORM_URLENCODED_HEADER = { 'Content-Type': 'application/x-www-form-urlencoded' };\n\n// Cookie name for DemandWare Session ID (used for hybrid storefront session bridge)\nconst COOKIE_DWSID = 'dwsid';\n\n// Re-export types for convenience\nexport type { AuthConfig, AuthNamespace, AuthResponse, TokenResponse, PasswordActionMode } from './types';\nexport type { LoginAsGuestOptions, LoginWithCredentialsOptions, RefreshTokenOptions, LogoutOptions } from './types';\nexport type { PasswordlessAuthorizeOptions, PasswordlessExchangeTokenOptions } from './types';\nexport type { PasswordRequestResetOptions, PasswordResetOptions } from './types';\nexport type { OtpRequestOptions, OtpVerifyOptions } from './types';\nexport type {\n SocialGetAuthorizationUrlOptions,\n SocialAuthorizationUrlResult,\n SocialExchangeCodeOptions,\n} from './types';\n\n/**\n * Creates the auth helpers namespace.\n *\n * This factory function creates an auth namespace with methods for:\n * - Guest login (public or private SLAS client)\n * - Registered user login with credentials\n * - Token refresh\n * - Logout\n *\n * @param config - Configuration containing the ShopperLogin client and auth parameters\n * @returns The auth namespace with all authentication methods\n *\n * @example\n * ```typescript\n * const auth = createAuthHelpers({\n * shopperLoginClient: clients.shopperLogin,\n * clientId: 'your-client-id',\n * clientSecret: process.env.SLAS_SECRET, // optional, for private client\n * redirectUri: 'https://example.com/callback',\n * organizationId: 'f_ecom_xxx',\n * siteId: 'RefArch',\n * });\n *\n * const tokens = await auth.loginAsGuest();\n * ```\n */\nexport function createAuthHelpers(config: AuthConfig): AuthNamespace {\n const { shopperLoginClient, clientId, clientSecret, redirectUri, siteId, baseUrl, organizationId, proxyHost } =\n config;\n\n const isPrivateClient = !!clientSecret;\n\n /**\n * Adds the dwsid value to TokenResponse (extracted from Set-Cookie header).\n */\n function addDwsidToTokenData(result: RawTokenResult): AuthResponse {\n const dwsid = extractCookieFromResponse(result.response, COOKIE_DWSID);\n return { ...result.data, dwsid };\n }\n\n /**\n * Guest login using client_credentials grant.\n * Used for private SLAS clients (with clientSecret) and workspace environments.\n * Authorization header is included only when clientSecret is available.\n */\n async function loginGuestClientCredentials(options: LoginAsGuestOptions = {}): Promise<RawTokenResult> {\n const { usid, dnt } = options;\n\n const result = await shopperLoginClient.getAccessToken({\n params: {\n ...(clientSecret && {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n }),\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'client_credentials',\n channel_id: siteId,\n ...(usid && { usid }),\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return { data: result.data, response: result.response };\n }\n\n /**\n * Guest login for public SLAS client using PKCE flow.\n */\n async function loginGuestPublic(options: LoginAsGuestOptions = {}): Promise<RawTokenResult> {\n const { usid, dnt } = options;\n\n // Step 1: Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n // Step 2: Call authorize endpoint to get authorization code\n // The authorizeCustomer endpoint returns a 303 redirect with code and usid\n // IMPORTANT: Use redirect: 'manual' to prevent fetch from following the redirect\n // Otherwise, fetch would follow the redirect to our callback URL, triggering\n // the auth middleware again and causing an infinite loop\n const authorizeResult = await shopperLoginClient.authorizeCustomer({\n params: {\n query: {\n client_id: clientId,\n channel_id: siteId,\n redirect_uri: redirectUri,\n response_type: 'code',\n hint: 'guest',\n code_challenge: codeChallenge,\n ...(usid && { usid }),\n },\n },\n redirect: 'manual',\n });\n\n // Extract code and usid from the Location header (since we used redirect: 'manual')\n const redirectUrl = authorizeResult.response.headers.get('location') || '';\n const { code, usid: returnedUsid } = getCodeAndUsidFromUrl(redirectUrl);\n\n if (!code) {\n throw new Error('Failed to get authorization code from guest login');\n }\n\n // Step 3: Exchange authorization code for tokens\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'authorization_code_pkce',\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: redirectUri,\n usid: returnedUsid,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return { data: tokenResult.data, response: tokenResult.response };\n }\n\n return {\n /**\n * Login as a guest user.\n * Automatically uses the appropriate flow based on configuration:\n * - Private client or workspace (clientSecret or proxyHost set): client_credentials grant\n * - Public client: PKCE flow\n */\n loginAsGuest: async (options: LoginAsGuestOptions = {}): Promise<AuthResponse> => {\n const result =\n proxyHost || isPrivateClient\n ? await loginGuestClientCredentials(options)\n : await loginGuestPublic(options);\n return addDwsidToTokenData(result);\n },\n\n /**\n * Login with username and password credentials.\n * Uses the B2C registered user login flow with PKCE.\n */\n loginWithCredentials: async (credentials: LoginWithCredentialsOptions): Promise<AuthResponse> => {\n const { username, password, usid, dnt } = credentials;\n\n // Step 1: Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n // Step 2: Authenticate customer with username/password\n // This returns a 303 redirect with authorization code\n // IMPORTANT: Use redirect: 'manual' to prevent fetch from following the redirect\n // Note: Authorization goes in params.header (OpenAPI-defined), Content-Type in headers (request-level)\n const authResult = await shopperLoginClient.authenticateCustomer({\n params: {\n header: {\n Authorization: `Basic ${btoa(`${username}:${password}`)}`,\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n client_id: clientId,\n channel_id: siteId,\n redirect_uri: redirectUri,\n response_type: 'code',\n code_challenge: codeChallenge,\n ...(usid && { usid }),\n },\n redirect: 'manual',\n });\n\n // Extract code and usid from the Location header (since we used redirect: 'manual')\n const redirectUrl = authResult.response.headers.get('location') || '';\n const { code, usid: returnedUsid } = getCodeAndUsidFromUrl(redirectUrl);\n\n if (!code) {\n throw new Error('Failed to get authorization code from credentials login');\n }\n\n // Step 3: Exchange authorization code for tokens\n const tokenBody = {\n grant_type: 'authorization_code_pkce' as const,\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: redirectUri,\n usid: returnedUsid,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n }\n\n // For public client, no auth header needed\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n },\n\n /**\n * Refresh an access token using a refresh token.\n */\n refreshToken: async (options: RefreshTokenOptions): Promise<AuthResponse> => {\n const { refreshToken, dnt } = options;\n\n const body = {\n grant_type: 'refresh_token' as const,\n refresh_token: refreshToken,\n client_id: clientId,\n channel_id: siteId,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const result = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body,\n });\n return addDwsidToTokenData({ data: result.data, response: result.response });\n }\n\n // For public client, no auth header needed\n const result = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body,\n });\n return addDwsidToTokenData({ data: result.data, response: result.response });\n },\n\n /**\n * Logout a shopper and revoke tokens.\n */\n logout: async (options: LogoutOptions): Promise<TokenResponse> => {\n const { accessToken, refreshToken } = options;\n\n const result = await shopperLoginClient.logoutCustomer({\n params: {\n header: {\n Authorization: `Bearer ${accessToken}`,\n },\n query: {\n client_id: clientId,\n channel_id: siteId,\n refresh_token: refreshToken,\n },\n },\n });\n\n return result.data;\n },\n\n /**\n * Social/IDP login namespace.\n * Provides methods for social login via Google, Facebook, Apple, etc.\n */\n social: {\n getAuthorizationUrl: async (\n options: SocialGetAuthorizationUrlOptions\n ): Promise<SocialAuthorizationUrlResult> => {\n const { hint, redirectUri: overrideRedirectUri, usid } = options;\n\n // Generate PKCE code verifier and challenge\n const codeVerifier = createCodeVerifier();\n const codeChallenge = await generateCodeChallenge(codeVerifier);\n\n const effectiveRedirectUri = overrideRedirectUri || redirectUri;\n\n // Construct the full authorization URL by appending to the baseUrl.\n // The baseUrl may include a proxy path (e.g., '/mobify/proxy/api'), so we use\n // a relative path (no leading /) to ensure proper concatenation.\n const normalizedBaseUrl = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;\n const authorizePath = `shopper/auth/v1/organizations/${organizationId}/oauth2/authorize`;\n const authorizeUrl = new URL(authorizePath, normalizedBaseUrl);\n\n authorizeUrl.searchParams.set('client_id', clientId);\n authorizeUrl.searchParams.set('channel_id', siteId);\n authorizeUrl.searchParams.set('redirect_uri', effectiveRedirectUri);\n authorizeUrl.searchParams.set('response_type', 'code');\n authorizeUrl.searchParams.set('hint', hint);\n authorizeUrl.searchParams.set('code_challenge', codeChallenge);\n if (usid) {\n authorizeUrl.searchParams.set('usid', usid);\n }\n\n return {\n url: authorizeUrl.toString(),\n codeVerifier,\n };\n },\n\n exchangeCode: async (options: SocialExchangeCodeOptions): Promise<AuthResponse> => {\n const { code, codeVerifier, redirectUri: callbackRedirectUri, usid, dnt } = options;\n\n const tokenBody = {\n grant_type: 'authorization_code_pkce' as const,\n client_id: clientId,\n channel_id: siteId,\n code,\n code_verifier: codeVerifier,\n redirect_uri: callbackRedirectUri,\n ...(usid && { usid }),\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n }\n\n // For public client, no auth header needed\n const tokenResult = await shopperLoginClient.getAccessToken({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: tokenBody,\n });\n return addDwsidToTokenData({ data: tokenResult.data, response: tokenResult.response });\n },\n },\n\n /**\n * Passwordless login namespace.\n * Only available when clientSecret is configured (private SLAS client).\n */\n passwordless: {\n authorize: async (options: PasswordlessAuthorizeOptions) => {\n const {\n userId,\n callbackUri,\n usid,\n mode = 'email',\n locale,\n registerCustomer,\n lastName,\n email,\n firstName,\n phoneNumber,\n customerNo,\n strictVerify,\n } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for passwordless login');\n }\n\n if (mode === 'callback' && !callbackUri) {\n throw new Error('callbackUri is required for callback mode');\n }\n\n const requestBody = {\n user_id: userId,\n mode,\n channel_id: siteId,\n ...(mode === 'callback' && callbackUri && { callback_uri: callbackUri }),\n ...(usid && { usid }),\n ...(locale && { locale }),\n ...(registerCustomer && lastName && { last_name: lastName }),\n ...(registerCustomer && email && { email }),\n ...(registerCustomer && firstName && { first_name: firstName }),\n ...(phoneNumber && { phone_number: phoneNumber }),\n ...(customerNo && { customer_no: customerNo }),\n };\n\n const query: Record<string, string> = {};\n if (registerCustomer === true) query.register_customer = 'true';\n if (strictVerify === true) query.strict_verify = 'true';\n\n return shopperLoginClient.authorizePasswordlessCustomer({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n ...(Object.keys(query).length > 0 && { query }),\n },\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n },\n\n exchangeToken: async (options: PasswordlessExchangeTokenOptions): Promise<AuthResponse> => {\n const { pwdlessLoginToken, dnt } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for passwordless token exchange');\n }\n\n const codeVerifier = createCodeVerifier();\n\n const result = await shopperLoginClient.getPasswordLessAccessToken({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: {\n grant_type: 'client_credentials' as const,\n hint: 'pwdless_login',\n pwdless_login_token: pwdlessLoginToken,\n code_verifier: codeVerifier,\n ...(dnt !== undefined && { dnt: dnt.toString() }),\n },\n });\n\n return addDwsidToTokenData({ data: result.data, response: result.response });\n },\n },\n\n /**\n * Password management namespace.\n */\n password: {\n requestReset: async (options: PasswordRequestResetOptions) => {\n const { userId, callbackUri, mode = 'email', locale, codeChallenge, hint = 'cross_device' } = options;\n\n if (mode === 'callback' && !callbackUri) {\n throw new Error('callbackUri is required when mode is \"callback\"');\n }\n\n const headers: Record<string, string> = {\n ...FORM_URLENCODED_HEADER,\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n headers.Authorization = createBasicAuthHeader(clientId, clientSecret);\n }\n\n return shopperLoginClient.getPasswordResetToken({\n params: {},\n headers,\n body: {\n user_id: userId,\n mode,\n channel_id: siteId,\n client_id: clientId,\n ...(mode === 'callback' && callbackUri && { callback_uri: callbackUri }),\n hint,\n ...(locale && { locale }),\n ...(codeChallenge && { code_challenge: codeChallenge }),\n },\n });\n },\n\n reset: async (options: PasswordResetOptions) => {\n const { userId, token, newPassword, codeVerifier, hint = 'cross_device' } = options;\n\n const requestBody = {\n client_id: clientId,\n user_id: userId,\n pwd_action_token: token,\n new_password: newPassword,\n channel_id: siteId,\n hint,\n ...(codeVerifier && { code_verifier: codeVerifier }),\n };\n\n // For private client, include client secret in auth header\n if (isPrivateClient && clientSecret) {\n return shopperLoginClient.resetPassword({\n params: {\n header: {\n Authorization: createBasicAuthHeader(clientId, clientSecret),\n },\n },\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n }\n\n return shopperLoginClient.resetPassword({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n },\n },\n\n /**\n * OTP (One-Time Password) namespace.\n * Only available when clientSecret is configured (private SLAS client).\n */\n otp: {\n request: async (options: OtpRequestOptions) => {\n const { userId, email, mode, locale, callbackUri } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for OTP operations');\n }\n\n if (mode === 'callback' && !callbackUri) {\n throw new Error('callbackUri is required when mode is \"callback\"');\n }\n\n if (mode === 'email' && !email) {\n throw new Error('email is required when mode is \"email\"');\n }\n\n const requestBody = {\n client_id: clientId,\n channel_id: siteId,\n user_id: userId,\n ...(email && { email }),\n mode,\n ...(locale && { locale }),\n ...(callbackUri && { callback_uri: callbackUri }),\n };\n\n return await shopperLoginClient.requestOtp({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: requestBody,\n });\n },\n\n verify: async (options: OtpVerifyOptions) => {\n const { pwdActionToken, userId } = options;\n\n if (!clientSecret) {\n throw new Error('Client secret is required for OTP operations');\n }\n\n return await shopperLoginClient.verifyOtp({\n params: {},\n headers: FORM_URLENCODED_HEADER,\n body: {\n client_id: clientId,\n pwd_action_token: pwdActionToken,\n channel_id: siteId,\n user_id: userId,\n },\n });\n },\n },\n };\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiError } from '../ApiError';\nimport type { Basket, BasketHelpersConfig, BasketHelpersNamespace, GetOrCreateBasketOptions } from './types';\n\nexport type {\n Basket,\n BasketHelpersConfig,\n BasketHelpersNamespace,\n GetOrCreateBasketOptions,\n ShopperBasketsV2Client,\n} from './types';\n\n/**\n * Get an existing basket or create a new one when missing/unavailable.\n *\n * Currency is passed via the basket request body (Shopper Baskets V2).\n *\n * @param config - Helper configuration containing the Shopper Baskets client\n * @param options - Basket identifiers and create options\n * @returns Basket instance (existing or newly created)\n *\n * @example\n * ```ts\n * const basketHelpers = createBasketHelpers({ shopperBasketsClient: clients.shopperBasketsV2 });\n * const basket = await basketHelpers.getOrCreateBasket({\n * params: { path: { basketId } },\n * body: { currency: 'USD' },\n * });\n * ```\n */\nexport function createBasketHelpers(config: BasketHelpersConfig): BasketHelpersNamespace {\n const { shopperBasketsClient } = config;\n\n /**\n * Get an existing basket or create a new one when missing/unavailable.\n *\n * @param options - Request options matching ShopperBasketsV2.getBasket style\n * @returns Basket instance (existing or newly created)\n *\n * @example\n * ```ts\n * const basketHelpers = createBasketHelpers({ shopperBasketsClient: clients.shopperBasketsV2 });\n * const basket = await basketHelpers.getOrCreateBasket({\n * params: { path: { basketId } },\n * body: { currency: 'USD' },\n * });\n * ```\n */\n async function getOrCreateBasket(options: GetOrCreateBasketOptions): Promise<Basket> {\n const basketId = options.params?.path?.basketId;\n const currency = options.body.currency;\n\n const createBasket = async (): Promise<Basket> => {\n try {\n const { data } = await shopperBasketsClient.createBasket({\n params: {\n query: {\n populateCustomerDetails: true,\n },\n },\n body: { currency },\n });\n return data;\n } catch (error) {\n if (error instanceof ApiError) {\n const basketIds = error.body?.basketIds;\n const fallbackId = (Array.isArray(basketIds) ? basketIds : [basketIds].filter(Boolean)).at(0);\n // Quota exceeded sometimes returns 429 (or 400) with basketIds; reuse the provided basket if present.\n if ((error.status === 429 || error.status === 400) && fallbackId) {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId: fallbackId as string } },\n });\n return data;\n }\n }\n throw error;\n }\n };\n\n if (basketId) {\n try {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId } },\n });\n return data;\n } catch (error) {\n if (error instanceof ApiError) {\n // Not found or bad request -> create a fresh basket.\n if (error.status === 404 || error.status === 400) {\n return createBasket();\n }\n\n // Quota exceeded: API returns 429 with basketIds to reuse.\n const basketIds = error.body?.basketIds;\n const fallbackId = (Array.isArray(basketIds) ? basketIds : [basketIds].filter(Boolean)).at(0);\n if (error.status === 429 && fallbackId) {\n const { data } = await shopperBasketsClient.getBasket({\n params: { path: { basketId: fallbackId as string } },\n });\n return data;\n }\n }\n throw error;\n }\n }\n\n return createBasket();\n }\n\n return { getOrCreateBasket };\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Single source of truth for built-in SCAPI client configuration.\n *\n * Both `createCommerceApiClients` (runtime) and `sfnext scapi add` (dev CLI) read from\n * this map so an override registered via the CLI inherits the same per-client semantics\n * the SDK uses internally — locale-awareness, base-path — and the two stay in sync by\n * construction rather than by hand-mirroring.\n *\n * Each built-in SCAPI schema includes `/organizations/{organizationId}` in its path\n * patterns (and thus in the generated ops map's BASE_PATH), so the URL-prefix here is\n * the part *before* the org segment. Both the runtime and the CLI build the final URL\n * the same way: `${apiBaseUrl}${client.basePath}` with `/organizations/{organizationId}`\n * supplied via the ops map at request time.\n */\nexport interface BuiltInClientDefault {\n /** URL prefix for this client's API, joined with the SCAPI baseUrl at request time. */\n basePath: string;\n /** Whether this API accepts a `locale` query parameter on its operations. */\n supportsLocale: boolean;\n}\n\nexport const BUILT_IN_CLIENT_DEFAULTS = {\n shopperAvailability: { basePath: '/product/shopper-availability/v1', supportsLocale: false },\n shopperBasketsV1: { basePath: '/checkout/shopper-baskets/v1', supportsLocale: true },\n shopperBasketsV2: { basePath: '/checkout/shopper-baskets/v2', supportsLocale: true },\n shopperConfigurations: { basePath: '/configuration/shopper-configurations/v1', supportsLocale: false },\n shopperConsents: { basePath: '/shopper/shopper-consents/v1', supportsLocale: true },\n shopperContext: { basePath: '/shopper/shopper-context/v1', supportsLocale: false },\n shopperCustomers: { basePath: '/customer/shopper-customers/v1', supportsLocale: false },\n shopperExperience: { basePath: '/experience/shopper-experience/v1', supportsLocale: true },\n shopperGiftCertificates: { basePath: '/pricing/shopper-gift-certificates/v1', supportsLocale: false },\n shopperLogin: { basePath: '/shopper/auth/v1', supportsLocale: false },\n shopperOrders: { basePath: '/checkout/shopper-orders/v1', supportsLocale: true },\n shopperPayments: { basePath: '/checkout/shopper-payments/v1', supportsLocale: false },\n shopperProducts: { basePath: '/product/shopper-products/v1', supportsLocale: true },\n shopperPromotions: { basePath: '/pricing/shopper-promotions/v1', supportsLocale: true },\n shopperSearch: { basePath: '/search/shopper-search/v1', supportsLocale: true },\n shopperSeo: { basePath: '/site/shopper-seo/v1', supportsLocale: true },\n shopperStores: { basePath: '/store/shopper-stores/v1', supportsLocale: true },\n} as const satisfies Record<string, BuiltInClientDefault>;\n\nexport type BuiltInClientKey = keyof typeof BUILT_IN_CLIENT_DEFAULTS;\n\nexport const BUILT_IN_CLIENT_KEYS = Object.keys(BUILT_IN_CLIENT_DEFAULTS) as readonly BuiltInClientKey[];\n\nexport function isBuiltInClientKey(key: string): key is BuiltInClientKey {\n return key in BUILT_IN_CLIENT_DEFAULTS;\n}\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Detects if the application is running in a Salesforce Workspace environment.\n *\n * Salesforce Workspaces set specific SFW_* environment variables that are only present\n * in workspace environments. This detection method is inspired by the ecom gradle build\n * which checks `environmentName == 'ws'`.\n *\n * The presence of these environment variables reliably indicates a workspace environment:\n * - SFW_FALCON_INSTANCE: The Falcon instance ID (e.g., 'aws-dev2-uswest2')\n * - SFW_SERVICE_INSTANCE: The service instance name\n * - SFW_LOCATION: The workspace location code\n *\n * @returns true if running in a Salesforce Workspace environment, false otherwise\n */\nexport function isWorkspaceEnvironment(): boolean {\n // Only check on server-side\n if (typeof window !== 'undefined') {\n return false;\n }\n\n // Check for Salesforce Workspace environment variables\n // These are only set when running in a workspace environment\n const hasSfwVars =\n !!process.env.SFW_FALCON_INSTANCE || !!process.env.SFW_SERVICE_INSTANCE || !!process.env.SFW_LOCATION;\n\n return hasSfwVars;\n}\n\n/**\n * Strips the 'f_ecom_' prefix from organization ID for SLAS authentication in workspace environments.\n *\n * In Salesforce Commerce Cloud Workspace (SCW) environments, organization IDs have different formats\n * depending on the API endpoint:\n * - SLAS auth endpoints: Use base organization ID without prefix (e.g., 'zzzz_s01')\n * - Product/Search APIs: Use full organization ID with prefix (e.g., 'f_ecom_zzzz_s01')\n *\n * @param orgId - The full organization ID (e.g., 'f_ecom_zzzz_s01')\n * @returns The base organization ID without prefix (e.g., 'zzzz_s01')\n */\nexport function getWorkspaceSlasOrgId(orgId: string): string {\n // Strip the 'f_ecom_' prefix if present\n return orgId.replace(/^f_ecom_/, '');\n}\n","/**\n * Auto-generated operation map for shopper-availability-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getAvailability: { m: 'GET' as const, b: BASE_PATH, s: '/availability' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-baskets-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1443 bytes\n * - Abbreviated keys: Saves ~481 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1924 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/baskets' as const;\n\nexport const operations = {\n createBasket: { m: 'POST' as const, b: BASE_PATH, s: '' },\n transferBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/transfer' },\n mergeBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/merge' },\n getBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}' },\n deleteBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}' },\n updateBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}' },\n updateAsAgentBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/agent' },\n updateBillingAddressForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/billing-address' },\n addCouponToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/coupons' },\n removeCouponFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/coupons/{couponItemId}' },\n updateCustomerForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/customer' },\n addGiftCertificateItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items' },\n removeGiftCertificateItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n updateGiftCertificateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n addItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/items' },\n updateItemsInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items' },\n removeItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n updateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n addTaxesForBasketItem: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}/taxes' },\n addPaymentInstrumentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments' },\n removePaymentInstrumentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/payment-methods' },\n addPriceAdjustmentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments' },\n removePriceAdjustmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n updatePriceAdjustmentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n getPriceBooksForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n addPriceBooksToBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n createShipmentForBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/shipments' },\n removeShipmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShipmentForBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShippingAddressForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-address' },\n updateShippingMethodForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-method' },\n getShippingMethodsForShipment: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-methods' },\n updateAsStorefrontBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/storefront' },\n getTaxesFromBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/taxes' },\n addTaxesForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-baskets-v2\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1443 bytes\n * - Abbreviated keys: Saves ~481 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1924 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/baskets' as const;\n\nexport const operations = {\n createBasket: { m: 'POST' as const, b: BASE_PATH, s: '' },\n transferBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/transfer' },\n mergeBasket: { m: 'POST' as const, b: BASE_PATH, s: '/actions/merge' },\n getBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}' },\n deleteBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}' },\n updateBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}' },\n updateAsAgentBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/agent' },\n updateBillingAddressForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/billing-address' },\n addCouponToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/coupons' },\n removeCouponFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/coupons/{couponItemId}' },\n updateCustomerForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/customer' },\n addGiftCertificateItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items' },\n removeGiftCertificateItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n updateGiftCertificateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/gift-certificate-items/{giftCertificateItemId}' },\n addItemToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/items' },\n updateItemsInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items' },\n removeItemFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n updateItemInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}' },\n addTaxesForBasketItem: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/items/{itemId}/taxes' },\n addPaymentInstrumentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments' },\n removePaymentInstrumentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/payment-methods' },\n addPriceAdjustmentToBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments' },\n removePriceAdjustmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n updatePriceAdjustmentInBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/price-adjustments/{priceAdjustmentId}' },\n getPriceBooksForBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n addPriceBooksToBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/price-books' },\n createShipmentForBasket: { m: 'POST' as const, b: BASE_PATH, s: '/{basketId}/shipments' },\n removeShipmentFromBasket: { m: 'DELETE' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShipmentForBasket: { m: 'PATCH' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}' },\n updateShippingAddressForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-address' },\n updateShippingMethodForShipment: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-method' },\n getShippingMethodsForShipment: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/shipments/{shipmentId}/shipping-methods' },\n updateAsStorefrontBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/storefront' },\n getTaxesFromBasket: { m: 'GET' as const, b: BASE_PATH, s: '/{basketId}/taxes' },\n addTaxesForBasket: { m: 'PUT' as const, b: BASE_PATH, s: '/{basketId}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-configurations-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getConfigurations: { m: 'GET' as const, b: BASE_PATH, s: '/configurations' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-consents-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~135 bytes\n * - Abbreviated keys: Saves ~39 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~174 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/subscriptions' as const;\n\nexport const operations = {\n getSubscriptions: { m: 'GET' as const, b: BASE_PATH, s: '' },\n updateSubscription: { m: 'POST' as const, b: BASE_PATH, s: '' },\n updateSubscriptions: { m: 'POST' as const, b: BASE_PATH, s: '/actions/bulk' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-context-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~216 bytes\n * - Abbreviated keys: Saves ~52 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~268 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/shopper-context/{usid}' as const;\n\nexport const operations = {\n getShopperContext: { m: 'GET' as const, b: BASE_PATH, s: '' },\n createShopperContext: { m: 'PUT' as const, b: BASE_PATH, s: '' },\n deleteShopperContext: { m: 'DELETE' as const, b: BASE_PATH, s: '' },\n updateShopperContext: { m: 'PATCH' as const, b: BASE_PATH, s: '' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-customers-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1023 bytes\n * - Abbreviated keys: Saves ~429 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1452 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n registerCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/customers' },\n resetPassword: { m: 'POST' as const, b: BASE_PATH, s: '/customers/password/actions/reset' },\n getResetPasswordToken: { m: 'POST' as const, b: BASE_PATH, s: '/customers/password/actions/create-reset-token' },\n getExternalProfile: { m: 'GET' as const, b: BASE_PATH, s: '/customers/external-profile' },\n registerExternalProfile: { m: 'POST' as const, b: BASE_PATH, s: '/customers/external-profile' },\n getCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}' },\n updateCustomer: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}' },\n createCustomerAddress: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses' },\n getCustomerAddress: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n removeCustomerAddress: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n updateCustomerAddress: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/addresses/{addressName}' },\n getCustomerBaskets: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/baskets' },\n getCustomerOrders: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/orders' },\n updateCustomerPassword: { m: 'PUT' as const, b: BASE_PATH, s: '/customers/{customerId}/password' },\n createCustomerPaymentInstrument: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments' },\n getCustomerPaymentInstrument: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n deleteCustomerPaymentInstrument: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n updateCustomerPaymentInstrument: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-instruments/{paymentInstrumentId}' },\n deleteCustomerPaymentMethodReference: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-method-references/{paymentMethodReferenceId}' },\n setupCustomerPaymentMethodReference: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/payment-method-references/actions/setup' },\n getCustomerProductLists: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists' },\n createCustomerProductList: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists' },\n getCustomerProductList: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n deleteCustomerProductList: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n updateCustomerProductList: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}' },\n createCustomerProductListItem: { m: 'POST' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items' },\n getCustomerProductListItem: { m: 'GET' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n deleteCustomerProductListItem: { m: 'DELETE' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n updateCustomerProductListItem: { m: 'PATCH' as const, b: BASE_PATH, s: '/customers/{customerId}/product-lists/{listId}/items/{itemId}' },\n getPublicProductListsBySearchTerm: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists' },\n getPublicProductList: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}' },\n getPublicProductListItems: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}/items' },\n getProductListItem: { m: 'GET' as const, b: BASE_PATH, s: '/product-lists/{listId}/items/{itemId}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-experience-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~248 bytes\n * - Abbreviated keys: Saves ~104 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~352 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getPages: { m: 'GET' as const, b: BASE_PATH, s: '/pages' },\n getPage: { m: 'GET' as const, b: BASE_PATH, s: '/pages/{pageId}' },\n getContent: { m: 'GET' as const, b: BASE_PATH, s: '/contents/{id}' },\n getMultipleContent: { m: 'GET' as const, b: BASE_PATH, s: '/contents' },\n searchContent: { m: 'GET' as const, b: BASE_PATH, s: '/content-search' },\n getContentFolder: { m: 'GET' as const, b: BASE_PATH, s: '/folders/{id}' },\n getContentFolders: { m: 'GET' as const, b: BASE_PATH, s: '/folders' },\n resolveQualifiers: { m: 'POST' as const, b: BASE_PATH, s: '/qualifiers/resolve' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-gift-certificates-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getGiftCertificate: { m: 'POST' as const, b: BASE_PATH, s: '/gift-certificate' }\n} as const;\n","/**\n * Auto-generated operation map for auth-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~1026 bytes\n * - Abbreviated keys: Saves ~351 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~1377 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/oauth2' as const;\n\nexport const operations = {\n authenticateCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/login' },\n authorizePasswordlessCustomer: { m: 'POST' as const, b: BASE_PATH, s: '/passwordless/login' },\n logoutCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/logout' },\n authorizeCustomer: { m: 'GET' as const, b: BASE_PATH, s: '/authorize' },\n getAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/token' },\n getSessionBridgeAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/session-bridge/token' },\n getTrustedSystemAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/trusted-system/token' },\n getTrustedAgentAuthorizationToken: { m: 'GET' as const, b: BASE_PATH, s: '/trusted-agent/authorize' },\n getTrustedAgentAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/trusted-agent/token' },\n getPasswordResetToken: { m: 'POST' as const, b: BASE_PATH, s: '/password/reset' },\n resetPassword: { m: 'POST' as const, b: BASE_PATH, s: '/password/action' },\n getPasswordLessAccessToken: { m: 'POST' as const, b: BASE_PATH, s: '/passwordless/token' },\n revokeToken: { m: 'POST' as const, b: BASE_PATH, s: '/revoke' },\n introspectToken: { m: 'POST' as const, b: BASE_PATH, s: '/introspect' },\n getUserInfo: { m: 'GET' as const, b: BASE_PATH, s: '/userinfo' },\n getWellknownOpenidConfiguration: { m: 'GET' as const, b: BASE_PATH, s: '/.well-known/openid-configuration' },\n getJwksUri: { m: 'GET' as const, b: BASE_PATH, s: '/jwks' },\n authorizeWebauthnRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/authorize' },\n startWebauthnUserRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/start' },\n finishWebauthnUserRegistration: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/register/finish' },\n startWebauthnAuthentication: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/authenticate/start' },\n finishWebauthnAuthentication: { m: 'POST' as const, b: BASE_PATH, s: '/webauthn/authenticate/finish' },\n getPasskeyUserByLoginId: { m: 'GET' as const, b: BASE_PATH, s: '/webauthn/passkey/user/{loginId}' },\n deletePasskeyUser: { m: 'DELETE' as const, b: BASE_PATH, s: '/webauthn/passkey/user/{loginId}' },\n deletePasskeyCredential: { m: 'DELETE' as const, b: BASE_PATH, s: '/webauthn/passkey/user/{loginId}/credentials/{credentialId}' },\n requestOtp: { m: 'POST' as const, b: BASE_PATH, s: '/otp/request' },\n verifyOtp: { m: 'POST' as const, b: BASE_PATH, s: '/otp/verify' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-orders-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~342 bytes\n * - Abbreviated keys: Saves ~117 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~459 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/orders' as const;\n\nexport const operations = {\n createOrder: { m: 'POST' as const, b: BASE_PATH, s: '' },\n getOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}' },\n guestOrderLookup: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/lookup' },\n failOrder: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/actions/fail' },\n createPaymentInstrumentForOrder: { m: 'POST' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments' },\n removePaymentInstrumentFromOrder: { m: 'DELETE' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments/{paymentInstrumentId}' },\n updatePaymentInstrumentForOrder: { m: 'PATCH' as const, b: BASE_PATH, s: '/{orderNo}/payment-instruments/{paymentInstrumentId}' },\n getPaymentMethodsForOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}/payment-methods' },\n getTaxesFromOrder: { m: 'GET' as const, b: BASE_PATH, s: '/{orderNo}/taxes' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-payments-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getPaymentConfiguration: { m: 'GET' as const, b: BASE_PATH, s: '/payment-configuration' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-products-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~124 bytes\n * - Abbreviated keys: Saves ~52 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~176 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getProducts: { m: 'GET' as const, b: BASE_PATH, s: '/products' },\n getProduct: { m: 'GET' as const, b: BASE_PATH, s: '/products/{id}' },\n getCategories: { m: 'GET' as const, b: BASE_PATH, s: '/categories' },\n getCategory: { m: 'GET' as const, b: BASE_PATH, s: '/categories/{id}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-promotions-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~84 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~110 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/promotions' as const;\n\nexport const operations = {\n getPromotions: { m: 'GET' as const, b: BASE_PATH, s: '' },\n getPromotionsForCampaign: { m: 'GET' as const, b: BASE_PATH, s: '/campaigns/{campaignId}' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-search-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~62 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~88 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n productSearch: { m: 'GET' as const, b: BASE_PATH, s: '/product-search' },\n getSearchSuggestions: { m: 'GET' as const, b: BASE_PATH, s: '/search-suggestions' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-seo-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~31 bytes\n * - Abbreviated keys: Saves ~13 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~44 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}' as const;\n\nexport const operations = {\n getUrlMapping: { m: 'GET' as const, b: BASE_PATH, s: '/url-mapping' }\n} as const;\n","/**\n * Auto-generated operation map for shopper-stores-v1\n *\n * This file maps operation names to their HTTP method and path template.\n * Generated by scripts/generate-operation-maps.ts\n *\n * Optimizations applied:\n * - Base path extraction: Saves ~74 bytes\n * - Abbreviated keys: Saves ~26 bytes (m=method, b=base, s=suffix)\n * - Total savings: ~100 bytes\n *\n * Property abbreviations:\n * - m: HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)\n * - b: Base path shared across operations\n * - s: Suffix path unique to this operation\n *\n * DO NOT EDIT MANUALLY - Changes will be overwritten on next generation\n */\n\nexport const BASE_PATH = '/organizations/{organizationId}/store' as const;\n\nexport const operations = {\n getStores: { m: 'GET' as const, b: BASE_PATH, s: 's' },\n searchStores: { m: 'GET' as const, b: BASE_PATH, s: '-search' }\n} as const;\n","/**\n * Copyright 2026 Salesforce, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport createBaseClient, { type Middleware, type ClientOptions, type Client } from 'openapi-fetch';\nimport type {\n ShopperAvailability,\n ShopperBasketsV1,\n ShopperBasketsV2,\n ShopperConfigurations,\n ShopperConsents,\n ShopperContext,\n ShopperCustomers,\n ShopperExperience,\n ShopperGiftCertificates,\n ShopperLogin,\n ShopperOrders,\n ShopperPayments,\n ShopperProducts,\n ShopperPromotions,\n ShopperSearch,\n ShopperSeo,\n ShopperStores,\n} from './types';\nimport { createClient, type GlobalRequestParameters } from './createClient';\nimport { defaultQuerySerializer } from './defaultQuerySerializer';\nimport type { ProxyClient } from './proxy-types';\nimport { createAuthHelpers, type AuthNamespace } from './auth';\nimport { createBasketHelpers, type BasketHelpersNamespace } from './basket';\nimport { SLAS_AUTH_ENDPOINTS } from './constants';\nimport { BUILT_IN_CLIENT_DEFAULTS } from './built-in-clients';\nimport { getWorkspaceSlasOrgId } from '../workspace';\n\n/**\n * Configuration for creating Commerce API clients.\n *\n * Extends openapi-fetch ClientOptions with required organizationId and siteId\n * which will be automatically merged into all API calls as global request parameters.\n */\nexport interface CommerceApiClientConfig extends ClientOptions {\n /** Base URL for Commerce API (required for building auth URLs) */\n baseUrl: string;\n /** Organization ID - automatically merged into path parameters */\n organizationId: string;\n /** Site ID - automatically merged into query parameters */\n siteId: string;\n /** Locale - automatically merged into query parameters (optional) */\n locale?: string;\n /** SLAS client ID - required for auth operations */\n clientId: string;\n /** SLAS client secret - required for private client auth operations */\n clientSecret?: string;\n /** OAuth redirect URI - must be registered in SLAS configuration */\n redirectUri: string;\n /** Optional callback when access token is invalidated */\n onAuthTokenInvalid?: (response: Response) => void;\n /**\n * Direct SCAPI proxy URL for workspace environments (e.g., 'https://scw:25010').\n * When set, the SDK automatically:\n * - Strips 'f_ecom_' prefix from organizationId for SLAS auth endpoints\n * - Rewrites org IDs back to full form for product/search API endpoints\n * - Uses client_credentials grant for guest login (no PKCE)\n */\n proxyHost?: string;\n}\n\n// Import operation maps for all APIs\nimport { operations as shopperAvailabilityOps } from './generated/shopper-availability-v1.operations';\nimport { operations as shopperBasketsV1Ops } from './generated/shopper-baskets-v1.operations';\nimport { operations as shopperBasketsV2Ops } from './generated/shopper-baskets-v2.operations';\nimport { operations as shopperConfigurationsOps } from './generated/shopper-configurations-v1.operations';\nimport { operations as shopperConsentsOps } from './generated/shopper-consents-v1.operations';\nimport { operations as shopperContextOps } from './generated/shopper-context-v1.operations';\nimport { operations as shopperCustomersOps } from './generated/shopper-customers-v1.operations';\nimport { operations as shopperExperienceOps } from './generated/shopper-experience-v1.operations';\nimport { operations as shopperGiftCertificatesOps } from './generated/shopper-gift-certificates-v1.operations';\n// May 2026 - The shopper login has been renamed to auth but we continue to ship the client namespace as `shopperLogin` for backwards compatibility\nimport { operations as shopperLoginOps } from './generated/auth-v1.operations';\nimport { operations as shopperOrdersOps } from './generated/shopper-orders-v1.operations';\nimport { operations as shopperPaymentsOps } from './generated/shopper-payments-v1.operations';\nimport { operations as shopperProductsOps } from './generated/shopper-products-v1.operations';\nimport { operations as shopperPromotionsOps } from './generated/shopper-promotions-v1.operations';\nimport { operations as shopperSearchOps } from './generated/shopper-search-v1.operations';\nimport { operations as shopperSeoOps } from './generated/shopper-seo-v1.operations';\nimport { operations as shopperStoresOps } from './generated/shopper-stores-v1.operations';\n\nexport type Clients = {\n shopperAvailability: ProxyClient<Client<ShopperAvailability.endpoints>, typeof shopperAvailabilityOps>;\n shopperBasketsV1: ProxyClient<Client<ShopperBasketsV1.endpoints>, typeof shopperBasketsV1Ops>;\n shopperBasketsV2: ProxyClient<Client<ShopperBasketsV2.endpoints>, typeof shopperBasketsV2Ops>;\n shopperConfigurations: ProxyClient<Client<ShopperConfigurations.endpoints>, typeof shopperConfigurationsOps>;\n shopperConsents: ProxyClient<Client<ShopperConsents.endpoints>, typeof shopperConsentsOps>;\n shopperContext: ProxyClient<Client<ShopperContext.endpoints>, typeof shopperContextOps>;\n shopperCustomers: ProxyClient<Client<ShopperCustomers.endpoints>, typeof shopperCustomersOps>;\n shopperExperience: ProxyClient<Client<ShopperExperience.endpoints>, typeof shopperExperienceOps>;\n shopperGiftCertificates: ProxyClient<Client<ShopperGiftCertificates.endpoints>, typeof shopperGiftCertificatesOps>;\n shopperLogin: ProxyClient<Client<ShopperLogin.endpoints>, typeof shopperLoginOps>;\n shopperOrders: ProxyClient<Client<ShopperOrders.endpoints>, typeof shopperOrdersOps>;\n shopperPayments: ProxyClient<Client<ShopperPayments.endpoints>, typeof shopperPaymentsOps>;\n shopperProducts: ProxyClient<Client<ShopperProducts.endpoints>, typeof shopperProductsOps>;\n shopperPromotions: ProxyClient<Client<ShopperPromotions.endpoints>, typeof shopperPromotionsOps>;\n shopperSearch: ProxyClient<Client<ShopperSearch.endpoints>, typeof shopperSearchOps>;\n shopperSeo: ProxyClient<Client<ShopperSeo.endpoints>, typeof shopperSeoOps>;\n shopperStores: ProxyClient<Client<ShopperStores.endpoints>, typeof shopperStoresOps>;\n /** Authentication helpers for SLAS operations */\n auth: AuthNamespace;\n /** Basket helper utilities */\n basket: BasketHelpersNamespace;\n use: (middleware: Middleware) => void;\n};\n\nexport function createCommerceApiClients(config: CommerceApiClientConfig): Clients {\n const {\n baseUrl,\n fetch: customFetch,\n querySerializer,\n organizationId: rawOrganizationId,\n siteId,\n locale,\n clientId,\n clientSecret,\n redirectUri,\n onAuthTokenInvalid,\n proxyHost,\n ...rest\n } = config;\n\n // In workspace environments (proxyHost set), SLAS auth endpoints use the org ID\n // without the 'f_ecom_' prefix, but product/search APIs need the full org ID.\n // We pass the stripped org ID to the SDK and use middleware to rewrite for non-SLAS endpoints.\n const isWorkspace = !!proxyHost;\n const organizationId = isWorkspace ? getWorkspaceSlasOrgId(rawOrganizationId) : rawOrganizationId;\n\n // Validate required parameters\n const requiredParams = { baseUrl, organizationId, siteId, clientId, redirectUri } as const;\n const missingParams = Object.entries(requiredParams)\n .filter(([, value]) => !value)\n .map(([key]) => key);\n if (missingParams.length > 0) {\n throw new Error(\n `Missing required configuration: ${missingParams.join(', ')}. These parameters are required for creating Commerce API clients.`\n );\n }\n\n const clientOptions = {\n ...(customFetch ? { fetch: customFetch } : {}),\n querySerializer: querySerializer || defaultQuerySerializer,\n ...rest,\n };\n\n // Global request parameters to merge organizationId, siteId, and locale into all calls\n const globalParams: GlobalRequestParameters = {\n organizationId,\n siteId,\n ...(locale ? { locale } : {}),\n };\n\n const createClientOptions = onAuthTokenInvalid ? { onAuthTokenInvalid } : undefined;\n\n // Some APIs don't support locale parameter - exclude it for those clients\n const globalParamsWithoutLocale: GlobalRequestParameters = {\n organizationId,\n siteId,\n };\n\n // Per-client basePath and locale-awareness come from BUILT_IN_CLIENT_DEFAULTS so\n // that the dev CLI's `sfnext scapi add` can read the same map and produce overrides\n // that behave identically to the SDK client they replace. Calls are written out\n // explicitly (rather than via a helper) so each client's ops literal type is\n // preserved through to the returned proxy — that drives the per-method type-safe\n // surface on `Clients`.\n const paramsFor = (key: keyof typeof BUILT_IN_CLIENT_DEFAULTS): GlobalRequestParameters =>\n BUILT_IN_CLIENT_DEFAULTS[key].supportsLocale ? globalParams : globalParamsWithoutLocale;\n const baseUrlFor = (key: keyof typeof BUILT_IN_CLIENT_DEFAULTS): string =>\n `${baseUrl}${BUILT_IN_CLIENT_DEFAULTS[key].basePath}`;\n\n const shopperAvailability = createClient(\n createBaseClient<ShopperAvailability.endpoints>({\n baseUrl: baseUrlFor('shopperAvailability'),\n ...clientOptions,\n }),\n shopperAvailabilityOps,\n paramsFor('shopperAvailability'),\n createClientOptions\n );\n const shopperBasketsV1 = createClient(\n createBaseClient<ShopperBasketsV1.endpoints>({ baseUrl: baseUrlFor('shopperBasketsV1'), ...clientOptions }),\n shopperBasketsV1Ops,\n paramsFor('shopperBasketsV1'),\n createClientOptions\n );\n const shopperBasketsV2 = createClient(\n createBaseClient<ShopperBasketsV2.endpoints>({ baseUrl: baseUrlFor('shopperBasketsV2'), ...clientOptions }),\n shopperBasketsV2Ops,\n paramsFor('shopperBasketsV2'),\n createClientOptions\n );\n const shopperConfigurations = createClient(\n createBaseClient<ShopperConfigurations.endpoints>({\n baseUrl: baseUrlFor('shopperConfigurations'),\n ...clientOptions,\n }),\n shopperConfigurationsOps,\n paramsFor('shopperConfigurations'),\n createClientOptions\n );\n const shopperConsents = createClient(\n createBaseClient<ShopperConsents.endpoints>({ baseUrl: baseUrlFor('shopperConsents'), ...clientOptions }),\n shopperConsentsOps,\n paramsFor('shopperConsents'),\n createClientOptions\n );\n const shopperContext = createClient(\n createBaseClient<ShopperContext.endpoints>({ baseUrl: baseUrlFor('shopperContext'), ...clientOptions }),\n shopperContextOps,\n paramsFor('shopperContext'),\n createClientOptions\n );\n const shopperCustomers = createClient(\n createBaseClient<ShopperCustomers.endpoints>({ baseUrl: baseUrlFor('shopperCustomers'), ...clientOptions }),\n shopperCustomersOps,\n paramsFor('shopperCustomers'),\n createClientOptions\n );\n const shopperExperience = createClient(\n createBaseClient<ShopperExperience.endpoints>({ baseUrl: baseUrlFor('shopperExperience'), ...clientOptions }),\n shopperExperienceOps,\n paramsFor('shopperExperience'),\n createClientOptions\n );\n const shopperGiftCertificates = createClient(\n createBaseClient<ShopperGiftCertificates.endpoints>({\n baseUrl: baseUrlFor('shopperGiftCertificates'),\n ...clientOptions,\n }),\n shopperGiftCertificatesOps,\n paramsFor('shopperGiftCertificates'),\n createClientOptions\n );\n const shopperLogin = createClient(\n createBaseClient<ShopperLogin.endpoints>({ baseUrl: baseUrlFor('shopperLogin'), ...clientOptions }),\n shopperLoginOps,\n paramsFor('shopperLogin'),\n createClientOptions\n );\n const shopperOrders = createClient(\n createBaseClient<ShopperOrders.endpoints>({ baseUrl: baseUrlFor('shopperOrders'), ...clientOptions }),\n shopperOrdersOps,\n paramsFor('shopperOrders'),\n createClientOptions\n );\n const shopperPayments = createClient(\n createBaseClient<ShopperPayments.endpoints>({ baseUrl: baseUrlFor('shopperPayments'), ...clientOptions }),\n shopperPaymentsOps,\n paramsFor('shopperPayments'),\n createClientOptions\n );\n const shopperProducts = createClient(\n createBaseClient<ShopperProducts.endpoints>({ baseUrl: baseUrlFor('shopperProducts'), ...clientOptions }),\n shopperProductsOps,\n paramsFor('shopperProducts'),\n createClientOptions\n );\n const shopperPromotions = createClient(\n createBaseClient<ShopperPromotions.endpoints>({ baseUrl: baseUrlFor('shopperPromotions'), ...clientOptions }),\n shopperPromotionsOps,\n paramsFor('shopperPromotions'),\n createClientOptions\n );\n const shopperSearch = createClient(\n createBaseClient<ShopperSearch.endpoints>({ baseUrl: baseUrlFor('shopperSearch'), ...clientOptions }),\n shopperSearchOps,\n paramsFor('shopperSearch'),\n createClientOptions\n );\n const shopperSeo = createClient(\n createBaseClient<ShopperSeo.endpoints>({ baseUrl: baseUrlFor('shopperSeo'), ...clientOptions }),\n shopperSeoOps,\n paramsFor('shopperSeo'),\n createClientOptions\n );\n const shopperStores = createClient(\n createBaseClient<ShopperStores.endpoints>({ baseUrl: baseUrlFor('shopperStores'), ...clientOptions }),\n shopperStoresOps,\n paramsFor('shopperStores'),\n createClientOptions\n );\n\n const allClients = [\n shopperAvailability,\n shopperBasketsV1,\n shopperBasketsV2,\n shopperConfigurations,\n shopperConsents,\n shopperContext,\n shopperCustomers,\n shopperExperience,\n shopperGiftCertificates,\n shopperLogin,\n shopperOrders,\n shopperPayments,\n shopperProducts,\n shopperPromotions,\n shopperSearch,\n shopperSeo,\n shopperStores,\n ];\n\n // In workspace environments, automatically register middleware to rewrite org IDs.\n // SLAS auth endpoints use the stripped org ID (e.g., 'zzzz_s01') while\n // product/search APIs need the full org ID (e.g., 'f_ecom_zzzz_s01').\n if (isWorkspace && organizationId !== rawOrganizationId) {\n const workspaceOrgIdMiddleware: Middleware = {\n onRequest({ request }) {\n const url = new URL(request.url);\n const isSlasAuthEndpoint = SLAS_AUTH_ENDPOINTS.some((path) => url.pathname.includes(path));\n\n // Only rewrite non-SLAS endpoints (product, search, etc.)\n if (!isSlasAuthEndpoint) {\n url.pathname = url.pathname.replace(\n `/organizations/${organizationId}/`,\n `/organizations/${rawOrganizationId}/`\n );\n return new Request(url, request);\n }\n\n return request;\n },\n };\n allClients.forEach((client) => client.use(workspaceOrgIdMiddleware));\n }\n\n // Create auth helpers namespace\n const auth = createAuthHelpers({\n shopperLoginClient: shopperLogin,\n clientId,\n clientSecret,\n redirectUri,\n organizationId,\n siteId,\n baseUrl,\n proxyHost,\n });\n const basket = createBasketHelpers({ shopperBasketsClient: shopperBasketsV2 });\n\n return {\n shopperAvailability,\n shopperBasketsV1,\n shopperBasketsV2,\n shopperConfigurations,\n shopperConsents,\n shopperContext,\n shopperCustomers,\n shopperExperience,\n shopperGiftCertificates,\n shopperLogin,\n shopperOrders,\n shopperPayments,\n shopperProducts,\n shopperPromotions,\n shopperSearch,\n shopperSeo,\n shopperStores,\n auth,\n basket,\n use: (middleware: Middleware) => {\n allClients.forEach((client) => client.use(middleware));\n },\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"AAAA,MAAM,EAAgB,cAChB,MACG,OAAO,SAAY,UAAY,OAAO,SAAS,SAAS,UAAU,MAAM,UAAU,EAAG,EAAE,CAAC,EAAI,IAAM,QAAQ,SAAS,OAE5H,SAAS,GAAW,CAClB,OAAO,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAG,GAAG,CAEhD,SAASA,EAAa,EAAe,CACnC,GAAI,CACF,UAAU,GACV,QAAS,EAAgB,WAAW,QACpC,MAAO,EAAY,WAAW,MAC9B,gBAAiB,EACjB,eAAgB,EAChB,QAAS,EACT,iBAAiB,IAAK,GACtB,GAAG,GACD,CAAE,GAAG,EAAe,CACxB,EAAiB,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