@faststore/core 4.5.0-dev.0 → 4.5.0-dev.1

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 (61) hide show
  1. package/.turbo/turbo-generate.log +4 -4
  2. package/.turbo/turbo-test.log +132 -60
  3. package/@generated/cached-operations.json +2 -0
  4. package/@generated/gql.ts +18 -0
  5. package/@generated/graphql.ts +68 -0
  6. package/@generated/persisted-documents.json +3 -0
  7. package/@generated/schema.graphql +41 -0
  8. package/CHANGELOG.md +20 -0
  9. package/cms/faststore/components/cms_component__recommendationshelf.jsonc +86 -0
  10. package/cms/faststore/schema.json +89 -0
  11. package/discovery.config.default.js +3 -0
  12. package/discovery.config.js +10 -1
  13. package/discovery.config.local.example.js +62 -0
  14. package/package.json +6 -6
  15. package/public/icons.svg +4 -0
  16. package/src/Layout.tsx +6 -0
  17. package/src/components/account/Drawer/OrganizationDrawer/ContractSwitcher/ContractSwitcher.tsx +376 -0
  18. package/src/components/account/Drawer/OrganizationDrawer/ContractSwitcher/index.ts +2 -0
  19. package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawer.tsx +51 -26
  20. package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawerFooter.tsx +55 -0
  21. package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +45 -5
  22. package/src/components/account/Drawer/OrganizationDrawer/index.ts +5 -0
  23. package/src/components/account/Drawer/OrganizationDrawer/section.module.scss +452 -54
  24. package/src/components/cms/global/Components.ts +10 -0
  25. package/src/components/sections/ProductGallery/ProductGallery.tsx +1 -1
  26. package/src/components/sections/RecommendationShelf/RecommendationShelf.tsx +223 -0
  27. package/src/components/sections/RecommendationShelf/RecommendationShelf.types.ts +111 -0
  28. package/src/components/sections/RecommendationShelf/index.ts +1 -0
  29. package/src/components/sections/RecommendationShelf/section.module.scss +49 -0
  30. package/src/components/sections/RecommendationShelf/useRecommendationUserId.ts +49 -0
  31. package/src/components/sections/RecommendationShelf/useRecommendations.ts +55 -0
  32. package/src/components/sections/RecommendationShelf/vrn.ts +55 -0
  33. package/src/pages/[slug]/p.tsx +45 -0
  34. package/src/sdk/account/changeContractToken.ts +119 -0
  35. package/src/sdk/account/clearPersistedSessionState.ts +26 -0
  36. package/src/sdk/account/refreshToken.ts +21 -8
  37. package/src/sdk/account/useAvailableContracts.ts +49 -0
  38. package/src/sdk/account/useSwitchContract.ts +60 -0
  39. package/src/sdk/analytics/hooks/useStartRecommendationSession.ts +96 -0
  40. package/src/sdk/analytics/utils.ts +9 -0
  41. package/src/utils/retry.ts +69 -0
  42. package/test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx +235 -0
  43. package/test/components/RecommendationShelf/useRecommendationUserId.test.ts +69 -0
  44. package/test/components/RecommendationShelf/useRecommendations.test.ts +52 -0
  45. package/test/components/RecommendationShelf/vrn.test.ts +56 -0
  46. package/test/components/account/ContractSwitcher.browser.test.tsx +236 -0
  47. package/test/components/account/OrganizationDrawer.browser.test.tsx +197 -0
  48. package/test/components/account/OrganizationDrawerFooter.browser.test.tsx +54 -0
  49. package/test/components/account/OrganizationDrawerHeader.browser.test.tsx +55 -0
  50. package/test/components/account/doLogout.browser.test.ts +102 -0
  51. package/test/sdk/account/changeContractToken.browser.test.ts +157 -0
  52. package/test/sdk/account/clearPersistedSessionState.browser.test.ts +41 -0
  53. package/test/sdk/account/clearPersistedSessionState.test.ts +20 -0
  54. package/test/sdk/account/refreshToken.browser.test.ts +34 -0
  55. package/test/sdk/account/refreshToken.test.ts +87 -0
  56. package/test/sdk/account/useAvailableContracts.browser.test.ts +124 -0
  57. package/test/sdk/account/useSwitchContract.browser.test.ts +111 -0
  58. package/test/sdk/analytics/useStartRecommendationSession.test.ts +69 -0
  59. package/test/sdk/analytics/utils.test.ts +23 -0
  60. package/test/server/index.test.ts +3 -0
  61. package/test/utils/retry.test.ts +59 -0
@@ -1,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.4.1-dev.0 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.5.0-dev.0 generate /home/runner/work/faststore/faststore/packages/core
3
3
  > pnpm run gen-types && pnpm run cache-graphql
4
4
 
5
5
 
6
- > @faststore/core@4.4.1-dev.0 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.5.0-dev.0 gen-types /home/runner/work/faststore/faststore/packages/core
7
7
  > node ../cli/bin/run generate-types .
8
8
 
9
9
  [STARTED] Parse Configuration
@@ -19,11 +19,11 @@
19
19
  [COMPLETED] Generate to /home/runner/work/faststore/faststore/packages/core/@generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.4.1-dev.0 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.5.0-dev.0 cache-graphql /home/runner/work/faststore/faststore/packages/core
23
23
  > node ../cli/bin/run cache-graphql --config=./discovery.config.default.js --queries=./@generated/persisted-documents.json
24
24
 
25
25
  [Info] - Config file location: /home/runner/work/faststore/faststore/packages/core/discovery.config.default.js
26
26
  [Info] - Persisted documents at: /home/runner/work/faststore/faststore/packages/core/@generated/persisted-documents.json
27
27
  [Info] - Cached operations output: /home/runner/work/faststore/faststore/packages/core/@generated/cached-operations.json
28
28
  [Success] - GraphQL queries cached with success: 🎉
