@faststore/core 3.46.0 → 3.47.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 (44) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +37 -37
  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/4559.js +2 -2
  13. package/.next/server/chunks/5636.js +2 -2
  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/account/orders/[id].js +1 -1
  17. package/.next/server/pages/api/graphql.js +2 -2
  18. package/.next/server/pages/en-US/404.html +2 -2
  19. package/.next/server/pages/en-US/500.html +2 -2
  20. package/.next/server/pages/en-US/account/403.html +2 -2
  21. package/.next/server/pages/en-US/account/404.html +2 -2
  22. package/.next/server/pages/en-US/checkout.html +2 -2
  23. package/.next/server/pages/en-US/login.html +2 -2
  24. package/.next/server/pages/en-US/s.html +2 -2
  25. package/.next/server/pages/en-US.html +2 -2
  26. package/.next/server/pages-manifest.json +1 -1
  27. package/.next/static/chunks/pages/account/orders/{[id]-8ab11c6c528911e9.js → [id]-987267efe897728e.js} +1 -1
  28. package/.next/static/chunks/{webpack-889c9cccd383a436.js → webpack-899d14dc3b88c279.js} +1 -1
  29. package/.next/static/css/42dee7d8309ef26a.css +1 -0
  30. package/.next/static/{ptJ56QsnBqlWtpbKOLiri → ubzMbDTuqgM9JiF3PWmyK}/_buildManifest.js +1 -1
  31. package/.next/trace +129 -129
  32. package/.turbo/turbo-build.log +8 -8
  33. package/.turbo/turbo-test.log +6 -5
  34. package/@generated/gql.ts +4 -4
  35. package/@generated/graphql.ts +75 -601
  36. package/@generated/persisted-documents.json +2 -2
  37. package/@generated/schema.graphql +43 -2
  38. package/CHANGELOG.md +10 -0
  39. package/package.json +4 -4
  40. package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +3 -2
  41. package/src/pages/account/orders/[id].tsx +30 -523
  42. package/src/pages/account/orders/index.tsx +0 -56
  43. package/.next/static/css/25ded555cb9a704f.css +0 -1
  44. /package/.next/static/{ptJ56QsnBqlWtpbKOLiri → ubzMbDTuqgM9JiF3PWmyK}/_ssgManifest.js +0 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "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 }",
3
3
  "46103bee661405bde706d72126fdbf9b0a0c9e6e": "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 availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes 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 } 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 }",
