@faststore/core 3.84.5 → 3.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +83 -83
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/react-loadable-manifest.json +1 -1
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/948.js +2 -2
  14. package/.next/server/chunks/9563.js +2 -2
  15. package/.next/server/chunks/9630.js +1 -1
  16. package/.next/server/chunks/ButtonSignIn.js +1 -1
  17. package/.next/server/functions-config-manifest.json +1 -1
  18. package/.next/server/middleware-build-manifest.js +1 -1
  19. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  20. package/.next/server/pages/api/graphql.js +2 -2
  21. package/.next/server/pages/en-US/404.html +1 -1
  22. package/.next/server/pages/en-US/404.json +1 -1
  23. package/.next/server/pages/en-US/500.html +1 -1
  24. package/.next/server/pages/en-US/500.json +1 -1
  25. package/.next/server/pages/en-US/checkout.html +1 -1
  26. package/.next/server/pages/en-US/checkout.json +1 -1
  27. package/.next/server/pages/en-US/login.html +1 -1
  28. package/.next/server/pages/en-US/login.json +1 -1
  29. package/.next/server/pages/en-US/s.html +1 -1
  30. package/.next/server/pages/en-US/s.json +1 -1
  31. package/.next/server/pages/en-US.html +1 -1
  32. package/.next/server/pages/en-US.json +1 -1
  33. package/.next/server/pages/pvt/account/403.js +1 -0
  34. package/.next/server/pages/pvt/account/404.js +1 -0
  35. package/.next/server/pages/pvt/account/404.js.nft.json +1 -0
  36. package/.next/server/pages/pvt/account/[...unknown].js +1 -0
  37. package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -0
  38. package/.next/server/pages/pvt/account/orders/[id].js +1 -0
  39. package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -0
  40. package/.next/server/pages/pvt/account/orders.js +1 -0
  41. package/.next/server/pages/pvt/account/orders.js.nft.json +1 -0
  42. package/.next/server/pages/{account → pvt/account}/profile.js +1 -1
  43. package/.next/server/pages/pvt/account/profile.js.nft.json +1 -0
  44. package/.next/server/pages/{account → pvt/account}/security.js +1 -1
  45. package/.next/server/pages/pvt/account/security.js.nft.json +1 -0
  46. package/.next/server/pages/pvt/account/user-details.js +1 -0
  47. package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -0
  48. package/.next/server/pages/pvt/account.js +1 -0
  49. package/.next/server/pages/pvt/account.js.nft.json +1 -0
  50. package/.next/server/pages-manifest.json +1 -1
  51. package/.next/static/Cb9FGRxZ_RSDdvvnwgkkd/_buildManifest.js +1 -0
  52. package/.next/static/Cb9FGRxZ_RSDdvvnwgkkd/_ssgManifest.js +1 -0
  53. package/.next/static/chunks/9173-90b3de4508d9dc5a.js +1 -0
  54. package/.next/static/chunks/ButtonSignIn.c9bc322071e80856.js +1 -0
  55. package/.next/static/chunks/pages/{_app-423f11b0d7fff185.js → _app-02ac96e27a9cbbb4.js} +1 -1
  56. package/.next/static/chunks/pages/{account/403-b65f508af4df4904.js → pvt/account/403-a1c5772740914141.js} +1 -1
  57. package/.next/static/chunks/pages/pvt/account/404-eaed7a7c92d499ff.js +1 -0
  58. package/.next/static/chunks/pages/pvt/account/[...unknown]-a8bcdec2e6ed7b0e.js +1 -0
  59. package/.next/static/chunks/pages/{account/orders/[id]-c2d355a49d409bb0.js → pvt/account/orders/[id]-3bdaf71be192669b.js} +1 -1
  60. package/.next/static/chunks/pages/pvt/account/orders-10475517a29223cb.js +1 -0
  61. package/.next/static/chunks/pages/pvt/account/profile-449314f16e1c132c.js +1 -0
  62. package/.next/static/chunks/pages/{account/security-7d12dd7a4ca973e6.js → pvt/account/security-8b024c8877f125d0.js} +1 -1
  63. package/.next/static/chunks/pages/pvt/account/user-details-0caf3ce4cb6df66e.js +1 -0
  64. package/.next/static/chunks/pages/pvt/account-412a3bb2b0f22dea.js +1 -0
  65. package/.next/static/chunks/webpack-7e1828f4509e6ef7.js +1 -0
  66. package/.next/static/css/{d26cb0a54378b3d9.css → 0f990bb4836247c7.css} +1 -1
  67. package/.next/trace +136 -136
  68. package/.turbo/turbo-build.log +25 -25
  69. package/.turbo/turbo-test.log +5 -5
  70. package/@generated/gql.ts +2 -2
  71. package/@generated/graphql.ts +12 -1
  72. package/@generated/persisted-documents.json +1 -1
  73. package/@generated/schema.graphql +10 -0
  74. package/CHANGELOG.md +12 -0
  75. package/package.json +4 -4
  76. package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +6 -1
  77. package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +4 -2
  78. package/src/components/account/MyAccountDrawer/OrganizationDrawer/section.module.scss +6 -4
  79. package/src/components/account/MyAccountDrawer/ProfileSummary/ProfileSummary.tsx +6 -6
  80. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterSlider.tsx +1 -1
  81. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +4 -4
  82. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +3 -5
  83. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +1 -1
  84. package/src/components/ui/Button/ButtonSignIn/ButtonSignIn.tsx +1 -1
  85. package/src/pages/{account → pvt/account}/403.tsx +1 -1
  86. package/src/pages/{account → pvt/account}/[...unknown].tsx +1 -1
  87. package/src/pages/{account → pvt/account}/index.tsx +2 -2
  88. package/src/pages/{account → pvt/account}/orders/[id].tsx +2 -2
  89. package/src/pages/{account → pvt/account}/orders/index.tsx +2 -2
  90. package/src/pages/{account → pvt/account}/profile.tsx +2 -2
  91. package/src/pages/{account → pvt/account}/security.tsx +2 -2
  92. package/src/pages/{account → pvt/account}/user-details.tsx +3 -3
  93. package/src/sdk/account/getMyAccountRoutes.ts +11 -5
  94. package/src/sdk/session/index.ts +3 -0
  95. package/.next/server/pages/account/403.js +0 -1
  96. package/.next/server/pages/account/403.js.nft.json +0 -1
  97. package/.next/server/pages/account/404.js +0 -1
  98. package/.next/server/pages/account/404.js.nft.json +0 -1
  99. package/.next/server/pages/account/[...unknown].js +0 -1
  100. package/.next/server/pages/account/[...unknown].js.nft.json +0 -1
  101. package/.next/server/pages/account/orders/[id].js +0 -1
  102. package/.next/server/pages/account/orders.js +0 -1
  103. package/.next/server/pages/account/orders.js.nft.json +0 -1
  104. package/.next/server/pages/account/profile.js.nft.json +0 -1
  105. package/.next/server/pages/account/security.js.nft.json +0 -1
  106. package/.next/server/pages/account/user-details.js +0 -1
  107. package/.next/server/pages/account/user-details.js.nft.json +0 -1
  108. package/.next/server/pages/account.js +0 -1
  109. package/.next/server/pages/account.js.nft.json +0 -1
  110. package/.next/static/-PPm_cyTGFp-EEpMmcEJL/_buildManifest.js +0 -1
  111. package/.next/static/-PPm_cyTGFp-EEpMmcEJL/_ssgManifest.js +0 -1
  112. package/.next/static/chunks/9173-912ae438e42cb222.js +0 -1
  113. package/.next/static/chunks/ButtonSignIn.e767fc25322cf230.js +0 -1
  114. package/.next/static/chunks/pages/account/404-9a7f4c3464751182.js +0 -1
  115. package/.next/static/chunks/pages/account/[...unknown]-aad8638fc7323b61.js +0 -1
  116. package/.next/static/chunks/pages/account/orders-5dcb988493ad1770.js +0 -1
  117. package/.next/static/chunks/pages/account/profile-29f93f4c5a55bd87.js +0 -1
  118. package/.next/static/chunks/pages/account/user-details-143cb45d5080d1d9.js +0 -1
  119. package/.next/static/chunks/pages/account-377dfe7a5276ceca.js +0 -1
  120. package/.next/static/chunks/webpack-92cd0db592faf63b.js +0 -1
  121. /package/.next/server/pages/{account/orders/[id].js.nft.json → pvt/account/403.js.nft.json} +0 -0
  122. /package/src/pages/{account → pvt/account}/404.tsx +0 -0
  123. /package/src/pages/{account → pvt/account}/orders/styles.module.scss +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.84.4 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.85.0 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.84.4 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.85.0 partytown /home/runner/work/faststore/faststore/packages/core