29
- Queries: ServerAccountPageQuery, ServerCollectionPageQuery, ServerProductQuery, ServerOrderDetailsQuery, ServerListOrdersQuery, ServerProfileQuery, ServerListQuotesQuery, ServerQuotesOrganizationMemberQuery, ServerSecurity, ServerUserDetailsQuery, ValidateUser, ClientPickupPointsQuery, OrderEntryOperationQuery, OrderFormItemsQuery, ClientProductCountQuery, ClientAllVariantProductsQuery, ClientManyProductsQueryWithSearchId, ClientProductGalleryQuery, ClientProductQuery, ClientManyProductsQuery, ClientManyProductsSelectedQuery, ClientProfileQuery, ClientSearchSuggestionsQuery, ClientTopSearchSuggestionsQuery, ClientShippingSimulationQuery, ServerManyProductsQuery
29
+ Queries: ClientRecommendationsQuery, ServerAccountPageQuery, ServerCollectionPageQuery, ServerProductQuery, ServerOrderDetailsQuery, ServerListOrdersQuery, ServerProfileQuery, ServerListQuotesQuery, ServerQuotesOrganizationMemberQuery, ServerSecurity, ServerUserDetailsQuery, AvailableContractsQuery, ValidateUser, ClientPickupPointsQuery, OrderEntryOperationQuery, OrderFormItemsQuery, ClientProductCountQuery, ClientAllVariantProductsQuery, ClientManyProductsQueryWithSearchId, ClientProductGalleryQuery, ClientProductQuery, ClientManyProductsQuery, ClientManyProductsSelectedQuery, ClientProfileQuery, ClientSearchSuggestionsQuery, ClientTopSearchSuggestionsQuery, ClientShippingSimulationQuery, ServerManyProductsQuery
@@ -1,20 +1,44 @@
1
1
 
2
- > @faststore/core@4.4.1-dev.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.5.0-dev.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.7 /home/runner/work/faststore/faststore/packages/core
7
7
 
8
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 36ms
9
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 46ms
10
- ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 18ms
11
- stderr | test/sdk/localization/store-url.browser.test.ts
12
- Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
13
- at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
14
- at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
15
- at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
8
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 44ms
9
+ stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
10
+ Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=32c15f8888ca34f223def7972b7f19090808435a
11
+  at node:internal/deps/undici/undici:16416:13
16
12
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
13
+ at baseRequest (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:42:20)
14
+ at GraphqlRequest (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:130:20)
15
+ at request (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:154:5)
16
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:115:46)
17
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:14)
18
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:17) {
19
+ [cause]: TypeError: Invalid URL
20
+  at new URL (node:internal/url:828:25)
21
+ at new URL$1 (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.7_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sass@1.97.3_terser@5.46.0_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/chunks/index.CWIFvlX5.js:469:9)
22
+  at new Request (node:internal/deps/undici/undici:10971:25)
23
+  at fetch (node:internal/deps/undici/undici:11891:25)
24
+  at fetch (node:internal/deps/undici/undici:16414:10)
25
+  at fetch (node:internal/bootstrap/web/exposed-window-or-worker:83:12)
26
+ at POSTRequest (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:91:10)
27
+ at baseRequest (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:42:61)
28
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
29
+ at GraphqlRequest (/home/runner/work/faststore/faststore/packages/core/src/sdk/graphql/request.ts:130:20) {
30
+ code: 'ERR_INVALID_URL',
31
+ input: '/api/graphql?operationName=ValidateCartMutation&operationHash=32c15f8888ca34f223def7972b7f19090808435a'
32
+ }
33
+ }
34
+
35
+ stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
36
+ Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
17
37
 
38
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 254ms
39
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2294ms
40
+ ✓ shows an error state when the list fails to load  682ms
41
+ ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  325ms
18
42
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
19
43
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
20
44
 