4
- "ff6bfc13b2150964c1988ba7e127eda8828a08d0": "fragment UserOrderItemsFragment on UserOrderItems { detailUrl id imageUrl measurementUnit name quantity refId rewardValue sellingPrice unitMultiplier } query ServerOrderDetailsQuery($orderId: String!) { userOrder(orderId: $orderId) { affiliateId allowCancellation allowEdition authorizedDate callCenterOperatorData cancelReason cancellationData { CancellationDate Reason RequestedByPaymentNotification RequestedBySellerNotification RequestedBySystem RequestedByUser } cancellationRequests { cancellationRequestDate cancellationRequestDenyDate deniedBySeller deniedBySellerReason id reason requestedByUser } changesAttachment checkedInPickupPointId clientPreferencesData { locale optinNewsLetter } clientProfileData { corporateDocument corporateName corporatePhone customerClass customerCode document documentType email firstName id isCorporate lastName phone stateInscription tradeName userProfileId userProfileVersion } commercialConditionData creationDate customData { customApps { fields { cartEtag } id major } } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } followUpEmail giftRegistryData hostname invoiceData invoicedDate isCheckedIn isCompleted itemMetadata { Items { AssemblyOptions { Id Name Required } DetailUrl Ean Id ImageUrl Name ProductId RefId Seller SkuName } } items { additionalInfo { brandId brandName categories { id name } categoriesIds commercialConditionId dimension { cubicweight height length weight width } offeringInfo offeringType offeringTypeId productClusterId } assemblies attachmentOfferings { name required } attachments { content name } bundleItems { attachments { content name } ...UserOrderItemsFragment } callCenterOperator commission components { ...UserOrderItemsFragment } costPrice detailUrl ean freightCommission id imageUrl isGift itemAttachment { name } listPrice lockId manualPrice manualPriceAppliedBy measurementUnit name offerings { id name price type } params parentAssemblyBinding parentItemIndex preSaleDate price priceDefinition { calculatedSellingPrice reason sellingPrices { quantity value } total } priceTags { isPercentual name rawValue value } priceValidUntil productId quantity refId rewardValue seller sellerSku sellingPrice serialNumbers shippingPrice tax taxCode uniqueId unitMultiplier } lastChange lastMessage marketingData marketplace { baseURL isCertified name } marketplaceOrderId marketplaceServicesEndpoint merchantName openTextField orderFormId orderGroup orderId origin packageAttachment { packages { courier courierStatus { data { city description lastChange state } finished status } extraValue invoiceKey invoiceNumber invoiceUrl invoiceValue issuanceDate items { description itemIndex price quantity } restitutions { GiftCard { items { compensationValue description id isCompensation itemIndex price quantity unitMultiplier useFreight } value } Refund { items { compensationValue description id isCompensation itemIndex price quantity unitMultiplier useFreight } value } } trackingNumber trackingUrl type } } paymentData { giftCards transactions { isActive merchantName payments { accountId bankIssuedInvoiceBarCodeNumber bankIssuedInvoiceBarCodeType bankIssuedInvoiceIdentificationNumber bankIssuedInvoiceIdentificationNumberFormatted billingAddress cardHolder cardNumber connectorResponses { Message ReturnCode Tid authId } cvv2 dueDate expireMonth expireYear firstDigits giftCardAsDiscount giftCardCaption giftCardId giftCardName giftCardProvider group id installments koinUrl lastDigits parentAccountId paymentOrigin paymentSystem paymentSystemName redemptionCode referenceValue tid url value } transactionId } } ratesAndBenefitsData { id rateAndBenefitsIdentifiers { additionalInfo description featured id name } } roundingError salesChannel sellerOrderId sellers { fulfillmentEndpoint id logo name } sequence shippingData { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } availableAddresses { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } contactInformation { document documentType email firstName id lastName phone } id logisticsInfo { addressId deliveryChannel deliveryChannels { id stockBalance } deliveryCompany deliveryIds { accountCarrierName courierId courierName dockId kitItemDetails quantity warehouseId } deliveryWindow { endDateUtc price startDateUtc } entityId itemId itemIndex listPrice lockTTL pickupPointId pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } polygonName price selectedDeliveryChannel selectedSla sellingPrice shippingEstimate shippingEstimateDate shipsTo slas { availableDeliveryWindows { endDateUtc price startDateUtc } deliveryChannel deliveryIds { accountCarrierName courierId courierName dockId kitItemDetails quantity warehouseId } deliveryWindow { endDateUtc price startDateUtc } id listPrice lockTTL name pickupDistance pickupPointId pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } polygonName price shippingEstimate shippingEstimateDate transitTime } transitTime versionId } selectedAddresses { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } trackingHints } status statusDescription storePreferencesData { countryCode currencyCode currencyFormatInfo { CurrencyDecimalDigits CurrencyDecimalSeparator CurrencyGroupSeparator CurrencyGroupSize StartsWithCurrencySymbol } currencyLocale currencySymbol timeZone } subscriptionData taxData totals { id name value } value workflowIsInError } }",
5
- "b88154468340d7d0dac6b3df8641bf6f54a554b7": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { facets list { ShippingEstimatedDate ShippingEstimatedDateMax ShippingEstimatedDateMin affiliateId authorizedDate callCenterOperatorName clientName creationDate currencyCode deliveryDates giftCardProviders hostname invoiceInput invoiceOutput isAllDelivered isAnyDelivered items { description ean id price productId quantity refId seller sellingPrice } lastChange lastMessageUnread listId listType marketPlaceOrderId orderFormId orderId orderIsComplete origin paymentApprovedDate paymentNames readyForHandlingDate salesChannel sequence status statusDescription totalItems totalValue workflowInErrorState workflowInRetry } paging { currentPage pages perPage total } reportRecordsLimit stats { stats { totalItems { Count Facets Max Mean Min Missing StdDev Sum SumOfSquares } totalValue { Count Facets Max Mean Min Missing StdDev Sum SumOfSquares } } } } }",
4
+ "8b9b9c7703b0b9af12f47cb86dd3d2e8eb40c8fd": "query ServerOrderDetailsQuery($orderId: String!) { userOrder(orderId: $orderId) { allowCancellation clientProfileData { corporateName email firstName isCorporate lastName phone } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } orderId paymentData { transactions { isActive payments { bankIssuedInvoiceIdentificationNumber connectorResponses { authId } group id installments lastDigits paymentOrigin paymentSystemName redemptionCode referenceValue tid url value } } } status statusDescription storePreferencesData { currencyCode } totals { id name value } } }",
5
+ "9f48d9d4c1b6e6b32ac1f1c1b7b3819ac826dfe7": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
6
6
  "e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
7
7
  "c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0": "fragment CartItem on StoreOffer { 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 } } }",
8
8
  "feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",
@@ -690,7 +690,7 @@ type Query {
690
690
  userOrder(
691
691
  """Identifier for the order."""
692
692
  orderId: String!
693
- ): UserOrder @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
693
+ ): UserOrderResult @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
694
694
  """Returns information about the list of Orders that the User can view."""