7
7
  > partytown copylib ./public/~partytown
8
8
 
9
9
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
10
10
 
11
- > @faststore/core@3.84.4 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.85.0 generate /home/runner/work/faststore/faststore/packages/core
12
12
  > na run generate:schema && na run generate:codegen && na run format:generated
13
13
 
14
14
 
15
- > @faststore/core@3.84.4 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.85.0 generate:schema /home/runner/work/faststore/faststore/packages/core
16
16
  > tsx src/server/generator/generateGraphQLSchemaFile.ts
17
17
 
18
18
  Schema GraphQL file generated successfully
19
19
 
20
- > @faststore/core@3.84.4 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.85.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
21
21
  > graphql-codegen
22
22
 
23
23
  [STARTED] Parse Configuration
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
37
37
  [CLI] Loading Documents
38
38
  [CLI] Generating output
39
39
 
40
- > @faststore/core@3.84.4 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.85.0 format:generated /home/runner/work/faststore/faststore/packages/core
41
41
  > prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
42
42
 
43
43
 
44
- > @faststore/core@3.84.4 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.85.0 build /home/runner/work/faststore/faststore/packages/core
45
45
  > next build
46
46
 
47
47
  ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
@@ -64,8 +64,8 @@ Browserslist: browsers data (caniuse-lite) is 8 months old. Please run:
64
64
  ✓ Compiled successfully
