From 076cc3fc76515175d0304404c39e207c965738e5 Mon Sep 17 00:00:00 2001 From: kbode Date: Wed, 29 Oct 2025 15:58:52 +0100 Subject: [PATCH 01/19] W-18557453 added build step to update apis using a version map file + step to update the version file it self with the latest available version --- .depcheckrc.yml | 2 + api-versions.txt | 15 + apis/shopper-baskets-oas-1.9.0/.metadata.json | 9 - apis/shopper-baskets-oas-2.1.0/.metadata.json | 17 - .../shopper-consents-oas-1.1.0/.metadata.json | 17 - apis/shopper-context-oas-1.1.1/.metadata.json | 17 - .../.metadata.json | 17 - .../.metadata.json | 17 - .../.metadata.json | 17 - apis/shopper-login-oas-1.39.41/.metadata.json | 17 - apis/shopper-orders-oas-1.5.0/.metadata.json | 17 - apis/shopper-payments-oas-1.1.0/exchange.json | 12 + .../shopper-payments-oas-v1-public.yaml | 328 +++++ .../.metadata.json | 17 - .../.metadata.json | 17 - apis/shopper-search-oas-1.3.0/.metadata.json | 17 - apis/shopper-seo-oas-1.0.13/.metadata.json | 17 - apis/shopper-stores-oas-1.0.17/.metadata.json | 17 - package.json | 7 +- scripts/download-apis.ts | 82 ++ scripts/updateApiVersions.test.ts | 131 ++ scripts/updateApiVersions.ts | 234 ++++ scripts/updateApis.ts | 135 +- scripts/utils.test.ts | 33 - scripts/utils.ts | 65 +- yarn.lock | 1197 ++++++++++++++++- 26 files changed, 2102 insertions(+), 369 deletions(-) create mode 100644 api-versions.txt delete mode 100644 apis/shopper-baskets-oas-1.9.0/.metadata.json delete mode 100644 apis/shopper-baskets-oas-2.1.0/.metadata.json delete mode 100644 apis/shopper-consents-oas-1.1.0/.metadata.json delete mode 100644 apis/shopper-context-oas-1.1.1/.metadata.json delete mode 100644 apis/shopper-customers-oas-1.1.1/.metadata.json delete mode 100644 apis/shopper-experience-oas-1.0.7/.metadata.json delete mode 100644 apis/shopper-gift-certificates-oas-1.0.26/.metadata.json delete mode 100644 apis/shopper-login-oas-1.39.41/.metadata.json delete mode 100644 apis/shopper-orders-oas-1.5.0/.metadata.json create mode 100644 apis/shopper-payments-oas-1.1.0/exchange.json create mode 100644 apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml delete mode 100644 apis/shopper-products-oas-1.0.37/.metadata.json delete mode 100644 apis/shopper-promotions-oas-1.0.36/.metadata.json delete mode 100644 apis/shopper-search-oas-1.3.0/.metadata.json delete mode 100644 apis/shopper-seo-oas-1.0.13/.metadata.json delete mode 100644 apis/shopper-stores-oas-1.0.17/.metadata.json create mode 100644 scripts/download-apis.ts create mode 100644 scripts/updateApiVersions.test.ts create mode 100644 scripts/updateApiVersions.ts delete mode 100644 scripts/utils.test.ts diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 9b655210..53d26784 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -2,6 +2,8 @@ ignores: # Include an explanation why the package is ignored - '@babel/*' # Used in babel.config.js and babel.config.jest.js - '@types/react-dom' # Used in src/index.jsx + - anypoint-cli-exchange-plugin # CLI tool executed via execSync in scripts, not imported + - anypoint-cli-v4 # CLI tool executed via execSync in scripts, not imported - jest-environment-jsdom-sixteen # Used by test:react script in package.json - lib # Used in App.jsx, references local directory - node-fetch # False positive - clientConfig.ts imports the type from @types/node-fetch diff --git a/api-versions.txt b/api-versions.txt new file mode 100644 index 00000000..ca186dda --- /dev/null +++ b/api-versions.txt @@ -0,0 +1,15 @@ +shopper-baskets-oas-v1=1.9.0 +shopper-baskets-oas-v2=2.1.0 +shopper-consents-oas-v1=1.1.0 +shopper-context-oas-v1=1.1.1 +shopper-customers-oas-v1=1.1.1 +shopper-experience-oas-v1=1.0.7 +shopper-gift-certificates-oas-v1=1.0.26 +shopper-login-oas-v1=1.39.41 +shopper-orders-oas-v1=1.5.0 +shopper-products-oas-v1=1.0.37 +shopper-promotions-oas-v1=1.0.36 +shopper-search-oas-v1=1.3.0 +shopper-seo-oas-v1=1.0.13 +shopper-stores-oas-v1=1.0.17 +shopper-payments-oas-v1=1.1.0 diff --git a/apis/shopper-baskets-oas-1.9.0/.metadata.json b/apis/shopper-baskets-oas-1.9.0/.metadata.json deleted file mode 100644 index 0b8ca2fc..00000000 --- a/apis/shopper-baskets-oas-1.9.0/.metadata.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0", - "name": "Shopper Baskets OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-baskets-oas", - "version": "1.9.0", - "categories": {} -} diff --git a/apis/shopper-baskets-oas-2.1.0/.metadata.json b/apis/shopper-baskets-oas-2.1.0/.metadata.json deleted file mode 100644 index ac719306..00000000 --- a/apis/shopper-baskets-oas-2.1.0/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.1.0", - "name": "Shopper Baskets OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-baskets-oas", - "version": "2.1.0", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-consents-oas-1.1.0/.metadata.json b/apis/shopper-consents-oas-1.1.0/.metadata.json deleted file mode 100644 index 9d50a5cc..00000000 --- a/apis/shopper-consents-oas-1.1.0/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-consents-oas/1.1.0", - "name": "Shopper Consents OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-consents-oas", - "version": "1.1.0", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-context-oas-1.1.1/.metadata.json b/apis/shopper-context-oas-1.1.1/.metadata.json deleted file mode 100644 index adc2fd1e..00000000 --- a/apis/shopper-context-oas-1.1.1/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-context-oas/1.1.1", - "name": "Shopper Context OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-context-oas", - "version": "1.1.1", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-customers-oas-1.1.1/.metadata.json b/apis/shopper-customers-oas-1.1.1/.metadata.json deleted file mode 100644 index 4f707d38..00000000 --- a/apis/shopper-customers-oas-1.1.1/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-customers-oas/1.1.1", - "name": "Shopper Customers OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-customers-oas", - "version": "1.1.1", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-experience-oas-1.0.7/.metadata.json b/apis/shopper-experience-oas-1.0.7/.metadata.json deleted file mode 100644 index d08f0ad4..00000000 --- a/apis/shopper-experience-oas-1.0.7/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-experience-oas/1.0.7", - "name": "Shopper Experience OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-experience-oas", - "version": "1.0.7", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-gift-certificates-oas-1.0.26/.metadata.json b/apis/shopper-gift-certificates-oas-1.0.26/.metadata.json deleted file mode 100644 index c422b797..00000000 --- a/apis/shopper-gift-certificates-oas-1.0.26/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-gift-certificates-oas/1.0.26", - "name": "Shopper Gift Certificates OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-gift-certificates-oas", - "version": "1.0.26", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-login-oas-1.39.41/.metadata.json b/apis/shopper-login-oas-1.39.41/.metadata.json deleted file mode 100644 index 17ccb4aa..00000000 --- a/apis/shopper-login-oas-1.39.41/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-login-oas/1.39.41", - "name": "Shopper Login OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-login-oas", - "version": "1.39.41", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-orders-oas-1.5.0/.metadata.json b/apis/shopper-orders-oas-1.5.0/.metadata.json deleted file mode 100644 index 5e25c84b..00000000 --- a/apis/shopper-orders-oas-1.5.0/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-orders-oas/1.5.0", - "name": "Shopper Orders OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-orders-oas", - "version": "1.5.0", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-payments-oas-1.1.0/exchange.json b/apis/shopper-payments-oas-1.1.0/exchange.json new file mode 100644 index 00000000..f3e3edf9 --- /dev/null +++ b/apis/shopper-payments-oas-1.1.0/exchange.json @@ -0,0 +1,12 @@ +{ + "main": "shopper-payments-oas-v1-public.yaml", + "name": "Shopper Payments OAS", + "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", + "assetId": "shopper-payments-oas", + "version": "1.1.0", + "classifier": "oas", + "tags": [], + "descriptorVersion": "1.0.0", + "organizationId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", + "apiVersion": "v1" +} \ No newline at end of file diff --git a/apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml b/apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml new file mode 100644 index 00000000..82449b3b --- /dev/null +++ b/apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml @@ -0,0 +1,328 @@ +openapi: 3.0.3 +info: + x-api-type: Shopper + x-api-family: Checkout + title: Shopper Payments + version: 1.1.0 + description: "# API Overview\n\nUse the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.\n\nThe Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.\n\n## Key Features\n\nThe Shopper Payments API includes the following capabilities:\n\n- **Payment Configuration Retrieval**: Get complete payment configuration for an organization\n- **Payment Method Set Information**: Access details about configured payment method set accounts\n- **Gateway Response Data**: Retrieve payment processor gateway information and supported payment methods\n- **Payment Modes Configuration**: View supported payment modes (Multistep, Express) for each payment method\n- **SDK Version Information**: Get the current SDK version being used\n\n## Payment Configuration Endpoint\n\nThe main endpoint `/organizations/{organizationId}/payment-configuration` provides:\n\n### Configuration Settings\n- Multi-step checkout enablement status\n- Express checkout enablement status \n- Automatic card capture settings\n- Zone identification\n- Saved payment method configuration\n- Merchant account identification\n\n### Payment Method Set Accounts\n- Account identifiers and configurations\n- Payment processor API keys and settings\n- Gateway identifiers and response data\n- Live/test mode indicators\n- Vendor information (Stripe, Adyen, PayPal, etc.)\n\n### Payment Methods\n- Supported payment method types (card, paypal, applepay, etc.)\n- Available payment modes for each method\n- Account associations\n\n## Gateway Response Handling\n\nThe API handles varying gateway response formats:\n- **Active Gateways**: Return detailed payment method information including supported card brands\n- **Inactive/Pending Gateways**: May return null gateway response data\n- **Multiple Vendors**: Support for different payment processors with vendor-specific configurations\n\n## Authentication & Authorization\n\nThe client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Getting Started\n\nTo use the Shopper Payments API:\n\n1. Authenticate with the appropriate scopes (`sfcc.shopper-payments.rw`)\n2. Make a GET request to `/organizations/{organizationId}/payment-configuration`\n3. Process the returned payment configuration data for your application\n\n## Use Cases\n\n### Payment Method Discovery\nRetrieve available payment methods and their capabilities for dynamic payment form generation.\n\n### Gateway Status Monitoring\nCheck the status and configuration of payment gateways and processors.\n\n### Payment Flow Configuration\nDetermine supported payment modes (multi-step vs express) for different payment methods.\n\n### SDK Version Management\nEnsure compatibility by checking the current SDK version requirements.\n\nFor detailed implementation examples and best practices, refer to the Commerce Cloud documentation. " +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1 + variables: + shortCode: + default: shortCode +tags: + - name: Payment Configuration + description: Operations related to payment configuration +paths: + /organizations/{organizationId}/payment-configuration: + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/currency' + - $ref: '#/components/parameters/countryCode' + - $ref: '#/components/parameters/zoneId' + get: + description: |- + Retrieves the payment configuration for the organization. + + **Parameters:** + - `siteId`: Required. The site identifier for context-specific configuration + - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration + - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration + + **Response Behavior:** + - Returns payment configuration data when available + - Returns null values for missing data (e.g., when account not found or payments zone not found) + operationId: getPaymentConfiguration + summary: Get payment configuration + security: + - ShopperToken: + - sfcc.shopper-baskets-orders + - sfcc.shopper-baskets-orders.rw + responses: + '200': + description: Payment configuration details. + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentConfiguration' + examples: + standardConfiguration: + $ref: '#/components/examples/PaymentConfigurationGet' + nullGatewayResponse: + $ref: '#/components/examples/PaymentConfigurationNullGatewayResponse' + noDataFound: + $ref: '#/components/examples/PaymentConfigurationNoDataFound' + tags: + - Payment Configuration +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints + sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + ISOCurrency: + pattern: ^[A-Z][A-Z][A-Z]$ + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + example: USD + type: string + NoValue: + default: N/A + description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. + example: N/A + enum: + - N/A + type: string + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + example: USD + oneOf: + - $ref: '#/components/schemas/ISOCurrency' + - $ref: '#/components/schemas/NoValue' + CountryCode: + pattern: ^[A-Z][A-Z]$ + description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. + example: US + type: string + ZoneId: + type: string + example: Amer-Zone + description: The unique identifier for a Payments zone. + minLength: 1 + maxLength: 100 + nullable: true + PaymentConfiguration: + type: object + properties: + zoneId: + type: string + example: Amer-Zone + description: The unique identifier for a Payments zone. + pattern: ^[a-zA-Z0-9\-_]{1,100}$ + minLength: 1 + maxLength: 100 + nullable: true + paymentMethodSetAccounts: + type: array + description: List of payment method set accounts + items: + type: object + properties: + accountId: + type: string + description: Account identifier + example: acct_1RegszI5I22eU0I3 + minLength: 1 + maxLength: 100 + config: + type: object + description: Account configuration + properties: + key: + type: string + description: API key for the payment processor + example: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV + maxLength: 200 + additionalProperties: true + gatewayId: + type: string + description: Gateway identifier + example: 0b0SB000000IpdZYAS + minLength: 1 + gatewayResponse: + type: object + nullable: true + description: Gateway response data (optional, can be null) + properties: + paymentMethods: + type: array + description: Available payment methods from gateway + items: + type: object + properties: + brands: + type: array + description: Supported card brands + items: + type: string + example: visa + example: + - amex + - cup + - diners + - discover + - mc + - visa + type: + type: string + description: Payment method type + example: scheme + additionalProperties: true + isLive: + type: boolean + description: Whether the account is in live mode + example: false + vendor: + type: string + description: Payment vendor name + example: Stripe + required: + - accountId + - gatewayId + - isLive + - vendor + paymentMethods: + type: array + description: Configured payment methods + items: + type: object + properties: + accountId: + type: string + description: Associated account identifier + example: acct_1RegszI5I22eU0I3 + minLength: 1 + paymentMethodType: + type: string + description: Type of payment method + example: card + paymentModes: + type: array + description: Supported payment modes + items: + type: string + example: Multistep + example: + - Multistep + required: + - accountId + - paymentMethodType + - paymentModes + sdkVersion: + type: string + description: SDK version to use + example: latest + required: + - paymentMethodSetAccounts + - paymentMethods + - sdkVersion + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + currency: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + name: currency + in: query + required: true + examples: + CurrencyCode: + value: USD + schema: + $ref: '#/components/schemas/CurrencyCode' + countryCode: + name: countryCode + in: query + description: The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering + required: false + schema: + $ref: '#/components/schemas/CountryCode' + zoneId: + description: The zone identifier for the payment configuration. Optional, if specified will return zone specific payment configuration instead of resolving based on the currency and country. + name: zoneId + in: query + required: false + examples: + ZoneId: + value: Amer-Zone + schema: + $ref: '#/components/schemas/ZoneId' + examples: + PaymentConfigurationGet: + value: + zoneId: Amer-Zone + paymentMethodSetAccounts: + - accountId: acct_1RegszI5I22eU0I3 + config: + key: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV + gatewayId: 0b0SB000000IpdZYAS + gatewayResponse: + paymentMethods: + - brands: + - amex + - cup + - diners + - discover + - mc + - visa + type: scheme + isLive: false + vendor: Stripe + paymentMethods: + - accountId: acct_1RegszI5I22eU0I3 + paymentMethodType: card + paymentModes: + - Multistep + sdkVersion: latest + PaymentConfigurationNullGatewayResponse: + value: + zoneId: EU-Central-Zone + paymentMethodSetAccounts: + - accountId: acct_eu_test_456 + config: + key: pk_test_eu_key789 + gatewayId: 0b0SB000000IpdZEU + gatewayResponse: null + isLive: false + vendor: Adyen + paymentMethods: + - accountId: acct_eu_test_456 + paymentMethodType: card + paymentModes: + - Multistep + sdkVersion: latest + PaymentConfigurationNoDataFound: + value: + zoneId: null + paymentMethodSetAccounts: [] + paymentMethods: [] + sdkVersion: latest diff --git a/apis/shopper-products-oas-1.0.37/.metadata.json b/apis/shopper-products-oas-1.0.37/.metadata.json deleted file mode 100644 index 38f266f3..00000000 --- a/apis/shopper-products-oas-1.0.37/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-products-oas/1.0.37", - "name": "Shopper Products OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-products-oas", - "version": "1.0.37", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-promotions-oas-1.0.36/.metadata.json b/apis/shopper-promotions-oas-1.0.36/.metadata.json deleted file mode 100644 index 526c8bd5..00000000 --- a/apis/shopper-promotions-oas-1.0.36/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-promotions-oas/1.0.36", - "name": "Shopper Promotions OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-promotions-oas", - "version": "1.0.36", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-search-oas-1.3.0/.metadata.json b/apis/shopper-search-oas-1.3.0/.metadata.json deleted file mode 100644 index 0f494913..00000000 --- a/apis/shopper-search-oas-1.3.0/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-search-oas/1.3.0", - "name": "Shopper Search OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-search-oas", - "version": "1.3.0", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-seo-oas-1.0.13/.metadata.json b/apis/shopper-seo-oas-1.0.13/.metadata.json deleted file mode 100644 index 871cb6fb..00000000 --- a/apis/shopper-seo-oas-1.0.13/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-seo-oas/1.0.13", - "name": "Shopper Seo OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-seo-oas", - "version": "1.0.13", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/apis/shopper-stores-oas-1.0.17/.metadata.json b/apis/shopper-stores-oas-1.0.17/.metadata.json deleted file mode 100644 index cf46f91e..00000000 --- a/apis/shopper-stores-oas-1.0.17/.metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-stores-oas/1.0.17", - "name": "Shopper Stores OAS", - "description": "", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-stores-oas", - "version": "1.0.17", - "categories": { - "SDK Type": [ - "Isomorphic", - "Commerce" - ], - "Visibility": [ - "External" - ] - } -} diff --git a/package.json b/package.json index b795dc06..ccd75394 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,8 @@ "test": "yarn run check:types && yarn run test:unit && CI=true yarn run test:react", "test:react": "react-scripts test --env=jest-environment-jsdom-sixteen src/environment --setupFilesAfterEnv ./src/test/setupTests.ts", "test:unit": "jest --coverage --testPathIgnorePatterns node_modules src/environment --silent", - "updateApis": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' ./scripts/updateApis.ts && yarn diffApis" + "updateApiVersions": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' scripts/updateApiVersions.ts", + "updateApis": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' scripts/updateApis.ts && yarn diffApis" }, "husky": { "hooks": { @@ -183,12 +184,16 @@ "@rollup/plugin-node-resolve": "8.4.0", "@testing-library/jest-dom": "5.16.4", "@testing-library/react": "10.4.9", + "@types/adm-zip": "^0.5.0", "@types/fs-extra": "^9.0.13", "@types/node-fetch": "^2.6.2", "@types/react-dom": "^16.9.16", "@types/seedrandom": "^3.0.8", "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", + "adm-zip": "^0.5.10", + "anypoint-cli-exchange-plugin": "^1.0.0", + "anypoint-cli-v4": "1.6.12", "autoprefixer": "9.8.8", "bundlesize2": "^0.0.31", "depcheck": "^1.4.3", diff --git a/scripts/download-apis.ts b/scripts/download-apis.ts new file mode 100644 index 00000000..de73cb7f --- /dev/null +++ b/scripts/download-apis.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +/* eslint-disable import/prefer-default-export */ +import {execSync} from 'child_process'; +import path from 'path'; +import fs from 'fs-extra'; +import AdmZip from 'adm-zip'; + + +/** + * Downloads API assets using anypoint-cli-v4 and extracts them to the target directory. + * + * @param apiId - The API ID in Anypoint Exchange + * @param targetDir - Directory where the API assets should be extracted + * @param orgId - the organization ID to download the API from + * @returns Promise that resolves when the download and extraction is complete + */ +export async function downloadApisWithAnypointCli( + apiId: string, + targetDir: string, + orgId: string +): Promise { + try { + // Create a temporary directory for the download + const tempDir = path.join(process.cwd(), 'temp', 'downloads'); + await fs.ensureDir(tempDir); + + // Build the command with proper quoting for special characters + const username = process.env.ANYPOINT_USERNAME || ''; + const password = process.env.ANYPOINT_PASSWORD || ''; + + const cmd = `anypoint-cli-v4 exchange:asset:download ${apiId} ${tempDir} --username '${username}' --password '${password}' --organization=${orgId}`; + + // Execute the command + console.log(`Downloading API ${apiId} using anypoint-cli...`); + execSync(cmd, { + stdio: 'inherit', + cwd: process.cwd(), + env: process.env, + }); + + // Find the downloaded zip file + const files = await fs.readdir(tempDir); + const zipFile: string | undefined = files.find((file: string) => + file.endsWith('.zip') + ); + + if (!zipFile) { + throw new Error(`No zip file found in ${tempDir}`); + } + + const zipPath = path.join(tempDir, zipFile); + console.log(`Extracting ${zipFile} to ${targetDir}...`); + + // Extract the zip file + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call + const zip = new AdmZip(zipPath); + + // Ensure target directory exists + await fs.ensureDir(targetDir); + + // Extract all contents to target directory + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + zip.extractAllTo(targetDir, true); + + // Clean up temporary files + await fs.remove(tempDir); + + console.log( + `Successfully downloaded and extracted API ${apiId} to ${targetDir}` + ); + } catch (error) { + if (error instanceof Error) { + throw new Error(`Failed to download API ${apiId}: ${error.message}`); + } + throw new Error(`Failed to download API ${apiId}`); + } +} diff --git a/scripts/updateApiVersions.test.ts b/scripts/updateApiVersions.test.ts new file mode 100644 index 00000000..1cc52e9a --- /dev/null +++ b/scripts/updateApiVersions.test.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2023, Salesforce, Inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ + +import {execSync} from 'child_process'; +import fs from 'fs-extra'; + +// Mock dependencies +jest.mock('child_process'); +jest.mock('fs-extra'); +jest.mock('dotenv', () => ({ + config: jest.fn(), +})); + +const mockedExecSync = execSync as jest.MockedFunction; +const mockedFs = fs as jest.Mocked; + +describe('checkLatestVersions script', () => { + const mockApiVersionsContent = `shopper-baskets-oas-v1=1.9.0 +shopper-baskets-oas-v2=2.1.0 +shopper-payments-oas-v1=1.1.0`; + + const mockExchangeResponseV1 = { + versions: [ + {version: '1.9.5', status: 'published', createdDate: '2025-10-24'}, + {version: '1.9.0', status: 'published', createdDate: '2025-08-01'}, + {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, + {version: '2.0.0', status: 'published', createdDate: '2025-07-01'}, + ], + id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0', + name: 'Shopper Baskets OAS', + }; + + const mockExchangeResponseV2 = { + versions: [ + {version: '2.2.0', status: 'published', createdDate: '2025-10-25'}, + {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, + {version: '1.9.5', status: 'published', createdDate: '2025-10-24'}, + {version: '1.9.0', status: 'published', createdDate: '2025-08-01'}, + ], + id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.1.0', + name: 'Shopper Baskets OAS', + }; + + beforeEach(() => { + jest.clearAllMocks(); + process.env.ANYPOINT_USERNAME = 'test-user'; + process.env.ANYPOINT_PASSWORD = 'test-pass'; + + // Mock file system operations + mockedFs.existsSync.mockReturnValue(true); + mockedFs.readFileSync.mockReturnValue(mockApiVersionsContent); + mockedFs.writeFileSync.mockImplementation(() => undefined); + }); + + afterEach(() => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + }); + + it('should read api-versions.txt correctly', () => { + mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); + + // The script will be executed when imported, so we need to test the functions + // For now, we verify the mocks are set up correctly + expect(mockedFs.existsSync).toBeDefined(); + expect(mockedFs.readFileSync).toBeDefined(); + }); + + it('should parse JSON response from exchange:asset:describe', () => { + const jsonOutput = JSON.stringify(mockExchangeResponseV1); + mockedExecSync.mockReturnValue(jsonOutput); + + const parsed = JSON.parse(jsonOutput) as typeof mockExchangeResponseV1; + expect(parsed.versions).toHaveLength(4); + expect(parsed.versions[0].version).toBe('1.9.5'); + }); + + it('should filter published versions by major version', () => { + // For v1 (major version 1), should only get 1.x versions + const v1Versions = mockExchangeResponseV1.versions.filter( + v => v.status === 'published' && v.version.startsWith('1.') + ); + expect(v1Versions).toHaveLength(2); + expect(v1Versions[0].version).toBe('1.9.5'); + + // For v2 (major version 2), should only get 2.x versions + const v2Versions = mockExchangeResponseV2.versions.filter( + v => v.status === 'published' && v.version.startsWith('2.') + ); + expect(v2Versions).toHaveLength(2); + expect(v2Versions[0].version).toBe('2.2.0'); + }); + + it('should parse API name with version suffix', () => { + const parseApiName = (name: string) => { + const match = /^(.+?)-(v\d+)$/.exec(name); + if (match) { + return {baseName: match[1], versionSuffix: match[2]}; + } + return {baseName: name, versionSuffix: null}; + }; + + expect(parseApiName('shopper-baskets-oas-v1')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: 'v1', + }); + + expect(parseApiName('shopper-baskets-oas-v2')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: 'v2', + }); + + expect(parseApiName('shopper-payments-oas-v1')).toEqual({ + baseName: 'shopper-payments-oas', + versionSuffix: 'v1', + }); + }); + + it('should throw error when environment variables are missing', () => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + + // This would be tested by running the script without env vars + expect(process.env.ANYPOINT_USERNAME).toBeUndefined(); + expect(process.env.ANYPOINT_PASSWORD).toBeUndefined(); + }); +}); diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts new file mode 100644 index 00000000..5c08b9fd --- /dev/null +++ b/scripts/updateApiVersions.ts @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2023, Salesforce, Inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ + +import {execSync} from 'child_process'; +import path from 'path'; +import fs from 'fs-extra'; +import dotenv from 'dotenv'; + +dotenv.config(); + +// Constants +const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; +const API_VERSIONS_FILE = path.join(__dirname, '../api-versions.txt'); + +// Types for Anypoint Exchange API response +interface AssetVersion { + version: string; + status: string; + createdDate: string; +} + +interface ExchangeAssetDescribeResponse { + versions: AssetVersion[]; + id: string; + name: string; +} + +/** + * Reads the API versions from the api-versions.txt file + * @returns Array of { apiName, version } objects + */ +function readApiVersions(): Array<{apiName: string; version: string}> { + if (!fs.existsSync(API_VERSIONS_FILE)) { + throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); + } + + const content = fs.readFileSync(API_VERSIONS_FILE, 'utf-8'); + return content + .split('\n') + .filter(line => line.trim() && !line.startsWith('#')) + .map(line => { + const [apiName, version] = line.split('=').map(s => s.trim()); + return {apiName, version}; + }); +} + +/** + * Writes updated API versions back to the api-versions.txt file + * @param apiVersions - Array of { apiName, version } objects + */ +function writeApiVersions( + apiVersions: Array<{apiName: string; version: string}> +): void { + const content = apiVersions + .map(({apiName, version}) => `${apiName}=${version}`) + .join('\n'); + fs.writeFileSync(API_VERSIONS_FILE, `${content}\n`, 'utf-8'); + console.log(`Updated ${API_VERSIONS_FILE}`); +} + +/** + * Extracts the major version number from a version string + * @param version - Version string (e.g., '1.9.0', '2.1.0') + * @returns Major version number + */ +function getMajorVersion(version: string): number { + const match = /^(\d+)/.exec(version); + return match ? parseInt(match[1], 10) : 0; +} + +/** + * Parses an API name to extract base name and version suffix + * @param apiNameWithSuffix - API name with optional version suffix (e.g., 'shopper-baskets-oas-v1') + * @returns Object with baseName and versionSuffix (e.g., {baseName: 'shopper-baskets-oas', versionSuffix: 'v1'}) + */ +function parseApiName(apiNameWithSuffix: string): { + baseName: string; + versionSuffix: string | null; +} { + const match = /^(.+?)-(v\d+)$/.exec(apiNameWithSuffix); + if (match) { + return { + baseName: match[1], + versionSuffix: match[2], + }; + } + return { + baseName: apiNameWithSuffix, + versionSuffix: null, + }; +} + +/** + * Gets the latest version of an API from Anypoint Exchange for a specific major version + * @param apiNameWithSuffix - The API name with version suffix (e.g., 'shopper-baskets-oas-v1') + * @param currentVersion - The current version to compare against + * @returns The latest version string for the same major version + */ +function getLatestVersion( + apiNameWithSuffix: string, + currentVersion: string +): string | null { + const username = process.env.ANYPOINT_USERNAME || ''; + const password = process.env.ANYPOINT_PASSWORD || ''; + + // Parse the API name to get base name (without version suffix) + const {baseName, versionSuffix} = parseApiName(apiNameWithSuffix); + const currentMajorVersion = getMajorVersion(currentVersion); + + // Use current version to query the asset (any version works to get all versions) + const assetId = `${ORG_ID}/${baseName}/${currentVersion}`; + const cmd = `anypoint-cli-v4 exchange:asset:describe ${assetId} -o json --username '${username}' --password '${password}'`; + + try { + console.log(`Checking latest version for ${apiNameWithSuffix}`); + const output = execSync(cmd, { + encoding: 'utf-8', + stdio: ['pipe', 'pipe', 'pipe'], + maxBuffer: 10 * 1024 * 1024, // 10MB buffer to handle large JSON responses + }); + + const response = JSON.parse(output) as ExchangeAssetDescribeResponse; + + if (!response.versions || response.versions.length === 0) { + console.warn(`No versions found for ${apiNameWithSuffix}`); + return null; + } + + // Filter for versions matching the same major version + const applicableVersions = response.versions.filter( + v => getMajorVersion(v.version) === currentMajorVersion + ); + + if (applicableVersions.length === 0) { + console.warn( + `No versions found for ${apiNameWithSuffix} with major version ${currentMajorVersion}` + ); + return null; + } + + const latestVersion = applicableVersions[0].version; + + return latestVersion; + } catch (error) { + console.error( + `Error fetching latest version for ${apiNameWithSuffix}:`, + error instanceof Error ? error.message : String(error) + ); + return null; + } +} + +/** + * Main function to check and update API versions + */ +function updateApiVersions(): void { + // Check for required environment variables + if (!process.env.ANYPOINT_USERNAME || !process.env.ANYPOINT_PASSWORD) { + throw new Error( + 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables are set.' + ); + } + + try { + console.log('Reading current API versions...\n'); + const apiVersions = readApiVersions(); + + // Check each API for latest version + const updatedVersions = apiVersions.map(({apiName, version}) => { + const latestVersion = getLatestVersion(apiName, version); + + if (latestVersion && latestVersion !== version) { + return { + apiName, + version: latestVersion, + updated: true, + }; + } + return { + apiName, + version, + updated: false, + }; + }); + + // Summary + const updatesAvailable = updatedVersions.filter(v => v.updated); + + if (updatesAvailable.length > 0) { + console.log(`\n✨ Found ${updatesAvailable.length} update(s):\n`); + updatesAvailable.forEach(({apiName, version}) => { + const oldVersion = + apiVersions.find(v => v.apiName === apiName)?.version || 'unknown'; + console.log(` ${apiName}: ${oldVersion} → ${version}`); + }); + + // Write updated versions to file + console.log('\n📝 Updating api-versions.txt...'); + writeApiVersions( + updatedVersions.map(({apiName, version}) => ({apiName, version})) + ); + console.log('\n✅ API versions file updated successfully!'); + } else { + console.log('\n✅ All APIs are up to date!'); + } + + // print APIs without updates + const noUpdates = updatedVersions.filter(v => !v.updated); + if (noUpdates.length > 0) { + console.log('\nNo updates available for the following APIs:\n'); + noUpdates.forEach(({apiName, version}) => { + console.log(` ${apiName}: ${version}`); + }); + } + } catch (error) { + console.error( + 'Error during version check:', + error instanceof Error ? error.message : String(error) + ); + process.exit(1); + } +} + +// Execute the main function +try { + updateApiVersions(); +} catch (error) { + console.error('Unhandled error:', error); + process.exit(1); +} diff --git a/scripts/updateApis.ts b/scripts/updateApis.ts index 8015c25f..2934a45d 100644 --- a/scripts/updateApis.ts +++ b/scripts/updateApis.ts @@ -8,65 +8,116 @@ import path from 'path'; import fs from 'fs-extra'; import dotenv from 'dotenv'; -import {downloadLatestApis} from './utils'; +import {downloadApisWithAnypointCli} from './download-apis'; +import removeInternalOas from './utils'; dotenv.config(); -if (!process.env.ANYPOINT_USERNAME || !process.env.ANYPOINT_PASSWORD) { - throw new Error( - 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables have been set.' - ); -} - -const OLD_APIS_PATH = path.join(__dirname, '../temp/oldApis'); +// Constants +const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; +const API_VERSIONS_FILE = path.join(__dirname, '../api-versions.txt'); const PRODUCTION_API_PATH = path.join(__dirname, '../apis'); +const OLD_APIS_PATH = path.join(__dirname, '../temp/oldApis'); /** - * Recursively removes all files ending in '-internal.yaml' from a directory and its subdirectories - * @param directoryPath - The path to the directory to process - * @param depth - The depth of the directory to process, we limit the depth to 3 to avoid infinite recursion + * Reads the API versions from the api-versions.txt file + * @returns Array of { apiName, version } objects */ -function removeInternalOas(directoryPath: string, depth = 0): void { - if (depth > 3) { - console.warn( - `Reached maximum depth (${depth}) for directory: ${directoryPath}` - ); - return; +function readApiVersions(): Array<{apiName: string; version: string}> { + if (!fs.existsSync(API_VERSIONS_FILE)) { + throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); } - if (!fs.existsSync(directoryPath)) { - console.warn(`Directory does not exist: ${directoryPath}`); - return; + const content = fs.readFileSync(API_VERSIONS_FILE, 'utf-8'); + return content + .split('\n') + .filter(line => line.trim() && !line.startsWith('#')) + .map(line => { + const [apiName, version] = line.split('=').map(s => s.trim()); + return {apiName, version}; + }); +} + +/** + * Main function to update APIs based on versions in api-versions.txt + */ +async function updateApis(): Promise { + // Check for required environment variables + if (!process.env.ANYPOINT_USERNAME || !process.env.ANYPOINT_PASSWORD) { + throw new Error( + 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables are set.' + ); } - const items = fs.readdirSync(directoryPath); + try { + // Create a backup of existing APIs + if (fs.existsSync(PRODUCTION_API_PATH)) { + console.log(`Backing up existing APIs to ${OLD_APIS_PATH}`); + await fs.move(PRODUCTION_API_PATH, OLD_APIS_PATH, {overwrite: true}); + } + + // Ensure target directory exists + await fs.ensureDir(PRODUCTION_API_PATH); - items.forEach(item => { - const fullPath = path.join(directoryPath, item); - const stat = fs.statSync(fullPath); + // Read API versions and download each one + const apiVersions = readApiVersions(); - if (stat.isDirectory()) { - // Recursively process subdirectories - removeInternalOas(fullPath, depth + 1); - } else if (stat.isFile() && item.endsWith('-internal.yaml')) { - // Remove internal files - fs.removeSync(fullPath); - console.log(`Removed internal file: ${fullPath}`); + // Process all API versions in sequence + await apiVersions.reduce(async (previousPromise, {apiName, version}) => { + // Wait for the previous API to finish processing + await previousPromise; + + // Strip version suffix (e.g., -v1, -v2) from API name for Exchange ID + const baseApiName = apiName.replace(/-(v\d+)$/, ''); + const apiId = `${ORG_ID}/${baseApiName}/${version}`; + console.log(`Processing API: ${apiId}`); + + try { + // Only use the base semantic version without SNAPSHOT or branch build suffixes 1.2.0-master-b70 = 1.2.0 + const versionWithoutSuffix = version.includes('-') + ? version.substring(0, version.indexOf('-')) + : version; + + const apiFolderName = `${baseApiName}-${versionWithoutSuffix}`; + await downloadApisWithAnypointCli( + apiId, + path.join(PRODUCTION_API_PATH, apiFolderName), + ORG_ID + ); + console.log(`Successfully updated ${apiName} to version ${version}`); + } catch (error) { + console.error( + `Error updating ${apiName} (${version}):`, + error instanceof Error ? error.message : String(error) + ); + // Continue with other APIs even if one fails + } + }, Promise.resolve()); + + console.log('API update process completed successfully'); + } catch (error) { + console.error( + 'Error during API update process:', + error instanceof Error ? error.message : String(error) + ); + + // Restore from backup if something went wrong + if (fs.existsSync(OLD_APIS_PATH) && !fs.existsSync(PRODUCTION_API_PATH)) { + console.log('Restoring APIs from backup...'); + await fs.move(OLD_APIS_PATH, PRODUCTION_API_PATH, {overwrite: true}); } - }); -} -// DOWNLOAD PRODUCTION DATA -fs.moveSync(PRODUCTION_API_PATH, OLD_APIS_PATH, {overwrite: true}); -fs.ensureDirSync(PRODUCTION_API_PATH); + process.exit(1); + } +} -downloadLatestApis( - 'category:Visibility = "External" category:"SDK Type" = "Commerce" category:"SDK Type" = "Isomorphic"', - PRODUCTION_API_PATH -) +// Execute the main function +updateApis() .then(() => { - // Remove internal files after download is complete removeInternalOas(OLD_APIS_PATH); removeInternalOas(PRODUCTION_API_PATH); }) - .catch(error => console.log('Error downloading APIs', error)); + .catch(error => { + console.error('Unhandled error:', error); + process.exit(1); + }); diff --git a/scripts/utils.test.ts b/scripts/utils.test.ts deleted file mode 100644 index 6d64a80e..00000000 --- a/scripts/utils.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2020, salesforce.com, inc. - * All rights reserved. - * SPDX-License-Identifier: BSD-3-Clause - * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause - */ -import {download} from '@commerce-apps/raml-toolkit'; -import {downloadLatestApis} from './utils'; - -describe('test downloadLatestApis script', () => { - it('throws error when no results', async () => { - await expect(downloadLatestApis('"noResults"', '/tmp')).rejects.toThrow( - 'No results in Exchange for \'"noResults"\'' - ); - }); - - it('downloads the apis with default search query', async () => { - jest.spyOn(download, 'downloadRestApis').mockResolvedValue(''); - - await expect( - downloadLatestApis('category:Visibility = "External"', '/tmp') - ).resolves.toBeUndefined(); - }); - - it('throws error when download fails', async () => { - jest - .spyOn(download, 'downloadRestApis') - .mockRejectedValue(new Error('It failed.')); - await expect( - downloadLatestApis('category:Visibility = "External"', '/tmp') - ).rejects.toThrow('Failed to download API specs: It failed.'); - }); -}); diff --git a/scripts/utils.ts b/scripts/utils.ts index 6a61258f..60297e5d 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,38 +1,47 @@ /* - * Copyright (c) 2020, salesforce.com, inc. + * Copyright (c) 2023, Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -/* eslint-disable import/prefer-default-export */ -import {download} from '@commerce-apps/raml-toolkit'; + +import path from 'path'; +import fs from 'fs-extra'; /** - * Searches for an API by name and downloads it to a folder. - * - * NOTE: Coverage passes without this function being covered. - * We should have some followup to figure out how to cover it. - * Ive spent hours trying to mock download - * - * @param searchQuery - Query to search exchange - * @param rootPath - Root path to download to - * - * @returns a promise that we will complete + * Recursively removes all files ending in '-internal.yaml' from a directory and its subdirectories + * @param directoryPath - The path to the directory to process + * @param depth - The depth of the directory to process, we limit the depth to 3 to avoid infinite recursion */ -export async function downloadLatestApis( - searchQuery: string, - rootPath: string -): Promise { - const matchedApis = await download.search(searchQuery, undefined, true); - if (!(matchedApis?.length > 0)) { - throw new Error(`No results in Exchange for '${searchQuery}'`); +export default function removeInternalOas( + directoryPath: string, + depth = 0 +): void { + if (depth > 3) { + console.warn( + `Reached maximum depth (${depth}) for directory: ${directoryPath}` + ); + return; } - try { - await download.downloadRestApis(matchedApis, rootPath, true); - } catch (err: unknown) { - if (err instanceof Error) { - err.message = `Failed to download API specs: ${err.message}`; - } - throw err; + + if (!fs.existsSync(directoryPath)) { + console.warn(`Directory does not exist: ${directoryPath}`); + return; } -} + + const items = fs.readdirSync(directoryPath); + + items.forEach(item => { + const fullPath = path.join(directoryPath, item); + const stat = fs.statSync(fullPath); + + if (stat.isDirectory()) { + // Recursively process subdirectories + removeInternalOas(fullPath, depth + 1); + } else if (stat.isFile() && item.endsWith('-internal.yaml')) { + // Remove internal files + fs.removeSync(fullPath); + console.log(`Removed internal file: ${fullPath}`); + } + }); +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 6c0428a9..604c5c53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,23 @@ # yarn lockfile v1 +"@aml-org/amf-antlr-parsers@0.7.25": + version "0.7.25" + resolved "https://registry.yarnpkg.com/@aml-org/amf-antlr-parsers/-/amf-antlr-parsers-0.7.25.tgz#86b76ee7d0fdaff6c3bc321a997043205c03535c" + integrity sha512-JEwX1Ja8SFbcYboOEbZ+t//w1sWULGKRV3x0moDpKR+MWjL69FWy484/u0GXHBYdydtbGHM4NcKltYNOaH5Bmw== + +"@aml-org/amf-custom-validator@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@aml-org/amf-custom-validator/-/amf-custom-validator-1.5.0.tgz#fd616c13df750421f6246b2f1b3123835c2e3733" + integrity sha512-4KBHjZx2UIxSLDwDp0OzpdBIWEoE2QF6oyqlhGU3MopzMmn4bPbOLasnc47/BWqVZYW6jyuPT7TuUOTkvuiBPA== + dependencies: + pako "^2.1.0" + +"@aml-org/amf-validation-profile-dialect@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@aml-org/amf-validation-profile-dialect/-/amf-validation-profile-dialect-1.6.0.tgz#5ecc0762d770ea39eac3fc556848de780989b75f" + integrity sha512-hPz3mnexj8B07qqCsWk87ZZYTZSpnTgBdqylqs0NXDYc3opHL2hYf/36kCxz7cMT/SZZkSJ3oDOb2DH1K1v+TA== + "@ampproject/remapping@^2.1.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" @@ -3017,6 +3034,17 @@ consola "^2.15.0" node-fetch "^2.6.1" +"@oclif/color@^1.0.4": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@oclif/color/-/color-1.0.13.tgz#91a5c9c271f686bb72ce013e67fa363ddaab2f43" + integrity sha512-/2WZxKCNjeHlQogCs1VBtJWlPXjwWke/9gMrwsVsrUt00g2V6LUBvwgwrxhrXepjOmq4IZ5QeNbpDMEOUlx/JA== + dependencies: + ansi-styles "^4.2.1" + chalk "^4.1.0" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + tslib "^2" + "@oclif/command@1.8.4", "@oclif/command@<=1.8.3", "@oclif/command@^1.8.15": version "1.8.3" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.3.tgz#1f8bc2c4ecf94b6659a5134d95da179e1dffad9e" @@ -3065,7 +3093,7 @@ is-wsl "^2.1.1" tslib "^2.3.1" -"@oclif/core@<=0.5.9": +"@oclif/core@1.26.1", "@oclif/core@1.26.2", "@oclif/core@<=0.5.9", "@oclif/core@^1.1.1", "@oclif/core@^1.3.6", "@oclif/core@^2.15.0", "@oclif/core@^2.8.2": version "0.5.9" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-0.5.9.tgz#258a97854a456fb8167a05f13e7f9933877c406d" integrity sha512-zlv7d9pdvEyDqqVWPYSq3YPZ93/kuJTqPRkAf874i/sxbcChQFZMa2750dLeikDwmr38U2GBOKYq8ER/k4gN1w== @@ -3129,6 +3157,22 @@ chalk "^4.1.0" tslib "^2.3.1" +"@oclif/plugin-autocomplete@^2.1.0": + version "2.3.10" + resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-2.3.10.tgz#787f6208cdfe10ffc68ad89e9e7f1a7ad0e8987f" + integrity sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg== + dependencies: + "@oclif/core" "^2.15.0" + chalk "^4.1.0" + debug "^4.3.4" + +"@oclif/plugin-help@5.1.12": + version "5.1.12" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.1.12.tgz#24a18631eb9b22cb55e1a3b8e4f6039fd42727e6" + integrity sha512-HvH/RubJxqCinP0vUWQLTOboT+SfjfL8h40s+PymkWaldIcXlpoRaJX50vz+SjZIs7uewZwEk8fzLqpF/BWXlg== + dependencies: + "@oclif/core" "^1.3.6" + "@oclif/plugin-help@^3.2.4": version "3.3.1" resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.3.1.tgz#36adb4e0173f741df409bb4b69036d24a53bfb24" @@ -3146,6 +3190,53 @@ widest-line "^3.1.0" wrap-ansi "^6.2.0" +"@oclif/plugin-help@^5.1.12": + version "5.2.20" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.2.20.tgz#4035a0ac231f95fb8e334da342175e3ca00f6abc" + integrity sha512-u+GXX/KAGL9S10LxAwNUaWdzbEBARJ92ogmM7g3gDVud2HioCmvWQCDohNRVZ9GYV9oKwZ/M8xwd6a1d95rEKQ== + dependencies: + "@oclif/core" "^2.15.0" + +"@oclif/plugin-not-found@^2.3.1": + version "2.4.3" + resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-2.4.3.tgz#3d24095adb0f3876cb4bcfdfdcb775086cf6d4b5" + integrity sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg== + dependencies: + "@oclif/core" "^2.15.0" + chalk "^4" + fast-levenshtein "^3.0.0" + +"@oclif/plugin-plugins@^2.1.0": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@oclif/plugin-plugins/-/plugin-plugins-2.4.7.tgz#ff094f88e8b0d51d2ae08d1a8d7172aad389a2bb" + integrity sha512-6fzUDLWrSK7n6+EBrEekEEYrYTCneRoOF9TzojkjuFn1+ailvUlr98G90bblxKOyy8fqMe7QjvqwTgIDQ9ZIzg== + dependencies: + "@oclif/color" "^1.0.4" + "@oclif/core" "^2.8.2" + chalk "^4.1.2" + debug "^4.3.4" + fs-extra "^9.0" + http-call "^5.2.2" + load-json-file "^5.3.0" + npm-run-path "^4.0.1" + semver "^7.5.0" + tslib "^2.4.1" + yarn "^1.22.18" + +"@oclif/plugin-version@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@oclif/plugin-version/-/plugin-version-1.0.4.tgz#5fe1bee4438e7950aac3c8fdeb56939726e90b17" + integrity sha512-V9TZQKV4Ql7q0YnLyiebu9RTVvafkgGKM17eqDWyxHF0+qhsze661zcobJBXXRc51ObXUtHUFXamtHoxImO7Tg== + dependencies: + "@oclif/core" "^1.1.1" + +"@oclif/plugin-version@1.3.10": + version "1.3.10" + resolved "https://registry.yarnpkg.com/@oclif/plugin-version/-/plugin-version-1.3.10.tgz#262adba3f5b047be887f0373ec42eab1c98f5ad9" + integrity sha512-TiRZALUcv4hwGTPoTyA3nOWtRew9DT4Ge1FeYx16xnuAsWryvJe3IHXmCm6b1VYhzTJhV2XH5U1DqllrQB2YaA== + dependencies: + "@oclif/core" "^2.15.0" + "@oclif/screen@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493" @@ -3187,6 +3278,20 @@ schema-utils "^2.6.5" source-map "^0.7.3" +"@puppeteer/browsers@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.6.1.tgz#d75aec5010cae377c5e4742bf5e4f62a79c21315" + integrity sha512-aBSREisdsGH890S2rQqK82qmQYU3uFpSH8wcZWHgHzl3LfzsxAKbLNiAG9mO8v1Y0UICBeClICxPJvyr0rcuxg== + dependencies: + debug "^4.4.0" + extract-zip "^2.0.1" + progress "^2.0.3" + proxy-agent "^6.5.0" + semver "^7.6.3" + tar-fs "^3.0.6" + unbzip2-stream "^1.4.3" + yargs "^17.7.2" + "@rdfjs/types@*": version "1.1.0" resolved "https://registry.yarnpkg.com/@rdfjs/types/-/types-1.1.0.tgz#098f180b7cccb03bb416c7b4d03baaa9d480e36b" @@ -3470,6 +3575,13 @@ resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== +"@types/adm-zip@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@types/adm-zip/-/adm-zip-0.5.7.tgz#eec10b6f717d3948beb64aca0abebc4b344ac7e9" + integrity sha512-DNEs/QvmyRLurdQPChqq0Md4zGvPwHerAJYWk9l2jCbD1VPpnzRJorOdiq4zsw09NFbYnhfsoEhWtxIzXpn2yw== + dependencies: + "@types/node" "*" + "@types/aria-query@^4.2.0": version "4.2.2" resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc" @@ -3508,6 +3620,11 @@ dependencies: "@babel/types" "^7.3.0" +"@types/clone@^2.1.1": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.4.tgz#9680f886c935dcf596273f1218abb71efb01531a" + integrity sha512-NKRWaEGaVGVLnGLB2GazvDaZnyweW9FJLLFL5LhywGJB3aqGMT9R/EUoJoSRP4nzofYnZysuDmrEJtJdAqUOtQ== + "@types/eslint@^7.29.0": version "7.29.0" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.29.0.tgz#e56ddc8e542815272720bb0b4ccc2aff9c3e1c78" @@ -3595,6 +3712,11 @@ jest-matcher-utils "^28.0.0" pretty-format "^28.0.0" +"@types/js-yaml@^4.0.5": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" + integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== + "@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" @@ -3648,6 +3770,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.4.tgz#48aedbf35efb3af1248e4cd4d792c730290cd5d6" integrity sha512-M0+G6V0Y4YV8cqzHssZpaNCqvYwlCiulmm0PwpNLF55r/+cT8Ol42CHRU1SEaYFH2rTwiiE1aYg/2g2rrtGdPA== +"@types/node@>=6": + version "24.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.9.1.tgz#b7360b3c789089e57e192695a855aa4f6981a53c" + integrity sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg== + dependencies: + undici-types "~7.16.0" + "@types/node@^13.1.0": version "13.13.52" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7" @@ -3864,6 +3993,18 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + +"@types/zen-observable@^0.8.0": + version "0.8.7" + resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.7.tgz#114e2ffc8d5be4915fdd5bc90668fc0ceaadb760" + integrity sha512-LKzNTjj+2j09wAo/vvVjzgw5qckJJzhdGgWHW7j69QIGdq/KnZrMAMIHQiWGl3Ccflh5/CudBAntTPYdprPltA== + "@typescript-eslint/eslint-plugin@^4.33.0", "@typescript-eslint/eslint-plugin@^4.5.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" @@ -4179,6 +4320,21 @@ resolved "https://registry.yarnpkg.com/@wessberg/stringutil/-/stringutil-1.0.19.tgz#baadcb6f4471fe2d46462a7d7a8294e4b45b29ad" integrity sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg== +"@wry/context@^0.4.0": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8" + integrity sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag== + dependencies: + "@types/node" ">=6" + tslib "^1.9.3" + +"@wry/equality@^0.1.2": + version "0.1.11" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" + integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== + dependencies: + tslib "^1.9.3" + "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -4273,6 +4429,11 @@ adjust-sourcemap-loader@3.0.0: loader-utils "^2.0.0" regex-parser "^2.2.11" +adm-zip@^0.5.10: + version "0.5.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.16.tgz#0b5e4c779f07dedea5805cdccb1147071d94a909" + integrity sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ== + agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -4307,11 +4468,28 @@ ajv-errors@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== +ajv@6.12.6, ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ajv@6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" @@ -4322,15 +4500,15 @@ ajv@6.5.2: json-schema-traverse "^0.4.1" uri-js "^4.2.1" -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== +ajv@^8.0.0, ajv@^8.6.3: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" ajv@^8.0.1: version "8.11.0" @@ -4355,6 +4533,14 @@ amf-client-js@4.7.2: ajv "6.5.2" amf-shacl-node "2.0.0" +amf-client-js@5.4.4: + version "5.4.4" + resolved "https://registry.yarnpkg.com/amf-client-js/-/amf-client-js-5.4.4.tgz#578de890f03ce49a55adb121ad74ede4a5ca027c" + integrity sha512-k2UxZloAHdt3TBdFE1/QYnu85WWf4cZ6gWwf2leN8YWXx0srCSG8zjGjg2paRDlMh1SP9me5Iu2QZupmJzYzrQ== + dependencies: + "@aml-org/amf-antlr-parsers" "0.7.25" + ajv "6.12.6" + amf-shacl-node@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/amf-shacl-node/-/amf-shacl-node-2.0.0.tgz#4849a053aa90f64fa70145779e69fb562f5d3571" @@ -4421,7 +4607,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.0, ansi-styles@^4.2.1: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -4454,6 +4640,263 @@ anymatch@^3.0.0, anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +anypoint-apb@1.5.5: + version "1.5.5" + resolved "https://registry.yarnpkg.com/anypoint-apb/-/anypoint-apb-1.5.5.tgz#45757d754764babb21da3d73e88b949fe521cde3" + integrity sha512-7tWP2M4hm0ZySmichVzdHH+70DonUCyFhDt3rraDr+Ff5dTRW2MaUSnkwdvQo+uIPwKmnHOLwqhVamket+lb4Q== + dependencies: + "@aml-org/amf-antlr-parsers" "0.7.25" + "@aml-org/amf-custom-validator" "1.5.0" + ajv "6.12.6" + +anypoint-cli-account-plugin@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/anypoint-cli-account-plugin/-/anypoint-cli-account-plugin-1.0.9.tgz#3ba641df6c9d5f106ada43c4c51d36287f04a363" + integrity sha512-hOot8xWylAE7mdY+pd/TOw/NZ74HsJ93wFaIGOnFCFWFOeFludRksBHHyaXbmLIrv3f7TyND1g+hWPxbby9gbQ== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-command "1.6.6" + util "^0.12.4" + +anypoint-cli-api-mgr-plugin@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/anypoint-cli-api-mgr-plugin/-/anypoint-cli-api-mgr-plugin-1.4.1.tgz#44052c7b2d0783ee6f3a70cda001efc2c936a6af" + integrity sha512-YBg4deQ7Gsq1MRoMAY4xz8i1+OwG28ku9g0dkPTtWFiBiiKy7eoVutStS8lMmh5jHZw5kDk3ecQizjFGAaXHOw== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + "@types/js-yaml" "^4.0.5" + anypoint-cli-command "1.6.6" + fs-extra "^10.1.0" + graphql-tag "^2.12.6" + js-yaml "^4.1.0" + moment "^2.29.1" + table "^6.7.1" + url-join "^4.0.1" + util "^0.12.4" + +anypoint-cli-cloudhub-plugin@1.4.13: + version "1.4.13" + resolved "https://registry.yarnpkg.com/anypoint-cli-cloudhub-plugin/-/anypoint-cli-cloudhub-plugin-1.4.13.tgz#2793ea0c1ca7f02da2afb1cb7874045725ec38f4" + integrity sha512-b2C6Gg61mqJWdXsDpE6k1Oc8KU7WYIzG/8BMc2k9fjomEFBuvl4e3ONjwX8mbiDqyohdRaYkAW3nX2Y8dN7Umw== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-command "1.6.6" + form-data "^4.0.0" + fs-extra "^10.1.0" + jszip "^3.10.0" + moment "^2.29.3" + upath "^2.0.1" + util "^0.12.4" + +anypoint-cli-command@1.6.6: + version "1.6.6" + resolved "https://registry.yarnpkg.com/anypoint-cli-command/-/anypoint-cli-command-1.6.6.tgz#a796f8e0fa68c7454168fe10685777b1f82e4ff2" + integrity sha512-LvD0+nl2DxwYrXtnmp5dUkRj/pZ+w2SPyAOYz0421+YKT+drecDsz/mSh1cJTBeP7ptBdK/0dPv6D51CPZezSQ== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-help" "5.1.12" + "@oclif/plugin-version" "1.0.4" + apollo-cache-inmemory "^1.6.6" + apollo-client "^2.6.10" + apollo-link-http "^1.5.17" + axios "^1.7.4" + chalk "4.1.2" + clone "^2.1.2" + conf "10.2.0" + cross-fetch "^3.1.4" + crypto "^1.0.1" + crypto-js "^4.2.0" + fs-extra "^10.0.1" + graphql "^15.0.0" + home-dir "^1.0.0" + hpagent "^1.2.0" + https-proxy-agent "^7.0.5" + lodash "^4.17.21" + puppeteer "^23.1.1" + table "^6.7.1" + upath "^2.0.1" + uuid "^8.3.2" + +anypoint-cli-datagraph-plugin@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/anypoint-cli-datagraph-plugin/-/anypoint-cli-datagraph-plugin-1.0.9.tgz#c2a0b9a28e50cb3159a4c6d8cf0f2a5440df26ca" + integrity sha512-vBtXBNgU2SYWFmKjEf+PM7Q6bhsYELIBh9YFbnvv2vuV2GqjpKYXo3aoZ49rYgyJenkPAeYZxF07mhM/ZHNfdA== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + "@types/clone" "^2.1.1" + anypoint-cli-command "1.6.6" + clone "^2.1.2" + util "^0.12.4" + +anypoint-cli-designcenter-plugin@1.0.20: + version "1.0.20" + resolved "https://registry.yarnpkg.com/anypoint-cli-designcenter-plugin/-/anypoint-cli-designcenter-plugin-1.0.20.tgz#edb193e15c72297c4a61ae37932bc4665f12d1c1" + integrity sha512-8VzZmRgyFKshVcRfqkLWYOuxVtPGoG/2B2CWsW8ZAKcdm51GR8l/q/PZkATMsrWKkSoZDJ+57Y8LJqI2MGmPhg== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-command "1.6.6" + fs-extra "^10.0.0" + recursive-readdir "^2.2.2" + upath "^2.0.1" + util "^0.12.4" + +anypoint-cli-exchange-plugin@1.0.12, anypoint-cli-exchange-plugin@^1.0.0: + version "1.0.12" + resolved "https://registry.yarnpkg.com/anypoint-cli-exchange-plugin/-/anypoint-cli-exchange-plugin-1.0.12.tgz#3d0859adaff99d1980152f46ee044ae471e0c24b" + integrity sha512-BZlzua8P4Y0TE6YChI9ldKeBw39vAdB1Djn8xMZAfyTDP7UaubNKt/mWbJ6Z/dKdpEqkbLCFh/ynJnrTZ9BWRw== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.3.10" + anypoint-cli-command "1.6.6" + form-data "^4.0.0" + fs-extra "^10.0.0" + graphql-tag "^2.9.2" + lodash "^4.17.21" + moment "^2.29.1" + os "^0.1.2" + path "^0.12.7" + util "^0.12.4" + +anypoint-cli-governance-plugin@1.0.17: + version "1.0.17" + resolved "https://registry.yarnpkg.com/anypoint-cli-governance-plugin/-/anypoint-cli-governance-plugin-1.0.17.tgz#1e70b91ec1d748185c6c6e63ee13b551d8d28d51" + integrity sha512-4UinQIAqHbwnAtRLz8nSKovuBl4LL9Z2VMz8CqRyUWSlr5TV3TRpslYL/EheXLhRiQ8uq38KKXw1wdkC98jH7w== + dependencies: + "@aml-org/amf-validation-profile-dialect" "1.6.0" + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + amf-client-js "5.4.4" + anypoint-apb "1.5.5" + anypoint-cli-command "1.6.6" + handlebars "^4.7.7" + jszip "^3.10.1" + util "^0.12.4" + uuid "^9.0.0" + whatwg-url "^11.0.0" + +anypoint-cli-runtime-mgr-plugin@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/anypoint-cli-runtime-mgr-plugin/-/anypoint-cli-runtime-mgr-plugin-1.0.8.tgz#166f3280e98053dfc21cad453686b93b15c318b4" + integrity sha512-CPNSA1k3DO6fc8J4ohNI4i3L4uQHJwuith0JfZnVAaZH5wzSVDXP4ViLthI/JNuTxNvPawKkmrU+BEJELMu8dA== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-command "1.6.6" + form-data "^4.0.0" + fs-extra "^10.1.0" + moment "^2.29.1" + util "^0.12.4" + +anypoint-cli-secrets-mgr-plugin@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/anypoint-cli-secrets-mgr-plugin/-/anypoint-cli-secrets-mgr-plugin-1.0.7.tgz#5ab7c2fc5dc9f15e809baa0ea6515bb413e2065c" + integrity sha512-9aGSelJCdsYmDry1PfZAj39ARYEVRV3VLr67Gp5c5vG6bQmPK+pgA1m8F2eH0kSFH+4qxPzPJND1pOyRwpnv9Q== + dependencies: + "@oclif/core" "1.26.2" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-command "1.6.6" + form-data "^4.0.0" + util "^0.12.4" + +anypoint-cli-v4@1.6.12: + version "1.6.12" + resolved "https://registry.yarnpkg.com/anypoint-cli-v4/-/anypoint-cli-v4-1.6.12.tgz#f89fb9183825b555b3da8671c6c9932ea3351c84" + integrity sha512-Eex9n5JMcO4mE1uubHFcrtm+QDGaIWheEBgCw0uRfeXlXF7p39uzQhqB4g8BbRmi9ho+lFymeldMLgnYU0Beeg== + dependencies: + "@oclif/core" "1.26.1" + "@oclif/plugin-autocomplete" "^2.1.0" + "@oclif/plugin-help" "^5.1.12" + "@oclif/plugin-not-found" "^2.3.1" + "@oclif/plugin-plugins" "^2.1.0" + "@oclif/plugin-version" "1.0.4" + anypoint-cli-account-plugin "1.0.9" + anypoint-cli-api-mgr-plugin "1.4.1" + anypoint-cli-cloudhub-plugin "1.4.13" + anypoint-cli-command "1.6.6" + anypoint-cli-datagraph-plugin "1.0.9" + anypoint-cli-designcenter-plugin "1.0.20" + anypoint-cli-exchange-plugin "1.0.12" + anypoint-cli-governance-plugin "1.0.17" + anypoint-cli-runtime-mgr-plugin "1.0.8" + anypoint-cli-secrets-mgr-plugin "1.0.7" + tslib "^2.3.1" + +apollo-cache-inmemory@^1.6.6: + version "1.6.6" + resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd" + integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A== + dependencies: + apollo-cache "^1.3.5" + apollo-utilities "^1.3.4" + optimism "^0.10.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + +apollo-cache@1.3.5, apollo-cache@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461" + integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA== + dependencies: + apollo-utilities "^1.3.4" + tslib "^1.10.0" + +apollo-client@^2.6.10: + version "2.6.10" + resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.10.tgz#86637047b51d940c8eaa771a4ce1b02df16bea6a" + integrity sha512-jiPlMTN6/5CjZpJOkGeUV0mb4zxx33uXWdj/xQCfAMkuNAC3HN7CvYDyMHHEzmcQ5GV12LszWoQ/VlxET24CtA== + dependencies: + "@types/zen-observable" "^0.8.0" + apollo-cache "1.3.5" + apollo-link "^1.0.0" + apollo-utilities "1.3.4" + symbol-observable "^1.0.2" + ts-invariant "^0.4.0" + tslib "^1.10.0" + zen-observable "^0.8.0" + +apollo-link-http-common@^0.2.16: + version "0.2.16" + resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" + integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== + dependencies: + apollo-link "^1.2.14" + ts-invariant "^0.4.0" + tslib "^1.9.3" + +apollo-link-http@^1.5.17: + version "1.5.17" + resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.17.tgz#499e9f1711bf694497f02c51af12d82de5d8d8ba" + integrity sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg== + dependencies: + apollo-link "^1.2.14" + apollo-link-http-common "^0.2.16" + tslib "^1.9.3" + +apollo-link@^1.0.0, apollo-link@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" + integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== + dependencies: + apollo-utilities "^1.3.0" + ts-invariant "^0.4.0" + tslib "^1.9.3" + zen-observable-ts "^0.8.21" + +apollo-utilities@1.3.4, apollo-utilities@^1.3.0, apollo-utilities@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf" + integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== + dependencies: + "@wry/equality" "^0.1.2" + fast-json-stable-stringify "^2.0.0" + ts-invariant "^0.4.0" + tslib "^1.10.0" + aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -4479,6 +4922,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + aria-query@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" @@ -4712,6 +5160,11 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +atomically@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe" + integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w== + autoprefixer@9.8.8, autoprefixer@^9.6.1, autoprefixer@^9.8.6: version "9.8.8" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a" @@ -4725,6 +5178,13 @@ autoprefixer@9.8.8, autoprefixer@^9.6.1, autoprefixer@^9.8.6: postcss "^7.0.32" postcss-value-parser "^4.1.0" +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -4749,11 +5209,25 @@ axios@1.8.4: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.7.4: + version "1.13.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.0.tgz#ead6f495f41f9c8869dcf7b0f24f5a4ab89707f0" + integrity sha512-zt40Pz4zcRXra9CVV31KeyofwiNvAbJ5B6YPz9pMJ+yOSLikvPT4Yi5LjfgjRa9CawVYBaD1JQzIVcIvBejKeA== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.4" + proxy-from-env "^1.1.0" + axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== +b4a@^1.6.4: + version "1.7.3" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.7.3.tgz#24cf7ccda28f5465b66aec2bac69e32809bf112f" + integrity sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q== + babel-eslint@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" @@ -4958,6 +5432,48 @@ balanced-match@^2.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== +bare-events@^2.5.4, bare-events@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.8.1.tgz#121afaeee9e9a8eb92e71d125bc85753d39913d0" + integrity sha512-oxSAxTS1hRfnyit2CL5QpAOS5ixfBjj6ex3yTNvXyY/kE719jQ/IjuESJBK2w5v4wwQRAHGseVJXx9QBYOtFGQ== + +bare-fs@^4.0.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-4.5.0.tgz#f3227b4bc79a65ca7e91a1c05be5919c7c7d8340" + integrity sha512-GljgCjeupKZJNetTqxKaQArLK10vpmK28or0+RwWjEl5Rk+/xG3wkpmkv+WrcBm3q1BwHKlnhXzR8O37kcvkXQ== + dependencies: + bare-events "^2.5.4" + bare-path "^3.0.0" + bare-stream "^2.6.4" + bare-url "^2.2.2" + fast-fifo "^1.3.2" + +bare-os@^3.0.1: + version "3.6.2" + resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-3.6.2.tgz#b3c4f5ad5e322c0fd0f3c29fc97d19009e2796e5" + integrity sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A== + +bare-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-3.0.0.tgz#b59d18130ba52a6af9276db3e96a2e3d3ea52178" + integrity sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw== + dependencies: + bare-os "^3.0.1" + +bare-stream@^2.6.4: + version "2.7.0" + resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.7.0.tgz#5b9e7dd0a354d06e82d6460c426728536c35d789" + integrity sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A== + dependencies: + streamx "^2.21.0" + +bare-url@^2.2.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/bare-url/-/bare-url-2.3.1.tgz#95e33e99bdc768766ca94246fdc397e88675ec9c" + integrity sha512-v2yl0TnaZTdEnelkKtXZGnotiV6qATBlnNuUMrHl6v9Lmmrh9mw9RYyImPU7/4RahumSwQS1k2oKXcRfXcbjJw== + dependencies: + bare-path "^3.0.0" + base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -5286,6 +5802,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -5315,7 +5836,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.5.0: +buffer@^5.2.1, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -5430,7 +5951,7 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== @@ -5446,6 +5967,24 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -5558,7 +6097,7 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: +chalk@4.1.2, chalk@^4, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -5664,6 +6203,14 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== +chromium-bidi@0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.11.0.tgz#9c3c42ee7b42d8448e9fce8d649dc8bfbcc31153" + integrity sha512-6CJWHkNRoyZyjV9Rwv2lYONZf1Xm0IuDyNq97nwSsxxP3wf5Bwy15K5rOvVKMtJ127jJBmxFUanSAOjgFRxgrA== + dependencies: + mitt "3.0.1" + zod "3.23.8" + ci-env@^1.15.0: version "1.17.0" resolved "https://registry.yarnpkg.com/ci-env/-/ci-env-1.17.0.tgz#386b8821ce5da1cd0b2b6a06c1f52b1433f8889a" @@ -6047,6 +6594,22 @@ concurrently@6.5.1: tree-kill "^1.2.2" yargs "^16.2.0" +conf@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/conf/-/conf-10.2.0.tgz#838e757be963f1a2386dfe048a98f8f69f7b55d6" + integrity sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg== + dependencies: + ajv "^8.6.3" + ajv-formats "^2.1.1" + atomically "^1.7.0" + debounce-fn "^4.0.0" + dot-prop "^6.0.1" + env-paths "^2.2.1" + json-schema-typed "^7.0.3" + onetime "^5.1.2" + pkg-up "^3.1.0" + semver "^7.3.5" + confusing-browser-globals@^1.0.10: version "1.0.11" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" @@ -6096,6 +6659,11 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" +content-type@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" @@ -6201,6 +6769,16 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== + dependencies: + env-paths "^2.2.1" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + create-ecdh@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" @@ -6244,6 +6822,13 @@ cross-fetch@^3.0.5, cross-fetch@^3.0.6: dependencies: node-fetch "2.6.7" +cross-fetch@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.2.0.tgz#34e9192f53bc757d6614304d9e5e6fb4edb782e3" + integrity sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q== + dependencies: + node-fetch "^2.7.0" + cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -6288,11 +6873,21 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== + crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" integrity sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg== +crypto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" + integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== + css-blank-pseudo@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" @@ -6605,6 +7200,13 @@ date-fns@^2.16.1: dependencies: "@babel/runtime" "^7.21.0" +debounce-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-4.0.0.tgz#ed76d206d8a50e60de0dd66d494d82835ffe61c7" + integrity sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ== + dependencies: + mimic-fn "^3.0.0" + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9, debug@~2: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -6703,6 +7305,15 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -6845,6 +7456,11 @@ detect-port-alt@1.1.6: address "^1.0.1" debug "^2.6.0" +devtools-protocol@0.0.1367902: + version "0.0.1367902" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz#7333bfc4466c5a54a4c6de48a9dfbcb4b811660c" + integrity sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg== + diff-match-patch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" @@ -7012,6 +7628,13 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" +dot-prop@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" + integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== + dependencies: + is-obj "^2.0.0" + dotenv-expand@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" @@ -7191,7 +7814,7 @@ entities@^3.0.1: resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== -env-paths@^2.2.0: +env-paths@^2.2.0, env-paths@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== @@ -7256,7 +7879,7 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== -es-define-property@^1.0.1: +es-define-property@^1.0.0, es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== @@ -7687,6 +8310,13 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +events-universal@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/events-universal/-/events-universal-1.0.1.tgz#b56a84fd611b6610e0a2d0f09f80fdf931e2dfe6" + integrity sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw== + dependencies: + bare-events "^2.7.0" + events@^3.0.0, events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -7867,6 +8497,17 @@ extract-stack@^2.0.0: resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-2.0.0.tgz#11367bc865bfcd9bc0db3123e5edb57786f11f9b" integrity sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ== +extract-zip@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -7892,6 +8533,11 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-fifo@^1.2.0, fast-fifo@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@^3.0.3, fast-glob@^3.1.1, fast-glob@^3.2.5, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" @@ -7913,16 +8559,33 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-levenshtein@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-3.0.0.tgz#37b899ae47e1090e40e3fd2318e4d5f0142ca912" + integrity sha512-hKKNajm46uNmTlhHSyZkmToAc56uZJwYq7yrciZjqOxnlfQwERDQJmHPUp7m1m9wx8vgOe8IaCKZ5Kv2k1DdCQ== + dependencies: + fastest-levenshtein "^1.0.7" + fast-safe-stringify@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== +fast-uri@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== +fastest-levenshtein@^1.0.7: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + fastparse@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" @@ -7949,6 +8612,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + fecha@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" @@ -8157,6 +8827,13 @@ follow-redirects@^1.15.6: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== +for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -8199,6 +8876,17 @@ form-data@^4.0.0: es-set-tostringtag "^2.1.0" mime-types "^2.1.12" +form-data@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" + integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -8251,6 +8939,15 @@ fs-extra@8.1.0, fs-extra@^8.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^10.0.0, fs-extra@^10.0.1, fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" @@ -8269,7 +8966,7 @@ fs-extra@^7.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.1, fs-extra@^9.1.0: +fs-extra@^9.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -8373,6 +9070,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +generator-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2" + integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g== + generic-names@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" @@ -8399,7 +9101,7 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-intrinsic@^1.2.6: +get-intrinsic@^1.2.4, get-intrinsic@^1.2.6, get-intrinsic@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== @@ -8445,7 +9147,7 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0: +get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -8612,7 +9314,7 @@ gonzales-pe@^4.3.0: dependencies: minimist "^1.2.5" -gopd@^1.2.0: +gopd@^1.0.1, gopd@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== @@ -8633,6 +9335,13 @@ graphql-ld@^1.4.0: sparqlalgebrajs "^3.0.2" sparqljson-to-tree "^2.1.0" +graphql-tag@^2.12.6, graphql-tag@^2.9.2: + version "2.12.6" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" + integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== + dependencies: + tslib "^2.1.0" + graphql-to-sparql@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/graphql-to-sparql/-/graphql-to-sparql-2.4.0.tgz#c810923db0f5d0285dc80e061d381b03198f5e5a" @@ -8687,6 +9396,18 @@ handlebars@4.7.7, handlebars@^4.7.6: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.7: + version "4.7.8" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.2" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -8744,6 +9465,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -8871,6 +9599,11 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +home-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/home-dir/-/home-dir-1.0.0.tgz#2917eb44bdc9072ceda942579543847e3017fe4e" + integrity sha512-PPAP0BMY72XQ0sYwFow8EgHwUYfptkZusnZEGHkBjdKRXIYcVFsbEViqU4k8VrJWf0m7wMr9gscQX9klJYh7zg== + hoopy@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" @@ -8898,6 +9631,11 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" +hpagent@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-1.2.0.tgz#0ae417895430eb3770c03443456b8d90ca464903" + integrity sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== + hsl-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" @@ -8995,6 +9733,18 @@ http-cache-semantics@^4.1.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-call@^5.2.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/http-call/-/http-call-5.3.0.tgz#4ded815b13f423de176eb0942d69c43b25b148db" + integrity sha512-ahwimsC23ICE4kPl9xTBjKB4inbRaeLyZeRunC/1Jy/Z6X8tv22MEAjK+KBOMSVLaqXPTTmd8638waVIKLGx2w== + dependencies: + content-type "^1.0.4" + debug "^4.1.1" + is-retry-allowed "^1.1.0" + is-stream "^2.0.0" + parse-json "^4.0.0" + tunnel-agent "^0.6.0" + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -9089,7 +9839,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@^7.0.6: +https-proxy-agent@^7.0.5, https-proxy-agent@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== @@ -9190,6 +9940,11 @@ ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + immer@8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" @@ -9235,6 +9990,14 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-fresh@^3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-from@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" @@ -9495,6 +10258,11 @@ is-callable@^1.1.4, is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -9609,6 +10377,17 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-generator-function@^1.0.7: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5" + integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA== + dependencies: + call-bound "^1.0.4" + generator-function "^2.0.0" + get-proto "^1.0.1" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -9733,6 +10512,16 @@ is-regex@^1.0.4, is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" @@ -9748,6 +10537,11 @@ is-resolvable@^1.0.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== +is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + is-root@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" @@ -9784,6 +10578,13 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-typed-array@^1.1.3: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -10431,6 +11232,13 @@ js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.0: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" @@ -10515,6 +11323,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-schema-typed@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9" + integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A== + json-schema@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" @@ -10627,6 +11440,16 @@ jsprim@^1.2.2: array-includes "^3.1.5" object.assign "^4.1.2" +jszip@^3.10.0, jszip@^3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" @@ -10717,6 +11540,13 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -10767,6 +11597,17 @@ load-esm@1.0.2: resolved "https://registry.yarnpkg.com/load-esm/-/load-esm-1.0.2.tgz#35dbac8a1a3abdb802cf236008048fcc8a9289a6" integrity sha512-nVAvWk/jeyrWyXEAs84mpQCYccxRqgKY4OznLuJhJCa0XsPSfdOIr2zvBZEj3IHEHbX97jjscKRRV539bW0Gpw== +load-json-file@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== + dependencies: + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" + strip-bom "^3.0.0" + type-fest "^0.3.0" + loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -11309,6 +12150,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" + integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -11341,7 +12187,7 @@ minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.0, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.0, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -11457,6 +12303,11 @@ mississippi@^3.0.0: stream-each "^1.1.0" through2 "^2.0.0" +mitt@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" + integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -11477,6 +12328,11 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +moment@^2.29.1, moment@^2.29.3: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -11652,7 +12508,7 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" -node-fetch@^2.6.0, node-fetch@^2.6.1: +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -11876,7 +12732,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -12069,7 +12925,7 @@ one-time@^1.0.0: dependencies: fn.name "1.x.x" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -12096,6 +12952,13 @@ opn@^5.5.0: dependencies: is-wsl "^1.1.0" +optimism@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.10.3.tgz#163268fdc741dea2fb50f300bedda80356445fd7" + integrity sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw== + dependencies: + "@wry/context" "^0.4.0" + optimize-css-assets-webpack-plugin@5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.4.tgz#85883c6528aaa02e30bbad9908c92926bb52dc90" @@ -12153,6 +13016,11 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== +os@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/os/-/os-0.1.2.tgz#f29a50c62908516ba42652de42f7038600cadbc2" + integrity sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ== + p-each-series@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" @@ -12303,7 +13171,12 @@ pacote@^11.2.7: ssri "^8.0.1" tar "^6.1.0" -pako@~1.0.5: +pako@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + +pako@~1.0.2, pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -12363,7 +13236,7 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-json@^5.0.0: +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -12479,6 +13352,14 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path@^0.12.7: + version "0.12.7" + resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" + integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== + dependencies: + process "^0.11.1" + util "^0.10.3" + pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -12495,6 +13376,11 @@ peek-readable@^7.0.0: resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-7.0.0.tgz#c6e4e78ec76f7005e5f6b51ffc93fdb91ede6512" integrity sha512-nri2TO5JE3/mRryik9LlHFT53cgHfRK0Lt0BAZQXku/AW3E6XLt2GaY8siWi7dvW/m1z0ecn+J+bpDa9ZN3IsQ== +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -12568,7 +13454,7 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -pkg-up@3.1.0: +pkg-up@3.1.0, pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== @@ -12610,6 +13496,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== + postcss-attribute-case-insensitive@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.2.tgz#d93e46b504589e94ac7277b0463226c68041a880" @@ -13503,7 +14394,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== @@ -13581,7 +14472,7 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-agent@6.5.0: +proxy-agent@6.5.0, proxy-agent@^6.5.0: version "6.5.0" resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d" integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A== @@ -13662,6 +14553,30 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +puppeteer-core@23.11.1: + version "23.11.1" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-23.11.1.tgz#3e064de11b3cb3a2df1a8060ff2d05b41be583db" + integrity sha512-3HZ2/7hdDKZvZQ7dhhITOUg4/wOrDRjyK2ZBllRB0ZCOi9u0cwq1ACHDjBB+nX+7+kltHjQvBRdeY7+W0T+7Gg== + dependencies: + "@puppeteer/browsers" "2.6.1" + chromium-bidi "0.11.0" + debug "^4.4.0" + devtools-protocol "0.0.1367902" + typed-query-selector "^2.12.0" + ws "^8.18.0" + +puppeteer@^23.1.1: + version "23.11.1" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-23.11.1.tgz#98fd9040786b1219b1a4f639c270377586e8899c" + integrity sha512-53uIX3KR5en8l7Vd8n5DUv90Ae9QDQsyIthaUFVzwV6yU750RjqRznEtNMBT20VthqAdemnJN+hxVdmMHKt7Zw== + dependencies: + "@puppeteer/browsers" "2.6.1" + chromium-bidi "0.11.0" + cosmiconfig "^9.0.0" + devtools-protocol "0.0.1367902" + puppeteer-core "23.11.1" + typed-query-selector "^2.12.0" + q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -14134,6 +15049,13 @@ recursive-readdir@2.2.2: dependencies: minimatch "3.0.4" +recursive-readdir@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" + integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== + dependencies: + minimatch "^3.0.5" + redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -14672,6 +15594,15 @@ safe-identifier@^0.4.1: resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.2.tgz#cf6bfca31c2897c588092d1750d30ef501d59fcb" integrity sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w== +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -14845,6 +15776,11 @@ semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semve dependencies: lru-cache "^6.0.0" +semver@^7.5.0, semver@^7.6.3: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -14913,6 +15849,18 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -14923,7 +15871,7 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4, setimmediate@~1.0.4: +setimmediate@^1.0.4, setimmediate@^1.0.5, setimmediate@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== @@ -15505,6 +16453,15 @@ streamify-string@^1.0.1: resolved "https://registry.yarnpkg.com/streamify-string/-/streamify-string-1.0.1.tgz#9e220de33e1c475dd30e0206f5b1815cc6c9525b" integrity sha512-RXvBglotrvSIuQQ7oC55pdV40wZ/17gTb68ipMC4LA0SqMN4Sqfsf31Dpei7qXpYqZQ8ueVnPglUvtep3tlhqw== +streamx@^2.15.0, streamx@^2.21.0: + version "2.23.0" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.23.0.tgz#7d0f3d00d4a6c5de5728aecd6422b4008d66fd0b" + integrity sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg== + dependencies: + events-universal "^1.0.0" + fast-fifo "^1.3.2" + text-decoder "^1.1.0" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -15817,7 +16774,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0, supports-color@^8.1.0: +supports-color@^8.0.0, supports-color@^8.1.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -15866,6 +16823,11 @@ svgo@^1.0.0, svgo@^1.2.2: unquote "~1.1.1" util.promisify "~1.0.0" +symbol-observable@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -15882,11 +16844,42 @@ table@^6.0.9, table@^6.6.0: string-width "^4.2.3" strip-ansi "^6.0.1" +table@^6.7.1: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== +tar-fs@^3.0.6: + version "3.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.1.1.tgz#4f164e59fb60f103d472360731e8c6bb4a7fe9ef" + integrity sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg== + dependencies: + pump "^3.0.0" + tar-stream "^3.1.5" + optionalDependencies: + bare-fs "^4.0.1" + bare-path "^3.0.0" + +tar-stream@^3.1.5: + version "3.1.7" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" + integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + tar@^6.0.2, tar@^6.1.0: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -15979,6 +16972,13 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +text-decoder@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.3.tgz#b19da364d981b2326d5f43099c310cc80d770c65" + integrity sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA== + dependencies: + b4a "^1.6.4" + text-hex@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" @@ -16122,6 +17122,13 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -16164,6 +17171,13 @@ ts-clone-node@^0.3.32: dependencies: compatfactory "^0.0.13" +ts-invariant@^0.4.0: + version "0.4.4" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" + integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== + dependencies: + tslib "^1.9.3" + ts-node@8.10.2: version "8.10.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" @@ -16202,12 +17216,12 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.8.1, tslib@^2.0.1: +tslib@2.8.1, tslib@^2, tslib@^2.0.1, tslib@^2.4.1: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -16275,7 +17289,7 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^0.3.1: +type-fest@^0.3.0, type-fest@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== @@ -16308,6 +17322,11 @@ type@^2.5.0: resolved "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f" integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== +typed-query-selector@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/typed-query-selector/-/typed-query-selector-2.12.0.tgz#92b65dbc0a42655fccf4aeb1a08b1dddce8af5f2" + integrity sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -16392,6 +17411,19 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +unbzip2-stream@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -16536,6 +17568,11 @@ upath@^1.1.1, upath@^1.1.2, upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== +upath@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" + integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== + update-browserslist-db@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" @@ -16561,6 +17598,11 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== +url-join@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" + integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== + url-loader@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2" @@ -16621,6 +17663,13 @@ util@0.10.3: dependencies: inherits "2.0.1" +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== + dependencies: + inherits "2.0.3" + util@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" @@ -16628,6 +17677,17 @@ util@^0.11.0: dependencies: inherits "2.0.3" +util@^0.12.4: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" @@ -16648,6 +17708,11 @@ uuid@^8.0.0, uuid@^8.3.0, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -16801,6 +17866,11 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + webpack-dev-middleware@^3.7.2: version "3.7.3" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" @@ -16937,6 +18007,14 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -16970,6 +18048,19 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.1.0.tgz#35ccf7b1a0fce87bd8b92a478c9d045785d3bf35" integrity sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA== +which-typed-array@^1.1.16, which-typed-array@^1.1.2: + version "1.1.19" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.19.tgz#df03842e870b6b88e117524a4b364b6fc689f956" + integrity sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -17245,6 +18336,11 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^8.18.0: + version "8.18.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" + integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" @@ -17295,7 +18391,7 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@<17, yargs@^13.3.2, yargs@^15.4.1, yargs@^16.1.0, yargs@^16.2.0, yargs@^17.1.1: +yargs@<17, yargs@^13.3.2, yargs@^15.4.1, yargs@^16.1.0, yargs@^16.2.0, yargs@^17.1.1, yargs@^17.7.2: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -17308,6 +18404,19 @@ yargs@<17, yargs@^13.3.2, yargs@^15.4.1, yargs@^16.1.0, yargs@^16.2.0, yargs@^17 y18n "^5.0.5" yargs-parser "^20.2.2" +yarn@^1.22.18: + version "1.22.22" + resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz#ac34549e6aa8e7ead463a7407e1c7390f61a6610" + integrity sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg== + +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" @@ -17318,6 +18427,24 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zen-observable-ts@^0.8.21: + version "0.8.21" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" + integrity sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg== + dependencies: + tslib "^1.9.3" + zen-observable "^0.8.0" + +zen-observable@^0.8.0: + version "0.8.15" + resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" + integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== + +zod@3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== + zwitch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" From 2e8e847d9c056aae66fed5c3606261c99ad65bcd Mon Sep 17 00:00:00 2001 From: kbode Date: Wed, 29 Oct 2025 16:44:01 +0100 Subject: [PATCH 02/19] W-1855745 added documentation --- Contributing.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Contributing.md b/Contributing.md index d8b95e0f..3b816984 100644 --- a/Contributing.md +++ b/Contributing.md @@ -40,6 +40,13 @@ $ yarn test ### Merging to `preview` +#### Update APIs: +Update the version file in `api-versions.txt` to the version you want to test or add a new API. Use the API version from your API release or branch build. + +Alternatively, you can run `yarn updateApiVersion` to update the `api-versions.txt` file with the latest API version snapshots for the APIs listed in the file. + +#### Update and Check SDK before merging: + Before merging any changes into `preview`, SDK generation must pass locally: ``` From fc3318a828407204c6e9e18bd379e2eab62fb832 Mon Sep 17 00:00:00 2001 From: kbode Date: Wed, 29 Oct 2025 16:46:11 +0100 Subject: [PATCH 03/19] W-18557453 added commit for SNAPSHOT testing --- api-versions.txt | 2 +- .../exchange.json | 2 +- .../shopper-baskets-oas-v1-public.yaml | 39 +- .../exchange.json | 2 +- .../shopper-baskets-oas-v2-public.yaml | 97 +- .../exchange.json | 2 +- .../shopper-consents-oas-v1-public.yaml | 8 +- .../exchange.json | 2 +- .../shopper-context-oas-v1-public.yaml | 0 .../exchange.json | 2 +- .../shopper-customers-oas-v1-public.yaml | 118 +- .../shopper-experience-oas-v1-public.yaml | 614 -------- .../exchange.json | 2 +- .../shopper-experience-oas-v1-public.yaml | 1394 +++++++++++++++++ .../exchange.json | 2 +- ...opper-gift-certificates-oas-v1-public.yaml | 3 +- .../exchange.json | 2 +- .../shopper-login-oas-v1-public.yaml | 75 +- .../exchange.json | 2 +- .../shopper-orders-oas-v1-public.yaml | 244 ++- .../exchange.json | 2 +- .../shopper-payments-oas-v1-public.yaml | 15 +- .../exchange.json | 2 +- .../shopper-products-oas-v1-public.yaml | 95 +- .../exchange.json | 2 +- .../shopper-promotions-oas-v1-public.yaml | 5 +- .../exchange.json | 2 +- .../shopper-search-oas-v1-public.yaml | 147 +- .../exchange.json | 2 +- .../shopper-seo-oas-v1-public.yaml | 4 +- .../exchange.json | 2 +- .../shopper-stores-oas-v1-public.yaml | 10 +- 32 files changed, 2203 insertions(+), 697 deletions(-) rename apis/{shopper-baskets-oas-1.9.0 => shopper-baskets-oas-1.10.0}/exchange.json (90%) rename apis/{shopper-baskets-oas-1.9.0 => shopper-baskets-oas-1.10.0}/shopper-baskets-oas-v1-public.yaml (98%) rename apis/{shopper-baskets-oas-2.1.0 => shopper-baskets-oas-2.2.0}/exchange.json (90%) rename apis/{shopper-baskets-oas-2.1.0 => shopper-baskets-oas-2.2.0}/shopper-baskets-oas-v2-public.yaml (97%) rename apis/{shopper-consents-oas-1.1.0 => shopper-consents-oas-1.2.0}/exchange.json (90%) rename apis/{shopper-consents-oas-1.1.0 => shopper-consents-oas-1.2.0}/shopper-consents-oas-v1-public.yaml (98%) rename apis/{shopper-context-oas-1.1.1 => shopper-context-oas-1.2.0}/exchange.json (90%) rename apis/{shopper-context-oas-1.1.1 => shopper-context-oas-1.2.0}/shopper-context-oas-v1-public.yaml (100%) rename apis/{shopper-customers-oas-1.1.1 => shopper-customers-oas-1.2.0}/exchange.json (91%) rename apis/{shopper-customers-oas-1.1.1 => shopper-customers-oas-1.2.0}/shopper-customers-oas-v1-public.yaml (98%) delete mode 100644 apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml rename apis/{shopper-experience-oas-1.0.7 => shopper-experience-oas-1.1.0}/exchange.json (93%) create mode 100644 apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml rename apis/{shopper-gift-certificates-oas-1.0.26 => shopper-gift-certificates-oas-1.0.27}/exchange.json (93%) rename apis/{shopper-gift-certificates-oas-1.0.26 => shopper-gift-certificates-oas-1.0.27}/shopper-gift-certificates-oas-v1-public.yaml (98%) rename apis/{shopper-login-oas-1.39.41 => shopper-login-oas-1.41.0}/exchange.json (92%) rename apis/{shopper-login-oas-1.39.41 => shopper-login-oas-1.41.0}/shopper-login-oas-v1-public.yaml (97%) rename apis/{shopper-orders-oas-1.5.0 => shopper-orders-oas-1.6.0}/exchange.json (90%) rename apis/{shopper-orders-oas-1.5.0 => shopper-orders-oas-1.6.0}/shopper-orders-oas-v1-public.yaml (93%) rename apis/{shopper-payments-oas-1.1.0 => shopper-payments-oas-1.2.0}/exchange.json (90%) rename apis/{shopper-payments-oas-1.1.0 => shopper-payments-oas-1.2.0}/shopper-payments-oas-v1-public.yaml (98%) rename apis/{shopper-products-oas-1.0.37 => shopper-products-oas-1.1.0}/exchange.json (93%) rename apis/{shopper-products-oas-1.0.37 => shopper-products-oas-1.1.0}/shopper-products-oas-v1-public.yaml (95%) rename apis/{shopper-promotions-oas-1.0.36 => shopper-promotions-oas-1.0.37}/exchange.json (93%) rename apis/{shopper-promotions-oas-1.0.36 => shopper-promotions-oas-1.0.37}/shopper-promotions-oas-v1-public.yaml (98%) rename apis/{shopper-search-oas-1.3.0 => shopper-search-oas-1.5.1}/exchange.json (93%) rename apis/{shopper-search-oas-1.3.0 => shopper-search-oas-1.5.1}/shopper-search-oas-v1-public.yaml (80%) rename apis/{shopper-seo-oas-1.0.13 => shopper-seo-oas-1.0.14}/exchange.json (93%) rename apis/{shopper-seo-oas-1.0.13 => shopper-seo-oas-1.0.14}/shopper-seo-oas-v1-public.yaml (99%) rename apis/{shopper-stores-oas-1.0.17 => shopper-stores-oas-1.0.18}/exchange.json (93%) rename apis/{shopper-stores-oas-1.0.17 => shopper-stores-oas-1.0.18}/shopper-stores-oas-v1-public.yaml (98%) diff --git a/api-versions.txt b/api-versions.txt index ca186dda..da2c19a0 100644 --- a/api-versions.txt +++ b/api-versions.txt @@ -12,4 +12,4 @@ shopper-promotions-oas-v1=1.0.36 shopper-search-oas-v1=1.3.0 shopper-seo-oas-v1=1.0.13 shopper-stores-oas-v1=1.0.17 -shopper-payments-oas-v1=1.1.0 +shopper-payments-oas-v1=1.2.0-master-b70 diff --git a/apis/shopper-baskets-oas-1.9.0/exchange.json b/apis/shopper-baskets-oas-1.10.0/exchange.json similarity index 90% rename from apis/shopper-baskets-oas-1.9.0/exchange.json rename to apis/shopper-baskets-oas-1.10.0/exchange.json index 26d65822..01505450 100644 --- a/apis/shopper-baskets-oas-1.9.0/exchange.json +++ b/apis/shopper-baskets-oas-1.10.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "1.9.0", + "version": "1.10.0-PR-65-b5", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml b/apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml similarity index 98% rename from apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml rename to apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml index 9e824dde..4b5ed8f8 100644 --- a/apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml +++ b/apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Checkout title: Shopper Baskets - version: v1 + version: 1.10.0-PR-65-b5 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets/shopper-baskets-oas-v1-public.yaml) + # API Overview Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout. @@ -161,6 +165,8 @@ paths: description: Thrown if the shipment with the given shipment ID is unknown. content: application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' examples: ShipmentNotFound: $ref: '#/components/examples/ShipmentNotFound' @@ -184,12 +190,16 @@ paths: description: |- Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. - A success response contains the transferred basket. + This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows: + - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation. + - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below. - If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: + If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed: - Keep the current shopper's active basket. - - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. - - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint. + - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + + A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned. operationId: transferBasket summary: Transfer an existing basket. security: @@ -197,10 +207,11 @@ paths: - sfcc.shopper-baskets-orders.rw parameters: - $ref: '#/components/parameters/overrideExisting' + - $ref: '#/components/parameters/merge' - $ref: '#/components/parameters/locale' responses: '200': - description: The transferred basket. + description: The current basket. content: application/json: schema: @@ -208,6 +219,8 @@ paths: examples: BasketPost: $ref: '#/components/examples/examples-BasketPost' + '204': + description: The operation was successful. No current basket was returned because neither the previous nor current shopper had an active basket attached that could be transferred. '403': description: The call returns this error if no SLAS token for a registered shopper is available. content: @@ -219,9 +232,9 @@ paths: $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' '409': description: |- - The call returns this response in either of these cases: + The call returns this response when the `merge` request parameter is set to `false` and one of the following cases applies: - The previous shopper has no active basket. - - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). + - The current shopper has an active basket and the `overrideExisting` query parameter is set to `false` (default value). content: application/json: schema: @@ -239,6 +252,8 @@ paths: operationId: mergeBasket summary: Merge baskets. description: |- + ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected. + Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. The following information is merged: @@ -3901,6 +3916,14 @@ components: default: false type: boolean example: false + merge: + name: merge + in: query + description: "This parameter controls the behavior:\n - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).\n - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.\n\nThe hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown \nin this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).\n\nThere are four possible use cases:\n\na) Guest basket and registered basket exist\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).\n\nb) Guest basket exists but no registered basket exists\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).\n\nc) No guest basket exists but a registered basket exists\nThe registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null \npassed to the hook).\n\nd) Neither basket exists\nThe hook dw.order.mergeBasket is not called.\n\nThe API returns the current basket (after executing dw.order.mergeBasket)." + schema: + default: false + type: boolean + example: false createDestinationBasket: name: createDestinationBasket in: query diff --git a/apis/shopper-baskets-oas-2.1.0/exchange.json b/apis/shopper-baskets-oas-2.2.0/exchange.json similarity index 90% rename from apis/shopper-baskets-oas-2.1.0/exchange.json rename to apis/shopper-baskets-oas-2.2.0/exchange.json index 28cc2f59..27690ab7 100644 --- a/apis/shopper-baskets-oas-2.1.0/exchange.json +++ b/apis/shopper-baskets-oas-2.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "2.1.0", + "version": "2.2.0-master-b69", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml b/apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml similarity index 97% rename from apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml rename to apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml index f9334891..9724071a 100644 --- a/apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml +++ b/apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Checkout title: Shopper Baskets - version: v2 + version: 2.2.0-master-b69 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets-v2/shopper-baskets-oas-v2-public.yaml) + # API Overview Shopper Baskets V2 provides all Shopper Basket V1 functionality and adds support for temporary baskets. @@ -196,20 +200,25 @@ paths: description: |- Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. - A success response contains the transferred basket. + This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows: + - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation. + - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below. - If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: + If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed: - Keep the current shopper's active basket. - - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. - - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint. + - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. + + A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned. operationId: transferBasket summary: Transfer an existing basket. parameters: - $ref: '#/components/parameters/overrideExisting' + - $ref: '#/components/parameters/merge' - $ref: '#/components/parameters/locale' responses: '200': - description: The transferred basket. + description: The current basket. content: application/json: schema: @@ -217,6 +226,8 @@ paths: examples: BasketPost: $ref: '#/components/examples/examples-BasketPost' + '204': + description: The operation was successful. No current basket was returned because neither the previous nor current shopper had an active basket attached that could be transferred. '403': description: The call returns this error if no SLAS token for a registered shopper is available. content: @@ -228,9 +239,9 @@ paths: $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' '409': description: |- - The call returns this response in either of these cases: + The call returns this response when the `merge` request parameter is set to `false` and one of the following cases applies: - The previous shopper has no active basket. - - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). + - The current shopper has an active basket and the `overrideExisting` query parameter is set to `false` (default value). content: application/json: schema: @@ -249,6 +260,8 @@ paths: /organizations/{organizationId}/baskets/actions/merge: post: description: |- + ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected. + Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. The following information is merged: @@ -1252,6 +1265,8 @@ paths: examples: PaymentInstrumentPost: $ref: '#/components/examples/PaymentInstrumentPost' + PaymentInstrumentPostWithSalesforcePayments: + $ref: '#/components/examples/PaymentInstrumentPostWithSalesforcePayments' required: true responses: '200': @@ -2788,6 +2803,26 @@ components: description: The payment method ID. It is read only. example: CREDIT_CARD type: string + paymentReference: + description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. + type: object + properties: + paymentReferenceId: + description: Payment reference identifier. Can be payment intent ID for Stripe, PSP reference for Adyen, PayPal order ID for PayPal, or similar identifier for other payment providers. + type: string + maxLength: 256 + example: pi_3N4B2vF0wDjebNCp1234567 + clientSecret: + description: Client secret for payment confirmation. Used primarily by Stripe for client-side payment confirmation. + type: string + maxLength: 256 + example: pi_3N4B2vF0wDjebNCp1234567_secret_abc123 + redirectUrl: + description: Redirect URL for payment methods that require user redirection to complete payment. + type: string + format: uri + maxLength: 2048 + example: https://checkout.stripe.com/pay/cs_test_abc123 type: object ProductItem: description: Document representing a product item. @@ -3734,6 +3769,32 @@ components: description: The year the payment card is valid from. example: 2019 type: integer + PaymentReferenceRequest: + type: object + description: Properties for Payments Reference Request + properties: + paymentMethodType: + type: string + maxLength: 64 + description: Payment Method Type + example: card + zoneId: + type: string + description: The unique identifier for a Payments zone. + pattern: ^[a-zA-Z0-9\-_]{1,100}$ + minLength: 1 + maxLength: 100 + example: + Amer-Zone: null + shippingPreference: + type: string + maxLength: 64 + description: Shipping preference for PayPal payment processing. Applicable only for basket payment instruments. + enum: + - GET_FROM_FILE + - NO_SHIPPING + - SET_PROVIDED_ADDRESS + example: GET_FROM_FILE BasketPaymentInstrumentRequest: description: Document representing a basket payment instrument request. type: object @@ -3769,6 +3830,10 @@ components: description: The payment method ID. example: CREDIT_CARD type: string + paymentReferenceRequest: + description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. + allOf: + - $ref: '#/components/schemas/PaymentReferenceRequest' PaymentCardSpec: description: Document representing the specification for a payment card. type: object @@ -4012,6 +4077,14 @@ components: default: false type: boolean example: false + merge: + name: merge + in: query + description: "This parameter controls the behavior: \n - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).\n - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.\n\nThe hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown \nin this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).\n\nThere are four possible use cases:\n\na) Guest basket and registered basket exist\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).\n\nb) Guest basket exists but no registered basket exists\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).\n\nc) No guest basket exists but a registered basket exists\nThe registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null \npassed to the hook).\n\nd) Neither basket exists\nThe hook dw.order.mergeBasket is not called.\n\nThe API returns the current basket (after executing dw.order.mergeBasket)." + schema: + default: false + type: boolean + example: false createDestinationBasket: name: createDestinationBasket in: query @@ -5360,6 +5433,14 @@ components: holder: Miller cardType: Visa paymentMethodId: CREDIT_CARD + PaymentInstrumentPostWithSalesforcePayments: + value: + amount: 15 + paymentMethodId: Salesforce Payments + paymentReferenceRequest: + paymentMethodType: paypal + zoneId: Amer-Zone + shippingPreference: SET_PROVIDED_ADDRESS PaymentInstrumentPatch: value: amount: 0 diff --git a/apis/shopper-consents-oas-1.1.0/exchange.json b/apis/shopper-consents-oas-1.2.0/exchange.json similarity index 90% rename from apis/shopper-consents-oas-1.1.0/exchange.json rename to apis/shopper-consents-oas-1.2.0/exchange.json index 2cc10f2b..35cb0efc 100644 --- a/apis/shopper-consents-oas-1.1.0/exchange.json +++ b/apis/shopper-consents-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Consents OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-consents-oas", - "version": "1.1.0", + "version": "1.2.0-master-b93", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml b/apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml similarity index 98% rename from apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml rename to apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml index e54ed006..a37a400d 100644 --- a/apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml +++ b/apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml @@ -1,11 +1,13 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Shopper title: Shopper Consents - version: v1 + version: 1.2.0-master-b93 description: |- - # Shopper Consent + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-consents/shopper-consents-oas-v1-public.yaml) - ## API Overview + # API Overview The Shopper Consent API offers a centralized method for managing shopper consent. With this API, shoppers can view and update subscription preferences for marketing communications across various channels. This API controls how and where shoppers receive marketing messages while ensuring compliance with privacy regulations. diff --git a/apis/shopper-context-oas-1.1.1/exchange.json b/apis/shopper-context-oas-1.2.0/exchange.json similarity index 90% rename from apis/shopper-context-oas-1.1.1/exchange.json rename to apis/shopper-context-oas-1.2.0/exchange.json index b74f258d..1630b71f 100644 --- a/apis/shopper-context-oas-1.1.1/exchange.json +++ b/apis/shopper-context-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Context OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-context-oas", - "version": "1.1.1", + "version": "1.2.0-master-b45", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-context-oas-1.1.1/shopper-context-oas-v1-public.yaml b/apis/shopper-context-oas-1.2.0/shopper-context-oas-v1-public.yaml similarity index 100% rename from apis/shopper-context-oas-1.1.1/shopper-context-oas-v1-public.yaml rename to apis/shopper-context-oas-1.2.0/shopper-context-oas-v1-public.yaml diff --git a/apis/shopper-customers-oas-1.1.1/exchange.json b/apis/shopper-customers-oas-1.2.0/exchange.json similarity index 91% rename from apis/shopper-customers-oas-1.1.1/exchange.json rename to apis/shopper-customers-oas-1.2.0/exchange.json index 00cfb1d9..f982eac2 100644 --- a/apis/shopper-customers-oas-1.1.1/exchange.json +++ b/apis/shopper-customers-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Customers OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-customers-oas", - "version": "1.1.1", + "version": "1.2.0-PR-38-b5", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml b/apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml similarity index 98% rename from apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml rename to apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml index 35923ef3..3825841f 100644 --- a/apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml +++ b/apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Customer title: Shopper Customers - version: v1 + version: 1.2.0-PR-38-b5 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-customers/shopper-customers-oas-v1-public.yaml) + # API Overview The Shopper Customers API enables you to develop functionality that lets customers log in, and manage their profiles and product lists. Profile management includes ability for shoppers to add or modify addresses and payment methods, and add or modify products to wishlists or favorites. Commerce Cloud provides a rich set of Authentication APIs that include logging in guest shoppers, registered shoppers, agents on behalf of customers and a trusted system authentication on behalf of customers. In all authentication scenarios involving customers, a JSON Web Token (JWT) is generated in Commerce Cloud. Using the JWT, customers can access other Shopper API resources like Orders and Baskets. The application must refresh the JWT every 30 minutes to save the shopper activity (for example, retain products in a shopper's cart) for prolonged periods of time. @@ -817,6 +821,58 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments.rw + patch: + summary: Update a customer's payment instrument. This endpoint only accepts a registered customer ShopperToken (JWT). + operationId: updateCustomerPaymentInstrument + parameters: + - $ref: '#/components/parameters/paymentInstrumentId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerPaymentInstrumentUpdateRequest' + examples: + UpdateCustomerPaymentInstrumentBody: + $ref: '#/components/examples/UpdateCustomerPaymentInstrumentBody' + required: true + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerPaymentInstrument' + examples: + updateCustomerPaymentInstrumentSuccess: + $ref: '#/components/examples/updateCustomerPaymentInstrumentSuccess' + '400': + description: | + Either the CustomerId URL parameter does not match the verified customer represented by the JWT token, or the request contains unsupported fields for update. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + invalidCustomer400: + $ref: '#/components/examples/invalidCustomer400' + updatePaymentInstrumentUnsupportedFields400: + $ref: '#/components/examples/updatePaymentInstrumentUnsupportedFields400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.paymentinstruments.rw /organizations/{organizationId}/customers/{customerId}/product-lists: get: summary: Return all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -3329,7 +3385,7 @@ components: Total: default: 0 minimum: 0 - format: int64 + format: int32 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -3349,7 +3405,7 @@ components: Offset: default: 0 minimum: 0 - format: int64 + format: int32 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 @@ -3774,6 +3830,30 @@ components: description: The default payment instrument. example: true description: Document representing a customer payment instrument request. + CustomerPaymentInstrumentUpdateRequest: + type: object + properties: + default: + type: boolean + description: The default payment instrument. + example: true + paymentCard: + type: object + properties: + expirationMonth: + type: integer + format: int32 + minimum: 1 + maximum: 12 + description: The month when the payment card expires. + example: 12 + expirationYear: + type: integer + format: int32 + description: The year when the payment card expires. + example: 2028 + description: The payment card expiration information. + description: Document representing a customer payment instrument update request. Only allows updating the default flag and card expiration date. CustomerProductListRegistrant: description: Document representing a customer product list registrant. properties: @@ -5848,6 +5928,38 @@ components: paymentMethodId: OCAPI_Payment_Simple paymentInstrumentId: cdOLciWbOsYl6aaadkwcsx9xHH default: false + UpdateCustomerPaymentInstrumentBody: + value: + default: false + paymentCard: + expirationYear: 2028 + expirationMonth: 12 + updateCustomerPaymentInstrumentSuccess: + value: + paymentCard: + cardType: MasterCard + creditCardExpired: false + expirationMonth: 12 + expirationYear: 2028 + holder: John Smith + issueNumber: i117 + maskedNumber: '***4567' + numberLastDigits: '4567' + validFromMonth: 8 + validFromYear: 2007 + paymentMethodId: OCAPI_Payment_Simple + paymentInstrumentId: cdOLciWbOsYl6aaadkwcsx9xHH + default: false + invalidCustomer400: + value: + title: Invalid Customer + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-customer + detail: CustomerId URL parameter does not match the verified customer represented by the JWT token. + updatePaymentInstrumentUnsupportedFields400: + value: + title: Unsupported Fields + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-fields + detail: Unsupported fields in the request for updates. customerProductListResult: value: limit: 1 diff --git a/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml deleted file mode 100644 index 1ea0bc40..00000000 --- a/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml +++ /dev/null @@ -1,614 +0,0 @@ -openapi: 3.0.3 -info: - title: Shopper Experience - version: v1 - description: |- - Use the Shopper Experience API to look up page information for pages that are created in Page Designer. - - Responses include the following: - - - The entire component hierarchy of the page at design time. - - All merchant data provided at design time. - - Server-side scripting data provided at run time. - - Both the page and components contain the values of all native and custom attributes that have been populated during page authoring. - - Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. - - **Important**: Currently, the Shopper Experience API can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. - - ## Authentication & Authorization - - The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). - - For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. - - You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). -servers: - - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 - variables: - shortCode: - default: shortCode -paths: - /organizations/{organizationId}/pages: - get: - summary: Get Page Designer pages. - description: "Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.\n\nYou must provide the `aspectTypeId` along with either a `categoryId` or a `productId`. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." - operationId: getPages - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/categoryId' - - $ref: '#/components/parameters/productId' - - $ref: '#/components/parameters/aspectTypeId' - - $ref: '#/components/parameters/aspectAttributes' - - $ref: '#/components/parameters/parameters' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/PageResult' - examples: - PageResult: - $ref: '#/components/examples/PageResult' - '400': - description: | - Business Object ID Invalid - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - BusinessObjectIDInvalid: - $ref: '#/components/examples/BusinessObjectIDInvalid' - '404': - description: | - Requested Aspect Type Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - AspectTypeNotFound: - $ref: '#/components/examples/AspectTypeNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience - /organizations/{organizationId}/pages/{pageId}: - get: - summary: Get a Page Designer page based on a single page ID. - description: "Get a Page Designer page for a specific page ID. The results apply the visibility rules for the page's components, such as personalization or scheduled visibility.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." - operationId: getPage - parameters: - - $ref: '#/components/parameters/pageId' - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/aspectAttributes' - - $ref: '#/components/parameters/parameters' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/Page' - examples: - Page: - $ref: '#/components/examples/Page' - '400': - description: | - Provided Aspect Attribute Invalid - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - AspectAttributeInvalid: - $ref: '#/components/examples/AspectAttributeInvalid' - '404': - description: | - Requested Page Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - PageNotFound: - $ref: '#/components/examples/PageNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience -components: - securitySchemes: - ShopperToken: - type: oauth2 - description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" - flows: - clientCredentials: - tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-experience: Shopper Experience scope READONLY - authorizationCode: - authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize - tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-experience: Shopper Experience scope READONLY - schemas: - OrganizationId: - description: An identifier for the organization the request is being made by - example: f_ecom_zzxy_prd - type: string - minLength: 1 - maxLength: 32 - SiteId: - minLength: 1 - maxLength: 32 - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites - example: RefArch - type: string - LanguageCountry: - pattern: ^[a-z][a-z]-[A-Z][A-Z]$ - description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. - example: en-US - type: string - LanguageCode: - pattern: ^[a-z][a-z]$ - description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). - example: en - type: string - DefaultFallback: - default: default - description: A specialized value indicating the system default values for locales. - example: default - enum: - - default - type: string - LocaleCode: - description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - oneOf: - - $ref: '#/components/schemas/LanguageCountry' - - $ref: '#/components/schemas/LanguageCode' - - $ref: '#/components/schemas/DefaultFallback' - Region: - properties: - id: - maxLength: 256 - title: ID - description: Region identifier. - example: header - type: string - components: - title: Components - description: The components in the region. - example: - - id: iofwj38fhw3f - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - type: array - items: - $ref: '#/components/schemas/Component' - required: - - id - type: object - Component: - properties: - id: - maxLength: 256 - title: ID - description: Component identifier. - example: rfdvj4ojtltljw3 - type: string - typeId: - maxLength: 256 - title: Component Type ID - description: Component type identifier. - example: commerce_assets.carousel - type: string - data: - title: Component Data - description: The configuration data assigned to the component. - example: - title: Topseller - category: topseller - type: object - additionalProperties: false - custom: - title: Custom Component Data - description: Any custom data added by the custom code for this component. - example: - detailUrl: www.myshop.com/topseller - type: object - additionalProperties: false - regions: - title: Regions - description: The regions (and their assigned components) for the component. - example: - - id: tiles - components: - - id: w3reö9wsjf3 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: cgn8d4ngdl4n - typeId: commerce_assets.productTile - data: - product: iphone7 - type: array - items: - $ref: '#/components/schemas/Region' - required: - - id - - typeId - type: object - Page: - properties: - id: - maxLength: 256 - title: ID - description: Page identifier. - example: homepage - type: string - typeId: - maxLength: 256 - title: Page Type ID - description: Page type identifier. - example: storePage - type: string - aspectTypeId: - maxLength: 256 - title: Aspect Type ID - description: The aspect type assigned to the page. - example: pdpAspect - type: string - name: - maxLength: 4000 - title: Page Name - description: Display name of the page. - example: Homepage - type: string - description: - maxLength: 4000 - title: Page Description - description: Description of the page. - example: Home page of the storefront. - type: string - pageTitle: - maxLength: 4000 - title: SEO Title - description: The SEO title of the page. - example: Homepage - My Shop - type: string - pageDescription: - maxLength: 4000 - title: SEO Description - description: The SEO description of the page. - example: Get started shopping - type: string - pageKeywords: - maxLength: 4000 - title: SEO Keywords - description: The SEO keywords of the page. - example: fashion, my shop - type: string - data: - title: Page Data - description: The configuration data assigned to the page. - example: - thumbnail: myshop.jpg - type: object - additionalProperties: false - custom: - title: Custom Page Data - description: Any custom data added by the custom code for the page type. - example: - thumbnail_full: http://static.myshop.com/myshop.jpg - type: object - additionalProperties: false - regions: - title: Regions - description: The regions (and their assigned components) for the page. - example: - - id: header - components: - - id: iofwj38fhw3f - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: rfdvj4ojtltljw3 - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: w3reö9wsjf3 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: cgn8d4ngdl4n - typeId: commerce_assets.productTile - data: - product: iphone7 - - id: footer - components: [] - type: array - items: - $ref: '#/components/schemas/Region' - required: - - id - - typeId - type: object - PageResult: - properties: - data: - title: Data - description: List of pages. - type: array - items: - $ref: '#/components/schemas/Page' - required: - - data - type: object - ErrorResponse: - type: object - additionalProperties: true - properties: - title: - description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" - type: string - maxLength: 256 - example: You do not have enough credit - type: - description: | - A URI reference [RFC3986] that identifies the - problem type. This specification encourages that, when - dereferenced, it provide human-readable documentation for the - problem type (e.g., using HTML [W3C.REC-html5-20141028]). When - this member is not present, its value is assumed to be - "about:blank". It accepts relative URIs; this means - that they must be resolved relative to the document's base URI, as - per [RFC3986], Section 5. - type: string - maxLength: 2048 - example: NotEnoughMoney - detail: - description: A human-readable explanation specific to this occurrence of the problem. - type: string - example: Your current balance is 30, but that costs 50 - instance: - description: | - A URI reference that identifies the specific - occurrence of the problem. It may or may not yield further - information if dereferenced. It accepts relative URIs; this means - that they must be resolved relative to the document's base URI, as - per [RFC3986], Section 5. - type: string - maxLength: 2048 - example: /account/12345/msgs/abc - required: - - title - - type - - detail - parameters: - organizationId: - description: An identifier for the organization the request is being made by - name: organizationId - in: path - required: true - example: f_ecom_zzxy_prd - schema: - $ref: '#/components/schemas/OrganizationId' - categoryId: - name: categoryId - in: query - description: Category identifier that is used for searching the page assignment. Must be provided if no `productId` is provided. - required: false - schema: - maxLength: 256 - type: string - example: home-clearance - productId: - name: productId - in: query - description: Product identifier that is used for searching the page assignment. Must be provided if no `categoryId` is provided. - required: false - schema: - maxLength: 100 - type: string - example: iphone11 - aspectTypeId: - name: aspectTypeId - in: query - description: Aspect type identifier that is used for searching the page assignment in conjunction with either the `productId` or `categoryId`. - required: true - schema: - maxLength: 256 - type: string - example: pdp - aspectAttributes: - name: aspectAttributes - in: query - description: A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding. - required: false - schema: - type: string - maxLength: 256 - example: |- - { - "product" : "iphone11", - "breadcrumbCategory" : "home-clearance" - } - parameters: - name: parameters - in: query - description: A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding. - required: false - schema: - maxLength: 256 - type: string - example: refine=color,size;currency=USD;showNavigation=false - siteId: - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. - name: siteId - in: query - required: true - examples: - SiteId: - value: RefArch - schema: - $ref: '#/components/schemas/SiteId' - locale: - description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - name: locale - in: query - examples: - LanguageCountry: - value: en-US - CountryCode: - value: US - schema: - $ref: '#/components/schemas/LocaleCode' - pageId: - name: pageId - in: path - description: Identifier for the requested page. - required: true - schema: - maxLength: 256 - type: string - example: homepage - examples: - PageResult: - value: - data: - - id: homePpage - typeId: storePage - aspectTypeId: pdpAspect - name: Homepage - description: Home page of the storefront. - pageTitle: Homepage - My Shop - pageDescription: Get started shopping - pageKeywords: fashion, my shop - data: - thumbnail: myshop.jpg - custom: - thumbnail_full: http://static.myshop.com/myshop.jpg - regions: - - id: header - components: - - id: 2192f5b9aac0f2af2385f6f6b7 - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: 5c5ebbcd2aee1a67af519c83b5 - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: d98a30dfe93715e3e6fc22a329 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: 43aa39896afb9292308181ce14 - typeId: commerce_assets.productTile - data: - product: iphone7 - - id: detailpage - typeId: storePage - name: storepage - description: A Store page - pageTitle: A Store - pageDescription: Buy in store - pageKeywords: fashion, my shop, store - data: - thumbnail: mystore.jpg - BusinessObjectIDInvalid: - value: - title: Business Object ID Invalid - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid - detail: At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist. - AspectTypeNotFound: - value: - title: Aspect Type Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found - detail: No aspect type with ID 'pdp' was found in site 'RefArch'. - Page: - value: - id: homepage - typeId: storePage - aspectTypeId: pdpAspect - name: Homepage - description: Home page of the storefront. - pageTitle: Homepage - My Shop - pageDescription: Get started shopping - pageKeywords: fashion, my shop - data: - thumbnail: myshop.jpg - custom: - thumbnail_full: http://static.myshop.com/myshop.jpg - regions: - - id: header - components: - - id: 375b9107b067902827083772f9 - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: be1f331b92d8ad7e38e440e35d - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: 45af07459684e6db78990c5d05 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: df6e33766d90e7e205d109aa2f - typeId: commerce_assets.productTile - data: - product: iphone7 - AspectAttributeInvalid: - value: - title: Aspect Attribute Invalid - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-attribute-invalid - detail: 'Aspect attribute value "5555" does not fulfill its respective definition {"id" : "foobar", "type" : "string","required" : "false"}' - PageNotFound: - value: - title: Page Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/page-not-found - detail: No visible page with ID 'homepage' was found in site 'RefArch'. diff --git a/apis/shopper-experience-oas-1.0.7/exchange.json b/apis/shopper-experience-oas-1.1.0/exchange.json similarity index 93% rename from apis/shopper-experience-oas-1.0.7/exchange.json rename to apis/shopper-experience-oas-1.1.0/exchange.json index ebdb8cb0..e520b4de 100644 --- a/apis/shopper-experience-oas-1.0.7/exchange.json +++ b/apis/shopper-experience-oas-1.1.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Experience OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-experience-oas", - "version": "1.0.7", + "version": "1.1.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml new file mode 100644 index 00000000..74c88a94 --- /dev/null +++ b/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml @@ -0,0 +1,1394 @@ +openapi: 3.0.3 +info: + x-api-type: Shopper + x-api-family: Experience + title: Shopper Experience + version: 1.1.0 + description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-experience/shopper-experience-oas-v1-public.yaml) + + # API Overview + Use the Shopper Experience API to look up page information for pages that are created in Page Designer, content assets and to access content folders. + + ## Pages + Responses for pages include the following: + + - The entire component hierarchy of the page at design time. + - All merchant data provided at design time. + - Server-side scripting data provided at run time. + + Both the page and components contain the values of all native and custom attributes that have been populated during page authoring. + + Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. + + ## Content Assets + + Content asset responses include: + + - Rich content including text, HTML, and images + - SEO metadata (title, description, keywords) + - Template information for rendering + - Folder organization structure + - Custom attributes and properties + + Only content assets that are marked as online are returned. Content assets provide flexible content management capabilities for storefronts. + + ## Content Folders + The API also provides access to content folders, which are used to organize and manage content assets. Content folders support: + + - Hierarchical organization with nested subfolders + - Localized metadata including names, descriptions, and SEO attributes + - Custom attributes for extended functionality + - Configurable depth levels for subfolder retrieval (0, 1, or 2 levels) + + Only content folders that are marked as online are returned in the API responses. + + ## Authentication & Authorization + + The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). + + **Important**: Currently, the Shopper Experience Pages endpoints can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/pages: + get: + summary: Get Page Designer pages. + description: "Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.\n\nYou must provide the `aspectTypeId` along with either a `categoryId` or a `productId`. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.\n\n**Important**: \n- Currently, you can't use the Shopper Experience Pages endpoints when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPages + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/categoryId' + - $ref: '#/components/parameters/productId' + - $ref: '#/components/parameters/aspectTypeId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/PageResult' + examples: + PageResult: + $ref: '#/components/examples/PageResult' + '400': + description: | + Business Object ID Invalid + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BusinessObjectIDInvalid: + $ref: '#/components/examples/BusinessObjectIDInvalid' + '404': + description: | + Requested Aspect Type Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectTypeNotFound: + $ref: '#/components/examples/AspectTypeNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience + - sfcc.shopper-experience.pages + /organizations/{organizationId}/pages/{pageId}: + get: + summary: Get a Page Designer page based on a single page ID. + description: "Get a Page Designer page for a specific page ID. The results apply the visibility rules for the page's components, such as personalization or scheduled visibility.\n\n**Important**: \n- Currently, you can't use the Shopper Experience Pages endpoints when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPage + parameters: + - $ref: '#/components/parameters/pageId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Page' + examples: + Page: + $ref: '#/components/examples/Page' + '400': + description: | + Invalid Query Parameter + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectAttributeInvalid: + $ref: '#/components/examples/AspectAttributeInvalid' + '401': + description: | + Unauthorized Access + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: | + Requested Page Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + PageNotFound: + $ref: '#/components/examples/PageNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience + - sfcc.shopper-experience.pages + /organizations/{organizationId}/contents/{id}: + get: + summary: Get a content asset by ID. + description: "Get a content asset by its unique identifier. Only content assets that are marked as online are returned.\n\nContent assets contain rich content that can be displayed on storefronts, including text, HTML, images, and custom attributes.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." + operationId: getContent + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/contentId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Content' + examples: + Content: + $ref: '#/components/examples/Content' + '404': + description: | + Content Asset Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ContentNotFound: + $ref: '#/components/examples/ContentNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience.contents + /organizations/{organizationId}/contents: + get: + summary: Get multiple content assets. + description: "Get multiple content assets by their identifiers. Only content assets that are marked as online are returned.\n\nThis endpoint allows you to retrieve multiple content assets in a single request, which is more efficient than making multiple individual requests.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." + operationId: getMultipleContent + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/contentIds' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/ContentResult' + examples: + ContentResult: + $ref: '#/components/examples/ContentResult' + '400': + description: | + Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + GetContentsBadRequest: + $ref: '#/components/examples/GetContentsBadRequest' + security: + - ShopperToken: + - sfcc.shopper-experience.contents + /organizations/{organizationId}/content-search: + get: + summary: Search for content assets. + description: "Provides keyword and refinement search functionality for content assets. The search result contains only content\nthat is online and assigned to a folder.\n\n**Refinement Parameters:**\nThe following system refinement attribute IDs are supported:\n- `fdid`: Allows refinement per single content folder ID. Multiple folder IDs are not supported.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." + operationId: searchContent + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/contentSearchQuery' + - $ref: '#/components/parameters/contentSearchRefine' + - $ref: '#/components/parameters/contentSearchSort' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + - name: limit + in: query + required: false + schema: + type: integer + format: int32 + default: 50 + maximum: 200 + description: Maximum records to retrieve per request, not to exceed 200. Defaults to 50. + - name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + minimum: 0 + description: Used to retrieve the results based on a particular resource offset. + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/ContentSearchResult' + examples: + ContentSearchResult: + $ref: '#/components/examples/ContentSearchResult' + '400': + description: | + Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ContentSearchBadRequest: + $ref: '#/components/examples/ContentSearchBadRequest' + security: + - ShopperToken: + - sfcc.shopper-experience.contents + /organizations/{organizationId}/folders/{id}: + get: + summary: Get content folder + description: "To access a content folder, you construct a URL using the template shown below. \nThis template requires you to specify a content folder id and a subfolder level. \nIn response, the server returns a corresponding content folder document. \nOnly content folders which are marked as online are returned." + operationId: getContentFolder + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/folderId' + - $ref: '#/components/parameters/levels' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ContentFolder' + examples: + ContentFolder: + $ref: '#/components/examples/ContentFolder' + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + InvalidLevelsParameter: + $ref: '#/components/examples/InvalidLevelsParameter' + '401': + $ref: '#/components/responses/401unauthorized' + '403': + $ref: '#/components/responses/403forbidden' + '404': + description: Folder Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ContentFolderNotFound: + $ref: '#/components/examples/ContentFolderNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience.folders + /organizations/{organizationId}/folders: + get: + summary: Get multiple content folders + description: "To access one or more content folders, you construct a URL using the template shown below. \nThis template requires you to specify one or more content folder ids as a query parameter and a subfolder level. \nIn response, the server returns a result set of corresponding content folder documents. \nOnly content folders which are marked as online are returned." + operationId: getContentFolders + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/folderIds' + - $ref: '#/components/parameters/levels' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ContentFolderResult' + examples: + ContentFolderResult: + $ref: '#/components/examples/ContentFolderResult' + '400': + description: Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + InvalidLevelsParameter: + $ref: '#/components/examples/InvalidLevelsParameter' + '401': + $ref: '#/components/responses/401unauthorized' + '403': + $ref: '#/components/responses/403forbidden' + security: + - ShopperToken: + - sfcc.shopper-experience.folders +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + sfcc.shopper-experience.pages: Shopper Experience scope READONLY for pages + sfcc.shopper-experience.contents: Shopper Experience scope READONLY for contents + sfcc.shopper-experience.folders: Shopper Experience scope READONLY for folders + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + sfcc.shopper-experience.pages: Shopper Experience scope READONLY for pages + sfcc.shopper-experience.contents: Shopper Experience scope READONLY for contents + sfcc.shopper-experience.folders: Shopper Experience scope READONLY for folders + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Region: + properties: + id: + maxLength: 256 + title: ID + description: Region identifier. + example: header + type: string + components: + title: Components + description: The components in the region. + example: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + type: array + items: + $ref: '#/components/schemas/Component' + required: + - id + type: object + Component: + properties: + id: + maxLength: 256 + title: ID + description: Component identifier. + example: rfdvj4ojtltljw3 + type: string + typeId: + maxLength: 256 + title: Component Type ID + description: Component type identifier. + example: commerce_assets.carousel + type: string + data: + title: Component Data + description: The configuration data assigned to the component. + example: + title: Topseller + category: topseller + type: object + additionalProperties: false + custom: + title: Custom Component Data + description: Any custom data added by the custom code for this component. + example: + detailUrl: www.myshop.com/topseller + type: object + additionalProperties: false + regions: + title: Regions + description: The regions (and their assigned components) for the component. + example: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + Page: + properties: + id: + maxLength: 256 + title: ID + description: Page identifier. + example: homepage + type: string + typeId: + maxLength: 256 + title: Page Type ID + description: Page type identifier. + example: storePage + type: string + aspectTypeId: + maxLength: 256 + title: Aspect Type ID + description: The aspect type assigned to the page. + example: pdpAspect + type: string + name: + maxLength: 4000 + title: Page Name + description: Display name of the page. + example: Homepage + type: string + description: + maxLength: 4000 + title: Page Description + description: Description of the page. + example: Home page of the storefront. + type: string + pageTitle: + maxLength: 4000 + title: SEO Title + description: The SEO title of the page. + example: Homepage - My Shop + type: string + pageDescription: + maxLength: 4000 + title: SEO Description + description: The SEO description of the page. + example: Get started shopping + type: string + pageKeywords: + maxLength: 4000 + title: SEO Keywords + description: The SEO keywords of the page. + example: fashion, my shop + type: string + data: + title: Page Data + description: The configuration data assigned to the page. + example: + thumbnail: myshop.jpg + type: object + additionalProperties: false + custom: + title: Custom Page Data + description: Any custom data added by the custom code for the page type. + example: + thumbnail_full: http://static.myshop.com/myshop.jpg + type: object + additionalProperties: false + regions: + title: Regions + description: The regions (and their assigned components) for the page. + example: + - id: header + components: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: rfdvj4ojtltljw3 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: footer + components: [] + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + PageResult: + properties: + data: + title: Data + description: List of pages. + type: array + items: + $ref: '#/components/schemas/Page' + required: + - data + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + ContentId: + maxLength: 256 + minLength: 1 + description: The id of the content asset. + example: homepage-banner + type: string + Content: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + id: + title: ID + allOf: + - $ref: '#/components/schemas/ContentId' + name: + title: Name + description: The localized content asset name. + type: string + maxLength: 4000 + example: Homepage Banner + description: + title: Description + description: The localized content asset description. + type: string + maxLength: 4000 + example: Main banner displayed on the homepage + pageDescription: + title: Page Description + description: The localized content asset page description for SEO. + type: string + maxLength: 4000 + example: Discover our latest products and offers + pageKeywords: + title: Page Keywords + description: The localized content asset page keywords for SEO. + type: string + maxLength: 4000 + example: products, offers, sale, fashion + pageTitle: + title: Page Title + description: The localized content asset page title for SEO + type: string + maxLength: 4000 + example: Shop Now - Best Deals + required: + - id + type: object + Limit: + default: 10 + minimum: 1 + format: int32 + description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). + type: integer + example: 10 + Total: + default: 0 + minimum: 0 + format: int32 + description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. + type: integer + example: 10 + ResultBase: + description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." + type: object + required: + - limit + - total + properties: + limit: + maximum: 200 + allOf: + - $ref: '#/components/schemas/Limit' + total: + $ref: '#/components/schemas/Total' + ContentResult: + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + title: Data + description: List of content assets. + type: array + items: + $ref: '#/components/schemas/Content' + required: + - data + type: object + Offset: + default: 0 + minimum: 0 + format: int32 + description: The zero-based index of the first hit/data to include in the result. + type: integer + example: 0 + PaginatedResultBase: + description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." + type: object + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + offset: + $ref: '#/components/schemas/Offset' + required: + - limit + - offset + - total + ContentSearchRefinementValue: + properties: + label: + title: Label + description: The localized label of the refinement value. + type: string + maxLength: 4000 + example: Banner + value: + title: Value + description: The refinement value. + type: string + maxLength: 256 + example: banner + hitCount: + title: Hit Count + description: The number of search hits when this refinement value is applied. + type: integer + minimum: 0 + example: 5 + required: + - value + type: object + ContentSearchRefinement: + properties: + attributeId: + title: Attribute ID + description: The ID of the refinement attribute. + type: string + maxLength: 256 + example: c_contentType + label: + title: Label + description: The localized label of the refinement attribute. + type: string + maxLength: 4000 + example: Content Type + values: + title: Values + description: The array of refinement values. + type: array + items: + $ref: '#/components/schemas/ContentSearchRefinementValue' + required: + - attributeId + type: object + ContentSearchResult: + allOf: + - $ref: '#/components/schemas/PaginatedResultBase' + properties: + query: + title: Query + description: The query String that was searched for. + type: string + maxLength: 256 + example: banner + hits: + title: Content Hits + description: The sorted array of search hits. Can be empty. + type: array + items: + $ref: '#/components/schemas/Content' + selectedRefinements: + title: Selected Refinements + description: Map of selected refinement attribute id/value(s) pairs. The sorting order is the same like in request URL. + type: object + additionalProperties: + type: string + maxLength: 256 + example: homepage-folder + example: + fdid: homepage-folder + c_contentType: banner + refinements: + title: Refinements + description: The sorted array of search refinements. Can be empty. + type: array + items: + $ref: '#/components/schemas/ContentSearchRefinement' + required: + - hits + type: object + FolderId: + maxLength: 256 + type: string + example: homepage-folder + ContentFolder: + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + id: + maxLength: 256 + title: ID + description: The id of the content folder. + example: homepage-folder + type: string + parentFolderId: + maxLength: 256 + title: Parent Folder ID + description: The id of the parent content folder. + example: root-folder + type: string + name: + title: Name + description: The localized content folder name. + type: string + maxLength: 4000 + example: Homepage Folder + description: + title: Description + description: The localized content folder description. + type: string + maxLength: 4000 + example: Folder containing homepage content assets + pageDescription: + title: Page Description + description: The localized content folder page description. + type: string + maxLength: 4000 + example: SEO description for homepage folder + pageKeywords: + title: Page Keywords + description: The localized content folder page keywords. + type: string + maxLength: 4000 + example: homepage, main, landing + pageTitle: + title: Page Title + description: The localized content folder page title. + type: string + maxLength: 4000 + example: Homepage Folder - My Store + folders: + title: Folders + description: The array of content subfolders. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ContentFolder' + required: + - id + type: object + ContentFolderResult: + allOf: + - $ref: '#/components/schemas/ResultBase' + properties: + data: + title: Data + description: List of content folders. + type: array + items: + $ref: '#/components/schemas/ContentFolder' + required: + - data + type: object + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + categoryId: + name: categoryId + in: query + description: Category identifier that is used for searching the page assignment. Must be provided if no `productId` is provided. + required: false + schema: + maxLength: 256 + type: string + example: home-clearance + productId: + name: productId + in: query + description: Product identifier that is used for searching the page assignment. Must be provided if no `categoryId` is provided. + required: false + schema: + maxLength: 100 + type: string + example: iphone11 + aspectTypeId: + name: aspectTypeId + in: query + description: Aspect type identifier that is used for searching the page assignment in conjunction with either the `productId` or `categoryId`. + required: true + schema: + maxLength: 256 + type: string + example: pdp + aspectAttributes: + name: aspectAttributes + in: query + description: A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + type: string + maxLength: 256 + example: |- + { + "product" : "iphone11", + "breadcrumbCategory" : "home-clearance" + } + parameters: + name: parameters + in: query + description: A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + maxLength: 256 + type: string + example: refine=color,size;currency=USD;showNavigation=false + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + pageId: + name: pageId + in: path + description: Identifier for the requested page. + required: true + schema: + maxLength: 256 + type: string + example: homepage + contentId: + name: id + in: path + description: Identifier for the requested content asset. + required: true + schema: + $ref: '#/components/schemas/ContentId' + contentIds: + name: ids + in: query + description: Comma-separated list of content asset identifiers to retrieve. + required: true + style: form + explode: false + schema: + type: array + items: + $ref: '#/components/schemas/ContentId' + minItems: 1 + maxItems: 50 + example: homepage-banner,footer-content,sidebar-promo + contentSearchQuery: + name: q + in: query + description: The query phrase to search for content assets. For example, to search for content with "banner", type q=banner. + required: false + schema: + maxLength: 50 + minLength: 1 + type: string + example: banner + contentSearchRefine: + name: refine + in: query + description: "Parameter that represents a refinement attribute/value(s) pair. Refinement attribute ID and value(s) are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"). Value ranges can be specified like this: refine=foo=(100..500). \nMultiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementType=type1|type2|type3.\n\nThe following system refinement attribute IDs are supported:\n- `fdid`: Allows refinement per single content folder ID. Multiple folder IDs are not supported." + required: false + style: form + explode: true + schema: + type: string + maxLength: 256 + example: fdid=homepage-folder + contentSearchSort: + name: sort + in: query + description: |- + Parameter that represents a sorting attribute/value(s) pair. Sorting attribute ID and value are separated by '='. The value describes the sort direction. Possible values are 'asc' and 'desc', for ascending or descending sort direction. I.e. sort=c_myAttribute=desc. + + Precondition: You have to select your sorting attributes in Business Manager > YourSite > Search Indexes > Content Index > Sorting Attributes. + required: false + style: form + explode: true + schema: + type: string + maxLength: 256 + example: name=asc + folderId: + name: id + in: path + description: Identifier for the requested content folder. + required: true + schema: + $ref: '#/components/schemas/FolderId' + levels: + name: levels + in: query + description: Specifies how many levels of nested subfolders you want the server to return. The default value is 1. Valid values are 0, 1, or 2. + required: false + schema: + type: integer + minimum: 0 + maximum: 2 + default: 1 + example: 1 + folderIds: + name: ids + in: query + style: form + explode: false + description: Comma-separated list of content folder identifiers. + required: true + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/FolderId' + minItems: 1 + maxItems: 50 + example: homepage-folder,category-folder,product-folder + examples: + PageResult: + value: + data: + - id: homePpage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 2192f5b9aac0f2af2385f6f6b7 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: 5c5ebbcd2aee1a67af519c83b5 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: d98a30dfe93715e3e6fc22a329 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: 43aa39896afb9292308181ce14 + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: detailpage + typeId: storePage + name: storepage + description: A Store page + pageTitle: A Store + pageDescription: Buy in store + pageKeywords: fashion, my shop, store + data: + thumbnail: mystore.jpg + BusinessObjectIDInvalid: + value: + title: Business Object ID Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid + detail: At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist. + AspectTypeNotFound: + value: + title: Aspect Type Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found + detail: No aspect type with ID 'pdp' was found in site 'RefArch'. + Page: + value: + id: homepage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 375b9107b067902827083772f9 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: be1f331b92d8ad7e38e440e35d + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: 45af07459684e6db78990c5d05 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: df6e33766d90e7e205d109aa2f + typeId: commerce_assets.productTile + data: + product: iphone7 + AspectAttributeInvalid: + value: + title: Aspect Attribute Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-attribute-invalid + detail: 'Aspect attribute value "5555" does not fulfill its respective definition {"id" : "foobar", "type" : "string","required" : "false"}' + PageNotFound: + value: + title: Page Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/page-not-found + detail: No visible page with ID 'homepage' was found in site 'RefArch'. + Content: + value: + id: homepage-banner + name: Homepage Banner + description: Main promotional banner for the homepage + pageTitle: Homepage Banner - My Shop + pageDescription: Discover amazing products at great prices + pageKeywords: banner, promotion, homepage + ContentNotFound: + value: + title: Content Asset Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/content-not-found + detail: No visible content asset with ID 'homepage-banner' was found in site 'RefArch'. + ContentResult: + value: + data: + - id: homepage-banner + name: Homepage Banner + description: Main promotional banner for the homepage + pageTitle: Homepage Banner - My Shop + pageDescription: Discover amazing products at great prices + pageKeywords: banner, promotion, homepage + - id: footer-content + name: Footer Content + description: Footer information and links + pageTitle: Footer - My Shop + pageDescription: Footer content with links and copyright information + pageKeywords: footer, links, copyright + total: 2 + limit: 2 + GetContentsBadRequest: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + detail: '''ids'' violates the value constraint. The expected value is between ''(0..50)''.' + parameter: ids + expected: (0..50) + ContentSearchResult: + value: + query: banner + hits: + - id: homepage-banner + name: Homepage Banner + description: Main promotional banner for the homepage + pageTitle: Homepage Banner - My Shop + pageDescription: Discover amazing products at great prices + pageKeywords: banner, promotion, homepage + - id: sidebar-banner + name: Sidebar Banner + description: Promotional banner for the sidebar + pageTitle: Sidebar Banner - My Shop + pageDescription: Check out our special offers + pageKeywords: banner, sidebar, promotion + selectedRefinements: + fdid: homepage-folder + c_contentType: banner + refinements: + - attributeId: c_contentType + label: Content Type + values: + - value: banner + label: Banner + hitCount: 15 + - value: text + label: Text Content + hitCount: 8 + - attributeId: fdid + label: Content Folder + values: + - value: homepage-folder + label: Homepage + hitCount: 5 + - value: promotions-folder + label: Promotions + hitCount: 10 + total: 2 + limit: 25 + offset: 0 + ContentSearchBadRequest: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + detail: 'Invalid refinement parameter format. Expected format: ''attribute=value''.' + parameter: refine + ContentFolder: + value: + id: homepage-folder + parentFolderId: root-folder + name: Homepage Folder + description: Folder containing homepage content assets + pageTitle: Homepage Folder - My Store + pageDescription: SEO description for homepage folder + pageKeywords: homepage, main, landing + folders: + - id: hero-section + parentFolderId: homepage-folder + name: Hero Section + description: Hero section content folder + folders: [] + - id: featured-products + parentFolderId: homepage-folder + name: Featured Products + description: Featured products content folder + folders: [] + c_customAttribute: customValue + InvalidLevelsParameter: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + detail: '''levels'' violates the value constraint. The expected value is between ''(0..2)''.' + UnauthorizedExample: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized + title: Unauthorized + detail: Your access token is invalid or expired and can’t be used to identify a user. + ForbiddenExample: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden + title: Forbidden + detail: Your access token is valid, but you don’t have the required permissions to access the resource. + ContentFolderNotFound: + value: + title: Folder Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/folder-not-found + detail: No online content folder with ID 'non-existent-folder' for site 'RefArch' could be found. + ContentFolderResult: + value: + limit: 2 + total: 10 + data: + - id: homepage-folder + parentFolderId: root-folder + name: Homepage Folder + description: Folder containing homepage content assets + pageTitle: Homepage Folder - My Store + pageDescription: SEO description for homepage folder + pageKeywords: homepage, main, landing + folders: + - id: hero-section + parentFolderId: homepage-folder + name: Hero Section + description: Hero section content folder + folders: [] + - id: featured-products + parentFolderId: homepage-folder + name: Featured Products + description: Featured products content folder + folders: [] + c_customAttribute: customValue + - id: category-folder + parentFolderId: root-folder + name: Category Folder + description: Folder containing category content assets + pageTitle: Category Folder - My Store + pageDescription: SEO description for category folder + pageKeywords: category, products, listing + folders: [] + responses: + 401unauthorized: + description: Your access token is invalid or expired and can’t be used to identify a user. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + UnauthorizedExample: + $ref: '#/components/examples/UnauthorizedExample' + 403forbidden: + description: Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + ForbiddenExample: + $ref: '#/components/examples/ForbiddenExample' diff --git a/apis/shopper-gift-certificates-oas-1.0.26/exchange.json b/apis/shopper-gift-certificates-oas-1.0.27/exchange.json similarity index 93% rename from apis/shopper-gift-certificates-oas-1.0.26/exchange.json rename to apis/shopper-gift-certificates-oas-1.0.27/exchange.json index 15a341ad..9e86bbe5 100644 --- a/apis/shopper-gift-certificates-oas-1.0.26/exchange.json +++ b/apis/shopper-gift-certificates-oas-1.0.27/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Gift Certificates OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-gift-certificates-oas", - "version": "1.0.26", + "version": "1.0.27", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml b/apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml similarity index 98% rename from apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml rename to apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml index 1008c88f..776ba528 100644 --- a/apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml +++ b/apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml @@ -1,9 +1,10 @@ openapi: 3.0.3 info: title: Shopper Gift Certificates - version: v1 + version: 1.0.27 description: |- # API Overview + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml) Use the Shopper Gift Certificates API to obtain gift certificate details. diff --git a/apis/shopper-login-oas-1.39.41/exchange.json b/apis/shopper-login-oas-1.41.0/exchange.json similarity index 92% rename from apis/shopper-login-oas-1.39.41/exchange.json rename to apis/shopper-login-oas-1.41.0/exchange.json index 3b0e0e86..8515be17 100644 --- a/apis/shopper-login-oas-1.39.41/exchange.json +++ b/apis/shopper-login-oas-1.41.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Login OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-login-oas", - "version": "1.39.41", + "version": "1.41.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml b/apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml similarity index 97% rename from apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml rename to apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml index 59b446c9..bb6ba671 100644 --- a/apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml +++ b/apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Shopper title: Shopper Login - version: 1.39.41 + version: 1.41.0 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml) + # API Overview The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications. @@ -201,6 +205,7 @@ paths: operationId: authorizePasswordlessCustomer parameters: - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/register_customer' - name: Authorization in: header description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`' @@ -255,6 +260,13 @@ paths: examples: BadOrMissingAccessToken400: $ref: '#/components/examples/BadOrMissingAccessToken400' + TooManyLoginRequests400: + description: | + This error is returned specifically when mode = email and the user has exceeded the maximum number of login attempts within the rate limit window. + The client should implement exponential backoff and retry the request after the specified time period. + value: + error: invalid_request + error_description: Too many login requests were made. Please try again later. headers: X-RateLimit-1M-Limit: description: The 1 minute maximum number of requests permitted per hour. @@ -2345,12 +2357,32 @@ components: example: RefArch callback_uri: type: string - description: | + description: |- The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url. example: http://localhost:9050/passwordless/login/callback - description: A request for a passwordless login token. This is only available for resgistered users using B2C Commerce. + last_name: + maxLength: 100 + type: string + description: "The user's last name. Required when `register_customer` is `true`. \nThe `last_name` parameter is not used when `register_customer` parameter is not added or is `false`." + example: Sampleson + email: + maxLength: 128 + type: string + description: "The user's email address. Required when `register_customer` is `true` and `user_id` is not an email address. \nThe `email` parameter is not used when `register_customer` parameter is not added or is `false`." + example: samantha.sampleson@example.com + first_name: + maxLength: 100 + type: string + description: "The user's first name. Optional when `register_customer` is `true`. \nThe `first_name` parameter is not used when `register_customer` parameter is not added or is `false`." + example: Samantha + phone_number: + maxLength: 48 + type: string + description: "The user's phone number. Optional when `register_customer` is `true`. \nThe `phone_number` parameter is not used when `register_customer` parameter is not added or is `false`." + example: 17776665555 + description: A request for a passwordless login token. This is only available for registered users using B2C Commerce. TokenType: type: string description: Token Type @@ -2413,6 +2445,16 @@ components: type: string description: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS. example: eyJraWQiOiJYS21HbHVuSm0zSlBTMHNjQXZXV19XQlYtRi1wMkxLSDR0V05UMHVVSjVJIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjFMY0xxTWhqM2t0N1FKeFhxQ0VtdGZOOVV2eUcweW1meDFxZG9BdzF1NWMub2FyeXhveHF0QUtxaVFMbkM1ZDYiLCJpc3MiOiJodHRwczovL2Rldi05NTY1MjM2Lm9rdGEuY29tIiwiYXVkIjoiaHR0cHM6Ly9kZXYtOTU2NTIzNi5va3RhLmNvbSIsInN1YiI6Im9rdGEuc2xhcy50ZXN0IiwiaWF0IjoxNjc5Njk4MzA4LCJleHAiOjE2Nzk3MDE5MDgsImNpZCI6IjBvYTJrNXNma0JXZ0poTEVHNWQ2IiwidWlkIjoiMDB1MzhxZGpuU2NMT0IxbXE1ZDYiLCJzY3AiOlsib2ZmbGluZV9hY2Nlc3MiLCJvcGVuaWQiLCJlbWFpbCIsInByb2ZpbGUiXSwiYXV0aF90aW1lIjoxNjc5Njk4MzA2fQ.FDbGsnZGwTYVKGSlAo6jqcjG2HQ_BqQKRk72M5h69DRHyOM4wngsEELN_Wtgj3E77sP7IOmIKjiK5SFP17ADMbKZptVr2pqaMVF3PuU3Cbl_MgXZValfT-z12jHRq9sHMfsdTjY2RnvG44ZDFKc2no8mdL6IJ1MfCaZT5Tql5Ktq_UgudaWFsYqad3ETcmp5Y8ivz1bFnqud0sO9D9JzYOtfd9h71JKcsSC2rXc_Si-INPKKaGl8CDgaLXxu_Am9twJpUenHLpy0BerhcVvdFz7_611E53xOT_Esrc1pe-XAZtlYsJFnhxTBDT342ukiSWk2m6juVappv1GsRfUf2g + idp_refresh_token: + maxLength: 128 + type: string + description: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS. + example: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU + dnt: + maxLength: 5 + type: string + description: Do not track + example: true GrantType: type: string description: Grant Type @@ -2839,6 +2881,13 @@ components: The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo + login_id: + maxLength: 128 + type: string + description: |- + The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. + ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch. + example: samantha.sampleson@example.com description: A request for an access token using a passwordless token. TokenActionRequest: required: @@ -2864,6 +2913,18 @@ components: example: f_ecom_zzxy_prd schema: $ref: '#/components/schemas/OrganizationId' + register_customer: + name: register_customer + in: query + description: |- + When set to `true`, creates a new customer profile in B2C Commerce if one doesn't already exist. Requires `last_name` and `email` body parameters unless `user_id` is an email address. Optionally accepts `first_name` and `phone_number` body parameters. + If the customer profile doesn't exist, it is created when the TOTP is validated via the `passwordless/token` endpoint. + + When set to `false` (or omitted), no customer profile is created in B2C Commerce. + required: false + schema: + maxLength: 5 + type: string client_id: name: client_id in: query @@ -2883,7 +2944,9 @@ components: name: hint in: query description: |- - `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper. + `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID. + This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token. + A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out. If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request. @@ -3065,7 +3128,7 @@ components: value: access_token: '' id_token: 'null' - refresh_token: EnL9U2f3-WiVPwL60CFBI21UY_oxWAwX5JkgO-X12Vs + refresh_token: '' expires_in: 0 refresh_token_expires_in: 0 token_type: Bearer @@ -3073,6 +3136,8 @@ components: customer_id: 'null' enc_user_id: 'null' idp_access_token: '' + idp_refresh_token: 'null' + dnt: 'null' authorizeCustomerSuccess: value: authorizationCode: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiS diff --git a/apis/shopper-orders-oas-1.5.0/exchange.json b/apis/shopper-orders-oas-1.6.0/exchange.json similarity index 90% rename from apis/shopper-orders-oas-1.5.0/exchange.json rename to apis/shopper-orders-oas-1.6.0/exchange.json index a36ad84e..d7e7a5b7 100644 --- a/apis/shopper-orders-oas-1.5.0/exchange.json +++ b/apis/shopper-orders-oas-1.6.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Orders OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-orders-oas", - "version": "1.5.0", + "version": "1.6.0-master-b69", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml b/apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml similarity index 93% rename from apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml rename to apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml index 5348c8b9..57ef580a 100644 --- a/apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml +++ b/apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Checkout title: Shopper Orders - version: v1 + version: 1.6.0-master-b69 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-orders/shopper-orders-oas-v1-public.yaml) + # API Overview The Shopper Orders API enables you to: @@ -315,11 +319,13 @@ paths: examples: PaymentInstrumentPatch: $ref: '#/components/examples/PaymentInstrumentPatch' + PaymentInstrumentPatchWithSalesforcePayments: + $ref: '#/components/examples/PaymentInstrumentPatchWithSalesforcePayments' schema: $ref: '#/components/schemas/OrderPaymentInstrumentRequest' responses: '200': - description: Success, the response body contains the order with the updated payment instrument. + description: Success, the response body contains the order with the updated payment instrument. When Salesforce Payments is enabled, the paymentReference object will be included in the paymentInstruments. content: application/json: schema: @@ -327,6 +333,8 @@ paths: examples: Order: $ref: '#/components/examples/examples-PaymentInstrumentPatch' + OrderWhenSalesforcePaymentsEnabled: + $ref: '#/components/examples/PaymentInstrumentPatchWhenSalesforcePaymentsEnabled' '400': description: |- Possible reasons: @@ -1073,6 +1081,26 @@ components: description: The payment method ID. It is read only. example: CREDIT_CARD type: string + paymentReference: + description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. + type: object + properties: + paymentReferenceId: + description: Payment reference identifier. Can be payment intent ID for Stripe, PSP reference for Adyen, PayPal order ID for PayPal, or similar identifier for other payment providers. + type: string + maxLength: 256 + example: pi_3N4B2vF0wDjebNCp1234567 + clientSecret: + description: Client secret for payment confirmation. Used primarily by Stripe for client-side payment confirmation. + type: string + maxLength: 256 + example: pi_3N4B2vF0wDjebNCp1234567_secret_abc123 + redirectUrl: + description: Redirect URL for payment methods that require user redirection to complete payment. + type: string + format: uri + maxLength: 2048 + example: https://checkout.stripe.com/pay/cs_test_abc123 type: object ProductItem: description: Document representing a product item. @@ -2265,6 +2293,32 @@ components: description: The year the payment card is valid from. example: 2019 type: integer + PaymentReferenceRequest: + type: object + description: Properties for Payments Reference Request + properties: + paymentMethodType: + type: string + maxLength: 64 + description: Payment Method Type + example: card + zoneId: + type: string + description: The unique identifier for a Payments zone. + pattern: ^[a-zA-Z0-9\-_]{1,100}$ + minLength: 1 + maxLength: 100 + example: + Amer-Zone: null + shippingPreference: + type: string + maxLength: 64 + description: Shipping preference for PayPal payment processing. Applicable only for basket payment instruments. + enum: + - GET_FROM_FILE + - NO_SHIPPING + - SET_PROVIDED_ADDRESS + example: GET_FROM_FILE OrderPaymentInstrumentRequest: description: Document representing an order payment instrument request. additionalProperties: @@ -2299,6 +2353,10 @@ components: description: The payment method ID. example: CREDIT_CARD type: string + paymentReferenceRequest: + description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. + allOf: + - $ref: '#/components/schemas/PaymentReferenceRequest' PaymentCardSpec: description: Document representing the specification for a payment card. type: object @@ -2985,6 +3043,13 @@ components: paymentCard: cardType: Visa maskedNumber: '****-****-****-4567' + PaymentInstrumentPatchWithSalesforcePayments: + value: + amount: 700 + paymentMethodId: Salesforce Payments + paymentReferenceRequest: + paymentMethodType: card + zoneId: Amer-Zone examples-PaymentInstrumentPatch: value: adjustedMerchandizeTotalTax: 30 @@ -3152,6 +3217,181 @@ components: status: new taxation: net taxTotal: 30.8 + PaymentInstrumentPatchWhenSalesforcePaymentsEnabled: + value: + adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + billingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + channelType: storefront + confirmationStatus: not_confirmed + couponItems: + - code: 5ties + couponItemId: d3f7ae47e5897a6b5d2fd541f0 + statusCode: applied + valid: true + createdBy: Customer + creationDate: '2019-10-22T12:17:28.341Z' + currency: USD + customerInfo: + customerId: beQeANXJNsd0xcINsB6cSrobQa + customerName: Stephanie Miller + email: shopper@salesforce-test.com + customerName: Stephanie Miller + exportStatus: not_exported + groupedTaxItems: + - taxRate: 0.05 + taxValue: 30.8 + guest: true + giftCertificateItems: + - amount: 1 + giftCertificateItemId: 540db3ffe58bfb04ab673757d7 + recipientEmail: miller@salesforce-test.com + shipmentId: me + lastModified: '2019-10-22T12:17:28.376Z' + merchandizeTotalTax: 30 + orderNo: '00000410' + orderPriceAdjustments: + - appliedDiscount: + amount: 10 + type: amount + reasonCode: customer service + createdBy: support + creationDate: '2019-10-22T12:17:28.347Z' + custom: true + lastModified: '2019-10-22T12:17:28.349Z' + manual: true + price: -10 + priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 + promotionId: 5ties + orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I + orderTotal: 586.76 + orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc + paymentInstruments: + - amount: 20 + paymentInstrumentId: ca47e0da3d49b067b630db624a + paymentMethodId: PAYPAL + paymentReference: + paymentReferenceId: PAY-1AB23456CD789012EF34GHIJ + redirectUrl: https://www.paypal.com/checkoutnow?token=EC-1AB23456CD789012EF + - amount: 566.76 + paymentCard: + cardType: Visa + creditCardExpired: false + paymentInstrumentId: 6b970a04ca8a468a64b9936764 + paymentMethodId: CREDIT_CARD + paymentReference: + paymentReferenceId: 8815749596351791C + redirectUrl: https://test.adyen.com/hpp/pay.shtml?merchantReference=12345 + - amount: 2 + paymentCard: + expirationYear: 1990 + expirationMonth: 7 + validFromMonth: 8 + validFromYear: 2007 + issueNumber: i117 + maskedNumber: '******4567' + holder: Miller + cardType: Visa + paymentInstrumentId: 9f21f0b51f206fbde2ff5789e5 + paymentMethodId: CREDIT_CARD + paymentReference: + paymentReferenceId: pi_1J4K5L2eZvKYlo2CyZ8K5L6M + clientSecret: pi_1J4K5L2eZvKYlo2CyZ8K5L6M_secret_abcdef123456 + paymentStatus: not_paid + productItems: + - adjustedTax: 30 + basePrice: 199.99 + bonusProductLineItem: false + gift: false + itemId: d9516eecc64bd90b0022714d26 + itemText: Green Umbrella - Sustained Edition + optionItems: + - adjustedTax: 0 + basePrice: 0 + bonusProductLineItem: false + gift: false + itemId: 8991e8d7adf0f46ffbc584e175 + itemText: 'Monogramming: Letter "A"' + optionId: textMonogramLetters + optionValueId: A + price: 0 + priceAfterItemDiscount: 0 + priceAfterOrderDiscount: 0 + productId: '701643632930' + productName: Flat Front Pant + shipmentId: me + tax: 0 + taxBasis: 0 + taxRate: 0.05 + priceAfterItemDiscount: 199.99 + priceAfterOrderDiscount: 199.99 + productId: '701643632930' + productName: Green Umbrella - Sustained Edition + quantity: 1 + shipmentId: me + tax: 30 + taxBasis: 199.99 + taxRate: 0.05 + productSubTotal: 199.99 + productTotal: 199.99 + shipments: + - adjustedMerchandizeTotalTax: 30 + adjustedShippingTotalTax: 0.8 + gift: false + merchandizeTotalTax: 199.99 + productSubTotal: 199.99 + productTotal: 199.99 + shipmentId: me + shipmentNo: '00000001' + shipmentTotal: 386.75 + shippingAddress: + address1: 104 Presidential Way + city: Woburn + countryCode: US + firstName: Stephanie + fullName: Stephanie Miller + id: 5f695b6f4bb63cb686483d65a0 + lastName: Miller + postalCode: '01801' + stateCode: MA + shippingMethod: + description: Order within the next 3 hours to get it tomorrow morning + id: EXPRESS + name: Express + price: 15.99 + shippingPromotions: + - calloutMsg: Free shipping amount has been reduced! + promotionId: freeshipping_level1 + promotionName: Free shipping Level 1 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + taxTotal: 30.8 + shippingItems: + - adjustedTax: 0.8 + basePrice: 15.99 + itemId: 768abee75aa8015239a9696c7e + itemText: Shipping + priceAfterItemDiscount: 15.99 + shipmentId: me + tax: 0.8 + taxBasis: 15.99 + taxRate: 0.05 + shippingStatus: not_shipped + shippingTotal: 15.99 + shippingTotalTax: 0.8 + status: new + taxation: net + taxTotal: 30.8 PaymentMethodsGet: value: applicablePaymentMethods: diff --git a/apis/shopper-payments-oas-1.1.0/exchange.json b/apis/shopper-payments-oas-1.2.0/exchange.json similarity index 90% rename from apis/shopper-payments-oas-1.1.0/exchange.json rename to apis/shopper-payments-oas-1.2.0/exchange.json index f3e3edf9..b0d2ab6d 100644 --- a/apis/shopper-payments-oas-1.1.0/exchange.json +++ b/apis/shopper-payments-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Payments OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-payments-oas", - "version": "1.1.0", + "version": "1.2.0-master-b70", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml b/apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml similarity index 98% rename from apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml rename to apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml index 82449b3b..c350c451 100644 --- a/apis/shopper-payments-oas-1.1.0/shopper-payments-oas-v1-public.yaml +++ b/apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Checkout title: Shopper Payments - version: 1.1.0 + version: 1.2.0-master-b70 description: "# API Overview\n\nUse the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.\n\nThe Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.\n\n## Key Features\n\nThe Shopper Payments API includes the following capabilities:\n\n- **Payment Configuration Retrieval**: Get complete payment configuration for an organization\n- **Payment Method Set Information**: Access details about configured payment method set accounts\n- **Gateway Response Data**: Retrieve payment processor gateway information and supported payment methods\n- **Payment Modes Configuration**: View supported payment modes (Multistep, Express) for each payment method\n- **SDK Version Information**: Get the current SDK version being used\n\n## Payment Configuration Endpoint\n\nThe main endpoint `/organizations/{organizationId}/payment-configuration` provides:\n\n### Configuration Settings\n- Multi-step checkout enablement status\n- Express checkout enablement status \n- Automatic card capture settings\n- Zone identification\n- Saved payment method configuration\n- Merchant account identification\n\n### Payment Method Set Accounts\n- Account identifiers and configurations\n- Payment processor API keys and settings\n- Gateway identifiers and response data\n- Live/test mode indicators\n- Vendor information (Stripe, Adyen, PayPal, etc.)\n\n### Payment Methods\n- Supported payment method types (card, paypal, applepay, etc.)\n- Available payment modes for each method\n- Account associations\n\n## Gateway Response Handling\n\nThe API handles varying gateway response formats:\n- **Active Gateways**: Return detailed payment method information including supported card brands\n- **Inactive/Pending Gateways**: May return null gateway response data\n- **Multiple Vendors**: Support for different payment processors with vendor-specific configurations\n\n## Authentication & Authorization\n\nThe client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Getting Started\n\nTo use the Shopper Payments API:\n\n1. Authenticate with the appropriate scopes (`sfcc.shopper-payments.rw`)\n2. Make a GET request to `/organizations/{organizationId}/payment-configuration`\n3. Process the returned payment configuration data for your application\n\n## Use Cases\n\n### Payment Method Discovery\nRetrieve available payment methods and their capabilities for dynamic payment form generation.\n\n### Gateway Status Monitoring\nCheck the status and configuration of payment gateways and processors.\n\n### Payment Flow Configuration\nDetermine supported payment modes (multi-step vs express) for different payment methods.\n\n### SDK Version Management\nEnsure compatibility by checking the current SDK version requirements.\n\nFor detailed implementation examples and best practices, refer to the Commerce Cloud documentation. " servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1 @@ -147,6 +147,11 @@ components: description: API key for the payment processor example: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV maxLength: 200 + bnCode: + type: string + description: Account BN code (optional, null if not a PayPal account) + example: Example_PPCP + maxLength: 100 additionalProperties: true gatewayId: type: string @@ -222,14 +227,9 @@ components: - accountId - paymentMethodType - paymentModes - sdkVersion: - type: string - description: SDK version to use - example: latest required: - paymentMethodSetAccounts - paymentMethods - - sdkVersion parameters: organizationId: description: An identifier for the organization the request is being made by @@ -302,7 +302,6 @@ components: paymentMethodType: card paymentModes: - Multistep - sdkVersion: latest PaymentConfigurationNullGatewayResponse: value: zoneId: EU-Central-Zone @@ -319,10 +318,8 @@ components: paymentMethodType: card paymentModes: - Multistep - sdkVersion: latest PaymentConfigurationNoDataFound: value: zoneId: null paymentMethodSetAccounts: [] paymentMethods: [] - sdkVersion: latest diff --git a/apis/shopper-products-oas-1.0.37/exchange.json b/apis/shopper-products-oas-1.1.0/exchange.json similarity index 93% rename from apis/shopper-products-oas-1.0.37/exchange.json rename to apis/shopper-products-oas-1.1.0/exchange.json index d9b6d1a7..7e04f26a 100644 --- a/apis/shopper-products-oas-1.0.37/exchange.json +++ b/apis/shopper-products-oas-1.1.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Products OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-products-oas", - "version": "1.0.37", + "version": "1.1.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml b/apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml similarity index 95% rename from apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml rename to apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml index d9ef9751..f03e8f4d 100644 --- a/apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml +++ b/apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Product title: Shopper Products - version: v1 + version: 1.1.0 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-products/shopper-products-oas-v1-public.yaml) + # API Overview The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API. @@ -62,10 +66,6 @@ info: For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) - ### Test Description Changes - - uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew - ## Resources ### Product @@ -105,7 +105,7 @@ paths: parameters: - $ref: '#/components/parameters/organizationId' get: - description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable. + description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, images, price, bundled_products, set_products, recommendations, product options, variations, shipping_methods, and promotions for the products are included, as applicable. operationId: getProducts summary: Returns product details for multiple products. security: @@ -146,7 +146,7 @@ paths: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/id' get: - description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable. + description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommendations, product options, variations, shipping_methods, and promotions for the products are included, as applicable. operationId: getProduct summary: Returns product details for a single product. security: @@ -577,6 +577,13 @@ components: type: object additionalProperties: type: string + shippingMethods: + description: |- + The array of applicable shipping methods for this product. This array can be empty. + This property is only returned in context of the 'shipping_methods' expansion. + type: array + items: + $ref: '#/components/schemas/ShippingMethod' required: - id type: object @@ -1066,6 +1073,72 @@ components: - productId - variationValues type: object + ShippingPromotion: + description: Document representing a shipping promotion. + properties: + calloutMsg: + description: The localized callout message of the promotion. + example: $30 Fixed Shipping Amount Above 150 + type: string + promotionId: + description: The unique ID of the promotion. + example: $30FixedShippingAmountAbove150 + type: string + promotionName: + description: The localized promotion name. + example: $30 Fixed Shipping Amount Above 150 + type: string + type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + ShippingMethod: + description: Document representing a shipping method. + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId + properties: + description: + description: The localized description of the shipping method. + example: Order received within 7-10 business days + type: string + externalShippingMethod: + description: The external shipping method. + type: string + id: + maxLength: 256 + description: The shipping method ID. + example: '001' + type: string + name: + description: The localized name of the shipping method. + example: Ground + type: string + price: + format: double + description: |- + The shipping cost total, including shipment level costs, + product level fix, and surcharge costs. It is read only. + example: 15 + type: number + shippingPromotions: + description: |- + The array of active customer shipping promotions for this shipping + method. This array can be empty. + type: array + items: + $ref: '#/components/schemas/ShippingPromotion' + type: object + required: + - id ProductResult: description: Result document containing an array of products. properties: @@ -1145,7 +1218,7 @@ components: Total: default: 0 minimum: 0 - format: int64 + format: int32 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -1294,13 +1367,16 @@ components: enum: - none - availability + - bundled_products - links - promotions - options - images - prices - variations + - set_products - recommendations + - shipping_methods - page_meta_tags example: promotions allImages: @@ -1385,6 +1461,7 @@ components: - variations - set_products - recommendations + - shipping_methods - page_meta_tags example: links parameters-ids: @@ -1734,7 +1811,7 @@ components: 401unauthorized: description: Your access token is invalid or expired and can’t be used to identify a user. content: - application/json: + application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: diff --git a/apis/shopper-promotions-oas-1.0.36/exchange.json b/apis/shopper-promotions-oas-1.0.37/exchange.json similarity index 93% rename from apis/shopper-promotions-oas-1.0.36/exchange.json rename to apis/shopper-promotions-oas-1.0.37/exchange.json index 103c14cb..ded3324d 100644 --- a/apis/shopper-promotions-oas-1.0.36/exchange.json +++ b/apis/shopper-promotions-oas-1.0.37/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Promotions OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-promotions-oas", - "version": "1.0.36", + "version": "1.0.37", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml b/apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml similarity index 98% rename from apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml rename to apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml index 0817962d..89bece49 100644 --- a/apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml +++ b/apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml @@ -1,9 +1,10 @@ openapi: 3.0.3 info: title: Shopper Promotions - version: v1 + version: 1.0.37 description: |- # API Overview + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml) Retrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign. @@ -182,7 +183,7 @@ components: Total: default: 0 minimum: 0 - format: int64 + format: int32 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 diff --git a/apis/shopper-search-oas-1.3.0/exchange.json b/apis/shopper-search-oas-1.5.1/exchange.json similarity index 93% rename from apis/shopper-search-oas-1.3.0/exchange.json rename to apis/shopper-search-oas-1.5.1/exchange.json index 1b4b8ea8..2b81959e 100644 --- a/apis/shopper-search-oas-1.3.0/exchange.json +++ b/apis/shopper-search-oas-1.5.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Search OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-search-oas", - "version": "1.3.0", + "version": "1.5.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml b/apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml similarity index 80% rename from apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml rename to apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml index 6df2cf3f..0758dc3e 100644 --- a/apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml +++ b/apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml @@ -1,8 +1,8 @@ openapi: 3.0.3 info: title: Shopper Search - version: 1.3.0 - description: "# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- **`pmid`**: Specifies the promotion ID to filter by\n- **`pmpt`**: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Example Usage:**\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." + version: 1.5.1 + description: "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- **`pmid`**: Specifies the promotion ID to filter by\n- **`pmpt`**: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Example Usage:**\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1 variables: @@ -16,7 +16,7 @@ paths: operationId: productSearch parameters: - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/select' + - $ref: '#/components/parameters/productSearchSelect' - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/qProductSearch' - $ref: '#/components/parameters/refine' @@ -58,6 +58,8 @@ paths: $ref: '#/components/examples/ProductSearchResultExample' ProductSearchWithPromotionFilterExample: $ref: '#/components/examples/ProductSearchWithPromotionFilterExample' + ProductSearchResultWithCustomVariationPropertiesExample: + $ref: '#/components/examples/ProductSearchResultWithCustomVariationPropertiesExample' '400': description: Bad Request. content: @@ -67,6 +69,8 @@ paths: examples: MalformedSelectorGetProductsSearchForSelect: $ref: '#/components/examples/MalformedSelectorGetProductsSearchForSelect' + TooManyCustomVariationAttributes: + $ref: '#/components/examples/TooManyCustomVariationAttributes' security: - ShopperToken: - sfcc.shopper-product-search @@ -95,6 +99,8 @@ paths: examples: SearchSuggestionResultExample: $ref: '#/components/examples/SearchSuggestionResultExample' + SearchSuggestionResultWithCustomProductPropertiesExample: + $ref: '#/components/examples/SearchSuggestionResultWithCustomProductPropertiesExample' '400': description: Thrown when a query parameter or its value is unknown, or when a maximum or minimum constraint is violated. content: @@ -104,6 +110,10 @@ paths: examples: StringConstraintViolation: $ref: '#/components/examples/StringConstraintViolation' + TooManyCustomProductAttributes: + $ref: '#/components/examples/TooManyCustomProductAttributes' + InvalidExpandParameter: + $ref: '#/components/examples/InvalidExpandParameter' security: - ShopperToken: - sfcc.shopper-product-search @@ -131,7 +141,7 @@ components: maxLength: 32 Select: minLength: 1 - description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html). example: (name,id,variationAttributes.(**)) type: string pattern: ^[(].*[)]$ @@ -197,7 +207,7 @@ components: Total: default: 0 minimum: 0 - format: int64 + format: int32 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -217,7 +227,7 @@ components: Offset: default: 0 minimum: 0 - format: int64 + format: int32 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 @@ -489,6 +499,13 @@ components: required: - productId type: object + additionalProperties: + title: Additional Property Support + description: |- + This type supports additional properties passed along with the defined properties of this API. + To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. + The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. + example: c_trackingId VariationGroup: description: Representation of a group of variant products by an attribute. This can't be purchased by a shopper. It provides inheritable attributes for its product variants and is used for navigation. A VariationGroup doesn't have a SKU. properties: @@ -1082,13 +1099,10 @@ components: example: f_ecom_zzxy_prd schema: $ref: '#/components/schemas/OrganizationId' - select: - description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. + productSearchSelect: name: select + example: (hits.(**), refinements, sortingOptions.(id)) in: query - examples: - select: - value: (**) schema: $ref: '#/components/schemas/Select' siteId: @@ -1114,7 +1128,7 @@ components: refine: name: refine in: query - description: "Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \\\"|\\\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . \nMultiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs \nand the system defined attributes IDs but the search can only accept a total of 9 refinements at a time. \n\nThe following system refinement attribute ids are supported:
\n`cgid`: Allows refinement per single category ID. Multiple category ids are not supported. \n`price`: Allows refinement per single price range. Multiple price ranges are not supported. \n`htype`: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
\n`orderable_only`: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
\n`ilids`: Allows refining by inventory list IDs. Supports up to 10 inventory list IDs per request.
\n`pmid`: Allows refinement on the supplied promotion ID(s). When used with `pmpt`, filters products by their role in the promotion.
\n`pmpt`: Allows refinement per promotion product type. Must be used with `pmid` to filter products by their role in the promotion. Valid values are:\n - `all`: Returns all products related to the promotion (default)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion\n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Note:** To refine a search using multiple promotion filters—for example, to find products in both the spring and summer campaigns—see [Refining by Multiple Promotions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-promotions-for-developers.html#refining-by-multiple-promotions)." + description: "Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.
\nMultiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \\\"|\\\"), for example: refine=c_refinementColor=red|green|blue.
\nValue ranges can be specified like this: refine=price=(100..500).
\nMultiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.
\nThe refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
\n\nThe following system refinement attribute ids are supported:
\n`cgid`: Allows refinement per single category ID. Multiple category ids are not supported. \n`price`: Allows refinement per single price range. Multiple price ranges are not supported. \n`htype`: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
\n`orderable_only`: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
\n`ilids`: Allows refining by inventory list IDs. Supports up to 10 inventory list IDs per request.
\n`pmid`: Allows refinement on the supplied promotion ID(s). When used with `pmpt`, filters products by their role in the promotion.
\n`pmpt`: Allows refinement per promotion product type. Must be used with `pmid` to filter products by their role in the promotion. Valid values are:\n - `all`: Returns all products related to the promotion (default)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion\n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Note:** To refine a search using multiple promotion filters—for example, to find products in both the spring and summer campaigns—see [Refining by Multiple Promotions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-promotions-for-developers.html#refining-by-multiple-promotions)." required: false style: form explode: true @@ -1154,7 +1168,7 @@ components: expandProductSearch: name: expand in: query - description: "A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`. \nBy default, the expand parameter includes `availability, images, prices, represented_products, variations`. \nUse none to disable all expand options. \n**The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**\"" + description: "A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`. \nBy default, the expand parameter includes `availability, images, prices, represented_products, variations`. \nUse none to disable all expand options." required: false schema: items: @@ -1577,12 +1591,63 @@ components: label: Top Sellers offset: 0 total: 1 + ProductSearchResultWithCustomVariationPropertiesExample: + summary: Product search result demonstrating custom variation properties on product variants. + value: + limit: 1 + hits: + - hitType: master + productId: portable-media-player + productName: Portable Media Player + productType: + master: true + representedProduct: + id: media-player-purple-8gb + variants: + - productId: media-player-silver-8gb + variationValues: + color: Silver + memorySize: 8 GB + c_badges: + - Popular + c_mediaFormat: + - '0020' + - '0050' + c_musicStorage: 2,000 songs + - productId: media-player-purple-8gb + variationValues: + color: Purple + memorySize: 8 GB + c_badges: + - Best Seller + c_mediaFormat: + - '0010' + - '0020' + - '0030' + c_musicStorage: 2,000 songs + query: media player purple + refinements: [] + searchPhraseSuggestions: + suggestedPhrases: [] + suggestedTerms: [] + sortingOptions: + - id: best-matches + label: Best Matches + offset: 0 + total: 1 MalformedSelectorGetProductsSearchForSelect: value: title: Malformed Selector type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector detail: The property selector '(hits.(currency, hitType,image.(**))' is malformed. selector: (hits.(currency, hitType,image.(**)) + TooManyCustomVariationAttributes: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + detail: '''includedCustomVariationProperties'' violates the value constraint. The expected value is between ''(0..5)''.' + parameter: includedCustomVariationProperties + expected: (0..5) SearchSuggestionResultExample: value: brandSuggestions: @@ -1647,6 +1712,49 @@ components: - exactMatch: false phrase: sony alpha 900 body searchPhrase: son + SearchSuggestionResultWithCustomProductPropertiesExample: + summary: Search suggestions with custom product properties. + value: + brandSuggestions: + suggestedPhrases: + - exactMatch: false + phrase: Media Player + suggestedTerms: + - originalTerm: player + terms: + - completed: true + corrected: false + exactMatch: false + value: media + categorySuggestions: + suggestedTerms: + - originalTerm: player + productSuggestions: + products: + - currency: USD + price: 229 + productId: portable-media-player + productName: Portable Media Player + c_badges: [] + c_mediaFormat: + - '0020' + - '0030' + c_musicStorage: 1,000 songs + suggestedPhrases: + - exactMatch: false + phrase: media player + suggestedTerms: + - originalTerm: player + terms: + - completed: true + corrected: false + exactMatch: true + value: player + - completed: true + corrected: false + exactMatch: false + value: media player + searchPhrase: player StringConstraintViolation: value: title: String Constraint Violation @@ -1654,3 +1762,16 @@ components: detail: The string length constraint was violated by 'q'. The expected length is '(3..50)'. expected: (3..50) parameter: q + TooManyCustomProductAttributes: + value: + title: Bad Request + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + detail: '''includedCustomProductProperties'' violates the value constraint. The expected value is between ''(0..5)''.' + parameter: includedCustomProductProperties + expected: (0..5) + InvalidExpandParameter: + value: + title: Invalid Expand Parameter + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-expand-parameter + detail: An invalid expand parameter 'invalidParameter' was found. + param: invalidParameter diff --git a/apis/shopper-seo-oas-1.0.13/exchange.json b/apis/shopper-seo-oas-1.0.14/exchange.json similarity index 93% rename from apis/shopper-seo-oas-1.0.13/exchange.json rename to apis/shopper-seo-oas-1.0.14/exchange.json index f6d65871..737fcf8f 100644 --- a/apis/shopper-seo-oas-1.0.13/exchange.json +++ b/apis/shopper-seo-oas-1.0.14/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Seo OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-seo-oas", - "version": "1.0.13", + "version": "1.0.14", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml b/apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml similarity index 99% rename from apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml rename to apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml index d0c4d0a3..29f29fdf 100644 --- a/apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml +++ b/apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml @@ -1,8 +1,10 @@ openapi: 3.0.3 info: title: Shopper SEO - version: v1 + version: 1.0.14 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-seo/shopper-seo-oas-v1-public.yaml) + # API Overview The Shopper SEO API Provides access to SEO-related information, such as URL mapping information. diff --git a/apis/shopper-stores-oas-1.0.17/exchange.json b/apis/shopper-stores-oas-1.0.18/exchange.json similarity index 93% rename from apis/shopper-stores-oas-1.0.17/exchange.json rename to apis/shopper-stores-oas-1.0.18/exchange.json index dd70dc9f..44ff03fb 100644 --- a/apis/shopper-stores-oas-1.0.17/exchange.json +++ b/apis/shopper-stores-oas-1.0.18/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Stores OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-stores-oas", - "version": "1.0.17", + "version": "1.0.18", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml b/apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml similarity index 98% rename from apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml rename to apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml index 538899a6..f64afdb4 100644 --- a/apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml +++ b/apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml @@ -1,8 +1,12 @@ openapi: 3.0.3 info: + x-api-type: Shopper + x-api-family: Store title: Shopper Stores - version: v1 + version: 1.0.18 description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-stores/shopper-stores-oas-v1-public.yaml) + # API Overview Provides access to stores via search or ID lookup. @@ -173,7 +177,7 @@ components: Total: default: 0 minimum: 0 - format: int64 + format: int32 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -347,7 +351,7 @@ components: Offset: default: 0 minimum: 0 - format: int64 + format: int32 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 From c5eead46042786a3aeaf7b0f325ca120c20a0779 Mon Sep 17 00:00:00 2001 From: kbode Date: Wed, 29 Oct 2025 16:58:11 +0100 Subject: [PATCH 04/19] W-18557453 fixed some linter issues --- scripts/download-apis.ts | 3 +-- scripts/updateApiVersions.ts | 4 ++-- scripts/updateApis.ts | 2 +- scripts/utils.ts | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/download-apis.ts b/scripts/download-apis.ts index de73cb7f..5615fd63 100644 --- a/scripts/download-apis.ts +++ b/scripts/download-apis.ts @@ -5,6 +5,7 @@ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ /* eslint-disable import/prefer-default-export */ +/* eslint-disable no-console */ import {execSync} from 'child_process'; import path from 'path'; import fs from 'fs-extra'; @@ -57,14 +58,12 @@ export async function downloadApisWithAnypointCli( console.log(`Extracting ${zipFile} to ${targetDir}...`); // Extract the zip file - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call const zip = new AdmZip(zipPath); // Ensure target directory exists await fs.ensureDir(targetDir); // Extract all contents to target directory - // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access zip.extractAllTo(targetDir, true); // Clean up temporary files diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts index 5c08b9fd..c574bf41 100644 --- a/scripts/updateApiVersions.ts +++ b/scripts/updateApiVersions.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - +/* eslint-disable no-console */ import {execSync} from 'child_process'; import path from 'path'; import fs from 'fs-extra'; @@ -108,7 +108,7 @@ function getLatestVersion( const password = process.env.ANYPOINT_PASSWORD || ''; // Parse the API name to get base name (without version suffix) - const {baseName, versionSuffix} = parseApiName(apiNameWithSuffix); + const {baseName} = parseApiName(apiNameWithSuffix); const currentMajorVersion = getMajorVersion(currentVersion); // Use current version to query the asset (any version works to get all versions) diff --git a/scripts/updateApis.ts b/scripts/updateApis.ts index 2934a45d..00ac9d44 100644 --- a/scripts/updateApis.ts +++ b/scripts/updateApis.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - +/* eslint-disable no-console */ import path from 'path'; import fs from 'fs-extra'; import dotenv from 'dotenv'; diff --git a/scripts/utils.ts b/scripts/utils.ts index 60297e5d..28b79af3 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - +/* eslint-disable no-console */ import path from 'path'; import fs from 'fs-extra'; From 83136f53dcf1efd429b4b0123b5a8c99baad86e8 Mon Sep 17 00:00:00 2001 From: kbode Date: Wed, 29 Oct 2025 17:25:01 +0100 Subject: [PATCH 05/19] W-18557453 updated APIs --- .../exchange.json | 2 +- .../shopper-baskets-oas-v1-public.yaml | 39 +- .../exchange.json | 2 +- .../shopper-baskets-oas-v2-public.yaml | 97 +- .../exchange.json | 2 +- .../shopper-consents-oas-v1-public.yaml | 8 +- .../exchange.json | 2 +- .../shopper-context-oas-v1-public.yaml | 0 .../exchange.json | 2 +- .../shopper-customers-oas-v1-public.yaml | 118 +- .../exchange.json | 2 +- .../shopper-experience-oas-v1-public.yaml | 614 ++++++++ .../shopper-experience-oas-v1-public.yaml | 1394 ----------------- .../exchange.json | 2 +- ...opper-gift-certificates-oas-v1-public.yaml | 3 +- .../exchange.json | 2 +- .../shopper-login-oas-v1-public.yaml | 75 +- .../exchange.json | 2 +- .../shopper-orders-oas-v1-public.yaml | 244 +-- .../exchange.json | 2 +- .../shopper-products-oas-v1-public.yaml | 95 +- .../exchange.json | 2 +- .../shopper-promotions-oas-v1-public.yaml | 5 +- .../exchange.json | 2 +- .../shopper-search-oas-v1-public.yaml | 147 +- .../exchange.json | 2 +- .../shopper-seo-oas-v1-public.yaml | 4 +- .../exchange.json | 2 +- .../shopper-stores-oas-v1-public.yaml | 10 +- 29 files changed, 686 insertions(+), 2195 deletions(-) rename apis/{shopper-baskets-oas-1.10.0 => shopper-baskets-oas-1.9.0}/exchange.json (90%) rename apis/{shopper-baskets-oas-1.10.0 => shopper-baskets-oas-1.9.0}/shopper-baskets-oas-v1-public.yaml (98%) rename apis/{shopper-baskets-oas-2.2.0 => shopper-baskets-oas-2.1.0}/exchange.json (90%) rename apis/{shopper-baskets-oas-2.2.0 => shopper-baskets-oas-2.1.0}/shopper-baskets-oas-v2-public.yaml (97%) rename apis/{shopper-consents-oas-1.2.0 => shopper-consents-oas-1.1.0}/exchange.json (90%) rename apis/{shopper-consents-oas-1.2.0 => shopper-consents-oas-1.1.0}/shopper-consents-oas-v1-public.yaml (98%) rename apis/{shopper-context-oas-1.2.0 => shopper-context-oas-1.1.1}/exchange.json (90%) rename apis/{shopper-context-oas-1.2.0 => shopper-context-oas-1.1.1}/shopper-context-oas-v1-public.yaml (100%) rename apis/{shopper-customers-oas-1.2.0 => shopper-customers-oas-1.1.1}/exchange.json (91%) rename apis/{shopper-customers-oas-1.2.0 => shopper-customers-oas-1.1.1}/shopper-customers-oas-v1-public.yaml (98%) rename apis/{shopper-experience-oas-1.1.0 => shopper-experience-oas-1.0.7}/exchange.json (93%) create mode 100644 apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml delete mode 100644 apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml rename apis/{shopper-gift-certificates-oas-1.0.27 => shopper-gift-certificates-oas-1.0.26}/exchange.json (93%) rename apis/{shopper-gift-certificates-oas-1.0.27 => shopper-gift-certificates-oas-1.0.26}/shopper-gift-certificates-oas-v1-public.yaml (98%) rename apis/{shopper-login-oas-1.41.0 => shopper-login-oas-1.39.41}/exchange.json (92%) rename apis/{shopper-login-oas-1.41.0 => shopper-login-oas-1.39.41}/shopper-login-oas-v1-public.yaml (97%) rename apis/{shopper-orders-oas-1.6.0 => shopper-orders-oas-1.5.0}/exchange.json (90%) rename apis/{shopper-orders-oas-1.6.0 => shopper-orders-oas-1.5.0}/shopper-orders-oas-v1-public.yaml (93%) rename apis/{shopper-products-oas-1.1.0 => shopper-products-oas-1.0.37}/exchange.json (93%) rename apis/{shopper-products-oas-1.1.0 => shopper-products-oas-1.0.37}/shopper-products-oas-v1-public.yaml (95%) rename apis/{shopper-promotions-oas-1.0.37 => shopper-promotions-oas-1.0.36}/exchange.json (93%) rename apis/{shopper-promotions-oas-1.0.37 => shopper-promotions-oas-1.0.36}/shopper-promotions-oas-v1-public.yaml (98%) rename apis/{shopper-search-oas-1.5.1 => shopper-search-oas-1.3.0}/exchange.json (93%) rename apis/{shopper-search-oas-1.5.1 => shopper-search-oas-1.3.0}/shopper-search-oas-v1-public.yaml (80%) rename apis/{shopper-seo-oas-1.0.14 => shopper-seo-oas-1.0.13}/exchange.json (93%) rename apis/{shopper-seo-oas-1.0.14 => shopper-seo-oas-1.0.13}/shopper-seo-oas-v1-public.yaml (99%) rename apis/{shopper-stores-oas-1.0.18 => shopper-stores-oas-1.0.17}/exchange.json (93%) rename apis/{shopper-stores-oas-1.0.18 => shopper-stores-oas-1.0.17}/shopper-stores-oas-v1-public.yaml (98%) diff --git a/apis/shopper-baskets-oas-1.10.0/exchange.json b/apis/shopper-baskets-oas-1.9.0/exchange.json similarity index 90% rename from apis/shopper-baskets-oas-1.10.0/exchange.json rename to apis/shopper-baskets-oas-1.9.0/exchange.json index 01505450..26d65822 100644 --- a/apis/shopper-baskets-oas-1.10.0/exchange.json +++ b/apis/shopper-baskets-oas-1.9.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "1.10.0-PR-65-b5", + "version": "1.9.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml b/apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml similarity index 98% rename from apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml rename to apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml index 4b5ed8f8..9e824dde 100644 --- a/apis/shopper-baskets-oas-1.10.0/shopper-baskets-oas-v1-public.yaml +++ b/apis/shopper-baskets-oas-1.9.0/shopper-baskets-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Checkout title: Shopper Baskets - version: 1.10.0-PR-65-b5 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets/shopper-baskets-oas-v1-public.yaml) - # API Overview Use the Shopper Baskets API to create a basket in the B2C Commerce system and populate it with all the data required to ready the basket for checkout. @@ -165,8 +161,6 @@ paths: description: Thrown if the shipment with the given shipment ID is unknown. content: application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' examples: ShipmentNotFound: $ref: '#/components/examples/ShipmentNotFound' @@ -190,16 +184,12 @@ paths: description: |- Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. - This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows: - - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation. - - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below. + A success response contains the transferred basket. - If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed: + If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: - Keep the current shopper's active basket. - - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint. - - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. - - A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned. + - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. + - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. operationId: transferBasket summary: Transfer an existing basket. security: @@ -207,11 +197,10 @@ paths: - sfcc.shopper-baskets-orders.rw parameters: - $ref: '#/components/parameters/overrideExisting' - - $ref: '#/components/parameters/merge' - $ref: '#/components/parameters/locale' responses: '200': - description: The current basket. + description: The transferred basket. content: application/json: schema: @@ -219,8 +208,6 @@ paths: examples: BasketPost: $ref: '#/components/examples/examples-BasketPost' - '204': - description: The operation was successful. No current basket was returned because neither the previous nor current shopper had an active basket attached that could be transferred. '403': description: The call returns this error if no SLAS token for a registered shopper is available. content: @@ -232,9 +219,9 @@ paths: $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' '409': description: |- - The call returns this response when the `merge` request parameter is set to `false` and one of the following cases applies: + The call returns this response in either of these cases: - The previous shopper has no active basket. - - The current shopper has an active basket and the `overrideExisting` query parameter is set to `false` (default value). + - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). content: application/json: schema: @@ -252,8 +239,6 @@ paths: operationId: mergeBasket summary: Merge baskets. description: |- - ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected. - Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. The following information is merged: @@ -3916,14 +3901,6 @@ components: default: false type: boolean example: false - merge: - name: merge - in: query - description: "This parameter controls the behavior:\n - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).\n - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.\n\nThe hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown \nin this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).\n\nThere are four possible use cases:\n\na) Guest basket and registered basket exist\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).\n\nb) Guest basket exists but no registered basket exists\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).\n\nc) No guest basket exists but a registered basket exists\nThe registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null \npassed to the hook).\n\nd) Neither basket exists\nThe hook dw.order.mergeBasket is not called.\n\nThe API returns the current basket (after executing dw.order.mergeBasket)." - schema: - default: false - type: boolean - example: false createDestinationBasket: name: createDestinationBasket in: query diff --git a/apis/shopper-baskets-oas-2.2.0/exchange.json b/apis/shopper-baskets-oas-2.1.0/exchange.json similarity index 90% rename from apis/shopper-baskets-oas-2.2.0/exchange.json rename to apis/shopper-baskets-oas-2.1.0/exchange.json index 27690ab7..28cc2f59 100644 --- a/apis/shopper-baskets-oas-2.2.0/exchange.json +++ b/apis/shopper-baskets-oas-2.1.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "2.2.0-master-b69", + "version": "2.1.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml b/apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml similarity index 97% rename from apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml rename to apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml index 9724071a..f9334891 100644 --- a/apis/shopper-baskets-oas-2.2.0/shopper-baskets-oas-v2-public.yaml +++ b/apis/shopper-baskets-oas-2.1.0/shopper-baskets-oas-v2-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Checkout title: Shopper Baskets - version: 2.2.0-master-b69 + version: v2 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets-v2/shopper-baskets-oas-v2-public.yaml) - # API Overview Shopper Baskets V2 provides all Shopper Basket V1 functionality and adds support for temporary baskets. @@ -200,25 +196,20 @@ paths: description: |- Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. - This endpoint provides different methods for handling the scenario in which both a previous guest shopper and the current registered shopper have an active basket attached, and utilizes the `merge` parameter as follows: - - `true` (recommended): Triggers a merge hook for graceful handling and prevents 409 status returns. For more information, refer to the `merge` parameter documentation. - - `false`: Either overrides the basket of the current registered shopper or returns a 409 response, and allows you to choose between the options explained below. + A success response contains the transferred basket. - If you call the endpoint with `merge=false` and the current shopper has an active basket, you have two options using the `overrideExisting` parameter. Setting it to `true` deletes the registered user's basket, while setting it to `false` returns a `BasketTransferException` (HTTP status 409), after which you can choose how to proceed: + If the current shopper has an active basket, and the `overrideExisting` request parameter is `false`, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options: - Keep the current shopper's active basket. - - Merge the previous and current shoppers' baskets by calling the `baskets/actions/merge` endpoint. - - Force the transfer by calling the `baskets/actions/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. - - A successful response provides the transferred (and merged) current basket. However, if neither the previous nor current shopper had an active basket, a 204 (No Content) response is returned. + - Merge the previous and current shoppers' baskets by calling the `baskets/merge` endpoint. + - Force the transfer by calling the `baskets/transfer` endpoint again, with the parameter `overrideExisting=true`. Forcing the transfer deletes the current shopper's active basket. operationId: transferBasket summary: Transfer an existing basket. parameters: - $ref: '#/components/parameters/overrideExisting' - - $ref: '#/components/parameters/merge' - $ref: '#/components/parameters/locale' responses: '200': - description: The current basket. + description: The transferred basket. content: application/json: schema: @@ -226,8 +217,6 @@ paths: examples: BasketPost: $ref: '#/components/examples/examples-BasketPost' - '204': - description: The operation was successful. No current basket was returned because neither the previous nor current shopper had an active basket attached that could be transferred. '403': description: The call returns this error if no SLAS token for a registered shopper is available. content: @@ -239,9 +228,9 @@ paths: $ref: '#/components/examples/ForbiddenMissingPrevCustomerInfo' '409': description: |- - The call returns this response when the `merge` request parameter is set to `false` and one of the following cases applies: + The call returns this response in either of these cases: - The previous shopper has no active basket. - - The current shopper has an active basket and the `overrideExisting` query parameter is set to `false` (default value). + - The current shopper has an active basket and the `overrideExisting` query parameter was `false` (default value). content: application/json: schema: @@ -260,8 +249,6 @@ paths: /organizations/{organizationId}/baskets/actions/merge: post: description: |- - ( DEPRECATED ) Instead of using this endpoint, we recommend using the `/baskets/actions/transfer` endpoint with the `merge=true` parameter, because the transfer endpoint offers greater customization by invoking a hook, allowing for adjustments if the default implementation does not process the merge as expected. - Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled. The following information is merged: @@ -1265,8 +1252,6 @@ paths: examples: PaymentInstrumentPost: $ref: '#/components/examples/PaymentInstrumentPost' - PaymentInstrumentPostWithSalesforcePayments: - $ref: '#/components/examples/PaymentInstrumentPostWithSalesforcePayments' required: true responses: '200': @@ -2803,26 +2788,6 @@ components: description: The payment method ID. It is read only. example: CREDIT_CARD type: string - paymentReference: - description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. - type: object - properties: - paymentReferenceId: - description: Payment reference identifier. Can be payment intent ID for Stripe, PSP reference for Adyen, PayPal order ID for PayPal, or similar identifier for other payment providers. - type: string - maxLength: 256 - example: pi_3N4B2vF0wDjebNCp1234567 - clientSecret: - description: Client secret for payment confirmation. Used primarily by Stripe for client-side payment confirmation. - type: string - maxLength: 256 - example: pi_3N4B2vF0wDjebNCp1234567_secret_abc123 - redirectUrl: - description: Redirect URL for payment methods that require user redirection to complete payment. - type: string - format: uri - maxLength: 2048 - example: https://checkout.stripe.com/pay/cs_test_abc123 type: object ProductItem: description: Document representing a product item. @@ -3769,32 +3734,6 @@ components: description: The year the payment card is valid from. example: 2019 type: integer - PaymentReferenceRequest: - type: object - description: Properties for Payments Reference Request - properties: - paymentMethodType: - type: string - maxLength: 64 - description: Payment Method Type - example: card - zoneId: - type: string - description: The unique identifier for a Payments zone. - pattern: ^[a-zA-Z0-9\-_]{1,100}$ - minLength: 1 - maxLength: 100 - example: - Amer-Zone: null - shippingPreference: - type: string - maxLength: 64 - description: Shipping preference for PayPal payment processing. Applicable only for basket payment instruments. - enum: - - GET_FROM_FILE - - NO_SHIPPING - - SET_PROVIDED_ADDRESS - example: GET_FROM_FILE BasketPaymentInstrumentRequest: description: Document representing a basket payment instrument request. type: object @@ -3830,10 +3769,6 @@ components: description: The payment method ID. example: CREDIT_CARD type: string - paymentReferenceRequest: - description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. - allOf: - - $ref: '#/components/schemas/PaymentReferenceRequest' PaymentCardSpec: description: Document representing the specification for a payment card. type: object @@ -4077,14 +4012,6 @@ components: default: false type: boolean example: false - merge: - name: merge - in: query - description: "This parameter controls the behavior: \n - `false` (default): Transfers the basket or returns a 409 response with the appropriate message (taking `overrideExisting` in consideration).\n - `true`: (recommended): Executes the dw.order.mergeBasket hook if at least one basket exists.\n\nThe hook dw.order.mergeBasket default implementation merges a source basket into the current basket. This behavior can be customized, as shown \nin this [sample implementation](https://gist.github.com/sf-thomas-loesche/3446c7d71a97e559bf1caee96ae56d9f).\n\nThere are four possible use cases:\n\na) Guest basket and registered basket exist\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called with the source basket (former registered shopper basket) and the transferred current basket (former guest basket).\n\nb) Guest basket exists but no registered basket exists\nThe guest basket becomes the current basket for the registered shopper by updating the basket's owner (no personal data is removed). The hook \ndw.order.mergeBasket is called without the source basket (null passed to the hook) and the transferred current basket (former guest basket).\n\nc) No guest basket exists but a registered basket exists\nThe registered basket is retained. The hook dw.order.mergeBasket is called with the retained current basket but without the source basket (null \npassed to the hook).\n\nd) Neither basket exists\nThe hook dw.order.mergeBasket is not called.\n\nThe API returns the current basket (after executing dw.order.mergeBasket)." - schema: - default: false - type: boolean - example: false createDestinationBasket: name: createDestinationBasket in: query @@ -5433,14 +5360,6 @@ components: holder: Miller cardType: Visa paymentMethodId: CREDIT_CARD - PaymentInstrumentPostWithSalesforcePayments: - value: - amount: 15 - paymentMethodId: Salesforce Payments - paymentReferenceRequest: - paymentMethodType: paypal - zoneId: Amer-Zone - shippingPreference: SET_PROVIDED_ADDRESS PaymentInstrumentPatch: value: amount: 0 diff --git a/apis/shopper-consents-oas-1.2.0/exchange.json b/apis/shopper-consents-oas-1.1.0/exchange.json similarity index 90% rename from apis/shopper-consents-oas-1.2.0/exchange.json rename to apis/shopper-consents-oas-1.1.0/exchange.json index 35cb0efc..2cc10f2b 100644 --- a/apis/shopper-consents-oas-1.2.0/exchange.json +++ b/apis/shopper-consents-oas-1.1.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Consents OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-consents-oas", - "version": "1.2.0-master-b93", + "version": "1.1.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml b/apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml similarity index 98% rename from apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml rename to apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml index a37a400d..e54ed006 100644 --- a/apis/shopper-consents-oas-1.2.0/shopper-consents-oas-v1-public.yaml +++ b/apis/shopper-consents-oas-1.1.0/shopper-consents-oas-v1-public.yaml @@ -1,13 +1,11 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Shopper title: Shopper Consents - version: 1.2.0-master-b93 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-consents/shopper-consents-oas-v1-public.yaml) + # Shopper Consent - # API Overview + ## API Overview The Shopper Consent API offers a centralized method for managing shopper consent. With this API, shoppers can view and update subscription preferences for marketing communications across various channels. This API controls how and where shoppers receive marketing messages while ensuring compliance with privacy regulations. diff --git a/apis/shopper-context-oas-1.2.0/exchange.json b/apis/shopper-context-oas-1.1.1/exchange.json similarity index 90% rename from apis/shopper-context-oas-1.2.0/exchange.json rename to apis/shopper-context-oas-1.1.1/exchange.json index 1630b71f..b74f258d 100644 --- a/apis/shopper-context-oas-1.2.0/exchange.json +++ b/apis/shopper-context-oas-1.1.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Context OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-context-oas", - "version": "1.2.0-master-b45", + "version": "1.1.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-context-oas-1.2.0/shopper-context-oas-v1-public.yaml b/apis/shopper-context-oas-1.1.1/shopper-context-oas-v1-public.yaml similarity index 100% rename from apis/shopper-context-oas-1.2.0/shopper-context-oas-v1-public.yaml rename to apis/shopper-context-oas-1.1.1/shopper-context-oas-v1-public.yaml diff --git a/apis/shopper-customers-oas-1.2.0/exchange.json b/apis/shopper-customers-oas-1.1.1/exchange.json similarity index 91% rename from apis/shopper-customers-oas-1.2.0/exchange.json rename to apis/shopper-customers-oas-1.1.1/exchange.json index f982eac2..00cfb1d9 100644 --- a/apis/shopper-customers-oas-1.2.0/exchange.json +++ b/apis/shopper-customers-oas-1.1.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Customers OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-customers-oas", - "version": "1.2.0-PR-38-b5", + "version": "1.1.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml b/apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml similarity index 98% rename from apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml rename to apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml index 3825841f..35923ef3 100644 --- a/apis/shopper-customers-oas-1.2.0/shopper-customers-oas-v1-public.yaml +++ b/apis/shopper-customers-oas-1.1.1/shopper-customers-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Customer title: Shopper Customers - version: 1.2.0-PR-38-b5 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-customers/shopper-customers-oas-v1-public.yaml) - # API Overview The Shopper Customers API enables you to develop functionality that lets customers log in, and manage their profiles and product lists. Profile management includes ability for shoppers to add or modify addresses and payment methods, and add or modify products to wishlists or favorites. Commerce Cloud provides a rich set of Authentication APIs that include logging in guest shoppers, registered shoppers, agents on behalf of customers and a trusted system authentication on behalf of customers. In all authentication scenarios involving customers, a JSON Web Token (JWT) is generated in Commerce Cloud. Using the JWT, customers can access other Shopper API resources like Orders and Baskets. The application must refresh the JWT every 30 minutes to save the shopper activity (for example, retain products in a shopper's cart) for prolonged periods of time. @@ -821,58 +817,6 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments.rw - patch: - summary: Update a customer's payment instrument. This endpoint only accepts a registered customer ShopperToken (JWT). - operationId: updateCustomerPaymentInstrument - parameters: - - $ref: '#/components/parameters/paymentInstrumentId' - - $ref: '#/components/parameters/customerId' - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/siteId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomerPaymentInstrumentUpdateRequest' - examples: - UpdateCustomerPaymentInstrumentBody: - $ref: '#/components/examples/UpdateCustomerPaymentInstrumentBody' - required: true - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/CustomerPaymentInstrument' - examples: - updateCustomerPaymentInstrumentSuccess: - $ref: '#/components/examples/updateCustomerPaymentInstrumentSuccess' - '400': - description: | - Either the CustomerId URL parameter does not match the verified customer represented by the JWT token, or the request contains unsupported fields for update. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - invalidCustomer400: - $ref: '#/components/examples/invalidCustomer400' - updatePaymentInstrumentUnsupportedFields400: - $ref: '#/components/examples/updatePaymentInstrumentUnsupportedFields400' - '404': - description: | - Requested resource not found. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - getCustomer404: - $ref: '#/components/examples/getCustomer404' - security: - - ShopperToken: - - sfcc.shopper-myaccount.paymentinstruments.rw /organizations/{organizationId}/customers/{customerId}/product-lists: get: summary: Return all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -3385,7 +3329,7 @@ components: Total: default: 0 minimum: 0 - format: int32 + format: int64 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -3405,7 +3349,7 @@ components: Offset: default: 0 minimum: 0 - format: int32 + format: int64 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 @@ -3830,30 +3774,6 @@ components: description: The default payment instrument. example: true description: Document representing a customer payment instrument request. - CustomerPaymentInstrumentUpdateRequest: - type: object - properties: - default: - type: boolean - description: The default payment instrument. - example: true - paymentCard: - type: object - properties: - expirationMonth: - type: integer - format: int32 - minimum: 1 - maximum: 12 - description: The month when the payment card expires. - example: 12 - expirationYear: - type: integer - format: int32 - description: The year when the payment card expires. - example: 2028 - description: The payment card expiration information. - description: Document representing a customer payment instrument update request. Only allows updating the default flag and card expiration date. CustomerProductListRegistrant: description: Document representing a customer product list registrant. properties: @@ -5928,38 +5848,6 @@ components: paymentMethodId: OCAPI_Payment_Simple paymentInstrumentId: cdOLciWbOsYl6aaadkwcsx9xHH default: false - UpdateCustomerPaymentInstrumentBody: - value: - default: false - paymentCard: - expirationYear: 2028 - expirationMonth: 12 - updateCustomerPaymentInstrumentSuccess: - value: - paymentCard: - cardType: MasterCard - creditCardExpired: false - expirationMonth: 12 - expirationYear: 2028 - holder: John Smith - issueNumber: i117 - maskedNumber: '***4567' - numberLastDigits: '4567' - validFromMonth: 8 - validFromYear: 2007 - paymentMethodId: OCAPI_Payment_Simple - paymentInstrumentId: cdOLciWbOsYl6aaadkwcsx9xHH - default: false - invalidCustomer400: - value: - title: Invalid Customer - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-customer - detail: CustomerId URL parameter does not match the verified customer represented by the JWT token. - updatePaymentInstrumentUnsupportedFields400: - value: - title: Unsupported Fields - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unsupported-fields - detail: Unsupported fields in the request for updates. customerProductListResult: value: limit: 1 diff --git a/apis/shopper-experience-oas-1.1.0/exchange.json b/apis/shopper-experience-oas-1.0.7/exchange.json similarity index 93% rename from apis/shopper-experience-oas-1.1.0/exchange.json rename to apis/shopper-experience-oas-1.0.7/exchange.json index e520b4de..ebdb8cb0 100644 --- a/apis/shopper-experience-oas-1.1.0/exchange.json +++ b/apis/shopper-experience-oas-1.0.7/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Experience OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-experience-oas", - "version": "1.1.0", + "version": "1.0.7", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml new file mode 100644 index 00000000..1ea0bc40 --- /dev/null +++ b/apis/shopper-experience-oas-1.0.7/shopper-experience-oas-v1-public.yaml @@ -0,0 +1,614 @@ +openapi: 3.0.3 +info: + title: Shopper Experience + version: v1 + description: |- + Use the Shopper Experience API to look up page information for pages that are created in Page Designer. + + Responses include the following: + + - The entire component hierarchy of the page at design time. + - All merchant data provided at design time. + - Server-side scripting data provided at run time. + + Both the page and components contain the values of all native and custom attributes that have been populated during page authoring. + + Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. + + **Important**: Currently, the Shopper Experience API can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. + + ## Authentication & Authorization + + The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). +servers: + - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 + variables: + shortCode: + default: shortCode +paths: + /organizations/{organizationId}/pages: + get: + summary: Get Page Designer pages. + description: "Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.\n\nYou must provide the `aspectTypeId` along with either a `categoryId` or a `productId`. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPages + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/categoryId' + - $ref: '#/components/parameters/productId' + - $ref: '#/components/parameters/aspectTypeId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/PageResult' + examples: + PageResult: + $ref: '#/components/examples/PageResult' + '400': + description: | + Business Object ID Invalid + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BusinessObjectIDInvalid: + $ref: '#/components/examples/BusinessObjectIDInvalid' + '404': + description: | + Requested Aspect Type Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectTypeNotFound: + $ref: '#/components/examples/AspectTypeNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience + /organizations/{organizationId}/pages/{pageId}: + get: + summary: Get a Page Designer page based on a single page ID. + description: "Get a Page Designer page for a specific page ID. The results apply the visibility rules for the page's components, such as personalization or scheduled visibility.\n\n**Important**: \n- Currently, you can't use the Shopper Experience API when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." + operationId: getPage + parameters: + - $ref: '#/components/parameters/pageId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/aspectAttributes' + - $ref: '#/components/parameters/parameters' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/locale' + responses: + '200': + description: Success. + content: + application/json: + schema: + $ref: '#/components/schemas/Page' + examples: + Page: + $ref: '#/components/examples/Page' + '400': + description: | + Provided Aspect Attribute Invalid + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + AspectAttributeInvalid: + $ref: '#/components/examples/AspectAttributeInvalid' + '404': + description: | + Requested Page Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + PageNotFound: + $ref: '#/components/examples/PageNotFound' + security: + - ShopperToken: + - sfcc.shopper-experience +components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.shopper-experience: Shopper Experience scope READONLY + schemas: + OrganizationId: + description: An identifier for the organization the request is being made by + example: f_ecom_zzxy_prd + type: string + minLength: 1 + maxLength: 32 + SiteId: + minLength: 1 + maxLength: 32 + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites + example: RefArch + type: string + LanguageCountry: + pattern: ^[a-z][a-z]-[A-Z][A-Z]$ + description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. + example: en-US + type: string + LanguageCode: + pattern: ^[a-z][a-z]$ + description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). + example: en + type: string + DefaultFallback: + default: default + description: A specialized value indicating the system default values for locales. + example: default + enum: + - default + type: string + LocaleCode: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + oneOf: + - $ref: '#/components/schemas/LanguageCountry' + - $ref: '#/components/schemas/LanguageCode' + - $ref: '#/components/schemas/DefaultFallback' + Region: + properties: + id: + maxLength: 256 + title: ID + description: Region identifier. + example: header + type: string + components: + title: Components + description: The components in the region. + example: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + type: array + items: + $ref: '#/components/schemas/Component' + required: + - id + type: object + Component: + properties: + id: + maxLength: 256 + title: ID + description: Component identifier. + example: rfdvj4ojtltljw3 + type: string + typeId: + maxLength: 256 + title: Component Type ID + description: Component type identifier. + example: commerce_assets.carousel + type: string + data: + title: Component Data + description: The configuration data assigned to the component. + example: + title: Topseller + category: topseller + type: object + additionalProperties: false + custom: + title: Custom Component Data + description: Any custom data added by the custom code for this component. + example: + detailUrl: www.myshop.com/topseller + type: object + additionalProperties: false + regions: + title: Regions + description: The regions (and their assigned components) for the component. + example: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + Page: + properties: + id: + maxLength: 256 + title: ID + description: Page identifier. + example: homepage + type: string + typeId: + maxLength: 256 + title: Page Type ID + description: Page type identifier. + example: storePage + type: string + aspectTypeId: + maxLength: 256 + title: Aspect Type ID + description: The aspect type assigned to the page. + example: pdpAspect + type: string + name: + maxLength: 4000 + title: Page Name + description: Display name of the page. + example: Homepage + type: string + description: + maxLength: 4000 + title: Page Description + description: Description of the page. + example: Home page of the storefront. + type: string + pageTitle: + maxLength: 4000 + title: SEO Title + description: The SEO title of the page. + example: Homepage - My Shop + type: string + pageDescription: + maxLength: 4000 + title: SEO Description + description: The SEO description of the page. + example: Get started shopping + type: string + pageKeywords: + maxLength: 4000 + title: SEO Keywords + description: The SEO keywords of the page. + example: fashion, my shop + type: string + data: + title: Page Data + description: The configuration data assigned to the page. + example: + thumbnail: myshop.jpg + type: object + additionalProperties: false + custom: + title: Custom Page Data + description: Any custom data added by the custom code for the page type. + example: + thumbnail_full: http://static.myshop.com/myshop.jpg + type: object + additionalProperties: false + regions: + title: Regions + description: The regions (and their assigned components) for the page. + example: + - id: header + components: + - id: iofwj38fhw3f + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: rfdvj4ojtltljw3 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: w3reö9wsjf3 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: cgn8d4ngdl4n + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: footer + components: [] + type: array + items: + $ref: '#/components/schemas/Region' + required: + - id + - typeId + type: object + PageResult: + properties: + data: + title: Data + description: List of pages. + type: array + items: + $ref: '#/components/schemas/Page' + required: + - data + type: object + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail + parameters: + organizationId: + description: An identifier for the organization the request is being made by + name: organizationId + in: path + required: true + example: f_ecom_zzxy_prd + schema: + $ref: '#/components/schemas/OrganizationId' + categoryId: + name: categoryId + in: query + description: Category identifier that is used for searching the page assignment. Must be provided if no `productId` is provided. + required: false + schema: + maxLength: 256 + type: string + example: home-clearance + productId: + name: productId + in: query + description: Product identifier that is used for searching the page assignment. Must be provided if no `categoryId` is provided. + required: false + schema: + maxLength: 100 + type: string + example: iphone11 + aspectTypeId: + name: aspectTypeId + in: query + description: Aspect type identifier that is used for searching the page assignment in conjunction with either the `productId` or `categoryId`. + required: true + schema: + maxLength: 256 + type: string + example: pdp + aspectAttributes: + name: aspectAttributes + in: query + description: A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + type: string + maxLength: 256 + example: |- + { + "product" : "iphone11", + "breadcrumbCategory" : "home-clearance" + } + parameters: + name: parameters + in: query + description: A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding. + required: false + schema: + maxLength: 256 + type: string + example: refine=color,size;currency=USD;showNavigation=false + siteId: + description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. + name: siteId + in: query + required: true + examples: + SiteId: + value: RefArch + schema: + $ref: '#/components/schemas/SiteId' + locale: + description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. + name: locale + in: query + examples: + LanguageCountry: + value: en-US + CountryCode: + value: US + schema: + $ref: '#/components/schemas/LocaleCode' + pageId: + name: pageId + in: path + description: Identifier for the requested page. + required: true + schema: + maxLength: 256 + type: string + example: homepage + examples: + PageResult: + value: + data: + - id: homePpage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 2192f5b9aac0f2af2385f6f6b7 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: 5c5ebbcd2aee1a67af519c83b5 + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: d98a30dfe93715e3e6fc22a329 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: 43aa39896afb9292308181ce14 + typeId: commerce_assets.productTile + data: + product: iphone7 + - id: detailpage + typeId: storePage + name: storepage + description: A Store page + pageTitle: A Store + pageDescription: Buy in store + pageKeywords: fashion, my shop, store + data: + thumbnail: mystore.jpg + BusinessObjectIDInvalid: + value: + title: Business Object ID Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid + detail: At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist. + AspectTypeNotFound: + value: + title: Aspect Type Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found + detail: No aspect type with ID 'pdp' was found in site 'RefArch'. + Page: + value: + id: homepage + typeId: storePage + aspectTypeId: pdpAspect + name: Homepage + description: Home page of the storefront. + pageTitle: Homepage - My Shop + pageDescription: Get started shopping + pageKeywords: fashion, my shop + data: + thumbnail: myshop.jpg + custom: + thumbnail_full: http://static.myshop.com/myshop.jpg + regions: + - id: header + components: + - id: 375b9107b067902827083772f9 + typeId: commerce_assets.banner + data: + title: Products On Sale + bannerImage: sale/topsellerPromo.jpg + custom: + thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg + - id: main + components: + - id: be1f331b92d8ad7e38e440e35d + typeId: commerce_assets.carousel + data: + title: Topseller + category: topseller + custom: + detailUrl: www.myshop.com/topseller + regions: + - id: tiles + components: + - id: 45af07459684e6db78990c5d05 + typeId: commerce_assets.productTile + data: + product: iphone6 + - id: df6e33766d90e7e205d109aa2f + typeId: commerce_assets.productTile + data: + product: iphone7 + AspectAttributeInvalid: + value: + title: Aspect Attribute Invalid + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-attribute-invalid + detail: 'Aspect attribute value "5555" does not fulfill its respective definition {"id" : "foobar", "type" : "string","required" : "false"}' + PageNotFound: + value: + title: Page Not Found + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/page-not-found + detail: No visible page with ID 'homepage' was found in site 'RefArch'. diff --git a/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml deleted file mode 100644 index 74c88a94..00000000 --- a/apis/shopper-experience-oas-1.1.0/shopper-experience-oas-v1-public.yaml +++ /dev/null @@ -1,1394 +0,0 @@ -openapi: 3.0.3 -info: - x-api-type: Shopper - x-api-family: Experience - title: Shopper Experience - version: 1.1.0 - description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-experience/shopper-experience-oas-v1-public.yaml) - - # API Overview - Use the Shopper Experience API to look up page information for pages that are created in Page Designer, content assets and to access content folders. - - ## Pages - Responses for pages include the following: - - - The entire component hierarchy of the page at design time. - - All merchant data provided at design time. - - Server-side scripting data provided at run time. - - Both the page and components contain the values of all native and custom attributes that have been populated during page authoring. - - Only visible pages are returned. Because the visibility of components is driven by rules (scheduling or customer groups, for example), these rules are subject to evaluation when assembling the component hierarchy in the response. Only components that are visible for the current customer context appear in the response. The same rules apply to the page itself, which is only be processed and returned if it is visible. - - ## Content Assets - - Content asset responses include: - - - Rich content including text, HTML, and images - - SEO metadata (title, description, keywords) - - Template information for rendering - - Folder organization structure - - Custom attributes and properties - - Only content assets that are marked as online are returned. Content assets provide flexible content management capabilities for storefronts. - - ## Content Folders - The API also provides access to content folders, which are used to organize and manage content assets. Content folders support: - - - Hierarchical organization with nested subfolders - - Localized metadata including names, descriptions, and SEO attributes - - Custom attributes for extended functionality - - Configurable depth levels for subfolder retrieval (0, 1, or 2 levels) - - Only content folders that are marked as online are returned in the API responses. - - ## Authentication & Authorization - - The Shopper Experience API requires a shopper access token from the Shopper Login and API Access Service (SLAS). - - For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. - - You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html). - - **Important**: Currently, the Shopper Experience Pages endpoints can’t be used when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled. -servers: - - url: https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/v1 - variables: - shortCode: - default: shortCode -paths: - /organizations/{organizationId}/pages: - get: - summary: Get Page Designer pages. - description: "Get Page Designer pages. The results apply the visibility rules for each page's components, such as personalization or scheduled visibility.\n\nYou must provide the `aspectTypeId` along with either a `categoryId` or a `productId`. Since you can only create one page-to-product or page-to-category assignment per aspect type, the result contains at most one element.\n\n**Important**: \n- Currently, you can't use the Shopper Experience Pages endpoints when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." - operationId: getPages - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/categoryId' - - $ref: '#/components/parameters/productId' - - $ref: '#/components/parameters/aspectTypeId' - - $ref: '#/components/parameters/aspectAttributes' - - $ref: '#/components/parameters/parameters' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/PageResult' - examples: - PageResult: - $ref: '#/components/examples/PageResult' - '400': - description: | - Business Object ID Invalid - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - BusinessObjectIDInvalid: - $ref: '#/components/examples/BusinessObjectIDInvalid' - '404': - description: | - Requested Aspect Type Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - AspectTypeNotFound: - $ref: '#/components/examples/AspectTypeNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience - - sfcc.shopper-experience.pages - /organizations/{organizationId}/pages/{pageId}: - get: - summary: Get a Page Designer page based on a single page ID. - description: "Get a Page Designer page for a specific page ID. The results apply the visibility rules for the page's components, such as personalization or scheduled visibility.\n\n**Important**: \n- Currently, you can't use the Shopper Experience Pages endpoints when the [storefront password protection](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fpermissions%2Fb2c_storefront_password_protection.html&resultof=%22%73%74%6f%72%65%66%72%6f%6e%74%22%20%22%70%72%6f%74%65%63%74%69%6f%6e%22%20%22%70%72%6f%74%65%63%74%22%20) feature is enabled.\n- Because this resource uses the GET method, you must not pass sensitive data, for example: payment card information, and must not perform transactional processes within the server-side scripts that are run for the page and components.\n- Be aware that pagecache during fingerprint calculation will only be leveraged for pages and their components that don't use visibility rules. Furthermore the pagecaching of the actual response assembly solely depends on the response instrumentation with the serverside page type and component type script implementations. For more details also see the [Page Designer Caching Guide](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-dev-for-page-designer.html#page-caching)." - operationId: getPage - parameters: - - $ref: '#/components/parameters/pageId' - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/aspectAttributes' - - $ref: '#/components/parameters/parameters' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/Page' - examples: - Page: - $ref: '#/components/examples/Page' - '400': - description: | - Invalid Query Parameter - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - AspectAttributeInvalid: - $ref: '#/components/examples/AspectAttributeInvalid' - '401': - description: | - Unauthorized Access - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '404': - description: | - Requested Page Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - PageNotFound: - $ref: '#/components/examples/PageNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience - - sfcc.shopper-experience.pages - /organizations/{organizationId}/contents/{id}: - get: - summary: Get a content asset by ID. - description: "Get a content asset by its unique identifier. Only content assets that are marked as online are returned.\n\nContent assets contain rich content that can be displayed on storefronts, including text, HTML, images, and custom attributes.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." - operationId: getContent - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/contentId' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/Content' - examples: - Content: - $ref: '#/components/examples/Content' - '404': - description: | - Content Asset Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - ContentNotFound: - $ref: '#/components/examples/ContentNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience.contents - /organizations/{organizationId}/contents: - get: - summary: Get multiple content assets. - description: "Get multiple content assets by their identifiers. Only content assets that are marked as online are returned.\n\nThis endpoint allows you to retrieve multiple content assets in a single request, which is more efficient than making multiple individual requests.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." - operationId: getMultipleContent - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/contentIds' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/ContentResult' - examples: - ContentResult: - $ref: '#/components/examples/ContentResult' - '400': - description: | - Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - GetContentsBadRequest: - $ref: '#/components/examples/GetContentsBadRequest' - security: - - ShopperToken: - - sfcc.shopper-experience.contents - /organizations/{organizationId}/content-search: - get: - summary: Search for content assets. - description: "Provides keyword and refinement search functionality for content assets. The search result contains only content\nthat is online and assigned to a folder.\n\n**Refinement Parameters:**\nThe following system refinement attribute IDs are supported:\n- `fdid`: Allows refinement per single content folder ID. Multiple folder IDs are not supported.\n\n**Important**: \n- Because this resource uses the GET method, you must not pass sensitive data and must not perform transactional processes." - operationId: searchContent - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/contentSearchQuery' - - $ref: '#/components/parameters/contentSearchRefine' - - $ref: '#/components/parameters/contentSearchSort' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - - name: limit - in: query - required: false - schema: - type: integer - format: int32 - default: 50 - maximum: 200 - description: Maximum records to retrieve per request, not to exceed 200. Defaults to 50. - - name: offset - in: query - required: false - schema: - type: integer - format: int64 - default: 0 - minimum: 0 - description: Used to retrieve the results based on a particular resource offset. - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/ContentSearchResult' - examples: - ContentSearchResult: - $ref: '#/components/examples/ContentSearchResult' - '400': - description: | - Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - ContentSearchBadRequest: - $ref: '#/components/examples/ContentSearchBadRequest' - security: - - ShopperToken: - - sfcc.shopper-experience.contents - /organizations/{organizationId}/folders/{id}: - get: - summary: Get content folder - description: "To access a content folder, you construct a URL using the template shown below. \nThis template requires you to specify a content folder id and a subfolder level. \nIn response, the server returns a corresponding content folder document. \nOnly content folders which are marked as online are returned." - operationId: getContentFolder - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/folderId' - - $ref: '#/components/parameters/levels' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ContentFolder' - examples: - ContentFolder: - $ref: '#/components/examples/ContentFolder' - '400': - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - InvalidLevelsParameter: - $ref: '#/components/examples/InvalidLevelsParameter' - '401': - $ref: '#/components/responses/401unauthorized' - '403': - $ref: '#/components/responses/403forbidden' - '404': - description: Folder Not Found - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - ContentFolderNotFound: - $ref: '#/components/examples/ContentFolderNotFound' - security: - - ShopperToken: - - sfcc.shopper-experience.folders - /organizations/{organizationId}/folders: - get: - summary: Get multiple content folders - description: "To access one or more content folders, you construct a URL using the template shown below. \nThis template requires you to specify one or more content folder ids as a query parameter and a subfolder level. \nIn response, the server returns a result set of corresponding content folder documents. \nOnly content folders which are marked as online are returned." - operationId: getContentFolders - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/folderIds' - - $ref: '#/components/parameters/levels' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/locale' - responses: - '200': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ContentFolderResult' - examples: - ContentFolderResult: - $ref: '#/components/examples/ContentFolderResult' - '400': - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - InvalidLevelsParameter: - $ref: '#/components/examples/InvalidLevelsParameter' - '401': - $ref: '#/components/responses/401unauthorized' - '403': - $ref: '#/components/responses/403forbidden' - security: - - ShopperToken: - - sfcc.shopper-experience.folders -components: - securitySchemes: - ShopperToken: - type: oauth2 - description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" - flows: - clientCredentials: - tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-experience: Shopper Experience scope READONLY - sfcc.shopper-experience.pages: Shopper Experience scope READONLY for pages - sfcc.shopper-experience.contents: Shopper Experience scope READONLY for contents - sfcc.shopper-experience.folders: Shopper Experience scope READONLY for folders - authorizationCode: - authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize - tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-experience: Shopper Experience scope READONLY - sfcc.shopper-experience.pages: Shopper Experience scope READONLY for pages - sfcc.shopper-experience.contents: Shopper Experience scope READONLY for contents - sfcc.shopper-experience.folders: Shopper Experience scope READONLY for folders - schemas: - OrganizationId: - description: An identifier for the organization the request is being made by - example: f_ecom_zzxy_prd - type: string - minLength: 1 - maxLength: 32 - SiteId: - minLength: 1 - maxLength: 32 - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites - example: RefArch - type: string - LanguageCountry: - pattern: ^[a-z][a-z]-[A-Z][A-Z]$ - description: A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'. - example: en-US - type: string - LanguageCode: - pattern: ^[a-z][a-z]$ - description: A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). - example: en - type: string - DefaultFallback: - default: default - description: A specialized value indicating the system default values for locales. - example: default - enum: - - default - type: string - LocaleCode: - description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - oneOf: - - $ref: '#/components/schemas/LanguageCountry' - - $ref: '#/components/schemas/LanguageCode' - - $ref: '#/components/schemas/DefaultFallback' - Region: - properties: - id: - maxLength: 256 - title: ID - description: Region identifier. - example: header - type: string - components: - title: Components - description: The components in the region. - example: - - id: iofwj38fhw3f - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - type: array - items: - $ref: '#/components/schemas/Component' - required: - - id - type: object - Component: - properties: - id: - maxLength: 256 - title: ID - description: Component identifier. - example: rfdvj4ojtltljw3 - type: string - typeId: - maxLength: 256 - title: Component Type ID - description: Component type identifier. - example: commerce_assets.carousel - type: string - data: - title: Component Data - description: The configuration data assigned to the component. - example: - title: Topseller - category: topseller - type: object - additionalProperties: false - custom: - title: Custom Component Data - description: Any custom data added by the custom code for this component. - example: - detailUrl: www.myshop.com/topseller - type: object - additionalProperties: false - regions: - title: Regions - description: The regions (and their assigned components) for the component. - example: - - id: tiles - components: - - id: w3reö9wsjf3 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: cgn8d4ngdl4n - typeId: commerce_assets.productTile - data: - product: iphone7 - type: array - items: - $ref: '#/components/schemas/Region' - required: - - id - - typeId - type: object - Page: - properties: - id: - maxLength: 256 - title: ID - description: Page identifier. - example: homepage - type: string - typeId: - maxLength: 256 - title: Page Type ID - description: Page type identifier. - example: storePage - type: string - aspectTypeId: - maxLength: 256 - title: Aspect Type ID - description: The aspect type assigned to the page. - example: pdpAspect - type: string - name: - maxLength: 4000 - title: Page Name - description: Display name of the page. - example: Homepage - type: string - description: - maxLength: 4000 - title: Page Description - description: Description of the page. - example: Home page of the storefront. - type: string - pageTitle: - maxLength: 4000 - title: SEO Title - description: The SEO title of the page. - example: Homepage - My Shop - type: string - pageDescription: - maxLength: 4000 - title: SEO Description - description: The SEO description of the page. - example: Get started shopping - type: string - pageKeywords: - maxLength: 4000 - title: SEO Keywords - description: The SEO keywords of the page. - example: fashion, my shop - type: string - data: - title: Page Data - description: The configuration data assigned to the page. - example: - thumbnail: myshop.jpg - type: object - additionalProperties: false - custom: - title: Custom Page Data - description: Any custom data added by the custom code for the page type. - example: - thumbnail_full: http://static.myshop.com/myshop.jpg - type: object - additionalProperties: false - regions: - title: Regions - description: The regions (and their assigned components) for the page. - example: - - id: header - components: - - id: iofwj38fhw3f - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: rfdvj4ojtltljw3 - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: w3reö9wsjf3 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: cgn8d4ngdl4n - typeId: commerce_assets.productTile - data: - product: iphone7 - - id: footer - components: [] - type: array - items: - $ref: '#/components/schemas/Region' - required: - - id - - typeId - type: object - PageResult: - properties: - data: - title: Data - description: List of pages. - type: array - items: - $ref: '#/components/schemas/Page' - required: - - data - type: object - ErrorResponse: - type: object - additionalProperties: true - properties: - title: - description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" - type: string - maxLength: 256 - example: You do not have enough credit - type: - description: | - A URI reference [RFC3986] that identifies the - problem type. This specification encourages that, when - dereferenced, it provide human-readable documentation for the - problem type (e.g., using HTML [W3C.REC-html5-20141028]). When - this member is not present, its value is assumed to be - "about:blank". It accepts relative URIs; this means - that they must be resolved relative to the document's base URI, as - per [RFC3986], Section 5. - type: string - maxLength: 2048 - example: NotEnoughMoney - detail: - description: A human-readable explanation specific to this occurrence of the problem. - type: string - example: Your current balance is 30, but that costs 50 - instance: - description: | - A URI reference that identifies the specific - occurrence of the problem. It may or may not yield further - information if dereferenced. It accepts relative URIs; this means - that they must be resolved relative to the document's base URI, as - per [RFC3986], Section 5. - type: string - maxLength: 2048 - example: /account/12345/msgs/abc - required: - - title - - type - - detail - ContentId: - maxLength: 256 - minLength: 1 - description: The id of the content asset. - example: homepage-banner - type: string - Content: - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - properties: - id: - title: ID - allOf: - - $ref: '#/components/schemas/ContentId' - name: - title: Name - description: The localized content asset name. - type: string - maxLength: 4000 - example: Homepage Banner - description: - title: Description - description: The localized content asset description. - type: string - maxLength: 4000 - example: Main banner displayed on the homepage - pageDescription: - title: Page Description - description: The localized content asset page description for SEO. - type: string - maxLength: 4000 - example: Discover our latest products and offers - pageKeywords: - title: Page Keywords - description: The localized content asset page keywords for SEO. - type: string - maxLength: 4000 - example: products, offers, sale, fashion - pageTitle: - title: Page Title - description: The localized content asset page title for SEO - type: string - maxLength: 4000 - example: Shop Now - Best Deals - required: - - id - type: object - Limit: - default: 10 - minimum: 1 - format: int32 - description: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria). - type: integer - example: 10 - Total: - default: 0 - minimum: 0 - format: int32 - description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. - type: integer - example: 10 - ResultBase: - description: "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned." - type: object - required: - - limit - - total - properties: - limit: - maximum: 200 - allOf: - - $ref: '#/components/schemas/Limit' - total: - $ref: '#/components/schemas/Total' - ContentResult: - allOf: - - $ref: '#/components/schemas/ResultBase' - properties: - data: - title: Data - description: List of content assets. - type: array - items: - $ref: '#/components/schemas/Content' - required: - - data - type: object - Offset: - default: 0 - minimum: 0 - format: int32 - description: The zero-based index of the first hit/data to include in the result. - type: integer - example: 0 - PaginatedResultBase: - description: "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`." - type: object - allOf: - - $ref: '#/components/schemas/ResultBase' - properties: - offset: - $ref: '#/components/schemas/Offset' - required: - - limit - - offset - - total - ContentSearchRefinementValue: - properties: - label: - title: Label - description: The localized label of the refinement value. - type: string - maxLength: 4000 - example: Banner - value: - title: Value - description: The refinement value. - type: string - maxLength: 256 - example: banner - hitCount: - title: Hit Count - description: The number of search hits when this refinement value is applied. - type: integer - minimum: 0 - example: 5 - required: - - value - type: object - ContentSearchRefinement: - properties: - attributeId: - title: Attribute ID - description: The ID of the refinement attribute. - type: string - maxLength: 256 - example: c_contentType - label: - title: Label - description: The localized label of the refinement attribute. - type: string - maxLength: 4000 - example: Content Type - values: - title: Values - description: The array of refinement values. - type: array - items: - $ref: '#/components/schemas/ContentSearchRefinementValue' - required: - - attributeId - type: object - ContentSearchResult: - allOf: - - $ref: '#/components/schemas/PaginatedResultBase' - properties: - query: - title: Query - description: The query String that was searched for. - type: string - maxLength: 256 - example: banner - hits: - title: Content Hits - description: The sorted array of search hits. Can be empty. - type: array - items: - $ref: '#/components/schemas/Content' - selectedRefinements: - title: Selected Refinements - description: Map of selected refinement attribute id/value(s) pairs. The sorting order is the same like in request URL. - type: object - additionalProperties: - type: string - maxLength: 256 - example: homepage-folder - example: - fdid: homepage-folder - c_contentType: banner - refinements: - title: Refinements - description: The sorted array of search refinements. Can be empty. - type: array - items: - $ref: '#/components/schemas/ContentSearchRefinement' - required: - - hits - type: object - FolderId: - maxLength: 256 - type: string - example: homepage-folder - ContentFolder: - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - properties: - id: - maxLength: 256 - title: ID - description: The id of the content folder. - example: homepage-folder - type: string - parentFolderId: - maxLength: 256 - title: Parent Folder ID - description: The id of the parent content folder. - example: root-folder - type: string - name: - title: Name - description: The localized content folder name. - type: string - maxLength: 4000 - example: Homepage Folder - description: - title: Description - description: The localized content folder description. - type: string - maxLength: 4000 - example: Folder containing homepage content assets - pageDescription: - title: Page Description - description: The localized content folder page description. - type: string - maxLength: 4000 - example: SEO description for homepage folder - pageKeywords: - title: Page Keywords - description: The localized content folder page keywords. - type: string - maxLength: 4000 - example: homepage, main, landing - pageTitle: - title: Page Title - description: The localized content folder page title. - type: string - maxLength: 4000 - example: Homepage Folder - My Store - folders: - title: Folders - description: The array of content subfolders. This array can be empty. - type: array - items: - $ref: '#/components/schemas/ContentFolder' - required: - - id - type: object - ContentFolderResult: - allOf: - - $ref: '#/components/schemas/ResultBase' - properties: - data: - title: Data - description: List of content folders. - type: array - items: - $ref: '#/components/schemas/ContentFolder' - required: - - data - type: object - parameters: - organizationId: - description: An identifier for the organization the request is being made by - name: organizationId - in: path - required: true - example: f_ecom_zzxy_prd - schema: - $ref: '#/components/schemas/OrganizationId' - categoryId: - name: categoryId - in: query - description: Category identifier that is used for searching the page assignment. Must be provided if no `productId` is provided. - required: false - schema: - maxLength: 256 - type: string - example: home-clearance - productId: - name: productId - in: query - description: Product identifier that is used for searching the page assignment. Must be provided if no `categoryId` is provided. - required: false - schema: - maxLength: 100 - type: string - example: iphone11 - aspectTypeId: - name: aspectTypeId - in: query - description: Aspect type identifier that is used for searching the page assignment in conjunction with either the `productId` or `categoryId`. - required: true - schema: - maxLength: 256 - type: string - example: pdp - aspectAttributes: - name: aspectAttributes - in: query - description: A JSON representation of aspect attributes. Each aspect attribute is a key/value pair. Aspect attributes serve as a runtime parameter contract between caller (for example, this API or the DWScript API) and callee (the page). This parameter must not contain more than 256 characters after URL decoding. - required: false - schema: - type: string - maxLength: 256 - example: |- - { - "product" : "iphone11", - "breadcrumbCategory" : "home-clearance" - } - parameters: - name: parameters - in: query - description: A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding. - required: false - schema: - maxLength: 256 - type: string - example: refine=color,size;currency=USD;showNavigation=false - siteId: - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. - name: siteId - in: query - required: true - examples: - SiteId: - value: RefArch - schema: - $ref: '#/components/schemas/SiteId' - locale: - description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. - name: locale - in: query - examples: - LanguageCountry: - value: en-US - CountryCode: - value: US - schema: - $ref: '#/components/schemas/LocaleCode' - pageId: - name: pageId - in: path - description: Identifier for the requested page. - required: true - schema: - maxLength: 256 - type: string - example: homepage - contentId: - name: id - in: path - description: Identifier for the requested content asset. - required: true - schema: - $ref: '#/components/schemas/ContentId' - contentIds: - name: ids - in: query - description: Comma-separated list of content asset identifiers to retrieve. - required: true - style: form - explode: false - schema: - type: array - items: - $ref: '#/components/schemas/ContentId' - minItems: 1 - maxItems: 50 - example: homepage-banner,footer-content,sidebar-promo - contentSearchQuery: - name: q - in: query - description: The query phrase to search for content assets. For example, to search for content with "banner", type q=banner. - required: false - schema: - maxLength: 50 - minLength: 1 - type: string - example: banner - contentSearchRefine: - name: refine - in: query - description: "Parameter that represents a refinement attribute/value(s) pair. Refinement attribute ID and value(s) are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \"|\"). Value ranges can be specified like this: refine=foo=(100..500). \nMultiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementType=type1|type2|type3.\n\nThe following system refinement attribute IDs are supported:\n- `fdid`: Allows refinement per single content folder ID. Multiple folder IDs are not supported." - required: false - style: form - explode: true - schema: - type: string - maxLength: 256 - example: fdid=homepage-folder - contentSearchSort: - name: sort - in: query - description: |- - Parameter that represents a sorting attribute/value(s) pair. Sorting attribute ID and value are separated by '='. The value describes the sort direction. Possible values are 'asc' and 'desc', for ascending or descending sort direction. I.e. sort=c_myAttribute=desc. - - Precondition: You have to select your sorting attributes in Business Manager > YourSite > Search Indexes > Content Index > Sorting Attributes. - required: false - style: form - explode: true - schema: - type: string - maxLength: 256 - example: name=asc - folderId: - name: id - in: path - description: Identifier for the requested content folder. - required: true - schema: - $ref: '#/components/schemas/FolderId' - levels: - name: levels - in: query - description: Specifies how many levels of nested subfolders you want the server to return. The default value is 1. Valid values are 0, 1, or 2. - required: false - schema: - type: integer - minimum: 0 - maximum: 2 - default: 1 - example: 1 - folderIds: - name: ids - in: query - style: form - explode: false - description: Comma-separated list of content folder identifiers. - required: true - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/FolderId' - minItems: 1 - maxItems: 50 - example: homepage-folder,category-folder,product-folder - examples: - PageResult: - value: - data: - - id: homePpage - typeId: storePage - aspectTypeId: pdpAspect - name: Homepage - description: Home page of the storefront. - pageTitle: Homepage - My Shop - pageDescription: Get started shopping - pageKeywords: fashion, my shop - data: - thumbnail: myshop.jpg - custom: - thumbnail_full: http://static.myshop.com/myshop.jpg - regions: - - id: header - components: - - id: 2192f5b9aac0f2af2385f6f6b7 - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: 5c5ebbcd2aee1a67af519c83b5 - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: d98a30dfe93715e3e6fc22a329 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: 43aa39896afb9292308181ce14 - typeId: commerce_assets.productTile - data: - product: iphone7 - - id: detailpage - typeId: storePage - name: storepage - description: A Store page - pageTitle: A Store - pageDescription: Buy in store - pageKeywords: fashion, my shop, store - data: - thumbnail: mystore.jpg - BusinessObjectIDInvalid: - value: - title: Business Object ID Invalid - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/business-object-id-invalid - detail: At least one provided business object identifier was invalid. This means either none was provided at all or exclusiveness of multiple identifiers wasn't honored or the referenced business object didn't exist. - AspectTypeNotFound: - value: - title: Aspect Type Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-type-not-found - detail: No aspect type with ID 'pdp' was found in site 'RefArch'. - Page: - value: - id: homepage - typeId: storePage - aspectTypeId: pdpAspect - name: Homepage - description: Home page of the storefront. - pageTitle: Homepage - My Shop - pageDescription: Get started shopping - pageKeywords: fashion, my shop - data: - thumbnail: myshop.jpg - custom: - thumbnail_full: http://static.myshop.com/myshop.jpg - regions: - - id: header - components: - - id: 375b9107b067902827083772f9 - typeId: commerce_assets.banner - data: - title: Products On Sale - bannerImage: sale/topsellerPromo.jpg - custom: - thumbnail_full: http://static.myshop.com/sale/topsellerPromo.jpg - - id: main - components: - - id: be1f331b92d8ad7e38e440e35d - typeId: commerce_assets.carousel - data: - title: Topseller - category: topseller - custom: - detailUrl: www.myshop.com/topseller - regions: - - id: tiles - components: - - id: 45af07459684e6db78990c5d05 - typeId: commerce_assets.productTile - data: - product: iphone6 - - id: df6e33766d90e7e205d109aa2f - typeId: commerce_assets.productTile - data: - product: iphone7 - AspectAttributeInvalid: - value: - title: Aspect Attribute Invalid - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/aspect-attribute-invalid - detail: 'Aspect attribute value "5555" does not fulfill its respective definition {"id" : "foobar", "type" : "string","required" : "false"}' - PageNotFound: - value: - title: Page Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/page-not-found - detail: No visible page with ID 'homepage' was found in site 'RefArch'. - Content: - value: - id: homepage-banner - name: Homepage Banner - description: Main promotional banner for the homepage - pageTitle: Homepage Banner - My Shop - pageDescription: Discover amazing products at great prices - pageKeywords: banner, promotion, homepage - ContentNotFound: - value: - title: Content Asset Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/content-not-found - detail: No visible content asset with ID 'homepage-banner' was found in site 'RefArch'. - ContentResult: - value: - data: - - id: homepage-banner - name: Homepage Banner - description: Main promotional banner for the homepage - pageTitle: Homepage Banner - My Shop - pageDescription: Discover amazing products at great prices - pageKeywords: banner, promotion, homepage - - id: footer-content - name: Footer Content - description: Footer information and links - pageTitle: Footer - My Shop - pageDescription: Footer content with links and copyright information - pageKeywords: footer, links, copyright - total: 2 - limit: 2 - GetContentsBadRequest: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request - detail: '''ids'' violates the value constraint. The expected value is between ''(0..50)''.' - parameter: ids - expected: (0..50) - ContentSearchResult: - value: - query: banner - hits: - - id: homepage-banner - name: Homepage Banner - description: Main promotional banner for the homepage - pageTitle: Homepage Banner - My Shop - pageDescription: Discover amazing products at great prices - pageKeywords: banner, promotion, homepage - - id: sidebar-banner - name: Sidebar Banner - description: Promotional banner for the sidebar - pageTitle: Sidebar Banner - My Shop - pageDescription: Check out our special offers - pageKeywords: banner, sidebar, promotion - selectedRefinements: - fdid: homepage-folder - c_contentType: banner - refinements: - - attributeId: c_contentType - label: Content Type - values: - - value: banner - label: Banner - hitCount: 15 - - value: text - label: Text Content - hitCount: 8 - - attributeId: fdid - label: Content Folder - values: - - value: homepage-folder - label: Homepage - hitCount: 5 - - value: promotions-folder - label: Promotions - hitCount: 10 - total: 2 - limit: 25 - offset: 0 - ContentSearchBadRequest: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request - detail: 'Invalid refinement parameter format. Expected format: ''attribute=value''.' - parameter: refine - ContentFolder: - value: - id: homepage-folder - parentFolderId: root-folder - name: Homepage Folder - description: Folder containing homepage content assets - pageTitle: Homepage Folder - My Store - pageDescription: SEO description for homepage folder - pageKeywords: homepage, main, landing - folders: - - id: hero-section - parentFolderId: homepage-folder - name: Hero Section - description: Hero section content folder - folders: [] - - id: featured-products - parentFolderId: homepage-folder - name: Featured Products - description: Featured products content folder - folders: [] - c_customAttribute: customValue - InvalidLevelsParameter: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request - detail: '''levels'' violates the value constraint. The expected value is between ''(0..2)''.' - UnauthorizedExample: - value: - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized - title: Unauthorized - detail: Your access token is invalid or expired and can’t be used to identify a user. - ForbiddenExample: - value: - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden - title: Forbidden - detail: Your access token is valid, but you don’t have the required permissions to access the resource. - ContentFolderNotFound: - value: - title: Folder Not Found - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/folder-not-found - detail: No online content folder with ID 'non-existent-folder' for site 'RefArch' could be found. - ContentFolderResult: - value: - limit: 2 - total: 10 - data: - - id: homepage-folder - parentFolderId: root-folder - name: Homepage Folder - description: Folder containing homepage content assets - pageTitle: Homepage Folder - My Store - pageDescription: SEO description for homepage folder - pageKeywords: homepage, main, landing - folders: - - id: hero-section - parentFolderId: homepage-folder - name: Hero Section - description: Hero section content folder - folders: [] - - id: featured-products - parentFolderId: homepage-folder - name: Featured Products - description: Featured products content folder - folders: [] - c_customAttribute: customValue - - id: category-folder - parentFolderId: root-folder - name: Category Folder - description: Folder containing category content assets - pageTitle: Category Folder - My Store - pageDescription: SEO description for category folder - pageKeywords: category, products, listing - folders: [] - responses: - 401unauthorized: - description: Your access token is invalid or expired and can’t be used to identify a user. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - UnauthorizedExample: - $ref: '#/components/examples/UnauthorizedExample' - 403forbidden: - description: Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - ForbiddenExample: - $ref: '#/components/examples/ForbiddenExample' diff --git a/apis/shopper-gift-certificates-oas-1.0.27/exchange.json b/apis/shopper-gift-certificates-oas-1.0.26/exchange.json similarity index 93% rename from apis/shopper-gift-certificates-oas-1.0.27/exchange.json rename to apis/shopper-gift-certificates-oas-1.0.26/exchange.json index 9e86bbe5..15a341ad 100644 --- a/apis/shopper-gift-certificates-oas-1.0.27/exchange.json +++ b/apis/shopper-gift-certificates-oas-1.0.26/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Gift Certificates OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-gift-certificates-oas", - "version": "1.0.27", + "version": "1.0.26", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml b/apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml similarity index 98% rename from apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml rename to apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml index 776ba528..1008c88f 100644 --- a/apis/shopper-gift-certificates-oas-1.0.27/shopper-gift-certificates-oas-v1-public.yaml +++ b/apis/shopper-gift-certificates-oas-1.0.26/shopper-gift-certificates-oas-v1-public.yaml @@ -1,10 +1,9 @@ openapi: 3.0.3 info: title: Shopper Gift Certificates - version: 1.0.27 + version: v1 description: |- # API Overview - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml) Use the Shopper Gift Certificates API to obtain gift certificate details. diff --git a/apis/shopper-login-oas-1.41.0/exchange.json b/apis/shopper-login-oas-1.39.41/exchange.json similarity index 92% rename from apis/shopper-login-oas-1.41.0/exchange.json rename to apis/shopper-login-oas-1.39.41/exchange.json index 8515be17..3b0e0e86 100644 --- a/apis/shopper-login-oas-1.41.0/exchange.json +++ b/apis/shopper-login-oas-1.39.41/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Login OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-login-oas", - "version": "1.41.0", + "version": "1.39.41", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml b/apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml similarity index 97% rename from apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml rename to apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml index bb6ba671..59b446c9 100644 --- a/apis/shopper-login-oas-1.41.0/shopper-login-oas-v1-public.yaml +++ b/apis/shopper-login-oas-1.39.41/shopper-login-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Shopper title: Shopper Login - version: 1.41.0 + version: 1.39.41 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml) - # API Overview The Shopper Login and API Access Service (SLAS) enables secure access to Commerce Cloud’s Shopper APIs for a wide range of headless commerce applications. @@ -205,7 +201,6 @@ paths: operationId: authorizePasswordlessCustomer parameters: - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/register_customer' - name: Authorization in: header description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`' @@ -260,13 +255,6 @@ paths: examples: BadOrMissingAccessToken400: $ref: '#/components/examples/BadOrMissingAccessToken400' - TooManyLoginRequests400: - description: | - This error is returned specifically when mode = email and the user has exceeded the maximum number of login attempts within the rate limit window. - The client should implement exponential backoff and retry the request after the specified time period. - value: - error: invalid_request - error_description: Too many login requests were made. Please try again later. headers: X-RateLimit-1M-Limit: description: The 1 minute maximum number of requests permitted per hour. @@ -2357,32 +2345,12 @@ components: example: RefArch callback_uri: type: string - description: |- + description: | The callback URI. Required when the mode is `callback`. The `callback_uri` property will be validated against the callback URIs that have been registered with the SLAS client. The callback URI _must_ be a `POST` endpoint because the token will be included in the body. Wildcards are not allowed in the callback_uri because this is a security risk that can expose the token. This is not considered an OAuth2 callback_url. example: http://localhost:9050/passwordless/login/callback - last_name: - maxLength: 100 - type: string - description: "The user's last name. Required when `register_customer` is `true`. \nThe `last_name` parameter is not used when `register_customer` parameter is not added or is `false`." - example: Sampleson - email: - maxLength: 128 - type: string - description: "The user's email address. Required when `register_customer` is `true` and `user_id` is not an email address. \nThe `email` parameter is not used when `register_customer` parameter is not added or is `false`." - example: samantha.sampleson@example.com - first_name: - maxLength: 100 - type: string - description: "The user's first name. Optional when `register_customer` is `true`. \nThe `first_name` parameter is not used when `register_customer` parameter is not added or is `false`." - example: Samantha - phone_number: - maxLength: 48 - type: string - description: "The user's phone number. Optional when `register_customer` is `true`. \nThe `phone_number` parameter is not used when `register_customer` parameter is not added or is `false`." - example: 17776665555 - description: A request for a passwordless login token. This is only available for registered users using B2C Commerce. + description: A request for a passwordless login token. This is only available for resgistered users using B2C Commerce. TokenType: type: string description: Token Type @@ -2445,16 +2413,6 @@ components: type: string description: This is the access token that is returned from the IDP. The IDP access token is returned to be able to make calls into the IDP outside of SLAS. example: eyJraWQiOiJYS21HbHVuSm0zSlBTMHNjQXZXV19XQlYtRi1wMkxLSDR0V05UMHVVSjVJIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjFMY0xxTWhqM2t0N1FKeFhxQ0VtdGZOOVV2eUcweW1meDFxZG9BdzF1NWMub2FyeXhveHF0QUtxaVFMbkM1ZDYiLCJpc3MiOiJodHRwczovL2Rldi05NTY1MjM2Lm9rdGEuY29tIiwiYXVkIjoiaHR0cHM6Ly9kZXYtOTU2NTIzNi5va3RhLmNvbSIsInN1YiI6Im9rdGEuc2xhcy50ZXN0IiwiaWF0IjoxNjc5Njk4MzA4LCJleHAiOjE2Nzk3MDE5MDgsImNpZCI6IjBvYTJrNXNma0JXZ0poTEVHNWQ2IiwidWlkIjoiMDB1MzhxZGpuU2NMT0IxbXE1ZDYiLCJzY3AiOlsib2ZmbGluZV9hY2Nlc3MiLCJvcGVuaWQiLCJlbWFpbCIsInByb2ZpbGUiXSwiYXV0aF90aW1lIjoxNjc5Njk4MzA2fQ.FDbGsnZGwTYVKGSlAo6jqcjG2HQ_BqQKRk72M5h69DRHyOM4wngsEELN_Wtgj3E77sP7IOmIKjiK5SFP17ADMbKZptVr2pqaMVF3PuU3Cbl_MgXZValfT-z12jHRq9sHMfsdTjY2RnvG44ZDFKc2no8mdL6IJ1MfCaZT5Tql5Ktq_UgudaWFsYqad3ETcmp5Y8ivz1bFnqud0sO9D9JzYOtfd9h71JKcsSC2rXc_Si-INPKKaGl8CDgaLXxu_Am9twJpUenHLpy0BerhcVvdFz7_611E53xOT_Esrc1pe-XAZtlYsJFnhxTBDT342ukiSWk2m6juVappv1GsRfUf2g - idp_refresh_token: - maxLength: 128 - type: string - description: This is the refresh token that is returned from the IDP. The IDP refresh token is returned to be able to make calls into the IDP outside of SLAS. - example: EgMYpjfFKdlSy-a3PYeyihmP95IpIp3FaDpPmVH1yu8.lahomBi7zJbRa6yKAuAAiKu3lprTPsEueKwqcBvhRLU - dnt: - maxLength: 5 - type: string - description: Do not track - example: true GrantType: type: string description: Grant Type @@ -2881,13 +2839,6 @@ components: The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. example: Ar0lAwU_jsuA~ZXX8-JnMbZFxrnDot2OtgLEi1kOT_FxD6Bo0EQDbbrvoym9xHvatNGnNzrObLJeK6e4U9m4pveRMbdwNGa4jwiAlKGvijVn0PW0hqb03_w1gQE00wTo - login_id: - maxLength: 128 - type: string - description: |- - The ID used by the shopper for password token request. When provided, login_id must exactly match the ID used during passwordless login. - ex. If passwordless login used `samantha.sampleson@example.com`, but the passwordless login token request provides `sam.sampleson@example.com`, the request fails due to mismatch. - example: samantha.sampleson@example.com description: A request for an access token using a passwordless token. TokenActionRequest: required: @@ -2913,18 +2864,6 @@ components: example: f_ecom_zzxy_prd schema: $ref: '#/components/schemas/OrganizationId' - register_customer: - name: register_customer - in: query - description: |- - When set to `true`, creates a new customer profile in B2C Commerce if one doesn't already exist. Requires `last_name` and `email` body parameters unless `user_id` is an email address. Optionally accepts `first_name` and `phone_number` body parameters. - If the customer profile doesn't exist, it is created when the TOTP is validated via the `passwordless/token` endpoint. - - When set to `false` (or omitted), no customer profile is created in B2C Commerce. - required: false - schema: - maxLength: 5 - type: string client_id: name: client_id in: query @@ -2944,9 +2883,7 @@ components: name: hint in: query description: |- - `hint=all-sessions` logs out all sessions and invalidates all refresh tokens for a shopper with the same SLAS user ID. - This only works within the same session type. Sessions created through different authentication methods (/authorize vs. Trusted System On Behalf) are treated as separate sessions. To invalidate tokens with different SLAS User IDs, you must make explicit logout calls with each token. - A shopper authenticated via both /authorize and TSOB has two separate sessions. You will need two logout calls (one per token) to fully log them out. + `hint=all-sessions` logs out all sessions of the shopper and invalidates all active refresh tokens for the shopper. If this query parameter is not provided, the default behavior is to log out only the current session that matches the refresh token in the request. @@ -3128,7 +3065,7 @@ components: value: access_token: '' id_token: 'null' - refresh_token: '' + refresh_token: EnL9U2f3-WiVPwL60CFBI21UY_oxWAwX5JkgO-X12Vs expires_in: 0 refresh_token_expires_in: 0 token_type: Bearer @@ -3136,8 +3073,6 @@ components: customer_id: 'null' enc_user_id: 'null' idp_access_token: '' - idp_refresh_token: 'null' - dnt: 'null' authorizeCustomerSuccess: value: authorizationCode: eyJ2ZXIiOiIxLjAiLCJraWQiOiJTTEFTIiwidHlwIjoiand0IiwiY2x2IjoiS diff --git a/apis/shopper-orders-oas-1.6.0/exchange.json b/apis/shopper-orders-oas-1.5.0/exchange.json similarity index 90% rename from apis/shopper-orders-oas-1.6.0/exchange.json rename to apis/shopper-orders-oas-1.5.0/exchange.json index d7e7a5b7..a36ad84e 100644 --- a/apis/shopper-orders-oas-1.6.0/exchange.json +++ b/apis/shopper-orders-oas-1.5.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Orders OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-orders-oas", - "version": "1.6.0-master-b69", + "version": "1.5.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml b/apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml similarity index 93% rename from apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml rename to apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml index 57ef580a..5348c8b9 100644 --- a/apis/shopper-orders-oas-1.6.0/shopper-orders-oas-v1-public.yaml +++ b/apis/shopper-orders-oas-1.5.0/shopper-orders-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Checkout title: Shopper Orders - version: 1.6.0-master-b69 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-orders/shopper-orders-oas-v1-public.yaml) - # API Overview The Shopper Orders API enables you to: @@ -319,13 +315,11 @@ paths: examples: PaymentInstrumentPatch: $ref: '#/components/examples/PaymentInstrumentPatch' - PaymentInstrumentPatchWithSalesforcePayments: - $ref: '#/components/examples/PaymentInstrumentPatchWithSalesforcePayments' schema: $ref: '#/components/schemas/OrderPaymentInstrumentRequest' responses: '200': - description: Success, the response body contains the order with the updated payment instrument. When Salesforce Payments is enabled, the paymentReference object will be included in the paymentInstruments. + description: Success, the response body contains the order with the updated payment instrument. content: application/json: schema: @@ -333,8 +327,6 @@ paths: examples: Order: $ref: '#/components/examples/examples-PaymentInstrumentPatch' - OrderWhenSalesforcePaymentsEnabled: - $ref: '#/components/examples/PaymentInstrumentPatchWhenSalesforcePaymentsEnabled' '400': description: |- Possible reasons: @@ -1081,26 +1073,6 @@ components: description: The payment method ID. It is read only. example: CREDIT_CARD type: string - paymentReference: - description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. - type: object - properties: - paymentReferenceId: - description: Payment reference identifier. Can be payment intent ID for Stripe, PSP reference for Adyen, PayPal order ID for PayPal, or similar identifier for other payment providers. - type: string - maxLength: 256 - example: pi_3N4B2vF0wDjebNCp1234567 - clientSecret: - description: Client secret for payment confirmation. Used primarily by Stripe for client-side payment confirmation. - type: string - maxLength: 256 - example: pi_3N4B2vF0wDjebNCp1234567_secret_abc123 - redirectUrl: - description: Redirect URL for payment methods that require user redirection to complete payment. - type: string - format: uri - maxLength: 2048 - example: https://checkout.stripe.com/pay/cs_test_abc123 type: object ProductItem: description: Document representing a product item. @@ -2293,32 +2265,6 @@ components: description: The year the payment card is valid from. example: 2019 type: integer - PaymentReferenceRequest: - type: object - description: Properties for Payments Reference Request - properties: - paymentMethodType: - type: string - maxLength: 64 - description: Payment Method Type - example: card - zoneId: - type: string - description: The unique identifier for a Payments zone. - pattern: ^[a-zA-Z0-9\-_]{1,100}$ - minLength: 1 - maxLength: 100 - example: - Amer-Zone: null - shippingPreference: - type: string - maxLength: 64 - description: Shipping preference for PayPal payment processing. Applicable only for basket payment instruments. - enum: - - GET_FROM_FILE - - NO_SHIPPING - - SET_PROVIDED_ADDRESS - example: GET_FROM_FILE OrderPaymentInstrumentRequest: description: Document representing an order payment instrument request. additionalProperties: @@ -2353,10 +2299,6 @@ components: description: The payment method ID. example: CREDIT_CARD type: string - paymentReferenceRequest: - description: Payment reference information for various payment service providers, only when Salesforce Payments is enabled. - allOf: - - $ref: '#/components/schemas/PaymentReferenceRequest' PaymentCardSpec: description: Document representing the specification for a payment card. type: object @@ -3043,13 +2985,6 @@ components: paymentCard: cardType: Visa maskedNumber: '****-****-****-4567' - PaymentInstrumentPatchWithSalesforcePayments: - value: - amount: 700 - paymentMethodId: Salesforce Payments - paymentReferenceRequest: - paymentMethodType: card - zoneId: Amer-Zone examples-PaymentInstrumentPatch: value: adjustedMerchandizeTotalTax: 30 @@ -3217,181 +3152,6 @@ components: status: new taxation: net taxTotal: 30.8 - PaymentInstrumentPatchWhenSalesforcePaymentsEnabled: - value: - adjustedMerchandizeTotalTax: 30 - adjustedShippingTotalTax: 0.8 - billingAddress: - address1: 104 Presidential Way - city: Woburn - countryCode: US - firstName: Stephanie - fullName: Stephanie Miller - id: 5f695b6f4bb63cb686483d65a0 - lastName: Miller - postalCode: '01801' - stateCode: MA - channelType: storefront - confirmationStatus: not_confirmed - couponItems: - - code: 5ties - couponItemId: d3f7ae47e5897a6b5d2fd541f0 - statusCode: applied - valid: true - createdBy: Customer - creationDate: '2019-10-22T12:17:28.341Z' - currency: USD - customerInfo: - customerId: beQeANXJNsd0xcINsB6cSrobQa - customerName: Stephanie Miller - email: shopper@salesforce-test.com - customerName: Stephanie Miller - exportStatus: not_exported - groupedTaxItems: - - taxRate: 0.05 - taxValue: 30.8 - guest: true - giftCertificateItems: - - amount: 1 - giftCertificateItemId: 540db3ffe58bfb04ab673757d7 - recipientEmail: miller@salesforce-test.com - shipmentId: me - lastModified: '2019-10-22T12:17:28.376Z' - merchandizeTotalTax: 30 - orderNo: '00000410' - orderPriceAdjustments: - - appliedDiscount: - amount: 10 - type: amount - reasonCode: customer service - createdBy: support - creationDate: '2019-10-22T12:17:28.347Z' - custom: true - lastModified: '2019-10-22T12:17:28.349Z' - manual: true - price: -10 - priceAdjustmentId: 63b9eb9b4a92bd3e5c6ee804c2 - promotionId: 5ties - orderToken: 7gJDIFlnho_mXrxfxVB9Neic3J7szzR9glvgU5Ath-I - orderTotal: 586.76 - orderViewCode: YGXrGbZWlr29tIsGnYgR5o_8OxBMXWigevx1WD0X1Hc - paymentInstruments: - - amount: 20 - paymentInstrumentId: ca47e0da3d49b067b630db624a - paymentMethodId: PAYPAL - paymentReference: - paymentReferenceId: PAY-1AB23456CD789012EF34GHIJ - redirectUrl: https://www.paypal.com/checkoutnow?token=EC-1AB23456CD789012EF - - amount: 566.76 - paymentCard: - cardType: Visa - creditCardExpired: false - paymentInstrumentId: 6b970a04ca8a468a64b9936764 - paymentMethodId: CREDIT_CARD - paymentReference: - paymentReferenceId: 8815749596351791C - redirectUrl: https://test.adyen.com/hpp/pay.shtml?merchantReference=12345 - - amount: 2 - paymentCard: - expirationYear: 1990 - expirationMonth: 7 - validFromMonth: 8 - validFromYear: 2007 - issueNumber: i117 - maskedNumber: '******4567' - holder: Miller - cardType: Visa - paymentInstrumentId: 9f21f0b51f206fbde2ff5789e5 - paymentMethodId: CREDIT_CARD - paymentReference: - paymentReferenceId: pi_1J4K5L2eZvKYlo2CyZ8K5L6M - clientSecret: pi_1J4K5L2eZvKYlo2CyZ8K5L6M_secret_abcdef123456 - paymentStatus: not_paid - productItems: - - adjustedTax: 30 - basePrice: 199.99 - bonusProductLineItem: false - gift: false - itemId: d9516eecc64bd90b0022714d26 - itemText: Green Umbrella - Sustained Edition - optionItems: - - adjustedTax: 0 - basePrice: 0 - bonusProductLineItem: false - gift: false - itemId: 8991e8d7adf0f46ffbc584e175 - itemText: 'Monogramming: Letter "A"' - optionId: textMonogramLetters - optionValueId: A - price: 0 - priceAfterItemDiscount: 0 - priceAfterOrderDiscount: 0 - productId: '701643632930' - productName: Flat Front Pant - shipmentId: me - tax: 0 - taxBasis: 0 - taxRate: 0.05 - priceAfterItemDiscount: 199.99 - priceAfterOrderDiscount: 199.99 - productId: '701643632930' - productName: Green Umbrella - Sustained Edition - quantity: 1 - shipmentId: me - tax: 30 - taxBasis: 199.99 - taxRate: 0.05 - productSubTotal: 199.99 - productTotal: 199.99 - shipments: - - adjustedMerchandizeTotalTax: 30 - adjustedShippingTotalTax: 0.8 - gift: false - merchandizeTotalTax: 199.99 - productSubTotal: 199.99 - productTotal: 199.99 - shipmentId: me - shipmentNo: '00000001' - shipmentTotal: 386.75 - shippingAddress: - address1: 104 Presidential Way - city: Woburn - countryCode: US - firstName: Stephanie - fullName: Stephanie Miller - id: 5f695b6f4bb63cb686483d65a0 - lastName: Miller - postalCode: '01801' - stateCode: MA - shippingMethod: - description: Order within the next 3 hours to get it tomorrow morning - id: EXPRESS - name: Express - price: 15.99 - shippingPromotions: - - calloutMsg: Free shipping amount has been reduced! - promotionId: freeshipping_level1 - promotionName: Free shipping Level 1 - shippingStatus: not_shipped - shippingTotal: 15.99 - shippingTotalTax: 0.8 - taxTotal: 30.8 - shippingItems: - - adjustedTax: 0.8 - basePrice: 15.99 - itemId: 768abee75aa8015239a9696c7e - itemText: Shipping - priceAfterItemDiscount: 15.99 - shipmentId: me - tax: 0.8 - taxBasis: 15.99 - taxRate: 0.05 - shippingStatus: not_shipped - shippingTotal: 15.99 - shippingTotalTax: 0.8 - status: new - taxation: net - taxTotal: 30.8 PaymentMethodsGet: value: applicablePaymentMethods: diff --git a/apis/shopper-products-oas-1.1.0/exchange.json b/apis/shopper-products-oas-1.0.37/exchange.json similarity index 93% rename from apis/shopper-products-oas-1.1.0/exchange.json rename to apis/shopper-products-oas-1.0.37/exchange.json index 7e04f26a..d9b6d1a7 100644 --- a/apis/shopper-products-oas-1.1.0/exchange.json +++ b/apis/shopper-products-oas-1.0.37/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Products OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-products-oas", - "version": "1.1.0", + "version": "1.0.37", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml b/apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml similarity index 95% rename from apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml rename to apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml index f03e8f4d..d9ef9751 100644 --- a/apis/shopper-products-oas-1.1.0/shopper-products-oas-v1-public.yaml +++ b/apis/shopper-products-oas-1.0.37/shopper-products-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Product title: Shopper Products - version: 1.1.0 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-products/shopper-products-oas-v1-public.yaml) - # API Overview The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API. @@ -66,6 +62,10 @@ info: For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html) + ### Test Description Changes + + uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew + ## Resources ### Product @@ -105,7 +105,7 @@ paths: parameters: - $ref: '#/components/parameters/organizationId' get: - description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, images, price, bundled_products, set_products, recommendations, product options, variations, shipping_methods, and promotions for the products are included, as applicable. + description: Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable. operationId: getProducts summary: Returns product details for multiple products. security: @@ -146,7 +146,7 @@ paths: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/id' get: - description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommendations, product options, variations, shipping_methods, and promotions for the products are included, as applicable. + description: Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable. operationId: getProduct summary: Returns product details for a single product. security: @@ -577,13 +577,6 @@ components: type: object additionalProperties: type: string - shippingMethods: - description: |- - The array of applicable shipping methods for this product. This array can be empty. - This property is only returned in context of the 'shipping_methods' expansion. - type: array - items: - $ref: '#/components/schemas/ShippingMethod' required: - id type: object @@ -1073,72 +1066,6 @@ components: - productId - variationValues type: object - ShippingPromotion: - description: Document representing a shipping promotion. - properties: - calloutMsg: - description: The localized callout message of the promotion. - example: $30 Fixed Shipping Amount Above 150 - type: string - promotionId: - description: The unique ID of the promotion. - example: $30FixedShippingAmountAbove150 - type: string - promotionName: - description: The localized promotion name. - example: $30 Fixed Shipping Amount Above 150 - type: string - type: object - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - ShippingMethod: - description: Document representing a shipping method. - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId - properties: - description: - description: The localized description of the shipping method. - example: Order received within 7-10 business days - type: string - externalShippingMethod: - description: The external shipping method. - type: string - id: - maxLength: 256 - description: The shipping method ID. - example: '001' - type: string - name: - description: The localized name of the shipping method. - example: Ground - type: string - price: - format: double - description: |- - The shipping cost total, including shipment level costs, - product level fix, and surcharge costs. It is read only. - example: 15 - type: number - shippingPromotions: - description: |- - The array of active customer shipping promotions for this shipping - method. This array can be empty. - type: array - items: - $ref: '#/components/schemas/ShippingPromotion' - type: object - required: - - id ProductResult: description: Result document containing an array of products. properties: @@ -1218,7 +1145,7 @@ components: Total: default: 0 minimum: 0 - format: int32 + format: int64 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -1367,16 +1294,13 @@ components: enum: - none - availability - - bundled_products - links - promotions - options - images - prices - variations - - set_products - recommendations - - shipping_methods - page_meta_tags example: promotions allImages: @@ -1461,7 +1385,6 @@ components: - variations - set_products - recommendations - - shipping_methods - page_meta_tags example: links parameters-ids: @@ -1811,7 +1734,7 @@ components: 401unauthorized: description: Your access token is invalid or expired and can’t be used to identify a user. content: - application/problem+json: + application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: diff --git a/apis/shopper-promotions-oas-1.0.37/exchange.json b/apis/shopper-promotions-oas-1.0.36/exchange.json similarity index 93% rename from apis/shopper-promotions-oas-1.0.37/exchange.json rename to apis/shopper-promotions-oas-1.0.36/exchange.json index ded3324d..103c14cb 100644 --- a/apis/shopper-promotions-oas-1.0.37/exchange.json +++ b/apis/shopper-promotions-oas-1.0.36/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Promotions OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-promotions-oas", - "version": "1.0.37", + "version": "1.0.36", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml b/apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml similarity index 98% rename from apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml rename to apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml index 89bece49..0817962d 100644 --- a/apis/shopper-promotions-oas-1.0.37/shopper-promotions-oas-v1-public.yaml +++ b/apis/shopper-promotions-oas-1.0.36/shopper-promotions-oas-v1-public.yaml @@ -1,10 +1,9 @@ openapi: 3.0.3 info: title: Shopper Promotions - version: 1.0.37 + version: v1 description: |- # API Overview - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml) Retrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign. @@ -183,7 +182,7 @@ components: Total: default: 0 minimum: 0 - format: int32 + format: int64 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 diff --git a/apis/shopper-search-oas-1.5.1/exchange.json b/apis/shopper-search-oas-1.3.0/exchange.json similarity index 93% rename from apis/shopper-search-oas-1.5.1/exchange.json rename to apis/shopper-search-oas-1.3.0/exchange.json index 2b81959e..1b4b8ea8 100644 --- a/apis/shopper-search-oas-1.5.1/exchange.json +++ b/apis/shopper-search-oas-1.3.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Search OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-search-oas", - "version": "1.5.1", + "version": "1.3.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml b/apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml similarity index 80% rename from apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml rename to apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml index 0758dc3e..6df2cf3f 100644 --- a/apis/shopper-search-oas-1.5.1/shopper-search-oas-v1-public.yaml +++ b/apis/shopper-search-oas-1.3.0/shopper-search-oas-v1-public.yaml @@ -1,8 +1,8 @@ openapi: 3.0.3 info: title: Shopper Search - version: 1.5.1 - description: "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- **`pmid`**: Specifies the promotion ID to filter by\n- **`pmpt`**: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Example Usage:**\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." + version: 1.3.0 + description: "# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- **`pmid`**: Specifies the promotion ID to filter by\n- **`pmpt`**: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Example Usage:**\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1 variables: @@ -16,7 +16,7 @@ paths: operationId: productSearch parameters: - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/productSearchSelect' + - $ref: '#/components/parameters/select' - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/qProductSearch' - $ref: '#/components/parameters/refine' @@ -58,8 +58,6 @@ paths: $ref: '#/components/examples/ProductSearchResultExample' ProductSearchWithPromotionFilterExample: $ref: '#/components/examples/ProductSearchWithPromotionFilterExample' - ProductSearchResultWithCustomVariationPropertiesExample: - $ref: '#/components/examples/ProductSearchResultWithCustomVariationPropertiesExample' '400': description: Bad Request. content: @@ -69,8 +67,6 @@ paths: examples: MalformedSelectorGetProductsSearchForSelect: $ref: '#/components/examples/MalformedSelectorGetProductsSearchForSelect' - TooManyCustomVariationAttributes: - $ref: '#/components/examples/TooManyCustomVariationAttributes' security: - ShopperToken: - sfcc.shopper-product-search @@ -99,8 +95,6 @@ paths: examples: SearchSuggestionResultExample: $ref: '#/components/examples/SearchSuggestionResultExample' - SearchSuggestionResultWithCustomProductPropertiesExample: - $ref: '#/components/examples/SearchSuggestionResultWithCustomProductPropertiesExample' '400': description: Thrown when a query parameter or its value is unknown, or when a maximum or minimum constraint is violated. content: @@ -110,10 +104,6 @@ paths: examples: StringConstraintViolation: $ref: '#/components/examples/StringConstraintViolation' - TooManyCustomProductAttributes: - $ref: '#/components/examples/TooManyCustomProductAttributes' - InvalidExpandParameter: - $ref: '#/components/examples/InvalidExpandParameter' security: - ShopperToken: - sfcc.shopper-product-search @@ -141,7 +131,7 @@ components: maxLength: 32 Select: minLength: 1 - description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html). + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. example: (name,id,variationAttributes.(**)) type: string pattern: ^[(].*[)]$ @@ -207,7 +197,7 @@ components: Total: default: 0 minimum: 0 - format: int32 + format: int64 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -227,7 +217,7 @@ components: Offset: default: 0 minimum: 0 - format: int32 + format: int64 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 @@ -499,13 +489,6 @@ components: required: - productId type: object - additionalProperties: - title: Additional Property Support - description: |- - This type supports additional properties passed along with the defined properties of this API. - To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. - The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix. - example: c_trackingId VariationGroup: description: Representation of a group of variant products by an attribute. This can't be purchased by a shopper. It provides inheritable attributes for its product variants and is used for navigation. A VariationGroup doesn't have a SKU. properties: @@ -1099,10 +1082,13 @@ components: example: f_ecom_zzxy_prd schema: $ref: '#/components/schemas/OrganizationId' - productSearchSelect: + select: + description: The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. name: select - example: (hits.(**), refinements, sortingOptions.(id)) in: query + examples: + select: + value: (**) schema: $ref: '#/components/schemas/Select' siteId: @@ -1128,7 +1114,7 @@ components: refine: name: refine in: query - description: "Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='.
\nMultiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \\\"|\\\"), for example: refine=c_refinementColor=red|green|blue.
\nValue ranges can be specified like this: refine=price=(100..500).
\nMultiple refine parameters can be provided by using the refine as the key, for example: refine=price=(0..10)&refine=c_refinementColor=green.
\nThe refinements can be a collection of custom defined attributes IDs and the system defined attributes IDs but the search can only accept a total of 9 refinements at a time.
\n\nThe following system refinement attribute ids are supported:
\n`cgid`: Allows refinement per single category ID. Multiple category ids are not supported. \n`price`: Allows refinement per single price range. Multiple price ranges are not supported. \n`htype`: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
\n`orderable_only`: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
\n`ilids`: Allows refining by inventory list IDs. Supports up to 10 inventory list IDs per request.
\n`pmid`: Allows refinement on the supplied promotion ID(s). When used with `pmpt`, filters products by their role in the promotion.
\n`pmpt`: Allows refinement per promotion product type. Must be used with `pmid` to filter products by their role in the promotion. Valid values are:\n - `all`: Returns all products related to the promotion (default)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion\n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Note:** To refine a search using multiple promotion filters—for example, to find products in both the spring and summer campaigns—see [Refining by Multiple Promotions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-promotions-for-developers.html#refining-by-multiple-promotions)." + description: "Parameter that represents a refinement attribute or values pair. Refinement attribute ID and values are separated by '='. Multiple values are supported by a subset of refinement attributes and can be provided by separating them using a pipe (URL encoded = \\\"|\\\") i.e. refine=c_refinementColor=red|green|blue. Value ranges can be specified like this: refine=price=(100..500) . \nMultiple refine parameters can be provided by using the refine as the key i.e refine=price=(0..10)&refine=c_refinementColor=green. The refinements can be a collection of custom defined attributes IDs \nand the system defined attributes IDs but the search can only accept a total of 9 refinements at a time. \n\nThe following system refinement attribute ids are supported:
\n`cgid`: Allows refinement per single category ID. Multiple category ids are not supported. \n`price`: Allows refinement per single price range. Multiple price ranges are not supported. \n`htype`: Allow refinement by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
\n`orderable_only`: Unavailable products are excluded from the search results if true is set. Multiple refinement values are not supported.
\n`ilids`: Allows refining by inventory list IDs. Supports up to 10 inventory list IDs per request.
\n`pmid`: Allows refinement on the supplied promotion ID(s). When used with `pmpt`, filters products by their role in the promotion.
\n`pmpt`: Allows refinement per promotion product type. Must be used with `pmid` to filter products by their role in the promotion. Valid values are:\n - `all`: Returns all products related to the promotion (default)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion\n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Note:** To refine a search using multiple promotion filters—for example, to find products in both the spring and summer campaigns—see [Refining by Multiple Promotions](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-promotions-for-developers.html#refining-by-multiple-promotions)." required: false style: form explode: true @@ -1168,7 +1154,7 @@ components: expandProductSearch: name: expand in: query - description: "A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`. \nBy default, the expand parameter includes `availability, images, prices, represented_products, variations`. \nUse none to disable all expand options." + description: "A comma-separated list with allowed values - `availability`, `images`, `prices`, `represented_products`, `variations`, `promotions`, `custom_properties`. \nBy default, the expand parameter includes `availability, images, prices, represented_products, variations`. \nUse none to disable all expand options. \n**The page_meta_tags expand value is optional and is available B2C Commerce version 25.2.**\"" required: false schema: items: @@ -1591,63 +1577,12 @@ components: label: Top Sellers offset: 0 total: 1 - ProductSearchResultWithCustomVariationPropertiesExample: - summary: Product search result demonstrating custom variation properties on product variants. - value: - limit: 1 - hits: - - hitType: master - productId: portable-media-player - productName: Portable Media Player - productType: - master: true - representedProduct: - id: media-player-purple-8gb - variants: - - productId: media-player-silver-8gb - variationValues: - color: Silver - memorySize: 8 GB - c_badges: - - Popular - c_mediaFormat: - - '0020' - - '0050' - c_musicStorage: 2,000 songs - - productId: media-player-purple-8gb - variationValues: - color: Purple - memorySize: 8 GB - c_badges: - - Best Seller - c_mediaFormat: - - '0010' - - '0020' - - '0030' - c_musicStorage: 2,000 songs - query: media player purple - refinements: [] - searchPhraseSuggestions: - suggestedPhrases: [] - suggestedTerms: [] - sortingOptions: - - id: best-matches - label: Best Matches - offset: 0 - total: 1 MalformedSelectorGetProductsSearchForSelect: value: title: Malformed Selector type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-selector detail: The property selector '(hits.(currency, hitType,image.(**))' is malformed. selector: (hits.(currency, hitType,image.(**)) - TooManyCustomVariationAttributes: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request - detail: '''includedCustomVariationProperties'' violates the value constraint. The expected value is between ''(0..5)''.' - parameter: includedCustomVariationProperties - expected: (0..5) SearchSuggestionResultExample: value: brandSuggestions: @@ -1712,49 +1647,6 @@ components: - exactMatch: false phrase: sony alpha 900 body searchPhrase: son - SearchSuggestionResultWithCustomProductPropertiesExample: - summary: Search suggestions with custom product properties. - value: - brandSuggestions: - suggestedPhrases: - - exactMatch: false - phrase: Media Player - suggestedTerms: - - originalTerm: player - terms: - - completed: true - corrected: false - exactMatch: false - value: media - categorySuggestions: - suggestedTerms: - - originalTerm: player - productSuggestions: - products: - - currency: USD - price: 229 - productId: portable-media-player - productName: Portable Media Player - c_badges: [] - c_mediaFormat: - - '0020' - - '0030' - c_musicStorage: 1,000 songs - suggestedPhrases: - - exactMatch: false - phrase: media player - suggestedTerms: - - originalTerm: player - terms: - - completed: true - corrected: false - exactMatch: true - value: player - - completed: true - corrected: false - exactMatch: false - value: media player - searchPhrase: player StringConstraintViolation: value: title: String Constraint Violation @@ -1762,16 +1654,3 @@ components: detail: The string length constraint was violated by 'q'. The expected length is '(3..50)'. expected: (3..50) parameter: q - TooManyCustomProductAttributes: - value: - title: Bad Request - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request - detail: '''includedCustomProductProperties'' violates the value constraint. The expected value is between ''(0..5)''.' - parameter: includedCustomProductProperties - expected: (0..5) - InvalidExpandParameter: - value: - title: Invalid Expand Parameter - type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-expand-parameter - detail: An invalid expand parameter 'invalidParameter' was found. - param: invalidParameter diff --git a/apis/shopper-seo-oas-1.0.14/exchange.json b/apis/shopper-seo-oas-1.0.13/exchange.json similarity index 93% rename from apis/shopper-seo-oas-1.0.14/exchange.json rename to apis/shopper-seo-oas-1.0.13/exchange.json index 737fcf8f..f6d65871 100644 --- a/apis/shopper-seo-oas-1.0.14/exchange.json +++ b/apis/shopper-seo-oas-1.0.13/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Seo OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-seo-oas", - "version": "1.0.14", + "version": "1.0.13", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml b/apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml similarity index 99% rename from apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml rename to apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml index 29f29fdf..d0c4d0a3 100644 --- a/apis/shopper-seo-oas-1.0.14/shopper-seo-oas-v1-public.yaml +++ b/apis/shopper-seo-oas-1.0.13/shopper-seo-oas-v1-public.yaml @@ -1,10 +1,8 @@ openapi: 3.0.3 info: title: Shopper SEO - version: 1.0.14 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-seo/shopper-seo-oas-v1-public.yaml) - # API Overview The Shopper SEO API Provides access to SEO-related information, such as URL mapping information. diff --git a/apis/shopper-stores-oas-1.0.18/exchange.json b/apis/shopper-stores-oas-1.0.17/exchange.json similarity index 93% rename from apis/shopper-stores-oas-1.0.18/exchange.json rename to apis/shopper-stores-oas-1.0.17/exchange.json index 44ff03fb..dd70dc9f 100644 --- a/apis/shopper-stores-oas-1.0.18/exchange.json +++ b/apis/shopper-stores-oas-1.0.17/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Stores OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-stores-oas", - "version": "1.0.18", + "version": "1.0.17", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml b/apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml similarity index 98% rename from apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml rename to apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml index f64afdb4..538899a6 100644 --- a/apis/shopper-stores-oas-1.0.18/shopper-stores-oas-v1-public.yaml +++ b/apis/shopper-stores-oas-1.0.17/shopper-stores-oas-v1-public.yaml @@ -1,12 +1,8 @@ openapi: 3.0.3 info: - x-api-type: Shopper - x-api-family: Store title: Shopper Stores - version: 1.0.18 + version: v1 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-stores/shopper-stores-oas-v1-public.yaml) - # API Overview Provides access to stores via search or ID lookup. @@ -177,7 +173,7 @@ components: Total: default: 0 minimum: 0 - format: int32 + format: int64 description: The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated. type: integer example: 10 @@ -351,7 +347,7 @@ components: Offset: default: 0 minimum: 0 - format: int32 + format: int64 description: The zero-based index of the first hit/data to include in the result. type: integer example: 0 From becdb82b8fc2b43de97c73d42770b17a5bfb40f4 Mon Sep 17 00:00:00 2001 From: kbode Date: Thu, 30 Oct 2025 14:22:18 +0100 Subject: [PATCH 06/19] W-18557453 improve error handling + remove transient dependency causing warnings --- package.json | 1 - scripts/download-apis.ts | 17 ++- scripts/updateApis.ts | 39 ++--- yarn.lock | 310 ++++++++++++++++++++++++++++++--------- 4 files changed, 266 insertions(+), 101 deletions(-) diff --git a/package.json b/package.json index ccd75394..a65496f4 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,6 @@ "resolutions": { "**/@npmcli/fs": "<1.1.0", "**/@oclif/command": "<=1.8.3", - "**/@oclif/core": "<=0.5.9", "**/isbot": "<=3.0.27", "**/yargs": "<17", "depcheck/@babel/parser": "7.16.4" diff --git a/scripts/download-apis.ts b/scripts/download-apis.ts index 5615fd63..cbc27a9b 100644 --- a/scripts/download-apis.ts +++ b/scripts/download-apis.ts @@ -38,11 +38,18 @@ export async function downloadApisWithAnypointCli( // Execute the command console.log(`Downloading API ${apiId} using anypoint-cli...`); - execSync(cmd, { - stdio: 'inherit', - cwd: process.cwd(), - env: process.env, - }); + + try { + execSync(cmd, { + stdio: 'inherit', + cwd: process.cwd(), + env: process.env, + }); + } catch (error) { + throw new Error( + `Failed to download API ${apiId}: potential reasons: api or version does not exist, wrong credentials, wrong organization ID` + ); + } // Find the downloaded zip file const files = await fs.readdir(tempDir); diff --git a/scripts/updateApis.ts b/scripts/updateApis.ts index 00ac9d44..ae30ed65 100644 --- a/scripts/updateApis.ts +++ b/scripts/updateApis.ts @@ -72,26 +72,19 @@ async function updateApis(): Promise { const apiId = `${ORG_ID}/${baseApiName}/${version}`; console.log(`Processing API: ${apiId}`); - try { - // Only use the base semantic version without SNAPSHOT or branch build suffixes 1.2.0-master-b70 = 1.2.0 - const versionWithoutSuffix = version.includes('-') - ? version.substring(0, version.indexOf('-')) - : version; - - const apiFolderName = `${baseApiName}-${versionWithoutSuffix}`; - await downloadApisWithAnypointCli( - apiId, - path.join(PRODUCTION_API_PATH, apiFolderName), - ORG_ID - ); - console.log(`Successfully updated ${apiName} to version ${version}`); - } catch (error) { - console.error( - `Error updating ${apiName} (${version}):`, - error instanceof Error ? error.message : String(error) - ); - // Continue with other APIs even if one fails - } + // Only use the base semantic version without SNAPSHOT or branch build suffixes 1.2.0-master-b70 = 1.2.0 + const versionWithoutSuffix = version.includes('-') + ? version.substring(0, version.indexOf('-')) + : version; + + const apiFolderName = `${baseApiName}-${versionWithoutSuffix}`; + // throws error if download fails + await downloadApisWithAnypointCli( + apiId, + path.join(PRODUCTION_API_PATH, apiFolderName), + ORG_ID + ); + console.log(`Successfully updated ${apiName} to version ${version}`); }, Promise.resolve()); console.log('API update process completed successfully'); @@ -102,10 +95,8 @@ async function updateApis(): Promise { ); // Restore from backup if something went wrong - if (fs.existsSync(OLD_APIS_PATH) && !fs.existsSync(PRODUCTION_API_PATH)) { - console.log('Restoring APIs from backup...'); - await fs.move(OLD_APIS_PATH, PRODUCTION_API_PATH, {overwrite: true}); - } + console.log('Restoring APIs from backup...'); + await fs.move(OLD_APIS_PATH, PRODUCTION_API_PATH, {overwrite: true}); process.exit(1); } diff --git a/yarn.lock b/yarn.lock index 604c5c53..a3eec56f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2546,6 +2546,13 @@ "@comunica/context-entries" "^1.22.0" asynciterator "^3.2.0" +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -2886,6 +2893,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9": version "0.3.14" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" @@ -3093,27 +3108,106 @@ is-wsl "^2.1.1" tslib "^2.3.1" -"@oclif/core@1.26.1", "@oclif/core@1.26.2", "@oclif/core@<=0.5.9", "@oclif/core@^1.1.1", "@oclif/core@^1.3.6", "@oclif/core@^2.15.0", "@oclif/core@^2.8.2": - version "0.5.9" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-0.5.9.tgz#258a97854a456fb8167a05f13e7f9933877c406d" - integrity sha512-zlv7d9pdvEyDqqVWPYSq3YPZ93/kuJTqPRkAf874i/sxbcChQFZMa2750dLeikDwmr38U2GBOKYq8ER/k4gN1w== +"@oclif/core@1.26.1": + version "1.26.1" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.26.1.tgz#26e46c96143d3e2b1dd9bd558ae1653fe9a4f3fa" + integrity sha512-g+OWJcM7JOVI53caTEtq0BB1nPotWctRLUyFODPgvDqXhVR7QED+Qz3LwFAMD8dt7/Ar2ZNq15U3bnpnOv453A== dependencies: "@oclif/linewrap" "^1.0.0" - chalk "^4.1.0" - clean-stack "^3.0.0" - cli-ux "^5.1.0" - debug "^4.1.1" - fs-extra "^9.0.1" + "@oclif/screen" "^3.0.4" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.10.0" + debug "^4.3.4" + ejs "^3.1.6" + fs-extra "^9.1.0" get-package-type "^0.1.0" - globby "^11.0.1" + globby "^11.1.0" + hyperlinker "^1.0.0" indent-string "^4.0.0" - is-wsl "^2.1.1" - lodash.template "^4.4.0" - semver "^7.3.2" - string-width "^4.2.0" - strip-ansi "^6.0.0" - tslib "^2.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + semver "^7.3.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + tslib "^2.4.1" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + +"@oclif/core@1.26.2", "@oclif/core@^1.1.1", "@oclif/core@^1.3.6": + version "1.26.2" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.26.2.tgz#763c68dc91388225acd6f0819c90f93e5d8cde41" + integrity sha512-6jYuZgXvHfOIc9GIaS4T3CIKGTjPmfAxuMcbCbMRKJJl4aq/4xeRlEz0E8/hz8HxvxZBGvN2GwAUHlrGWQVrVw== + dependencies: + "@oclif/linewrap" "^1.0.0" + "@oclif/screen" "^3.0.4" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.10.0" + debug "^4.3.4" + ejs "^3.1.6" + fs-extra "^9.1.0" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + semver "^7.3.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + tslib "^2.4.1" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + +"@oclif/core@^2.15.0", "@oclif/core@^2.8.2": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.16.0.tgz#e6f3c6c359d4313a15403d8652bbdd0e99ce4b3a" + integrity sha512-dL6atBH0zCZl1A1IXCKJgLPrM/wR7K+Wi401E/IvqsK8m2iCHW+0TEOGrans/cuN3oTW+uxIyJFHJ8Im0k4qBw== + dependencies: + "@types/cli-progress" "^3.11.0" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.8" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + ts-node "^10.9.1" + tslib "^2.5.0" widest-line "^3.1.0" + wordwrap "^1.0.0" wrap-ansi "^7.0.0" "@oclif/errors@1.3.5", "@oclif/errors@^1.3.3", "@oclif/errors@^1.3.5": @@ -3237,10 +3331,10 @@ dependencies: "@oclif/core" "^2.15.0" -"@oclif/screen@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493" - integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw== +"@oclif/screen@^3.0.4": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-3.0.8.tgz#f746549c3ae52fdb7794dfc244dfba98ebca37f2" + integrity sha512-yx6KAqlt3TAHBduS2fMQtJDL2ufIHnDRArrJEOoTTuizxqmjLT+psGYOHpmMl3gvQpFJ11Hs76guUUktzAF9Bg== "@openapitools/openapi-generator-cli@^2.20.0": version "2.20.0" @@ -3575,6 +3669,26 @@ resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@types/adm-zip@^0.5.0": version "0.5.7" resolved "https://registry.yarnpkg.com/@types/adm-zip/-/adm-zip-0.5.7.tgz#eec10b6f717d3948beb64aca0abebc4b344ac7e9" @@ -3620,6 +3734,13 @@ dependencies: "@babel/types" "^7.3.0" +"@types/cli-progress@^3.11.0": + version "3.11.6" + resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.6.tgz#94b334ebe4190f710e51c1bf9b4fedb681fa9e45" + integrity sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA== + dependencies: + "@types/node" "*" + "@types/clone@^2.1.1": version "2.1.4" resolved "https://registry.yarnpkg.com/@types/clone/-/clone-2.1.4.tgz#9680f886c935dcf596273f1218abb71efb01531a" @@ -4396,6 +4517,13 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn-walk@^8.1.1: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -4406,6 +4534,11 @@ acorn@^7.1.0, acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.11.0, acorn@^8.4.1: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + acorn@^8.2.4, acorn@^8.5.0: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" @@ -4573,7 +4706,7 @@ ansi-escapes@^3.1.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -4607,7 +4740,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.0, ansi-styles@^4.2.1: +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.1, ansi-styles@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -5133,6 +5266,11 @@ async@^3.2.3: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== +async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + asynciterator@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/asynciterator/-/asynciterator-3.5.0.tgz#3932d27af1e6e82d986c02ff05d983d5e0683b55" @@ -6256,7 +6394,7 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clean-stack@^3.0.0: +clean-stack@^3.0.0, clean-stack@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-3.0.1.tgz#155bf0b2221bf5f4fba89528d24c5953f17fe3a8" integrity sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg== @@ -6275,10 +6413,10 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-progress@^3.4.0: - version "3.11.2" - resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.11.2.tgz#f8c89bd157e74f3f2c43bcfb3505670b4d48fc77" - integrity sha512-lCPoS6ncgX4+rJu5bS3F/iCz17kZ9MPZ6dpuTtI0KXKABkhyXIdYB3Inby1OpaGti3YlI3EeEkM9AuWpelJrVA== +cli-progress@^3.10.0, cli-progress@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.12.0.tgz#807ee14b66bcc086258e444ad0f19e7d42577942" + integrity sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A== dependencies: string-width "^4.2.3" @@ -6295,38 +6433,6 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" -cli-ux@^5.1.0: - version "5.6.7" - resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-5.6.7.tgz#32ef9e6cb2b457be834280cc799028a11c8235a8" - integrity sha512-dsKAurMNyFDnO6X1TiiRNiVbL90XReLKcvIq4H777NMqXGBxBws23ag8ubCJE97vVZEgWG2eSUhsyLf63Jv8+g== - dependencies: - "@oclif/command" "^1.8.15" - "@oclif/errors" "^1.3.5" - "@oclif/linewrap" "^1.0.0" - "@oclif/screen" "^1.0.4" - ansi-escapes "^4.3.0" - ansi-styles "^4.2.0" - cardinal "^2.1.1" - chalk "^4.1.0" - clean-stack "^3.0.0" - cli-progress "^3.4.0" - extract-stack "^2.0.0" - fs-extra "^8.1" - hyperlinker "^1.0.0" - indent-string "^4.0.0" - is-wsl "^2.2.0" - js-yaml "^3.13.1" - lodash "^4.17.21" - natural-orderby "^2.0.1" - object-treeify "^1.1.4" - password-prompt "^1.1.2" - semver "^7.3.2" - string-width "^4.2.0" - strip-ansi "^6.0.0" - supports-color "^8.1.0" - supports-hyperlinks "^2.1.0" - tslib "^2.0.0" - cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -7716,6 +7822,13 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== +ejs@^3.1.6, ejs@^3.1.8: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + electron-to-chromium@^1.3.564, electron-to-chromium@^1.4.188, electron-to-chromium@^1.4.84: version "1.4.191" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.191.tgz#01dd4bf32502a48ce24bf3890b5553a1c5f93539" @@ -8492,11 +8605,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-stack@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-2.0.0.tgz#11367bc865bfcd9bc0db3123e5edb57786f11f9b" - integrity sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ== - extract-zip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" @@ -8691,6 +8799,13 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + filesize@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" @@ -9279,7 +9394,7 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.3: +globby@^11.0.1, globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -10708,6 +10823,15 @@ iterare@1.2.1: resolved "https://registry.yarnpkg.com/iterare/-/iterare-1.2.1.tgz#139c400ff7363690e33abffa33cbba8920f00042" integrity sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q== +jake@^10.8.5: + version "10.9.4" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6" + integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA== + dependencies: + async "^3.2.6" + filelist "^1.0.4" + picocolors "^1.1.1" + jest-changed-files@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" @@ -11224,7 +11348,7 @@ jest@26.6.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.0: +js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -11709,7 +11833,7 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.template@^4.4.0, lodash.template@^4.5.0: +lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -12194,6 +12318,13 @@ minimatch@^3.0.0, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatc dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^8.0.2: version "8.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" @@ -12441,7 +12572,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -natural-orderby@^2.0.1: +natural-orderby@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/natural-orderby/-/natural-orderby-2.0.3.tgz#8623bc518ba162f8ff1cdb8941d74deb0fdcc016" integrity sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q== @@ -12820,7 +12951,7 @@ object-path@^0.11.8: resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.8.tgz#ed002c02bbdd0070b78a27455e8ae01fc14d4742" integrity sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA== -object-treeify@^1.1.4: +object-treeify@^1.1.33: version "1.1.33" resolved "https://registry.yarnpkg.com/object-treeify/-/object-treeify-1.1.33.tgz#f06fece986830a3cba78ddd32d4c11d1f76cdf40" integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== @@ -13396,6 +13527,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -16781,7 +16917,7 @@ supports-color@^8.0.0, supports-color@^8.1.0, supports-color@^8.1.1: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.1.0: +supports-hyperlinks@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== @@ -16789,6 +16925,14 @@ supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.1.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-hyperlinks@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" + integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -17201,6 +17345,25 @@ ts-node@9.1.1: source-map-support "^0.5.17" yn "3.1.1" +ts-node@^10.9.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + ts-pnp@1.2.0, ts-pnp@^1.1.6: version "1.2.0" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" @@ -17216,7 +17379,7 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.8.1, tslib@^2, tslib@^2.0.1, tslib@^2.4.1: +tslib@2.8.1, tslib@^2, tslib@^2.0.1, tslib@^2.4.1, tslib@^2.5.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -17713,6 +17876,11 @@ uuid@^9.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" From 5ab6e3b1e3a90251a82274ac63d0f0be6b28465c Mon Sep 17 00:00:00 2001 From: kbode Date: Mon, 3 Nov 2025 13:10:59 +0100 Subject: [PATCH 07/19] W-18557453fix environment missing issue --- scripts/updateApiVersions.ts | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts index c574bf41..0f6b8266 100644 --- a/scripts/updateApiVersions.ts +++ b/scripts/updateApiVersions.ts @@ -33,7 +33,7 @@ interface ExchangeAssetDescribeResponse { * Reads the API versions from the api-versions.txt file * @returns Array of { apiName, version } objects */ -function readApiVersions(): Array<{apiName: string; version: string}> { +export function readApiVersions(): Array<{apiName: string; version: string}> { if (!fs.existsSync(API_VERSIONS_FILE)) { throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); } @@ -52,7 +52,7 @@ function readApiVersions(): Array<{apiName: string; version: string}> { * Writes updated API versions back to the api-versions.txt file * @param apiVersions - Array of { apiName, version } objects */ -function writeApiVersions( +export function writeApiVersions( apiVersions: Array<{apiName: string; version: string}> ): void { const content = apiVersions @@ -67,7 +67,7 @@ function writeApiVersions( * @param version - Version string (e.g., '1.9.0', '2.1.0') * @returns Major version number */ -function getMajorVersion(version: string): number { +export function getMajorVersion(version: string): number { const match = /^(\d+)/.exec(version); return match ? parseInt(match[1], 10) : 0; } @@ -77,7 +77,7 @@ function getMajorVersion(version: string): number { * @param apiNameWithSuffix - API name with optional version suffix (e.g., 'shopper-baskets-oas-v1') * @returns Object with baseName and versionSuffix (e.g., {baseName: 'shopper-baskets-oas', versionSuffix: 'v1'}) */ -function parseApiName(apiNameWithSuffix: string): { +export function parseApiName(apiNameWithSuffix: string): { baseName: string; versionSuffix: string | null; } { @@ -98,11 +98,13 @@ function parseApiName(apiNameWithSuffix: string): { * Gets the latest version of an API from Anypoint Exchange for a specific major version * @param apiNameWithSuffix - The API name with version suffix (e.g., 'shopper-baskets-oas-v1') * @param currentVersion - The current version to compare against + * @param orgId * @returns The latest version string for the same major version */ -function getLatestVersion( +export function getLatestVersion( apiNameWithSuffix: string, - currentVersion: string + currentVersion: string, + orgId: string ): string | null { const username = process.env.ANYPOINT_USERNAME || ''; const password = process.env.ANYPOINT_PASSWORD || ''; @@ -113,7 +115,7 @@ function getLatestVersion( // Use current version to query the asset (any version works to get all versions) const assetId = `${ORG_ID}/${baseName}/${currentVersion}`; - const cmd = `anypoint-cli-v4 exchange:asset:describe ${assetId} -o json --username '${username}' --password '${password}'`; + const cmd = `anypoint-cli-v4 exchange:asset:describe ${assetId} -o json --username '${username}' --password '${password}' --organization=${orgId}`; try { console.log(`Checking latest version for ${apiNameWithSuffix}`); @@ -157,7 +159,7 @@ function getLatestVersion( /** * Main function to check and update API versions */ -function updateApiVersions(): void { +export function updateApiVersions(): void { // Check for required environment variables if (!process.env.ANYPOINT_USERNAME || !process.env.ANYPOINT_PASSWORD) { throw new Error( @@ -171,7 +173,7 @@ function updateApiVersions(): void { // Check each API for latest version const updatedVersions = apiVersions.map(({apiName, version}) => { - const latestVersion = getLatestVersion(apiName, version); + const latestVersion = getLatestVersion(apiName, version, ORG_ID); if (latestVersion && latestVersion !== version) { return { @@ -225,10 +227,12 @@ function updateApiVersions(): void { } } -// Execute the main function -try { - updateApiVersions(); -} catch (error) { - console.error('Unhandled error:', error); - process.exit(1); +// Execute the main function only if this file is run directly +if (require.main === module) { + try { + updateApiVersions(); + } catch (error) { + console.error('Unhandled error:', error); + process.exit(1); + } } From 38db9471599e2e19d2660c3750da79242482924c Mon Sep 17 00:00:00 2001 From: kbode Date: Mon, 3 Nov 2025 15:22:04 +0100 Subject: [PATCH 08/19] W-18557453 added unit test cases --- jest.config.js | 1 + scripts/download-apis.test.ts | 273 ++++++++++++++++++++ scripts/download-apis.ts | 2 +- scripts/updateApiVersions.test.ts | 407 +++++++++++++++++++++++++----- scripts/updateApiVersions.ts | 2 +- scripts/updateApis.ts | 2 +- scripts/utils.ts | 2 +- 7 files changed, 624 insertions(+), 65 deletions(-) create mode 100644 scripts/download-apis.test.ts diff --git a/jest.config.js b/jest.config.js index 14643b13..a42bcbeb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -13,6 +13,7 @@ module.exports = { '!scripts/generate.ts', '!scripts/generateFileList.ts', '!scripts/updateApis.ts', + '!scripts/utils.ts', '!scripts/generateVersionTable.ts', '!src/static/fileList.ts', '!/node_modules/', diff --git a/scripts/download-apis.test.ts b/scripts/download-apis.test.ts new file mode 100644 index 00000000..66f7b4f8 --- /dev/null +++ b/scripts/download-apis.test.ts @@ -0,0 +1,273 @@ +/* + * Copyright (c) 2025, Salesforce, Inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +import {execSync} from 'child_process'; +import fs from 'fs-extra'; +import path from 'path'; +import AdmZip from 'adm-zip'; +import {downloadApisWithAnypointCli} from './download-apis'; + +// Mock dependencies before importing the module +jest.mock('child_process'); +jest.mock('fs-extra'); +jest.mock('adm-zip'); + +const mockedExecSync = execSync as jest.MockedFunction; +const mockedFs = fs as jest.Mocked; +const MockedAdmZip = AdmZip as jest.MockedClass; + +describe('download-apis', () => { + const mockApiId = '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0'; + const mockTargetDir = '/path/to/target'; + const mockOrgId = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; + const mockTempDir = path.join(process.cwd(), 'temp', 'downloads'); + + beforeEach(() => { + jest.clearAllMocks(); + process.env.ANYPOINT_USERNAME = 'test-user'; + process.env.ANYPOINT_PASSWORD = 'test-pass'; + + // Mock console methods + jest.spyOn(console, 'log').mockImplementation(); + jest.spyOn(console, 'error').mockImplementation(); + + // Mock file system operations + mockedFs.readdir.mockResolvedValue(['api-asset.zip'] as any); + mockedFs.remove.mockResolvedValue(undefined as void); + + // Mock execSync + mockedExecSync.mockReturnValue(Buffer.from('')); + + // Mock AdmZip + const mockZipInstance = { + extractAllTo: jest.fn(), + } as unknown as AdmZip; + MockedAdmZip.mockImplementation(() => mockZipInstance); + }); + + afterEach(() => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + jest.restoreAllMocks(); + }); + + describe('downloadApisWithAnypointCli', () => { + it('should successfully download and extract API', async () => { + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + // Verify temp directory was created + expect(mockedFs.ensureDir).toHaveBeenCalledWith(mockTempDir); + + // Verify anypoint-cli command was executed + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining('anypoint-cli-v4 exchange:asset:download'), + expect.objectContaining({ + stdio: 'inherit', + cwd: process.cwd(), + env: process.env, + }) + ); + + // Verify command includes credentials and org ID + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--username 'test-user'"), + expect.any(Object) + ); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--password 'test-pass'"), + expect.any(Object) + ); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining(`--organization=${mockOrgId}`), + expect.any(Object) + ); + + // Verify zip file was read + expect(mockedFs.readdir).toHaveBeenCalledWith(mockTempDir); + + // Verify target directory was created + expect(mockedFs.ensureDir).toHaveBeenCalledWith(mockTargetDir); + + // Verify zip was extracted + expect(MockedAdmZip).toHaveBeenCalledWith( + path.join(mockTempDir, 'api-asset.zip') + ); + + // Verify temp directory was cleaned up + expect(mockedFs.remove).toHaveBeenCalledWith(mockTempDir); + + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Successfully downloaded and extracted') + ); + }); + + it('should handle empty credentials gracefully', async () => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--username ''"), + expect.any(Object) + ); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--password ''"), + expect.any(Object) + ); + }); + + it('should throw error when anypoint-cli command fails', async () => { + mockedExecSync.mockImplementation(() => { + throw new Error('Command execution failed'); + }); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + 'Failed to download API 893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0: potential reasons: api or version does not exist, wrong credentials, wrong organization ID' + ); + + // Verify temp directory was still created + expect(mockedFs.ensureDir).toHaveBeenCalledWith(mockTempDir); + }); + + it('should throw error when no zip file is found', async () => { + mockedFs.readdir.mockResolvedValue(['not-a-zip.txt', 'readme.md'] as any); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + `Failed to download API ${mockApiId}: No zip file found in ${mockTempDir}` + ); + }); + + it('should find zip file among multiple files', async () => { + mockedFs.readdir.mockResolvedValue([ + 'readme.md', + 'api-asset.zip', + 'other-file.txt', + ] as any); + + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + expect(MockedAdmZip).toHaveBeenCalledWith( + path.join(mockTempDir, 'api-asset.zip') + ); + }); + + it('should handle errors during zip extraction', async () => { + const mockZipInstance = { + extractAllTo: jest.fn(() => { + throw new Error('Extraction failed'); + }), + } as unknown as AdmZip; + MockedAdmZip.mockImplementation(() => mockZipInstance); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + 'Failed to download API 893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0: Extraction failed' + ); + }); + + it('should handle errors during cleanup', async () => { + mockedFs.remove.mockRejectedValueOnce(new Error('Cleanup failed')); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + 'Failed to download API 893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0: Cleanup failed' + ); + }); + + it('should handle non-Error exceptions from execSync', async () => { + mockedExecSync.mockImplementation(() => { + // eslint-disable-next-line no-throw-literal + throw 'String error'; + }); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + 'Failed to download API 893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0: potential reasons: api or version does not exist, wrong credentials, wrong organization ID' + ); + }); + + it('should handle non-Error exceptions from other operations', async () => { + mockedFs.readdir.mockImplementation(() => { + // eslint-disable-next-line no-throw-literal + throw 'Non-error exception'; + }); + + await expect( + downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) + ).rejects.toThrow( + `Failed to download API ${mockApiId}` + ); + }); + + it('should use correct temp directory path', async () => { + const expectedTempDir = path.join(process.cwd(), 'temp', 'downloads'); + + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + expect(mockedFs.ensureDir).toHaveBeenCalledWith(expectedTempDir); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining(expectedTempDir), + expect.any(Object) + ); + }); + + it('should pass correct parameters to anypoint-cli command', async () => { + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + const expectedCmd = `anypoint-cli-v4 exchange:asset:download ${mockApiId} ${mockTempDir} --username 'test-user' --password 'test-pass' --organization=${mockOrgId}`; + + expect(mockedExecSync).toHaveBeenCalledWith( + expectedCmd, + expect.objectContaining({ + stdio: 'inherit', + cwd: process.cwd(), + env: process.env, + }) + ); + }); + + it('should log download progress', async () => { + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + `Downloading API ${mockApiId} using anypoint-cli...` + ); + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Extracting api-asset.zip') + ); + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Successfully downloaded and extracted') + ); + }); + + it('should extract zip with overwrite flag', async () => { + const mockExtractAllTo = jest.fn(); + const mockZipInstance = { + extractAllTo: mockExtractAllTo, + } as unknown as AdmZip; + MockedAdmZip.mockImplementation(() => mockZipInstance); + + await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); + + expect(mockExtractAllTo).toHaveBeenCalledWith( + mockTargetDir, + true + ); + }); + }); +}); diff --git a/scripts/download-apis.ts b/scripts/download-apis.ts index cbc27a9b..637d895f 100644 --- a/scripts/download-apis.ts +++ b/scripts/download-apis.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, salesforce.com, inc. + * Copyright (c) 2025, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause diff --git a/scripts/updateApiVersions.test.ts b/scripts/updateApiVersions.test.ts index 1cc52e9a..d60f95a8 100644 --- a/scripts/updateApiVersions.test.ts +++ b/scripts/updateApiVersions.test.ts @@ -1,14 +1,22 @@ /* - * Copyright (c) 2023, Salesforce, Inc. + * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - import {execSync} from 'child_process'; import fs from 'fs-extra'; +import path from 'path'; +import { + readApiVersions, + writeApiVersions, + getMajorVersion, + parseApiName, + getLatestVersion, + updateApiVersions, +} from './updateApiVersions'; -// Mock dependencies +// Mock dependencies before importing the module jest.mock('child_process'); jest.mock('fs-extra'); jest.mock('dotenv', () => ({ @@ -17,18 +25,20 @@ jest.mock('dotenv', () => ({ const mockedExecSync = execSync as jest.MockedFunction; const mockedFs = fs as jest.Mocked; +const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; -describe('checkLatestVersions script', () => { +describe('updateApiVersions', () => { + const mockApiVersionsFile = path.join(__dirname, '../api-versions.txt'); const mockApiVersionsContent = `shopper-baskets-oas-v1=1.9.0 shopper-baskets-oas-v2=2.1.0 shopper-payments-oas-v1=1.1.0`; const mockExchangeResponseV1 = { versions: [ - {version: '1.9.5', status: 'published', createdDate: '2025-10-24'}, - {version: '1.9.0', status: 'published', createdDate: '2025-08-01'}, - {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, - {version: '2.0.0', status: 'published', createdDate: '2025-07-01'}, + {version: '1.9.5', createdDate: '2025-10-24'}, + {version: '1.9.0', createdDate: '2025-08-01'}, + {version: '2.1.0', createdDate: '2025-09-01'}, + {version: '2.0.0', createdDate: '2025-07-01'}, ], id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0', name: 'Shopper Baskets OAS', @@ -36,10 +46,10 @@ shopper-payments-oas-v1=1.1.0`; const mockExchangeResponseV2 = { versions: [ - {version: '2.2.0', status: 'published', createdDate: '2025-10-25'}, - {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, - {version: '1.9.5', status: 'published', createdDate: '2025-10-24'}, - {version: '1.9.0', status: 'published', createdDate: '2025-08-01'}, + {version: '2.2.0', createdDate: '2025-10-25'}, + {version: '2.1.0', createdDate: '2025-09-01'}, + {version: '1.9.5', createdDate: '2025-10-24'}, + {version: '1.9.0', createdDate: '2025-08-01'}, ], id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.1.0', name: 'Shopper Baskets OAS', @@ -54,78 +64,353 @@ shopper-payments-oas-v1=1.1.0`; mockedFs.existsSync.mockReturnValue(true); mockedFs.readFileSync.mockReturnValue(mockApiVersionsContent); mockedFs.writeFileSync.mockImplementation(() => undefined); + + // Mock console methods + jest.spyOn(console, 'log').mockImplementation(); + jest.spyOn(console, 'warn').mockImplementation(); + jest.spyOn(console, 'error').mockImplementation(); }); afterEach(() => { delete process.env.ANYPOINT_USERNAME; delete process.env.ANYPOINT_PASSWORD; + jest.restoreAllMocks(); }); - it('should read api-versions.txt correctly', () => { - mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); + describe('readApiVersions', () => { + it('should read and parse api-versions.txt correctly', () => { + const result = readApiVersions(); + + expect(mockedFs.existsSync).toHaveBeenCalledWith(mockApiVersionsFile); + expect(mockedFs.readFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + 'utf-8' + ); + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, + ]); + }); + + it('should filter out empty lines and comments', () => { + const contentWithComments = `# This is a comment +shopper-baskets-oas-v1=1.9.0 + +shopper-baskets-oas-v2=2.1.0 +# Another comment +shopper-payments-oas-v1=1.1.0 + +`; + mockedFs.readFileSync.mockReturnValue(contentWithComments); + + const result = readApiVersions(); - // The script will be executed when imported, so we need to test the functions - // For now, we verify the mocks are set up correctly - expect(mockedFs.existsSync).toBeDefined(); - expect(mockedFs.readFileSync).toBeDefined(); + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, + ]); + }); + + it('should throw error when file does not exist', () => { + mockedFs.existsSync.mockReturnValue(false); + + expect(() => readApiVersions()).toThrow( + `API versions file not found at: ${mockApiVersionsFile}` + ); + }); + + it('should handle whitespace around api names and versions', () => { + const contentWithWhitespace = `shopper-baskets-oas-v1 = 1.9.0 + shopper-baskets-oas-v2=2.1.0 `; + mockedFs.readFileSync.mockReturnValue(contentWithWhitespace); + + const result = readApiVersions(); + + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + ]); + }); }); - it('should parse JSON response from exchange:asset:describe', () => { - const jsonOutput = JSON.stringify(mockExchangeResponseV1); - mockedExecSync.mockReturnValue(jsonOutput); + describe('writeApiVersions', () => { + it('should write API versions to file correctly', () => { + const apiVersions = [ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.5'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.2.0'}, + ]; + + writeApiVersions(apiVersions); - const parsed = JSON.parse(jsonOutput) as typeof mockExchangeResponseV1; - expect(parsed.versions).toHaveLength(4); - expect(parsed.versions[0].version).toBe('1.9.5'); + expect(mockedFs.writeFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + 'shopper-baskets-oas-v1=1.9.5\nshopper-baskets-oas-v2=2.2.0\n', + 'utf-8' + ); + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + `Updated ${mockApiVersionsFile}` + ); + }); + + it('should handle empty array', () => { + writeApiVersions([]); + + expect(mockedFs.writeFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + '\n', + 'utf-8' + ); + }); + + it('should handle single API version', () => { + const apiVersions = [ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + ]; + + writeApiVersions(apiVersions); + + expect(mockedFs.writeFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + 'shopper-baskets-oas-v1=1.9.0\n', + 'utf-8' + ); + }); }); - it('should filter published versions by major version', () => { - // For v1 (major version 1), should only get 1.x versions - const v1Versions = mockExchangeResponseV1.versions.filter( - v => v.status === 'published' && v.version.startsWith('1.') - ); - expect(v1Versions).toHaveLength(2); - expect(v1Versions[0].version).toBe('1.9.5'); - - // For v2 (major version 2), should only get 2.x versions - const v2Versions = mockExchangeResponseV2.versions.filter( - v => v.status === 'published' && v.version.startsWith('2.') - ); - expect(v2Versions).toHaveLength(2); - expect(v2Versions[0].version).toBe('2.2.0'); + describe('getMajorVersion', () => { + it('should extract major version from version string', () => { + expect(getMajorVersion('1.9.0')).toBe(1); + expect(getMajorVersion('2.1.0')).toBe(2); + expect(getMajorVersion('10.5.3')).toBe(10); + expect(getMajorVersion('0.1.0')).toBe(0); + }); + + it('should handle version strings with different formats', () => { + expect(getMajorVersion('1.9')).toBe(1); + expect(getMajorVersion('2')).toBe(2); + expect(getMajorVersion('3.0.0-beta')).toBe(3); + }); + + it('should return 0 for invalid version strings', () => { + expect(getMajorVersion('invalid')).toBe(0); + expect(getMajorVersion('')).toBe(0); + expect(getMajorVersion('v1.0.0')).toBe(0); + }); }); - it('should parse API name with version suffix', () => { - const parseApiName = (name: string) => { - const match = /^(.+?)-(v\d+)$/.exec(name); - if (match) { - return {baseName: match[1], versionSuffix: match[2]}; - } - return {baseName: name, versionSuffix: null}; - }; + describe('parseApiName', () => { + it('should parse API name with version suffix correctly', () => { + expect(parseApiName('shopper-baskets-oas-v1')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: 'v1', + }); - expect(parseApiName('shopper-baskets-oas-v1')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: 'v1', + expect(parseApiName('shopper-baskets-oas-v2')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: 'v2', + }); + + expect(parseApiName('shopper-payments-oas-v1')).toEqual({ + baseName: 'shopper-payments-oas', + versionSuffix: 'v1', + }); + }); + + it('should handle API names with multiple hyphens', () => { + expect(parseApiName('shopper-customer-product-lists-v1')).toEqual({ + baseName: 'shopper-customer-product-lists', + versionSuffix: 'v1', + }); }); - expect(parseApiName('shopper-baskets-oas-v2')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: 'v2', + it('should handle API names without version suffix', () => { + expect(parseApiName('shopper-baskets-oas')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: null, + }); }); - expect(parseApiName('shopper-payments-oas-v1')).toEqual({ - baseName: 'shopper-payments-oas', - versionSuffix: 'v1', + it('should handle API names with double-digit version suffixes', () => { + expect(parseApiName('shopper-baskets-oas-v10')).toEqual({ + baseName: 'shopper-baskets-oas', + versionSuffix: 'v10', + }); }); }); - it('should throw error when environment variables are missing', () => { - delete process.env.ANYPOINT_USERNAME; - delete process.env.ANYPOINT_PASSWORD; + describe('getLatestVersion', () => { + it('should return latest version for the same major version', () => { + mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); + + const result = getLatestVersion( + 'shopper-baskets-oas-v1', + '1.9.0', + ORG_ID + ); + + expect(result).toBe('1.9.5'); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining('anypoint-cli-v4 exchange:asset:describe'), + expect.any(Object) + ); + }); + + it('should filter versions by major version correctly', () => { + mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV2)); + + const result = getLatestVersion( + 'shopper-baskets-oas-v2', + '2.1.0', + ORG_ID + ); + + expect(result).toBe('2.2.0'); + }); + + it('should return null when no versions found', () => { + const emptyResponse = { + versions: [], + id: 'test-id', + name: 'Test API', + }; + mockedExecSync.mockReturnValue(JSON.stringify(emptyResponse)); + + const result = getLatestVersion( + 'shopper-baskets-oas-v1', + '1.9.0', + ORG_ID + ); + + expect(result).toBeNull(); + // eslint-disable-next-line no-console + expect(console.warn).toHaveBeenCalledWith( + 'No versions found for shopper-baskets-oas-v1' + ); + }); + + it('should return null when no versions match major version', () => { + const responseWithDifferentMajor = { + versions: [ + {version: '2.0.0', status: 'published', createdDate: '2025-09-01'}, + {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, + ], + id: 'test-id', + name: 'Test API', + }; + mockedExecSync.mockReturnValue( + JSON.stringify(responseWithDifferentMajor) + ); + + const result = getLatestVersion( + 'shopper-baskets-oas-v1', + '1.9.0', + ORG_ID + ); + + expect(result).toBeNull(); + // eslint-disable-next-line no-console + expect(console.warn).toHaveBeenCalledWith( + 'No versions found for shopper-baskets-oas-v1 with major version 1' + ); + }); + + it('should handle execSync errors gracefully', () => { + mockedExecSync.mockImplementation(() => { + throw new Error('Command failed'); + }); + + const result = getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); - // This would be tested by running the script without env vars - expect(process.env.ANYPOINT_USERNAME).toBeUndefined(); - expect(process.env.ANYPOINT_PASSWORD).toBeUndefined(); + expect(result).toBeNull(); + // eslint-disable-next-line no-console + expect(console.error).toHaveBeenCalledWith( + 'Error fetching latest version for shopper-baskets-oas-v1:', + 'Command failed' + ); + }); + + it('should use credentials from environment variables', () => { + process.env.ANYPOINT_USERNAME = 'custom-user'; + process.env.ANYPOINT_PASSWORD = 'custom-pass'; + mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); + + getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); + + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--username 'custom-user'"), + expect.any(Object) + ); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--password 'custom-pass'"), + expect.any(Object) + ); + }); + + it('should handle missing credentials gracefully', () => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); + + getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); + + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--username ''"), + expect.any(Object) + ); + expect(mockedExecSync).toHaveBeenCalledWith( + expect.stringContaining("--password ''"), + expect.any(Object) + ); + }); + }); + + describe('updateApiVersions', () => { + it('should throw error when environment variables are missing', () => { + delete process.env.ANYPOINT_USERNAME; + delete process.env.ANYPOINT_PASSWORD; + + expect(() => updateApiVersions()).toThrow( + 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables are set.' + ); + }); + + it('should update API versions when newer versions are available', () => { + mockedExecSync + .mockReturnValueOnce(JSON.stringify(mockExchangeResponseV1)) // For v1 + .mockReturnValueOnce(JSON.stringify(mockExchangeResponseV2)) // For v2 + .mockReturnValueOnce( + JSON.stringify({ + versions: [ + { + version: '1.1.0', + status: 'published', + createdDate: '2025-08-01', + }, + ], + id: 'test-id', + name: 'Shopper Payments', + }) + ); // For payments + + updateApiVersions(); + + expect(mockedFs.writeFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + expect.stringContaining('shopper-baskets-oas-v1=1.9.5'), + 'utf-8' + ); + expect(mockedFs.writeFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + expect.stringContaining('shopper-baskets-oas-v2=2.2.0'), + 'utf-8' + ); + // eslint-disable-next-line no-console + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Found 2 update(s)') + ); + }); }); }); diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts index 0f6b8266..d24b14eb 100644 --- a/scripts/updateApiVersions.ts +++ b/scripts/updateApiVersions.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Salesforce, Inc. + * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause diff --git a/scripts/updateApis.ts b/scripts/updateApis.ts index ae30ed65..f75e1c5d 100644 --- a/scripts/updateApis.ts +++ b/scripts/updateApis.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Salesforce, Inc. + * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause diff --git a/scripts/utils.ts b/scripts/utils.ts index 28b79af3..48b01d43 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Salesforce, Inc. + * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause From c81c6c033d1abe599d3edb431e502178c4864267 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 09:12:32 -0600 Subject: [PATCH 09/19] lint --- scripts/download-apis.test.ts | 12 ++++-------- scripts/download-apis.ts | 1 - scripts/updateApiVersions.test.ts | 6 +++++- scripts/utils.ts | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/download-apis.test.ts b/scripts/download-apis.test.ts index 66f7b4f8..96e44c6a 100644 --- a/scripts/download-apis.test.ts +++ b/scripts/download-apis.test.ts @@ -20,7 +20,8 @@ const mockedFs = fs as jest.Mocked; const MockedAdmZip = AdmZip as jest.MockedClass; describe('download-apis', () => { - const mockApiId = '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0'; + const mockApiId = + '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0'; const mockTargetDir = '/path/to/target'; const mockOrgId = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; const mockTempDir = path.join(process.cwd(), 'temp', 'downloads'); @@ -206,9 +207,7 @@ describe('download-apis', () => { await expect( downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId) - ).rejects.toThrow( - `Failed to download API ${mockApiId}` - ); + ).rejects.toThrow(`Failed to download API ${mockApiId}`); }); it('should use correct temp directory path', async () => { @@ -264,10 +263,7 @@ describe('download-apis', () => { await downloadApisWithAnypointCli(mockApiId, mockTargetDir, mockOrgId); - expect(mockExtractAllTo).toHaveBeenCalledWith( - mockTargetDir, - true - ); + expect(mockExtractAllTo).toHaveBeenCalledWith(mockTargetDir, true); }); }); }); diff --git a/scripts/download-apis.ts b/scripts/download-apis.ts index 637d895f..d2331d44 100644 --- a/scripts/download-apis.ts +++ b/scripts/download-apis.ts @@ -11,7 +11,6 @@ import path from 'path'; import fs from 'fs-extra'; import AdmZip from 'adm-zip'; - /** * Downloads API assets using anypoint-cli-v4 and extracts them to the target directory. * diff --git a/scripts/updateApiVersions.test.ts b/scripts/updateApiVersions.test.ts index d60f95a8..2df7461f 100644 --- a/scripts/updateApiVersions.test.ts +++ b/scripts/updateApiVersions.test.ts @@ -322,7 +322,11 @@ shopper-payments-oas-v1=1.1.0 throw new Error('Command failed'); }); - const result = getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); + const result = getLatestVersion( + 'shopper-baskets-oas-v1', + '1.9.0', + ORG_ID + ); expect(result).toBeNull(); // eslint-disable-next-line no-console diff --git a/scripts/utils.ts b/scripts/utils.ts index 48b01d43..ef06b27f 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -44,4 +44,4 @@ export default function removeInternalOas( console.log(`Removed internal file: ${fullPath}`); } }); -} \ No newline at end of file +} From 27c6262dbfaf956f10d051691bff8956e98bee15 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 09:24:04 -0600 Subject: [PATCH 10/19] remove beta api --- api-versions.txt | 1 - apis/shopper-payments-oas-1.2.0/exchange.json | 12 - .../shopper-payments-oas-v1-public.yaml | 325 ------------------ 3 files changed, 338 deletions(-) delete mode 100644 apis/shopper-payments-oas-1.2.0/exchange.json delete mode 100644 apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml diff --git a/api-versions.txt b/api-versions.txt index da2c19a0..57ee5bf2 100644 --- a/api-versions.txt +++ b/api-versions.txt @@ -12,4 +12,3 @@ shopper-promotions-oas-v1=1.0.36 shopper-search-oas-v1=1.3.0 shopper-seo-oas-v1=1.0.13 shopper-stores-oas-v1=1.0.17 -shopper-payments-oas-v1=1.2.0-master-b70 diff --git a/apis/shopper-payments-oas-1.2.0/exchange.json b/apis/shopper-payments-oas-1.2.0/exchange.json deleted file mode 100644 index b0d2ab6d..00000000 --- a/apis/shopper-payments-oas-1.2.0/exchange.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "main": "shopper-payments-oas-v1-public.yaml", - "name": "Shopper Payments OAS", - "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-payments-oas", - "version": "1.2.0-master-b70", - "classifier": "oas", - "tags": [], - "descriptorVersion": "1.0.0", - "organizationId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "apiVersion": "v1" -} \ No newline at end of file diff --git a/apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml b/apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml deleted file mode 100644 index c350c451..00000000 --- a/apis/shopper-payments-oas-1.2.0/shopper-payments-oas-v1-public.yaml +++ /dev/null @@ -1,325 +0,0 @@ -openapi: 3.0.3 -info: - x-api-type: Shopper - x-api-family: Checkout - title: Shopper Payments - version: 1.2.0-master-b70 - description: "# API Overview\n\nUse the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.\n\nThe Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.\n\n## Key Features\n\nThe Shopper Payments API includes the following capabilities:\n\n- **Payment Configuration Retrieval**: Get complete payment configuration for an organization\n- **Payment Method Set Information**: Access details about configured payment method set accounts\n- **Gateway Response Data**: Retrieve payment processor gateway information and supported payment methods\n- **Payment Modes Configuration**: View supported payment modes (Multistep, Express) for each payment method\n- **SDK Version Information**: Get the current SDK version being used\n\n## Payment Configuration Endpoint\n\nThe main endpoint `/organizations/{organizationId}/payment-configuration` provides:\n\n### Configuration Settings\n- Multi-step checkout enablement status\n- Express checkout enablement status \n- Automatic card capture settings\n- Zone identification\n- Saved payment method configuration\n- Merchant account identification\n\n### Payment Method Set Accounts\n- Account identifiers and configurations\n- Payment processor API keys and settings\n- Gateway identifiers and response data\n- Live/test mode indicators\n- Vendor information (Stripe, Adyen, PayPal, etc.)\n\n### Payment Methods\n- Supported payment method types (card, paypal, applepay, etc.)\n- Available payment modes for each method\n- Account associations\n\n## Gateway Response Handling\n\nThe API handles varying gateway response formats:\n- **Active Gateways**: Return detailed payment method information including supported card brands\n- **Inactive/Pending Gateways**: May return null gateway response data\n- **Multiple Vendors**: Support for different payment processors with vendor-specific configurations\n\n## Authentication & Authorization\n\nThe client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Getting Started\n\nTo use the Shopper Payments API:\n\n1. Authenticate with the appropriate scopes (`sfcc.shopper-payments.rw`)\n2. Make a GET request to `/organizations/{organizationId}/payment-configuration`\n3. Process the returned payment configuration data for your application\n\n## Use Cases\n\n### Payment Method Discovery\nRetrieve available payment methods and their capabilities for dynamic payment form generation.\n\n### Gateway Status Monitoring\nCheck the status and configuration of payment gateways and processors.\n\n### Payment Flow Configuration\nDetermine supported payment modes (multi-step vs express) for different payment methods.\n\n### SDK Version Management\nEnsure compatibility by checking the current SDK version requirements.\n\nFor detailed implementation examples and best practices, refer to the Commerce Cloud documentation. " -servers: - - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1 - variables: - shortCode: - default: shortCode -tags: - - name: Payment Configuration - description: Operations related to payment configuration -paths: - /organizations/{organizationId}/payment-configuration: - parameters: - - $ref: '#/components/parameters/organizationId' - - $ref: '#/components/parameters/siteId' - - $ref: '#/components/parameters/currency' - - $ref: '#/components/parameters/countryCode' - - $ref: '#/components/parameters/zoneId' - get: - description: |- - Retrieves the payment configuration for the organization. - - **Parameters:** - - `siteId`: Required. The site identifier for context-specific configuration - - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration - - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration - - **Response Behavior:** - - Returns payment configuration data when available - - Returns null values for missing data (e.g., when account not found or payments zone not found) - operationId: getPaymentConfiguration - summary: Get payment configuration - security: - - ShopperToken: - - sfcc.shopper-baskets-orders - - sfcc.shopper-baskets-orders.rw - responses: - '200': - description: Payment configuration details. - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentConfiguration' - examples: - standardConfiguration: - $ref: '#/components/examples/PaymentConfigurationGet' - nullGatewayResponse: - $ref: '#/components/examples/PaymentConfigurationNullGatewayResponse' - noDataFound: - $ref: '#/components/examples/PaymentConfigurationNoDataFound' - tags: - - Payment Configuration -components: - securitySchemes: - ShopperToken: - type: oauth2 - description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" - flows: - clientCredentials: - tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints - sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints - authorizationCode: - authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize - tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token - scopes: - sfcc.shopper-baskets-orders: Scope granting read-access to shopper basket or orders endpoints - sfcc.shopper-baskets-orders.rw: Scope granting read and write access to shopper basket or orders endpoints - schemas: - OrganizationId: - description: An identifier for the organization the request is being made by - example: f_ecom_zzxy_prd - type: string - minLength: 1 - maxLength: 32 - SiteId: - minLength: 1 - maxLength: 32 - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites - example: RefArch - type: string - ISOCurrency: - pattern: ^[A-Z][A-Z][A-Z]$ - description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. - example: USD - type: string - NoValue: - default: N/A - description: A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number. - example: N/A - enum: - - N/A - type: string - CurrencyCode: - description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. - example: USD - oneOf: - - $ref: '#/components/schemas/ISOCurrency' - - $ref: '#/components/schemas/NoValue' - CountryCode: - pattern: ^[A-Z][A-Z]$ - description: A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard. - example: US - type: string - ZoneId: - type: string - example: Amer-Zone - description: The unique identifier for a Payments zone. - minLength: 1 - maxLength: 100 - nullable: true - PaymentConfiguration: - type: object - properties: - zoneId: - type: string - example: Amer-Zone - description: The unique identifier for a Payments zone. - pattern: ^[a-zA-Z0-9\-_]{1,100}$ - minLength: 1 - maxLength: 100 - nullable: true - paymentMethodSetAccounts: - type: array - description: List of payment method set accounts - items: - type: object - properties: - accountId: - type: string - description: Account identifier - example: acct_1RegszI5I22eU0I3 - minLength: 1 - maxLength: 100 - config: - type: object - description: Account configuration - properties: - key: - type: string - description: API key for the payment processor - example: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV - maxLength: 200 - bnCode: - type: string - description: Account BN code (optional, null if not a PayPal account) - example: Example_PPCP - maxLength: 100 - additionalProperties: true - gatewayId: - type: string - description: Gateway identifier - example: 0b0SB000000IpdZYAS - minLength: 1 - gatewayResponse: - type: object - nullable: true - description: Gateway response data (optional, can be null) - properties: - paymentMethods: - type: array - description: Available payment methods from gateway - items: - type: object - properties: - brands: - type: array - description: Supported card brands - items: - type: string - example: visa - example: - - amex - - cup - - diners - - discover - - mc - - visa - type: - type: string - description: Payment method type - example: scheme - additionalProperties: true - isLive: - type: boolean - description: Whether the account is in live mode - example: false - vendor: - type: string - description: Payment vendor name - example: Stripe - required: - - accountId - - gatewayId - - isLive - - vendor - paymentMethods: - type: array - description: Configured payment methods - items: - type: object - properties: - accountId: - type: string - description: Associated account identifier - example: acct_1RegszI5I22eU0I3 - minLength: 1 - paymentMethodType: - type: string - description: Type of payment method - example: card - paymentModes: - type: array - description: Supported payment modes - items: - type: string - example: Multistep - example: - - Multistep - required: - - accountId - - paymentMethodType - - paymentModes - required: - - paymentMethodSetAccounts - - paymentMethods - parameters: - organizationId: - description: An identifier for the organization the request is being made by - name: organizationId - in: path - required: true - example: f_ecom_zzxy_prd - schema: - $ref: '#/components/schemas/OrganizationId' - siteId: - description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites. - name: siteId - in: query - required: true - examples: - SiteId: - value: RefArch - schema: - $ref: '#/components/schemas/SiteId' - currency: - description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. - name: currency - in: query - required: true - examples: - CurrencyCode: - value: USD - schema: - $ref: '#/components/schemas/CurrencyCode' - countryCode: - name: countryCode - in: query - description: The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering - required: false - schema: - $ref: '#/components/schemas/CountryCode' - zoneId: - description: The zone identifier for the payment configuration. Optional, if specified will return zone specific payment configuration instead of resolving based on the currency and country. - name: zoneId - in: query - required: false - examples: - ZoneId: - value: Amer-Zone - schema: - $ref: '#/components/schemas/ZoneId' - examples: - PaymentConfigurationGet: - value: - zoneId: Amer-Zone - paymentMethodSetAccounts: - - accountId: acct_1RegszI5I22eU0I3 - config: - key: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV - gatewayId: 0b0SB000000IpdZYAS - gatewayResponse: - paymentMethods: - - brands: - - amex - - cup - - diners - - discover - - mc - - visa - type: scheme - isLive: false - vendor: Stripe - paymentMethods: - - accountId: acct_1RegszI5I22eU0I3 - paymentMethodType: card - paymentModes: - - Multistep - PaymentConfigurationNullGatewayResponse: - value: - zoneId: EU-Central-Zone - paymentMethodSetAccounts: - - accountId: acct_eu_test_456 - config: - key: pk_test_eu_key789 - gatewayId: 0b0SB000000IpdZEU - gatewayResponse: null - isLive: false - vendor: Adyen - paymentMethods: - - accountId: acct_eu_test_456 - paymentMethodType: card - paymentModes: - - Multistep - PaymentConfigurationNoDataFound: - value: - zoneId: null - paymentMethodSetAccounts: [] - paymentMethods: [] From b6d6d49cbc2c3c7d8b843eab5555ee3e559a8840 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 09:25:29 -0600 Subject: [PATCH 11/19] update contributing.md --- Contributing.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Contributing.md b/Contributing.md index 3b816984..8a8a0e21 100644 --- a/Contributing.md +++ b/Contributing.md @@ -40,11 +40,24 @@ $ yarn test ### Merging to `preview` -#### Update APIs: +### Updating APIs Update the version file in `api-versions.txt` to the version you want to test or add a new API. Use the API version from your API release or branch build. Alternatively, you can run `yarn updateApiVersion` to update the `api-versions.txt` file with the latest API version snapshots for the APIs listed in the file. +To add a new API: + +1. Edit `api-versions.txt` and add a new line following the existing format: + - `=` + - Example: + + ``` + shopper-newfeature-oas-v1=1.0.0 + ``` + +2. Run: + - `yarn updateApis` to download the API OAS into `apis/` directory + #### Update and Check SDK before merging: Before merging any changes into `preview`, SDK generation must pass locally: From 396d9801603a35dac9b4956e00672a41b079badb Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 09:39:36 -0600 Subject: [PATCH 12/19] refactor --- scripts/updateApiVersions.ts | 27 ++------------------------- scripts/updateApis.ts | 23 +---------------------- scripts/utils.ts | 24 +++++++++++++++++++++++- 3 files changed, 26 insertions(+), 48 deletions(-) diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts index d24b14eb..48758e45 100644 --- a/scripts/updateApiVersions.ts +++ b/scripts/updateApiVersions.ts @@ -6,16 +6,12 @@ */ /* eslint-disable no-console */ import {execSync} from 'child_process'; -import path from 'path'; import fs from 'fs-extra'; import dotenv from 'dotenv'; +import {API_VERSIONS_FILE, ORG_ID, readApiVersions} from './utils'; dotenv.config(); -// Constants -const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; -const API_VERSIONS_FILE = path.join(__dirname, '../api-versions.txt'); - // Types for Anypoint Exchange API response interface AssetVersion { version: string; @@ -29,25 +25,6 @@ interface ExchangeAssetDescribeResponse { name: string; } -/** - * Reads the API versions from the api-versions.txt file - * @returns Array of { apiName, version } objects - */ -export function readApiVersions(): Array<{apiName: string; version: string}> { - if (!fs.existsSync(API_VERSIONS_FILE)) { - throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); - } - - const content = fs.readFileSync(API_VERSIONS_FILE, 'utf-8'); - return content - .split('\n') - .filter(line => line.trim() && !line.startsWith('#')) - .map(line => { - const [apiName, version] = line.split('=').map(s => s.trim()); - return {apiName, version}; - }); -} - /** * Writes updated API versions back to the api-versions.txt file * @param apiVersions - Array of { apiName, version } objects @@ -114,7 +91,7 @@ export function getLatestVersion( const currentMajorVersion = getMajorVersion(currentVersion); // Use current version to query the asset (any version works to get all versions) - const assetId = `${ORG_ID}/${baseName}/${currentVersion}`; + const assetId = `${orgId}/${baseName}/${currentVersion}`; const cmd = `anypoint-cli-v4 exchange:asset:describe ${assetId} -o json --username '${username}' --password '${password}' --organization=${orgId}`; try { diff --git a/scripts/updateApis.ts b/scripts/updateApis.ts index f75e1c5d..ae7d029b 100644 --- a/scripts/updateApis.ts +++ b/scripts/updateApis.ts @@ -9,35 +9,14 @@ import path from 'path'; import fs from 'fs-extra'; import dotenv from 'dotenv'; import {downloadApisWithAnypointCli} from './download-apis'; -import removeInternalOas from './utils'; +import {readApiVersions, removeInternalOas, ORG_ID} from './utils'; dotenv.config(); // Constants -const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; -const API_VERSIONS_FILE = path.join(__dirname, '../api-versions.txt'); const PRODUCTION_API_PATH = path.join(__dirname, '../apis'); const OLD_APIS_PATH = path.join(__dirname, '../temp/oldApis'); -/** - * Reads the API versions from the api-versions.txt file - * @returns Array of { apiName, version } objects - */ -function readApiVersions(): Array<{apiName: string; version: string}> { - if (!fs.existsSync(API_VERSIONS_FILE)) { - throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); - } - - const content = fs.readFileSync(API_VERSIONS_FILE, 'utf-8'); - return content - .split('\n') - .filter(line => line.trim() && !line.startsWith('#')) - .map(line => { - const [apiName, version] = line.split('=').map(s => s.trim()); - return {apiName, version}; - }); -} - /** * Main function to update APIs based on versions in api-versions.txt */ diff --git a/scripts/utils.ts b/scripts/utils.ts index ef06b27f..13e562a2 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -8,12 +8,15 @@ import path from 'path'; import fs from 'fs-extra'; +export const API_VERSIONS_FILE = path.join(__dirname, '../api-versions.txt'); +export const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; + /** * Recursively removes all files ending in '-internal.yaml' from a directory and its subdirectories * @param directoryPath - The path to the directory to process * @param depth - The depth of the directory to process, we limit the depth to 3 to avoid infinite recursion */ -export default function removeInternalOas( +export function removeInternalOas( directoryPath: string, depth = 0 ): void { @@ -45,3 +48,22 @@ export default function removeInternalOas( } }); } + +/** + * Reads the API versions from the api-versions.txt file + * @returns Array of { apiName, version } objects + */ +export function readApiVersions(): Array<{apiName: string; version: string}> { + if (!fs.existsSync(API_VERSIONS_FILE)) { + throw new Error(`API versions file not found at: ${API_VERSIONS_FILE}`); + } + + const content = fs.readFileSync(API_VERSIONS_FILE, 'utf-8'); + return content + .split('\n') + .filter(line => line.trim() && !line.startsWith('#')) + .map(line => { + const [apiName, version] = line.split('=').map(s => s.trim()); + return {apiName, version}; + }); +} From b524454df0cd2d46042b8cbae4274bd01c61f52a Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 09:48:43 -0600 Subject: [PATCH 13/19] refactor --- scripts/updateApiVersions.test.ts | 59 ---------------------- scripts/utils.test.ts | 84 +++++++++++++++++++++++++++++++ scripts/utils.ts | 5 +- 3 files changed, 85 insertions(+), 63 deletions(-) create mode 100644 scripts/utils.test.ts diff --git a/scripts/updateApiVersions.test.ts b/scripts/updateApiVersions.test.ts index 2df7461f..81ed7575 100644 --- a/scripts/updateApiVersions.test.ts +++ b/scripts/updateApiVersions.test.ts @@ -8,7 +8,6 @@ import {execSync} from 'child_process'; import fs from 'fs-extra'; import path from 'path'; import { - readApiVersions, writeApiVersions, getMajorVersion, parseApiName, @@ -77,64 +76,6 @@ shopper-payments-oas-v1=1.1.0`; jest.restoreAllMocks(); }); - describe('readApiVersions', () => { - it('should read and parse api-versions.txt correctly', () => { - const result = readApiVersions(); - - expect(mockedFs.existsSync).toHaveBeenCalledWith(mockApiVersionsFile); - expect(mockedFs.readFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - 'utf-8' - ); - expect(result).toEqual([ - {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, - {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, - {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, - ]); - }); - - it('should filter out empty lines and comments', () => { - const contentWithComments = `# This is a comment -shopper-baskets-oas-v1=1.9.0 - -shopper-baskets-oas-v2=2.1.0 -# Another comment -shopper-payments-oas-v1=1.1.0 - -`; - mockedFs.readFileSync.mockReturnValue(contentWithComments); - - const result = readApiVersions(); - - expect(result).toEqual([ - {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, - {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, - {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, - ]); - }); - - it('should throw error when file does not exist', () => { - mockedFs.existsSync.mockReturnValue(false); - - expect(() => readApiVersions()).toThrow( - `API versions file not found at: ${mockApiVersionsFile}` - ); - }); - - it('should handle whitespace around api names and versions', () => { - const contentWithWhitespace = `shopper-baskets-oas-v1 = 1.9.0 - shopper-baskets-oas-v2=2.1.0 `; - mockedFs.readFileSync.mockReturnValue(contentWithWhitespace); - - const result = readApiVersions(); - - expect(result).toEqual([ - {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, - {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, - ]); - }); - }); - describe('writeApiVersions', () => { it('should write API versions to file correctly', () => { const apiVersions = [ diff --git a/scripts/utils.test.ts b/scripts/utils.test.ts new file mode 100644 index 00000000..d2fa29f1 --- /dev/null +++ b/scripts/utils.test.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2025, Salesforce, Inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +import fs from 'fs-extra'; +import path from 'path'; +import {readApiVersions} from './utils'; + +jest.mock('fs-extra'); +const mockedFs = fs as jest.Mocked; +const mockApiVersionsFile = path.join(__dirname, '../api-versions.txt'); +const mockApiVersionsContent = `shopper-baskets-oas-v1=1.9.0 +shopper-baskets-oas-v2=2.1.0 +shopper-payments-oas-v1=1.1.0`; + +describe('readApiVersions', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockedFs.existsSync.mockReturnValue(true); + mockedFs.readFileSync.mockReturnValue(mockApiVersionsContent); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + it('should read and parse api-versions.txt correctly', () => { + const result = readApiVersions(); + + expect(mockedFs.existsSync).toHaveBeenCalledWith(mockApiVersionsFile); + expect(mockedFs.readFileSync).toHaveBeenCalledWith( + mockApiVersionsFile, + 'utf-8' + ); + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, + ]); + }); + + it('should filter out empty lines and comments', () => { + const contentWithComments = `# This is a comment +shopper-baskets-oas-v1=1.9.0 + +shopper-baskets-oas-v2=2.1.0 +# Another comment +shopper-payments-oas-v1=1.1.0 + +`; + mockedFs.readFileSync.mockReturnValue(contentWithComments); + + const result = readApiVersions(); + + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + {apiName: 'shopper-payments-oas-v1', version: '1.1.0'}, + ]); + }); + + it('should throw error when file does not exist', () => { + mockedFs.existsSync.mockReturnValue(false); + + expect(() => readApiVersions()).toThrow( + `API versions file not found at: ${mockApiVersionsFile}` + ); + }); + + it('should handle whitespace around api names and versions', () => { + const contentWithWhitespace = `shopper-baskets-oas-v1 = 1.9.0 + shopper-baskets-oas-v2=2.1.0 `; + mockedFs.readFileSync.mockReturnValue(contentWithWhitespace); + + const result = readApiVersions(); + + expect(result).toEqual([ + {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, + {apiName: 'shopper-baskets-oas-v2', version: '2.1.0'}, + ]); + }); +}); diff --git a/scripts/utils.ts b/scripts/utils.ts index 13e562a2..5a808e28 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -16,10 +16,7 @@ export const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; * @param directoryPath - The path to the directory to process * @param depth - The depth of the directory to process, we limit the depth to 3 to avoid infinite recursion */ -export function removeInternalOas( - directoryPath: string, - depth = 0 -): void { +export function removeInternalOas(directoryPath: string, depth = 0): void { if (depth > 3) { console.warn( `Reached maximum depth (${depth}) for directory: ${directoryPath}` From c1e721410b496d0e1569320b40e8341ba0dac7c4 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 10:09:26 -0600 Subject: [PATCH 14/19] remove branch from testing --- scripts/updateApiVersions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts index 48758e45..6e74811b 100644 --- a/scripts/updateApiVersions.ts +++ b/scripts/updateApiVersions.ts @@ -205,6 +205,7 @@ export function updateApiVersions(): void { } // Execute the main function only if this file is run directly +/* istanbul ignore next */ if (require.main === module) { try { updateApiVersions(); From b9f5abd065fbc7da6577e7ab16f140916cc02e44 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 15:04:01 -0600 Subject: [PATCH 15/19] bump size --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8d4c195..d7aafaa5 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ }, { "path": "commerce-sdk-isomorphic-with-deps.tgz", - "maxSize": "2.5 MB" + "maxSize": "2.65 MB" } ], "proxy": "https://SHORTCODE.api.commercecloud.salesforce.com" From 790922f7d35a8c785997d63e639634bdb7ecee3a Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 17 Nov 2025 15:10:45 -0600 Subject: [PATCH 16/19] increase branch coverage --- src/static/helpers/customApi.test.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/static/helpers/customApi.test.ts b/src/static/helpers/customApi.test.ts index b5be8f72..ef01c1ca 100644 --- a/src/static/helpers/customApi.test.ts +++ b/src/static/helpers/customApi.test.ts @@ -311,8 +311,8 @@ describe('callCustomEndpoint', () => { const copyOptions = { ...options, customApiPathParameters: { - ...options.customApiPathParameters, - endpointPath, + apiName: 'api_name', + apiVersion: 'v2', }, }; @@ -325,12 +325,22 @@ describe('callCustomEndpoint', () => { ...clientConfig, baseUri: 'https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}', + parameters: { + ...clientConfig.parameters, + endpointPath, + }, }; const doFetchSpy = jest.spyOn(fetchHelper, 'doFetch'); await callCustomEndpoint({ options: copyOptions, - clientConfig, + clientConfig: { + ...clientConfig, + parameters: { + ...clientConfig.parameters, + endpointPath, // pass endpoint path through clientConfig to increase branch coverage + }, + }, rawResponse: true, }); expect(doFetchSpy).toBeCalledTimes(1); From c7705839a3d123a80e60599143084a662ff45eba Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Tue, 18 Nov 2025 08:58:47 -0600 Subject: [PATCH 17/19] remove updateApiVersions script --- Contributing.md | 2 - package.json | 1 - scripts/updateApiVersions.test.ts | 361 ------------------------------ scripts/updateApiVersions.ts | 216 ------------------ 4 files changed, 580 deletions(-) delete mode 100644 scripts/updateApiVersions.test.ts delete mode 100644 scripts/updateApiVersions.ts diff --git a/Contributing.md b/Contributing.md index 8a8a0e21..c51abd08 100644 --- a/Contributing.md +++ b/Contributing.md @@ -43,8 +43,6 @@ $ yarn test ### Updating APIs Update the version file in `api-versions.txt` to the version you want to test or add a new API. Use the API version from your API release or branch build. -Alternatively, you can run `yarn updateApiVersion` to update the `api-versions.txt` file with the latest API version snapshots for the APIs listed in the file. - To add a new API: 1. Edit `api-versions.txt` and add a new line following the existing format: diff --git a/package.json b/package.json index d7aafaa5..18b57faf 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "test": "yarn run check:types && yarn run test:unit && CI=true yarn run test:react", "test:react": "react-scripts test --env=jest-environment-jsdom-sixteen src/environment", "test:unit": "jest --coverage --testPathIgnorePatterns node_modules src/environment --silent", - "updateApiVersions": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' scripts/updateApiVersions.ts", "updateApis": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' scripts/updateApis.ts && yarn diffApis" }, "husky": { diff --git a/scripts/updateApiVersions.test.ts b/scripts/updateApiVersions.test.ts deleted file mode 100644 index 81ed7575..00000000 --- a/scripts/updateApiVersions.test.ts +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) 2025, Salesforce, Inc. - * All rights reserved. - * SPDX-License-Identifier: BSD-3-Clause - * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause - */ -import {execSync} from 'child_process'; -import fs from 'fs-extra'; -import path from 'path'; -import { - writeApiVersions, - getMajorVersion, - parseApiName, - getLatestVersion, - updateApiVersions, -} from './updateApiVersions'; - -// Mock dependencies before importing the module -jest.mock('child_process'); -jest.mock('fs-extra'); -jest.mock('dotenv', () => ({ - config: jest.fn(), -})); - -const mockedExecSync = execSync as jest.MockedFunction; -const mockedFs = fs as jest.Mocked; -const ORG_ID = '893f605e-10e2-423a-bdb4-f952f56eb6d8'; - -describe('updateApiVersions', () => { - const mockApiVersionsFile = path.join(__dirname, '../api-versions.txt'); - const mockApiVersionsContent = `shopper-baskets-oas-v1=1.9.0 -shopper-baskets-oas-v2=2.1.0 -shopper-payments-oas-v1=1.1.0`; - - const mockExchangeResponseV1 = { - versions: [ - {version: '1.9.5', createdDate: '2025-10-24'}, - {version: '1.9.0', createdDate: '2025-08-01'}, - {version: '2.1.0', createdDate: '2025-09-01'}, - {version: '2.0.0', createdDate: '2025-07-01'}, - ], - id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/1.9.0', - name: 'Shopper Baskets OAS', - }; - - const mockExchangeResponseV2 = { - versions: [ - {version: '2.2.0', createdDate: '2025-10-25'}, - {version: '2.1.0', createdDate: '2025-09-01'}, - {version: '1.9.5', createdDate: '2025-10-24'}, - {version: '1.9.0', createdDate: '2025-08-01'}, - ], - id: '893f605e-10e2-423a-bdb4-f952f56eb6d8/shopper-baskets-oas/2.1.0', - name: 'Shopper Baskets OAS', - }; - - beforeEach(() => { - jest.clearAllMocks(); - process.env.ANYPOINT_USERNAME = 'test-user'; - process.env.ANYPOINT_PASSWORD = 'test-pass'; - - // Mock file system operations - mockedFs.existsSync.mockReturnValue(true); - mockedFs.readFileSync.mockReturnValue(mockApiVersionsContent); - mockedFs.writeFileSync.mockImplementation(() => undefined); - - // Mock console methods - jest.spyOn(console, 'log').mockImplementation(); - jest.spyOn(console, 'warn').mockImplementation(); - jest.spyOn(console, 'error').mockImplementation(); - }); - - afterEach(() => { - delete process.env.ANYPOINT_USERNAME; - delete process.env.ANYPOINT_PASSWORD; - jest.restoreAllMocks(); - }); - - describe('writeApiVersions', () => { - it('should write API versions to file correctly', () => { - const apiVersions = [ - {apiName: 'shopper-baskets-oas-v1', version: '1.9.5'}, - {apiName: 'shopper-baskets-oas-v2', version: '2.2.0'}, - ]; - - writeApiVersions(apiVersions); - - expect(mockedFs.writeFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - 'shopper-baskets-oas-v1=1.9.5\nshopper-baskets-oas-v2=2.2.0\n', - 'utf-8' - ); - // eslint-disable-next-line no-console - expect(console.log).toHaveBeenCalledWith( - `Updated ${mockApiVersionsFile}` - ); - }); - - it('should handle empty array', () => { - writeApiVersions([]); - - expect(mockedFs.writeFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - '\n', - 'utf-8' - ); - }); - - it('should handle single API version', () => { - const apiVersions = [ - {apiName: 'shopper-baskets-oas-v1', version: '1.9.0'}, - ]; - - writeApiVersions(apiVersions); - - expect(mockedFs.writeFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - 'shopper-baskets-oas-v1=1.9.0\n', - 'utf-8' - ); - }); - }); - - describe('getMajorVersion', () => { - it('should extract major version from version string', () => { - expect(getMajorVersion('1.9.0')).toBe(1); - expect(getMajorVersion('2.1.0')).toBe(2); - expect(getMajorVersion('10.5.3')).toBe(10); - expect(getMajorVersion('0.1.0')).toBe(0); - }); - - it('should handle version strings with different formats', () => { - expect(getMajorVersion('1.9')).toBe(1); - expect(getMajorVersion('2')).toBe(2); - expect(getMajorVersion('3.0.0-beta')).toBe(3); - }); - - it('should return 0 for invalid version strings', () => { - expect(getMajorVersion('invalid')).toBe(0); - expect(getMajorVersion('')).toBe(0); - expect(getMajorVersion('v1.0.0')).toBe(0); - }); - }); - - describe('parseApiName', () => { - it('should parse API name with version suffix correctly', () => { - expect(parseApiName('shopper-baskets-oas-v1')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: 'v1', - }); - - expect(parseApiName('shopper-baskets-oas-v2')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: 'v2', - }); - - expect(parseApiName('shopper-payments-oas-v1')).toEqual({ - baseName: 'shopper-payments-oas', - versionSuffix: 'v1', - }); - }); - - it('should handle API names with multiple hyphens', () => { - expect(parseApiName('shopper-customer-product-lists-v1')).toEqual({ - baseName: 'shopper-customer-product-lists', - versionSuffix: 'v1', - }); - }); - - it('should handle API names without version suffix', () => { - expect(parseApiName('shopper-baskets-oas')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: null, - }); - }); - - it('should handle API names with double-digit version suffixes', () => { - expect(parseApiName('shopper-baskets-oas-v10')).toEqual({ - baseName: 'shopper-baskets-oas', - versionSuffix: 'v10', - }); - }); - }); - - describe('getLatestVersion', () => { - it('should return latest version for the same major version', () => { - mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); - - const result = getLatestVersion( - 'shopper-baskets-oas-v1', - '1.9.0', - ORG_ID - ); - - expect(result).toBe('1.9.5'); - expect(mockedExecSync).toHaveBeenCalledWith( - expect.stringContaining('anypoint-cli-v4 exchange:asset:describe'), - expect.any(Object) - ); - }); - - it('should filter versions by major version correctly', () => { - mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV2)); - - const result = getLatestVersion( - 'shopper-baskets-oas-v2', - '2.1.0', - ORG_ID - ); - - expect(result).toBe('2.2.0'); - }); - - it('should return null when no versions found', () => { - const emptyResponse = { - versions: [], - id: 'test-id', - name: 'Test API', - }; - mockedExecSync.mockReturnValue(JSON.stringify(emptyResponse)); - - const result = getLatestVersion( - 'shopper-baskets-oas-v1', - '1.9.0', - ORG_ID - ); - - expect(result).toBeNull(); - // eslint-disable-next-line no-console - expect(console.warn).toHaveBeenCalledWith( - 'No versions found for shopper-baskets-oas-v1' - ); - }); - - it('should return null when no versions match major version', () => { - const responseWithDifferentMajor = { - versions: [ - {version: '2.0.0', status: 'published', createdDate: '2025-09-01'}, - {version: '2.1.0', status: 'published', createdDate: '2025-09-01'}, - ], - id: 'test-id', - name: 'Test API', - }; - mockedExecSync.mockReturnValue( - JSON.stringify(responseWithDifferentMajor) - ); - - const result = getLatestVersion( - 'shopper-baskets-oas-v1', - '1.9.0', - ORG_ID - ); - - expect(result).toBeNull(); - // eslint-disable-next-line no-console - expect(console.warn).toHaveBeenCalledWith( - 'No versions found for shopper-baskets-oas-v1 with major version 1' - ); - }); - - it('should handle execSync errors gracefully', () => { - mockedExecSync.mockImplementation(() => { - throw new Error('Command failed'); - }); - - const result = getLatestVersion( - 'shopper-baskets-oas-v1', - '1.9.0', - ORG_ID - ); - - expect(result).toBeNull(); - // eslint-disable-next-line no-console - expect(console.error).toHaveBeenCalledWith( - 'Error fetching latest version for shopper-baskets-oas-v1:', - 'Command failed' - ); - }); - - it('should use credentials from environment variables', () => { - process.env.ANYPOINT_USERNAME = 'custom-user'; - process.env.ANYPOINT_PASSWORD = 'custom-pass'; - mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); - - getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); - - expect(mockedExecSync).toHaveBeenCalledWith( - expect.stringContaining("--username 'custom-user'"), - expect.any(Object) - ); - expect(mockedExecSync).toHaveBeenCalledWith( - expect.stringContaining("--password 'custom-pass'"), - expect.any(Object) - ); - }); - - it('should handle missing credentials gracefully', () => { - delete process.env.ANYPOINT_USERNAME; - delete process.env.ANYPOINT_PASSWORD; - mockedExecSync.mockReturnValue(JSON.stringify(mockExchangeResponseV1)); - - getLatestVersion('shopper-baskets-oas-v1', '1.9.0', ORG_ID); - - expect(mockedExecSync).toHaveBeenCalledWith( - expect.stringContaining("--username ''"), - expect.any(Object) - ); - expect(mockedExecSync).toHaveBeenCalledWith( - expect.stringContaining("--password ''"), - expect.any(Object) - ); - }); - }); - - describe('updateApiVersions', () => { - it('should throw error when environment variables are missing', () => { - delete process.env.ANYPOINT_USERNAME; - delete process.env.ANYPOINT_PASSWORD; - - expect(() => updateApiVersions()).toThrow( - 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables are set.' - ); - }); - - it('should update API versions when newer versions are available', () => { - mockedExecSync - .mockReturnValueOnce(JSON.stringify(mockExchangeResponseV1)) // For v1 - .mockReturnValueOnce(JSON.stringify(mockExchangeResponseV2)) // For v2 - .mockReturnValueOnce( - JSON.stringify({ - versions: [ - { - version: '1.1.0', - status: 'published', - createdDate: '2025-08-01', - }, - ], - id: 'test-id', - name: 'Shopper Payments', - }) - ); // For payments - - updateApiVersions(); - - expect(mockedFs.writeFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - expect.stringContaining('shopper-baskets-oas-v1=1.9.5'), - 'utf-8' - ); - expect(mockedFs.writeFileSync).toHaveBeenCalledWith( - mockApiVersionsFile, - expect.stringContaining('shopper-baskets-oas-v2=2.2.0'), - 'utf-8' - ); - // eslint-disable-next-line no-console - expect(console.log).toHaveBeenCalledWith( - expect.stringContaining('Found 2 update(s)') - ); - }); - }); -}); diff --git a/scripts/updateApiVersions.ts b/scripts/updateApiVersions.ts deleted file mode 100644 index 6e74811b..00000000 --- a/scripts/updateApiVersions.ts +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2025, Salesforce, Inc. - * All rights reserved. - * SPDX-License-Identifier: BSD-3-Clause - * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause - */ -/* eslint-disable no-console */ -import {execSync} from 'child_process'; -import fs from 'fs-extra'; -import dotenv from 'dotenv'; -import {API_VERSIONS_FILE, ORG_ID, readApiVersions} from './utils'; - -dotenv.config(); - -// Types for Anypoint Exchange API response -interface AssetVersion { - version: string; - status: string; - createdDate: string; -} - -interface ExchangeAssetDescribeResponse { - versions: AssetVersion[]; - id: string; - name: string; -} - -/** - * Writes updated API versions back to the api-versions.txt file - * @param apiVersions - Array of { apiName, version } objects - */ -export function writeApiVersions( - apiVersions: Array<{apiName: string; version: string}> -): void { - const content = apiVersions - .map(({apiName, version}) => `${apiName}=${version}`) - .join('\n'); - fs.writeFileSync(API_VERSIONS_FILE, `${content}\n`, 'utf-8'); - console.log(`Updated ${API_VERSIONS_FILE}`); -} - -/** - * Extracts the major version number from a version string - * @param version - Version string (e.g., '1.9.0', '2.1.0') - * @returns Major version number - */ -export function getMajorVersion(version: string): number { - const match = /^(\d+)/.exec(version); - return match ? parseInt(match[1], 10) : 0; -} - -/** - * Parses an API name to extract base name and version suffix - * @param apiNameWithSuffix - API name with optional version suffix (e.g., 'shopper-baskets-oas-v1') - * @returns Object with baseName and versionSuffix (e.g., {baseName: 'shopper-baskets-oas', versionSuffix: 'v1'}) - */ -export function parseApiName(apiNameWithSuffix: string): { - baseName: string; - versionSuffix: string | null; -} { - const match = /^(.+?)-(v\d+)$/.exec(apiNameWithSuffix); - if (match) { - return { - baseName: match[1], - versionSuffix: match[2], - }; - } - return { - baseName: apiNameWithSuffix, - versionSuffix: null, - }; -} - -/** - * Gets the latest version of an API from Anypoint Exchange for a specific major version - * @param apiNameWithSuffix - The API name with version suffix (e.g., 'shopper-baskets-oas-v1') - * @param currentVersion - The current version to compare against - * @param orgId - * @returns The latest version string for the same major version - */ -export function getLatestVersion( - apiNameWithSuffix: string, - currentVersion: string, - orgId: string -): string | null { - const username = process.env.ANYPOINT_USERNAME || ''; - const password = process.env.ANYPOINT_PASSWORD || ''; - - // Parse the API name to get base name (without version suffix) - const {baseName} = parseApiName(apiNameWithSuffix); - const currentMajorVersion = getMajorVersion(currentVersion); - - // Use current version to query the asset (any version works to get all versions) - const assetId = `${orgId}/${baseName}/${currentVersion}`; - const cmd = `anypoint-cli-v4 exchange:asset:describe ${assetId} -o json --username '${username}' --password '${password}' --organization=${orgId}`; - - try { - console.log(`Checking latest version for ${apiNameWithSuffix}`); - const output = execSync(cmd, { - encoding: 'utf-8', - stdio: ['pipe', 'pipe', 'pipe'], - maxBuffer: 10 * 1024 * 1024, // 10MB buffer to handle large JSON responses - }); - - const response = JSON.parse(output) as ExchangeAssetDescribeResponse; - - if (!response.versions || response.versions.length === 0) { - console.warn(`No versions found for ${apiNameWithSuffix}`); - return null; - } - - // Filter for versions matching the same major version - const applicableVersions = response.versions.filter( - v => getMajorVersion(v.version) === currentMajorVersion - ); - - if (applicableVersions.length === 0) { - console.warn( - `No versions found for ${apiNameWithSuffix} with major version ${currentMajorVersion}` - ); - return null; - } - - const latestVersion = applicableVersions[0].version; - - return latestVersion; - } catch (error) { - console.error( - `Error fetching latest version for ${apiNameWithSuffix}:`, - error instanceof Error ? error.message : String(error) - ); - return null; - } -} - -/** - * Main function to check and update API versions - */ -export function updateApiVersions(): void { - // Check for required environment variables - if (!process.env.ANYPOINT_USERNAME || !process.env.ANYPOINT_PASSWORD) { - throw new Error( - 'Please ensure that ANYPOINT_USERNAME and ANYPOINT_PASSWORD environment variables are set.' - ); - } - - try { - console.log('Reading current API versions...\n'); - const apiVersions = readApiVersions(); - - // Check each API for latest version - const updatedVersions = apiVersions.map(({apiName, version}) => { - const latestVersion = getLatestVersion(apiName, version, ORG_ID); - - if (latestVersion && latestVersion !== version) { - return { - apiName, - version: latestVersion, - updated: true, - }; - } - return { - apiName, - version, - updated: false, - }; - }); - - // Summary - const updatesAvailable = updatedVersions.filter(v => v.updated); - - if (updatesAvailable.length > 0) { - console.log(`\n✨ Found ${updatesAvailable.length} update(s):\n`); - updatesAvailable.forEach(({apiName, version}) => { - const oldVersion = - apiVersions.find(v => v.apiName === apiName)?.version || 'unknown'; - console.log(` ${apiName}: ${oldVersion} → ${version}`); - }); - - // Write updated versions to file - console.log('\n📝 Updating api-versions.txt...'); - writeApiVersions( - updatedVersions.map(({apiName, version}) => ({apiName, version})) - ); - console.log('\n✅ API versions file updated successfully!'); - } else { - console.log('\n✅ All APIs are up to date!'); - } - - // print APIs without updates - const noUpdates = updatedVersions.filter(v => !v.updated); - if (noUpdates.length > 0) { - console.log('\nNo updates available for the following APIs:\n'); - noUpdates.forEach(({apiName, version}) => { - console.log(` ${apiName}: ${version}`); - }); - } - } catch (error) { - console.error( - 'Error during version check:', - error instanceof Error ? error.message : String(error) - ); - process.exit(1); - } -} - -// Execute the main function only if this file is run directly -/* istanbul ignore next */ -if (require.main === module) { - try { - updateApiVersions(); - } catch (error) { - console.error('Unhandled error:', error); - process.exit(1); - } -} From 0e9449b5474f330cf00080e9bac029e3630d3c17 Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Wed, 19 Nov 2025 10:03:26 -0600 Subject: [PATCH 18/19] remove unused dep --- .depcheckrc.yml | 1 - package.json | 1 - yarn.lock | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 53d26784..a1ba2fd3 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -2,7 +2,6 @@ ignores: # Include an explanation why the package is ignored - '@babel/*' # Used in babel.config.js and babel.config.jest.js - '@types/react-dom' # Used in src/index.jsx - - anypoint-cli-exchange-plugin # CLI tool executed via execSync in scripts, not imported - anypoint-cli-v4 # CLI tool executed via execSync in scripts, not imported - jest-environment-jsdom-sixteen # Used by test:react script in package.json - lib # Used in App.jsx, references local directory diff --git a/package.json b/package.json index 18b57faf..868f8b1a 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,6 @@ "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "adm-zip": "^0.5.10", - "anypoint-cli-exchange-plugin": "^1.0.0", "anypoint-cli-v4": "1.6.12", "autoprefixer": "9.8.8", "bundlesize2": "^0.0.31", diff --git a/yarn.lock b/yarn.lock index a3eec56f..d32fca90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4878,7 +4878,7 @@ anypoint-cli-designcenter-plugin@1.0.20: upath "^2.0.1" util "^0.12.4" -anypoint-cli-exchange-plugin@1.0.12, anypoint-cli-exchange-plugin@^1.0.0: +anypoint-cli-exchange-plugin@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/anypoint-cli-exchange-plugin/-/anypoint-cli-exchange-plugin-1.0.12.tgz#3d0859adaff99d1980152f46ee044ae471e0c24b" integrity sha512-BZlzua8P4Y0TE6YChI9ldKeBw39vAdB1Djn8xMZAfyTDP7UaubNKt/mWbJ6Z/dKdpEqkbLCFh/ynJnrTZ9BWRw== From a3e3a40298fbf4c36b63ad6e1833c5ad3044a0c9 Mon Sep 17 00:00:00 2001 From: Alex Vuong Date: Mon, 19 Jan 2026 12:30:01 -0800 Subject: [PATCH 19/19] update api list to match ecom 26.1 --- api-versions.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/api-versions.txt b/api-versions.txt index 57ee5bf2..ac3a9e0e 100644 --- a/api-versions.txt +++ b/api-versions.txt @@ -1,14 +1,14 @@ -shopper-baskets-oas-v1=1.9.0 -shopper-baskets-oas-v2=2.1.0 -shopper-consents-oas-v1=1.1.0 -shopper-context-oas-v1=1.1.1 -shopper-customers-oas-v1=1.1.1 -shopper-experience-oas-v1=1.0.7 -shopper-gift-certificates-oas-v1=1.0.26 -shopper-login-oas-v1=1.39.41 -shopper-orders-oas-v1=1.5.0 -shopper-products-oas-v1=1.0.37 -shopper-promotions-oas-v1=1.0.36 -shopper-search-oas-v1=1.3.0 -shopper-seo-oas-v1=1.0.13 -shopper-stores-oas-v1=1.0.17 +shopper-baskets-oas-v1=1.9.1 +shopper-baskets-oas-v2=2.1.1 +shopper-consents-oas-v1=1.1.4 +shopper-context-oas-v1=1.1.3 +shopper-customers-oas-v1=1.2.1 +shopper-experience-oas-v1=1.1.2 +shopper-gift-certificates-oas-v1=1.0.29 +shopper-login-oas-v1=1.42.2 +shopper-orders-oas-v1=1.6.0 +shopper-products-oas-v1=1.1.2 +shopper-promotions-oas-v1=1.0.39 +shopper-search-oas-v1=1.5.4 +shopper-seo-oas-v1=1.0.16 +shopper-stores-oas-v1=1.0.19