@faststore/core 3.29.1 → 3.31.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 (44) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +11 -11
  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/routes-manifest.json +1 -1
  12. package/.next/server/chunks/3117.js +1 -1
  13. package/.next/server/chunks/4289.js +1 -1
  14. package/.next/server/functions-config-manifest.json +1 -1
  15. package/.next/server/middleware-build-manifest.js +1 -1
  16. package/.next/server/pages/api/graphql.js +1 -1
  17. package/.next/server/pages/en-US/404.html +2 -2
  18. package/.next/server/pages/en-US/404.json +1 -1
  19. package/.next/server/pages/en-US/500.html +2 -2
  20. package/.next/server/pages/en-US/500.json +1 -1
  21. package/.next/server/pages/en-US/account.html +2 -2
  22. package/.next/server/pages/en-US/account.json +1 -1
  23. package/.next/server/pages/en-US/checkout.html +2 -2
  24. package/.next/server/pages/en-US/checkout.json +1 -1
  25. package/.next/server/pages/en-US/login.html +2 -2
  26. package/.next/server/pages/en-US/login.json +1 -1
  27. package/.next/server/pages/en-US/s.html +2 -2
  28. package/.next/server/pages/en-US/s.json +1 -1
  29. package/.next/server/pages/en-US.html +2 -2
  30. package/.next/server/pages/en-US.json +1 -1
  31. package/.next/static/chunks/{6335-3697bf8451c28906.js → 6335-204d54a0bbb62580.js} +1 -1
  32. package/.next/static/{zIV7E3JZpbC-TxO1o-khB → xOA_DYfFM3BxW0U9G0o2u}/_buildManifest.js +1 -1
  33. package/.next/trace +121 -121
  34. package/.turbo/turbo-build.log +9 -9
  35. package/.turbo/turbo-test.log +5 -5
  36. package/@generated/gql.ts +2 -2
  37. package/@generated/graphql.ts +42 -1
  38. package/@generated/persisted-documents.json +1 -1
  39. package/@generated/schema.graphql +39 -0
  40. package/CHANGELOG.md +10 -0
  41. package/package.json +3 -3
  42. package/src/sdk/shipping/index.ts +1 -0
  43. package/test/server/index.test.ts +3 -2
  44. /package/.next/static/{zIV7E3JZpbC-TxO1o-khB → xOA_DYfFM3BxW0U9G0o2u}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.29.0 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.30.1 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.29.0 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.30.1 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.29.0 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.30.1 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.29.0 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.30.1 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.29.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.30.1 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.29.0 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.30.1 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.29.0 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.30.1 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
@@ -59,10 +59,10 @@ https://nextjs.org/telemetry
59
59
  Collecting page data ...
60
60
  Generating static pages (0/7) ...
61
61
 
62
62
  Generating static pages (1/7)
63
- 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.
64
- CustomModalFooterSection not found. Add a new component for this section or remove it from the CMS
65
63
 
66
64
  Generating static pages (3/7)
65
+ 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.
67
66
 
68
67
  Generating static pages (5/7)
68
+ CustomModalFooterSection not found. Add a new component for this section or remove it from the CMS
69
69
 
70
70
  ✓ Generating static pages (7/7)
71
71
  Finalizing page optimization ...
72
72
  Collecting build traces ...
@@ -1,14 +1,14 @@
1
1
 