65
65
  Collecting page data ...
66
66
  Generating static pages (0/6) ...
67
- Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
68
67
 
69
68
  Generating static pages (1/6)
69
+ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
70
70
 
71
71
  Generating static pages (2/6)
72
72
 
73
73
  Generating static pages (4/6)
74
74
 
75
75
  ✓ Generating static pages (6/6)
@@ -83,34 +83,34 @@ Route (pages) Size First Load JS
83
83
  ├ └ css/6d92375b6ee8276a.css 16.1 kB
84
84
  ├ ○ /404 1.55 kB 139 kB
85
85
  ├ ● /500 1.55 kB 139 kB
86
- ├ λ /account 240 B 107 kB
87
- /account/[...unknown] 281 B 107 kB
88
- ├ λ /account/403 2.44 kB 140 kB
86
+ ├ λ /api/graphql 0 B 107 kB
87
+ λ /api/health/live 0 B 107 kB
88
+ ├ λ /api/health/ready 0 B 107 kB
89
+ ├ λ /api/preview 0 B 107 kB
90
+ ├ ● /checkout 737 B 138 kB
91
+ ├ ● /login 1.68 kB 139 kB
92
+ ├ λ /pvt/account 245 B 107 kB
93
+ ├ ● /pvt/account/[...unknown] 283 B 107 kB
94
+ ├ λ /pvt/account/403 2.45 kB 140 kB
89
95
  ├ └ css/b7bba8fce075688b.css 4.2 kB
90
- ├ λ /account/404 2.13 kB 140 kB
96
+ ├ λ /pvt/account/404 2.14 kB 140 kB
91
97
  ├ └ css/5347dbc8b71de47d.css 4.25 kB
92
- ├ λ /account/orders 10.5 kB 148 kB
98
+ ├ λ /pvt/account/orders 10.5 kB 148 kB
93
99
  ├ └ css/b7fc24e8f1eb011f.css 12.8 kB
94
- ├ λ /account/orders/[id] 12.2 kB 150 kB
100
+ ├ λ /pvt/account/orders/[id] 12.2 kB 150 kB
95
101
  ├ └ css/297be4be3be36ff0.css 12.6 kB
96
- ├ λ /account/profile 1.79 kB 139 kB
102
+ ├ λ /pvt/account/profile 1.79 kB 139 kB
97
103
  ├ └ css/831a1f72fe4b2d80.css 3.97 kB
98
- ├ λ /account/security 3.76 kB 141 kB
104
+ ├ λ /pvt/account/security 3.77 kB 141 kB
99
105
  ├ └ css/ec7fdad03808422d.css 5.22 kB
100
- ├ λ /account/user-details 1.74 kB 139 kB
106
+ ├ λ /pvt/account/user-details 1.74 kB 139 kB
101
107
  ├ └ css/e46393a76c5d93a9.css 4.17 kB
102
- ├ λ /api/graphql 0 B 107 kB
103
- ├ λ /api/health/live 0 B 107 kB
104
- ├ λ /api/health/ready 0 B 107 kB
105
- ├ λ /api/preview 0 B 107 kB
106
- ├ ● /checkout 737 B 138 kB
107
- ├ ● /login 1.68 kB 139 kB
108
108
  └ ● /s 3.24 kB 156 kB
109
109
  + First Load JS shared by all 110 kB
110
110
  ├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
111
111
  ├ chunks/main-f658704b53a96ab1.js 33.1 kB
112
- ├ chunks/pages/_app-423f11b0d7fff185.js 24.7 kB
113
- ├ chunks/webpack-92cd0db592faf63b.js 3.85 kB
112
+ ├ chunks/pages/_app-02ac96e27a9cbbb4.js 24.7 kB
113
+ ├ chunks/webpack-7e1828f4509e6ef7.js 3.85 kB
114
114
  └ css/24a5e8f6808266fe.css 3.53 kB
115
115
 
116
116
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,14 +1,14 @@
1
1
 