695
695
  listUserOrders(
696
696
  """Page number of the list of orders."""
@@ -707,7 +707,7 @@ type Query {
707
707
  text: String
708
708
  """Client email used to filter of the list of orders."""
709
709
  clientEmail: String
710
- ): UserOrderListResult @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
710
+ ): UserOrderListMinimalResult @cacheControl(scope: "public", sMaxAge: 120, staleWhileRevalidate: 3600)
711
711
  }
712
712
 
713
713
  """
@@ -1275,6 +1275,22 @@ type UserOrder {
1275
1275
  customFields: [UserOrderCustomFieldsGrouped]
1276
1276
  }
1277
1277
 
1278
+ type UserOrderResult {
1279
+ orderId: String
1280
+ status: String
1281
+ statusDescription: String
1282
+ allowCancellation: Boolean
1283
+ storePreferencesData: UserOrderStorePreferencesData
1284
+ clientProfileData: UserOrderClientProfileData
1285
+ customData: UserOrderCustomData
1286
+ customFields: [UserOrderCustomFieldsGrouped]
1287
+ deliveryOptionsData: UserOrderDeliveryOptionsData
1288
+ paymentData: UserOrderPaymentData
1289
+ totals: [UserOrderTotals]
1290
+ shippingData: UserOrderShippingData
1291
+ items: [UserOrderItems]
1292
+ }
1293
+
1278
1294
  type UserOrderListResult {
1279
1295
  list: [UserOrderFromList]
1280
1296
  paging: UserOrderListPaging
@@ -1921,3 +1937,28 @@ type UserOrderCustomFieldsGrouped {
1921
1937
  id: String
1922
1938
  fields: [UserOrderCustomFieldField]
1923
1939
  }
1940
+
1941
+ type UserOrderFromListCustomFields {
1942
+ costCenter: [String]
1943
+ poNumber: [String]
1944
+ release: [String]
1945
+ desktop: [String]
1946
+ }
1947
+
1948
+ type UserOrderListMinimalResult {
1949
+ list: [UserOrderFromListMinimal]
1950
+ paging: UserOrderListPaging
1951
+ }
1952
+
1953
+ type UserOrderFromListMinimal {
1954
+ orderId: String
1955
+ creationDate: String
1956
+ clientName: String
1957
+ items: [UserOrderItemsSummarized]
1958
+ totalValue: Float
1959
+ status: String
1960
+ statusDescription: String
1961
+ ShippingEstimatedDate: String
1962
+ customFields: UserOrderFromListCustomFields
1963
+ currencyCode: String
1964
+ }
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.47.1](https://github.com/vtex/faststore/compare/v3.47.0...v3.47.1) (2025-05-22)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ # [3.47.0](https://github.com/vtex/faststore/compare/v3.46.0...v3.47.0) (2025-05-22)
11
+
12
+ ### Features
13
+
14
+ - clean up GraphQL types and queries for user orders SFS-2516 ([#2858](https://github.com/vtex/faststore/issues/2858)) ([8ed42d5](https://github.com/vtex/faststore/commit/8ed42d590d0e0557f99ae1fc015f70d71a88a743))
15
+
6
16
  # [3.46.0](https://github.com/vtex/faststore/compare/v3.45.0...v3.46.0) (2025-05-21)
7
17
 
8
18
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.46.0",
3
+ "version": "3.47.1",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,11 +44,11 @@
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.46.0",
47
+ "@faststore/api": "^3.47.0",
48
48
  "@faststore/graphql-utils": "^3.45.0",
49
49
  "@faststore/lighthouse": "^3.45.0",
50
50
  "@faststore/sdk": "^3.46.0",
51
- "@faststore/ui": "^3.45.0",
51
+ "@faststore/ui": "^3.47.1",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
54
54
  "@graphql-codegen/typescript": "4.0.7",
@@ -105,5 +105,5 @@
105
105
  "ts-jest": "29.1.1",
106
106
  "typescript": "5.3.2"
107
107
  },
108
- "gitHead": "6aba366be5bd864289592ae2c01728130414796f"
108
+ "gitHead": "8b92299408d358497a78222cccff9bbb5f46fb0e"
109
109
  }
@@ -35,7 +35,7 @@ export default function MyAccountOrderDetails({
35
35
  }
36
36
  }
37
37
 
38
- const moreInformationCustomFields = order?.customFields.find(
38
+ const moreInformationCustomFields = order?.customFields?.find(
39
39
  (field) => field.type === 'order'
40
40
  )?.fields
41
41
 
@@ -71,7 +71,8 @@ export default function MyAccountOrderDetails({
71
71
  <MyAccountDeliveryCard
72
72
  deliveryOptionsData={order.deliveryOptionsData}
73
73
  fields={
74
- order.customFields.find((field) => field.type === 'address')?.fields
74
+ order?.customFields?.find((field) => field.type === 'address')
75
+ ?.fields || []
75
76
  }
76
77
  />
77
78
  <MyAccountStatusCard status={order.status as OrderStatusKey} />