2
- > @faststore/core@3.29.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.30.1 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/server/cms/global.test.ts (24.476 s)
6
- PASS test/utils/multipleTemplates.test.ts (25.913 s)
5
+ PASS test/server/cms/global.test.ts (24.253 s)
6
+ PASS test/utils/multipleTemplates.test.ts (24.623 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (29.754 s)
8
+ PASS test/server/index.test.ts (28.506 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: 31.106 s
13
+ Time: 29.914 s
14
14
  Ran all test suites.
package/@generated/gql.ts CHANGED
@@ -58,7 +58,7 @@ const documents = {
58
58
  types.ClientTopSearchSuggestionsQueryDocument,
59
59
  '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\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 }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n }\n }\n':
60
60
  types.ValidateSessionDocument,
61
- '\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 }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n':
61
+ '\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':
62
62
  types.ClientShippingSimulationQueryDocument,
63
63
  }
64
64
 
@@ -204,7 +204,7 @@ export function gql(
204
204
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
205
205
  */
206
206
  export function gql(
207
- source: '\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 }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n'
207
+ source: '\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'
208
208
  ): typeof import('./graphql').ClientShippingSimulationQueryDocument
209
209
 
210
210
  export function gql(source: string) {
@@ -469,6 +469,40 @@ export type PickupStoreInfo = {
469
469
  isPickupStore: Maybe<Scalars['Boolean']['output']>
470
470
  }
471
471
 
472
+ export type Profile = {
473
+ /** Collection of user's address */
474
+ addresses: Maybe<Array<Maybe<ProfileAddress>>>
475
+ }
476
+
477
+ export type ProfileAddress = {
478
+ /** ProfileAddress address name/id. */
479
+ addressName: Maybe<Scalars['String']['output']>
480
+ /** ProfileAddress address type. */
481
+ addressType: Maybe<Scalars['String']['output']>
482
+ /** ProfileAddress city. */
483
+ city: Maybe<Scalars['String']['output']>
484
+ /** ProfileAddress complement. */
485
+ complement: Maybe<Scalars['String']['output']>
486
+ /** ProfileAddress country. */
487
+ country: Maybe<Scalars['String']['output']>
488
+ /** ProfileAddress geo coordinate. */
489
+ geoCoordinate: Maybe<Array<Maybe<Scalars['Float']['output']>>>
490
+ /** ProfileAddress neighborhood. */
491
+ neighborhood: Maybe<Scalars['String']['output']>
492
+ /** ProfileAddress number. */
493
+ number: Maybe<Scalars['String']['output']>
494
+ /** ProfileAddress postal code. */
495
+ postalCode: Maybe<Scalars['String']['output']>
496
+ /** ProfileAddress receiver name. */
497
+ receiverName: Maybe<Scalars['String']['output']>
498
+ /** ProfileAddress reference. */
499
+ reference: Maybe<Scalars['String']['output']>
500
+ /** ProfileAddress state. */
501
+ state: Maybe<Scalars['String']['output']>
502
+ /** ProfileAddress street. */
503
+ street: Maybe<Scalars['String']['output']>
504
+ }
505
+
472
506
  export type Query = {
473
507
  /** Returns information about all collections. */
474
508
  allCollections: StoreCollectionConnection
@@ -478,6 +512,8 @@ export type Query = {
478
512
  collection: StoreCollection
479
513
  /** Returns the details of a product based on the specified locator. */
480
514
  product: StoreProduct
515
+ /** Returns information about the profile. */
516
+ profile: Maybe<Profile>
481
517
  /** Returns if there's a redirect for a search. */
482
518
  redirect: Maybe<StoreRedirect>
483
519
  /** Returns the result of a product, facet, or suggestion search. */
@@ -506,6 +542,10 @@ export type QueryProductArgs = {
506
542
  locator: Array<IStoreSelectedFacet>
507
543
  }
508
544
 
545
+ export type QueryProfileArgs = {
546
+ id: Scalars['String']['input']
547
+ }
548
+
509
549
  export type QueryRedirectArgs = {
510
550
  selectedFacets: InputMaybe<Array<IStoreSelectedFacet>>
511
551
  term: InputMaybe<Scalars['String']['input']>
@@ -1791,6 +1831,7 @@ export type ClientShippingSimulationQueryQuery = {
1791
1831
  price: number | null
1792
1832
  shippingEstimate: string | null
1793
1833
  localizedEstimates: string | null
1834
+ deliveryChannel: string | null
1794
1835
  availableDeliveryWindows: Array<{
1795
1836
  startDateUtc: string | null
1796
1837
  endDateUtc: string | null
@@ -2347,7 +2388,7 @@ export const ValidateSessionDocument = {
2347
2388
  export const ClientShippingSimulationQueryDocument = {
2348
2389
  __meta__: {
2349
2390
  operationName: 'ClientShippingSimulationQuery',
2350
- operationHash: 'd6667f1de2a26b94b9b55f4b25d7d823f82635a0',
2391
+ operationHash: 'c35bad22f67f3eb34fea52bb49efa6b1da6b728d',
2351
2392
  },
2352
2393
  } as unknown as TypedDocumentString<
2353
2394
  ClientShippingSimulationQueryQuery,
@@ -10,5 +10,5 @@
10
10
  "47e48eaee91d16a4237eb2c1241bc2ed3e2ad9bb": "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 } gtin image { alternateName url } isVariantOf { name productGroupID } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price quantity seller { identifier } } } id: productID sku slug } 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 }",
11
11
  "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 }",
12
12
  "2c6e94b978eb50647873082daebcc5b332154cb1": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId } channel 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 } }",
13
- "d6667f1de2a26b94b9b55f4b25d7d823f82635a0": "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 localizedEstimates price shippingEstimate } } } ...ClientShippingSimulation }"
13
+ "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 }"
14
14
  }
@@ -432,6 +432,40 @@ type StoreProductGroup {
432
432
  skuVariants: SkuVariants
433
433
  }
434
434
 
435
+ type Profile {
436
+ """Collection of user's address"""
437
+ addresses: [ProfileAddress]
438
+ }
439
+
440
+ type ProfileAddress {
441
+ """ProfileAddress address name/id."""
442
+ addressName: String
443
+ """ProfileAddress address type."""
444
+ addressType: String
445
+ """ProfileAddress postal code."""
446
+ postalCode: String
447
+ """ProfileAddress city."""
448
+ city: String
449
+ """ProfileAddress state."""
450
+ state: String
451
+ """ProfileAddress country."""
452
+ country: String
453
+ """ProfileAddress street."""
454
+ street: String
455
+ """ProfileAddress number."""
456
+ number: String
457
+ """ProfileAddress neighborhood."""
458
+ neighborhood: String
459
+ """ProfileAddress complement."""
460
+ complement: String
461
+ """ProfileAddress reference."""
462
+ reference: String
463
+ """ProfileAddress receiver name."""
464
+ receiverName: String
465
+ """ProfileAddress geo coordinate."""
466
+ geoCoordinate: [Float]
467
+ }
468
+
435
469
  """Properties that can be associated with products and products groups."""
436
470
  type StorePropertyValue {
437
471
  """Property id. This propert changes according to the content of the object."""
@@ -635,6 +669,11 @@ type Query {
635
669
  """Sales channel of the navigation"""
636
670
  salesChannel: String
637
671
  ): SellersData @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
672
+ """Returns information about the profile."""
673
+ profile(
674
+ """Identifier for user."""
675
+ id: String!
676
+ ): Profile @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
638
677
  }
639
678
 
640
679
  """
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
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.31.0](https://github.com/vtex/faststore/compare/v3.30.1...v3.31.0) (2025-03-26)
7
+
8
+ ### Features
9
+
10
+ - adds deliveryChannel in shipping simulation ([#2746](https://github.com/vtex/faststore/issues/2746)) ([1dd68ed](https://github.com/vtex/faststore/commit/1dd68ed3465beec511b434258cb2e7ae3a3af214))
11
+
12
+ ## [3.30.1](https://github.com/vtex/faststore/compare/v3.30.0...v3.30.1) (2025-03-25)
13
+
14
+ **Note:** Version bump only for package @faststore/core
15
+
6
16
  ## [3.29.1](https://github.com/vtex/faststore/compare/v3.29.0...v3.29.1) (2025-03-21)
7
17
 
8
18
  **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.29.1",
3
+ "version": "3.31.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,7 +44,7 @@
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.29.1",
47
+ "@faststore/api": "^3.30.1",
48
48
  "@faststore/components": "^3.28.0",
49
49
  "@faststore/graphql-utils": "^3.28.0",
50
50
  "@faststore/lighthouse": "^3.28.0",
@@ -104,5 +104,5 @@
104
104
  "ts-jest": "29.1.1",
105
105
  "typescript": "5.3.2"
106
106
  },
107
- "gitHead": "71364442243a6e6b9cfeb5a1e7b64c9414057779"
107
+ "gitHead": "d9242e3aa67643e2f47cd0168b610eaa5bc4251a"
108
108
  }
@@ -28,6 +28,7 @@ const query = gql(`
28
28
  }
29
29
  shippingEstimate
30
30
  localizedEstimates
31
+ deliveryChannel
31
32
  }
32
33
  }
33
34
  address {
@@ -1,11 +1,11 @@
1
1
  import { assertValidSchema } from 'graphql'
2
2
 
3
+ import storeConfig from '../../discovery.config'
3
4
  import { execute, getEnvelop } from '../../src/server'
4
5
  import {
5
- getTypeDefsFromFolder,
6
6
  getMergedSchema,
7
+ getTypeDefsFromFolder,
7
8
  } from '../../src/server/generator/schema'
8
- import storeConfig from '../../discovery.config'
9
9
 
10
10
  const TYPES = [
11
11
  'StoreAggregateOffer',
@@ -71,6 +71,7 @@ const QUERIES = [
71
71
  'shipping',
72
72
  'redirect',
73
73
  'sellers',
74
+ 'profile',
74
75
  ]
75
76
 
76
77
  const MUTATIONS = ['validateCart', 'validateSession', 'subscribeToNewsletter']