@vtex/faststore-plugin-buyer-portal 1.3.34 → 1.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ metadata:
4
4
  name: organization-account
5
5
  annotations:
6
6
  github.com/project-slug: vtex/faststore-plugin-buyer-portal
7
- backstage.io/techdocs-ref: dir:../
7
+ vtex.com/application-id: XCQV318B
8
8
  spec:
9
9
  type: frontend-ui
10
10
  lifecycle: stable
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.35] - 2025-12-02
11
+
12
+ ### Added
13
+
14
+ - Add runbooks to docs
15
+
10
16
  ## [1.3.34] - 2025-12-01
11
17
 
12
18
  ### Added
@@ -321,7 +327,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
321
327
  - Add CHANGELOG file
322
328
  - Add README file
323
329
 
324
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.34...HEAD
330
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.35...HEAD
325
331
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
326
332
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
327
333
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -362,3 +368,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
362
368
 
363
369
  > > > > > > > main
364
370
  > > > > > > > [1.3.11]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.11
371
+
372
+ [1.3.35]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.35
@@ -0,0 +1,29 @@
1
+ # Organization Account (Previously known as Buyer Portal) - Troubleshooting Guide
2
+
3
+ This document serves as the main index for troubleshooting guides for the Organization Account.
4
+
5
+ ## 📋 Troubleshooting Guides
6
+
7
+ ### Cache Policies
8
+
9
+ - **[Cache Policies Known Issues and Guides](./troubleshooting/Cache%20Policies.md.md)**
10
+ - Redirect not working between pages - But navigation via url is working.
11
+ - How to navigate without being affected by cache policies
12
+
13
+ ### Backend For Front
14
+
15
+ - **[Backend for Front Guides](./troubleshooting/BFF.md)**
16
+ - How to run Organization Account with a linked instance of the BFF
17
+
18
+ ### Bug reproduction
19
+
20
+ - **[Best pratices for reproducing bugs](./troubleshooting/Bugs.md)**
21
+
22
+ ### Experimental versions
23
+
24
+ - **[How to generate experimental versions](./troubleshooting/Experimental%20Versions.md)**
25
+ - What to do when a bug happens only in production
26
+
27
+ > 📚 **Additional Resources:**
28
+ >
29
+ > - [VTEX B2B Documentation](https://developers.vtex.com/vtex-rest-api/docs/b2b-overview)
@@ -0,0 +1,42 @@
1
+ ## Backend for Front - Buyer Portal Graphql
2
+
3
+ ### How to run the Organization Account with a linked workspace
4
+
5
+ #### How to create and link an workspace
6
+
7
+ Clone the [Buyer Portal Graphql Repo](https://github.com/vtex/buyer-portal-graphql)
8
+
9
+ Via terminal, login into your development account with the following command (IE: `b2bfaststoredev`)
10
+
11
+ ```
12
+ vtex login {{accountName}}
13
+ ```
14
+
15
+ In the same terminal instance, create your workspace with
16
+ the following command:
17
+
18
+ - The `-r` option resets the workspace if you are using the same name as one created previously
19
+
20
+ ```
21
+ vtex use {{workspaceName}} -r
22
+ ```
23
+
24
+ Once inside your workspace, link the app with the following command:
25
+
26
+ ```
27
+ vtex link
28
+ ```
29
+
30
+ Wait for the build and the link and at the end you should see all the REST apis listed on your terminal.
31
+
32
+ #### How to make Organization Account use the linked workspace
33
+
34
+ Go to the follwing file `src/features/shared/utils/constants.ts`
35
+
36
+ Replace `{{workspace}}` on line 7 with your workspace name
37
+
38
+ Comment the default function - Lines 3 and 4
39
+
40
+ Uncomment the changed function - Lines 6 and 7.
41
+
42
+ If the plugin is already started - re-start it.
@@ -0,0 +1,13 @@
1
+ ## Bug Reproduction: Best Practices
2
+
3
+ ### Replicating the bug
4
+
5
+ Things to check when trying to reproduce a bug
6
+
7
+ - You are using the same account as the report
8
+ - You are using the same app versions as the report
9
+ - You created a new user and added it to the same Org Unit and Contract as the report
10
+
11
+ ### Why use the same Org Unit and Contract:
12
+
13
+ Bug can be, and ofter are, related to Scope. The best way to emulate the circustances where the bug happened is to have the same Scope apply to your user.
@@ -0,0 +1,39 @@
1
+ ## Cache policies
2
+
3
+ ### Known Issue with new accounts: Redirects are not working inside Organization Account
4
+
5
+ One of the reasons that redirects might not work inside organization account or in the drawer that redirects to it is the cache policies from the CDN that control what is passed in terms of cookies and headers to every new page.
6
+
7
+ Since the Organization Account relies heavily on the authentication cookie (Ex: `VtexIdclientAutCookie_{{accountName}})`), if this cookie is not sent with the page load, most pages won't load.
8
+
9
+ To validate if the cookies are being sent, follow this steps:
10
+
11
+ #### How to check if the cookie is being sent:
12
+
13
+ - Open your account using the production domain, IE: `faststore.vtexfaststore.com` and be sure to be logged in.
14
+
15
+ - Open your browsers's developer tools (F12, usually) and go to the network tab
16
+
17
+ - Activate the `preserve log` or equivalent option
18
+
19
+ - Use the `Company` drawer to go to Organization Account -> It's important to go through the drawer and not typing the url directly
20
+
21
+ - After you click `Manage` on the drawer, one of the first requests in your `network` tab should follow this format: `https://{{accountDomain}}/_next/data/{{buildId}}/{{locale}}/pvt/organization-account/org-unit/{{orgUnitId}}`
22
+
23
+ - Check the `Response` on this request, inside of it, there should be a `clientContext` object and this object should have a `cookie` property, inside of it, the auth cookie must be present.
24
+
25
+ ##### The auth cookie is not present on Response
26
+
27
+ - Check the request `Response Headers` for the `X-Cache` key, it should have the value `Miss from cloudfront`
28
+
29
+ ##### The request doesn't have the `Miss from cloudfront` value on header
30
+
31
+ - Contact the traffic team (#traffic) and explain that you need to change the cache policy of this new account to respect the `/_next/data/*/pvt/` rule.
32
+
33
+ ### How to navigate in a production build without being afected by cache policies.
34
+
35
+ Most accounts have a `vtex.app` domain, this domain is not subject to the rules coming from the CDN and can be used to check if the problem is related to cache policies.
36
+
37
+ Just go to `{{accountName}}.vtex.app` and manually insert you auth cookie so it recognizes you as logged in
38
+
39
+ If your bug doesn't happen while using this domain, there is a good chance it's related to a cache policy.
@@ -0,0 +1,27 @@
1
+ ## Experimental Versions
2
+
3
+ ### What to do when a bug happens only in the production environment?
4
+
5
+ #### First, generate an experimental version
6
+
7
+ Make sure that your working tree is clean
8
+
9
+ Run the following command:
10
+
11
+ ```
12
+ yarn release:beta
13
+ ```
14
+
15
+ This will copy your current branch to a `beta` branch, generate an experimental version on `npm` and then go back to your working branch.
16
+
17
+ To get the version id, go to the [Registry Page](https://www.npmjs.com/package/@vtex/faststore-plugin-buyer-portal)
18
+
19
+ #### Install the experimental version on the development store
20
+
21
+ Clone the [development store repo](https://github.com/vtex-sites/b2bfaststoredev.store)
22
+
23
+ Open a pull request replacing the version on `package.json` with your experimental one.
24
+
25
+ Wait for the preview to be generated, with it, you have a production environment with your experimental version.
26
+
27
+ If you need to test it in the main domain, you will need to merge this PR, just **make sure to have a revert PR ready and warn the rest of the team about the installation**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.34",
3
+ "version": "1.3.35",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ export const API_URL = (checkoutUrl: string, operation?: string) =>
4
4
  `${checkoutUrl}/_v/store-front/${operation}`;
5
5
  // DEV URL - CHANGE BEFORE MERGE
6
6
  // export const API_URL = (checkoutUrl?: string, operation?: string) =>
7
- // `https://permission--b2bfaststoredev.myvtex.com/_v/store-front/${operation}`;
7
+ // `https://{{workspace}}--b2bfaststoredev.myvtex.com/_v/store-front/${operation}`;
8
8
 
9
9
  export const DEBOUNCE_TIMEOUT = 500;
10
10
 
@@ -13,4 +13,4 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
13
13
  export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
14
14
  "bp_hide_edit_recipient_confirm";
15
15
 
16
- export const CURRENT_VERSION = "1.3.34";
16
+ export const CURRENT_VERSION = "1.3.35";