2
- > @faststore/core@3.84.4 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.85.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/utils/multipleTemplates.test.ts (27.505 s)
6
- PASS test/server/cms/global.test.ts (27.696 s)
5
+ PASS test/server/cms/global.test.ts (26.637 s)
6
+ PASS test/utils/multipleTemplates.test.ts (27.384 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (31.154 s)
8
+ PASS test/server/index.test.ts (30.522 s)
9
9
 
10
10
  Test Suites: 4 passed, 4 total
11
11
  Tests: 22 passed, 22 total
12
12
  Snapshots: 0 total
13
- Time: 32.216 s
13
+ Time: 31.74 s
14
14
  Ran all test suites.
package/@generated/gql.ts CHANGED
@@ -86,7 +86,7 @@ const documents = {
86
86
  types.ClientSearchSuggestionsQueryDocument,
87
87
  '\n query ClientTopSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientTopSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n':
88
88
  types.ClientTopSearchSuggestionsQueryDocument,
89
- '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n':
89
+ '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n permissions {\n canManageOrganization\n }\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n':
90
90
  types.ValidateSessionDocument,
91
91
  '\n query ClientShippingSimulationQuery(\n $postalCode: String!\n $country: String!\n $items: [IShippingItem!]!\n ) {\n ...ClientShippingSimulation\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n logisticsInfo {\n slas {\n carrier\n price\n availableDeliveryWindows {\n startDateUtc\n endDateUtc\n price\n listPrice\n }\n shippingEstimate\n localizedEstimates\n deliveryChannel\n }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n':
92
92
  types.ClientShippingSimulationQueryDocument,
@@ -320,7 +320,7 @@ export function gql(
320
320
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
321
321
  */
322
322
  export function gql(
323
- source: '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n'
323
+ source: '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n permissions {\n canManageOrganization\n }\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n'
324
324
  ): typeof import('./graphql').ValidateSessionDocument
325
325
  /**
326
326
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
@@ -417,6 +417,7 @@ export type IStoreB2B = {
417
417
  firstName: InputMaybe<Scalars['String']['input']>
418
418
  isRepresentative: InputMaybe<Scalars['Boolean']['input']>
419
419
  lastName: InputMaybe<Scalars['String']['input']>
420
+ permissions: IStoreB2BPermissions
420
421
  savedPostalCode: InputMaybe<Scalars['String']['input']>
421
422
  unitId: InputMaybe<Scalars['String']['input']>
422
423
  unitName: InputMaybe<Scalars['String']['input']>
@@ -424,6 +425,10 @@ export type IStoreB2B = {
424
425
  userName: InputMaybe<Scalars['String']['input']>
425
426
  }
426
427
 
428
+ export type IStoreB2BPermissions = {
429
+ canManageOrganization: Scalars['Boolean']['input']
430
+ }
431
+
427
432
  /** Shopping cart input. */
428
433
  export type IStoreCart = {
429
434
  /** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */
@@ -1130,6 +1135,7 @@ export type StoreB2B = {
1130
1135
  firstName: Maybe<Scalars['String']['output']>
1131
1136
  isRepresentative: Maybe<Scalars['Boolean']['output']>
1132
1137
  lastName: Maybe<Scalars['String']['output']>
1138
+ permissions: StoreB2BPermissions
1133
1139
  savedPostalCode: Maybe<Scalars['String']['output']>
1134
1140
  unitId: Maybe<Scalars['String']['output']>
1135
1141
  unitName: Maybe<Scalars['String']['output']>
@@ -1137,6 +1143,10 @@ export type StoreB2B = {
1137
1143
  userName: Maybe<Scalars['String']['output']>
1138
1144
  }
1139
1145
 
1146
+ export type StoreB2BPermissions = {
1147
+ canManageOrganization: Scalars['Boolean']['output']
1148
+ }
1149
+
1140
1150
  /** Brand of a given product. */
1141
1151
  export type StoreBrand = {
1142
1152
  /** Brand name. */
@@ -3599,6 +3609,7 @@ export type ValidateSessionMutation = {
3599
3609
  userName: string | null
3600
3610
  userEmail: string | null
3601
3611
  savedPostalCode: string | null
3612
+ permissions: { canManageOrganization: boolean }
3602
3613
  } | null
3603
3614
  marketingData: {
3604
3615
  utmCampaign: string | null
@@ -4495,7 +4506,7 @@ export const ClientTopSearchSuggestionsQueryDocument = {
4495
4506
  export const ValidateSessionDocument = {
4496
4507
  __meta__: {
4497
4508
  operationName: 'ValidateSession',
4498
- operationHash: '5da2700f5a69ee8835b1cb6c69e14f4b6e12c4df',
4509
+ operationHash: '15d85b65b36cb2c30fead1c68a01c3492319a819',
4499
4510
  },
4500
4511
  } as unknown as TypedDocumentString<
4501
4512
  ValidateSessionMutation,
@@ -22,7 +22,7 @@
22
22
  "34ea14c0d4a57ddf9bc11e4be0cd2b5a6506d3d4": "query ClientProfileQuery($id: String!) { profile(id: $id) { addresses { city country geoCoordinate postalCode } } }",
23
23
  "bbaa2ed75c4fb04842189e8d53a1d65481154e2b": "fragment ClientSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } deliveryPromiseBadges { typeName } gtin hasSpecifications image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } isVariantOf { name productGroupID skuVariants { activeVariations allVariantProducts { name productID } availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ClientSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } suggestions { products { ...ProductSummary_product } terms { value } } } ...ClientSearchSuggestions }",
24
24
  "e2385b0f11726d0068f96548f57a8dd441c064e3": "fragment ClientTopSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } query ClientTopSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } ...ClientTopSearchSuggestions }",
25
- "5da2700f5a69ee8835b1cb6c69e14f4b6e12c4df": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId firstName isRepresentative lastName savedPostalCode unitId unitName userEmail userName } channel city country currency { code symbol } deliveryMode { deliveryChannel deliveryMethod deliveryWindow { endDate startDate } } geoCoordinates { latitude longitude } locale marketingData { utmCampaign utmMedium utmSource utmiCampaign utmiPage utmiPart } person { email familyName givenName id } postalCode refreshAfter } }",
25
+ "15d85b65b36cb2c30fead1c68a01c3492319a819": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId firstName isRepresentative lastName permissions { canManageOrganization } savedPostalCode unitId unitName userEmail userName } channel city country currency { code symbol } deliveryMode { deliveryChannel deliveryMethod deliveryWindow { endDate startDate } } geoCoordinates { latitude longitude } locale marketingData { utmCampaign utmMedium utmSource utmiCampaign utmiPage utmiPart } person { email familyName givenName id } postalCode refreshAfter } }",
26
26
  "c35bad22f67f3eb34fea52bb49efa6b1da6b728d": "fragment ClientShippingSimulation on Query { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city } } } query ClientShippingSimulationQuery($country: String!, $items: [IShippingItem!]!, $postalCode: String!) { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city neighborhood state } logisticsInfo { slas { availableDeliveryWindows { endDateUtc listPrice price startDateUtc } carrier deliveryChannel localizedEstimates price shippingEstimate } } } ...ClientShippingSimulation }",
27
27
  "4b769cda49004c85d0d427c601eba36c37a52224": "fragment ClientManyProducts on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { products { pageInfo { totalCount } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } deliveryPromiseBadges { typeName } gtin hasSpecifications image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } isVariantOf { name productGroupID skuVariants { activeVariations allVariantProducts { name productID } availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ServerManyProductsQuery($after: String, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $sponsoredCount: Int, $term: String!) { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { metadata { ...SearchEvent_metadata } products { edges { node { ...ProductSummary_product } } pageInfo { totalCount } } } ...ClientManyProducts }"
28
28
  }
@@ -1252,6 +1252,10 @@ type StoreSession {
1252
1252
  refreshAfter: String
1253
1253
  }
1254
1254
 
1255
+ type StoreB2BPermissions {
1256
+ canManageOrganization: Boolean!
1257
+ }
1258
+
1255
1259
  type StoreB2B {
1256
1260
  customerId: String!
1257
1261
  isRepresentative: Boolean
@@ -1262,6 +1266,11 @@ type StoreB2B {
1262
1266
  userName: String
1263
1267
  userEmail: String
1264
1268
  savedPostalCode: String
1269
+ permissions: StoreB2BPermissions!
1270
+ }
1271
+
1272
+ input IStoreB2BPermissions {
1273
+ canManageOrganization: Boolean!
1265
1274
  }
1266
1275
 
1267
1276
  input IStoreB2B {
@@ -1274,6 +1283,7 @@ input IStoreB2B {
1274
1283
  userName: String
1275
1284
  userEmail: String
1276
1285
  savedPostalCode: String
1286
+ permissions: IStoreB2BPermissions!
1277
1287
  }
1278
1288
 
1279
1289
  """Session input."""
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.86.0](https://github.com/vtex/faststore/compare/v3.85.0...v3.86.0) (2025-09-15)
7
+
8
+ ### Features
9
+
10
+ - ensure pvt route in my account pages SFS-2852 ([#3026](https://github.com/vtex/faststore/issues/3026)) ([93b089a](https://github.com/vtex/faststore/commit/93b089abd3bca04ef8fbdbecc7f81dd00a852987))
11
+
12
+ # [3.85.0](https://github.com/vtex/faststore/compare/v3.84.5...v3.85.0) (2025-09-15)
13
+
14
+ ### Features
15
+
16
+ - add organization management permission validation ([#3029](https://github.com/vtex/faststore/issues/3029)) ([67d6125](https://github.com/vtex/faststore/commit/67d61252cba42045a4c225f2cba14656645a1dbb))
17
+
6
18
  ## [3.84.5](https://github.com/vtex/faststore/compare/v3.84.4...v3.84.5) (2025-09-15)
7
19
 
8
20
  **Note:** Version bump only for package @faststore/core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.84.5",
3
+ "version": "3.86.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,10 +44,10 @@
44
44
  "@envelop/graphql-jit": "^8.0.3",
45
45
  "@envelop/parser-cache": "^6.0.2",
46
46
  "@envelop/validation-cache": "^6.0.2",
47
- "@faststore/api": "^3.84.5",
47
+ "@faststore/api": "^3.85.0",
48
48
  "@faststore/graphql-utils": "^3.81.0",
49
49
  "@faststore/lighthouse": "^3.81.0",
50
- "@faststore/sdk": "^3.83.1",
50
+ "@faststore/sdk": "^3.85.0",
51
51
  "@faststore/ui": "^3.84.0",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
@@ -108,5 +108,5 @@
108
108
  "ts-jest": "29.1.1",
109
109
  "typescript": "5.3.2"
110
110
  },
111
- "gitHead": "add61f1da0d18a1a8473a6f61857cb413147fbc9"
111
+ "gitHead": "3161c22026aedd19edb41f61c7717b4cc2a019b2"
112
112
  }
@@ -30,6 +30,11 @@ export const OrganizationDrawer = ({
30
30
 
31
31
  const contractName = person?.givenName ?? ''
32
32
 
33
+ const contractUrl =
34
+ b2b?.unitId && b2b?.permissions?.canManageOrganization
35
+ ? `/pvt/buyer-portal/org-unit/${b2b?.unitId}`
36
+ : null
37
+
33
38
  return (
34
39
  <SlideOver
35
40
  data-fs-organization-drawer
@@ -46,7 +51,7 @@ export const OrganizationDrawer = ({
46
51
  <OrganizationDrawerHeader
47
52
  onCloseDrawer={closeDrawer}
48
53
  contractName={contractName}
49
- contractUrl="/buyer-portal"
54
+ contractUrl={contractUrl}
50
55
  />
51
56
  <OrganizationDrawerBody isRepresentative={isRepresentative} />
52
57
  <footer data-fs-organization-drawer-footer-wrapper>
@@ -14,11 +14,13 @@ export const OrganizationDrawerHeader = ({
14
14
  contractImage,
15
15
  onCloseDrawer,
16
16
  }: OrganizationDrawerHeaderProps) => {
17
+ const TitleComponent = contractUrl ? Link : 'div'
18
+
17
19
  return (
18
20
  <>
19
21
  <SlideOverHeader onClose={() => onCloseDrawer?.()} />
20
22
  <div data-fs-organization-drawer-header>
21
- <Link
23
+ <TitleComponent
22
24
  data-fs-organization-drawer-header-contract-link
23
25
  href={contractUrl}
24
26
  >
@@ -32,7 +34,7 @@ export const OrganizationDrawerHeader = ({
32
34
  <h1 data-fs-organization-drawer-header-contract-name>
33
35
  {contractName}
34
36
  </h1>
35
- </Link>
37
+ </TitleComponent>
36
38
  </div>
37
39
  </>
38
40
  )
@@ -20,8 +20,8 @@
20
20
  @import "../ProfileSummary/profile-summary.scss";
21
21
 
22
22
  [data-fs-organization-drawer] {
23
- --fs-organization-drawer-header-contract-color : #cbe9ff;
24
- --fs-organization-drawer-body-link-color : #f5f5f5;
23
+ --fs-organization-drawer-header-contract-color: #cbe9ff;
24
+ --fs-organization-drawer-body-link-color: #f5f5f5;
25
25
 
26
26
  display: flex;
27
27
  flex-direction: column;
@@ -61,8 +61,10 @@
61
61
  transition: all 1s ease;
62
62
  }
63
63
 
64
- [data-fs-organization-drawer-header-contract-name]:hover {
65
- text-decoration: underline;
64
+ a[data-fs-organization-drawer-header-contract-link] {
65
+ [data-fs-organization-drawer-header-contract-name]:hover {
66
+ text-decoration: underline;
67
+ }
66
68
  }
67
69
 
68
70
  [data-fs-organization-drawer-header-contract-image] {
@@ -24,6 +24,10 @@ export const ProfileSummary = ({
24
24
  ...otherProps
25
25
  }: ProfileSummaryProps) => {
26
26
  const { b2b } = useSession()
27
+
28
+ const showBuyerPortalManageLink =
29
+ showManageLink && b2b?.permissions?.canManageOrganization && b2b?.unitId
30
+
27
31
  return (
28
32
  <section
29
33
  data-fs-profile-summary
@@ -32,14 +36,10 @@ export const ProfileSummary = ({
32
36
  >
33
37
  <div data-fs-profile-summary-header>
34
38
  <h2 data-fs-profile-summary-org-name>{orgName}</h2>
35
- {showManageLink && (
39
+ {showBuyerPortalManageLink && (
36
40
  <Link
37
41
  data-fs-profile-summary-org-link
38
- href={
39
- b2b?.unitId
40
- ? `/buyer-portal/org-unit/${b2b?.unitId}`
41
- : '/buyer-portal'
42
- }
42
+ href={`/pvt/buyer-portal/org-unit/${b2b?.unitId}`}
43
43
  >
44
44
  Manage <Icon name="OpenInNew" width={23} height={23} />
45
45
  </Link>
@@ -115,7 +115,7 @@ function MyAccountFilterSlider({
115
115
  }
116
116
  })
117
117
 
118
- window.location.href = `/account/orders?${params.toString()}`
118
+ window.location.href = `/pvt/account/orders?${params.toString()}`
119
119
  }
120
120
 
121
121
  return (
@@ -6,9 +6,9 @@ import { useRouter } from 'next/router'
6
6
  import {
7
7
  Button,
8
8
  EmptyState,
9
- Icon as UIIcon,
10
9
  LinkButton,
11
10
  SearchInputField,
11
+ Icon as UIIcon,
12
12
  useUI,
13
13
  type SearchInputFieldRef,
14
14
  } from '@faststore/ui'
@@ -169,7 +169,7 @@ export default function MyAccountListOrders({
169
169
  params.set('text', value)
170
170
  }
171
171
 
172
- window.location.href = `/account/orders?${params.toString()}`
172
+ window.location.href = `/pvt/account/orders?${params.toString()}`
173
173
  }
174
174
  },
175
175
  300,
@@ -247,7 +247,7 @@ export default function MyAccountListOrders({
247
247
  purchaseAgentId: filters.purchaseAgentId,
248
248
  }}
249
249
  onClearAll={() => {
250
- window.location.href = '/account/orders'
250
+ window.location.href = '/pvt/account/orders'
251
251
  }}
252
252
  onRemoveFilter={(key, value) => {
253
253
  const { page, clientEmail, ...updatedFilters } = { ...filters }
@@ -288,7 +288,7 @@ export default function MyAccountListOrders({
288
288
  const params = new URLSearchParams(
289
289
  filteredQuery as Record<string, string>
290
290
  )
291
- window.location.href = `/account/orders?${params.toString()}`
291
+ window.location.href = `/pvt/account/orders?${params.toString()}`
292
292
  }}
293
293
  />
294
294
 
@@ -1,6 +1,5 @@
1
1
  import { Button, Icon } from '@faststore/ui'
2
2
  import type { ServerListOrdersQueryQuery } from '@generated/graphql'
3
- import { useRouter } from 'next/router'
4
3
  import { useState } from 'react'
5
4
 
6
5
  import MyAccountStatusBadge from 'src/components/account/components/MyAccountStatusBadge'
@@ -43,7 +42,6 @@ export function Pagination({
43
42
  total: number
44
43
  perPage: number
45
44
  }) {
46
- const router = useRouter()
47
45
  const totalPages = Math.ceil(total / perPage)
48
46
  const firstIndexLabel = page === 1 ? 1 : (page - 1) * perPage + 1
49
47
  const lastIndexLabel =
@@ -53,12 +51,12 @@ export function Pagination({
53
51
 
54
52
  const handlePageChange = (newPage: number) => {
55
53
  const params = new URLSearchParams(window.location.search)
56
- if (newPage === 1) {
54
+ if (newPage === 1 || newPage === 0) {
57
55
  params.delete('page')
58
56
  } else {
59
57
  params.set('page', String(newPage))
60
58
  }
61
- window.location.href = `/account/orders${params.toString() ? `?${params}` : ''}`
59
+ window.location.href = `/pvt/account/orders${params.toString() ? `?${params}` : ''}`
62
60
  }
63
61
 
64
62
  return (
@@ -161,7 +159,7 @@ export default function MyAccountListOrdersTable({
161
159
  max: MAX_ORDER_FIELDS,
162
160
  })
163
161
 
164
- const orderUrl = `/account/orders/${item.orderId}`
162
+ const orderUrl = `/pvt/account/orders/${item.orderId}`
165
163
  const shippingEstimatedDate = item.ShippingEstimatedDate
166
164
  ? formatOrderDate(item.ShippingEstimatedDate, locale)
167
165
  : '-'
@@ -31,7 +31,7 @@ export default function MyAccountOrderDetails({
31
31
  <div className={styles.page} data-fs-order-details>
32
32
  <header data-fs-order-details-header>
33
33
  <div data-fs-order-details-header-title>
34
- <a href="/account/orders">
34
+ <a href="/pvt/account/orders">
35
35
  <UIIconButton
36
36
  data-fs-order-details-header-back-button
37
37
  size="small"
@@ -16,7 +16,7 @@ const ButtonSignIn = ({
16
16
  return (
17
17
  <LinkButton
18
18
  data-fs-button-signin-link
19
- href={person?.id ? `/account` : `/login`}
19
+ href={person?.id ? `/pvt/account` : `/login`}
20
20
  className="text__title-mini"
21
21
  aria-label={alt}
22
22
  variant="tertiary"
@@ -54,7 +54,7 @@ function Page({ globalSections: globalSectionsProp, accountName }: Props) {
54
54
  subtitle="You don't have permission to access this page."
55
55
  showLoader={false}
56
56
  >
57
- <LinkButton variant="secondary" href="/account">
57
+ <LinkButton variant="secondary" href="/pvt/account">
58
58
  Back to Account
59
59
  </LinkButton>
60
60
  </EmptyState>
@@ -23,7 +23,7 @@ export const getStaticProps: GetStaticProps<
23
23
 
24
24
  return {
25
25
  redirect: {
26
- destination: '/account/404',
26
+ destination: '/pvt/account/404',
27
27
  permanent: false,
28
28
  },
29
29
  }
@@ -1,5 +1,5 @@
1
- import { validateUser } from 'src/sdk/account/validateUser'
2
1
  import type { GetServerSideProps, NextPage } from 'next'
2
+ import { validateUser } from 'src/sdk/account/validateUser'
3
3
  import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
4
4
 
5
5
  const MyAccountRedirectPage: NextPage = () => {
@@ -31,7 +31,7 @@ export const getServerSideProps: GetServerSideProps = async ({
31
31
 
32
32
  return {
33
33
  redirect: {
34
- destination: '/account/profile',
34
+ destination: '/pvt/account/profile',
35
35
  permanent: false,
36
36
  },
37
37
  }
@@ -24,7 +24,7 @@ import { execute } from 'src/server'
24
24
  import { injectGlobalSections } from 'src/server/cms/global'
25
25
  import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
26
26
  import { extractStatusFromError } from 'src/utils/utilities'
27
- import storeConfig from '../../../../discovery.config'
27
+ import storeConfig from 'discovery.config'
28
28
 
29
29
  const COMPONENTS: Record<string, ComponentType<any>> = {
30
30
  ...GLOBAL_COMPONENTS,
@@ -329,7 +329,7 @@ export const getServerSideProps: GetServerSideProps<
329
329
 
330
330
  return {
331
331
  redirect: {
332
- destination: isForbidden ? '/account/403' : '/account/404',
332
+ destination: isForbidden ? '/pvt/account/403' : '/pvt/account/404',
333
333
  permanent: false,
334
334
  },
335
335
  }
@@ -27,7 +27,7 @@ import { getIsRepresentative } from 'src/sdk/account/getIsRepresentative'
27
27
  import { validateUser } from 'src/sdk/account/validateUser'
28
28
  import PageProvider from 'src/sdk/overrides/PageProvider'
29
29
  import { extractStatusFromError } from 'src/utils/utilities'
30
- import storeConfig from '../../../../discovery.config'
30
+ import storeConfig from 'discovery.config'
31
31
 
32
32
  /* A list of components that can be used in the CMS. */
33
33
  const COMPONENTS: Record<string, ComponentType<any>> = {
@@ -225,7 +225,7 @@ export const getServerSideProps: GetServerSideProps<
225
225
 
226
226
  return {
227
227
  redirect: {
228
- destination: isForbidden ? '/account/403' : '/account/404',
228
+ destination: isForbidden ? '/pvt/account/403' : '/pvt/account/404',
229
229
  permanent: false,
230
230
  },
231
231
  }
@@ -28,7 +28,7 @@ import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
28
28
 
29
29
  import PageProvider from 'src/sdk/overrides/PageProvider'
30
30
  import { execute } from 'src/server'
31
- import storeConfig from '../../../discovery.config'
31
+ import storeConfig from 'discovery.config'
32
32
 
33
33
  /* A list of components that can be used in the CMS. */
34
34
  const COMPONENTS: Record<string, ComponentType<any>> = {
@@ -134,7 +134,7 @@ export const getServerSideProps: GetServerSideProps<
134
134
  if (profile.errors) {
135
135
  const statusCode: number = (profile.errors[0] as any)?.extensions?.status
136
136
  const destination: string =
137
- statusCode === 403 ? '/account/403' : '/account/404'
137
+ statusCode === 403 ? '/pvt/account/403' : '/pvt/account/404'
138
138
 
139
139
  return {
140
140
  redirect: {
@@ -30,7 +30,7 @@ import { validateUser } from 'src/sdk/account/validateUser'
30
30
  import PageProvider from 'src/sdk/overrides/PageProvider'
31
31
 
32
32
  import { SecuritySection } from 'src/components/account/security'
33
- import storeConfig from '../../../discovery.config'
33
+ import storeConfig from 'discovery.config'
34
34
 
35
35
  /* A list of components that can be used in the CMS. */
36
36
  const COMPONENTS: Record<string, ComponentType<any>> = {
@@ -131,7 +131,7 @@ export const getServerSideProps: GetServerSideProps<
131
131
  if (security.errors) {
132
132
  const statusCode: number = (security.errors[0] as any)?.extensions?.status
133
133
  const destination: string =
134
- statusCode === 403 ? '/account/403' : '/account/404'
134
+ statusCode === 403 ? '/pvt/account/403' : '/pvt/account/404'
135
135
 
136
136
  return {
137
137
  redirect: {