From 70a8fa09fc7defcbc81aeeaa71bd2ac15929e119 Mon Sep 17 00:00:00 2001 From: Rudge Date: Tue, 30 Jan 2024 12:46:43 -0300 Subject: [PATCH 1/4] fix: use auth token to call order form update --- node/resolvers/mutations/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/resolvers/mutations/index.ts b/node/resolvers/mutations/index.ts index ac437d3..5e06940 100644 --- a/node/resolvers/mutations/index.ts +++ b/node/resolvers/mutations/index.ts @@ -346,7 +346,7 @@ export const Mutation = { const { clients: { masterdata, hub }, vtex, - vtex: { account, logger, storeUserAuthToken }, + vtex: { account, logger, authToken }, } = ctx const { sessionData, storefrontPermissions } = vtex as any @@ -361,7 +361,7 @@ export const Mutation = { const useHeaders = { 'Content-Type': 'application/json', - Cookie: `VtexIdclientAutCookie=${storeUserAuthToken};`, + Cookie: `VtexIdclientAutCookie=${authToken};`, } try { From d05af49c1a72d4adf4f90baf23593f9a514f3058 Mon Sep 17 00:00:00 2001 From: Rudge Date: Tue, 30 Jan 2024 12:48:15 -0300 Subject: [PATCH 2/4] fix: add policies to update order form --- manifest.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 6d70f4f..0adeca4 100644 --- a/manifest.json +++ b/manifest.json @@ -14,9 +14,7 @@ "vtex.b2b-organizations-graphql": "0.x", "vtex.orders-broadcast": "0.x" }, - "registries": [ - "smartcheckout" - ], + "registries": ["smartcheckout"], "policies": [ { "name": "vbase-read-write" @@ -132,6 +130,12 @@ "host": "rc.vtex.com", "path": "/api/analytics/schemaless-events" } + }, + { + "name": "SaveOrderFormConfiguration" + }, + { + "name": "AcessaTodosCarrinhos" } ], "$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema" From 7abf4ef5c774d340b711bf5edecc6171fe0c5ee5 Mon Sep 17 00:00:00 2001 From: Rudge Date: Tue, 30 Jan 2024 13:34:49 -0300 Subject: [PATCH 3/4] chore: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c7ae21..3f1192d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Adjust the auth token and policies to update the order form when using the quote. + ## [2.5.0] - 2023-12-15 ### Added From fd186a6b01137925b7d66bbd34eaecb337b7f48d Mon Sep 17 00:00:00 2001 From: Rudge Date: Tue, 30 Jan 2024 13:45:06 -0300 Subject: [PATCH 4/4] build: update sonar action version --- .github/workflows/qe-dispatch.yml | 2 +- .github/workflows/qe-pull-request-target.yml | 2 +- .github/workflows/qe-pull-request.yml | 2 +- .github/workflows/qe-push.yml | 2 +- .github/workflows/qe-schedule.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/qe-dispatch.yml b/.github/workflows/qe-dispatch.yml index b94ad49..171d5fb 100644 --- a/.github/workflows/qe-dispatch.yml +++ b/.github/workflows/qe-dispatch.yml @@ -13,7 +13,7 @@ on: jobs: quality-engineering: name: QE - uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2 + uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2.1.14 with: cypress: true cyRunnerBranch: ${{ github.event.inputs.cyRunnerBranch }} diff --git a/.github/workflows/qe-pull-request-target.yml b/.github/workflows/qe-pull-request-target.yml index 65d3ce1..531c396 100644 --- a/.github/workflows/qe-pull-request-target.yml +++ b/.github/workflows/qe-pull-request-target.yml @@ -11,7 +11,7 @@ on: jobs: quality-engineering: name: QE - uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2 + uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2.1.14 with: danger: true dangerRequireChangelog: false diff --git a/.github/workflows/qe-pull-request.yml b/.github/workflows/qe-pull-request.yml index ec9d0ed..3637a10 100644 --- a/.github/workflows/qe-pull-request.yml +++ b/.github/workflows/qe-pull-request.yml @@ -14,7 +14,7 @@ on: jobs: quality-engineering: name: QE - uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2 + uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2.1.14 with: danger: true dangerRequireChangelog: false diff --git a/.github/workflows/qe-push.yml b/.github/workflows/qe-push.yml index 845e61f..005d570 100644 --- a/.github/workflows/qe-push.yml +++ b/.github/workflows/qe-push.yml @@ -9,7 +9,7 @@ on: jobs: quality-engineering: name: QE - uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2 + uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2.1.14 with: nodeLint: true nodeTest: false diff --git a/.github/workflows/qe-schedule.yml b/.github/workflows/qe-schedule.yml index d396f8a..0d74a10 100644 --- a/.github/workflows/qe-schedule.yml +++ b/.github/workflows/qe-schedule.yml @@ -7,7 +7,7 @@ on: jobs: quality-engineering: name: QE - uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2 + uses: vtex-apps/usqa/.github/workflows/quality-engineering.yml@v2.1.14 with: cypress: true cyRunnerTimeOut: 45