├── .gitignore ├── admin-ui-sdk ├── customer │ ├── custom-grid-columns │ │ ├── README.md │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── schema_customers.json │ │ ├── mesh.json │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── ext.config.yaml │ │ │ │ └── web-src │ │ │ │ ├── src │ │ │ │ └── components │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ └── package.json │ └── custom-mass-action │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ └── commerce-backend-ui-1 │ │ │ ├── actions │ │ │ └── massAction │ │ │ │ └── index.js │ │ │ ├── ext.config.yaml │ │ │ └── web-src │ │ │ ├── src │ │ │ └── components │ │ │ │ └── ExtensionRegistration.js │ │ │ └── index.html │ │ └── package.json ├── menu │ ├── custom-menu │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── web-src │ │ │ │ ├── src │ │ │ │ │ ├── components │ │ │ │ │ │ ├── Constants.js │ │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ │ ├── utils.js │ │ │ │ │ └── hooks │ │ │ │ │ │ └── useCommerceOrders.js │ │ │ │ └── index.html │ │ │ │ └── ext.config.yaml │ │ └── package.json │ └── custom-menu-no-react │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ └── commerce-backend-ui-1 │ │ │ ├── web-src │ │ │ └── src │ │ │ │ └── utils.js │ │ │ ├── ext.config.yaml │ │ │ └── actions │ │ │ └── registration │ │ │ └── index.js │ │ └── package.json ├── order │ ├── custom-fees │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── ext.config.yaml │ │ │ │ └── web-src │ │ │ │ ├── src │ │ │ │ └── components │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ ├── package.json │ │ └── README.md │ ├── custom-mass-action │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── actions │ │ │ │ └── massAction │ │ │ │ │ └── index.js │ │ │ │ ├── ext.config.yaml │ │ │ │ └── web-src │ │ │ │ ├── src │ │ │ │ └── components │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ └── package.json │ ├── custom-view-button │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── ext.config.yaml │ │ │ │ └── web-src │ │ │ │ ├── src │ │ │ │ └── components │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ └── package.json │ └── custom-grid-columns │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── schema_orders.json │ │ ├── mesh.json │ │ ├── src │ │ └── commerce-backend-ui-1 │ │ │ ├── ext.config.yaml │ │ │ └── web-src │ │ │ ├── src │ │ │ └── components │ │ │ │ └── ExtensionRegistration.js │ │ │ └── index.html │ │ └── package.json ├── product │ ├── custom-grid-columns │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── schema_products.json │ │ ├── mesh.json │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── ext.config.yaml │ │ │ │ ├── web-src │ │ │ │ ├── src │ │ │ │ │ └── components │ │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ │ │ └── actions │ │ │ │ └── registration │ │ │ │ └── index.js │ │ └── package.json │ └── custom-mass-action │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── extension-manifest.json │ │ ├── .gitignore │ │ ├── src │ │ └── commerce-backend-ui-1 │ │ │ ├── actions │ │ │ └── massAction │ │ │ │ └── index.js │ │ │ ├── ext.config.yaml │ │ │ └── web-src │ │ │ ├── src │ │ │ └── components │ │ │ │ └── ExtensionRegistration.js │ │ │ └── index.html │ │ └── package.json ├── banner-notification │ ├── custom-mass-actions │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── .gitignore │ │ ├── extension-manifest.json │ │ ├── src │ │ │ └── commerce-backend-ui-1 │ │ │ │ ├── ext.config.yaml │ │ │ │ └── web-src │ │ │ │ ├── src │ │ │ │ └── components │ │ │ │ │ └── ExtensionRegistration.js │ │ │ │ └── index.html │ │ └── package.json │ └── custom-order-view-button │ │ ├── app.config.yaml │ │ ├── install.yaml │ │ ├── .gitignore │ │ ├── extension-manifest.json │ │ ├── src │ │ └── commerce-backend-ui-1 │ │ │ ├── ext.config.yaml │ │ │ └── web-src │ │ │ ├── src │ │ │ └── components │ │ │ │ └── ExtensionRegistration.js │ │ │ └── index.html │ │ └── package.json └── README.md ├── api-mesh ├── adobe-io-events-integration │ ├── .gitignore │ ├── sample.env │ ├── request-schema.json │ └── mesh.json ├── chain-mutations │ ├── eslint.config.js │ ├── sample.env │ ├── queries │ │ └── cart.graphql │ ├── mutations │ │ ├── chainMutation.graphql │ │ └── preRequisite.graphql │ └── meshConfig.json ├── mock-response │ ├── eslint.config.js │ ├── sample.env │ ├── meshConfig.json │ ├── resolvers.js │ └── README.md ├── response-caching │ ├── eslint.config.js │ ├── sample.env │ ├── queries │ │ └── getStoreConfig.graphql │ └── meshConfig.json ├── auth0-integration │ ├── .gitignore │ ├── eslint.config.js │ ├── sample.env │ ├── queries │ │ ├── currentUser.graphql │ │ ├── simpleUserProfile.graphql │ │ ├── customerAddresses.graphql │ │ └── userWithOrders.graphql │ ├── package.json │ └── meshConfig.json ├── commerce-rest-and-graphql │ ├── eslint.config.js │ ├── queries │ │ ├── getStoreConfig.graphql │ │ └── getCurrencyCodes.graphql │ ├── sample.env │ ├── meshConfig.json │ └── README.md ├── commerce-and-catalog │ ├── mutations │ │ ├── createCart.graphql │ │ └── addProductToCart.graphql │ ├── sample.env │ └── queries │ │ ├── storeConfig.graphql │ │ ├── cart.graphql │ │ ├── recommendations.graphql │ │ └── products.graphql ├── custom-field │ ├── sample.env │ └── meshConfig.json ├── okta-integration │ ├── .gitignore │ ├── sample.env │ ├── queries │ │ ├── currentUser.graphql │ │ ├── simpleUserProfile.graphql │ │ └── userWithOrders.graphql │ ├── package.json │ ├── eslint.config.js │ └── meshConfig.json └── azure-ad-integration │ ├── .gitignore │ ├── sample.env │ ├── queries │ ├── currentUser.graphql │ ├── simpleUserProfile.graphql │ └── userWithOrders.graphql │ ├── package.json │ ├── eslint.config.js │ └── meshConfig.json ├── webhooks ├── add-to-cart-stock-validation │ ├── .babelrc │ ├── .eslintrc.json │ ├── app.config.yaml │ ├── .gitignore │ ├── jest.setup.js │ └── package.json └── README.md ├── starter-kit ├── add-ingestion-scheduler │ ├── actions │ │ ├── ingestion │ │ │ ├── scheduler │ │ │ │ ├── event-mapping.json │ │ │ │ └── payload-transform.js │ │ │ └── actions.config.yaml │ │ └── customer │ │ │ └── external │ │ │ └── created │ │ │ ├── schema.json │ │ │ └── transformer.js │ └── README.md ├── customize-ingestion-webhook │ └── actions │ │ ├── ingestion │ │ ├── webhook │ │ │ ├── event-mapping.json │ │ │ └── payload-transform.js │ │ └── actions.config.yaml │ │ └── customer │ │ └── external │ │ └── created │ │ ├── schema.json │ │ └── transformer.js ├── order-bidirectional-integration-sample-prj │ ├── test │ │ ├── data │ │ │ └── onboarding │ │ │ │ ├── providers │ │ │ │ ├── missing_entities_client_registration.json │ │ │ │ ├── create_commerce_provider_only.json │ │ │ │ ├── create_backoffice_provider_only.json │ │ │ │ └── create_commerce_and_backoffice_providers.json │ │ │ │ ├── metadata │ │ │ │ ├── create_only_commerce_providers_metadata.json │ │ │ │ ├── create_only_backoffice_providers_metadata.json │ │ │ │ └── create_commerce_and_backoffice_providers_metadata.json │ │ │ │ └── registrations │ │ │ │ ├── create_only_commerce_registrations.json │ │ │ │ ├── create_only_backoffice_registrations.json │ │ │ │ └── create_commerce_and_backoffice_registrations.json │ │ ├── jest.setup.js │ │ ├── scripts │ │ │ └── lib │ │ │ │ ├── event-subscribe.test.js │ │ │ │ └── configure-eventing.test.js │ │ ├── jest.config.js │ │ └── actions │ │ │ ├── stock │ │ │ └── external │ │ │ │ └── updated │ │ │ │ └── sender.test.js │ │ │ ├── order │ │ │ └── external │ │ │ │ └── updated │ │ │ │ └── sender.test.js │ │ │ └── product │ │ │ └── external │ │ │ ├── created │ │ │ └── sender.test.js │ │ │ └── deleted │ │ │ └── sender.test.js │ ├── scripts │ │ ├── .DS_Store │ │ ├── onboarding │ │ │ ├── .DS_Store │ │ │ └── config │ │ │ │ ├── starter-kit-registrations.json │ │ │ │ └── providers.json │ │ └── commerce-event-subscribe │ │ │ └── config │ │ │ └── commerce-event-subscribe.json │ ├── hooks │ │ └── post-app-deploy.js │ ├── actions │ │ ├── order │ │ │ ├── email │ │ │ │ ├── actions.config.yaml │ │ │ │ └── created │ │ │ │ │ ├── pre.js │ │ │ │ │ ├── transformer.js │ │ │ │ │ ├── post.js │ │ │ │ │ ├── validator.js │ │ │ │ │ └── sender.js │ │ │ ├── commerce │ │ │ │ ├── actions.config.yaml │ │ │ │ ├── created │ │ │ │ │ ├── pre.js │ │ │ │ │ ├── validator.js │ │ │ │ │ └── transformer.js │ │ │ │ └── updated │ │ │ │ │ ├── pre.js │ │ │ │ │ ├── transformer.js │ │ │ │ │ ├── validator.js │ │ │ │ │ ├── post.js │ │ │ │ │ └── sender.js │ │ │ ├── external │ │ │ │ ├── shipment-created │ │ │ │ │ ├── pre.js │ │ │ │ │ ├── post.js │ │ │ │ │ ├── schema.json │ │ │ │ │ └── validator.js │ │ │ │ ├── shipment-updated │ │ │ │ │ ├── pre.js │ │ │ │ │ ├── post.js │ │ │ │ │ └── validator.js │ │ │ │ └── actions.config.yaml │ │ │ └── mock-oms-order-api-client.js │ │ ├── constants.js │ │ └── openwhisk.js │ ├── app.config.yaml │ └── env.dist └── customize-registrations-and-events │ └── scripts │ └── onboarding │ └── config │ ├── starter-kit-registrations.json │ └── events.json ├── COPYRIGHT ├── events ├── commerce-customer-login │ ├── .eslintrc.json │ ├── .gitignore │ ├── jest.setup.js │ ├── app.config.yaml │ └── package.json └── README.md ├── .devcontainer └── devcontainer.json ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE.md └── workflows │ └── api-mesh_mock-response_pr_lint.yml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api-mesh/adobe-io-events-integration/.gitignore: -------------------------------------------------------------------------------- 1 | .env -------------------------------------------------------------------------------- /api-mesh/chain-mutations/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /api-mesh/mock-response/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /api-mesh/response-caching/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | node_modules/ 3 | 4 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | 3 | -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /api-mesh/chain-mutations/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql" -------------------------------------------------------------------------------- /api-mesh/mock-response/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql/" -------------------------------------------------------------------------------- /api-mesh/response-caching/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql/" -------------------------------------------------------------------------------- /api-mesh/response-caching/queries/getStoreConfig.graphql: -------------------------------------------------------------------------------- 1 | { 2 | storeConfig { 3 | store_code 4 | } 5 | } -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/queries/getStoreConfig.graphql: -------------------------------------------------------------------------------- 1 | { 2 | storeConfig { 3 | store_code 4 | } 5 | } -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@babel/plugin-transform-react-jsx" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/mutations/createCart.graphql: -------------------------------------------------------------------------------- 1 | mutation createCart { 2 | createGuestCart { 3 | cart { 4 | id 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /api-mesh/custom-field/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql/" 2 | ANNOUNCEMENTS_ENDPOINT="https://announcements-api.apimesh-adobe-test.workers.dev" -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/actions/ingestion/scheduler/event-mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "external_provider.customer_created.v1.0": "be-observer.customer_create" 3 | } 4 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/app.config.yaml: -------------------------------------------------------------------------------- 1 | extensions: 2 | commerce/backend-ui/1: 3 | $include: src/commerce-backend-ui-1/ext.config.yaml 4 | -------------------------------------------------------------------------------- /starter-kit/customize-ingestion-webhook/actions/ingestion/webhook/event-mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "external_provider.customer_created.v1.0": "be-observer.customer_create" 3 | } 4 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2024 Adobe. All rights reserved. 2 | 3 | Adobe holds the copyright for all the files found in this repository. 4 | 5 | See the LICENSE file for licensing information. 6 | -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_GRAPHQL_ENDPOINT=https://venia.magento.com/graphql 2 | COMMERCE_REST_ENDPOINT=https://venia.magento.com/rest/all/schema?services=all 3 | -------------------------------------------------------------------------------- /api-mesh/adobe-io-events-integration/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql" 2 | BEARER_TOKEN="" 3 | API_KEY="api-key" 4 | PROVIDER_ID="provider-id" 5 | IS_PHI_DATA=false -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/providers/missing_entities_client_registration.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce"], 3 | "order": [], 4 | "stock": [] 5 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/scripts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adobe/adobe-commerce-samples/main/starter-kit/order-bidirectional-integration-sample-prj/scripts/.DS_Store -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/providers/create_commerce_provider_only.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/providers/create_backoffice_provider_only.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/metadata/create_only_commerce_providers_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/scripts/onboarding/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adobe/adobe-commerce-samples/main/starter-kit/order-bidirectional-integration-sample-prj/scripts/onboarding/.DS_Store -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/metadata/create_only_backoffice_providers_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/registrations/create_only_commerce_registrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } 7 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/scripts/onboarding/config/starter-kit-registrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": [], 3 | "customer": [], 4 | "order": ["commerce", "backoffice", "email"], 5 | "stock": [] 6 | } 7 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/registrations/create_only_backoffice_registrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } 7 | -------------------------------------------------------------------------------- /starter-kit/customize-registrations-and-events/scripts/onboarding/config/starter-kit-registrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce"], 3 | "customer": ["commerce", "backoffice"], 4 | "order": ["commerce"], 5 | "stock": [] 6 | } 7 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/hooks/post-app-deploy.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | require('../scripts/onboarding/index.js').main() 3 | require('../scripts/commerce-event-subscribe/index.js').main() 4 | } 5 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/providers/create_commerce_and_backoffice_providers.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce", "backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/metadata/create_commerce_and_backoffice_providers_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce", "backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/data/onboarding/registrations/create_commerce_and_backoffice_registrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": ["commerce", "backoffice"], 3 | "customer": [], 4 | "order": [], 5 | "stock": [] 6 | } 7 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/sample.env: -------------------------------------------------------------------------------- 1 | COMMERCE_ENDPOINT="https://integration-5ojmyuq-7yvbzwvtkgerq.us-4.magentosite.cloud/graphql" 2 | CATALOG_ENDPOINT="https://catalog-service-sandbox.adobe.io/graphql" 3 | CATALOG_API_KEY="9753cd30401a477e816ed850c4f77e18" -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/queries/getCurrencyCodes.graphql: -------------------------------------------------------------------------------- 1 | { 2 | GetV1DirectoryCurrency { 3 | ... on directory_data_currency_information_interface { 4 | available_currency_codes 5 | } 6 | } 7 | storeConfig { 8 | base_currency_code 9 | } 10 | } -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /events/commerce-customer-login/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true 5 | }, 6 | "extends": ["eslint:recommended", "plugin:jest/recommended"], 7 | "parserOptions": { 8 | "ecmaVersion": "latest" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomMenu", 3 | "displayName": "Adobe Commerce custom menu", 4 | "description": "Adobe Commerce custom menu example in admin panel", 5 | "platform": "web", 6 | "id": "CustomMenu", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "node": true 5 | }, 6 | "extends": ["eslint:recommended", "plugin:jest/recommended"], 7 | "parserOptions": { 8 | "ecmaVersion": "latest" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/install.yaml: -------------------------------------------------------------------------------- 1 | $schema: http://json-schema.org/draft-07/schema 2 | $id: https://adobe.io/schemas/app-builder-templates/1 3 | 4 | categories: 5 | - action 6 | - ui 7 | 8 | extensions: 9 | - extensionPointId: commerce/backend-ui/1 10 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/sample.env: -------------------------------------------------------------------------------- 1 | # Auth0 Configuration 2 | AUTH0_DOMAIN="your-tenant.auth0.com" 3 | AUTH0_AUDIENCE="https://your-api-identifier" 4 | AUTH0_MANAGEMENT_TOKEN="your_management_api_token" 5 | 6 | # Adobe Commerce Configuration 7 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql" 8 | 9 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/.gitignore: -------------------------------------------------------------------------------- 1 | # Environment variables 2 | .env 3 | 4 | # Dependencies 5 | node_modules/ 6 | package-lock.json 7 | 8 | # Logs 9 | *.log 10 | npm-debug.log* 11 | 12 | # IDE 13 | .vscode/ 14 | .idea/ 15 | *.swp 16 | *.swo 17 | 18 | # OS 19 | .DS_Store 20 | Thumbs.db 21 | 22 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/.gitignore: -------------------------------------------------------------------------------- 1 | # Environment variables 2 | .env 3 | 4 | # Dependencies 5 | node_modules/ 6 | package-lock.json 7 | 8 | # Logs 9 | *.log 10 | npm-debug.log* 11 | 12 | # IDE 13 | .vscode/ 14 | .idea/ 15 | *.swp 16 | *.swo 17 | 18 | # OS 19 | .DS_Store 20 | Thumbs.db 21 | 22 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-fees", 3 | "displayName": "Adobe Commerce order custom fees", 4 | "description": "Adobe Commerce order custom fees when creating an order", 5 | "platform": "web", 6 | "id": "order-custom-fees", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomMenuNoReact", 3 | "displayName": "Adobe Commerce custom menu no react", 4 | "description": "Adobe Commerce custom menu no react example in admin panel", 5 | "platform": "web", 6 | "id": "CustomMenuNoReact", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/sample.env: -------------------------------------------------------------------------------- 1 | # Okta Configuration 2 | OKTA_DOMAIN="your-domain.okta.com" 3 | OKTA_CLIENT_ID="your_client_id" 4 | OKTA_ISSUER="https://your-domain.okta.com/oauth2/default" 5 | OKTA_API_TOKEN="your_api_token" 6 | 7 | # Adobe Commerce Configuration 8 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql" 9 | 10 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-grid-columns", 3 | "displayName": "Adobe Commerce order grid custom columns", 4 | "description": "Adobe Commerce order grid custom columns in admin panel", 5 | "platform": "web", 6 | "id": "order-custom-grid-columns", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-mass-action", 3 | "displayName": "Adobe Commerce order grid custom mass action", 4 | "description": "Adobe Commerce order grid custom mass action in admin panel", 5 | "platform": "web", 6 | "id": "order-custom-mass-action", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-view-button", 3 | "displayName": "Adobe Commerce order grid custom view button", 4 | "description": "Adobe Commerce order grid custom view button in admin panel", 5 | "platform": "web", 6 | "id": "order-custom-view-button", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "product-custom-grid-columns", 3 | "displayName": "Adobe Commerce product grid custom columns", 4 | "description": "Adobe Commerce product grid custom columns in admin panel", 5 | "platform": "web", 6 | "id": "product-custom-grid-columns", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "customer-custom-grid-columns", 3 | "displayName": "Adobe Commerce customer grid custom columns", 4 | "description": "Adobe Commerce customer grid custom columns in admin panel", 5 | "platform": "web", 6 | "id": "customer-custom-grid-columns", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "product-custom-mass-action", 3 | "displayName": "Adobe Commerce product grid custom mass action", 4 | "description": "Adobe Commerce product grid custom mass action in admin panel", 5 | "platform": "web", 6 | "id": "product-custom-mass-action", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "customer-custom-mass-action", 3 | "displayName": "Adobe Commerce customer grid custom mass action", 4 | "description": "Adobe Commerce customer grid custom mass action in admin panel", 5 | "platform": "web", 6 | "id": "customer-custom-mass-action", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/queries/currentUser.graphql: -------------------------------------------------------------------------------- 1 | # Get the currently authenticated user's profile from Auth0 2 | # Requires: Authorization header with valid Auth0 JWT token 3 | 4 | query GetCurrentUser { 5 | currentUser { 6 | sub 7 | email 8 | name 9 | nickname 10 | picture 11 | email_verified 12 | updated_at 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | 4 | # build 5 | build 6 | dist 7 | .manifest-dist.yml 8 | 9 | # Config 10 | config.json 11 | .env* 12 | !.env.dist 13 | .aio 14 | 15 | # Adobe I/O console config 16 | console.json 17 | 18 | .idea 19 | .aws.tmp.creds.json 20 | .parcel-cache 21 | .DS_Store 22 | .vscode 23 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/queries/currentUser.graphql: -------------------------------------------------------------------------------- 1 | # Get the currently authenticated user's profile from Okta 2 | # Requires: Authorization header with valid Okta JWT access token 3 | 4 | query GetCurrentUser { 5 | currentUser { 6 | id 7 | email 8 | login 9 | firstName 10 | lastName 11 | status 12 | created 13 | activated 14 | lastLogin 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/actions/customer/external/created/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "PersonFirstName": { "type": "string" }, 5 | "PersonLastName": {"type": "string"}, 6 | "PrimaryContactEmail": {"type": "string"} 7 | }, 8 | "required": ["PersonFirstName", "PersonLastName", "PrimaryContactEmail"], 9 | "additionalProperties": true 10 | } 11 | -------------------------------------------------------------------------------- /starter-kit/customize-ingestion-webhook/actions/customer/external/created/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "PersonFirstName": { "type": "string" }, 5 | "PersonLastName": {"type": "string"}, 6 | "PrimaryContactEmail": {"type": "string"} 7 | }, 8 | "required": ["PersonFirstName", "PersonLastName", "PrimaryContactEmail"], 9 | "additionalProperties": true 10 | } 11 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "banner-notification-custom-mass-action", 3 | "displayName": "Adobe Commerce banner notification custom mass action", 4 | "description": "Adobe Commerce banner notification custom mass action in admin panel", 5 | "platform": "web", 6 | "id": "banner-notification-custom-mass-action", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/sample.env: -------------------------------------------------------------------------------- 1 | # Azure AD (Microsoft Entra ID) Configuration 2 | AZURE_TENANT_ID="your-tenant-id" 3 | AZURE_CLIENT_ID="your-application-client-id" 4 | AZURE_CLIENT_SECRET="your-client-secret" 5 | 6 | # Microsoft Graph API Configuration 7 | GRAPH_API_ENDPOINT="https://graph.microsoft.com/v1.0" 8 | 9 | # Adobe Commerce Configuration 10 | COMMERCE_ENDPOINT="https://venia.magento.com/graphql" 11 | 12 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/extension-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "banner-notification-order-custom-view-button", 3 | "displayName": "Adobe Commerce banner notification order custom view button", 4 | "description": "Adobe Commerce banner notification order custom view button", 5 | "platform": "web", 6 | "id": "banner-notification-order-custom-view-button", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/queries/currentUser.graphql: -------------------------------------------------------------------------------- 1 | # Get the currently authenticated user's profile from Azure AD 2 | # Requires: Authorization header with valid Azure AD JWT access token 3 | 4 | query GetCurrentUser { 5 | currentUser { 6 | id 7 | userPrincipalName 8 | mail 9 | displayName 10 | givenName 11 | surname 12 | jobTitle 13 | officeLocation 14 | mobilePhone 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /api-mesh/mock-response/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "Commerce", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}" 9 | } 10 | } 11 | } 12 | ], 13 | "additionalTypeDefs": ["extend type Query {\n mockedField: String\n}"], 14 | "additionalResolvers": ["./resolvers.js"] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/queries/storeConfig.graphql: -------------------------------------------------------------------------------- 1 | query STORE_CONFIG_QUERY { 2 | storeConfig { 3 | minicart_display 4 | minicart_max_items 5 | cart_expires_in_days 6 | cart_summary_display_quantity 7 | default_country 8 | category_fixed_product_tax_display_setting 9 | product_fixed_product_tax_display_setting 10 | sales_fixed_product_tax_display_setting 11 | shopping_cart_display_zero_tax 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Adobe Commerce Samples", 3 | 4 | "image": "mcr.microsoft.com/devcontainers/base:jammy", 5 | "features": { 6 | "ghcr.io/devcontainers/features/node:1": { 7 | "nodeGypDependencies": true, 8 | "version": "18", 9 | "nvmVersion": "latest" 10 | } 11 | }, 12 | 13 | "postCreateCommand": "npm install -g @adobe/aio-cli && aio telemetry yes && aio plugins:install @adobe/aio-cli-plugin-api-mesh" 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/actions.config.yaml: -------------------------------------------------------------------------------- 1 | consumer: 2 | function: consumer/index.js 3 | web: 'no' 4 | runtime: nodejs:20 5 | inputs: 6 | LOG_LEVEL: debug 7 | annotations: 8 | require-adobe-auth: true 9 | final: true 10 | created: 11 | function: created/index.js 12 | web: 'no' 13 | runtime: nodejs:20 14 | inputs: 15 | LOG_LEVEL: debug 16 | annotations: 17 | require-adobe-auth: true 18 | final: true 19 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/queries/simpleUserProfile.graphql: -------------------------------------------------------------------------------- 1 | # Get basic user profile information 2 | # Minimal query for quick authentication verification 3 | # Requires: Authorization header with valid Auth0 JWT token 4 | 5 | query GetSimpleUserProfile { 6 | currentUser { 7 | # Auth0 identity 8 | sub 9 | email 10 | name 11 | picture 12 | 13 | # Basic Commerce info 14 | customer { 15 | id 16 | firstname 17 | lastname 18 | email 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/queries/simpleUserProfile.graphql: -------------------------------------------------------------------------------- 1 | # Get basic user profile information 2 | # Minimal query for quick authentication verification 3 | # Requires: Authorization header with valid Okta JWT access token 4 | 5 | query GetSimpleUserProfile { 6 | currentUser { 7 | # Okta identity 8 | id 9 | email 10 | firstName 11 | lastName 12 | 13 | # Basic Commerce info 14 | customer { 15 | id 16 | firstname 17 | lastname 18 | email 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for more information: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | # https://containers.dev/guide/dependabot 6 | 7 | version: 2 8 | updates: 9 | - package-ecosystem: "devcontainers" 10 | directory: "/" 11 | schedule: 12 | interval: weekly 13 | -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "CommerceGraphql", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_GRAPHQL_ENDPOINT}}" 9 | } 10 | } 11 | }, 12 | { 13 | "name": "CommerceREST", 14 | "handler": { 15 | "openapi": { 16 | "source": "{{env.COMMERCE_REST_ENDPOINT}}" 17 | } 18 | } 19 | } 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/app.config.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | actions: actions 3 | runtimeManifest: 4 | packages: 5 | add-to-cart-stock-validation: 6 | license: Apache-2.0 7 | actions: 8 | product-validate-stock: 9 | function: actions/commerce/product-validate-stock.js 10 | web: 'yes' 11 | runtime: nodejs:18 12 | inputs: 13 | LOG_LEVEL: debug 14 | annotations: 15 | require-adobe-auth: true 16 | final: true 17 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/schema_products.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "productGridColumns": { 6 | "type": "object", 7 | "patternProperties": { 8 | "^0": { 9 | "type": "object", 10 | "properties": { 11 | "first_column": { 12 | "type": "string" 13 | } 14 | } 15 | } 16 | } 17 | } 18 | }, 19 | "required": [ 20 | "productGridColumns" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/queries/simpleUserProfile.graphql: -------------------------------------------------------------------------------- 1 | # Get basic user profile information 2 | # Minimal query for quick authentication verification 3 | # Requires: Authorization header with valid Azure AD JWT access token 4 | 5 | query GetSimpleUserProfile { 6 | currentUser { 7 | # Azure AD identity 8 | id 9 | mail 10 | displayName 11 | givenName 12 | surname 13 | 14 | # Basic Commerce info 15 | customer { 16 | id 17 | firstname 18 | lastname 19 | email 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | -------------------------------------------------------------------------------- /api-mesh/chain-mutations/queries/cart.graphql: -------------------------------------------------------------------------------- 1 | query getCartDetails($cartId: String!) { 2 | cart(cart_id: $cartId) { 3 | id 4 | total_quantity 5 | itemsV2 { 6 | items { 7 | product { 8 | name 9 | sku 10 | } 11 | quantity 12 | } 13 | } 14 | shipping_addresses { 15 | selected_shipping_method { 16 | method_title 17 | method_code 18 | } 19 | } 20 | } 21 | } 22 | 23 | # Sample Variables 24 | 25 | # { 26 | # "cartId": "" 27 | # } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-mesh-auth0-integration", 3 | "version": "1.0.0", 4 | "description": "API Mesh example with Auth0 authentication integration", 5 | "main": "resolvers.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "api-mesh", 11 | "auth0", 12 | "adobe-commerce", 13 | "authentication", 14 | "graphql" 15 | ], 16 | "author": "Adobe", 17 | "license": "Apache-2.0", 18 | "dependencies": { 19 | "jsonwebtoken": "^9.0.2", 20 | "jwks-rsa": "^3.1.0" 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /api-mesh/chain-mutations/mutations/chainMutation.graphql: -------------------------------------------------------------------------------- 1 | mutation chainMutation( 2 | $cartId: String! 3 | $product: CartItemInput! 4 | ) { 5 | addProductsToCartAndSetShippingMethod( 6 | cartId: $cartId 7 | product: $product 8 | ) { 9 | cartId 10 | } 11 | } 12 | 13 | # Sample Variables 14 | # 15 | # { 16 | # "cartId": "", 17 | # "product": { 18 | # "sku": "VT02", 19 | # "quantity": 1, 20 | # "selected_options": [ 21 | # "Y29uZmlndXJhYmxlLzU0MC8xMDI=", 22 | # "Y29uZmlndXJhYmxlLzU3My8xMzI=" 23 | # ] 24 | # } 25 | # } -------------------------------------------------------------------------------- /events/commerce-customer-login/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # package directories 3 | node_modules 4 | jspm_packages 5 | 6 | # build 7 | build 8 | dist 9 | .manifest-dist.yml 10 | 11 | # Config 12 | config.json 13 | .env* 14 | .aio 15 | 16 | # Adobe I/O console config 17 | console.json 18 | 19 | # Test output 20 | junit.xml 21 | 22 | # IDE & Temp 23 | .cache 24 | .idea 25 | .nyc_output 26 | .vscode 27 | coverage 28 | .aws.tmp.creds.json 29 | .wskdebug.props.tmp 30 | 31 | # Parcel 32 | .parcel-cache 33 | 34 | # OSX 35 | .DS_Store 36 | 37 | # yeoman 38 | .yo-repository 39 | 40 | # logs folder for aio-run-detached 41 | logs 42 | 43 | -------------------------------------------------------------------------------- /api-mesh/chain-mutations/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "Commerce", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}" 9 | } 10 | } 11 | } 12 | ], 13 | "additionalTypeDefs": "type AddProductsToCartAndSetShippingMethodOutput {\n cartId: String!\n}\n\nextend type Mutation {\n addProductsToCartAndSetShippingMethod(\n cartId: String!\n product: CartItemInput!\n): AddProductsToCartAndSetShippingMethodOutput\n}\n", 14 | "additionalResolvers": ["./resolver.js"] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # package directories 3 | node_modules 4 | jspm_packages 5 | 6 | # build 7 | build 8 | dist 9 | .manifest-dist.yml 10 | 11 | # Config 12 | config.json 13 | .env* 14 | .aio 15 | 16 | # Adobe I/O console config 17 | console.json 18 | 19 | # Test output 20 | junit.xml 21 | 22 | # IDE & Temp 23 | .cache 24 | .idea 25 | .nyc_output 26 | .vscode 27 | coverage 28 | .aws.tmp.creds.json 29 | .wskdebug.props.tmp 30 | 31 | # Parcel 32 | .parcel-cache 33 | 34 | # OSX 35 | .DS_Store 36 | 37 | # yeoman 38 | .yo-repository 39 | 40 | # logs folder for aio-run-detached 41 | logs 42 | 43 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-mesh-okta-integration", 3 | "version": "1.0.0", 4 | "description": "API Mesh example with Okta authentication integration", 5 | "main": "resolvers.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "api-mesh", 11 | "okta", 12 | "adobe-commerce", 13 | "authentication", 14 | "graphql" 15 | ], 16 | "author": "Adobe", 17 | "license": "Apache-2.0", 18 | "dependencies": { 19 | "jsonwebtoken": "^9.0.2", 20 | "jwks-rsa": "^3.1.0", 21 | "node-fetch": "^2.7.0" 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/scripts/onboarding/config/providers.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "commerce", 4 | "label": "Commerce Provider", 5 | "description": "Commerce Provider that will receive events from commerce", 6 | "docs_url": null 7 | }, 8 | { 9 | "key": "backoffice", 10 | "label": "Backoffice Provider", 11 | "description": "Backoffice Provider that will receive events from commerce", 12 | "docs_url": null 13 | }, 14 | { 15 | "key": "email", 16 | "label": "Email Provider", 17 | "description": "Email Provider that will receive events to send emails", 18 | "docs_url": null 19 | } 20 | ] -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-mesh-azure-ad-integration", 3 | "version": "1.0.0", 4 | "description": "API Mesh example with Azure AD (Microsoft Entra ID) authentication integration", 5 | "main": "resolvers.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "api-mesh", 11 | "azure-ad", 12 | "microsoft-entra-id", 13 | "adobe-commerce", 14 | "authentication", 15 | "graphql" 16 | ], 17 | "author": "Adobe", 18 | "license": "Apache-2.0", 19 | "dependencies": { 20 | "jsonwebtoken": "^9.0.2", 21 | "jwks-rsa": "^3.1.0", 22 | "node-fetch": "^2.7.0" 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ### Expected Behaviour 5 | 6 | ### Actual Behaviour 7 | 8 | ### Reproduce Scenario (including but not limited to) 9 | 10 | #### Steps to Reproduce 11 | 12 | #### Platform and Version 13 | 14 | #### Sample Code that illustrates the problem 15 | 16 | #### Logs taken while reproducing problem 17 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/schema_orders.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "orderGridColumns": { 6 | "type": "object", 7 | "patternProperties": { 8 | "^0": { 9 | "type": "object", 10 | "properties": { 11 | "first_column": { 12 | "type": "string" 13 | }, 14 | "second_column": { 15 | "type": "integer" 16 | }, 17 | "third_column": { 18 | "type": "integer" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | }, 25 | "required": [ 26 | "orderGridColumns" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/scripts/commerce-event-subscribe/config/commerce-event-subscribe.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "event": { 4 | "name": "observer.sales_order_save_commit_after", 5 | "fields": [ 6 | { 7 | "name": "id" 8 | }, 9 | { 10 | "name": "increment_id" 11 | }, 12 | { 13 | "name": "created_at" 14 | }, 15 | { 16 | "name": "updated_at" 17 | }, 18 | { 19 | "name": "items[].item_id" 20 | }, 21 | { 22 | "name": "items[].sku" 23 | }, 24 | { 25 | "name": "items[].qty_ordered" 26 | } 27 | ] 28 | } 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/schema_customers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "customerGridColumns": { 6 | "type": "object", 7 | "patternProperties": { 8 | "^0": { 9 | "type": "object", 10 | "properties": { 11 | "first_column": { 12 | "type": "string" 13 | }, 14 | "second_column": { 15 | "type": "integer" 16 | }, 17 | "third_column": { 18 | "type": "integer" 19 | } 20 | } 21 | } 22 | } 23 | } 24 | }, 25 | "required": [ 26 | "customerGridColumns" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /events/commerce-customer-login/jest.setup.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | Unless required by applicable law or agreed to in writing, software distributed under 7 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 8 | OF ANY KIND, either express or implied. See the License for the specific language 9 | governing permissions and limitations under the License. 10 | */ 11 | 12 | jest.setTimeout(10000) 13 | 14 | beforeEach(() => { }) 15 | afterEach(() => { }) 16 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/web-src/src/components/Constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | export const extensionId = 'CustomMenu'; 14 | -------------------------------------------------------------------------------- /api-mesh/mock-response/resolvers.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | module.exports = { 14 | Query: { 15 | mockedField: () => "Hello world!", 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /starter-kit/customize-ingestion-webhook/actions/ingestion/actions.config.yaml: -------------------------------------------------------------------------------- 1 | webhook: 2 | function: ./webhook/index.js 3 | web: 'yes' 4 | runtime: nodejs:20 5 | inputs: 6 | LOG_LEVEL: debug 7 | OAUTH_ORG_ID: $OAUTH_ORG_ID 8 | OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID 9 | OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET 10 | OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID 11 | OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL 12 | IO_MANAGEMENT_BASE_URL: $IO_MANAGEMENT_BASE_URL 13 | IO_CONSUMER_ID: $IO_CONSUMER_ID 14 | IO_PROJECT_ID: $IO_PROJECT_ID 15 | IO_WORKSPACE_ID: $IO_WORKSPACE_ID 16 | AIO_runtime_namespace: $AIO_RUNTIME_NAMESPACE 17 | annotations: 18 | require-adobe-auth: false 19 | final: true 20 | -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/jest.setup.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | jest.setTimeout(10000) 14 | 15 | beforeEach(() => { }) 16 | afterEach(() => { }) 17 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/mutations/addProductToCart.graphql: -------------------------------------------------------------------------------- 1 | mutation ADD_PRODUCTS_TO_CART_MUTATION( 2 | $cartId: String! 3 | $cartItems: [CartItemInput!]! 4 | ) { 5 | addProductsToCart(cartId: $cartId, cartItems: $cartItems) { 6 | cart { 7 | id 8 | total_quantity 9 | is_virtual 10 | itemsV2 { 11 | items { 12 | product { 13 | name 14 | sku 15 | } 16 | } 17 | } 18 | } 19 | user_errors { 20 | code 21 | message 22 | } 23 | } 24 | } 25 | 26 | # Sample Variables: 27 | # { 28 | # "cartId": "Y8HrBP9pLdVhiWJ6gNyM5WmxjR97S7ra", 29 | # "cartItems": [ 30 | # { 31 | # "sku": "24-UG07", 32 | # "quantity": 1 33 | # } 34 | # ] 35 | # } 36 | -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/README.md: -------------------------------------------------------------------------------- 1 | # Scheduled Ingestion Action 2 | 3 | This sample code shows how to create a scheduled ingestion action using the Adobe Commerce integration starter kit. 4 | It provides an alternative to the event [ingestion webhook](https://developer.adobe.com/commerce/extensibility/starter-kit/events/#ingestion-webhook), practical when the third-party system cannot push events to the starter kit, and a pull mechanism from an event storage has to be used instead. 5 | 6 | ## Usage 7 | 8 | After installation and configuration, the scheduled ingestion action will be triggered at the specified time. 9 | 10 | ## More information 11 | 12 | To learn more about Adobe Commerce integration starter kit visit the [Developer docs](https://developer.adobe.com/commerce/extensibility/starter-kit/). -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/mesh.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "data", 6 | "handler": { 7 | "JsonSchema": { 8 | "baseUrl": "", 9 | "operationHeaders": { 10 | "Authorization": "Bearer {context.headers['x-ims-token']}", 11 | "x-gw-ims-org-id": "{context.headers['x-gw-ims-org-id']}" 12 | }, 13 | "operations": [ 14 | { 15 | "type": "Query", 16 | "field": "orders", 17 | "path": "/get-order-grid-columns?ids={args.ids}", 18 | "method": "GET", 19 | "responseSchema": "./schema_orders.json" 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/mesh.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "data", 6 | "handler": { 7 | "JsonSchema": { 8 | "baseUrl": "", 9 | "operationHeaders": { 10 | "Authorization": "Bearer {context.headers['x-ims-token']}", 11 | "x-gw-ims-org-id": "{context.headers['x-gw-ims-org-id']}" 12 | }, 13 | "operations": [ 14 | { 15 | "type": "Query", 16 | "field": "products", 17 | "path": "/get-product-grid-columns?ids={args.ids}", 18 | "method": "GET", 19 | "responseSchema": "./schema_products.json" 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/mesh.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "data", 6 | "handler": { 7 | "JsonSchema": { 8 | "baseUrl": "", 9 | "operationHeaders": { 10 | "Authorization": "Bearer {context.headers['x-ims-token']}", 11 | "x-gw-ims-org-id": "{context.headers['x-gw-ims-org-id']}" 12 | }, 13 | "operations": [ 14 | { 15 | "type": "Query", 16 | "field": "customers", 17 | "path": "/get-customer-grid-columns?ids={args.ids}", 18 | "method": "GET", 19 | "responseSchema": "./schema_customers.json" 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /api-mesh/chain-mutations/mutations/preRequisite.graphql: -------------------------------------------------------------------------------- 1 | mutation createEmptyCart { 2 | createGuestCart { 3 | cart { 4 | id 5 | } 6 | } 7 | } 8 | 9 | mutation SetShippingAddressOnCart( 10 | $cartId: String! 11 | $address: CartAddressInput! 12 | ) { 13 | setShippingAddressesOnCart( 14 | input: { cart_id: $cartId, shipping_addresses: [{ address: $address }] } 15 | ) { 16 | cart { 17 | id 18 | } 19 | } 20 | } 21 | 22 | # Sample Variables 23 | 24 | # { 25 | # "cartId": "", 26 | # "address": { 27 | # "city": "city", 28 | # "firstname": "firstname", 29 | # "lastname": "lastname", 30 | # "street": [ 31 | # "street" 32 | # ], 33 | # "telephone": "telephone", 34 | # "country_code": "US", 35 | # "postcode": "78759", 36 | # "region": "TX" 37 | # } 38 | # } -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/src/commerce-backend-ui-1/actions/massAction/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | async function main() { 14 | return { 15 | statusCode: 200, 16 | body: { 17 | } 18 | } 19 | } 20 | 21 | exports.main = main 22 | -------------------------------------------------------------------------------- /webhooks/add-to-cart-stock-validation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AdobeSampleWebhooks", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^5" 7 | }, 8 | "devDependencies": { 9 | "@babel/core": "^7.8.7", 10 | "@babel/plugin-transform-react-jsx": "^7.8.3", 11 | "@babel/polyfill": "^7.8.7", 12 | "@babel/preset-env": "^7.8.7", 13 | "@openwhisk/wskdebug": "^1.3.0", 14 | "eslint": "^8", 15 | "eslint-plugin-jest": "^27.2.3", 16 | "jest": "^29.7.0" 17 | }, 18 | "scripts": { 19 | "test": "jest --passWithNoTests ./test", 20 | "e2e": "jest --collectCoverage=false --testRegex ./e2e", 21 | "lint": "eslint --ignore-pattern web-src --no-error-on-unmatched-pattern test src actions", 22 | "lint:fix": "npm run lint -- --fix" 23 | }, 24 | "engines": { 25 | "node": ">=18" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/src/commerce-backend-ui-1/actions/massAction/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | async function main() { 14 | return { 15 | statusCode: 200, 16 | body: { 17 | } 18 | } 19 | } 20 | 21 | exports.main = main 22 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/src/commerce-backend-ui-1/actions/massAction/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | async function main() { 14 | return { 15 | statusCode: 200, 16 | body: { 17 | } 18 | } 19 | } 20 | 21 | exports.main = main 22 | -------------------------------------------------------------------------------- /events/README.md: -------------------------------------------------------------------------------- 1 | # Adobe I/O Events Samples 2 | 3 | This section contains a collection of samples that demonstrate the use of Adobe I/O Events for Adobe Commerce. 4 | Each sample demonstrates the effective use of Adobe I/O Events to build even-driven integrations with Adobe Commerce. . 5 | 6 | ## Applications List 7 | 8 | The samples covered in this section include: 9 | 10 | - Adobe Commerce customer login. 11 | 12 | Please refer to the README file of each individual sample for more details. 13 | 14 | ## Getting Started 15 | 16 | To get started with these applications, simply navigate to the directory of the application you are interested in and follow the instructions provided in its README file. 17 | 18 | ## More information 19 | 20 | For more information about Adobe I/O Events for Adobe Commerce, refer to the [documentation](https://developer.adobe.com/commerce/extensibility/events/) 21 | -------------------------------------------------------------------------------- /api-mesh/adobe-io-events-integration/request-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "datacontenttype": { "type": "string", "default": "application/json" }, 5 | "specversion": { "type": "string", "default": "1.0" }, 6 | "source": { "type": "string", "description": "urn:uuid:{provider_id}" }, 7 | "type": { "type": "string", "description": "{event_code} is the Custom Events Provider's Event Metadata's event_code as persisted using Adobe I/O Events Provider API" }, 8 | "id": { "type": "string", "description": "{event_id} is any id of your choice (examples: UUID, event counter) guaranteeing that source + id is unique for each distinct event" }, 9 | "data": { "type": "string" }, 10 | "customattribute": { "type": "string", "default": "cloud events custom extension" } 11 | }, 12 | "required": ["type", "id", "data", "source"] 13 | } -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | web: web-src 6 | runtimeManifest: 7 | packages: 8 | admin-ui-sdk: 9 | license: Apache-2.0 10 | actions: 11 | registration: 12 | function: actions/registration/index.js 13 | web: 'yes' 14 | runtime: 'nodejs:18' 15 | inputs: 16 | LOG_LEVEL: debug 17 | annotations: 18 | require-adobe-auth: true 19 | final: true 20 | mass-actions: 21 | license: Apache-2.0 22 | actions: 23 | massAction: 24 | function: actions/massAction/index.js 25 | web: 'yes' 26 | runtime: 'nodejs:18' 27 | inputs: 28 | LOG_LEVEL: debug 29 | annotations: 30 | require-adobe-auth: true 31 | final: true 32 | -------------------------------------------------------------------------------- /events/commerce-customer-login/app.config.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | runtimeManifest: 3 | packages: 4 | events: 5 | license: Apache-2.0 6 | actions: 7 | customer-login: 8 | function: actions/customer-login/index.js 9 | web: 'no' 10 | runtime: nodejs:18 11 | inputs: 12 | LOG_LEVEL: debug 13 | SLACK_WEBHOOK: $SLACK_WEBHOOK 14 | SLACK_CHANNEL: $SLACK_CHANNEL 15 | annotations: 16 | require-adobe-auth: false 17 | final: true 18 | events: 19 | registrations: 20 | Event commerce evergreen: 21 | description: Registration for IO Events 22 | events_of_interest: 23 | - provider_metadata: dx_commerce_events 24 | event_codes: 25 | - com.adobe.commerce.observer.customer_login 26 | runtime_action: events/customer-login 27 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/queries/customerAddresses.graphql: -------------------------------------------------------------------------------- 1 | # Get customer addresses 2 | # Requires: Authorization header with valid Auth0 JWT token 3 | 4 | query GetCustomerAddresses { 5 | currentUser { 6 | email 7 | name 8 | 9 | addresses { 10 | id 11 | firstname 12 | lastname 13 | company 14 | street 15 | city 16 | region { 17 | region_code 18 | region 19 | region_id 20 | } 21 | postcode 22 | country_code 23 | telephone 24 | fax 25 | default_shipping 26 | default_billing 27 | vat_id 28 | 29 | # Custom attributes (if any) 30 | custom_attributes { 31 | attribute_code 32 | value 33 | } 34 | } 35 | 36 | # Also show default IDs from customer object 37 | customer { 38 | default_billing 39 | default_shipping 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | mass-actions: 22 | license: Apache-2.0 23 | actions: 24 | massAction: 25 | function: actions/massAction/index.js 26 | web: 'yes' 27 | runtime: 'nodejs:18' 28 | inputs: 29 | LOG_LEVEL: debug 30 | annotations: 31 | require-adobe-auth: true 32 | final: true 33 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | mass-actions: 22 | license: Apache-2.0 23 | actions: 24 | massAction: 25 | function: actions/massAction/index.js 26 | web: 'yes' 27 | runtime: 'nodejs:18' 28 | inputs: 29 | LOG_LEVEL: debug 30 | annotations: 31 | require-adobe-auth: true 32 | final: true 33 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/eslint.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | module.exports = { 14 | env: { 15 | node: true, 16 | es2021: true, 17 | }, 18 | extends: 'eslint:recommended', 19 | parserOptions: { 20 | ecmaVersion: 12, 21 | sourceType: 'module', 22 | }, 23 | rules: { 24 | 'no-console': 'off', 25 | }, 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /events/commerce-customer-login/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "adobeSampleEvents", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^5", 7 | "@adobe/generator-add-events-generic": "^2.0.1", 8 | "@adobe/generator-app-events-generic": "^2.0.1" 9 | }, 10 | "devDependencies": { 11 | "@openwhisk/wskdebug": "^1.3.0", 12 | "eslint": "^8", 13 | "eslint-plugin-jest": "^27.2.3", 14 | "jest": "^29" 15 | }, 16 | "scripts": { 17 | "test": "jest --passWithNoTests ./test", 18 | "e2e": "jest --collectCoverage=false --testRegex ./e2e", 19 | "lint": "eslint --ignore-pattern web-src --no-error-on-unmatched-pattern test src actions", 20 | "lint:fix": "npm run lint -- --fix" 21 | }, 22 | "engines": { 23 | "node": ">=18" 24 | }, 25 | "aio-app-builder-templates": [ 26 | "@adobe/generator-app-events-generic", 27 | "@adobe/generator-add-events-generic" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/eslint.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | module.exports = { 14 | env: { 15 | node: true, 16 | es2021: true, 17 | }, 18 | extends: 'eslint:recommended', 19 | parserOptions: { 20 | ecmaVersion: 12, 21 | sourceType: 'module', 22 | }, 23 | rules: { 24 | 'no-console': 'off', 25 | }, 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | order-custom-grid-columns: 22 | license: Apache-2.0 23 | actions: 24 | get-order-grid-columns: 25 | function: actions/data/orderGridColumns.js 26 | web: 'yes' 27 | runtime: 'nodejs:18' 28 | inputs: 29 | LOG_LEVEL: debug 30 | annotations: 31 | require-adobe-auth: true 32 | final: true 33 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/jest.setup.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | // eslint-disable-next-line node/no-unpublished-require 14 | const { stdout } = require('stdout-stderr') 15 | 16 | process.env.CI = true 17 | 18 | jest.setTimeout(30000) 19 | 20 | // trap console log 21 | beforeEach(() => { stdout.start() }) 22 | afterEach(() => { stdout.stop() }) 23 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | product-custom-grid-columns: 22 | license: Apache-2.0 23 | actions: 24 | get-product-grid-columns: 25 | function: actions/data/productGridColumns.js 26 | web: 'yes' 27 | runtime: 'nodejs:18' 28 | inputs: 29 | LOG_LEVEL: debug 30 | annotations: 31 | require-adobe-auth: true 32 | final: true 33 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:18' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | customer-custom-grid-columns: 22 | license: Apache-2.0 23 | actions: 24 | get-customer-grid-columns: 25 | function: actions/data/customerGridColumns.js 26 | web: 'yes' 27 | runtime: 'nodejs:18' 28 | inputs: 29 | LOG_LEVEL: debug 30 | annotations: 31 | require-adobe-auth: true 32 | final: true 33 | -------------------------------------------------------------------------------- /api-mesh/adobe-io-events-integration/mesh.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "AdobeCommerceAPI", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}" 9 | } 10 | } 11 | }, 12 | { 13 | "name": "EventsAPI", 14 | "handler": { 15 | "JsonSchema": { 16 | "baseUrl": "https://eventsingress.adobe.io", 17 | "operationHeaders": { 18 | "x-api-key": "{{env.API_KEY}}", 19 | "Authorization": "Bearer {{env.BEARER_TOKEN}}", 20 | "Content-Type": "application/cloudevents+json", 21 | "x-event-phidata": "{{env.IS_PHI_DATA}}" 22 | }, 23 | "operations": [ 24 | { 25 | "type": "Mutation", 26 | "field": "sendEvent", 27 | "method": "POST", 28 | "path": "/", 29 | "requestSchema": "./request-schema.json", 30 | "responseTypeName": "GetDataResponse" 31 | } 32 | ] 33 | } 34 | } 35 | } 36 | ] 37 | } 38 | } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/scripts/lib/event-subscribe.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const action = require('../../../scripts/lib/event-subscribe') 14 | describe('Given the event-subscribe file', () => { 15 | describe('When method main is defined', () => { 16 | test('Then is an instance of Function', () => { 17 | expect(action.main).toBeInstanceOf(Function) 18 | }) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/actions.config.yaml: -------------------------------------------------------------------------------- 1 | consumer: 2 | function: consumer/index.js 3 | web: 'no' 4 | runtime: nodejs:20 5 | inputs: 6 | LOG_LEVEL: debug 7 | annotations: 8 | require-adobe-auth: true 9 | final: true 10 | created: 11 | function: created/index.js 12 | web: 'no' 13 | runtime: nodejs:20 14 | inputs: 15 | LOG_LEVEL: debug 16 | OMS_API_BASE_URL: $OMS_API_BASE_URL 17 | OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID 18 | OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET 19 | OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID 20 | OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL 21 | OAUTH_ORG_ID: $OAUTH_ORG_ID 22 | EMAIL_PROVIDER_ID: $EMAIL_PROVIDER_ID 23 | annotations: 24 | require-adobe-auth: true 25 | final: true 26 | updated: 27 | function: updated/index.js 28 | web: 'no' 29 | runtime: nodejs:20 30 | inputs: 31 | LOG_LEVEL: debug 32 | annotations: 33 | require-adobe-auth: true 34 | final: true 35 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/scripts/lib/configure-eventing.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const action = require('../../../scripts/lib/configure-eventing') 14 | describe('Given the configure-eventing file', () => { 15 | describe('When method main is defined', () => { 16 | test('Then is an instance of Function', () => { 17 | expect(action.main).toBeInstanceOf(Function) 18 | }) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'order-custom-fees' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /starter-kit/customize-registrations-and-events/scripts/onboarding/config/events.json: -------------------------------------------------------------------------------- 1 | { 2 | "product": { 3 | "commerce": [ 4 | "com.adobe.commerce.observer.catalog_product_delete_commit_after", 5 | "com.adobe.commerce.observer.catalog_product_save_commit_after" 6 | ] 7 | }, 8 | "customer": { 9 | "commerce": [ 10 | "com.adobe.commerce.observer.customer_save_commit_after", 11 | "com.adobe.commerce.observer.customer_delete_commit_after", 12 | "com.adobe.commerce.observer.customer_group_save_commit_after", 13 | "com.adobe.commerce.observer.customer_group_delete_commit_after" 14 | ], 15 | "backoffice": [ 16 | "be-observer.customer_create", 17 | "be-observer.customer_update", 18 | "be-observer.customer_delete", 19 | "be-observer.customer_group_create", 20 | "be-observer.customer_group_update", 21 | "be-observer.customer_group_delete" 22 | ] 23 | }, 24 | "order": { 25 | "commerce": [ 26 | "com.adobe.commerce.observer.sales_order_save_commit_after" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/created/pre.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed pre sending information to external backoffice application 15 | * 16 | * @param {object} data - Data received before transformation 17 | * @param {object} transformed - Transformed received data 18 | */ 19 | function preProcess (data, transformed) { 20 | } 21 | 22 | module.exports = { 23 | preProcess 24 | } 25 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | await register({ 21 | id: 'banner-notification-custom-mass-action', 22 | methods: { 23 | } 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'order-custom-grid-columns' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'order-custom-mass-action' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'order-custom-view-button' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'product-custom-mass-action' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'customer-custom-grid-columns' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'customer-custom-mass-action' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | const extensionId = 'product-custom-grid-columns' 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | 14 | export default function ExtensionRegistration() { 15 | init().catch(console.error) 16 | } 17 | 18 | const init = async () => { 19 | 20 | await register({ 21 | id: 'banner-notification-order-custom-view-button', 22 | methods: { 23 | } 24 | } 25 | )} 26 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/created/transformer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received order data from Adobe commerce to external back-office application 15 | * 16 | * @param {object} data - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (data) { 20 | return data 21 | } 22 | 23 | module.exports = { 24 | transformData 25 | } 26 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/queries/cart.graphql: -------------------------------------------------------------------------------- 1 | query GUEST_CART_QUERY($cartId: String!) { 2 | cart(cart_id: $cartId) { 3 | id 4 | total_quantity 5 | is_virtual 6 | prices { 7 | subtotal_with_discount_excluding_tax { 8 | currency 9 | value 10 | } 11 | subtotal_including_tax { 12 | currency 13 | value 14 | } 15 | subtotal_excluding_tax { 16 | currency 17 | value 18 | } 19 | grand_total { 20 | currency 21 | value 22 | } 23 | applied_taxes { 24 | label 25 | amount { 26 | value 27 | currency 28 | } 29 | } 30 | discounts { 31 | amount { 32 | value 33 | currency 34 | } 35 | label 36 | } 37 | } 38 | shipping_addresses { 39 | country { 40 | code 41 | } 42 | region { 43 | code 44 | } 45 | postcode 46 | } 47 | } 48 | } 49 | 50 | # Sample Variables: 51 | 52 | # { 53 | # "cartId": "Y8HrBP9pLdVhiWJ6gNyM5WmxjR97S7ra" 54 | # } 55 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-created/pre.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed pre sending information to Adobe commerce 15 | * 16 | * @param {object} data - Data received before transformation 17 | * @param {object} transformed - Transformed received data 18 | */ 19 | function preProcess (data, transformed) { 20 | // @TODO Here implement any preprocessing needed 21 | } 22 | 23 | module.exports = { 24 | preProcess 25 | } 26 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-updated/pre.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed pre sending information to Adobe commerce 15 | * 16 | * @param {object} data - Data received before transformation 17 | * @param {object} transformed - Transformed received data 18 | */ 19 | function preProcess (data, transformed) { 20 | // @TODO Here implement any preprocessing needed 21 | } 22 | 23 | module.exports = { 24 | preProcess 25 | } 26 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/created/pre.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed pre sending information to external backoffice application 15 | * 16 | * @param {object} data - Data received before transformation 17 | * @param {object} transformed - Transformed received data 18 | */ 19 | function preProcess (data, transformed) { 20 | // @TODO Here implement any preprocessing needed 21 | } 22 | 23 | module.exports = { 24 | preProcess 25 | } 26 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/updated/pre.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed pre sending information to external backoffice application 15 | * 16 | * @param {object} data - Data received before transformation 17 | * @param {object} transformed - Transformed received data 18 | */ 19 | function preProcess (data, transformed) { 20 | // @TODO Here implement any preprocessing needed 21 | } 22 | 23 | module.exports = { 24 | preProcess 25 | } 26 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/queries/userWithOrders.graphql: -------------------------------------------------------------------------------- 1 | # Get the authenticated user's profile along with their Commerce orders 2 | # This demonstrates linking Auth0 identity with Commerce customer data 3 | # Requires: Authorization header with valid Auth0 JWT token 4 | 5 | query GetUserWithOrders { 6 | currentUser { 7 | sub 8 | email 9 | name 10 | picture 11 | 12 | orders(currentPage: 1, pageSize: 20) { 13 | items { 14 | id 15 | number 16 | order_date 17 | status 18 | carrier 19 | total { 20 | grand_total { 21 | value 22 | currency 23 | } 24 | subtotal { 25 | value 26 | currency 27 | } 28 | } 29 | items { 30 | product_name 31 | product_sku 32 | quantity_ordered 33 | product_sale_price { 34 | value 35 | currency 36 | } 37 | } 38 | } 39 | page_info { 40 | current_page 41 | total_pages 42 | } 43 | total_count 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/queries/userWithOrders.graphql: -------------------------------------------------------------------------------- 1 | # Get the authenticated user's profile along with their Commerce orders 2 | # This demonstrates linking Okta identity with Commerce customer data 3 | # Requires: Authorization header with valid Okta JWT access token 4 | 5 | query GetUserWithOrders { 6 | currentUser { 7 | id 8 | email 9 | firstName 10 | lastName 11 | 12 | orders(currentPage: 1, pageSize: 20) { 13 | items { 14 | id 15 | number 16 | order_date 17 | status 18 | carrier 19 | total { 20 | grand_total { 21 | value 22 | currency 23 | } 24 | subtotal { 25 | value 26 | currency 27 | } 28 | } 29 | items { 30 | product_name 31 | product_sku 32 | quantity_ordered 33 | product_sale_price { 34 | value 35 | currency 36 | } 37 | } 38 | } 39 | page_info { 40 | current_page 41 | total_pages 42 | } 43 | total_count 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const HTTP_OK = 200 14 | const HTTP_BAD_REQUEST = 400 15 | const HTTP_UNAUTHORIZED = 401 16 | const HTTP_NOT_FOUND = 404 17 | const HTTP_INTERNAL_ERROR = 500 18 | 19 | const BACKOFFICE_PROVIDER_KEY = 'backoffice' 20 | 21 | const PUBLISH_EVENT_SUCCESS = 'OK' 22 | 23 | module.exports = { 24 | HTTP_OK, 25 | HTTP_BAD_REQUEST, 26 | HTTP_UNAUTHORIZED, 27 | HTTP_NOT_FOUND, 28 | HTTP_INTERNAL_ERROR, 29 | BACKOFFICE_PROVIDER_KEY, 30 | PUBLISH_EVENT_SUCCESS 31 | } 32 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/queries/userWithOrders.graphql: -------------------------------------------------------------------------------- 1 | # Get the authenticated user's profile along with their Commerce orders 2 | # This demonstrates linking Azure AD identity with Commerce customer data 3 | # Requires: Authorization header with valid Azure AD JWT access token 4 | 5 | query GetUserWithOrders { 6 | currentUser { 7 | id 8 | mail 9 | displayName 10 | givenName 11 | surname 12 | 13 | orders(currentPage: 1, pageSize: 20) { 14 | items { 15 | id 16 | number 17 | order_date 18 | status 19 | carrier 20 | total { 21 | grand_total { 22 | value 23 | currency 24 | } 25 | subtotal { 26 | value 27 | currency 28 | } 29 | } 30 | items { 31 | product_name 32 | product_sku 33 | quantity_ordered 34 | product_sale_price { 35 | value 36 | currency 37 | } 38 | } 39 | } 40 | page_info { 41 | current_page 42 | total_pages 43 | } 44 | total_count 45 | } 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/openwhisk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const openwhisk = require('openwhisk') 14 | 15 | class Openwhisk { 16 | #openwhiskClient 17 | 18 | constructor (host, apiKey) { 19 | this.#openwhiskClient = openwhisk({ apihost: host, api_key: apiKey }) 20 | } 21 | 22 | async invokeAction (action, data) { 23 | return await this.#openwhiskClient.actions.invoke({ 24 | name: action, 25 | blocking: true, 26 | params: { 27 | data 28 | } 29 | }) 30 | } 31 | } 32 | 33 | module.exports = Openwhisk 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/src/commerce-backend-ui-1/web-src/src/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | export async function callAction(ims, action, operation, body = {}) { 13 | const actions = require('./config.json') 14 | const res = await fetch(actions[action], { 15 | method: 'POST', 16 | headers: { 17 | 'Content-Type': 'application/json', 18 | 'x-gw-ims-org-id': ims.org, 19 | 'authorization': `Bearer ${ims.token}` 20 | }, 21 | body: JSON.stringify({ 22 | operation, 23 | ...body 24 | }) 25 | }) 26 | 27 | return await res.json() 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/app.config.yaml: -------------------------------------------------------------------------------- 1 | application: 2 | # hooks: 3 | # post-app-deploy: ./hooks/post-app-deploy.js 4 | runtimeManifest: 5 | packages: 6 | starter-kit: 7 | license: Apache-2.0 8 | actions: 9 | # Please DO NOT DELETE this action; future functionalities planned for upcoming starter kit releases may stop working. 10 | info: 11 | function: actions/starter-kit-info/index.js 12 | web: 'yes' 13 | runtime: nodejs:20 14 | inputs: 15 | LOG_LEVEL: debug 16 | annotations: 17 | require-adobe-auth: true 18 | final: true 19 | order-commerce: 20 | license: Apache-2.0 21 | actions: 22 | $include: ./actions/order/commerce/actions.config.yaml 23 | order-backoffice: 24 | license: Apache-2.0 25 | actions: 26 | $include: ./actions/order/external/actions.config.yaml 27 | order-email: 28 | license: Apache-2.0 29 | actions: 30 | $include: ./actions/order/email/actions.config.yaml 31 | productDependencies: 32 | - code: COMMC 33 | minVersion: 2.4.4 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/web-src/src/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | export async function callAction(props, action, operation, body = {}) { 13 | const actions = require('./config.json') 14 | const res = await fetch(actions[action], { 15 | method: 'POST', 16 | headers: { 17 | 'Content-Type': 'application/json', 18 | 'x-gw-ims-org-id': props.ims.org, 19 | 'authorization': `Bearer ${props.ims.token}` 20 | }, 21 | body: JSON.stringify({ 22 | operation, 23 | ...body 24 | }) 25 | }) 26 | 27 | return await res.json() 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/updated/transformer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received order data from Adobe commerce to external back-office application 15 | * 16 | * @param {object} data - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (data) { 20 | // @TODO Here transform the data as needed for 3rd party API 21 | const transformedData = data 22 | 23 | return transformedData 24 | } 25 | 26 | module.exports = { 27 | transformData 28 | } 29 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/created/post.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed post sending information to external backoffice application 15 | * 16 | * @param {object} data - data received before transformation 17 | * @param {object} transformed - transformed received data 18 | * @param {object} preProcessed - preprocessed result data 19 | * @param {object} result - result data from the sender 20 | */ 21 | function postProcess (data, transformed, preProcessed, result) { 22 | } 23 | 24 | module.exports = { 25 | postProcess 26 | } 27 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/created/validator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function validate the order data received 15 | * 16 | * @param {object} data - Received data from adobe commerce 17 | * @returns {object} - returns the result of validation object 18 | */ 19 | function validateData (data) { 20 | // @TODO Here add the logic to validate the received data 21 | // @TODO in case of error return { success: false, message: '' } 22 | 23 | return { 24 | success: true 25 | } 26 | } 27 | 28 | module.exports = { 29 | validateData 30 | } 31 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/updated/validator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function validate the order data received 15 | * 16 | * @param {object} data - Received data from adobe commerce 17 | * @returns {object} - returns the result of validation object 18 | */ 19 | function validateData (data) { 20 | // @TODO Here add the logic to validate the received data 21 | // @TODO in case of error return { success: false, message: '' } 22 | 23 | return { 24 | success: true 25 | } 26 | } 27 | 28 | module.exports = { 29 | validateData 30 | } 31 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/created/validator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function validate the order data received 15 | * 16 | * @param {object} data - Received data from adobe commerce 17 | * @returns {object} - returns the result of validation object 18 | */ 19 | function validateData (data) { 20 | 21 | if (data?.orderId === undefined) { 22 | return { 23 | success: false, 24 | message: 'Missing orderId' 25 | } 26 | } 27 | 28 | return { 29 | success: true 30 | } 31 | } 32 | 33 | module.exports = { 34 | validateData 35 | } 36 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/web-src/src/components/ExtensionRegistration.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { register } from '@adobe/uix-guest' 13 | import { MainPage } from './MainPage' 14 | import { useEffect } from 'react' 15 | import { extensionId } from './Constants' 16 | 17 | export default function ExtensionRegistration(props) { 18 | 19 | useEffect(() => { 20 | (async () => { 21 | 22 | await register({ 23 | id: extensionId, 24 | methods: { 25 | } 26 | }) 27 | 28 | })() 29 | }, []) 30 | 31 | return 32 | } 33 | -------------------------------------------------------------------------------- /api-mesh/custom-field/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "CommerceAPI", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}", 9 | "useGETForQueries": true, 10 | "operationHeaders": { 11 | "Content-Type": "application/json", 12 | "Store": "{context.headers['store']}", 13 | "Authorization": "context.headers['Authorization']" 14 | } 15 | } 16 | } 17 | }, 18 | { 19 | "name": "Announcements", 20 | "handler": { 21 | "JsonSchema": { 22 | "baseUrl": "{{env.ANNOUNCEMENTS_ENDPOINT}}", 23 | "operations": [ 24 | { 25 | "type": "Query", 26 | "field": "announcements", 27 | "path": "/", 28 | "method": "GET", 29 | "responseSample": "{{env.ANNOUNCEMENTS_ENDPOINT}}" 30 | } 31 | ] 32 | } 33 | } 34 | } 35 | ], 36 | "additionalTypeDefs": "extend type StoreConfig {announcement: String}", 37 | "additionalResolvers": ["./resolvers.js"] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /api-mesh/response-caching/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "Commerce", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}", 9 | "useGETForQueries": true, 10 | "operationHeaders": { 11 | "Content-Type": "application/json", 12 | "Magento-Environment-Id": "{context.headers['magento-environment-id']}", 13 | "Magento-Website-Code": "{context.headers['magento-website-code']}", 14 | "Magento-Store-View-Code": "{context.headers['magento-store-view-code']}", 15 | "Magento-Store-Code": "{context.headers['magento-store-code']}", 16 | "Magento-Customer-Group": "{context.headers['magento-customer-group']}", 17 | "x-api-key": "{context.headers['x-api-key']}", 18 | "Authorization": "context.headers['Authorization']" 19 | } 20 | } 21 | }, 22 | "responseConfig": { 23 | "cache": { 24 | "cacheControl": "public, max-age=120" 25 | } 26 | } 27 | } 28 | ], 29 | "responseConfig": { 30 | "cache": true 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:20' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | CustomMenu: 22 | license: Apache-2.0 23 | actions: 24 | commerce-rest-get: 25 | function: actions/commerce/index.js 26 | web: 'yes' 27 | runtime: 'nodejs:20' 28 | inputs: 29 | LOG_LEVEL: debug 30 | COMMERCE_BASE_URL: $COMMERCE_BASE_URL 31 | COMMERCE_CONSUMER_KEY: $COMMERCE_CONSUMER_KEY 32 | COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET 33 | COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN 34 | COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET 35 | annotations: 36 | require-adobe-auth: true 37 | final: true 38 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/actions/customer/external/created/transformer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received customer data from external back-office application to Adobe commerce 15 | * 16 | * @param {object} params - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (params) { 20 | return { 21 | customer: { 22 | email: params.data.PrimaryContactEmail, 23 | firstname: params.data.PersonFirstName, 24 | lastname: params.data.PersonLastName 25 | } 26 | } 27 | } 28 | 29 | module.exports = { 30 | transformData 31 | } 32 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-created/post.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed post sending information to Adobe commerce 15 | * 16 | * @param {object} data - data received before transformation 17 | * @param {object} transformed - transformed received data 18 | * @param {object} preProcessed - preprocessed result data 19 | * @param {object} result - result data from the sender 20 | */ 21 | function postProcess (data, transformed, preProcessed, result) { 22 | // @TODO Here implement any preprocessing needed 23 | } 24 | 25 | module.exports = { 26 | postProcess 27 | } 28 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-updated/post.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed post sending information to Adobe commerce 15 | * 16 | * @param {object} data - data received before transformation 17 | * @param {object} transformed - transformed received data 18 | * @param {object} preProcessed - preprocessed result data 19 | * @param {object} result - result data from the sender 20 | */ 21 | function postProcess (data, transformed, preProcessed, result) { 22 | // @TODO Here implement any preprocessing needed 23 | } 24 | 25 | module.exports = { 26 | postProcess 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/src/commerce-backend-ui-1/web-src/index.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | SampleExtension 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/src/commerce-backend-ui-1/ext.config.yaml: -------------------------------------------------------------------------------- 1 | operations: 2 | view: 3 | - type: web 4 | impl: index.html 5 | actions: actions 6 | web: web-src 7 | runtimeManifest: 8 | packages: 9 | admin-ui-sdk: 10 | license: Apache-2.0 11 | actions: 12 | registration: 13 | function: actions/registration/index.js 14 | web: 'yes' 15 | runtime: 'nodejs:20' 16 | inputs: 17 | LOG_LEVEL: debug 18 | annotations: 19 | require-adobe-auth: true 20 | final: true 21 | CustomMenuNoReact: 22 | license: Apache-2.0 23 | actions: 24 | commerce-rest-get: 25 | function: actions/commerce/index.js 26 | web: 'yes' 27 | runtime: 'nodejs:20' 28 | inputs: 29 | LOG_LEVEL: debug 30 | COMMERCE_BASE_URL: $COMMERCE_BASE_URL 31 | COMMERCE_CONSUMER_KEY: $COMMERCE_CONSUMER_KEY 32 | COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET 33 | COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN 34 | COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET 35 | annotations: 36 | require-adobe-auth: true 37 | final: true 38 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/updated/post.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function hold any logic needed post sending information to external backoffice application 15 | * 16 | * @param {object} data - data received before transformation 17 | * @param {object} transformed - transformed received data 18 | * @param {object} preProcessed - preprocessed result data 19 | * @param {object} result - result data from the sender 20 | */ 21 | function postProcess (data, transformed, preProcessed, result) { 22 | // @TODO Here implement any preprocessing needed 23 | } 24 | 25 | module.exports = { 26 | postProcess 27 | } 28 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-menu-no-react", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.4.20", 8 | "@adobe/uix-core": "^1.0.3", 9 | "@adobe/uix-guest": "^1.0.3", 10 | "@spectrum-icons/workflow": "^4.2.25", 11 | "cloudevents": "^6.0.3", 12 | "core-js": "^3.46.0", 13 | "crypto": "^1.0.1", 14 | "crypto-browserify": "^3.12.1", 15 | "got": "^11.8.5", 16 | "https-browserify": "^1.0.0", 17 | "node-fetch": "^3.3.0", 18 | "oauth-1.0a": "^2.2.6", 19 | "os-browserify": "^0.3.0", 20 | "regenerator-runtime": "^0.13.11", 21 | "uuid": "^9.0.1" 22 | }, 23 | "devDependencies": { 24 | "@babel/core": "^7.28.5", 25 | "@babel/plugin-transform-react-jsx": "^7.27.1", 26 | "@babel/polyfill": "^7.12.1", 27 | "@babel/preset-env": "^7.28.5", 28 | "@openwhisk/wskdebug": "^1.4.0", 29 | "jest": "^29.4.2" 30 | }, 31 | "scripts": { 32 | "test": "jest --passWithNoTests ./test", 33 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 34 | }, 35 | "engines": { 36 | "node": "^16.13 || >=18" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/actions.config.yaml: -------------------------------------------------------------------------------- 1 | consumer: 2 | function: consumer/index.js 3 | web: 'no' 4 | runtime: nodejs:20 5 | inputs: 6 | LOG_LEVEL: debug 7 | annotations: 8 | require-adobe-auth: true 9 | final: true 10 | shipment-created: 11 | function: shipment-created/index.js 12 | web: 'no' 13 | runtime: nodejs:20 14 | inputs: 15 | LOG_LEVEL: debug 16 | COMMERCE_BASE_URL: $COMMERCE_BASE_URL 17 | COMMERCE_CONSUMER_KEY: $COMMERCE_CONSUMER_KEY 18 | COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET 19 | COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN 20 | COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET 21 | annotations: 22 | require-adobe-auth: true 23 | final: true 24 | shipment-updated: 25 | function: shipment-updated/index.js 26 | web: 'no' 27 | runtime: nodejs:20 28 | inputs: 29 | LOG_LEVEL: debug 30 | COMMERCE_BASE_URL: $COMMERCE_BASE_URL 31 | COMMERCE_CONSUMER_KEY: $COMMERCE_CONSUMER_KEY 32 | COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET 33 | COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN 34 | COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET 35 | annotations: 36 | require-adobe-auth: true 37 | final: true 38 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/queries/recommendations.graphql: -------------------------------------------------------------------------------- 1 | query GetRecommendations( 2 | $pageType: PageType! 3 | $category: String 4 | $currentSku: String 5 | $cartSkus: [String] 6 | $userPurchaseHistory: [PurchaseHistory] 7 | $userViewHistory: [ViewHistory] 8 | ) { 9 | recommendations( 10 | cartSkus: $cartSkus 11 | category: $category 12 | currentSku: $currentSku 13 | pageType: $pageType 14 | userPurchaseHistory: $userPurchaseHistory 15 | userViewHistory: $userViewHistory 16 | ) { 17 | results { 18 | displayOrder 19 | pageType 20 | productsView { 21 | name 22 | sku 23 | url 24 | images { 25 | url 26 | } 27 | externalId 28 | __typename 29 | } 30 | storefrontLabel 31 | totalProducts 32 | typeId 33 | unitId 34 | unitName 35 | } 36 | totalResults 37 | } 38 | } 39 | 40 | # Sample Variables: 41 | 42 | # { 43 | # "pageType": "Product", 44 | # "currentSku": "24-WG03", 45 | # "userViewHistory": [ 46 | # { "date": "2024-06-05T18:19:52.730Z", "sku": "24-WB06" }, 47 | # { "date": "2024-06-05T18:23:22.712Z", "sku": "24-UG07" }, 48 | # { "date": "2024-06-06T15:05:31.836Z", "sku": "24-WG03" } 49 | # ], 50 | # "userPurchaseHistory": [] 51 | # } -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/email/created/sender.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function send the customer deleted dara to the external back-office application 15 | * 16 | * @param {object} params - include the env params 17 | * @param {object} data - Customer data 18 | * @param {object} preProcessed - result of the pre-process logic if any 19 | * @returns {object} returns the sending result if needed for post process 20 | * @throws {Error} - throws exception in case the process fail. 21 | */ 22 | async function sendData (params, data, preProcessed) { 23 | return { 24 | success: true 25 | } 26 | } 27 | 28 | module.exports = { 29 | sendData 30 | } 31 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/jest.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | module.exports = { 14 | collectCoverage: true, 15 | verbose: false, 16 | silent: true, 17 | collectCoverageFrom: [ 18 | '../actions/**/*.js', 19 | '../onboarding/**/*.js', 20 | '../utils/**/*.js' 21 | ], 22 | coverageDirectory: 'test-coverage', 23 | coverageReporters: ['text-summary', 'html'], 24 | coverageThreshold: { 25 | global: { 26 | branches: 70, 27 | functions: 50, 28 | lines: 80, 29 | statements: 80 30 | } 31 | }, 32 | reporters: [ 33 | 'default' 34 | ], 35 | testEnvironment: 'node', 36 | setupFilesAfterEnv: [ 37 | './jest.setup.js' 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /api-mesh/commerce-rest-and-graphql/README.md: -------------------------------------------------------------------------------- 1 | # API Mesh Configuration with Custom Resolver 2 | 3 | ## Mocking a field in API Mesh 4 | 5 | This is a sample API Mesh configuration that demonstrates how to use multiple commerce sources effortlessly in a single mesh. 6 | 7 | ## Table of Contents 8 | 9 | - [Configuration](#configuration) 10 | - [Explanation](#explanation) 11 | 12 | ## Configuration 13 | 14 | Here's the GraphQL Mesh configuration used in this example: 15 | 16 | ```json 17 | { 18 | "meshConfig": { 19 | "sources": [ 20 | { 21 | "name": "CommerceGraphql", 22 | "handler": { 23 | "graphql": { 24 | "endpoint": "{{env.COMMERCE_GRAPHQL_ENDPOINT}}" 25 | } 26 | } 27 | }, 28 | { 29 | "name": "CommerceREST", 30 | "handler": { 31 | "openapi": { 32 | "source": "{{env.COMMERCE_REST_ENDPOINT}}" 33 | } 34 | } 35 | } 36 | ] 37 | } 38 | } 39 | ``` 40 | 41 | Note: This mesh depends on few variables which need to be provided through `.env`. A [sample env file](./sample.env) has been provided to get started. 42 | 43 | ## Explanation 44 | 45 | - **sources**: Defines the external sources to be included in the mesh. In this example, we are using 2 sources, the Adobe Commerce GraphQL endpoint and the Adobe Commerce REST endpoint. 46 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu-no-react/src/commerce-backend-ui-1/actions/registration/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | async function main() { 14 | const extensionId = 'CustomMenuNoReact' 15 | 16 | return { 17 | statusCode: 200, 18 | body: { 19 | registration: { 20 | menuItems: [ 21 | { 22 | id: `${extensionId}::first`, 23 | title: 'No React SPA Menu', 24 | sortOrder: 1 25 | } 26 | ], 27 | page: { 28 | title: 'Adobe Commerce No React SPA Menu example' 29 | } 30 | } 31 | } 32 | } 33 | } 34 | 35 | exports.main = main 36 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-menu", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.4.20", 8 | "@adobe/react-spectrum": "^3.45.0", 9 | "@adobe/uix-core": "^1.0.3", 10 | "@adobe/uix-guest": "^1.0.3", 11 | "@spectrum-icons/workflow": "^4.2.25", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.46.0", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.1", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.28.5", 30 | "@babel/plugin-transform-react-jsx": "^7.27.1", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.28.5", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-fees", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-created/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "id": { "type": "number" }, 5 | "items": { 6 | "type": "array", 7 | "items": { 8 | "type": "object", 9 | "properties": { 10 | "id": { "type": "number" }, 11 | "qty": { "type": "number" } 12 | }, 13 | "required": ["id", "qty"], 14 | "additionalProperties": false 15 | } 16 | }, 17 | "tracks": { 18 | "type": "array", 19 | "items": { 20 | "type": "object", 21 | "properties": { 22 | "number": { "type": "string" }, 23 | "carrier": { 24 | "type": "object", 25 | "properties": { 26 | "title": { "type": "string" }, 27 | "code": { "type": "string" } 28 | }, 29 | "required": ["title", "code"], 30 | "additionalProperties": false 31 | } 32 | }, 33 | "required": ["number", "carrier"], 34 | "additionalProperties": false 35 | } 36 | }, 37 | "comment" : { 38 | "type": "string" 39 | }, 40 | "inventoryCode": { "type": "string" } 41 | }, 42 | "required": ["id", "items", "tracks", "comment", "inventoryCode"], 43 | "additionalProperties": false 44 | } 45 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-mass-action/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-mass-action", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-view-button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-view-button", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-grid-columns/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "order-custom-grid-columns", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-mass-action/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "product-custom-mass-action", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-grid-columns/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "customer-custom-grid-columns", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/customer/custom-mass-action/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "customer-custom-mass-action", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "product-custom-grid-columns", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/mock-oms-order-api-client.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const fetch = require("node-fetch"); 14 | 15 | /** 16 | * This function call Adobe commerce rest API to create a product 17 | * 18 | * @returns {object} - API response object 19 | * @param {string} baseUrl - Adobe commerce rest api base url 20 | * @param {object} data - Adobe commerce api payload 21 | */ 22 | async function createOrder (baseUrl, data) { 23 | return await fetch( 24 | `${baseUrl}order`, 25 | { 26 | method: 'POST', 27 | headers: { 28 | 'content-type': 'application/json', 29 | }, 30 | body: JSON.stringify(data) 31 | } 32 | ) 33 | } 34 | 35 | module.exports = { 36 | createOrder 37 | } 38 | -------------------------------------------------------------------------------- /starter-kit/customize-ingestion-webhook/actions/customer/external/created/transformer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received customer data from external back-office application to Adobe commerce 15 | * 16 | * @param {object} params - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (params) { 20 | // @TODO This is a sample implementation. Please adapt based on your needs 21 | // @TODO Notice that the attribute_set_id may need to be changed 22 | return { 23 | customer: { 24 | email: params.data.PrimaryContactEmail, 25 | firstname: params.data.PersonFirstName, 26 | lastname: params.data.PersonLastName 27 | } 28 | } 29 | } 30 | 31 | module.exports = { 32 | transformData 33 | } 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/order/custom-fees/README.md: -------------------------------------------------------------------------------- 1 | # Adobe Commerce Order Custom Fees Extension Point 2 | 3 | This application demonstrates how to customize the order custom fees in the Adobe Commerce Admin using the Admin UI SDK. 4 | 5 | ## Overview 6 | 7 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. 8 | 9 | ## Features 10 | 11 | - **Custom Fee**: Add a custom fee to the order upon creation. 12 | 13 | ## Prerequisites 14 | 15 | - Adobe Commerce instance with IMS module installed and enabled. 16 | - Adobe Commerce Admin UI SDK installed and enabled. 17 | - Developer console access to the organization on App Builder. 18 | - App Builder project created. 19 | 20 | ## Installation 21 | 22 | - Run `npm install` to install the dependencies 23 | - Run `aio auth:login` to login to your Adobe I/O account 24 | - Run `aio app use` (select the correct project and workspace) 25 | - Run `aio app deploy` to deploy the application 26 | 27 | ## Local testing 28 | 29 | - Run `aio app run` to start the local development server. 30 | - Create and run a server to redirect to your local application. Refer to the following documentation for more information: [Local Testing](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/configuration/). 31 | 32 | ## Usage 33 | 34 | After installation and configuration, you can access the custom menus and pages from the Commerce Admin panel. 35 | -------------------------------------------------------------------------------- /webhooks/README.md: -------------------------------------------------------------------------------- 1 | # Webhooks Samples 2 | 3 | This section contains a collection of samples that demonstrate the use of Webhooks in Adobe Commerce. 4 | Each application serves as a practical example of how Webhooks can be utilized to enhance the functionality and efficiency of your Adobe Commerce application. 5 | 6 | ## Overview 7 | 8 | Webhooks enable developers to configure synchronous logic to execute calls to external systems when an Adobe Commerce event triggers. Synchronous calls are required when Commerce needs to immediately compute or validate something (order totals, taxes, payments) using a 3rd-party endpoint and write the result back into Adobe Commerce. 9 | 10 | ## Applications List 11 | 12 | The applications covered in this section include: 13 | 14 | - **add-to-cart-stock-validation**: Product add to cart stock validation. 15 | 16 | Please refer to the README file of each individual application for more details. 17 | 18 | ## Getting Started 19 | 20 | To get started with these applications, simply navigate to the directory of the application you are interested in and follow the instructions provided in its README file. 21 | 22 | ## Note 23 | 24 | Please note that this section is still a **work in progress**. Application examples will be available soon. 25 | 26 | ## More information 27 | 28 | To learn more about Webhooks for Adobe Commerce visit the [Developer docs](https://developer.adobe.com/commerce/extensibility/webhooks/). 29 | -------------------------------------------------------------------------------- /api-mesh/commerce-and-catalog/queries/products.graphql: -------------------------------------------------------------------------------- 1 | query ProductQuery($sku: String!) { 2 | products(skus: [$sku]) { 3 | externalId 4 | sku 5 | name 6 | description 7 | shortDescription 8 | urlKey 9 | inStock 10 | metaTitle 11 | metaKeyword 12 | metaDescription 13 | images(roles: []) { 14 | url 15 | label 16 | roles 17 | } 18 | attributes(roles: []) { 19 | name 20 | label 21 | value 22 | roles 23 | } 24 | ... on SimpleProductView { 25 | price { 26 | ...priceFields 27 | } 28 | } 29 | ... on ComplexProductView { 30 | options { 31 | id 32 | title 33 | required 34 | values { 35 | id 36 | title 37 | inStock 38 | ... on ProductViewOptionValueSwatch { 39 | type 40 | value 41 | } 42 | } 43 | } 44 | priceRange { 45 | maximum { 46 | ...priceFields 47 | } 48 | minimum { 49 | ...priceFields 50 | } 51 | } 52 | } 53 | } 54 | } 55 | fragment priceFields on ProductViewPrice { 56 | roles 57 | regular { 58 | amount { 59 | currency 60 | value 61 | } 62 | } 63 | final { 64 | amount { 65 | currency 66 | value 67 | } 68 | } 69 | } 70 | 71 | # Sample Variables: 72 | 73 | # { 74 | # "sku": "24-WG080" 75 | # } 76 | -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/actions/ingestion/actions.config.yaml: -------------------------------------------------------------------------------- 1 | #webhook: 2 | # function: ./webhook/index.js 3 | # web: 'yes' 4 | # runtime: nodejs:20 5 | # inputs: 6 | # LOG_LEVEL: debug 7 | # OAUTH_ORG_ID: $OAUTH_ORG_ID 8 | # OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID 9 | # OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET 10 | # OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID 11 | # OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL 12 | # IO_MANAGEMENT_BASE_URL: $IO_MANAGEMENT_BASE_URL 13 | # IO_CONSUMER_ID: $IO_CONSUMER_ID 14 | # IO_PROJECT_ID: $IO_PROJECT_ID 15 | # IO_WORKSPACE_ID: $IO_WORKSPACE_ID 16 | # AIO_runtime_namespace: $AIO_RUNTIME_NAMESPACE 17 | # annotations: 18 | # require-adobe-auth: false 19 | # final: true 20 | scheduler: 21 | function: ./scheduler/index.js 22 | web: 'no' 23 | runtime: nodejs:20 24 | inputs: 25 | LOG_LEVEL: debug 26 | OAUTH_ORG_ID: $OAUTH_ORG_ID 27 | OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID 28 | OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET 29 | OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID 30 | OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL 31 | IO_MANAGEMENT_BASE_URL: $IO_MANAGEMENT_BASE_URL 32 | IO_CONSUMER_ID: $IO_CONSUMER_ID 33 | IO_PROJECT_ID: $IO_PROJECT_ID 34 | IO_WORKSPACE_ID: $IO_WORKSPACE_ID 35 | AIO_runtime_namespace: $AIO_RUNTIME_NAMESPACE 36 | annotations: 37 | require-adobe-auth: true 38 | final: true 39 | -------------------------------------------------------------------------------- /api-mesh/auth0-integration/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "CommerceAPI", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}", 9 | "operationHeaders": { 10 | "Content-Type": "application/json", 11 | "Store": "{context.headers['store'] || 'default'}", 12 | "Authorization": "{context.headers['authorization']}" 13 | } 14 | } 15 | } 16 | }, 17 | { 18 | "name": "Auth0Management", 19 | "handler": { 20 | "openapi": { 21 | "source": "https://{{env.AUTH0_DOMAIN}}/api/v2/openapi.json", 22 | "operationHeaders": { 23 | "Authorization": "Bearer {{env.AUTH0_MANAGEMENT_TOKEN}}" 24 | } 25 | } 26 | } 27 | } 28 | ], 29 | "additionalTypeDefs": "extend type Query { currentUser: Auth0User } type Auth0User { sub: String! email: String name: String nickname: String picture: String email_verified: Boolean updated_at: String customer: Customer wishlist: Wishlist orders: CustomerOrders addresses: [CustomerAddress] }", 30 | "additionalResolvers": [ 31 | "./resolvers.js" 32 | ], 33 | "responseConfig": { 34 | "headers": [ 35 | { 36 | "name": "X-Auth0-User-Id", 37 | "value": "{context.auth0UserId}" 38 | } 39 | ] 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /api-mesh/mock-response/README.md: -------------------------------------------------------------------------------- 1 | # API Mesh Configuration with Custom Resolver 2 | 3 | ## Mocking a field in API Mesh 4 | 5 | This is a sample API Mesh configuration that demonstrates how to extend the GraphQL Query type with a custom field and add a resolver to return a specific mock response. 6 | 7 | ## Table of Contents 8 | 9 | - [Configuration](#configuration) 10 | - [Explanation](#explanation) 11 | 12 | ## Configuration 13 | 14 | Here's the GraphQL Mesh configuration used in this example: 15 | 16 | ```json 17 | { 18 | "meshConfig": { 19 | "sources": [ 20 | { 21 | "name": "Commerce", 22 | "handler": { 23 | "graphql": { 24 | "endpoint": "{{env.COMMERCE_ENDPOINT}}" 25 | } 26 | } 27 | } 28 | ], 29 | "additionalTypeDefs": ["extend type Query {\n mockedField: String\n}"], 30 | "additionalResolvers": ["./resolvers.js"] 31 | } 32 | } 33 | ``` 34 | 35 | Note: This mesh depends on few variables which need to be provided through `.env`. A [sample env file](./sample.env) has been provided to get started. 36 | 37 | ## Explanation 38 | 39 | - **sources**: Defines the external GraphQL API to be included in the mesh. In this example, we are using the Adobe Commerce GraphQL endpoint. 40 | - **additionalTypeDefs**: Extends the existing GraphQL schema by adding a new field `mockedField` to the Query type. 41 | - **additionalResolvers**: Points to a resolver file that contains the logic to resolve the `mockedField`. 42 | -------------------------------------------------------------------------------- /.github/workflows/api-mesh_mock-response_pr_lint.yml: -------------------------------------------------------------------------------- 1 | name: API Mesh/Mock Response CI 2 | on: [workflow_dispatch] 3 | jobs: 4 | deploy: 5 | name: Lint 6 | runs-on: ${{ matrix.os }} 7 | strategy: 8 | max-parallel: 1 9 | matrix: 10 | node-version: ['20'] 11 | os: [ubuntu-latest] 12 | steps: 13 | 14 | - name: Checkout 15 | uses: actions/checkout@v4 16 | 17 | - name: Prepare Context (Linux/macOS) 18 | if: runner.os != 'Windows' 19 | run: mv -f api-mesh/mock-response/* . 20 | - name: Prepare Context (Windows) 21 | if: runner.os == 'Windows' 22 | run: | 23 | $source = "api-mesh\mock-response\*" 24 | $destination = "." 25 | $files = Get-ChildItem -Path $source 26 | foreach ($file in $files) { 27 | $destPath = Join-Path -Path $destination -ChildPath $file.Name 28 | if (Test-Path -Path $destPath) { 29 | Remove-Item -Path $destPath -Recurse -Force 30 | } 31 | } 32 | Move-Item -Path $source -Destination $destination -Force 33 | 34 | - name: Use Node.js ${{ matrix.node-version }} 35 | uses: actions/setup-node@v4 36 | with: 37 | node-version: ${{ matrix.node-version }} 38 | - name: setup dependancies 39 | run: npm install -g eslint jsonlint 40 | - name: Lint JSON 41 | run: jsonlint *.json 42 | - name: Lint Js 43 | run: eslint *.js 44 | -------------------------------------------------------------------------------- /starter-kit/add-ingestion-scheduler/actions/ingestion/scheduler/payload-transform.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received customer data from external back-office application to Adobe commerce 15 | * 16 | * @param {object} params - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (params) { 20 | switch (params.data.event) { 21 | case 'external_provider.customer_created.v1.0': 22 | return { 23 | PersonFirstName: params.data.value.PersonFirstName, 24 | PersonLastName: params.data.value.PersonLastName, 25 | PrimaryContactEmail: params.data.value.PrimaryContactEmail, 26 | } 27 | default: 28 | return params.data 29 | } 30 | } 31 | 32 | module.exports = { 33 | transformData 34 | } 35 | -------------------------------------------------------------------------------- /starter-kit/customize-ingestion-webhook/actions/ingestion/webhook/payload-transform.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received customer data from external back-office application to Adobe commerce 15 | * 16 | * @param {object} params - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (params) { 20 | switch (params.data.event) { 21 | case 'external_provider.customer_created.v1.0': 22 | return { 23 | PersonFirstName: params.data.value.PersonFirstName, 24 | PersonLastName: params.data.value.PersonLastName, 25 | PrimaryContactEmail: params.data.value.PrimaryContactEmail, 26 | } 27 | default: 28 | return params.data 29 | } 30 | } 31 | 32 | module.exports = { 33 | transformData 34 | } 35 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/env.dist: -------------------------------------------------------------------------------- 1 | OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/ 2 | IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/ 3 | 4 | # OAuth configs 5 | # The following values can be copied from the Credential details page in AppBuilder under Organization > Project > Workspace > OAuth Server-to-Server 6 | OAUTH_CLIENT_ID= 7 | OAUTH_CLIENT_SECRET= 8 | OAUTH_TECHNICAL_ACCOUNT_ID= 9 | OAUTH_TECHNICAL_ACCOUNT_EMAIL= 10 | OAUTH_ORG_ID= 11 | 12 | # Commerce OAuth configs 13 | # These values can be copied from the Integration Details under System > Integrations 14 | # Commerce base URL should finish with slash '/' 15 | COMMERCE_BASE_URL= 16 | COMMERCE_CONSUMER_KEY= 17 | COMMERCE_CONSUMER_SECRET= 18 | COMMERCE_ACCESS_TOKEN= 19 | COMMERCE_ACCESS_TOKEN_SECRET= 20 | 21 | # Commerce Event Module configs 22 | # These values will be used to configure the Adobe I/O Events module automatically 23 | # that can be found at Stores > Configuration > Adobe Services > Adobe I/O Events 24 | COMMERCE_ADOBE_IO_EVENTS_MERCHANT_ID= 25 | 26 | # OMS Configs 27 | OMS_API_BASE_URL= 28 | 29 | # Email Configs 30 | EMAIL_PROVIDER_ID= 31 | 32 | # Workspace configs 33 | # The following values can be copied from the JSON downloadable in AppBuilder from Organization > Project > Workspace 34 | # IO_CONSUMER corresponds to project.org.id 35 | # IO_PROJECT_ID corresponds to project.id 36 | # IO_WORKSPACE_ID corresponds to project.workspace.id 37 | IO_CONSUMER_ID= 38 | IO_PROJECT_ID= 39 | IO_WORKSPACE_ID= 40 | -------------------------------------------------------------------------------- /admin-ui-sdk/product/custom-grid-columns/src/commerce-backend-ui-1/actions/registration/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | async function main() { 14 | return { 15 | statusCode: 200, 16 | body: { 17 | registration: { 18 | product: { 19 | gridColumns: { 20 | data: { 21 | meshId: '' 22 | }, 23 | properties:[ 24 | { 25 | label: 'App Column', 26 | columnId: 'first_column', 27 | type: 'string', 28 | align: 'left' 29 | } 30 | ] 31 | } 32 | } 33 | } 34 | } 35 | } 36 | } 37 | 38 | exports.main = main 39 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/updated/sender.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function send the order updated data to the external back-office application 15 | * 16 | * @param {object} params - include the env params 17 | * @param {object} data - order data 18 | * @param {object} preProcessed - result of the pre-process logic if any 19 | * @returns {object} returns the sending result if needed for post process 20 | */ 21 | async function sendData (params, data, preProcessed) { 22 | // @TODO Here add the logic to send the information to 3rd party 23 | // @TODO Use params to retrieve need parameters from the environment 24 | // @TODO in case of error return { success: false, statusCode: , message: '' } 25 | 26 | return { 27 | success: true 28 | } 29 | } 30 | 31 | module.exports = { 32 | sendData 33 | } 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/README.md: -------------------------------------------------------------------------------- 1 | # Admin UI SDK Samples 2 | 3 | This directory contains samples for different extension points of the Adobe Commerce Admin UI SDK. 4 | 5 | ## Overview 6 | 7 | The Adobe Commerce Admin UI SDK allows developers to extend the Commerce Admin to include custom menus, pages, and other features. 8 | These examples demonstrate how to use the SDK to create these extensions. 9 | 10 | ## Directory Structure 11 | 12 | - `menu`: Contains samples of how to create custom menus in the Commerce Admin. 13 | - `order`: Contains samples of how to create 14 | - `order view button`: custom order view button in the Commerce Admin. 15 | - `order grid columns`: custom columns in the order grid in the Commerce Admin. 16 | - `order mass action`: custom mass action in the order grid in the Commerce Admin. 17 | - `product`: Contains examples of how to create 18 | - `product grid columns`: custom columns in the product grid in the Commerce Admin. 19 | - `product mass action`: custom mass action in the product grid in the Commerce Admin. 20 | 21 | ## Installation 22 | 23 | Each sample has its own README file with specific installation instructions. Please refer to the README file in the respective sample directory for more information. 24 | 25 | ## Usage 26 | 27 | After installing a sample, you can access the custom features from the Commerce Admin panel. 28 | 29 | ## More Information 30 | 31 | To learn more about the Admin UI SDK visit the [Developer docs](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/). 32 | -------------------------------------------------------------------------------- /api-mesh/okta-integration/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "CommerceAPI", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}", 9 | "operationHeaders": { 10 | "Content-Type": "application/json", 11 | "Store": "{context.headers['store'] || 'default'}", 12 | "Authorization": "{context.headers['authorization']}" 13 | } 14 | } 15 | } 16 | }, 17 | { 18 | "name": "OktaUsers", 19 | "handler": { 20 | "openapi": { 21 | "source": "https://{{env.OKTA_DOMAIN}}/api/v1/openapi.json", 22 | "operationHeaders": { 23 | "Authorization": "SSWS {{env.OKTA_API_TOKEN}}", 24 | "Accept": "application/json" 25 | } 26 | } 27 | } 28 | } 29 | ], 30 | "additionalTypeDefs": "extend type Query { currentUser: OktaUser } type OktaUser { id: String! email: String! login: String! firstName: String lastName: String status: String created: String activated: String lastLogin: String customer: Customer orders: CustomerOrders wishlist: Wishlist addresses: [CustomerAddress] }", 31 | "additionalResolvers": [ 32 | "./resolvers.js" 33 | ], 34 | "responseConfig": { 35 | "headers": [ 36 | { 37 | "name": "X-Okta-User-Id", 38 | "value": "{context.oktaUserId}" 39 | } 40 | ] 41 | } 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/commerce/created/transformer.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | /** 14 | * This function transform the received order data from Adobe commerce to external back-office application 15 | * 16 | * @param {object} data - Data received from Adobe commerce 17 | * @returns {object} - Returns transformed data object 18 | */ 19 | function transformData (data) { 20 | return { 21 | data: { 22 | ids: { 23 | order: `${data.id}`, 24 | increment: `${data.increment_id}` 25 | }, 26 | timestamps: { 27 | createdAt: `${data.created_at}`, 28 | updatedAt: `${data.updated_at}`, 29 | }, 30 | items: data.items.map(item => ({ 31 | id: `${item.item_id}`, 32 | sku: `${item.sku}`, 33 | qty: `${item.qty_ordered}` 34 | })) 35 | } 36 | } 37 | } 38 | 39 | module.exports = { 40 | transformData 41 | } 42 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-created/validator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const Ajv = require('ajv') 14 | 15 | /** 16 | * This function validate the shipment data received from external back-office application 17 | * 18 | * @returns {object} - returns the result of validation object 19 | * @param {object} params - Received data from adobe commerce 20 | */ 21 | function validateData (params) { 22 | const data = params.data 23 | const ajv = new Ajv() 24 | const schema = require('./schema.json') 25 | 26 | const validate = ajv.compile(schema) 27 | const isValid = validate(data) 28 | if (!isValid) { 29 | return { 30 | success: false, 31 | message: `Data provided does not validate with the schema: ${(JSON.stringify(data))}` 32 | } 33 | } 34 | return { 35 | success: true 36 | } 37 | } 38 | 39 | module.exports = { 40 | validateData 41 | } 42 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/actions/order/external/shipment-updated/validator.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | const Ajv = require('ajv') 14 | 15 | /** 16 | * This function validate the shipment data received from external back-office application 17 | * 18 | * @returns {object} - returns the result of validation object 19 | * @param {object} params - Received data from adobe commerce 20 | */ 21 | function validateData (params) { 22 | const data = params.data 23 | const ajv = new Ajv() 24 | const schema = require('./schema.json') 25 | 26 | const validate = ajv.compile(schema) 27 | const isValid = validate(data) 28 | if (!isValid) { 29 | return { 30 | success: false, 31 | message: `Data provided does not validate with the schema: ${(JSON.stringify(data))}` 32 | } 33 | } 34 | return { 35 | success: true 36 | } 37 | } 38 | 39 | module.exports = { 40 | validateData 41 | } 42 | -------------------------------------------------------------------------------- /admin-ui-sdk/menu/custom-menu/src/commerce-backend-ui-1/web-src/src/hooks/useCommerceOrders.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2024 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | import { useEffect, useState } from 'react' 13 | import { callAction } from '../utils' 14 | 15 | export const useCommerceOrders = props => { 16 | const [isLoadingCommerceOrders, setIsLoadingCommerceOrders] = useState(true) 17 | const [commerceOrders, setCommerceOrders] = useState([]) 18 | 19 | const fetchCommerceOrders = async () => { 20 | const commerceOrdersResponse = await callAction( 21 | props, 22 | 'CustomMenu/commerce-rest-get', 23 | 'orders?searchCriteria=all' 24 | ) 25 | setCommerceOrders(commerceOrdersResponse.error ? [] : commerceOrdersResponse.items) 26 | } 27 | 28 | useEffect(() => { 29 | fetchCommerceOrders().then(() => setIsLoadingCommerceOrders(false)) 30 | }, []) 31 | 32 | return { isLoadingCommerceOrders, commerceOrders } 33 | } 34 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-mass-actions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "banner-notification-custom-mass-action", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /admin-ui-sdk/banner-notification/custom-order-view-button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "banner-notification-order-custom-view-button", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@adobe/aio-sdk": "^3.0.0", 7 | "@adobe/exc-app": "^1.1.3", 8 | "@adobe/react-spectrum": "^3.30.0", 9 | "@adobe/uix-core": "^0.8.3", 10 | "@adobe/uix-guest": "^0.8.3", 11 | "@spectrum-icons/workflow": "^4.2.4", 12 | "cloudevents": "^6.0.3", 13 | "core-js": "^3.27.2", 14 | "crypto": "^1.0.1", 15 | "crypto-browserify": "^3.12.0", 16 | "got": "^11.8.5", 17 | "https-browserify": "^1.0.0", 18 | "node-fetch": "^3.3.0", 19 | "oauth-1.0a": "^2.2.6", 20 | "os-browserify": "^0.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-error-boundary": "^3.1.4", 24 | "react-router-dom": "^6.8.1", 25 | "regenerator-runtime": "^0.13.11", 26 | "uuid": "^9.0.1" 27 | }, 28 | "devDependencies": { 29 | "@babel/core": "^7.20.12", 30 | "@babel/plugin-transform-react-jsx": "^7.20.13", 31 | "@babel/polyfill": "^7.12.1", 32 | "@babel/preset-env": "^7.20.2", 33 | "@openwhisk/wskdebug": "^1.4.0", 34 | "jest": "^29.4.2" 35 | }, 36 | "scripts": { 37 | "test": "jest --passWithNoTests ./test", 38 | "e2e": "jest --collectCoverage=false --testRegex ./e2e" 39 | }, 40 | "engines": { 41 | "node": "^16.13 || >=18" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /api-mesh/azure-ad-integration/meshConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "meshConfig": { 3 | "sources": [ 4 | { 5 | "name": "CommerceAPI", 6 | "handler": { 7 | "graphql": { 8 | "endpoint": "{{env.COMMERCE_ENDPOINT}}", 9 | "operationHeaders": { 10 | "Content-Type": "application/json", 11 | "Store": "{context.headers['store'] || 'default'}", 12 | "Authorization": "{context.headers['authorization']}" 13 | } 14 | } 15 | } 16 | }, 17 | { 18 | "name": "MicrosoftGraph", 19 | "handler": { 20 | "openapi": { 21 | "source": "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml", 22 | "operationHeaders": { 23 | "Authorization": "{context.headers['authorization']}" 24 | } 25 | } 26 | } 27 | } 28 | ], 29 | "additionalTypeDefs": "extend type Query { currentUser: AzureADUser } type AzureADUser { id: String! userPrincipalName: String! mail: String displayName: String givenName: String surname: String jobTitle: String officeLocation: String mobilePhone: String customer: Customer orders: CustomerOrders wishlist: Wishlist addresses: [CustomerAddress] }", 30 | "additionalResolvers": [ 31 | "./resolvers.js" 32 | ], 33 | "responseConfig": { 34 | "headers": [ 35 | { 36 | "name": "X-Azure-User-Id", 37 | "value": "{context.azureUserId}" 38 | } 39 | ] 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/actions/stock/external/updated/sender.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | jest.mock('../../../../../actions/stock/commerce-stock-api-client') 14 | const { updateStock } = require('../../../../../actions/stock/commerce-stock-api-client') 15 | 16 | const sender = require('../../../../../actions/stock/external/updated/sender') 17 | 18 | describe('Given stock external updated sender', () => { 19 | describe('When method sendData is defined', () => { 20 | test('Then is an instance of Function', () => { 21 | expect(sender.sendData).toBeInstanceOf(Function) 22 | }) 23 | }) 24 | describe('When method sendData is called', () => { 25 | test('Then update stock is called', async () => { 26 | const params = {} 27 | const transformed = {} 28 | const preprocess = {} 29 | await sender.sendData(params, transformed, preprocess) 30 | expect(updateStock).toHaveBeenCalled() 31 | }) 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Adobe Commerce - Extensibility Code Samples 2 | 3 | This project is a collection of code samples that demonstrate common extensibility use cases for Adobe Commerce. 4 | 5 | ## What this project is 6 | 7 | This project is intended as a reference for developers to learn how to extend and integrate Adobe Commerce. The code is meant to showcase concepts and may not necessarily implement real-world scenarios. 8 | 9 | ## What this project isn't 10 | 11 | The code in the project is not meant to be construed as production-ready code and should not be used as-is in production use cases. It may not have been tested for security, performance, or other best practices. 12 | 13 | ## Prerequisites 14 | 15 | - Access to Adobe Developer Console. 16 | - Full access or trial access to App Builder. 17 | - Project and workspaces has been created and correctly configured. 18 | - AIO CLI installed to run commands. 19 | 20 | ## How to use this project 21 | 22 | The code and comments are expected to be self-explanatory and developers can use them to learn the concepts. When deploying code from this project, ensure it is only used in development environments 23 | 24 | ## Contributing to this project 25 | 26 | Contributions are welcomed! 27 | 28 | - Contribute new samples: runtime actions, mesh configs, dropins, etc… 29 | - Samples should be heavily commented describing WHAT the code does and WHY. 30 | - Report or fix any bugs or inefficiencies. 31 | - Participate in code reviews. 32 | 33 | ## Licensing 34 | 35 | This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information. 36 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/actions/order/external/updated/sender.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | jest.mock('../../../../../actions/order/commerce-order-api-client') 14 | const { addComment } = require('../../../../../actions/order/commerce-order-api-client') 15 | 16 | const sender = require('../../../../../actions/order/external/updated/sender') 17 | 18 | describe('Given order external updated sender', () => { 19 | describe('When method sendData is defined', () => { 20 | test('Then is an instance of Function', () => { 21 | expect(sender.sendData).toBeInstanceOf(Function) 22 | }) 23 | }) 24 | describe('When method sendData is called', () => { 25 | test('Then order add comment is called', async () => { 26 | const params = { data: { id: 99 } } 27 | const transformed = {} 28 | const preprocess = {} 29 | await sender.sendData(params, transformed, preprocess) 30 | expect(addComment).toHaveBeenCalled() 31 | }) 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/actions/product/external/created/sender.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | jest.mock('../../../../../actions/product/commerce-product-api-client') 14 | const { createProduct } = require('../../../../../actions/product/commerce-product-api-client') 15 | 16 | const sender = require('../../../../../actions/product/external/created/sender') 17 | 18 | describe('Given product external created sender', () => { 19 | describe('When method sendData is defined', () => { 20 | test('Then is an instance of Function', () => { 21 | expect(sender.sendData).toBeInstanceOf(Function) 22 | }) 23 | }) 24 | describe('When method sendData is called', () => { 25 | test('Then create product is called', async () => { 26 | const params = {} 27 | const transformed = {} 28 | const preprocess = {} 29 | await sender.sendData(params, transformed, preprocess) 30 | expect(createProduct).toHaveBeenCalled() 31 | }) 32 | }) 33 | }) 34 | -------------------------------------------------------------------------------- /starter-kit/order-bidirectional-integration-sample-prj/test/actions/product/external/deleted/sender.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 Adobe. All rights reserved. 3 | This file is licensed to you under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. You may obtain a copy 5 | of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software distributed under 8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 9 | OF ANY KIND, either express or implied. See the License for the specific language 10 | governing permissions and limitations under the License. 11 | */ 12 | 13 | jest.mock('../../../../../actions/product/commerce-product-api-client') 14 | const { deleteProduct } = require('../../../../../actions/product/commerce-product-api-client') 15 | 16 | const sender = require('../../../../../actions/product/external/deleted/sender') 17 | 18 | describe('Given product external deleted sender', () => { 19 | describe('When method sendData is defined', () => { 20 | test('Then is an instance of Function', () => { 21 | expect(sender.sendData).toBeInstanceOf(Function) 22 | }) 23 | }) 24 | describe('When method sendData is called', () => { 25 | test('Then delete product is called', async () => { 26 | const params = {} 27 | const transformed = {} 28 | const preprocess = {} 29 | await sender.sendData(params, transformed, preprocess) 30 | expect(deleteProduct).toHaveBeenCalled() 31 | }) 32 | }) 33 | }) 34 | --------------------------------------------------------------------------------