@@ -244,16 +268,57 @@ act(() => {
244
268
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
245
269
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
246
270
 
247
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 2105ms
248
- ✓ renders the password protection form  967ms
249
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 26ms
250
- ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 11ms
251
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 149ms
252
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 144ms
253
- ✓  node  test/utils/match-url.test.ts (10 tests) 32ms
254
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 32ms
255
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 801ms
256
- ✓ returns 405 for non-POST requests  599ms
271
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1479ms
272
+ ✓ renders the password protection form  659ms
273
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 19ms
274
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 90ms
275
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 2251ms
276
+ ✓ renders the menu view with contract details and manage footer  1053ms
277
+ ✓ opens the contract switcher and returns to the menu on back  529ms
278
+ ✓ resets to the menu when the drawer closes  349ms
279
+ stderr | test/sdk/localization/store-url.browser.test.ts
280
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
281
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
282
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
283
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
284
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
285
+
286
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 14ms
287
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 132ms
288
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 155ms
289
+ stderr | test/components/account/doLogout.browser.test.ts
290
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
291
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
292
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
293
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
294
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
295
+
296
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 61ms
297
+ stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
298
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
299
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
300
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
301
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
302
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
303
+
304
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 285ms
305
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 317ms
306
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 9ms
307
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 4ms
308
+ ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
309
+ stderr | test/sdk/account/refreshToken.browser.test.ts
310
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
311
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
312
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
313
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
314
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
315
+
316
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 31ms
317
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 4ms
318
+ ✓  node  test/utils/match-url.test.ts (10 tests) 8ms
319
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 38ms
320
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
321
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 175ms
257
322
  stderr | test/components/search/SearchInputComponent.test.tsx
258
323
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
259
324
 
@@ -317,24 +382,23 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
317
382
  at Suspense
318
383
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
319
384
 
320
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 303ms
321
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 62ms
322
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (12 tests) 39ms
323
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 253ms
324
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 65ms
385
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 91ms
386
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (12 tests) 12ms
387
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 17ms
388
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 58ms
389
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 21ms
390
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 316ms
325
391
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
326
392
  Set password request failed: Bad Request
327
393
 
328
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 39ms
329
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 424ms
330
- ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 25ms
331
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 5ms
332
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 837ms
333
- ✓ navigates with the search term on blur  362ms
334
- ✓ navigates without a label param when the search is cleared  358ms
335
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 9ms
336
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 49ms
337
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 56ms
394
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 30ms
395
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 24ms
396
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 835ms
397
+ ✓ navigates with the search term on blur  359ms
398
+ ✓ navigates without a label param when the search is cleared  363ms
399
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 7ms
400
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 6ms
401
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 30ms
338
402
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
339
403
  Graphql execution returned with error: [
340
404
  {
@@ -381,38 +445,46 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
381
445
  { message: 'bad', status: 400, type: 'BadRequestError' }
382
446
  ]
383
447
 
384
- ✓  node  test/pages/api/graphql.test.ts (10 tests) 30ms
385
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 43ms
448
+ ✓  node  test/pages/api/graphql.test.ts (10 tests) 25ms
449
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 36ms
450
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 50ms
386
451
  ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 173ms
387
- ✓  node  test/proxy.localization.test.ts (5 tests) 66ms
388
- ✓  node  test/server/index.test.ts (7 tests) 919ms
389
- ✓ should return a valid merged GraphQL schema  318ms
390
- ✓ should handle options and execute  338ms
391
- ✓  node  test/proxy.test.ts (4 tests) 27ms
392
- ✓  node  test/server/webops-api.test.ts (9 tests) 27ms
393
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 113ms
394
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 36ms
395
- ✓  node  test/server/cms/global.test.ts (3 tests) 6ms
396
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (8 tests) 10ms
397
- ✓  node  test/server/content/service.test.ts (5 tests) 6ms
398
- ✓  node  test/sdk/localization/store-url.test.ts (1 test) 7ms
452
+ ✓  node  test/proxy.localization.test.ts (5 tests) 76ms
453
+ ✓  node  test/server/index.test.ts (7 tests) 1060ms
454
+ ✓ should handle options and execute  540ms
455
+ ✓  node  test/proxy.test.ts (4 tests) 20ms
456
+ ✓  node  test/server/webops-api.test.ts (9 tests) 18ms
457
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 98ms
458
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 32ms
459
+ ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
460
+ ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 8ms
461
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (8 tests) 14ms
462
+ ✓  node  test/server/content/service.test.ts (5 tests) 7ms
463
+ ✓  node  test/sdk/localization/store-url.test.ts (1 test) 4ms
464
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 21ms
399
465
  ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 5ms
400
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 39ms
401
466
  ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 143ms
402
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
403
- ✓  node  test/pages/api/preview.test.ts (2 tests) 11ms
467
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 10ms
404
468
  ✓  node  test/components/search/SearchInput.test.ts (6 tests) 7ms
469
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
470
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (3 tests) 31ms
471
+ ✓  node  test/components/RecommendationShelf/vrn.test.ts (5 tests) 6ms
472
+ ✓  node  test/components/RecommendationShelf/useRecommendationUserId.test.ts (4 tests) 193ms
473
+ ✓  node  test/components/account/Layout.test.tsx (4 tests) 83ms
405
474
  ✓  node  test/server/cms/index.test.ts (2 tests) 6ms
475
+ ✓  node  test/utils/retry.test.ts (5 tests) 14ms
406
476
  ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
407
- ✓  node  test/components/account/Layout.test.tsx (4 tests) 77ms
477
+ ✓  node  test/components/RecommendationShelf/useRecommendations.test.ts (2 tests) 5ms
408
478
  ✓  node  test/utils/isLocalHost.test.ts (7 tests) 5ms
409
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 55ms
410
479
  ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 4ms
411
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 39ms
412
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 27ms
413
-
414
-  Test Files  51 passed (51)
415
-  Tests  458 passed (458)
416
-  Start at  20:08:00
417
-  Duration  32.38s (transform 8.20s, setup 0ms, collect 24.59s, tests 7.46s, environment 42.93s, prepare 1.38s)
480
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 54ms
481
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 43ms
482
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 4ms
483
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 20ms
484
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 25ms
485
+
486
+  Test Files  70 passed (70)
487
+  Tests  539 passed (539)
488
+  Start at  21:43:08
489
+  Duration  36.60s (transform 8.50s, setup 0ms, collect 29.72s, tests 11.44s, environment 48.51s, prepare 1.27s)
418
490
 
@@ -1,4 +1,5 @@
1
1
  [
2
+ "ClientRecommendationsQuery",
2
3
  "ServerAccountPageQuery",
3
4
  "ServerCollectionPageQuery",
4
5
  "ServerProductQuery",
@@ -9,6 +10,7 @@
9
10
  "ServerQuotesOrganizationMemberQuery",
10
11
  "ServerSecurity",
11
12
  "ServerUserDetailsQuery",
13
+ "AvailableContractsQuery",
12
14
  "ValidateUser",
13
15
  "ClientPickupPointsQuery",
14
16
  "OrderEntryOperationQuery",
package/@generated/gql.ts CHANGED
@@ -18,6 +18,7 @@ type Documents = {
18
18
  "\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\t\tunitMultiplier\n\n isVariantOf {\n productGroupID\n name\n\t\t\tskuVariants {\n\t\t\t\tallVariantsByName\n\t\t\t\tactiveVariations\n\t\t\t\tslugsMap\n\t\t\t\tavailableVariations\n\t\t\t}\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n priceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n hasSpecifications\n\n unitMultiplier\n\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n advertisement {\n adId\n adResponseId\n }\n\n deliveryPromiseBadges {\n typeName\n }\n }\n": typeof types.ProductSummary_ProductFragmentDoc,
19
19
  "\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n": typeof types.Filter_FacetsFragmentDoc,
20
20
  "\n fragment ProductDetailsFragment_product on StoreProduct {\n id: productID\n sku\n name\n gtin\n description\n unitMultiplier\n isVariantOf {\n name\n productGroupID\n\t\t\tskuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n # Contains necessary info to add this item to cart\n ...CartProductItem\n }\n": typeof types.ProductDetailsFragment_ProductFragmentDoc,
21
+ "query ClientRecommendationsQuery(\n $campaignVrn: String!\n $userId: String\n $products: [String!]\n) {\n recommendations(\n userId: $userId\n campaignVrn: $campaignVrn\n products: $products\n ) {\n products {\n ...ProductSummary_product\n }\n correlationId\n campaign {\n id\n title\n type\n }\n }\n}\n": typeof types.ClientRecommendationsQueryDocument,
21
22
  "\n fragment ProductComparisonFragment_product on StoreProduct {\n id: productID\n sku\n slug\n name\n gtin\n description\n unitMultiplier\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n priceWithTaxes\n listPrice\n quantity\n listPriceWithTaxes\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n\n hasSpecifications\n\n skuSpecifications {\n field {\n id\n name\n originalName\n }\n values {\n name\n id\n fieldId\n originalName\n }\n }\n\n specificationGroups {\n name\n originalName\n specifications {\n name\n originalName\n values\n }\n }\n }\n": typeof types.ProductComparisonFragment_ProductFragmentDoc,
22
23
  "\n fragment ProductSKUMatrixSidebarFragment_product on StoreProduct {\n id: productID\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n\t\t\t\t\tsku\n name\n image {\n url\n alternateName\n }\n offers {\n highPrice\n lowPrice\n lowPriceWithTaxes\n offerCount\n priceCurrency\n offers {\n listPrice\n listPriceWithTaxes\n sellingPrice\n priceCurrency\n price\n priceWithTaxes\n priceValidUntil\n itemCondition\n availability\n quantity\n }\n }\n additionalProperty {\n propertyID\n value\n name\n valueReference\n }\n }\n }\n }\n }\n": typeof types.ProductSkuMatrixSidebarFragment_ProductFragmentDoc,
23
24
  "\n fragment ClientManyProducts on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n sponsoredCount: $sponsoredCount\n\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n": typeof types.ClientManyProductsFragmentDoc,
@@ -39,9 +40,11 @@ type Documents = {
39
40
  "\n query ServerQuotesOrganizationMemberQuery {\n isOrganizationMember\n }\n": typeof types.ServerQuotesOrganizationMemberQueryDocument,
40
41
  "\n query ServerSecurity {\n accountProfile {\n name\n }\n userDetails {\n email\n }\n }\n": typeof types.ServerSecurityDocument,
41
42
  "\n query ServerUserDetailsQuery {\n accountProfile {\n name\n }\n userDetails {\n username\n name\n email\n phone\n role\n orgUnit\n }\n }\n": typeof types.ServerUserDetailsQueryDocument,
43
+ "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n": typeof types.AvailableContractsQueryDocument,
42
44
  "\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n": typeof types.CancelOrderMutationDocument,
43
45
  "\n mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) {\n processOrderAuthorization(data: $data) {\n isPendingForOtherAuthorizer\n ruleForAuthorization {\n orderAuthorizationId\n dimensionId\n rule {\n id\n name\n status\n doId\n authorizedEmails\n priority\n trigger {\n condition {\n conditionType\n description\n lessThan\n greatherThan\n expression\n }\n effect {\n description\n effectType\n funcPath\n }\n }\n timeout\n notification\n scoreInterval {\n accept\n deny\n }\n authorizationData {\n requireAllApprovals\n authorizers {\n id\n email\n type\n authorizationDate\n }\n }\n isUserAuthorized\n isUserNextAuthorizer\n }\n }\n }\n }\n": typeof types.ProcessOrderAuthorizationMutationDocument,
44
46
  "\n query ValidateUser {\n validateUser {\n isValid\n }\n }\n": typeof types.ValidateUserDocument,
47
+ "\n mutation StartRecommendationSession {\n startRecommendationSession\n }\n": typeof types.StartRecommendationSessionDocument,
45
48
  "\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n shouldSplitItem\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n isGift\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n": typeof types.ValidateCartMutationDocument,
46
49
  "\n query ClientPickupPointsQuery(\n $geoCoordinates: IStoreGeoCoordinates\n ) {\n pickupPoints(geoCoordinates: $geoCoordinates) {\n pickupPointDistances {\n pickupId\n distance\n pickupName\n isActive\n address {\n city\n state\n number\n postalCode\n street\n }\n }\n }\n }\n": typeof types.ClientPickupPointsQueryDocument,
47
50
  "\n mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\n subscribeToNewsletter(data: $data) {\n id\n }\n }\n": typeof types.SubscribeToNewsletterDocument,
@@ -67,6 +70,7 @@ const documents: Documents = {
67
70
  "\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\t\tunitMultiplier\n\n isVariantOf {\n productGroupID\n name\n\t\t\tskuVariants {\n\t\t\t\tallVariantsByName\n\t\t\t\tactiveVariations\n\t\t\t\tslugsMap\n\t\t\t\tavailableVariations\n\t\t\t}\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n priceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n hasSpecifications\n\n unitMultiplier\n\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n advertisement {\n adId\n adResponseId\n }\n\n deliveryPromiseBadges {\n typeName\n }\n }\n": types.ProductSummary_ProductFragmentDoc,
68
71
  "\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n": types.Filter_FacetsFragmentDoc,
69
72
  "\n fragment ProductDetailsFragment_product on StoreProduct {\n id: productID\n sku\n name\n gtin\n description\n unitMultiplier\n isVariantOf {\n name\n productGroupID\n\t\t\tskuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n # Contains necessary info to add this item to cart\n ...CartProductItem\n }\n": types.ProductDetailsFragment_ProductFragmentDoc,
73
+ "query ClientRecommendationsQuery(\n $campaignVrn: String!\n $userId: String\n $products: [String!]\n) {\n recommendations(\n userId: $userId\n campaignVrn: $campaignVrn\n products: $products\n ) {\n products {\n ...ProductSummary_product\n }\n correlationId\n campaign {\n id\n title\n type\n }\n }\n}\n": types.ClientRecommendationsQueryDocument,
70
74
  "\n fragment ProductComparisonFragment_product on StoreProduct {\n id: productID\n sku\n slug\n name\n gtin\n description\n unitMultiplier\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n priceWithTaxes\n listPrice\n quantity\n listPriceWithTaxes\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n\n hasSpecifications\n\n skuSpecifications {\n field {\n id\n name\n originalName\n }\n values {\n name\n id\n fieldId\n originalName\n }\n }\n\n specificationGroups {\n name\n originalName\n specifications {\n name\n originalName\n values\n }\n }\n }\n": types.ProductComparisonFragment_ProductFragmentDoc,
71
75
  "\n fragment ProductSKUMatrixSidebarFragment_product on StoreProduct {\n id: productID\n isVariantOf {\n name\n productGroupID\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n\t\t\t\t\tsku\n name\n image {\n url\n alternateName\n }\n offers {\n highPrice\n lowPrice\n lowPriceWithTaxes\n offerCount\n priceCurrency\n offers {\n listPrice\n listPriceWithTaxes\n sellingPrice\n priceCurrency\n price\n priceWithTaxes\n priceValidUntil\n itemCondition\n availability\n quantity\n }\n }\n additionalProperty {\n propertyID\n value\n name\n valueReference\n }\n }\n }\n }\n }\n": types.ProductSkuMatrixSidebarFragment_ProductFragmentDoc,
72
76
  "\n fragment ClientManyProducts on Query {\n search(\n first: $first\n after: $after\n sort: $sort\n term: $term\n selectedFacets: $selectedFacets\n sponsoredCount: $sponsoredCount\n\n ) {\n products {\n pageInfo {\n totalCount\n }\n }\n }\n }\n": types.ClientManyProductsFragmentDoc,
@@ -88,9 +92,11 @@ const documents: Documents = {
88
92
  "\n query ServerQuotesOrganizationMemberQuery {\n isOrganizationMember\n }\n": types.ServerQuotesOrganizationMemberQueryDocument,
89
93
  "\n query ServerSecurity {\n accountProfile {\n name\n }\n userDetails {\n email\n }\n }\n": types.ServerSecurityDocument,
90
94
  "\n query ServerUserDetailsQuery {\n accountProfile {\n name\n }\n userDetails {\n username\n name\n email\n phone\n role\n orgUnit\n }\n }\n": types.ServerUserDetailsQueryDocument,
95
+ "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n": types.AvailableContractsQueryDocument,
91
96
  "\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n": types.CancelOrderMutationDocument,
92
97
  "\n mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) {\n processOrderAuthorization(data: $data) {\n isPendingForOtherAuthorizer\n ruleForAuthorization {\n orderAuthorizationId\n dimensionId\n rule {\n id\n name\n status\n doId\n authorizedEmails\n priority\n trigger {\n condition {\n conditionType\n description\n lessThan\n greatherThan\n expression\n }\n effect {\n description\n effectType\n funcPath\n }\n }\n timeout\n notification\n scoreInterval {\n accept\n deny\n }\n authorizationData {\n requireAllApprovals\n authorizers {\n id\n email\n type\n authorizationDate\n }\n }\n isUserAuthorized\n isUserNextAuthorizer\n }\n }\n }\n }\n": types.ProcessOrderAuthorizationMutationDocument,
93
98
  "\n query ValidateUser {\n validateUser {\n isValid\n }\n }\n": types.ValidateUserDocument,
99
+ "\n mutation StartRecommendationSession {\n startRecommendationSession\n }\n": types.StartRecommendationSessionDocument,
94
100
  "\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n shouldSplitItem\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n isGift\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n": types.ValidateCartMutationDocument,
95
101
  "\n query ClientPickupPointsQuery(\n $geoCoordinates: IStoreGeoCoordinates\n ) {\n pickupPoints(geoCoordinates: $geoCoordinates) {\n pickupPointDistances {\n pickupId\n distance\n pickupName\n isActive\n address {\n city\n state\n number\n postalCode\n street\n }\n }\n }\n }\n": types.ClientPickupPointsQueryDocument,
96
102
  "\n mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\n subscribeToNewsletter(data: $data) {\n id\n }\n }\n": types.SubscribeToNewsletterDocument,
@@ -125,6 +131,10 @@ export function gql(source: "\n fragment Filter_facets on StoreFacet {\n ...
125
131
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
126
132
  */
127
133
  export function gql(source: "\n fragment ProductDetailsFragment_product on StoreProduct {\n id: productID\n sku\n name\n gtin\n description\n unitMultiplier\n isVariantOf {\n name\n productGroupID\n\t\t\tskuVariants {\n activeVariations\n slugsMap\n availableVariations\n allVariantProducts {\n name\n productID\n }\n }\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n # Contains necessary info to add this item to cart\n ...CartProductItem\n }\n"): typeof import('./graphql').ProductDetailsFragment_ProductFragmentDoc;
134
+ /**
135
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
136
+ */
137
+ export function gql(source: "query ClientRecommendationsQuery(\n $campaignVrn: String!\n $userId: String\n $products: [String!]\n) {\n recommendations(\n userId: $userId\n campaignVrn: $campaignVrn\n products: $products\n ) {\n products {\n ...ProductSummary_product\n }\n correlationId\n campaign {\n id\n title\n type\n }\n }\n}\n"): typeof import('./graphql').ClientRecommendationsQueryDocument;
128
138
  /**
129
139
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
130
140
  */
@@ -209,6 +219,10 @@ export function gql(source: "\n query ServerSecurity {\n accountProfile {\n
209
219
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
210
220
  */
211
221
  export function gql(source: "\n query ServerUserDetailsQuery {\n accountProfile {\n name\n }\n userDetails {\n username\n name\n email\n phone\n role\n orgUnit\n }\n }\n"): typeof import('./graphql').ServerUserDetailsQueryDocument;
222
+ /**
223
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
224
+ */
225
+ export function gql(source: "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n"): typeof import('./graphql').AvailableContractsQueryDocument;
212
226
  /**
213
227
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
214
228
  */
@@ -221,6 +235,10 @@ export function gql(source: "\n mutation ProcessOrderAuthorizationMutation($dat
221
235
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
222
236
  */
223
237
  export function gql(source: "\n query ValidateUser {\n validateUser {\n isValid\n }\n }\n"): typeof import('./graphql').ValidateUserDocument;
238
+ /**
239
+ * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
240
+ */
241
+ export function gql(source: "\n mutation StartRecommendationSession {\n startRecommendationSession\n }\n"): typeof import('./graphql').StartRecommendationSessionDocument;
224
242
  /**
225
243
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
226
244
  */
@@ -671,6 +671,8 @@ export type Mutation = {
671
671
  * Returns an operationId to poll for the operation status.
672
672
  */
673
673
  startOrderEntryOperation: Maybe<StoreOrderEntryOperationResult>;
674
+ /** Starts an anonymous personalization session for the current shopper. */
675
+ startRecommendationSession: Scalars['Boolean']['output'];
674
676
  /** Subscribes a new person to the newsletter list. */
675
677
  subscribeToNewsletter: Maybe<PersonNewsletter>;
676
678
  /**
@@ -871,6 +873,12 @@ export type Query = {
871
873
  allCollections: StoreCollectionConnection;
872
874
  /** Returns information about all products. */
873
875
  allProducts: StoreProductConnection;
876
+ /**
877
+ * Lists the commercial contracts associated with the given Organization Unit,
878
+ * resolved to human-readable corporate names. Governed: only contracts associated
879
+ * with the authenticated buyer's Organization Unit are returned.
880
+ */
881
+ availableContracts: Array<StoreContract>;
874
882
  /** Returns the details of a collection based on the collection slug. */
875
883
  collection: StoreCollection;
876
884
  /** Returns whether the current authenticated user belongs to a B2B organization unit. */
@@ -893,6 +901,8 @@ export type Query = {
893
901
  products: Array<StoreProduct>;
894
902
  /** Returns information about the profile. */
895
903
  profile: Maybe<Profile>;
904
+ /** Returns personalized product recommendations for a given campaign. */
905
+ recommendations: RecommendationResponse;
896
906
  /** Returns if there's a redirect for a search. */
897
907
  redirect: Maybe<StoreRedirect>;
898
908
  /** Returns the result of a product, facet, or suggestion search. */
@@ -922,6 +932,11 @@ export type QueryAllProductsArgs = {
922
932
  };
923
933
 
924
934
 
935
+ export type QueryAvailableContractsArgs = {
936
+ orgUnitId: Scalars['String']['input'];
937
+ };
938
+
939
+
925
940
  export type QueryCollectionArgs = {
926
941
  slug: Scalars['String']['input'];
927
942
  };
@@ -986,6 +1001,13 @@ export type QueryProfileArgs = {
986
1001
  };
987
1002
 
988
1003
 
1004
+ export type QueryRecommendationsArgs = {
1005
+ campaignVrn: Scalars['String']['input'];
1006
+ products: InputMaybe<Array<Scalars['String']['input']>>;
1007
+ userId: InputMaybe<Scalars['String']['input']>;
1008
+ };
1009
+
1010
+
989
1011
  export type QueryRedirectArgs = {
990
1012
  selectedFacets: InputMaybe<Array<IStoreSelectedFacet>>;
991
1013
  term: InputMaybe<Scalars['String']['input']>;
@@ -1021,6 +1043,18 @@ export type QueryUserOrderArgs = {
1021
1043
  orderId: Scalars['String']['input'];
1022
1044
  };
1023
1045
 
1046
+ export type RecommendationCampaign = {
1047
+ id: Scalars['String']['output'];
1048
+ title: Maybe<Scalars['String']['output']>;
1049
+ type: Scalars['String']['output'];
1050
+ };
1051
+
1052
+ export type RecommendationResponse = {
1053
+ campaign: RecommendationCampaign;
1054
+ correlationId: Scalars['String']['output'];
1055
+ products: Array<StoreProduct>;
1056
+ };
1057
+
1024
1058
  export type SkuSpecificationField = {
1025
1059
  id: Maybe<Scalars['String']['output']>;
1026
1060
  name: Scalars['String']['output'];
@@ -1311,6 +1345,16 @@ export type StoreCollectionType =
1311
1345
  /** Third level of product categorization. */
1312
1346
  | 'SubCategory';
1313
1347
 
1348
+ /** A commercial contract available to a buyer's Organization Unit. */
1349
+ export type StoreContract = {
1350
+ /** Human-readable corporate name of the contract (resolved from MasterData). */
1351
+ corporateName: Scalars['String']['output'];
1352
+ /** Contract identifier (the contract/scope ID associated with the Organization Unit). */
1353
+ id: Scalars['ID']['output'];
1354
+ /** Indicates whether this contract is the one currently active in the session. */
1355
+ isActive: Scalars['Boolean']['output'];
1356
+ };
1357
+
1314
1358
  /** Currency information. */
1315
1359
  export type StoreCurrency = {
1316
1360
  /** Currency code (e.g: USD). */
@@ -2630,6 +2674,15 @@ export type Filter_FacetsFragment =
2630
2674
 
2631
2675
  export type ProductDetailsFragment_ProductFragment = { sku: string, name: string, gtin: string, description: string, unitMultiplier: number | null, id: string, isVariantOf: { name: string, productGroupID: string, skuVariants: { activeVariations: any | null, slugsMap: any | null, availableVariations: any | null, allVariantProducts: Array<{ name: string, productID: string }> | null } | null }, image: Array<{ url: string, alternateName: string }>, brand: { name: string }, offers: { lowPrice: number, lowPriceWithTaxes: number, offers: Array<{ availability: string, price: number, priceWithTaxes: number, listPrice: number, listPriceWithTaxes: number, quantity: number, seller: { identifier: string } }> }, additionalProperty: Array<{ propertyID: string, name: string, value: any, valueReference: any }> };
2632
2676
 
2677
+ export type ClientRecommendationsQueryQueryVariables = Exact<{
2678
+ campaignVrn: Scalars['String']['input'];
2679
+ userId: InputMaybe<Scalars['String']['input']>;
2680
+ products: InputMaybe<Array<Scalars['String']['input']> | Scalars['String']['input']>;
2681
+ }>;
2682
+
2683
+
2684
+ export type ClientRecommendationsQueryQuery = { recommendations: { correlationId: string, products: Array<{ slug: string, sku: string, name: string, gtin: string, unitMultiplier: number | null, hasSpecifications: boolean | null, id: string, brand: { name: string, brandName: string }, isVariantOf: { productGroupID: string, name: string, skuVariants: { allVariantsByName: any | null, activeVariations: any | null, slugsMap: any | null, availableVariations: any | null, allVariantProducts: Array<{ name: string, productID: string }> | null } | null }, image: Array<{ url: string, alternateName: string }>, offers: { lowPrice: number, lowPriceWithTaxes: number, offers: Array<{ availability: string, price: number, listPrice: number, listPriceWithTaxes: number, priceWithTaxes: number, quantity: number, seller: { identifier: string } }> }, additionalProperty: Array<{ propertyID: string, name: string, value: any, valueReference: any }>, advertisement: { adId: string, adResponseId: string } | null, deliveryPromiseBadges: Array<{ typeName: string | null } | null> | null }>, campaign: { id: string, title: string | null, type: string } } };
2685
+
2633
2686
  export type ProductComparisonFragment_ProductFragment = { sku: string, slug: string, name: string, gtin: string, description: string, unitMultiplier: number | null, hasSpecifications: boolean | null, id: string, isVariantOf: { name: string, productGroupID: string, skuVariants: { activeVariations: any | null, slugsMap: any | null, availableVariations: any | null, allVariantProducts: Array<{ name: string, productID: string }> | null } | null }, image: Array<{ url: string, alternateName: string }>, brand: { name: string }, offers: { lowPrice: number, lowPriceWithTaxes: number, offers: Array<{ availability: string, price: number, priceWithTaxes: number, listPrice: number, quantity: number, listPriceWithTaxes: number, seller: { identifier: string } }> }, additionalProperty: Array<{ propertyID: string, name: string, value: any, valueReference: any }>, advertisement: { adId: string, adResponseId: string } | null, skuSpecifications: Array<{ field: { id: string | null, name: string, originalName: string | null }, values: Array<{ name: string, id: string | null, fieldId: string | null, originalName: string | null }> }>, specificationGroups: Array<{ name: string, originalName: string, specifications: Array<{ name: string, originalName: string, values: Array<string> }> }> };
2634
2687
 
2635
2688
  export type ProductSkuMatrixSidebarFragment_ProductFragment = { id: string, isVariantOf: { name: string, productGroupID: string, skuVariants: { activeVariations: any | null, slugsMap: any | null, availableVariations: any | null, allVariantProducts: Array<{ sku: string, name: string, image: Array<{ url: string, alternateName: string }>, offers: { highPrice: number, lowPrice: number, lowPriceWithTaxes: number, offerCount: number, priceCurrency: string, offers: Array<{ listPrice: number, listPriceWithTaxes: number, sellingPrice: number, priceCurrency: string, price: number, priceWithTaxes: number, priceValidUntil: string, itemCondition: string, availability: string, quantity: number }> }, additionalProperty: Array<{ propertyID: string, value: any, name: string, valueReference: any }> }> | null } | null } };
@@ -2726,6 +2779,13 @@ export type ServerUserDetailsQueryQueryVariables = Exact<{ [key: string]: never;
2726
2779
 
2727
2780
  export type ServerUserDetailsQueryQuery = { accountProfile: { name: string | null }, userDetails: { username: string | null, name: string | null, email: string | null, phone: string | null, role: Array<string | null> | null, orgUnit: string | null } };
2728
2781
 
2782
+ export type AvailableContractsQueryQueryVariables = Exact<{
2783
+ orgUnitId: Scalars['String']['input'];
2784
+ }>;
2785
+
2786
+
2787
+ export type AvailableContractsQueryQuery = { availableContracts: Array<{ id: string, corporateName: string, isActive: boolean }> };
2788
+
2729
2789
  export type CancelOrderMutationMutationVariables = Exact<{
2730
2790
  data: IUserOrderCancel;
2731
2791
  }>;
@@ -2745,6 +2805,11 @@ export type ValidateUserQueryVariables = Exact<{ [key: string]: never; }>;
2745
2805
 
2746
2806
  export type ValidateUserQuery = { validateUser: { isValid: boolean } | null };
2747
2807
 
2808
+ export type StartRecommendationSessionMutationVariables = Exact<{ [key: string]: never; }>;
2809
+
2810
+
2811
+ export type StartRecommendationSessionMutation = { startRecommendationSession: boolean };
2812
+
2748
2813
  export type ValidateCartMutationMutationVariables = Exact<{
2749
2814
  cart: IStoreCart;
2750
2815
  session: IStoreSession;
@@ -3432,6 +3497,7 @@ export const SearchEvent_MetadataFragmentDoc = new TypedDocumentString(`
3432
3497
  fuzzy
3433
3498
  }
3434
3499
  `, {"fragmentName":"SearchEvent_metadata"}) as unknown as TypedDocumentString<SearchEvent_MetadataFragment, unknown>;
3500
+ export const ClientRecommendationsQueryDocument = {"__meta__":{"operationName":"ClientRecommendationsQuery","operationHash":"db61ca57203036d24d5e1e2c9e40d6d0906f0056"}} as unknown as TypedDocumentString<ClientRecommendationsQueryQuery, ClientRecommendationsQueryQueryVariables>;
3435
3501
  export const ServerAccountPageQueryDocument = {"__meta__":{"operationName":"ServerAccountPageQuery","operationHash":"9baae331b75848a310fecb457e8c971ae27897ff"}} as unknown as TypedDocumentString<ServerAccountPageQueryQuery, ServerAccountPageQueryQueryVariables>;
3436
3502
  export const ServerCollectionPageQueryDocument = {"__meta__":{"operationName":"ServerCollectionPageQuery","operationHash":"4b33c5c07f440dc7489e55619dc2211a13786e72"}} as unknown as TypedDocumentString<ServerCollectionPageQueryQuery, ServerCollectionPageQueryQueryVariables>;
3437
3503
  export const ServerProductQueryDocument = {"__meta__":{"operationName":"ServerProductQuery","operationHash":"f03d0963fed159ac4bbe11f90ea09c635a66b68c"}} as unknown as TypedDocumentString<ServerProductQueryQuery, ServerProductQueryQueryVariables>;
@@ -3442,9 +3508,11 @@ export const ServerListQuotesQueryDocument = {"__meta__":{"operationName":"Serve
3442
3508
  export const ServerQuotesOrganizationMemberQueryDocument = {"__meta__":{"operationName":"ServerQuotesOrganizationMemberQuery","operationHash":"9ba9119f2a361c83af8ecc703cb28f915df10ac8"}} as unknown as TypedDocumentString<ServerQuotesOrganizationMemberQueryQuery, ServerQuotesOrganizationMemberQueryQueryVariables>;
3443
3509
  export const ServerSecurityDocument = {"__meta__":{"operationName":"ServerSecurity","operationHash":"0890ba3456c40a426893b80b698df7a84cfdd6a1"}} as unknown as TypedDocumentString<ServerSecurityQuery, ServerSecurityQueryVariables>;
3444
3510
  export const ServerUserDetailsQueryDocument = {"__meta__":{"operationName":"ServerUserDetailsQuery","operationHash":"630ec1f47f2710ce3d7895e9131482641f30c837"}} as unknown as TypedDocumentString<ServerUserDetailsQueryQuery, ServerUserDetailsQueryQueryVariables>;
3511
+ export const AvailableContractsQueryDocument = {"__meta__":{"operationName":"AvailableContractsQuery","operationHash":"011619bb1be93a21f6530fe4d193dec96a89e88a"}} as unknown as TypedDocumentString<AvailableContractsQueryQuery, AvailableContractsQueryQueryVariables>;
3445
3512
  export const CancelOrderMutationDocument = {"__meta__":{"operationName":"CancelOrderMutation","operationHash":"e2b06da6840614d3c72768e56579b9d3b8e80802"}} as unknown as TypedDocumentString<CancelOrderMutationMutation, CancelOrderMutationMutationVariables>;
3446
3513
  export const ProcessOrderAuthorizationMutationDocument = {"__meta__":{"operationName":"ProcessOrderAuthorizationMutation","operationHash":"8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d"}} as unknown as TypedDocumentString<ProcessOrderAuthorizationMutationMutation, ProcessOrderAuthorizationMutationMutationVariables>;
3447
3514
  export const ValidateUserDocument = {"__meta__":{"operationName":"ValidateUser","operationHash":"32f99c73c3de958b64d6bece1afe800469f54548"}} as unknown as TypedDocumentString<ValidateUserQuery, ValidateUserQueryVariables>;
3515
+ export const StartRecommendationSessionDocument = {"__meta__":{"operationName":"StartRecommendationSession","operationHash":"1def6438c0cd87b85002411ac7326c221f192583"}} as unknown as TypedDocumentString<StartRecommendationSessionMutation, StartRecommendationSessionMutationVariables>;
3448
3516
  export const ValidateCartMutationDocument = {"__meta__":{"operationName":"ValidateCartMutation","operationHash":"32c15f8888ca34f223def7972b7f19090808435a"}} as unknown as TypedDocumentString<ValidateCartMutationMutation, ValidateCartMutationMutationVariables>;
3449
3517
  export const ClientPickupPointsQueryDocument = {"__meta__":{"operationName":"ClientPickupPointsQuery","operationHash":"3fa04e88c811fcb5ece7206fd5aa745bdbc143a8"}} as unknown as TypedDocumentString<ClientPickupPointsQueryQuery, ClientPickupPointsQueryQueryVariables>;
3450
3518
  export const SubscribeToNewsletterDocument = {"__meta__":{"operationName":"SubscribeToNewsletter","operationHash":"feb7005103a859e2bc8cf2360d568806fd88deba"}} as unknown as TypedDocumentString<SubscribeToNewsletterMutation, SubscribeToNewsletterMutationVariables>;
@@ -1,4 +1,5 @@
1
1
  {
2
+ "db61ca57203036d24d5e1e2c9e40d6d0906f0056": "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 } query ClientRecommendationsQuery($campaignVrn: String!, $products: [String!], $userId: String) { recommendations(userId: $userId, campaignVrn: $campaignVrn, products: $products) { campaign { id title type } correlationId products { ...ProductSummary_product } } }",
2
3
  "9baae331b75848a310fecb457e8c971ae27897ff": "query ServerAccountPageQuery { accountProfile { name } }",
3
4
  "4b33c5c07f440dc7489e55619dc2211a13786e72": "fragment ServerCollectionPage on Query { collection(slug: $slug) { id } } query ServerCollectionPageQuery($slug: String!) { collection(slug: $slug) { breadcrumbList { itemListElement { item name position } } meta { selectedFacets { key value } } seo { description title } } ...ServerCollectionPage }",
4
5
  "f03d0963fed159ac4bbe11f90ea09c635a66b68c": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } 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 unitMultiplier ...CartProductItem } fragment ServerProduct on Query { product(locator: $locator) { id: productID } } query ServerProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { brand { name } breadcrumbList { itemListElement { item name position } } description gtin image { alternateName url } isVariantOf { productGroupID } mpn name offers { highPrice lowPrice lowPriceWithTaxes offers { availability itemCondition price priceCurrency priceValidUntil seller { identifier } } priceCurrency } id: productID releaseDate seo { canonical description title } sku ...ProductDetailsFragment_product } ...ServerProduct }",
@@ -9,9 +10,11 @@
9
10
  "9ba9119f2a361c83af8ecc703cb28f915df10ac8": "query ServerQuotesOrganizationMemberQuery { isOrganizationMember }",
10
11
  "0890ba3456c40a426893b80b698df7a84cfdd6a1": "query ServerSecurity { accountProfile { name } userDetails { email } }",
11
12
  "630ec1f47f2710ce3d7895e9131482641f30c837": "query ServerUserDetailsQuery { accountProfile { name } userDetails { email name orgUnit phone role username } }",
13
+ "011619bb1be93a21f6530fe4d193dec96a89e88a": "query AvailableContractsQuery($orgUnitId: String!) { availableContracts(orgUnitId: $orgUnitId) { corporateName id isActive } }",
12
14
  "e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
13
15
  "8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d": "mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) { processOrderAuthorization(data: $data) { isPendingForOtherAuthorizer ruleForAuthorization { dimensionId orderAuthorizationId rule { authorizationData { authorizers { authorizationDate email id type } requireAllApprovals } authorizedEmails doId id isUserAuthorized isUserNextAuthorizer name notification priority scoreInterval { accept deny } status timeout trigger { condition { conditionType description expression greatherThan lessThan } effect { description effectType funcPath } } } } } }",
14
16
  "32f99c73c3de958b64d6bece1afe800469f54548": "query ValidateUser { validateUser { isValid } }",
17
+ "1def6438c0cd87b85002411ac7326c221f192583": "mutation StartRecommendationSession { startRecommendationSession }",
15
18
  "32c15f8888ca34f223def7972b7f19090808435a": "fragment CartItem on StoreOffer { isGift itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber shouldSplitItem } } }",
16
19
  "3fa04e88c811fcb5ece7206fd5aa745bdbc143a8": "query ClientPickupPointsQuery($geoCoordinates: IStoreGeoCoordinates) { pickupPoints(geoCoordinates: $geoCoordinates) { pickupPointDistances { address { city number postalCode state street } distance isActive pickupId pickupName } } }",
17
20
  "feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",