@faststore/api 4.8.1-dev.0 → 4.8.1-dev.2
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.
- package/dist/cjs/index.js +48 -44
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +315 -280
- package/dist/es/index.mjs.map +1 -1
- package/dist/src/__generated__/schema.d.ts +2 -0
- package/dist/src/__generated__/schema.d.ts.map +1 -1
- package/dist/src/platforms/vtex/clients/commerce/index.d.ts +9 -0
- package/dist/src/platforms/vtex/clients/commerce/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/clients/commerce/types/StoreFrontContracts.d.ts +11 -0
- package/dist/src/platforms/vtex/clients/commerce/types/StoreFrontContracts.d.ts.map +1 -0
- package/dist/src/platforms/vtex/clients/index.d.ts +3 -0
- package/dist/src/platforms/vtex/clients/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/getOrderEntryOperation.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/query.d.ts.map +1 -1
- package/dist/src/platforms/vtex/utils/contract.d.ts +13 -1
- package/dist/src/platforms/vtex/utils/contract.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__generated__/schema.ts +2 -0
- package/src/platforms/vtex/clients/commerce/index.ts +23 -0
- package/src/platforms/vtex/clients/commerce/types/StoreFrontContracts.ts +11 -0
- package/src/platforms/vtex/resolvers/query.ts +18 -1
- package/src/platforms/vtex/typeDefs/organization.graphql +4 -0
- package/src/platforms/vtex/utils/contract.ts +31 -2
package/dist/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/__generated__/schema.ts","../../src/platforms/vtex/utils/auth.ts","../../src/directives/auth.ts","../../src/directives/cacheControl.ts","../../src/directives/index.ts","../../src/observability/telemetry.ts","../../src/platforms/errors.ts","../../src/platforms/vtex/clients/fetch.ts","../../src/platforms/vtex/clients/catalog/index.ts","../../src/platforms/vtex/utils/cookies.ts","../../src/platforms/vtex/clients/commerce/index.ts","../../src/platforms/vtex/utils/localization.ts","../../src/platforms/vtex/utils/intelligentSearchRequest.ts","../../src/platforms/vtex/clients/search/index.ts","../../src/platforms/vtex/clients/index.ts","../../src/platforms/vtex/loaders/collection.ts","../../src/platforms/vtex/loaders/salesChannel.ts","../../src/platforms/vtex/loaders/simulation.ts","../../src/platforms/vtex/utils/sanitizeHtml.ts","../../src/platforms/vtex/utils/enhanceSku.ts","../../src/platforms/vtex/loaders/sku.ts","../../src/platforms/vtex/loaders/index.ts","../../src/platforms/vtex/utils/productStock.ts","../../src/platforms/vtex/utils/taxes.ts","../../src/platforms/vtex/resolvers/aggregateOffer.ts","../../src/platforms/vtex/resolvers/aggregateRating.ts","../../src/platforms/vtex/utils/slugify.ts","../../src/platforms/vtex/resolvers/collection.ts","../../src/platforms/vtex/utils/facets.ts","../../src/platforms/vtex/utils/orderStatistics.ts","../../src/platforms/vtex/resolvers/facet.ts","../../src/platforms/vtex/resolvers/faceValue.ts","../../src/platforms/vtex/resolvers/cancelOrder.ts","../../src/platforms/vtex/utils/commercialAuth.ts","../../src/platforms/vtex/resolvers/processOrderAuthorization.ts","../../src/platforms/vtex/resolvers/startOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/startRecommendationSession.ts","../../src/platforms/vtex/resolvers/subscribeToNewsletter.ts","../../src/platforms/vtex/resolvers/uploadFileToOrderEntry.ts","../../src/platforms/vtex/utils/channel.ts","../../src/platforms/vtex/utils/cartSalesChannel.ts","../../src/platforms/vtex/utils/contex.ts","../../src/platforms/vtex/utils/md5.ts","../../src/platforms/vtex/utils/propertyValue.ts","../../src/platforms/vtex/utils/createNewAddress.ts","../../src/platforms/vtex/utils/getAddressOrderForm.ts","../../src/platforms/vtex/utils/shouldUpdateShippingData.ts","../../src/platforms/vtex/resolvers/validateCart.ts","../../src/platforms/vtex/utils/sessionChannel.ts","../../src/platforms/vtex/utils/contract.ts","../../src/platforms/vtex/utils/validateSessionHelpers.ts","../../src/platforms/vtex/resolvers/validateSession.ts","../../src/platforms/vtex/resolvers/mutation.ts","../../../../node_modules/.pnpm/graphql@16.11.0/node_modules/graphql/language/kinds.mjs","../../src/platforms/vtex/resolvers/objectOrString.ts","../../src/platforms/vtex/resolvers/offer.ts","../../src/platforms/vtex/utils/canonical.ts","../../src/platforms/vtex/utils/enhanceCommercialOffer.ts","../../src/platforms/vtex/utils/releaseDate.ts","../../src/platforms/vtex/resolvers/product.ts","../../src/platforms/vtex/resolvers/productGroup.ts","../../src/platforms/vtex/resolvers/propertyValue.ts","../../src/platforms/vtex/utils/sku.ts","../../src/platforms/vtex/resolvers/recommendations.ts","../../src/platforms/vtex/utils/sort.ts","../../src/platforms/vtex/resolvers/getOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/getOrderFormItems.ts","../../src/platforms/vtex/resolvers/query.ts","../../src/platforms/vtex/resolvers/review.ts","../../src/platforms/vtex/resolvers/searchResult.ts","../../src/platforms/vtex/resolvers/seo.ts","../../src/platforms/vtex/resolvers/shippingSLA.ts","../../src/platforms/vtex/utils/skuVariants.ts","../../src/platforms/vtex/resolvers/skuVariations.ts","../../src/platforms/vtex/resolvers/userOrder.ts","../../src/platforms/vtex/resolvers/index.ts","../../src/platforms/vtex/typeDefs/address.graphql?raw","../../src/platforms/vtex/typeDefs/advertisement.graphql?raw","../../src/platforms/vtex/typeDefs/aggregateOffer.graphql?raw","../../src/platforms/vtex/typeDefs/aggregateRating.graphql?raw","../../src/platforms/vtex/typeDefs/author.graphql?raw","../../src/platforms/vtex/typeDefs/brand.graphql?raw","../../src/platforms/vtex/typeDefs/breadcrumb.graphql?raw","../../src/platforms/vtex/typeDefs/cart.graphql?raw","../../src/platforms/vtex/typeDefs/collection.graphql?raw","../../src/platforms/vtex/typeDefs/deliveryPromisesBadge.graphql?raw","../../src/platforms/vtex/typeDefs/facet.graphql?raw","../../src/platforms/vtex/typeDefs/image.graphql?raw","../../src/platforms/vtex/typeDefs/mutation.graphql?raw","../../src/platforms/vtex/typeDefs/newsletter.graphql?raw","../../src/platforms/vtex/typeDefs/objectOrString.graphql?raw","../../src/platforms/vtex/typeDefs/offer.graphql?raw","../../src/platforms/vtex/typeDefs/order.graphql?raw","../../src/platforms/vtex/typeDefs/orderCommercialAuthorizaton.graphql?raw","../../src/platforms/vtex/typeDefs/orderEntry.graphql?raw","../../src/platforms/vtex/typeDefs/organization.graphql?raw","../../src/platforms/vtex/typeDefs/pageInfo.graphql?raw","../../src/platforms/vtex/typeDefs/password.graphql?raw","../../src/platforms/vtex/typeDefs/person.graphql?raw","../../src/platforms/vtex/typeDefs/pickupPoints.graphql?raw","../../src/platforms/vtex/typeDefs/product.graphql?raw","../../src/platforms/vtex/typeDefs/productGroup.graphql?raw","../../src/platforms/vtex/typeDefs/profile.graphql?raw","../../src/platforms/vtex/typeDefs/propertyValue.graphql?raw","../../src/platforms/vtex/typeDefs/query.graphql?raw","../../src/platforms/vtex/typeDefs/quote.graphql?raw","../../src/platforms/vtex/typeDefs/recommendation.graphql?raw","../../src/platforms/vtex/typeDefs/review.graphql?raw","../../src/platforms/vtex/typeDefs/savedCard.graphql?raw","../../src/platforms/vtex/typeDefs/seo.graphql?raw","../../src/platforms/vtex/typeDefs/session.graphql?raw","../../src/platforms/vtex/typeDefs/shipping.graphql?raw","../../src/platforms/vtex/typeDefs/skuVariants.graphql?raw","../../src/platforms/vtex/typeDefs/status.graphql?raw","../../src/platforms/vtex/typeDefs/userOrder.graphql?raw","../../src/platforms/vtex/typeDefs/index.ts","../../src/platforms/vtex/index.ts"],"sourcesContent":["export type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: 'Red', Size: '42'\n * }\n * ```\n */\n ActiveVariations: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: [\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * },\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * }\n * ],\n * Size: [\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * }\n * ]\n * }\n * ```\n */\n FormattedVariants: { input: any; output: any; }\n JSONObject: { input: any; output: any; }\n ObjectOrString: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * 'Color-Red-Size-40': 'classic-shoes-37'\n * }\n * ```\n */\n SlugsMap: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: [ \"Red\", \"Blue\", \"Green\" ],\n * Size: [ \"40\", \"41\" ]\n * }\n * ```\n */\n VariantsByName: { input: any; output: any; }\n};\n\n/** Address information. */\nexport type Address = {\n __typename?: 'Address';\n /** Address city */\n city?: Maybe<Scalars['String']['output']>;\n /** Address complement */\n complement?: Maybe<Scalars['String']['output']>;\n /** Address country */\n country?: Maybe<Scalars['String']['output']>;\n /** Address geoCoordinates */\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** Address neighborhood */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** Address number */\n number?: Maybe<Scalars['String']['output']>;\n /** Address postal code */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Address reference */\n reference?: Maybe<Scalars['String']['output']>;\n /** Address state */\n state?: Maybe<Scalars['String']['output']>;\n /** Address street */\n street?: Maybe<Scalars['String']['output']>;\n};\n\n/** Advertisement information about a specific product in a campaign */\nexport type Advertisement = {\n __typename?: 'Advertisement';\n /** Cost of the action, usually Cost Per Click. */\n actionCost: Scalars['Float']['output'];\n /** Advertiser ID of the product. */\n adId: Scalars['String']['output'];\n /** Advertiser Request ID. */\n adRequestId: Scalars['String']['output'];\n /** Advertiser Response ID. */\n adResponseId: Scalars['String']['output'];\n /** Campaign ID. */\n campaignId: Scalars['String']['output'];\n};\n\nexport type AvailableDeliveryWindows = {\n __typename?: 'AvailableDeliveryWindows';\n /** Available delivery window end date in UTC */\n endDateUtc?: Maybe<Scalars['String']['output']>;\n /** Available delivery window list price */\n listPrice?: Maybe<Scalars['Int']['output']>;\n /** Available delivery window price */\n price?: Maybe<Scalars['Int']['output']>;\n /** Available delivery window start date in UTC */\n startDateUtc?: Maybe<Scalars['String']['output']>;\n /** Available delivery window tax */\n tax?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type BusinessHour = {\n __typename?: 'BusinessHour';\n /** Business hour closing time. */\n closingTime?: Maybe<Scalars['String']['output']>;\n /** Number that represents the day of the week. */\n dayOfWeek?: Maybe<Scalars['Int']['output']>;\n /** Business hour opening time. */\n openingTime?: Maybe<Scalars['String']['output']>;\n};\n\n/**\n * Whether a saved card is personally owned by the buyer or shared by their\n * Organization/Contract. Resolved server-side by the Saved-cards service from\n * the buyer's `useAdHocCard` role — never inferred client-side.\n */\nexport const enum CardOrigin {\n Personal = 'personal',\n Shared = 'shared'\n};\n\n/** Commercial Authorization dimension status. */\nexport type CommercialAuthorizationDimensionStatus = {\n __typename?: 'CommercialAuthorizationDimensionStatus';\n /** Creation date. */\n creationDate: Scalars['String']['output'];\n /** Creation environment. */\n creationEnvironment: Scalars['String']['output'];\n /** Creation version. */\n creationVersion: Scalars['String']['output'];\n /** Dimension status ID. */\n id: Scalars['String']['output'];\n /** Dimension status name. */\n name: Scalars['String']['output'];\n /** Priority level. */\n priority: Scalars['Int']['output'];\n /** Indicates if all rules acceptance is required. */\n requireAllRulesAcceptance: Scalars['Boolean']['output'];\n /** Collection of rules for this dimension. */\n ruleCollection: Array<CommercialAuthorizationRule>;\n /** Dimension score. */\n score: Scalars['Float']['output'];\n /** Indicates if simulation should be performed. */\n shouldSimulate: Scalars['Boolean']['output'];\n /** Current status of the dimension. */\n status: CommercialAuthorizationStatus;\n /** Unit ID, if applicable. */\n unitId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Commercial Authorization item. */\nexport type CommercialAuthorizationItem = {\n __typename?: 'CommercialAuthorizationItem';\n /** Additional information as key-value pairs. */\n additionalInfo: Scalars['JSONObject']['output'];\n /** Item ID. */\n id: Scalars['String']['output'];\n /** Item price. */\n price: Scalars['Float']['output'];\n /** Item quantity. */\n quantity: Scalars['Int']['output'];\n /** Item SKU. */\n sku: Scalars['String']['output'];\n /** Total manual discount applied. */\n totalManualDiscount: Scalars['Float']['output'];\n /** Total system discount applied. */\n totalSystemDiscount: Scalars['Float']['output'];\n};\n\n/** Commercial Authorization response. */\nexport type CommercialAuthorizationResponse = {\n __typename?: 'CommercialAuthorizationResponse';\n /** Additional information as key-value pairs. */\n additionalInfo: Scalars['JSONObject']['output'];\n /** Callback endpoint URL. */\n callbackEndpoint: Scalars['String']['output'];\n /** Creation environment. */\n creationEnvironment: Scalars['String']['output'];\n /** Creation version. */\n creationVersion: Scalars['String']['output'];\n /** Dimension status information. */\n dimensionStatus: Array<CommercialAuthorizationDimensionStatus>;\n /** Commercial Authorization ID. */\n id: Scalars['String']['output'];\n /** Collection of items in the commercial authorization. */\n itemCollection: Array<CommercialAuthorizationItem>;\n /** Marketplace payment value. */\n marketPlacePaymentValue: Scalars['Float']['output'];\n /** Order ID associated with the commercial authorization. */\n orderId: Scalars['String']['output'];\n /** Current status of the commercial authorization. */\n status: CommercialAuthorizationStatus;\n /** Total order value desired by the seller. */\n totalOrderValueDesiredBySeller: Scalars['Float']['output'];\n /** List of units. */\n units: Array<Scalars['String']['output']>;\n /** User profile ID. */\n userProfileId: Scalars['String']['output'];\n /** Workflow instance ID. */\n workflowInstanceId: Scalars['String']['output'];\n};\n\n/** Commercial Authorization rule. */\nexport type CommercialAuthorizationRule = {\n __typename?: 'CommercialAuthorizationRule';\n /** Authorization data, if available. */\n authorizationData?: Maybe<CommercialAuthorizationRuleAuthorizationData>;\n /** List of authorized email addresses. */\n authorizedEmails: Array<Scalars['String']['output']>;\n /** DO ID, if applicable. */\n doId?: Maybe<Scalars['String']['output']>;\n /** Rule ID. */\n id: Scalars['String']['output'];\n /**\n * Indicates that the user is listed as one of the possible approvers,\n * but does not necessarily mean that he or she is the next in the chain to approve.\n */\n isUserAuthorized: Scalars['Boolean']['output'];\n /**\n * Indicates that the user is next in the approval chain.\n * This means that they must take an approval or rejection action.\n */\n isUserNextAuthorizer: Scalars['Boolean']['output'];\n /** Rule name. */\n name: Scalars['String']['output'];\n /** Indicates if notification is enabled. */\n notification: Scalars['Boolean']['output'];\n /** Rule priority. */\n priority: Scalars['Int']['output'];\n /** Score interval configuration. */\n scoreInterval: CommercialAuthorizationRuleScoreInterval;\n /** Current status of the rule. */\n status: CommercialAuthorizationStatus;\n /** Timeout value. */\n timeout: Scalars['Int']['output'];\n /** Rule trigger configuration. */\n trigger: CommercialAuthorizationRuleTrigger;\n};\n\n/** Commercial Authorization rule authorization data. */\nexport type CommercialAuthorizationRuleAuthorizationData = {\n __typename?: 'CommercialAuthorizationRuleAuthorizationData';\n /** List of authorizers. */\n authorizers: Array<CommercialAuthorizationRuleAuthorizer>;\n /** Indicates if all approvals are required. */\n requireAllApprovals: Scalars['Boolean']['output'];\n};\n\n/** Commercial Authorization rule authorizer. */\nexport type CommercialAuthorizationRuleAuthorizer = {\n __typename?: 'CommercialAuthorizationRuleAuthorizer';\n /** Authorization date. */\n authorizationDate?: Maybe<Scalars['String']['output']>;\n /** Authorizer email. */\n email?: Maybe<Scalars['String']['output']>;\n /** Authorizer ID. */\n id: Scalars['String']['output'];\n /** Authorizer type. */\n type: Scalars['String']['output'];\n};\n\n/** Commercial Authorization rule score interval. */\nexport type CommercialAuthorizationRuleScoreInterval = {\n __typename?: 'CommercialAuthorizationRuleScoreInterval';\n /** Accept score threshold. */\n accept: Scalars['Float']['output'];\n /** Deny score threshold. */\n deny: Scalars['Float']['output'];\n};\n\n/** Commercial Authorization rule trigger. */\nexport type CommercialAuthorizationRuleTrigger = {\n __typename?: 'CommercialAuthorizationRuleTrigger';\n /** Trigger condition. */\n condition: CommercialAuthorizationRuleTriggerCondition;\n /** Trigger effect. */\n effect: CommercialAuthorizationRuleTriggerEffect;\n};\n\n/** Commercial Authorization rule trigger condition. */\nexport type CommercialAuthorizationRuleTriggerCondition = {\n __typename?: 'CommercialAuthorizationRuleTriggerCondition';\n /** Condition type. */\n conditionType: Scalars['Int']['output'];\n /** Condition description. */\n description?: Maybe<Scalars['String']['output']>;\n /** Condition expression. */\n expression?: Maybe<Scalars['String']['output']>;\n /** Greater than value. */\n greatherThan?: Maybe<Scalars['Float']['output']>;\n /** Less than value. */\n lessThan?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Commercial Authorization rule trigger effect. */\nexport type CommercialAuthorizationRuleTriggerEffect = {\n __typename?: 'CommercialAuthorizationRuleTriggerEffect';\n /** Effect description. */\n description?: Maybe<Scalars['String']['output']>;\n /** Effect type. */\n effectType: Scalars['Int']['output'];\n /** Function path. */\n funcPath?: Maybe<Scalars['String']['output']>;\n};\n\n/** Commercial Authorization status. */\nexport const enum CommercialAuthorizationStatus {\n /** Authorization has been accepted. */\n Accepted = 'accepted',\n /** Authorization has been denied. */\n Denied = 'denied',\n /** Authorization is pending. */\n Pending = 'pending'\n};\n\nexport type DeliveryIds = {\n __typename?: 'DeliveryIds';\n /** DeliveryIds courier id */\n courierId?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds courier name */\n courierName?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds dock id */\n dockId?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds quantity */\n quantity?: Maybe<Scalars['Int']['output']>;\n /** DeliveryIds warehouse id */\n warehouseId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Delivery Promise badge. */\nexport type DeliveryPromiseBadge = {\n __typename?: 'DeliveryPromiseBadge';\n /** Badge type. */\n typeName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Input to get commercial authorizations by order ID. */\nexport type ICommercialAuthorizationByOrderId = {\n /** Order ID to get commercial authorizations for. */\n orderId: Scalars['String']['input'];\n};\n\nexport type IGeoCoordinates = {\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['input'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['input'];\n};\n\nexport type IOrderEntryOperation = {\n objectKey: Scalars['String']['input'];\n orderFormId?: InputMaybe<Scalars['String']['input']>;\n sessionToken?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Input for uploading a file to the Order Entry Service.\n * The file is transmitted as a Base64-encoded string so it can travel\n * through the standard GraphQL JSON pipeline without multipart support.\n */\nexport type IOrderEntryUpload = {\n /** Base64-encoded file content. */\n fileContent: Scalars['String']['input'];\n /** Original file name (e.g. \"order.csv\"). */\n fileName: Scalars['String']['input'];\n /** MIME type of the file (e.g. \"text/csv\", \"image/png\"). */\n mimeType: Scalars['String']['input'];\n};\n\n/** Person data input to the newsletter. */\nexport type IPersonNewsletter = {\n /** Person's email. */\n email: Scalars['String']['input'];\n /** Person's name. */\n name: Scalars['String']['input'];\n};\n\n/** Input to process order authorization (approve or reject). */\nexport type IProcessOrderAuthorization = {\n /** Whether the authorization is approved (true) or rejected (false). */\n approved: Scalars['Boolean']['input'];\n /** Dimension ID associated with the authorization. */\n dimensionId: Scalars['String']['input'];\n /** Order authorization ID. */\n orderAuthorizationId: Scalars['String']['input'];\n /** Rule ID associated with the authorization. */\n ruleId: Scalars['String']['input'];\n};\n\n/** Input type for setting a new password. */\nexport type ISetPassword = {\n /** Optional access key for the user, used in some authentication flows. */\n accesskey?: InputMaybe<Scalars['String']['input']>;\n /** The current password of the user, required for verification before changing to the new password. */\n currentPassword: Scalars['String']['input'];\n /** The email of the user for whom the password is being set. */\n email: Scalars['String']['input'];\n /** The new password to be set for the user. */\n newPassword: Scalars['String']['input'];\n /** Optional reCAPTCHA token for security verification. */\n recaptcha?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Shipping Simulation item input. */\nexport type IShippingItem = {\n /** ShippingItem ID / Sku. */\n id: Scalars['String']['input'];\n /** Number of items. */\n quantity: Scalars['Int']['input'];\n /** Seller responsible for the ShippingItem. */\n seller: Scalars['String']['input'];\n};\n\nexport type IStoreB2B = {\n contractName?: InputMaybe<Scalars['String']['input']>;\n customerId: Scalars['String']['input'];\n firstName?: InputMaybe<Scalars['String']['input']>;\n isRepresentative?: InputMaybe<Scalars['Boolean']['input']>;\n lastName?: InputMaybe<Scalars['String']['input']>;\n organizationManager?: InputMaybe<Scalars['Boolean']['input']>;\n savedPostalCode?: InputMaybe<Scalars['String']['input']>;\n unitId?: InputMaybe<Scalars['String']['input']>;\n unitName?: InputMaybe<Scalars['String']['input']>;\n userEmail?: InputMaybe<Scalars['String']['input']>;\n userName?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Shopping cart input. */\nexport type IStoreCart = {\n /** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */\n order: IStoreOrder;\n};\n\nexport type IStoreCurrency = {\n /** Currency code (e.g: USD). */\n code: Scalars['String']['input'];\n /** Currency symbol (e.g: $). */\n symbol: Scalars['String']['input'];\n};\n\nexport type IStoreDeliveryMode = {\n /** The delivery channel information of the session. */\n deliveryChannel: Scalars['String']['input'];\n /** The delivery method information of the session. */\n deliveryMethod: Scalars['String']['input'];\n /** The delivery window information of the session. */\n deliveryWindow?: InputMaybe<IStoreDeliveryWindow>;\n};\n\n/** Delivery window information. */\nexport type IStoreDeliveryWindow = {\n /** The delivery window end date information. */\n endDate: Scalars['String']['input'];\n /** The delivery window start date information. */\n startDate: Scalars['String']['input'];\n};\n\nexport type IStoreGeoCoordinates = {\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['input'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['input'];\n};\n\n/** Image input. */\nexport type IStoreImage = {\n /** Alias for the input image. */\n alternateName: Scalars['String']['input'];\n /** Image input URL. */\n url: Scalars['String']['input'];\n};\n\nexport type IStoreMarketingData = {\n utmCampaign?: InputMaybe<Scalars['String']['input']>;\n utmMedium?: InputMaybe<Scalars['String']['input']>;\n utmSource?: InputMaybe<Scalars['String']['input']>;\n utmiCampaign?: InputMaybe<Scalars['String']['input']>;\n utmiPage?: InputMaybe<Scalars['String']['input']>;\n utmiPart?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Offer input. */\nexport type IStoreOffer = {\n /** Information on the item being offered. */\n itemOffered: IStoreProduct;\n /** This is displayed as the \"from\" price in the context of promotions' price comparison. This may change before it reaches the shelf. */\n listPrice: Scalars['Float']['input'];\n /** Also known as spot price. */\n price: Scalars['Float']['input'];\n /** Signed price token (JWT) from the Pricing Fallback feature, forwarded to Checkout on add-to-cart. */\n priceToken?: InputMaybe<Scalars['String']['input']>;\n /** Number of items offered. */\n quantity: Scalars['Int']['input'];\n /** Seller responsible for the offer. */\n seller: IStoreOrganization;\n};\n\n/** Order input. */\nexport type IStoreOrder = {\n /** Array with information on each accepted offer. */\n acceptedOffer: Array<IStoreOffer>;\n /** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */\n orderNumber: Scalars['String']['input'];\n /** Indicates whether or not items with attachments should be split. */\n shouldSplitItem?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Organization input. */\nexport type IStoreOrganization = {\n /** Organization ID. */\n identifier: Scalars['String']['input'];\n};\n\n/** Client profile data. */\nexport type IStorePerson = {\n /** Client email. */\n email: Scalars['String']['input'];\n /** Client last name. */\n familyName: Scalars['String']['input'];\n /** Client first name. */\n givenName: Scalars['String']['input'];\n /** Client ID. */\n id: Scalars['String']['input'];\n};\n\n/** Product input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type IStoreProduct = {\n /** Custom Product Additional Properties. */\n additionalProperty?: InputMaybe<Array<IStorePropertyValue>>;\n /** Array of product images. */\n image: Array<IStoreImage>;\n /** Product name. */\n name: Scalars['String']['input'];\n /** Stock Keeping Unit. Merchant-specific ID for the product. */\n sku: Scalars['String']['input'];\n};\n\nexport type IStorePropertyValue = {\n /** Property name. */\n name: Scalars['String']['input'];\n /** Property id. This propert changes according to the content of the object. */\n propertyID?: InputMaybe<Scalars['String']['input']>;\n /** Property value. May hold a string or the string representation of an object. */\n value: Scalars['ObjectOrString']['input'];\n /** Specifies the nature of the value */\n valueReference: Scalars['ObjectOrString']['input'];\n};\n\n/** Selected search facet input. */\nexport type IStoreSelectedFacet = {\n /** Selected search facet key. */\n key: Scalars['String']['input'];\n /** Selected search facet value. */\n value: Scalars['String']['input'];\n};\n\n/** Session input. */\nexport type IStoreSession = {\n /** Session input address type. */\n addressType?: InputMaybe<Scalars['String']['input']>;\n /** Session input b2b. */\n b2b?: InputMaybe<IStoreB2B>;\n /** Session input channel. */\n channel?: InputMaybe<Scalars['String']['input']>;\n /** Session input city. */\n city?: InputMaybe<Scalars['String']['input']>;\n /** Session input country. */\n country: Scalars['String']['input'];\n /** Session input currency. */\n currency: IStoreCurrency;\n /** Session input delivery mode. */\n deliveryMode?: InputMaybe<IStoreDeliveryMode>;\n /** Session input geoCoordinates. */\n geoCoordinates?: InputMaybe<IStoreGeoCoordinates>;\n /** Session input locale. */\n locale: Scalars['String']['input'];\n /** Marketing information input. */\n marketingData?: InputMaybe<IStoreMarketingData>;\n /** Session input person. */\n person?: InputMaybe<IStorePerson>;\n /** Session input postal code. */\n postalCode?: InputMaybe<Scalars['String']['input']>;\n /** Refresh token after Information. */\n refreshAfter?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Input to the cancel order API. */\nexport type IUserOrderCancel = {\n /** Customer's email. */\n customerEmail?: InputMaybe<Scalars['String']['input']>;\n /** Person's name. */\n orderId: Scalars['String']['input'];\n /** Reason. */\n reason?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type LogisticsInfo = {\n __typename?: 'LogisticsInfo';\n /** LogisticsInfo itemIndex. */\n itemIndex?: Maybe<Scalars['String']['output']>;\n /** LogisticsInfo selectedSla. */\n selectedSla?: Maybe<Scalars['String']['output']>;\n /** List of LogisticsInfo ShippingSLA. */\n slas?: Maybe<Array<Maybe<ShippingSla>>>;\n};\n\n/** Shipping Simulation Logistic Item. */\nexport type LogisticsItem = {\n __typename?: 'LogisticsItem';\n /** LogisticsItem availability. */\n availability?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem ID / Sku. */\n id?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem listPrice. */\n listPrice?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem measurementUnit. */\n measurementUnit?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem price. */\n price?: Maybe<Scalars['Int']['output']>;\n /** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */\n priceValidUntil?: Maybe<Scalars['String']['output']>;\n /** Number of items. */\n quantity?: Maybe<Scalars['Int']['output']>;\n requestIndex?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem rewardValue. */\n rewardValue?: Maybe<Scalars['Int']['output']>;\n /** Seller responsible for the ShippingItem. */\n seller?: Maybe<Scalars['String']['output']>;\n /** List of Sellers. */\n sellerChain?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n /** LogisticsItem sellingPrice. */\n sellingPrice?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem tax. */\n tax?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem unitMultiplier. */\n unitMultiplier?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type MessageFields = {\n __typename?: 'MessageFields';\n /** MessageFields ean. */\n ean?: Maybe<Scalars['String']['output']>;\n /** MessageFields item index. */\n itemIndex?: Maybe<Scalars['String']['output']>;\n /** MessageFields sku name. */\n skuName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type MessageInfo = {\n __typename?: 'MessageInfo';\n /** MessageInfo code. */\n code?: Maybe<Scalars['String']['output']>;\n /** MessageInfo fields. */\n fields?: Maybe<MessageFields>;\n /** MessageInfo status. */\n status?: Maybe<Scalars['String']['output']>;\n /** MessageInfo text. */\n text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n /** Cancels user order */\n cancelOrder?: Maybe<UserOrderCancel>;\n /** Process Order Authorization */\n processOrderAuthorization?: Maybe<ProcessOrderAuthorizationResponse>;\n /**\n * Submits an uploaded file for bulk import into a VTEX cart via the Order Entry Service.\n * Returns an operationId to poll for the operation status.\n */\n startOrderEntryOperation?: Maybe<StoreOrderEntryOperationResult>;\n /** Starts an anonymous personalization session for the current shopper. */\n startRecommendationSession: Scalars['Boolean']['output'];\n /** Subscribes a new person to the newsletter list. */\n subscribeToNewsletter?: Maybe<PersonNewsletter>;\n /**\n * Uploads a file to the Order Entry Service and returns the S3 object key.\n * The file must be Base64-encoded and passed via the `data` input.\n * The returned `objectKey` is required to start an order entry operation.\n */\n uploadFileToOrderEntry?: Maybe<StoreOrderEntryUploadResult>;\n /** Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns `null`. */\n validateCart?: Maybe<StoreCart>;\n /** Updates a web session with the specified values. */\n validateSession?: Maybe<StoreSession>;\n};\n\n\nexport type MutationCancelOrderArgs = {\n data: IUserOrderCancel;\n};\n\n\nexport type MutationProcessOrderAuthorizationArgs = {\n data: IProcessOrderAuthorization;\n};\n\n\nexport type MutationStartOrderEntryOperationArgs = {\n data: IOrderEntryOperation;\n};\n\n\nexport type MutationSubscribeToNewsletterArgs = {\n data: IPersonNewsletter;\n};\n\n\nexport type MutationUploadFileToOrderEntryArgs = {\n data: IOrderEntryUpload;\n};\n\n\nexport type MutationValidateCartArgs = {\n cart: IStoreCart;\n session?: InputMaybe<IStoreSession>;\n};\n\n\nexport type MutationValidateSessionArgs = {\n search: Scalars['String']['input'];\n session: IStoreSession;\n};\n\n/** Newsletter information. */\nexport type PersonNewsletter = {\n __typename?: 'PersonNewsletter';\n /** Person's ID in the newsletter list. */\n id: Scalars['String']['output'];\n};\n\nexport type PickupAddress = {\n __typename?: 'PickupAddress';\n /** PickupAddress address id. */\n addressId?: Maybe<Scalars['String']['output']>;\n /** PickupAddress address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** PickupAddress city. */\n city?: Maybe<Scalars['String']['output']>;\n /** PickupAddress complement. */\n complement?: Maybe<Scalars['String']['output']>;\n /** PickupAddress country. */\n country?: Maybe<Scalars['String']['output']>;\n /** PickupAddress geo coordinates. */\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** PickupAddress neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** PickupAddress number. */\n number?: Maybe<Scalars['String']['output']>;\n /** PickupAddress postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** PickupAddress receiver name. */\n receiverName?: Maybe<Scalars['String']['output']>;\n /** PickupAddress reference. */\n reference?: Maybe<Scalars['String']['output']>;\n /** PickupAddress state. */\n state?: Maybe<Scalars['String']['output']>;\n /** PickupAddress street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPointAddress = {\n __typename?: 'PickupPointAddress';\n /** Address city. */\n city?: Maybe<Scalars['String']['output']>;\n /** Address neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** Address number. */\n number?: Maybe<Scalars['String']['output']>;\n /** Address postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Address state. */\n state?: Maybe<Scalars['String']['output']>;\n /** Address street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPointDistance = {\n __typename?: 'PickupPointDistance';\n /** Pickup point address. */\n address?: Maybe<PickupPointAddress>;\n /** Pickup point business hours. */\n businessHours?: Maybe<Array<Maybe<BusinessHour>>>;\n /** Pickup point distance. */\n distance?: Maybe<Scalars['Float']['output']>;\n /** Whether the pickup point is active. */\n isActive?: Maybe<Scalars['Boolean']['output']>;\n /** Pickup point ID. */\n pickupId?: Maybe<Scalars['String']['output']>;\n /** Pickup point name. */\n pickupName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPoints = {\n __typename?: 'PickupPoints';\n /** List of pickup point distances for the given location. */\n pickupPointDistances?: Maybe<Array<Maybe<PickupPointDistance>>>;\n /** Hash of the pickup points data. */\n pickupPointsHash?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupStoreInfo = {\n __typename?: 'PickupStoreInfo';\n /** PickupStoreInfo additional information. */\n additionalInfo?: Maybe<Scalars['String']['output']>;\n /** PickupStoreInfo address. */\n address?: Maybe<PickupAddress>;\n /** PickupStoreInfo dock id. */\n dockId?: Maybe<Scalars['String']['output']>;\n /** PickupStoreInfo friendly name. */\n friendlyName?: Maybe<Scalars['String']['output']>;\n /** Information if the store has pickup enable. */\n isPickupStore?: Maybe<Scalars['Boolean']['output']>;\n};\n\n/** Process Order Authorization response. */\nexport type ProcessOrderAuthorizationResponse = {\n __typename?: 'ProcessOrderAuthorizationResponse';\n /** Indicates if authorization is pending for other authorizers. */\n isPendingForOtherAuthorizer: Scalars['Boolean']['output'];\n /** The updated rule for authorization, if any. */\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n};\n\n/** Extended Commercial Authorization rule with additional process context. */\nexport type ProcessOrderAuthorizationRule = {\n __typename?: 'ProcessOrderAuthorizationRule';\n /** Dimension ID. */\n dimensionId: Scalars['String']['output'];\n /** Order authorization ID. */\n orderAuthorizationId: Scalars['String']['output'];\n /** Base rule information. */\n rule: CommercialAuthorizationRule;\n};\n\nexport type ProductCountResult = {\n __typename?: 'ProductCountResult';\n /** Total product count. */\n total: Scalars['Int']['output'];\n};\n\nexport type Profile = {\n __typename?: 'Profile';\n /** Collection of user's address */\n addresses?: Maybe<Array<Maybe<ProfileAddress>>>;\n};\n\nexport type ProfileAddress = {\n __typename?: 'ProfileAddress';\n /** ProfileAddress address name/id. */\n addressName?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress city. */\n city?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress complement. */\n complement?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress country. */\n country?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress geo coordinate. */\n geoCoordinate?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** ProfileAddress neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress number. */\n number?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress receiver name. */\n receiverName?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress reference. */\n reference?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress state. */\n state?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Query = {\n __typename?: 'Query';\n /** Returns the account profile information for the current authenticated user (b2b or b2c user). */\n accountProfile: StoreAccountProfile;\n /** Returns information about all collections. */\n allCollections: StoreCollectionConnection;\n /** Returns information about all products. */\n allProducts: StoreProductConnection;\n /**\n * Lists the commercial contracts associated with the given Organization Unit,\n * resolved to human-readable corporate names. Governed: only contracts associated\n * with the authenticated buyer's Organization Unit are returned.\n */\n availableContracts: Array<StoreContract>;\n /** Returns the details of a collection based on the collection slug. */\n collection: StoreCollection;\n /**\n * Whether the current user holds the ad-hoc card platform permission, which\n * gates personal card management for Unit/Contract-affiliated buyers.\n *\n * Resolved from the user's roles by License Manager — it is not a session token\n * claim. Fails open (`true`) when the permission service is unreachable, so an\n * outage never locks buyers out of their own cards.\n */\n hasAdHocCardAccess: Scalars['Boolean']['output'];\n /** Returns whether the current authenticated user belongs to a B2B organization unit. */\n isOrganizationMember: Scalars['Boolean']['output'];\n /** Returns the list of saved credit cards for the current user. */\n listCreditCards?: Maybe<SavedCardListResult>;\n /** Returns the list of Orders that the User can view. */\n listUserOrders?: Maybe<UserOrderListMinimalResult>;\n /** Returns the list of Quotes that the authenticated Buyer can view. */\n listUserQuotes?: Maybe<UserQuoteListResult>;\n /** Returns the status of an Order Entry Service operation by its ID. */\n orderEntryOperation?: Maybe<StoreOrderEntryOperationStatus>;\n /** Returns the items in an orderForm by its ID. */\n orderFormItems: Array<StoreOrderFormCartItem>;\n /** Returns a list of pickup points near to the given geo coordinates. */\n pickupPoints?: Maybe<PickupPoints>;\n /** Returns the details of a product based on the specified locator. */\n product: StoreProduct;\n /** Returns the total product count information based on a specific location accessible through the VTEX segment cookie. */\n productCount?: Maybe<ProductCountResult>;\n /** Returns information about selected products. */\n products: Array<StoreProduct>;\n /** Returns information about the profile. */\n profile?: Maybe<Profile>;\n /** Returns personalized product recommendations for a given campaign. */\n recommendations: RecommendationResponse;\n /** Returns if there's a redirect for a search. */\n redirect?: Maybe<StoreRedirect>;\n /** Returns the result of a product, facet, or suggestion search. */\n search: StoreSearchResult;\n /** Returns a list of sellers available for a specific localization. */\n sellers?: Maybe<SellersData>;\n /** Returns information about shipping simulation. */\n shipping?: Maybe<ShippingData>;\n /** Returns information about the current user details. */\n userDetails: StoreUserDetails;\n /** Returns information about the Details of an User Order. */\n userOrder?: Maybe<UserOrderResult>;\n /** Returns information about the user validation. */\n validateUser?: Maybe<ValidateUserData>;\n};\n\n\nexport type QueryAllCollectionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n};\n\n\nexport type QueryAllProductsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n};\n\n\nexport type QueryAvailableContractsArgs = {\n orgUnitId: Scalars['String']['input'];\n};\n\n\nexport type QueryCollectionArgs = {\n slug: Scalars['String']['input'];\n};\n\n\nexport type QueryListUserOrdersArgs = {\n clientEmail?: InputMaybe<Scalars['String']['input']>;\n dateFinal?: InputMaybe<Scalars['String']['input']>;\n dateInitial?: InputMaybe<Scalars['String']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n pendingMyApproval?: InputMaybe<Scalars['Boolean']['input']>;\n perPage?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n text?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryListUserQuotesArgs = {\n createdAtFrom?: InputMaybe<Scalars['String']['input']>;\n createdAtTo?: InputMaybe<Scalars['String']['input']>;\n expiresAtFrom?: InputMaybe<Scalars['String']['input']>;\n expiresAtTo?: InputMaybe<Scalars['String']['input']>;\n label?: InputMaybe<Scalars['String']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n perPage?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryOrderEntryOperationArgs = {\n operationId: Scalars['String']['input'];\n};\n\n\nexport type QueryOrderFormItemsArgs = {\n orderFormId: Scalars['String']['input'];\n};\n\n\nexport type QueryPickupPointsArgs = {\n geoCoordinates?: InputMaybe<IStoreGeoCoordinates>;\n};\n\n\nexport type QueryProductArgs = {\n locator: Array<IStoreSelectedFacet>;\n};\n\n\nexport type QueryProductCountArgs = {\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryProductsArgs = {\n productIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryProfileArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryRecommendationsArgs = {\n campaignVrn: Scalars['String']['input'];\n products?: InputMaybe<Array<Scalars['String']['input']>>;\n userId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryRedirectArgs = {\n selectedFacets?: InputMaybe<Array<IStoreSelectedFacet>>;\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySearchArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n selectedFacets?: InputMaybe<Array<IStoreSelectedFacet>>;\n sort?: InputMaybe<StoreSort>;\n sponsoredCount?: InputMaybe<Scalars['Int']['input']>;\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySellersArgs = {\n country: Scalars['String']['input'];\n geoCoordinates?: InputMaybe<IGeoCoordinates>;\n postalCode?: InputMaybe<Scalars['String']['input']>;\n salesChannel?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryShippingArgs = {\n country: Scalars['String']['input'];\n items: Array<IShippingItem>;\n postalCode: Scalars['String']['input'];\n};\n\n\nexport type QueryUserOrderArgs = {\n orderId: Scalars['String']['input'];\n};\n\nexport type RecommendationCampaign = {\n __typename?: 'RecommendationCampaign';\n id: Scalars['String']['output'];\n title?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type RecommendationResponse = {\n __typename?: 'RecommendationResponse';\n campaign: RecommendationCampaign;\n correlationId: Scalars['String']['output'];\n products: Array<StoreProduct>;\n};\n\nexport type SkuSpecificationField = {\n __typename?: 'SKUSpecificationField';\n id?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n originalName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SkuSpecificationValue = {\n __typename?: 'SKUSpecificationValue';\n fieldId?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n originalName?: Maybe<Scalars['String']['output']>;\n};\n\n/** A saved payment card returned by the Saved-cards service. */\nexport type SavedCard = {\n __typename?: 'SavedCard';\n /** Account identifier that owns the card. */\n accountId?: Maybe<Scalars['String']['output']>;\n /** First digits of the card (BIN). */\n bin?: Maybe<Scalars['String']['output']>;\n /**\n * Buyer- or admin-assigned nickname for the card (e.g. \"Team lunch card\"), when\n * the Saved-cards service has one on file. Absent for most cards — callers\n * should fall back to `paymentSystemName` for display.\n */\n cardLabel?: Maybe<Scalars['String']['output']>;\n /** Masked card number, per PCI display rules. */\n cardNumber?: Maybe<Scalars['String']['output']>;\n /** Whether this card is active. */\n isActive?: Maybe<Scalars['Boolean']['output']>;\n /** Whether this card is the account default. */\n isDefault?: Maybe<Scalars['Boolean']['output']>;\n /**\n * Whether this card is personally owned by the buyer or shared by their\n * Organization/Contract.\n */\n origin: CardOrigin;\n /** Numeric payment system identifier. */\n paymentSystem?: Maybe<Scalars['String']['output']>;\n /** Human-readable payment system name (e.g. Visa, Mastercard). */\n paymentSystemName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Result of listing the current user's saved credit cards. */\nexport type SavedCardListResult = {\n __typename?: 'SavedCardListResult';\n /** The list of saved credit cards. */\n list?: Maybe<Array<SavedCard>>;\n};\n\n/** Search result. */\nexport type SearchMetadata = {\n __typename?: 'SearchMetadata';\n /** Indicates how the search engine corrected the misspelled word by using fuzzy logic. */\n fuzzy?: Maybe<Scalars['String']['output']>;\n /** Indicates if the search term was misspelled. */\n isTermMisspelled: Scalars['Boolean']['output'];\n /** Logical operator used to run the search. */\n logicalOperator: Scalars['String']['output'];\n};\n\n/** Information of sellers. */\nexport type SellerInfo = {\n __typename?: 'SellerInfo';\n /** Identification of the seller */\n id?: Maybe<Scalars['String']['output']>;\n /** Logo of the seller */\n logo?: Maybe<Scalars['String']['output']>;\n /** Name of the seller */\n name?: Maybe<Scalars['String']['output']>;\n};\n\n/** Regionalization with sellers information. */\nexport type SellersData = {\n __typename?: 'SellersData';\n /** Identification of region. */\n id?: Maybe<Scalars['String']['output']>;\n /** List of sellers. */\n sellers?: Maybe<Array<Maybe<SellerInfo>>>;\n};\n\n/** Response type for setting a new password. */\nexport type SetPasswordResponse = {\n __typename?: 'SetPasswordResponse';\n /** Message providing additional information about the operation. */\n message?: Maybe<Scalars['String']['output']>;\n /** Indicates whether the password was successfully set. */\n success: Scalars['Boolean']['output'];\n};\n\n/** Shipping Simulation information. */\nexport type ShippingData = {\n __typename?: 'ShippingData';\n /** Address information. */\n address?: Maybe<Address>;\n /** List of LogisticsItem. */\n items?: Maybe<Array<Maybe<LogisticsItem>>>;\n /** List of LogisticsInfo. */\n logisticsInfo?: Maybe<Array<Maybe<LogisticsInfo>>>;\n /** List of MessageInfo. */\n messages?: Maybe<Array<Maybe<MessageInfo>>>;\n};\n\nexport type ShippingSla = {\n __typename?: 'ShippingSLA';\n /** ShippingSLA available delivery windows. */\n availableDeliveryWindows?: Maybe<Array<Maybe<AvailableDeliveryWindows>>>;\n /** ShippingSLA carrier. */\n carrier?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA delivery channel. */\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n /** List of ShippingSLA delivery ids. */\n deliveryIds?: Maybe<Array<Maybe<DeliveryIds>>>;\n /** ShippingSLA friendly name. */\n friendlyName?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA id. */\n id?: Maybe<Scalars['String']['output']>;\n /**\n * ShippingSLA localized shipping estimate.\n * Note: this will always return a localized string for locale `en-US`.\n */\n localizedEstimates?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA name. */\n name?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA pickup distance. */\n pickupDistance?: Maybe<Scalars['Float']['output']>;\n /** ShippingSLA pickup point id. */\n pickupPointId?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA pickup store info. */\n pickupStoreInfo?: Maybe<PickupStoreInfo>;\n /** ShippingSLA price. */\n price?: Maybe<Scalars['Float']['output']>;\n /** ShippingSLA shipping estimate. */\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA shipping estimate date. */\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SkuSpecification = {\n __typename?: 'SkuSpecification';\n field: SkuSpecificationField;\n values: Array<SkuSpecificationValue>;\n};\n\nexport type SkuVariants = {\n __typename?: 'SkuVariants';\n /** SKU property values for the current SKU. */\n activeVariations?: Maybe<Scalars['ActiveVariations']['output']>;\n /** All available options for each SKU variant property, indexed by their name. */\n allVariantProducts?: Maybe<Array<StoreProduct>>;\n /** All available options for each SKU variant property, indexed by their name. */\n allVariantsByName?: Maybe<Scalars['VariantsByName']['output']>;\n /**\n * Available options for each varying SKU property, taking into account the\n * `dominantVariantName` property. Returns all available options for the\n * dominant property, and only options that can be combined with its current\n * value for other properties.\n * If `dominantVariantName` is not present, the first variant will be\n * considered the dominant one.\n */\n availableVariations?: Maybe<Scalars['FormattedVariants']['output']>;\n /**\n * Maps property value combinations to their respective SKU's slug. Enables\n * us to retrieve the slug for the SKU that matches the currently selected\n * variations in O(1) time.\n * If `dominantVariantName` is not present, the first variant will be\n * considered the dominant one.\n */\n slugsMap?: Maybe<Scalars['SlugsMap']['output']>;\n};\n\n\nexport type SkuVariantsAvailableVariationsArgs = {\n dominantVariantName?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SkuVariantsSlugsMapArgs = {\n dominantVariantName?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Specification = {\n __typename?: 'Specification';\n name: Scalars['String']['output'];\n originalName: Scalars['String']['output'];\n values: Array<Scalars['String']['output']>;\n};\n\nexport type SpecificationGroup = {\n __typename?: 'SpecificationGroup';\n name: Scalars['String']['output'];\n originalName: Scalars['String']['output'];\n specifications: Array<Specification>;\n};\n\n/** Account profile information. */\nexport type StoreAccountProfile = {\n __typename?: 'StoreAccountProfile';\n email?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\n/** Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers. */\nexport type StoreAggregateOffer = {\n __typename?: 'StoreAggregateOffer';\n /** Highest price among all sellers. */\n highPrice: Scalars['Float']['output'];\n /** Lowest price among all sellers. */\n lowPrice: Scalars['Float']['output'];\n /** Lowest price among all sellers with current taxes. */\n lowPriceWithTaxes: Scalars['Float']['output'];\n /** Number of sellers selling this SKU. */\n offerCount: Scalars['Int']['output'];\n /** Array with information on each available offer. */\n offers: Array<StoreOffer>;\n /** ISO code of the currency used for the offer prices. */\n priceCurrency: Scalars['String']['output'];\n};\n\n/** Average rating, based on multiple ratings or reviews. */\nexport type StoreAggregateRating = {\n __typename?: 'StoreAggregateRating';\n /** Value of the aggregate rating. */\n ratingValue: Scalars['Float']['output'];\n /** Total number of ratings. */\n reviewCount: Scalars['Int']['output'];\n};\n\n/** information about the author of a product review or rating. */\nexport type StoreAuthor = {\n __typename?: 'StoreAuthor';\n /** Author name. */\n name: Scalars['String']['output'];\n};\n\nexport type StoreB2B = {\n __typename?: 'StoreB2B';\n contractName?: Maybe<Scalars['String']['output']>;\n customerId: Scalars['String']['output'];\n firstName?: Maybe<Scalars['String']['output']>;\n isRepresentative?: Maybe<Scalars['Boolean']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n organizationManager?: Maybe<Scalars['Boolean']['output']>;\n savedPostalCode?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n unitName?: Maybe<Scalars['String']['output']>;\n userEmail?: Maybe<Scalars['String']['output']>;\n userName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Brand of a given product. */\nexport type StoreBrand = {\n __typename?: 'StoreBrand';\n /** Brand name. */\n name: Scalars['String']['output'];\n};\n\n/** List of items consisting of chain linked web pages, ending with the current page. */\nexport type StoreBreadcrumbList = {\n __typename?: 'StoreBreadcrumbList';\n /** Array with breadcrumb elements. */\n itemListElement: Array<StoreListItem>;\n /** Number of breadcrumbs in the list. */\n numberOfItems: Scalars['Int']['output'];\n};\n\n/** Shopping cart information. */\nexport type StoreCart = {\n __typename?: 'StoreCart';\n /** List of shopping cart messages. */\n messages: Array<StoreCartMessage>;\n /** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */\n order: StoreOrder;\n};\n\n/** Shopping cart message. */\nexport type StoreCartMessage = {\n __typename?: 'StoreCartMessage';\n /** Shopping cart message status, which can be `INFO`, `WARNING` or `ERROR`. */\n status: StoreStatus;\n /** Shopping cart message text. */\n text: Scalars['String']['output'];\n};\n\n/** Product collection information. */\nexport type StoreCollection = {\n __typename?: 'StoreCollection';\n /** List of items consisting of chain linked web pages, ending with the current page. */\n breadcrumbList: StoreBreadcrumbList;\n /**\n * Slug the catalog resolves for the requested locale, lowercased.\n * Meant for the page's canonical URL: `slug` echoes the path the shopper\n * visited, and by-linkid matches case-insensitively, so without this every\n * casing variant would claim to be canonical. Unlike `otherLocales`, it may fall\n * back to a slug registered for another locale, so it must never be used to\n * build hreflang annotations.\n */\n canonicalSlug?: Maybe<Scalars['String']['output']>;\n /** Collection ID. */\n id: Scalars['ID']['output'];\n /** Collection meta information. Used for search. */\n meta: StoreCollectionMeta;\n /**\n * Localized versions of this collection for all available locales.\n * Only announces slugs the catalog has registered for each locale, so it is safe\n * to build hreflang annotations from. Only populated when localization is\n * enabled.\n */\n otherLocales?: Maybe<Array<StoreCollectionLocale>>;\n /** Meta tag data. */\n seo: StoreSeo;\n /** Corresponding collection URL slug, with which to retrieve this entity. */\n slug: Scalars['String']['output'];\n /** Collection type. */\n type: StoreCollectionType;\n};\n\n/** Collection connections, including pagination information and collections returned by the query. */\nexport type StoreCollectionConnection = {\n __typename?: 'StoreCollectionConnection';\n /** Array with collection connection page edges, each containing a collection and a corresponding cursor.. */\n edges: Array<StoreCollectionEdge>;\n /** Collection pagination information. */\n pageInfo: StorePageInfo;\n};\n\n/** Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination. */\nexport type StoreCollectionEdge = {\n __typename?: 'StoreCollectionEdge';\n /** Collection cursor. Used as pagination reference. */\n cursor: Scalars['String']['output'];\n /** Each collection node contains the information of a product collection returned by the query. */\n node: StoreCollection;\n};\n\n/** Product collection facet, used for search. */\nexport type StoreCollectionFacet = {\n __typename?: 'StoreCollectionFacet';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet value. */\n value: Scalars['String']['output'];\n};\n\n/** Localized collection data for a specific locale. */\nexport type StoreCollectionLocale = {\n __typename?: 'StoreCollectionLocale';\n /** Locale code (e.g. \"pt-BR\", \"it-IT\"). */\n locale: Scalars['String']['output'];\n /** Localized collection slug (e.g. \"vestuario/camisetas\"). */\n slug: Scalars['String']['output'];\n};\n\n/** Collection meta information. Used for search. */\nexport type StoreCollectionMeta = {\n __typename?: 'StoreCollectionMeta';\n /** List of selected collection facets. */\n selectedFacets: Array<StoreCollectionFacet>;\n};\n\n/**\n * Product collection type. Possible values are `Department`, `Category`, `Brand` or `Collection`.\n *\n * `SubCategory` and `Cluster` are still declared for backward compatibility but are\n * deprecated and never returned.\n */\nexport const enum StoreCollectionType {\n /** Product brand. */\n Brand = 'Brand',\n /** Second level of product categorization. */\n Category = 'Category',\n /**\n * Product cluster.\n *\n * Deprecated: never returned — clusters resolve as `Collection`.\n * @deprecated Never returned since the by-linkid migration: clusters and curated collections are both served by `collection/by-linkid`, whose response carries no discriminator between them, so both resolve as `Collection`. Scheduled for removal in the next major.\n */\n Cluster = 'Cluster',\n /** Product collection. */\n Collection = 'Collection',\n /** First level of product categorization. */\n Department = 'Department',\n /**\n * Third level of product categorization.\n *\n * Deprecated: never returned — third-level categories resolve as `Category`.\n * @deprecated Never returned since the by-linkid migration: the category response only exposes `fatherCategoryId`, which distinguishes root from non-root but not tree depth, so third-level categories resolve as `Category`. Scheduled for removal in the next major.\n */\n SubCategory = 'SubCategory'\n};\n\n/** A commercial contract available to a buyer's Organization Unit. */\nexport type StoreContract = {\n __typename?: 'StoreContract';\n /** Human-readable corporate name of the contract (resolved from MasterData). */\n corporateName: Scalars['String']['output'];\n /** Contract identifier (the contract/scope ID associated with the Organization Unit). */\n id: Scalars['ID']['output'];\n /** Indicates whether this contract is the one currently active in the session. */\n isActive: Scalars['Boolean']['output'];\n};\n\n/** Currency information. */\nexport type StoreCurrency = {\n __typename?: 'StoreCurrency';\n /** Currency code (e.g: USD). */\n code: Scalars['String']['output'];\n /** Currency symbol (e.g: $). */\n symbol: Scalars['String']['output'];\n};\n\n/** Delivery mode information. */\nexport type StoreDeliveryMode = {\n __typename?: 'StoreDeliveryMode';\n /** The delivery channel information of the session. */\n deliveryChannel: Scalars['String']['output'];\n /** The delivery method information of the session. */\n deliveryMethod: Scalars['String']['output'];\n /** The delivery window information of the session. */\n deliveryWindow?: Maybe<StoreDeliveryWindow>;\n};\n\n/** Delivery window information. */\nexport type StoreDeliveryWindow = {\n __typename?: 'StoreDeliveryWindow';\n /** The delivery window end date information. */\n endDate: Scalars['String']['output'];\n /** The delivery window start date information. */\n startDate: Scalars['String']['output'];\n};\n\nexport type StoreFacet = StoreFacetBoolean | StoreFacetRange;\n\n/** Search facet boolean information. */\nexport type StoreFacetBoolean = {\n __typename?: 'StoreFacetBoolean';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet label. */\n label: Scalars['String']['output'];\n /** Array with information on each facet value. */\n values: Array<StoreFacetValueBoolean>;\n};\n\n/** Search facet range information. */\nexport type StoreFacetRange = {\n __typename?: 'StoreFacetRange';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet label. */\n label: Scalars['String']['output'];\n /** Maximum facet range value. */\n max: StoreFacetValueRange;\n /** Minimum facet range value. */\n min: StoreFacetValueRange;\n};\n\n/** Search facet type. */\nexport const enum StoreFacetType {\n /** Indicates boolean search facet. */\n Boolean = 'BOOLEAN',\n /** Indicates range type search facet. */\n Range = 'RANGE'\n};\n\n/** Information of a specific facet value. */\nexport type StoreFacetValueBoolean = {\n __typename?: 'StoreFacetValueBoolean';\n /** Facet value label. */\n label: Scalars['String']['output'];\n /** Number of items with this facet. */\n quantity?: Maybe<Scalars['Int']['output']>;\n /** Indicates whether facet is selected. */\n selected: Scalars['Boolean']['output'];\n /** Facet value. */\n value: Scalars['String']['output'];\n};\n\n/** Search facet range value information. Used for minimum and maximum range values. */\nexport type StoreFacetValueRange = {\n __typename?: 'StoreFacetValueRange';\n /** Search facet range absolute value. */\n absolute: Scalars['Float']['output'];\n /** Search facet range selected value. */\n selected: Scalars['Float']['output'];\n};\n\n/** Geographic coordinates information. */\nexport type StoreGeoCoordinates = {\n __typename?: 'StoreGeoCoordinates';\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['output'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['output'];\n};\n\n/** Image. */\nexport type StoreImage = {\n __typename?: 'StoreImage';\n /** Alias for the image. */\n alternateName: Scalars['String']['output'];\n /** Image URL. */\n url: Scalars['String']['output'];\n};\n\n/** Item of a list. */\nexport type StoreListItem = {\n __typename?: 'StoreListItem';\n /** List item value. */\n item: Scalars['String']['output'];\n /** Name of the list item. */\n name: Scalars['String']['output'];\n /** Position of the item in the list. */\n position: Scalars['Int']['output'];\n};\n\n/** Marketing information. */\nexport type StoreMarketingData = {\n __typename?: 'StoreMarketingData';\n utmCampaign?: Maybe<Scalars['String']['output']>;\n utmMedium?: Maybe<Scalars['String']['output']>;\n utmSource?: Maybe<Scalars['String']['output']>;\n utmiCampaign?: Maybe<Scalars['String']['output']>;\n utmiPage?: Maybe<Scalars['String']['output']>;\n utmiPart?: Maybe<Scalars['String']['output']>;\n};\n\n/** Offer information. */\nexport type StoreOffer = {\n __typename?: 'StoreOffer';\n /** Offer item availability. */\n availability: Scalars['String']['output'];\n /** Whether this offer is a gift (e.g. free promotional item). */\n isGift?: Maybe<Scalars['Boolean']['output']>;\n /** Offer item condition. */\n itemCondition: Scalars['String']['output'];\n /** Information on the item being offered. */\n itemOffered: StoreProduct;\n /** This is displayed as the \"from\" price in the context of promotions' price comparison. This may change before it reaches the shelf. */\n listPrice: Scalars['Float']['output'];\n /** List price among with current taxes. */\n listPriceWithTaxes: Scalars['Float']['output'];\n /** Also known as spot price. */\n price: Scalars['Float']['output'];\n /** ISO code of the currency used for the offer prices. */\n priceCurrency: Scalars['String']['output'];\n /**\n * Signed price token (JWT) used by the Pricing Fallback feature. When present, it should be\n * forwarded to Checkout on add-to-cart so the platform can trust the offer's price even if\n * the Pricing System is unavailable. May be null when the signing step fails or the feature is disabled.\n */\n priceToken?: Maybe<Scalars['String']['output']>;\n /** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */\n priceValidUntil: Scalars['String']['output'];\n /** Also known as spot price with taxes. */\n priceWithTaxes: Scalars['Float']['output'];\n /** Number of items offered. */\n quantity: Scalars['Int']['output'];\n /** Seller responsible for the offer. */\n seller: StoreOrganization;\n /** Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf. */\n sellingPrice: Scalars['Float']['output'];\n};\n\n/** Information of a specific order. */\nexport type StoreOrder = {\n __typename?: 'StoreOrder';\n /** Array with information on each accepted offer. */\n acceptedOffer: Array<StoreOffer>;\n /** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */\n orderNumber: Scalars['String']['output'];\n /**\n * Sales channel of the underlying orderForm when FastStore adopted it because\n * the browser session was stale (e.g. after Quick Order). Clients should align\n * `session.channel` to this value. Null when no SC adoption happened.\n */\n salesChannel?: Maybe<Scalars['String']['output']>;\n /** Indicates whether or not items with attachments should be split. */\n shouldSplitItem?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type StoreOrderEntryMissingItem = {\n __typename?: 'StoreOrderEntryMissingItem';\n itemId: Scalars['String']['output'];\n itemName?: Maybe<Scalars['String']['output']>;\n reason: Scalars['String']['output'];\n};\n\nexport type StoreOrderEntryOperationResult = {\n __typename?: 'StoreOrderEntryOperationResult';\n operationId: Scalars['String']['output'];\n};\n\nexport type StoreOrderEntryOperationStatus = {\n __typename?: 'StoreOrderEntryOperationStatus';\n entityId?: Maybe<Scalars['String']['output']>;\n message?: Maybe<Scalars['String']['output']>;\n missingItems?: Maybe<Array<StoreOrderEntryMissingItem>>;\n status: Scalars['String']['output'];\n};\n\n/** Result returned after uploading a file to the Order Entry Service. */\nexport type StoreOrderEntryUploadResult = {\n __typename?: 'StoreOrderEntryUploadResult';\n objectKey: Scalars['String']['output'];\n};\n\nexport type StoreOrderFormCartItem = {\n __typename?: 'StoreOrderFormCartItem';\n availability: Scalars['String']['output'];\n id: Scalars['String']['output'];\n imageUrl?: Maybe<Scalars['String']['output']>;\n listPrice: Scalars['Int']['output'];\n name: Scalars['String']['output'];\n price: Scalars['Int']['output'];\n quantity: Scalars['Int']['output'];\n seller: Scalars['String']['output'];\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Organization. */\nexport type StoreOrganization = {\n __typename?: 'StoreOrganization';\n /** Organization ID. */\n identifier: Scalars['String']['output'];\n};\n\n/** Whenever you make a query that allows for pagination, such as `allProducts` or `allCollections`, you can check `StorePageInfo` to learn more about the complete set of items and use it to paginate your queries. */\nexport type StorePageInfo = {\n __typename?: 'StorePageInfo';\n /** Cursor corresponding to the last possible item. */\n endCursor: Scalars['String']['output'];\n /** Indicates whether there is at least one more page with items after the ones returned in the current query. */\n hasNextPage: Scalars['Boolean']['output'];\n /** Indicates whether there is at least one more page with items before the ones returned in the current query. */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** Cursor corresponding to the first possible item. */\n startCursor: Scalars['String']['output'];\n /** Total number of items (products or collections), not pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Client profile data. */\nexport type StorePerson = {\n __typename?: 'StorePerson';\n /** Client email. */\n email: Scalars['String']['output'];\n /** Client last name. */\n familyName: Scalars['String']['output'];\n /** Client first name. */\n givenName: Scalars['String']['output'];\n /** Client ID. */\n id: Scalars['String']['output'];\n};\n\n/** Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProduct = {\n __typename?: 'StoreProduct';\n /** Array of additional properties. */\n additionalProperty: Array<StorePropertyValue>;\n /** Advertisement information about the product. */\n advertisement?: Maybe<Advertisement>;\n /** Aggregate ratings data. */\n aggregateRating: StoreAggregateRating;\n /** Product brand. */\n brand: StoreBrand;\n /** List of items consisting of chain linked web pages, ending with the current page. */\n breadcrumbList: StoreBreadcrumbList;\n /**\n * Slug for the store's default locale, including the SKU ID suffix.\n * Navigation fallback for the locale selector when the target locale is absent\n * from `otherLocales`. Best-effort: it may point at a slug the catalog has not\n * registered for the default locale, so it must never be used to build hreflang\n * annotations. Only populated when localization is enabled.\n */\n defaultLocaleSlug?: Maybe<Scalars['String']['output']>;\n /** Delivery Promise product's badge. */\n deliveryPromiseBadges?: Maybe<Array<Maybe<DeliveryPromiseBadge>>>;\n /** Product description. */\n description: Scalars['String']['output'];\n /** Global Trade Item Number. */\n gtin: Scalars['String']['output'];\n /** Indicates whether the product has specifications. */\n hasSpecifications?: Maybe<Scalars['Boolean']['output']>;\n /** Array of images. */\n image: Array<StoreImage>;\n /** Indicates product group related to this product. */\n isVariantOf: StoreProductGroup;\n /** Manufacturer Part Number. Identifies the product to its manufacturer. */\n mpn: Scalars['String']['output'];\n /** Product name. */\n name: Scalars['String']['output'];\n /** Aggregate offer information. */\n offers: StoreAggregateOffer;\n /**\n * Localized versions of this product for all available locales.\n * Only populated when localization is enabled.\n */\n otherLocales?: Maybe<Array<StoreProductLocale>>;\n /** Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs. */\n productID: Scalars['String']['output'];\n /** The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601 */\n releaseDate: Scalars['String']['output'];\n /** Array with review information. */\n review: Array<StoreReview>;\n /** Meta tag data. */\n seo: StoreSeo;\n /** Stock Keeping Unit. Merchant-specific ID for the product. */\n sku: Scalars['String']['output'];\n /** Indicate the specifications of a product. */\n skuSpecifications: Array<SkuSpecification>;\n /** Corresponding collection URL slug, with which to retrieve this entity. */\n slug: Scalars['String']['output'];\n /** Indicate the specifications of a group of SKUs. */\n specificationGroups: Array<SpecificationGroup>;\n /** Sku Unit Multiplier */\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\n\n/** Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProductImageArgs = {\n context?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Product connections, including pagination information and products returned by the query. */\nexport type StoreProductConnection = {\n __typename?: 'StoreProductConnection';\n /** Array with product connection edges, each containing a product and a corresponding cursor. */\n edges: Array<StoreProductEdge>;\n /** Product pagination information. */\n pageInfo: StorePageInfo;\n};\n\n/** Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination. */\nexport type StoreProductEdge = {\n __typename?: 'StoreProductEdge';\n /** Product cursor. Used as pagination reference. */\n cursor: Scalars['String']['output'];\n /** Each product node contains the information of a product returned by the query. */\n node: StoreProduct;\n};\n\n/** Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProductGroup = {\n __typename?: 'StoreProductGroup';\n /** Array of additional properties. */\n additionalProperty: Array<StorePropertyValue>;\n /** Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). */\n hasVariant: Array<StoreProduct>;\n /** Product group name. */\n name: Scalars['String']['output'];\n /** Product group ID. */\n productGroupID: Scalars['String']['output'];\n /**\n * Object containing data structures to facilitate handling different SKU\n * variant properties. Specially useful for implementing SKU selection\n * components.\n */\n skuVariants?: Maybe<SkuVariants>;\n};\n\n/** Localized product data for a specific locale. */\nexport type StoreProductLocale = {\n __typename?: 'StoreProductLocale';\n /** Locale code (e.g. \"pt-BR\", \"it-IT\"). */\n locale: Scalars['String']['output'];\n /** Localized product slug including the SKU ID suffix (e.g. \"adidas-polo-uomo-65\"). */\n slug: Scalars['String']['output'];\n};\n\n/** Properties that can be associated with products and products groups. */\nexport type StorePropertyValue = {\n __typename?: 'StorePropertyValue';\n /** Property name. */\n name: Scalars['String']['output'];\n /** Property id. This propert changes according to the content of the object. */\n propertyID: Scalars['String']['output'];\n /** Property value. May hold a string or the string representation of an object. */\n value: Scalars['ObjectOrString']['output'];\n /** Specifies the nature of the value */\n valueReference: Scalars['ObjectOrString']['output'];\n};\n\n/**\n * Redirect informations, including url returned by the query.\n * https://schema.org/Thing\n */\nexport type StoreRedirect = {\n __typename?: 'StoreRedirect';\n /** URL to redirect */\n url?: Maybe<Scalars['String']['output']>;\n};\n\n/** Information of a given review. */\nexport type StoreReview = {\n __typename?: 'StoreReview';\n /** Review author. */\n author: StoreAuthor;\n /** Review rating information. */\n reviewRating: StoreReviewRating;\n};\n\n/** Information of a given review rating. */\nexport type StoreReviewRating = {\n __typename?: 'StoreReviewRating';\n /** Best rating value. */\n bestRating: Scalars['Float']['output'];\n /** Rating value. */\n ratingValue: Scalars['Float']['output'];\n};\n\n/** Search result. */\nexport type StoreSearchResult = {\n __typename?: 'StoreSearchResult';\n /** Array of search result facets. */\n facets: Array<StoreFacet>;\n /** Search result metadata. Additional data can be used to send analytics events. */\n metadata?: Maybe<SearchMetadata>;\n /** Search result products. */\n products: StoreProductConnection;\n /** Search result searchId. Unique identifier for the search query can be used to correlate search analytics events. */\n searchId: Scalars['String']['output'];\n /** Search result suggestions. */\n suggestions: StoreSuggestions;\n};\n\n/** Search Engine Optimization (SEO) tags data. */\nexport type StoreSeo = {\n __typename?: 'StoreSeo';\n /** Canonical tag. */\n canonical: Scalars['String']['output'];\n /** Description tag. */\n description: Scalars['String']['output'];\n /** Title tag. */\n title: Scalars['String']['output'];\n /** Title template tag. */\n titleTemplate: Scalars['String']['output'];\n};\n\n/** Session information. */\nexport type StoreSession = {\n __typename?: 'StoreSession';\n /** Session address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** B2B Information. */\n b2b?: Maybe<StoreB2B>;\n /** Session channel. */\n channel?: Maybe<Scalars['String']['output']>;\n /** Session city. */\n city?: Maybe<Scalars['String']['output']>;\n /** Session country. */\n country: Scalars['String']['output'];\n /** Session currency. */\n currency: StoreCurrency;\n /** Session delivery mode. */\n deliveryMode?: Maybe<StoreDeliveryMode>;\n /** Session input geoCoordinates. */\n geoCoordinates?: Maybe<StoreGeoCoordinates>;\n /** Session locale. */\n locale: Scalars['String']['output'];\n /** Marketing information. */\n marketingData?: Maybe<StoreMarketingData>;\n /** Session input person. */\n person?: Maybe<StorePerson>;\n /** Session postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Refresh token after Information. */\n refreshAfter?: Maybe<Scalars['String']['output']>;\n};\n\n/** Product search results sorting options. */\nexport const enum StoreSort {\n /** Sort by discount value, from highest to lowest. */\n DiscountDesc = 'discount_desc',\n /** Sort by name, in alphabetical order. */\n NameAsc = 'name_asc',\n /** Sort by name, in reverse alphabetical order. */\n NameDesc = 'name_desc',\n /** Sort by orders, from highest to lowest. */\n OrdersDesc = 'orders_desc',\n /** Sort by price, from lowest to highest. */\n PriceAsc = 'price_asc',\n /** Sort by price, from highest to lowest. */\n PriceDesc = 'price_desc',\n /** Sort by release date, from highest to lowest. */\n ReleaseDesc = 'release_desc',\n /** Sort by product score, from highest to lowest. */\n ScoreDesc = 'score_desc'\n};\n\n/** Status used to indicate a message type. For instance, a shopping cart informative or error message. */\nexport const enum StoreStatus {\n Error = 'ERROR',\n Info = 'INFO',\n Warning = 'WARNING'\n};\n\n/** Suggestion term. */\nexport type StoreSuggestionTerm = {\n __typename?: 'StoreSuggestionTerm';\n /** Its occurrences count. */\n count: Scalars['Int']['output'];\n /** The term. */\n value: Scalars['String']['output'];\n};\n\n/** Suggestions information. */\nexport type StoreSuggestions = {\n __typename?: 'StoreSuggestions';\n /** Array with suggestion products' information. */\n products: Array<StoreProduct>;\n /** Array with suggestion terms. */\n terms: Array<StoreSuggestionTerm>;\n};\n\n/** User details information. */\nexport type StoreUserDetails = {\n __typename?: 'StoreUserDetails';\n /** User's email. */\n email?: Maybe<Scalars['String']['output']>;\n /** User's name. */\n name?: Maybe<Scalars['String']['output']>;\n /** User's organizational unit. */\n orgUnit?: Maybe<Scalars['String']['output']>;\n /** User's phone number. */\n phone?: Maybe<Scalars['String']['output']>;\n /** User's role. */\n role?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n /** User's username (login). May differ from email when Alternative Login is enabled. */\n username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrder = {\n __typename?: 'UserOrder';\n affiliateId?: Maybe<Scalars['String']['output']>;\n allowCancellation?: Maybe<Scalars['Boolean']['output']>;\n allowEdition?: Maybe<Scalars['Boolean']['output']>;\n authorizedDate?: Maybe<Scalars['String']['output']>;\n budgetData?: Maybe<UserOrderBudgetData>;\n callCenterOperatorData?: Maybe<Scalars['String']['output']>;\n canProcessOrderAuthorization?: Maybe<Scalars['Boolean']['output']>;\n cancelReason?: Maybe<Scalars['String']['output']>;\n cancellationData?: Maybe<UserOrderCancellationData>;\n cancellationRequests?: Maybe<Array<Maybe<UserOrderCancellationRequest>>>;\n changesAttachment?: Maybe<Scalars['String']['output']>;\n checkedInPickupPointId?: Maybe<Scalars['String']['output']>;\n clientPreferencesData?: Maybe<UserOrderClientPreferencesData>;\n clientProfileData?: Maybe<UserOrderClientProfileData>;\n commercialConditionData?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n customData?: Maybe<UserOrderCustomData>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>;\n deliveryOptionsData?: Maybe<UserOrderDeliveryOptionsData>;\n followUpEmail?: Maybe<Scalars['String']['output']>;\n giftRegistryData?: Maybe<Scalars['String']['output']>;\n hostname?: Maybe<Scalars['String']['output']>;\n invoiceData?: Maybe<Scalars['String']['output']>;\n invoicedDate?: Maybe<Scalars['String']['output']>;\n isCheckedIn?: Maybe<Scalars['Boolean']['output']>;\n isCompleted?: Maybe<Scalars['Boolean']['output']>;\n itemMetadata?: Maybe<UserOrderItemMetadata>;\n items?: Maybe<Array<Maybe<UserOrderItems>>>;\n lastChange?: Maybe<Scalars['String']['output']>;\n lastMessage?: Maybe<Scalars['String']['output']>;\n marketingData?: Maybe<Scalars['String']['output']>;\n marketplace?: Maybe<UserOrderMarketplace>;\n marketplaceItems?: Maybe<Array<Maybe<UserOrderItems>>>;\n marketplaceOrderId?: Maybe<Scalars['String']['output']>;\n marketplaceServicesEndpoint?: Maybe<Scalars['String']['output']>;\n merchantName?: Maybe<Scalars['String']['output']>;\n openTextField?: Maybe<Scalars['String']['output']>;\n orderFormId?: Maybe<Scalars['String']['output']>;\n orderGroup?: Maybe<Scalars['String']['output']>;\n orderId?: Maybe<Scalars['String']['output']>;\n origin?: Maybe<Scalars['String']['output']>;\n packageAttachment?: Maybe<UserOrderPackageAttachment>;\n paymentData?: Maybe<UserOrderPaymentData>;\n purchaseAgentData?: Maybe<UserOrderPurchaseAgentData>;\n ratesAndBenefitsData?: Maybe<UserOrderRatesAndBenefitsData>;\n roundingError?: Maybe<Scalars['Int']['output']>;\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n salesChannel?: Maybe<Scalars['String']['output']>;\n sellerOrderId?: Maybe<Scalars['String']['output']>;\n sellers?: Maybe<Array<Maybe<UserOrderStoreSellers>>>;\n sequence?: Maybe<Scalars['String']['output']>;\n shippingData?: Maybe<UserOrderShippingData>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n storePreferencesData?: Maybe<UserOrderStorePreferencesData>;\n subscriptionData?: Maybe<Scalars['String']['output']>;\n taxData?: Maybe<Scalars['String']['output']>;\n totals?: Maybe<Array<Maybe<UserOrderTotals>>>;\n value?: Maybe<Scalars['Float']['output']>;\n workflowIsInError?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAdditionalInfo = {\n __typename?: 'UserOrderAdditionalInfo';\n brandId?: Maybe<Scalars['String']['output']>;\n brandName?: Maybe<Scalars['String']['output']>;\n categories?: Maybe<Array<Maybe<UserOrderCategories>>>;\n categoriesIds?: Maybe<Scalars['String']['output']>;\n commercialConditionId?: Maybe<Scalars['String']['output']>;\n dimension?: Maybe<UserOrderDimension>;\n offeringInfo?: Maybe<Scalars['String']['output']>;\n offeringType?: Maybe<Scalars['String']['output']>;\n offeringTypeId?: Maybe<Scalars['String']['output']>;\n productClusterId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderAddress = {\n __typename?: 'UserOrderAddress';\n addressId?: Maybe<Scalars['String']['output']>;\n addressType?: Maybe<Scalars['String']['output']>;\n city?: Maybe<Scalars['String']['output']>;\n complement?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n entityId?: Maybe<Scalars['String']['output']>;\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n neighborhood?: Maybe<Scalars['String']['output']>;\n number?: Maybe<Scalars['String']['output']>;\n postalCode?: Maybe<Scalars['String']['output']>;\n receiverName?: Maybe<Scalars['String']['output']>;\n reference?: Maybe<Scalars['String']['output']>;\n state?: Maybe<Scalars['String']['output']>;\n street?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderAssemblyOptions = {\n __typename?: 'UserOrderAssemblyOptions';\n Id?: Maybe<Scalars['String']['output']>;\n Name?: Maybe<Scalars['String']['output']>;\n Required?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAttachmentOfferings = {\n __typename?: 'UserOrderAttachmentOfferings';\n name?: Maybe<Scalars['String']['output']>;\n required?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAttachments = {\n __typename?: 'UserOrderAttachments';\n content?: Maybe<Scalars['JSONObject']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudget = {\n __typename?: 'UserOrderBudget';\n allocations?: Maybe<Array<Maybe<UserOrderBudgetAllocation>>>;\n balance?: Maybe<UserOrderBudgetBalance>;\n cycleConfiguration?: Maybe<UserOrderBudgetCycleConfiguration>;\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetAllocation = {\n __typename?: 'UserOrderBudgetAllocation';\n ToBeSpent?: Maybe<Scalars['Float']['output']>;\n balance?: Maybe<UserOrderBudgetBalance>;\n id?: Maybe<Scalars['String']['output']>;\n linkedEntity?: Maybe<UserOrderBudgetAllocationLinkedEntity>;\n reservations?: Maybe<Scalars['JSONObject']['output']>;\n};\n\nexport type UserOrderBudgetAllocationLinkedEntity = {\n __typename?: 'UserOrderBudgetAllocationLinkedEntity';\n id?: Maybe<Scalars['String']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetBalance = {\n __typename?: 'UserOrderBudgetBalance';\n amount?: Maybe<Scalars['Float']['output']>;\n balanceAdjustment?: Maybe<Scalars['Float']['output']>;\n remaining?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderBudgetCycleConfiguration = {\n __typename?: 'UserOrderBudgetCycleConfiguration';\n autoResetOnPeriodEnd?: Maybe<Scalars['Boolean']['output']>;\n carryOverBalance?: Maybe<Scalars['Boolean']['output']>;\n endDate?: Maybe<Scalars['String']['output']>;\n startDate?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetData = {\n __typename?: 'UserOrderBudgetData';\n budgets?: Maybe<Array<Maybe<UserOrderBudget>>>;\n};\n\nexport type UserOrderCancel = {\n __typename?: 'UserOrderCancel';\n data?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCancellationData = {\n __typename?: 'UserOrderCancellationData';\n CancellationDate?: Maybe<Scalars['String']['output']>;\n Reason?: Maybe<Scalars['String']['output']>;\n RequestedByPaymentNotification?: Maybe<Scalars['Boolean']['output']>;\n RequestedBySellerNotification?: Maybe<Scalars['Boolean']['output']>;\n RequestedBySystem?: Maybe<Scalars['Boolean']['output']>;\n RequestedByUser?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCancellationRequest = {\n __typename?: 'UserOrderCancellationRequest';\n cancellationRequestDate?: Maybe<Scalars['String']['output']>;\n cancellationRequestDenyDate?: Maybe<Scalars['String']['output']>;\n deniedBySeller?: Maybe<Scalars['Boolean']['output']>;\n deniedBySellerReason?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n requestedByUser?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCategories = {\n __typename?: 'UserOrderCategories';\n id?: Maybe<Scalars['Int']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderClientPreferencesData = {\n __typename?: 'UserOrderClientPreferencesData';\n locale?: Maybe<Scalars['String']['output']>;\n optinNewsLetter?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderClientProfileData = {\n __typename?: 'UserOrderClientProfileData';\n corporateDocument?: Maybe<Scalars['String']['output']>;\n corporateName?: Maybe<Scalars['String']['output']>;\n corporatePhone?: Maybe<Scalars['String']['output']>;\n customerClass?: Maybe<Scalars['String']['output']>;\n customerCode?: Maybe<Scalars['String']['output']>;\n document?: Maybe<Scalars['String']['output']>;\n documentType?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n isCorporate?: Maybe<Scalars['Boolean']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n stateInscription?: Maybe<Scalars['String']['output']>;\n tradeName?: Maybe<Scalars['String']['output']>;\n userProfileId?: Maybe<Scalars['String']['output']>;\n userProfileVersion?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderContactInformation = {\n __typename?: 'UserOrderContactInformation';\n document?: Maybe<Scalars['String']['output']>;\n documentType?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCourierStatus = {\n __typename?: 'UserOrderCourierStatus';\n data?: Maybe<Array<UserOrderTrackingInformation>>;\n finished?: Maybe<Scalars['Boolean']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCurrencyFormatInfo = {\n __typename?: 'UserOrderCurrencyFormatInfo';\n CurrencyDecimalDigits?: Maybe<Scalars['Int']['output']>;\n CurrencyDecimalSeparator?: Maybe<Scalars['String']['output']>;\n CurrencyGroupSeparator?: Maybe<Scalars['String']['output']>;\n CurrencyGroupSize?: Maybe<Scalars['Int']['output']>;\n StartsWithCurrencySymbol?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCustomApp = {\n __typename?: 'UserOrderCustomApp';\n fields?: Maybe<UserOrderFields>;\n id?: Maybe<Scalars['String']['output']>;\n major?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderCustomData = {\n __typename?: 'UserOrderCustomData';\n customApps?: Maybe<Array<Maybe<UserOrderCustomApp>>>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomField>>>;\n};\n\nexport type UserOrderCustomField = {\n __typename?: 'UserOrderCustomField';\n fields: Array<UserOrderCustomFieldField>;\n linkedEntity: UserOrderCustomFieldLinkedEntity;\n};\n\nexport type UserOrderCustomFieldField = {\n __typename?: 'UserOrderCustomFieldField';\n name: Scalars['String']['output'];\n refId?: Maybe<Scalars['String']['output']>;\n value: Scalars['String']['output'];\n};\n\nexport type UserOrderCustomFieldLinkedEntity = {\n __typename?: 'UserOrderCustomFieldLinkedEntity';\n id?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type UserOrderCustomFieldsGrouped = {\n __typename?: 'UserOrderCustomFieldsGrouped';\n fields?: Maybe<Array<Maybe<UserOrderCustomFieldField>>>;\n id?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type UserOrderDeliveryChannels = {\n __typename?: 'UserOrderDeliveryChannels';\n id?: Maybe<Scalars['String']['output']>;\n stockBalance?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderDeliveryIds = {\n __typename?: 'UserOrderDeliveryIds';\n accountCarrierName?: Maybe<Scalars['String']['output']>;\n courierId?: Maybe<Scalars['String']['output']>;\n courierName?: Maybe<Scalars['String']['output']>;\n dockId?: Maybe<Scalars['String']['output']>;\n kitItemDetails?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n quantity?: Maybe<Scalars['Int']['output']>;\n warehouseId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryOption = {\n __typename?: 'UserOrderDeliveryOption';\n address?: Maybe<UserOrderAddress>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryCompany?: Maybe<Scalars['String']['output']>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n friendlyDeliveryOptionName?: Maybe<Scalars['String']['output']>;\n friendlyShippingEstimate?: Maybe<Scalars['String']['output']>;\n items?: Maybe<Array<Maybe<UserOrderDeliveryOptionsItems>>>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n quantityOfDifferentItems?: Maybe<Scalars['Int']['output']>;\n selectedSla?: Maybe<Scalars['String']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n total?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderDeliveryOptionsContact = {\n __typename?: 'UserOrderDeliveryOptionsContact';\n email?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryOptionsData = {\n __typename?: 'UserOrderDeliveryOptionsData';\n contact?: Maybe<UserOrderDeliveryOptionsContact>;\n deliveryOptions?: Maybe<Array<Maybe<UserOrderDeliveryOption>>>;\n};\n\nexport type UserOrderDeliveryOptionsItems = {\n __typename?: 'UserOrderDeliveryOptionsItems';\n id?: Maybe<Scalars['String']['output']>;\n imageUrl?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n tax?: Maybe<Scalars['Float']['output']>;\n taxPriceTags?: Maybe<Array<Maybe<UserOrderPriceTag>>>;\n taxPriceTagsTotal?: Maybe<Scalars['Float']['output']>;\n total?: Maybe<Scalars['Float']['output']>;\n uniqueId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryWindow = {\n __typename?: 'UserOrderDeliveryWindow';\n endDateUtc?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n startDateUtc?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDimension = {\n __typename?: 'UserOrderDimension';\n cubicweight?: Maybe<Scalars['Float']['output']>;\n height?: Maybe<Scalars['Int']['output']>;\n length?: Maybe<Scalars['Int']['output']>;\n weight?: Maybe<Scalars['Int']['output']>;\n width?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderFields = {\n __typename?: 'UserOrderFields';\n cartEtag?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderFromList = {\n __typename?: 'UserOrderFromList';\n ShippingEstimatedDate?: Maybe<Scalars['String']['output']>;\n ShippingEstimatedDateMax?: Maybe<Scalars['String']['output']>;\n ShippingEstimatedDateMin?: Maybe<Scalars['String']['output']>;\n affiliateId?: Maybe<Scalars['String']['output']>;\n authorizedDate?: Maybe<Scalars['String']['output']>;\n callCenterOperatorName?: Maybe<Scalars['String']['output']>;\n clientName?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n customFields?: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>;\n deliveryDates?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n giftCardProviders?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n hostname?: Maybe<Scalars['String']['output']>;\n invoiceInput?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n invoiceOutput?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n isAllDelivered?: Maybe<Scalars['Boolean']['output']>;\n isAnyDelivered?: Maybe<Scalars['Boolean']['output']>;\n items?: Maybe<Array<Maybe<UserOrderItemsSummarized>>>;\n lastChange?: Maybe<Scalars['String']['output']>;\n lastMessageUnread?: Maybe<Scalars['String']['output']>;\n listId?: Maybe<Scalars['String']['output']>;\n listType?: Maybe<Scalars['String']['output']>;\n marketPlaceOrderId?: Maybe<Scalars['String']['output']>;\n orderFormId?: Maybe<Scalars['String']['output']>;\n orderId?: Maybe<Scalars['String']['output']>;\n orderIsComplete?: Maybe<Scalars['Boolean']['output']>;\n origin?: Maybe<Scalars['String']['output']>;\n paymentApprovedDate?: Maybe<Scalars['String']['output']>;\n paymentNames?: Maybe<Scalars['String']['output']>;\n readyForHandlingDate?: Maybe<Scalars['String']['output']>;\n salesChannel?: Maybe<Scalars['String']['output']>;\n sequence?: Maybe<Scalars['String']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n totalItems?: Maybe<Scalars['Int']['output']>;\n totalValue?: Maybe<Scalars['Float']['output']>;\n workflowInErrorState?: Maybe<Scalars['Boolean']['output']>;\n workflowInRetry?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderFromListCustomFields = {\n __typename?: 'UserOrderFromListCustomFields';\n type?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n};\n\nexport type UserOrderFromListMinimal = {\n __typename?: 'UserOrderFromListMinimal';\n ShippingEstimatedDate?: Maybe<Scalars['String']['output']>;\n clientName?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n customFields?: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>;\n items?: Maybe<Array<Maybe<UserOrderItemsSummarized>>>;\n orderId?: Maybe<Scalars['String']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n totalValue?: Maybe<Scalars['Float']['output']>;\n};\n\nexport const enum UserOrderInvoiceType {\n Input = 'Input',\n Output = 'Output'\n};\n\nexport type UserOrderItemAttachment = {\n __typename?: 'UserOrderItemAttachment';\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderItemMetadata = {\n __typename?: 'UserOrderItemMetadata';\n Items?: Maybe<Array<Maybe<UserOrderItemMetadataItem>>>;\n};\n\nexport type UserOrderItemMetadataItem = {\n __typename?: 'UserOrderItemMetadataItem';\n AssemblyOptions?: Maybe<Array<Maybe<UserOrderAssemblyOptions>>>;\n DetailUrl?: Maybe<Scalars['String']['output']>;\n Ean?: Maybe<Scalars['String']['output']>;\n Id?: Maybe<Scalars['String']['output']>;\n ImageUrl?: Maybe<Scalars['String']['output']>;\n Name?: Maybe<Scalars['String']['output']>;\n ProductId?: Maybe<Scalars['String']['output']>;\n RefId?: Maybe<Scalars['String']['output']>;\n Seller?: Maybe<Scalars['String']['output']>;\n SkuName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderItems = {\n __typename?: 'UserOrderItems';\n additionalInfo?: Maybe<UserOrderAdditionalInfo>;\n assemblies?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n attachmentOfferings?: Maybe<Array<Maybe<UserOrderAttachmentOfferings>>>;\n attachments?: Maybe<Array<Maybe<UserOrderAttachments>>>;\n bundleItems?: Maybe<Array<Maybe<UserOrderItems>>>;\n callCenterOperator?: Maybe<Scalars['String']['output']>;\n commission?: Maybe<Scalars['Float']['output']>;\n components?: Maybe<Array<Maybe<UserOrderItems>>>;\n costPrice?: Maybe<Scalars['Float']['output']>;\n detailUrl?: Maybe<Scalars['String']['output']>;\n ean?: Maybe<Scalars['String']['output']>;\n freightCommission?: Maybe<Scalars['Float']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n imageUrl?: Maybe<Scalars['String']['output']>;\n isGift?: Maybe<Scalars['Boolean']['output']>;\n itemAttachment?: Maybe<UserOrderItemAttachment>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockId?: Maybe<Scalars['String']['output']>;\n manualPrice?: Maybe<Scalars['String']['output']>;\n manualPriceAppliedBy?: Maybe<Scalars['String']['output']>;\n measurementUnit?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n offerings?: Maybe<Array<Maybe<UserOrderOfferings>>>;\n params?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n parentAssemblyBinding?: Maybe<Scalars['String']['output']>;\n parentItemIndex?: Maybe<Scalars['String']['output']>;\n preSaleDate?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n priceDefinition?: Maybe<UserOrderPriceDefinition>;\n priceTags?: Maybe<Array<Maybe<UserOrderPriceTag>>>;\n priceValidUntil?: Maybe<Scalars['String']['output']>;\n productId?: Maybe<Scalars['String']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n refId?: Maybe<Scalars['String']['output']>;\n rewardValue?: Maybe<Scalars['Float']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n sellerSku?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n serialNumbers?: Maybe<Scalars['String']['output']>;\n shippingPrice?: Maybe<Scalars['String']['output']>;\n tax?: Maybe<Scalars['Float']['output']>;\n taxCode?: Maybe<Scalars['String']['output']>;\n uniqueId?: Maybe<Scalars['String']['output']>;\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderItemsSummarized = {\n __typename?: 'UserOrderItemsSummarized';\n description?: Maybe<Scalars['String']['output']>;\n ean?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n productId?: Maybe<Scalars['String']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n refId?: Maybe<Scalars['String']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderListMinimalResult = {\n __typename?: 'UserOrderListMinimalResult';\n list?: Maybe<Array<Maybe<UserOrderFromListMinimal>>>;\n paging?: Maybe<UserOrderListPaging>;\n};\n\nexport type UserOrderListPaging = {\n __typename?: 'UserOrderListPaging';\n currentPage?: Maybe<Scalars['Int']['output']>;\n pages?: Maybe<Scalars['Int']['output']>;\n perPage?: Maybe<Scalars['Int']['output']>;\n total?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderListResult = {\n __typename?: 'UserOrderListResult';\n facets?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n list?: Maybe<Array<UserOrderFromList>>;\n paging?: Maybe<UserOrderListPaging>;\n reportRecordsLimit?: Maybe<Scalars['Int']['output']>;\n stats?: Maybe<UserOrderListStats>;\n};\n\nexport type UserOrderListStats = {\n __typename?: 'UserOrderListStats';\n stats?: Maybe<UserOrderListStatsData>;\n};\n\nexport type UserOrderListStatsData = {\n __typename?: 'UserOrderListStatsData';\n totalItems?: Maybe<UserOrderListStatsValue>;\n totalValue?: Maybe<UserOrderListStatsValue>;\n};\n\nexport type UserOrderListStatsValue = {\n __typename?: 'UserOrderListStatsValue';\n Count?: Maybe<Scalars['Int']['output']>;\n Facets?: Maybe<Scalars['JSONObject']['output']>;\n Max?: Maybe<Scalars['Float']['output']>;\n Mean?: Maybe<Scalars['Float']['output']>;\n Min?: Maybe<Scalars['Float']['output']>;\n Missing?: Maybe<Scalars['Int']['output']>;\n StdDev?: Maybe<Scalars['Float']['output']>;\n Sum?: Maybe<Scalars['Float']['output']>;\n SumOfSquares?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderLogisticsInfo = {\n __typename?: 'UserOrderLogisticsInfo';\n addressId?: Maybe<Scalars['String']['output']>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryChannels?: Maybe<Array<Maybe<UserOrderDeliveryChannels>>>;\n deliveryCompany?: Maybe<Scalars['String']['output']>;\n deliveryIds?: Maybe<Array<Maybe<UserOrderDeliveryIds>>>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n entityId?: Maybe<Scalars['String']['output']>;\n itemId?: Maybe<Scalars['String']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockTTL?: Maybe<Scalars['String']['output']>;\n pickupPointId?: Maybe<Scalars['String']['output']>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n polygonName?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n selectedDeliveryChannel?: Maybe<Scalars['String']['output']>;\n selectedSla?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n shipsTo?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n slas?: Maybe<Array<Maybe<UserOrderSlas>>>;\n transitTime?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderMarketplace = {\n __typename?: 'UserOrderMarketplace';\n baseURL?: Maybe<Scalars['String']['output']>;\n isCertified?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderOfferings = {\n __typename?: 'UserOrderOfferings';\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPackage = {\n __typename?: 'UserOrderPackage';\n courier?: Maybe<Scalars['String']['output']>;\n courierStatus?: Maybe<UserOrderCourierStatus>;\n extraValue?: Maybe<Scalars['Float']['output']>;\n invoiceKey?: Maybe<Scalars['String']['output']>;\n invoiceNumber: Scalars['String']['output'];\n invoiceUrl?: Maybe<Scalars['String']['output']>;\n invoiceValue: Scalars['Float']['output'];\n issuanceDate?: Maybe<Scalars['String']['output']>;\n items?: Maybe<Array<UserOrderPackageItem>>;\n restitutions?: Maybe<UserOrderRestitutions>;\n trackingNumber?: Maybe<Scalars['String']['output']>;\n trackingUrl?: Maybe<Scalars['String']['output']>;\n type?: Maybe<UserOrderInvoiceType>;\n};\n\nexport type UserOrderPackageAttachment = {\n __typename?: 'UserOrderPackageAttachment';\n packages?: Maybe<Array<Maybe<UserOrderPackage>>>;\n};\n\nexport type UserOrderPackageItem = {\n __typename?: 'UserOrderPackageItem';\n description?: Maybe<Scalars['String']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n price?: Maybe<Scalars['Int']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderPaymentConnectorResponses = {\n __typename?: 'UserOrderPaymentConnectorResponses';\n Message?: Maybe<Scalars['String']['output']>;\n ReturnCode?: Maybe<Scalars['String']['output']>;\n Tid?: Maybe<Scalars['String']['output']>;\n authId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPaymentData = {\n __typename?: 'UserOrderPaymentData';\n giftCards?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n transactions?: Maybe<Array<Maybe<UserOrderTransactions>>>;\n};\n\nexport type UserOrderPayments = {\n __typename?: 'UserOrderPayments';\n accountId?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceBarCodeNumber?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceBarCodeType?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceIdentificationNumber?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceIdentificationNumberFormatted?: Maybe<Scalars['String']['output']>;\n billingAddress?: Maybe<Scalars['String']['output']>;\n cardHolder?: Maybe<Scalars['String']['output']>;\n cardNumber?: Maybe<Scalars['String']['output']>;\n connectorResponses?: Maybe<UserOrderPaymentConnectorResponses>;\n cvv2?: Maybe<Scalars['String']['output']>;\n dueDate?: Maybe<Scalars['String']['output']>;\n expireMonth?: Maybe<Scalars['String']['output']>;\n expireYear?: Maybe<Scalars['String']['output']>;\n firstDigits?: Maybe<Scalars['String']['output']>;\n giftCardAsDiscount?: Maybe<Scalars['String']['output']>;\n giftCardCaption?: Maybe<Scalars['String']['output']>;\n giftCardId?: Maybe<Scalars['String']['output']>;\n giftCardName?: Maybe<Scalars['String']['output']>;\n giftCardProvider?: Maybe<Scalars['String']['output']>;\n group?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n installments?: Maybe<Scalars['Int']['output']>;\n koinUrl?: Maybe<Scalars['String']['output']>;\n lastDigits?: Maybe<Scalars['String']['output']>;\n parentAccountId?: Maybe<Scalars['String']['output']>;\n paymentOrigin?: Maybe<Scalars['String']['output']>;\n paymentSystem?: Maybe<Scalars['String']['output']>;\n paymentSystemName?: Maybe<Scalars['String']['output']>;\n redemptionCode?: Maybe<Scalars['String']['output']>;\n referenceValue?: Maybe<Scalars['Int']['output']>;\n tid?: Maybe<Scalars['String']['output']>;\n url?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderPickupStoreInfo = {\n __typename?: 'UserOrderPickupStoreInfo';\n additionalInfo?: Maybe<Scalars['String']['output']>;\n address?: Maybe<UserOrderAddress>;\n dockId?: Maybe<Scalars['String']['output']>;\n friendlyName?: Maybe<Scalars['String']['output']>;\n isPickupStore?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderPriceDefinition = {\n __typename?: 'UserOrderPriceDefinition';\n calculatedSellingPrice?: Maybe<Scalars['Float']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n sellingPrices?: Maybe<Array<Maybe<UserOrderSellingPrices>>>;\n total?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderPriceTag = {\n __typename?: 'UserOrderPriceTag';\n identifier?: Maybe<Scalars['String']['output']>;\n isPercentual?: Maybe<Scalars['Boolean']['output']>;\n jurisCode?: Maybe<Scalars['String']['output']>;\n jurisName?: Maybe<Scalars['String']['output']>;\n jurisType?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n owner?: Maybe<Scalars['String']['output']>;\n rate?: Maybe<Scalars['Float']['output']>;\n rawValue: Scalars['Float']['output'];\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderPurchaseAgent = {\n __typename?: 'UserOrderPurchaseAgent';\n persona?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n userId?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPurchaseAgentData = {\n __typename?: 'UserOrderPurchaseAgentData';\n purchaseAgents?: Maybe<Array<Maybe<UserOrderPurchaseAgent>>>;\n};\n\nexport type UserOrderRateAndBenefitsIdentifier = {\n __typename?: 'UserOrderRateAndBenefitsIdentifier';\n additionalInfo?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n featured?: Maybe<Scalars['Boolean']['output']>;\n id?: Maybe<Scalars['ID']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderRatesAndBenefitsData = {\n __typename?: 'UserOrderRatesAndBenefitsData';\n id?: Maybe<Scalars['String']['output']>;\n rateAndBenefitsIdentifiers?: Maybe<Array<Maybe<UserOrderRateAndBenefitsIdentifier>>>;\n};\n\nexport type UserOrderRestitutionItem = {\n __typename?: 'UserOrderRestitutionItem';\n compensationValue?: Maybe<Scalars['Float']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['ID']['output']>;\n isCompensation?: Maybe<Scalars['Boolean']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n useFreight?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderRestitutionOption = {\n __typename?: 'UserOrderRestitutionOption';\n items?: Maybe<Array<UserOrderRestitutionItem>>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderRestitutions = {\n __typename?: 'UserOrderRestitutions';\n GiftCard?: Maybe<UserOrderRestitutionOption>;\n Refund?: Maybe<UserOrderRestitutionOption>;\n};\n\nexport type UserOrderResult = {\n __typename?: 'UserOrderResult';\n allowCancellation?: Maybe<Scalars['Boolean']['output']>;\n budgetData?: Maybe<UserOrderBudgetData>;\n canProcessOrderAuthorization?: Maybe<Scalars['Boolean']['output']>;\n clientProfileData?: Maybe<UserOrderClientProfileData>;\n creationDate?: Maybe<Scalars['String']['output']>;\n customData?: Maybe<UserOrderCustomData>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>;\n deliveryOptionsData?: Maybe<UserOrderDeliveryOptionsData>;\n items?: Maybe<Array<Maybe<UserOrderItems>>>;\n orderId?: Maybe<Scalars['String']['output']>;\n paymentData?: Maybe<UserOrderPaymentData>;\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n shippingData?: Maybe<UserOrderShippingData>;\n shopper?: Maybe<UserOrderShopper>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n storePreferencesData?: Maybe<UserOrderStorePreferencesData>;\n totals?: Maybe<Array<Maybe<UserOrderTotals>>>;\n};\n\nexport type UserOrderSellingPrices = {\n __typename?: 'UserOrderSellingPrices';\n quantity?: Maybe<Scalars['Int']['output']>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderShippingData = {\n __typename?: 'UserOrderShippingData';\n address?: Maybe<UserOrderAddress>;\n availableAddresses?: Maybe<Array<Maybe<UserOrderAddress>>>;\n contactInformation?: Maybe<Array<Maybe<UserOrderContactInformation>>>;\n id?: Maybe<Scalars['String']['output']>;\n logisticsInfo?: Maybe<Array<Maybe<UserOrderLogisticsInfo>>>;\n selectedAddresses?: Maybe<Array<Maybe<UserOrderAddress>>>;\n trackingHints?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderShopper = {\n __typename?: 'UserOrderShopper';\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderSlas = {\n __typename?: 'UserOrderSlas';\n availableDeliveryWindows?: Maybe<Array<Maybe<UserOrderDeliveryWindow>>>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryIds?: Maybe<Array<Maybe<UserOrderDeliveryIds>>>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n id?: Maybe<Scalars['String']['output']>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockTTL?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n pickupDistance?: Maybe<Scalars['Int']['output']>;\n pickupPointId?: Maybe<Scalars['String']['output']>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n polygonName?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n transitTime?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderStorePreferencesData = {\n __typename?: 'UserOrderStorePreferencesData';\n countryCode?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n currencyFormatInfo?: Maybe<UserOrderCurrencyFormatInfo>;\n currencyLocale?: Maybe<Scalars['Int']['output']>;\n currencySymbol?: Maybe<Scalars['String']['output']>;\n timeZone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderStoreSellers = {\n __typename?: 'UserOrderStoreSellers';\n fulfillmentEndpoint?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n logo?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderTotals = {\n __typename?: 'UserOrderTotals';\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderTrackingInformation = {\n __typename?: 'UserOrderTrackingInformation';\n city?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n lastChange?: Maybe<Scalars['String']['output']>;\n state?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderTransactions = {\n __typename?: 'UserOrderTransactions';\n isActive?: Maybe<Scalars['Boolean']['output']>;\n merchantName?: Maybe<Scalars['String']['output']>;\n payments?: Maybe<Array<Maybe<UserOrderPayments>>>;\n transactionId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Pagination metadata for the quotes list. */\nexport type UserQuoteListPaging = {\n __typename?: 'UserQuoteListPaging';\n /** Current page number (1-based). */\n currentPage: Scalars['Int']['output'];\n /** Number of items per page. */\n perPage: Scalars['Int']['output'];\n /** Total number of quotes matching the query. */\n total: Scalars['Int']['output'];\n};\n\n/** Result returned by the listUserQuotes query. */\nexport type UserQuoteListResult = {\n __typename?: 'UserQuoteListResult';\n /** Array of quote summaries for the current page. */\n list: Array<UserQuoteSummary>;\n /** Pagination information. */\n paging: UserQuoteListPaging;\n};\n\n/** Summary of a quote returned in list results. */\nexport type UserQuoteSummary = {\n __typename?: 'UserQuoteSummary';\n /** Total amount of the quote. */\n amount: Scalars['Float']['output'];\n /** ISO 8601 date-time when the quote was created. */\n createdAt: Scalars['String']['output'];\n /** Name or email of the user who created the quote. */\n createdBy?: Maybe<Scalars['String']['output']>;\n /** ISO 8601 date-time when the quote expires. */\n expiresAt: Scalars['String']['output'];\n /** Unique identifier of the quote. */\n id: Scalars['String']['output'];\n /** Optional label assigned to the quote. */\n label?: Maybe<Scalars['String']['output']>;\n /** Status of the quote. */\n status: Scalars['String']['output'];\n};\n\nexport type ValidateUserData = {\n __typename?: 'ValidateUserData';\n /** Indicates if the user is valid. */\n isValid: Scalars['Boolean']['output'];\n};\n","import { ForbiddenError, UnauthorizedError } from '../../..'\nimport type { GraphqlContext } from '../index'\n\n/**\n * Creates a function that adds VTEX API AppKey and AppToken headers to requests.\n * These credentials are used for server-to-server authentication with VTEX APIs.\n *\n * @returns A function that accepts additional headers and returns them merged with authentication headers\n * @throws {ForbiddenError} When FS_DISCOVERY_APP_KEY or FS_DISCOVERY_APP_TOKEN environment variables are not set\n */\nexport const getWithAppKeyAndToken = () => {\n return function withAppKeyAndToken<T extends Record<string, string>>(\n additionalHeaders: T = {} as T\n ): T & { 'X-VTEX-API-AppKey': string; 'X-VTEX-API-AppToken': string } {\n const appKey = process.env.FS_DISCOVERY_APP_KEY ?? ''\n const appToken = process.env.FS_DISCOVERY_APP_TOKEN ?? ''\n\n if (!appKey || !appToken) {\n throw new ForbiddenError('No authentication AppKey and AppToken passed.')\n }\n\n return {\n ...additionalHeaders,\n 'X-VTEX-API-AppKey': appKey,\n 'X-VTEX-API-AppToken': appToken,\n }\n }\n}\n\n/**\n * Utility function to validate user authentication\n * Centralized validation logic for all account-related resolvers\n */\nexport const validateUserAuthentication = async (\n ctx: GraphqlContext\n): Promise<void> => {\n const {\n clients: { commerce },\n } = ctx\n\n try {\n const validation = await commerce.vtexid.validate()\n\n if (validation?.authStatus?.toLowerCase() !== 'success') {\n throw new UnauthorizedError('Authentication required')\n }\n } catch (error) {\n const status = (error as any).extensions?.status ?? (error as any).status\n\n if (status === 401) {\n throw new UnauthorizedError('Authentication required')\n }\n\n if (status === 403) {\n throw new ForbiddenError('You are not allowed to access this resource')\n }\n\n // For any other error, throw UnauthorizedError as it likely needs token refresh\n throw new UnauthorizedError('Authentication required')\n }\n}\n","import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nimport { validateUserAuthentication } from '../platforms/vtex/utils/auth'\nimport type { Directive } from './index'\n\nconst NAME = 'auth'\n\nconst directive: Directive = {\n typeDefs: `directive @auth on FIELD_DEFINITION`,\n transformer: (schema: GraphQLSchema) => {\n return mapSchema(schema, {\n [MapperKind.OBJECT_FIELD]: (fieldConfig) => {\n const authDirective = getDirective(schema, fieldConfig, NAME)?.[0]\n\n if (authDirective) {\n const originalResolver = fieldConfig.resolve\n\n fieldConfig.resolve = async (root, args, context, info) => {\n // Validate user authentication before proceeding with the resolver\n await validateUserAuthentication(context)\n\n // Continue with the original resolver\n return originalResolver?.(root, args, context, info)\n }\n }\n\n return fieldConfig\n },\n })\n },\n}\n\nexport default directive\n","import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nimport type { Directive } from './index'\n\nconst NAME = 'cacheControl'\n\nexport interface CacheControl {\n sMaxAge?: number\n staleWhileRevalidate?: number\n scope?: string\n}\n\nexport const stringify = (\n cacheControl: CacheControl,\n forcePrivate?: boolean\n): string => {\n const {\n scope = 'private',\n sMaxAge = 0,\n staleWhileRevalidate = 0,\n } = cacheControl\n const finalScope = forcePrivate ? 'private' : scope\n return `${finalScope}, s-maxage=${sMaxAge}, stale-while-revalidate=${staleWhileRevalidate}`\n}\n\nconst min = (a: number | undefined, b: number | undefined) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a > b ? b : a\n }\n\n if (typeof a === 'number') {\n return a\n }\n\n return b\n}\n\nconst minScope = (a: string | undefined, b: string | undefined) => {\n if (typeof a === 'string' && typeof b === 'string') {\n return a === 'public' && b === 'public' ? 'public' : 'private'\n }\n\n return a || b\n}\n\nconst directive: Directive = {\n typeDefs: `directive @cacheControl(sMaxAge: Int, staleWhileRevalidate: Int, scope: String) on FIELD_DEFINITION`,\n transformer: (schema: GraphQLSchema) =>\n mapSchema(schema, {\n [MapperKind.OBJECT_FIELD]: (fieldConfig) => {\n const cacheControl = getDirective(schema, fieldConfig, NAME)?.[0] as\n | CacheControl\n | undefined\n\n if (cacheControl) {\n const { sMaxAge, staleWhileRevalidate, scope } = cacheControl\n\n const resolver = fieldConfig.resolve\n\n fieldConfig.resolve = (obj, args, ctx, info) => {\n ctx.cacheControl = {\n sMaxAge: min(ctx.cacheControl?.sMaxAge, sMaxAge),\n staleWhileRevalidate: min(\n ctx.cacheControl?.staleWhileRevalidate,\n staleWhileRevalidate\n ),\n scope: minScope(ctx.cacheControl?.scope, scope),\n }\n\n return resolver?.(obj, args, ctx, info)\n }\n }\n\n return fieldConfig\n },\n }),\n}\n\nexport default directive\n","import { mergeTypeDefs } from '@graphql-tools/merge'\nimport { makeExecutableSchema } from '@graphql-tools/schema'\nimport type { IResolvers, TypeSource } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nexport { default as AuthDirective } from './auth'\nexport { default as CacheControlDirective } from './cacheControl'\n\nexport type Directive = {\n typeDefs: string\n transformer: (schema: GraphQLSchema) => GraphQLSchema\n}\n\nexport const withDirectives =\n (directives?: Array<Directive>) =>\n (resolvers: IResolvers<any, any>, typeDef: TypeSource) => {\n const finalTypeDef = mergeTypeDefs([\n ...(directives ?? []).map(({ typeDefs }) => typeDefs),\n typeDef,\n ])\n\n return (directives ?? []).reduce(\n (schema, { transformer }) => transformer?.(schema) ?? schema,\n makeExecutableSchema({\n typeDefs: finalTypeDef,\n resolvers,\n })\n )\n }\n","import { logger, OTELAPI } from '@faststore/diagnostics'\nimport { name, version } from '../../package.json' with { type: 'json' }\n\nconst OTELLogger = logger('@faststore/api')\n\nexport const ResolverTrace = <\n TContext extends {\n OTEL_ENABLED: boolean\n account: string\n discoveryConfig: Record<string, any>\n },\n TSource = any,\n TVars = any,\n TReturn = any,\n>(\n fn: (source: TSource, vars: TVars, context: TContext, info: any) => TReturn,\n resolverName = 'Unknown Graphql Resolver'\n) => {\n return (\n source: TSource,\n vars: TVars,\n graphqlContext: TContext,\n info: any\n ): TReturn => {\n if (!graphqlContext?.OTEL_ENABLED) {\n return fn(source, vars, graphqlContext, info)\n }\n\n const span = OTELAPI.trace.getTracer('Graphql').startSpan(resolverName, {\n kind: OTELAPI.SpanKind.INTERNAL,\n attributes: {\n timestamp: Date.now(),\n '@faststore_version': version,\n '@faststore_package_name': name,\n '@faststore_account_name': graphqlContext.account,\n '@faststore_environment': process.env.NODE_ENV,\n '@faststore_resolver_parent_type': info?.parentType?.name,\n '@faststore_resolver_field_name': info?.fieldName,\n },\n })\n\n const otelContext = OTELAPI.trace.setSpan(OTELAPI.context.active(), span)\n\n try {\n const result = OTELAPI.context.with(otelContext, () =>\n fn(source, vars, graphqlContext, info)\n )\n\n if (result instanceof Promise) {\n return result.then(\n (value) => {\n span.end()\n\n return value\n },\n (error) => recordResolverError(error, span, resolverName)\n ) as TReturn\n }\n\n span.end()\n\n return result\n } catch (error) {\n return recordResolverError(error, span, resolverName)\n }\n }\n}\n\n/** Marks the span as failed and rethrows, keeping call sites linear. */\nfunction recordResolverError(\n error: unknown,\n span: OTELAPI.Span,\n resolverName: string\n): never {\n span.setStatus({ code: OTELAPI.SpanStatusCode.ERROR })\n span.recordException(error as Error)\n span.end()\n\n console.error(`Error at resolver: ${resolverName}: \\n %o`, error)\n OTELLogger('error', 'Error at resolver: %s\\n%o', resolverName, error)\n\n throw error\n}\n","type ErrorType =\n | 'BadRequestError'\n | 'UnauthorizedError'\n | 'NotFoundError'\n | 'RedirectError'\n | 'ForbiddenError'\n | 'UnknownError'\n\ninterface Extension {\n type: ErrorType\n status: number\n}\n\nexport class FastStoreError<T extends Extension = Extension> extends Error {\n constructor(\n public extensions: T,\n message?: string\n ) {\n super(message)\n this.name = 'FastStoreError'\n }\n}\n\nexport class BadRequestError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 400, type: 'BadRequestError' }, message)\n }\n}\n\nexport class UnauthorizedError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 401, type: 'UnauthorizedError' }, message)\n }\n}\n\nexport class ForbiddenError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 403, type: 'ForbiddenError' }, message)\n }\n}\n\nexport class NotFoundError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 404, type: 'NotFoundError' }, message)\n }\n}\n\nexport const isFastStoreError = (error: any): error is FastStoreError =>\n error?.name === 'FastStoreError'\n\nexport const isBadRequestError = (error: any): error is BadRequestError =>\n error?.extensions?.type === 'BadRequestError'\n\nexport const isUnauthorizedError = (error: any): error is UnauthorizedError =>\n error?.extensions?.type === 'UnauthorizedError'\n\nexport const isForbiddenError = (error: any): error is ForbiddenError =>\n error?.extensions?.type === 'ForbiddenError'\n\nexport const isNotFoundError = (error: any): error is NotFoundError =>\n error?.extensions?.type === 'NotFoundError'\n","import fetch from 'isomorphic-unfetch'\nimport packageJson from '../../../../package.json' with { type: 'json' }\nimport {\n BadRequestError,\n FastStoreError,\n ForbiddenError,\n NotFoundError,\n UnauthorizedError,\n} from '../../errors'\n\nconst USER_AGENT = `${packageJson.name}@${packageJson.version}`\n\ninterface FetchAPIOptions {\n storeCookies?: (headers: Headers) => void\n}\n\nexport const fetchAPI = async (\n info: RequestInfo,\n init?: RequestInit,\n options?: FetchAPIOptions\n) => {\n const response = await fetch(info, {\n ...init,\n headers: {\n ...(init?.headers ?? {}),\n 'User-Agent': USER_AGENT,\n },\n })\n\n if (response.ok) {\n if (options?.storeCookies) {\n options.storeCookies(response.headers)\n }\n\n return response.status !== 204 ? response.json() : undefined\n }\n\n console.error(info, init, response)\n const text = await response.text()\n\n // Check if response has a valid status property\n if (typeof response?.status === 'number') {\n switch (response.status) {\n case 400:\n throw new BadRequestError(text)\n case 401:\n throw new UnauthorizedError(text)\n case 403:\n throw new ForbiddenError(text)\n case 404:\n throw new NotFoundError(text)\n default:\n throw new FastStoreError(\n { status: response.status, type: 'UnknownError' },\n text\n )\n }\n }\n\n // Fallback to generic Error if status doesn't exist or is invalid - maybe network error\n throw new Error(text)\n}\n","import type { Options } from '../../../../typings/globals'\nimport { fetchAPI } from '../fetch'\n\nexport interface LocalizedCategoryEntry {\n id: number\n name: string\n /** Slash-separated IDs from root to this node, e.g. \"9281/9285\". Used to determine depth. */\n fullPath: string\n /** Slash-separated localized slugs from root to this node, e.g. \"apparel/t-shirts\". */\n fullPathUriName: string\n}\n\nexport interface LocalizedProductEntry {\n linkId: string\n /** All categories the product belongs to across all trees, as returned by Catalog Dataplane. */\n categories: LocalizedCategoryEntry[]\n /** Localized linkIds keyed by locale, covering all available locales in a single response. */\n availableLinkIds: Record<string, string>\n}\n\nexport interface LocalizedProductResponse {\n id: number\n linkId: string\n name: string\n /** Leaf category (deepest level) the product is registered under. */\n category: LocalizedCategoryEntry | null\n /** Full ancestry chain for every category tree the product belongs to. */\n categories: LocalizedCategoryEntry[]\n /** Localized linkIds keyed by locale, covering all available locales in a single response. */\n availableLinkIds: Record<string, string>\n}\n\n/**\n * Client for the VTEX Catalog Dataplane API.\n * Uses Accept-Language header to return locale-specific product data.\n */\nexport const CatalogDataplane = ({ account, environment }: Options) => {\n const base = `https://${account}.${environment}.com.br`\n\n return {\n getLocalizedProduct: (\n productId: string,\n locale: string\n ): Promise<LocalizedProductResponse> =>\n fetchAPI(`${base}/api/catalog-dataplane/product/${productId}`, {\n method: 'GET',\n headers: {\n 'Accept-Language': locale,\n 'Content-Type': 'application/json',\n },\n }),\n }\n}\n","import { parse } from 'cookie'\nimport type { GraphqlContext } from '../index'\n\nexport interface ContextForCookies {\n headers: GraphqlContext['headers']\n storage: Pick<GraphqlContext['storage'], 'cookies'>\n}\n\n/**\n * Normalizes cookie string by removing duplicates and keeping the last value for each key\n * Example: \"key1=value1; key2=value2; key1=value3\" -> \"key2=value2; key1=value3\"\n */\nconst normalizeCookies = (cookieString: string): string => {\n if (!cookieString) {\n return cookieString\n }\n\n const cookieMap = new Map<string, string>()\n const cookies = cookieString.split(';')\n const processedKeys: string[] = []\n\n // Process cookies to build map with last values and track order\n cookies.forEach((cookie) => {\n const trimmedCookie = cookie.trim()\n if (trimmedCookie) {\n const equalIndex = trimmedCookie.indexOf('=')\n if (equalIndex > 0) {\n const key = trimmedCookie.substring(0, equalIndex)\n const value = trimmedCookie.substring(equalIndex + 1)\n\n // If this is the first time we see this key, record its position\n if (!cookieMap.has(key)) {\n processedKeys.push(key)\n }\n\n cookieMap.set(key, value)\n }\n }\n })\n\n // Rebuild cookie string maintaining the order of first appearance\n return processedKeys.map((key) => `${key}=${cookieMap.get(key)}`).join('; ')\n}\n\nconst MATCH_FIRST_SET_COOKIE_KEY_VALUE = /^([^=]+)=([^;]*)/\n\n/**\n * This function updates the ctx.storage.cookies, that is used in each request.\n *\n * ctx.storage.cookies is a Map<string[1], Record<string, string>[2]> where,\n * [1] cookie key\n * [2] {\n * value: cookie value,\n * setCookie: setCookie used in browser response\n * }\n */\nexport const updatesContextStorageCookies = (\n ctx: Pick<GraphqlContext, 'storage'>,\n setCookieValue: string\n) => {\n const matchCookie = setCookieValue.match(MATCH_FIRST_SET_COOKIE_KEY_VALUE)\n\n if (matchCookie) {\n const cookieKey = matchCookie[1]\n const cookieValue = matchCookie[2]\n\n ctx.storage.cookies.set(cookieKey, {\n value: cookieValue,\n setCookie: setCookieValue,\n })\n }\n}\n\nexport const setCookie = (\n ctx: Pick<GraphqlContext, 'storage'>,\n headers: Headers\n) => {\n headers\n .getSetCookie()\n .forEach((setCookieValue) =>\n updatesContextStorageCookies(ctx, setCookieValue)\n )\n}\n\nexport const getStoreCookie =\n (ctx: Pick<GraphqlContext, 'storage'>) => (headers: Headers) =>\n setCookie(ctx, headers)\n\n/**\n * This function returns a modified copy of the original cookie header (ctx.headers.cookie from the first request)\n * with the cookie values that comes in each request (ctx.storage.cookies).\n * If there is no cookies in storage, the ctx.headers?.cookie is used\n *\n * ctx.storage.cookies is a Map<string[1], Record<string, string>[2]> where,\n * [1] cookie key\n * [2] {\n * value: cookie value,\n * setCookie: setCookie used in browser response\n * }\n */\nexport const getUpdatedCookie = (ctx: ContextForCookies) => {\n if (!ctx.headers?.cookie) {\n return null\n }\n\n // Normalize cookies to handle duplicates (keep last value)\n const normalizedCookie = normalizeCookies(ctx.headers.cookie)\n const contextStorageCookies = Array.from(ctx.storage.cookies.entries())\n\n if (contextStorageCookies.length === 0) {\n return normalizedCookie\n }\n\n return contextStorageCookies.reduce(\n (existingCookies, [storageCookieKey, { value: storageCookieValue }]) =>\n updatesCookieValueByKey(\n existingCookies,\n storageCookieKey,\n storageCookieValue\n ),\n normalizedCookie\n )\n}\n\nexport const getWithCookie = (ctx: ContextForCookies) =>\n function withCookie<T extends Record<string, any>>(\n headers: T\n ): T & { cookie?: string } {\n const updatedCookie = getUpdatedCookie(ctx)\n\n if (!updatedCookie) {\n return headers\n }\n\n return {\n ...headers,\n cookie: updatedCookie,\n }\n }\n\nexport const getAuthCookie = (cookies: string, account: string) => {\n const normalizedCookies = normalizeCookies(cookies)\n const parsedCookies = parse(normalizedCookies)\n const authCookie = parsedCookies[`VtexIdclientAutCookie_${account}`]\n return authCookie || ''\n}\n\n/**\n * This function updates the cookie value based on its key\n *\n * const existingCookies = 'key=value1; key2=; key3=value3';\n * const storageCookieKey = 'key2';\n * const storageCookieValue = 'value2'\n *\n * updatesCookieValueByKey(existingCookies, storageCookieKey, storageCookieValue) returns 'key=value1; key2=value2; key3=value3';\n */\nexport const updatesCookieValueByKey = (\n existingCookies: string,\n storageCookieKey: string,\n storageCookieValue: string\n) => {\n const MATCH_COOKIE_KEY_VALUE = new RegExp(`(${storageCookieKey})=([^;]*)`)\n const cookieParts = existingCookies.match(MATCH_COOKIE_KEY_VALUE)\n\n // replaces original cookie with the one coming from storage\n if (cookieParts) {\n return existingCookies.replace(\n cookieParts[0],\n `${cookieParts[1]}=${storageCookieValue}`\n )\n }\n\n // add new storage cookie to the original list of cookies\n return `${existingCookies};${storageCookieKey}=${storageCookieValue}`\n}\n\nexport function parseJwt(token: string) {\n if (!token) {\n return null\n }\n\n try {\n return JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString())\n } catch {\n // Malformed structure/base64/JSON — treat the same as no token, instead\n // of throwing and 500ing the caller's request.\n return null\n }\n}\n","import { parse } from 'cookie'\nimport type { Options } from '../../../../typings/globals'\nimport type { FACET_CROSS_SELLING_MAP } from '../../utils/facets'\nimport { fetchAPI } from '../fetch'\n\nimport {\n BadRequestError,\n type CommercialAuthorizationResponse,\n type ICommercialAuthorizationByOrderId,\n type IProcessOrderAuthorization,\n type IUserOrderCancel,\n type QueryListUserOrdersArgs,\n type SavedCard,\n type StoreMarketingData,\n type UserOrder,\n type UserOrderCancel,\n type UserOrderListResult,\n} from '../../../..'\nimport { isNotFoundError } from '../../../errors'\nimport type { GraphqlContext } from '../../index'\nimport { getWithAppKeyAndToken } from '../../utils/auth'\nimport type { Channel } from '../../utils/channel'\nimport {\n getAuthCookie,\n getStoreCookie,\n getUpdatedCookie,\n getWithCookie,\n} from '../../utils/cookies'\nimport type { ContractResponse } from './Contract'\nimport type { Address, AddressInput } from './types/Address'\nimport type { Brand } from './types/Brand'\nimport type {\n ByLinkIdBrandResponse,\n ByLinkIdCategoryResponse,\n ByLinkIdCollectionResponse,\n} from './types/ByLinkId'\nimport type { CategoryTree } from './types/CategoryTree'\nimport type { MasterDataResponse } from './types/Newsletter'\nimport type {\n ClientPreferencesData,\n OrderForm,\n OrderFormInputItem,\n} from './types/OrderForm'\nimport type { PickupPoints, PickupPointsInput } from './types/PickupPoints'\nimport type { PortalPagetype } from './types/Portal'\nimport type { PortalProduct } from './types/Product'\nimport type { Region, RegionInput } from './types/Region'\nimport type { SalesChannel } from './types/SalesChannel'\nimport type { Session } from './types/Session'\nimport type { DeliveryMode, SelectedAddress } from './types/ShippingData'\nimport type {\n Simulation,\n SimulationArgs,\n SimulationOptions,\n} from './types/Simulation'\nimport type {\n RecommendationResult,\n StartRecommendationSessionResult,\n} from './types/RecommendationResult'\nimport type { ScopesByUnit, UnitResponse } from './types/Unit'\nimport type { VtexIdResponse } from './types/VtexId'\nimport type { QuoteListResult, ListUserQuotesArgs } from './types/Quote'\n\ntype ValueOf<T> = T extends Record<string, infer K> ? K : never\n\n// Identifies the storefront origin to the Recommendations BFF, as required by\n// the API (`x-vtex-rec-origin` header).\nconst REC_ORIGIN_SUFFIX = 'storefront/faststore.recommendation-shelf@v4'\n\nexport interface RecommendationArgs {\n campaignVrn: string\n userId?: string\n products?: string[]\n salesChannel?: string\n locale?: string\n}\n\nconst BASE_INIT = {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n}\n\n/**\n * Encode a by-linkid path for the category endpoint. Category link paths can be\n * multi-segment (e.g. \"computer---software/eletronicos\"); the Catalog endpoint\n * expects the \"/\" separators to stay literal so it can validate each level,\n * while each segment is individually URL-encoded. Running encodeURIComponent on\n * the whole string would turn \"/\" into \"%2F\" and break multi-segment resolution.\n */\nconst encodeLinkIdPath = (linkId: string): string =>\n linkId.split('/').map(encodeURIComponent).join('/')\n\n/**\n * Build the fetch init that forwards a locale to a by-linkid endpoint. When no\n * locale is provided the endpoint falls back to the store's default registered\n * language (non-localized stores behavior).\n */\nconst byLinkIdInit = (locale?: string): RequestInit | undefined =>\n locale ? { headers: { 'Accept-Language': locale } } : undefined\n\nconst QUOTE_ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}$/\nconst QUOTE_VALID_STATUSES = new Set([\n 'Draft',\n 'Requested',\n 'InReview',\n 'Reviewed',\n 'Approved',\n 'Declined',\n 'Expired',\n 'ConvertedToCart',\n 'ConvertedToOrder',\n])\n\nfunction validateListUserQuotesArgs({\n page,\n perPage,\n status,\n createdAtFrom,\n createdAtTo,\n expiresAtFrom,\n expiresAtTo,\n}: ListUserQuotesArgs): void {\n if (page !== undefined && (!Number.isInteger(page) || page < 1)) {\n throw new Error(\n `listUserQuotes: invalid page \"${page}\" — must be a positive integer`\n )\n }\n if (perPage !== undefined && (!Number.isInteger(perPage) || perPage < 1)) {\n throw new Error(\n `listUserQuotes: invalid perPage \"${perPage}\" — must be a positive integer`\n )\n }\n for (const [field, value] of [\n ['createdAtFrom', createdAtFrom],\n ['createdAtTo', createdAtTo],\n ['expiresAtFrom', expiresAtFrom],\n ['expiresAtTo', expiresAtTo],\n ] as [string, string | undefined][]) {\n if (value && !QUOTE_ISO_DATE.test(value)) {\n throw new Error(\n `listUserQuotes: invalid ${field} \"${value}\" — must be YYYY-MM-DD`\n )\n }\n }\n if (status && status.length > 0) {\n const invalid = status.filter((s) => !QUOTE_VALID_STATUSES.has(s))\n if (invalid.length > 0) {\n throw new Error(\n `listUserQuotes: invalid status values: ${invalid.join(', ')}`\n )\n }\n }\n}\n\nfunction buildListUserQuotesParams({\n page,\n perPage,\n status,\n createdAtFrom,\n createdAtTo,\n expiresAtFrom,\n expiresAtTo,\n label,\n}: ListUserQuotesArgs): URLSearchParams {\n const params = new URLSearchParams()\n\n if (page) params.append('pageNumber', page.toString())\n if (perPage) params.append('pageSize', perPage.toString())\n status?.forEach((s) => params.append('status', s))\n if (createdAtFrom) params.append('createdAtFrom', createdAtFrom)\n if (createdAtTo) params.append('createdAtTo', createdAtTo)\n if (expiresAtFrom) params.append('expiresAtFrom', expiresAtFrom)\n if (expiresAtTo) params.append('expiresAtTo', expiresAtTo)\n if (label?.trim()) params.append('label', label.trim())\n\n return params\n}\n\nexport const VtexCommerce = (\n { account, environment, incrementAddress, subDomainPrefix }: Options,\n ctx: GraphqlContext\n) => {\n const base = `https://${account}.${environment}.com.br`\n const storeCookies = getStoreCookie(ctx)\n const withCookie = getWithCookie(ctx)\n const withAppKeyAndToken = getWithAppKeyAndToken()\n\n const host =\n new Headers(ctx.headers).get('x-forwarded-host') ?? ctx.headers?.host ?? ''\n\n const selectedPrefix = subDomainPrefix\n ? subDomainPrefix\n .map((prefix) => prefix + '.')\n .find((prefix) => host.includes(prefix)) || ''\n : ''\n\n const forwardedHost = host.replace(selectedPrefix, '')\n\n // Recommendations BFF (`/api/recommend-bff/v2`) lives under the same account\n // host as the other commerce APIs, so it's exposed here as a namespace.\n const recommendationBase = `${base}/api/recommend-bff/v2`\n const recommendationHeaders: HeadersInit = withCookie({\n accept: 'application/json',\n 'content-type': 'application/json',\n 'x-vtex-rec-origin': `${account}/${REC_ORIGIN_SUFFIX}`,\n })\n const withBuyerAuthHeaders = (\n additionalHeaders: Record<string, string> = {}\n ): HeadersInit => {\n const authToken = getAuthCookie(getUpdatedCookie(ctx) ?? '', account)\n\n return withCookie({\n ...additionalHeaders,\n 'X-FORWARDED-HOST': forwardedHost,\n ...(authToken ? { [`VtexIdclientAutCookie_${account}`]: authToken } : {}),\n })\n }\n\n return {\n catalog: {\n salesChannel: (sc: string): Promise<SalesChannel> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/saleschannel/${sc}`,\n undefined,\n { storeCookies }\n ),\n brand: {\n list: (): Promise<Brand[]> =>\n fetchAPI(`${base}/api/catalog_system/pub/brand/list`, undefined, {\n storeCookies,\n }),\n },\n category: {\n tree: (depth = 3): Promise<CategoryTree[]> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/category/tree/${depth}`,\n undefined,\n { storeCookies }\n ),\n },\n portal: {\n pagetype: (slug: string): Promise<PortalPagetype> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/portal/pagetype/${slug}`,\n undefined,\n { storeCookies }\n ),\n },\n byLinkId: {\n // The by-linkid endpoints resolve a slug to a single catalog entity\n // (or 404 when there is no match). We surface a 404 as `null` so the\n // loader can cascade category → brand → collection.\n category: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdCategoryResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/category/by-linkid/${encodeLinkIdPath(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n brand: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdBrandResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/brand/by-linkid/${encodeURIComponent(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n collection: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdCollectionResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/collection/by-linkid/${encodeURIComponent(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n },\n products: {\n crossselling: ({\n type,\n productId,\n groupByProduct = true,\n }: {\n type: ValueOf<typeof FACET_CROSS_SELLING_MAP>\n productId: string\n groupByProduct?: boolean\n }): Promise<PortalProduct[]> => {\n const params = new URLSearchParams({\n sc: ctx.storage.channel.salesChannel,\n groupByProduct: groupByProduct.toString(),\n })\n\n return fetchAPI(\n `${base}/api/catalog_system/pub/products/crossselling/${type}/${productId}?${params}`,\n undefined,\n { storeCookies }\n )\n },\n },\n },\n checkout: {\n simulation: (\n args: SimulationArgs,\n { salesChannel }: SimulationOptions = ctx.storage.channel\n ): Promise<Simulation> => {\n const params = new URLSearchParams({\n sc: salesChannel,\n })\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForms/simulation?${params.toString()}`,\n {\n ...BASE_INIT,\n headers,\n body: JSON.stringify(args),\n },\n { storeCookies }\n )\n },\n shippingData: (\n {\n id,\n index,\n deliveryMode,\n selectedAddresses,\n }: {\n id: string\n index: number\n deliveryMode?: DeliveryMode | null\n selectedAddresses: SelectedAddress[]\n },\n setDeliveryWindow?: boolean\n ): Promise<OrderForm> => {\n const deliveryWindow = setDeliveryWindow\n ? {\n startDateUtc: deliveryMode?.deliveryWindow?.startDate,\n endDateUtc: deliveryMode?.deliveryWindow?.endDate,\n }\n : null\n\n const mappedBody = {\n logisticsInfo: Array.from({ length: index }, (_, itemIndex) => ({\n itemIndex,\n selectedDeliveryChannel: deliveryMode?.deliveryChannel || null,\n selectedSla: deliveryMode?.deliveryMethod || null,\n deliveryWindow: deliveryWindow,\n })),\n selectedAddresses: selectedAddresses,\n clearAddressIfPostalCodeNotFound: incrementAddress,\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/shippingData`,\n {\n ...BASE_INIT,\n headers,\n body: JSON.stringify(mappedBody),\n },\n { storeCookies }\n )\n },\n marketingData: ({\n id,\n marketingData,\n }: {\n id: string\n marketingData: StoreMarketingData\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/marketingData`,\n {\n headers,\n body: JSON.stringify(marketingData),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n clientPreferencesData: ({\n id,\n clientPreferencesData,\n }: {\n id: string\n clientPreferencesData: ClientPreferencesData\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/clientPreferencesData`,\n {\n headers,\n body: JSON.stringify(clientPreferencesData),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n orderForm: ({\n id,\n refreshOutdatedData = true,\n channel = ctx.storage.channel,\n preserveSalesChannel = false,\n }: {\n id?: string\n refreshOutdatedData?: boolean\n channel?: Required<Channel>\n /**\n * When true, omit the `sc` query param so Checkout keeps the cart's\n * current sales channel. Use this when the session SC may be stale\n * relative to an external flow (e.g. Quick Order) that already\n * advanced the orderForm.\n */\n preserveSalesChannel?: boolean\n }): Promise<OrderForm> => {\n const { salesChannel } = channel\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const params = new URLSearchParams()\n // New carts (no id) always need an explicit SC. Existing carts may\n // omit it so Checkout does not recalculate under a stale session SC.\n if (!preserveSalesChannel || !id) {\n params.set('sc', salesChannel)\n }\n if (id) {\n params.set('refreshOutdatedData', refreshOutdatedData.toString())\n }\n const orderFormPath = id ? `/${id}` : ''\n // Always has at least `sc` (new cart) or `refreshOutdatedData` (existing).\n const url = `${base}/api/checkout/pub/orderForm${orderFormPath}?${params}`\n\n return fetchAPI(\n url,\n {\n ...BASE_INIT,\n headers,\n ...(id ? {} : { body: '{}' }),\n },\n { storeCookies }\n )\n },\n clearOrderFormMessages: ({ id }: { id: string }) => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/messages/clear`,\n {\n ...BASE_INIT,\n headers,\n body: '{}',\n }\n )\n },\n updateOrderFormItems: ({\n id,\n orderItems,\n allowOutdatedData = 'paymentData',\n salesChannel = ctx.storage.channel.salesChannel,\n shouldSplitItem = true,\n }: {\n id: string\n orderItems: OrderFormInputItem[]\n allowOutdatedData?: 'paymentData'\n salesChannel?: string\n shouldSplitItem?: boolean | null\n }): Promise<OrderForm> => {\n const params = new URLSearchParams({\n allowOutdatedData,\n sc: salesChannel,\n })\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/items?${params}`,\n {\n headers,\n body: JSON.stringify({\n orderItems,\n noSplitItem: !shouldSplitItem,\n }),\n method: 'PATCH',\n },\n { storeCookies }\n )\n },\n setCustomData: ({\n id,\n appId,\n key,\n value,\n }: {\n id: string\n appId: string\n key: string\n value: string\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/customData/${appId}/${key}`,\n {\n headers,\n body: JSON.stringify({ value }),\n method: 'PUT',\n }\n )\n },\n region: async ({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n }: RegionInput): Promise<Region[]> => {\n const params = new URLSearchParams({\n country: country,\n sc: salesChannel ?? '',\n })\n\n postalCode\n ? params.append('postalCode', postalCode)\n : params.append(\n 'geoCoordinates',\n `${geoCoordinates?.longitude};${geoCoordinates?.latitude}`\n )\n\n const url = `${base}/api/checkout/pub/regions/?${params.toString()}`\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n url,\n {\n headers,\n },\n { storeCookies }\n )\n },\n address: async ({\n postalCode,\n country,\n }: AddressInput): Promise<Address> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/postal-code/${country}/${postalCode}`,\n {\n headers,\n },\n { storeCookies }\n )\n },\n cancelOrder: ({\n orderId,\n customerEmail,\n reason,\n }: IUserOrderCancel): Promise<UserOrderCancel> | undefined => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orders/${orderId}/user-cancel-request`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify({\n customerEmail,\n reason,\n }),\n },\n {}\n )\n },\n pickupPoints: ({\n geoCoordinates,\n }: PickupPointsInput): Promise<PickupPoints> => {\n if (!geoCoordinates) {\n throw new Error(\n 'Missing required parameter for listing pickup points.'\n )\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/logistics-shipping/pickuppoints/_search`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify({ coordinate: geoCoordinates }),\n },\n { storeCookies }\n )\n },\n },\n session: (search: string): Promise<Session> => {\n const params = new URLSearchParams(search)\n\n params.set(\n 'items',\n 'profile.id,profile.email,profile.firstName,profile.lastName,profile.phone,shopper.firstName,shopper.lastName,shopper.organizationManager,shopper.availableContracts,shopper.activeContractId,store.channel,store.countryCode,store.cultureInfo,store.currencyCode,store.currencySymbol,authentication.customerId,authentication.storeUserId,authentication.storeUserEmail,authentication.unitId,authentication.unitName,checkout.regionId,public.postalCode'\n )\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n })\n\n const sessionCookie = parse(ctx?.headers?.cookie ?? '')?.vtex_session\n\n return fetchAPI(\n `${base}/api/sessions?${params.toString()}`,\n {\n method: sessionCookie ? 'PATCH' : 'POST',\n headers,\n body: '{}',\n },\n { storeCookies }\n )\n },\n subscribeToNewsletter: (data: {\n name: string\n email: string\n }): Promise<MasterDataResponse> => {\n return fetchAPI(\n `${base}/api/dataentities/NL/documents/`,\n {\n ...BASE_INIT,\n body: JSON.stringify({ ...data, isNewsletterOptIn: true }),\n method: 'PATCH',\n },\n { storeCookies }\n )\n },\n profile: {\n addresses: async (userId: string): Promise<Record<string, string>> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/profile-system/pvt/profiles/${userId}/addresses`,\n { headers },\n { storeCookies }\n )\n },\n },\n oms: {\n userOrder: ({ orderId }: { orderId: string }): Promise<UserOrder> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/oms/user/orders/${orderId}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n listUserOrders: ({\n page,\n status,\n dateInitial,\n dateFinal,\n text,\n clientEmail,\n perPage,\n pendingMyApproval,\n }: QueryListUserOrdersArgs): Promise<UserOrderListResult> => {\n const params = new URLSearchParams()\n\n if (dateInitial) {\n const dateInitialTimestamp = new Date(dateInitial).setHours(\n 0,\n 0,\n 0,\n 0\n )\n dateInitial = new Date(dateInitialTimestamp).toISOString()\n }\n if (dateFinal) {\n const dateFinalTimestamp = new Date(dateFinal).setHours(\n 23,\n 59,\n 59,\n 999\n )\n dateFinal = new Date(dateFinalTimestamp).toISOString()\n }\n\n if (text) params.append('text', text)\n\n if (status && status.length > 0) {\n params.append('status', status.filter(Boolean).join(','))\n }\n\n if (dateInitial && dateFinal) {\n params.append(\n 'creation_date',\n `creationDate:[${dateInitial} TO ${dateFinal}]`\n )\n } else if (dateInitial) {\n params.append('creation_date', `creationDate:[${dateInitial} TO *]`)\n } else if (dateFinal) {\n params.append('creation_date', `creationDate:[* TO ${dateFinal}]`)\n }\n\n if (clientEmail) params.append('clientEmail', clientEmail)\n if (page) params.append('page', page.toString())\n if (perPage) params.append('per_page', perPage.toString())\n if (pendingMyApproval) {\n params.append('my_pending_approvals', String(true))\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/oms/user/orders?${params.toString()}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n getCommercialAuthorizationsByOrderId: ({\n orderId,\n }: ICommercialAuthorizationByOrderId): Promise<CommercialAuthorizationResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/${account}/commercial-authorizations/order/${orderId}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n processOrderAuthorization: async ({\n orderAuthorizationId,\n dimensionId,\n ruleId,\n approved,\n }: IProcessOrderAuthorization): Promise<CommercialAuthorizationResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const APPROVAL_SCORE = 100\n const REJECTION_SCORE = 0\n\n const body = {\n params: {\n ruleId,\n dimensionId,\n score: approved ? APPROVAL_SCORE : REJECTION_SCORE,\n },\n }\n\n return fetchAPI(\n `${base}/${account}/commercial-authorizations/${orderAuthorizationId}/callback`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify(body),\n },\n { storeCookies }\n )\n },\n },\n savedCards: {\n listCreditCards: (): Promise<SavedCard[]> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/saved-cards/credit-card?an=${account}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n },\n units: {\n getUnitByUserId: ({\n userId,\n }: { userId: string }): Promise<UnitResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${userId}/unit`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getOrgUnitById: ({\n orgUnitId,\n }: { orgUnitId: string }): Promise<UnitResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${orgUnitId}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getScopesByOrgUnit: ({\n orgUnitId,\n }: { orgUnitId: string }): Promise<ScopesByUnit> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${orgUnitId}/scopes`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n licenseManager: {\n getUserById: ({\n userId,\n }: { userId: string }): Promise<{\n id: string\n name: string\n email: string\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/users/${userId}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getUserByEmail: ({\n email,\n }: { email: string }): Promise<{\n id: string\n name: string\n email: string\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/pvt/users/${email}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getUserRoles: ({\n userId,\n }: { userId: string }): Promise<{\n Email: string\n Roles: Array<{ Id: number; Name: string }>\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/storefront/users/${userId}/roles`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n /**\n * Whether a License Manager resource key is granted to the user. The\n * endpoint resolves the user's roles into the resource key server-side,\n * so callers never have to match role names (which are account-\n * configurable). Responds with a bare boolean.\n */\n isResourceGranted: ({\n userId,\n resourceKey,\n }: { userId: string; resourceKey: string }): Promise<boolean> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/storefront/bff/users/${userId}/resources/${resourceKey}/granted?an=${account}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n masterData: {\n getContractById: ({\n contractId,\n }: { contractId: string }): Promise<ContractResponse> => {\n if (!contractId) {\n throw new BadRequestError('Missing contractId to fetch CL fields.')\n }\n\n const headers: HeadersInit = withBuyerAuthHeaders({\n Accept: 'application/json',\n 'content-type': 'application/json',\n })\n\n return fetchAPI(\n `${base}/api/dataentities/CL/documents/${contractId}?_fields=_all`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getShopperById: ({\n userId,\n }: { userId: string }): Promise<\n Array<{\n firstName: string\n lastName: string\n email: string\n phone: string\n }>\n > => {\n if (!userId) {\n throw new BadRequestError('Missing userId to fetch shopper name.')\n }\n\n const headers: HeadersInit = withAppKeyAndToken({\n Accept: 'application/json',\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const userIdNormalized = userId.replace(/-/g, '') // Normalize userId by removing hyphens\n\n return fetchAPI(\n `${base}/api/dataentities/shopper/search?_where=(userId=${userIdNormalized} OR userId=${userId})&_fields=_all&_schema=v1`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n quotes: {\n listUserQuotes: (args: ListUserQuotesArgs): Promise<QuoteListResult> => {\n validateListUserQuotesArgs(args)\n\n const params = buildListUserQuotesParams(args)\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/quoting/quotes?${params.toString()}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n },\n vtexid: {\n validate: (): Promise<VtexIdResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n // Read from the merged cookie set so the body token stays in sync with\n // the `cookie` header (both pull from request + storage updates).\n const token = getAuthCookie(getUpdatedCookie(ctx) ?? '', account)\n\n return fetchAPI(\n `${base}/api/vtexid/credential/validate`,\n {\n headers,\n body: JSON.stringify({ token }),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n },\n orderEntry: {\n uploadFile: ({\n fileBuffer,\n fileName,\n mimeType,\n }: {\n fileBuffer: Buffer\n fileName: string\n mimeType: string\n }): Promise<{ objectKey: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const boundary = `----FastStoreUploadBoundary${Date.now()}`\n const CRLF = '\\r\\n'\n\n const SAFE_MIME_PATTERN =\n /^[a-zA-Z0-9][a-zA-Z0-9!#$&\\-.^_]*\\/[a-zA-Z0-9][a-zA-Z0-9!#$&\\-.^_+]*$/\n const safeMimeType = SAFE_MIME_PATTERN.test(mimeType)\n ? mimeType\n : 'application/octet-stream'\n const safeFileName = fileName.replaceAll(/[\\r\\n\"]/g, '_')\n\n const headerPart = [\n `--${boundary}`,\n `Content-Disposition: form-data; name=\"file\"; filename=\"${safeFileName}\"`,\n `Content-Type: ${safeMimeType}`,\n '',\n '',\n ].join(CRLF)\n\n const footer = `${CRLF}--${boundary}--${CRLF}`\n\n const headerBytes = Buffer.from(headerPart)\n const footerBytes = Buffer.from(footer)\n const body = new Uint8Array(\n headerBytes.byteLength +\n fileBuffer.byteLength +\n footerBytes.byteLength\n )\n let offset = 0\n body.set(headerBytes, offset)\n offset += headerBytes.byteLength\n body.set(fileBuffer, offset)\n offset += fileBuffer.byteLength\n body.set(footerBytes, offset)\n\n return fetchAPI(\n `${base}/api/order-entry/upload?an=${account}`,\n {\n method: 'POST',\n headers: {\n ...autHeaders,\n 'content-type': `multipart/form-data; boundary=${boundary}`,\n },\n body: body.buffer,\n },\n {}\n )\n },\n\n startOperation: ({\n objectKey,\n orderFormId,\n sessionToken,\n }: {\n objectKey: string\n orderFormId: string\n sessionToken?: string\n }): Promise<{ operationId: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const body = JSON.stringify({\n objectKey,\n orderFormId,\n operation: 'CreateCart',\n ...(sessionToken ? { sessionToken } : {}),\n })\n\n return fetchAPI(\n `${base}/api/order-entry/operation?an=${account}`,\n {\n method: 'POST',\n headers: autHeaders,\n body,\n },\n {}\n )\n },\n\n getOperation: ({\n operationId,\n }: {\n operationId: string\n }): Promise<{\n status: string\n entityId: string\n message?: string\n missingItems?: Array<{\n itemId: string\n itemName?: string\n reason: string\n }>\n }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/order-entry/operation/${operationId}?an=${account}`,\n {\n method: 'GET',\n headers: autHeaders,\n },\n {}\n )\n },\n\n createOrderForm: (): Promise<{ orderFormId: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm?sc=${ctx.storage.channel.salesChannel}`,\n {\n method: 'POST',\n headers: autHeaders,\n body: '{}',\n },\n {}\n )\n },\n\n getOrderFormItems: ({\n orderFormId,\n }: {\n orderFormId: string\n }): Promise<{ items: import('./types/OrderForm').OrderFormItem[] }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${orderFormId}`,\n {\n method: 'GET',\n headers: autHeaders,\n },\n {}\n )\n },\n },\n\n // Anonymous personalization / recommendations served by the VTEX\n // Recommendations BFF. The BFF replies with `vtex-rec-*` Set-Cookie headers\n // (forwarded to the browser via `ctx.storage.cookies`) and returns products\n // already hydrated in the Intelligent Search shape.\n recommendation: {\n recommendations: ({\n campaignVrn,\n userId,\n products = [],\n salesChannel,\n locale,\n }: RecommendationArgs): Promise<RecommendationResult> => {\n const params = new URLSearchParams({ an: account, campaignVrn })\n\n if (userId) {\n params.append('userId', userId)\n }\n\n if (products.length > 0) {\n params.append('products', products.join(','))\n }\n\n if (salesChannel) {\n params.append('salesChannel', salesChannel)\n }\n\n if (locale) {\n params.append('locale', locale)\n }\n\n return fetchAPI(\n `${recommendationBase}/recommendations?${params.toString()}`,\n { headers: recommendationHeaders },\n { storeCookies }\n )\n },\n\n startRecommendationSession: (): Promise<\n StartRecommendationSessionResult | undefined\n > => {\n const params = new URLSearchParams({ an: account })\n\n return fetchAPI(\n `${recommendationBase}/users/start-session?${params.toString()}`,\n { method: 'POST', headers: recommendationHeaders },\n { storeCookies }\n )\n },\n },\n }\n}\n","import type { GraphqlContext } from '..'\n\nexport interface LocalizationConfig {\n enabled?: boolean\n defaultLocale?: string\n locales?: Record<string, unknown>\n}\n\nexport const getLocalizationConfig = (\n ctx: GraphqlContext\n): LocalizationConfig =>\n (ctx.discoveryConfig as { localization?: LocalizationConfig } | undefined)\n ?.localization ?? {}\n\nexport const isLocalizationEnabled = (ctx: GraphqlContext): boolean =>\n getLocalizationConfig(ctx).enabled === true\n\nexport const getConfiguredLocales = (ctx: GraphqlContext): string[] =>\n Object.keys(getLocalizationConfig(ctx).locales ?? {})\n\nexport const getDefaultLocale = (ctx: GraphqlContext): string | undefined =>\n getLocalizationConfig(ctx).defaultLocale\n\n/**\n * Whether `locale` is one of the store's configured locales. Used to validate\n * client-supplied locale input before propagating it to downstream platform\n * APIs. Returns false when localization is disabled (no configured locales).\n */\nexport const isConfiguredLocale = (\n ctx: GraphqlContext,\n locale: string\n): boolean => getConfiguredLocales(ctx).includes(locale)\n\n/**\n * Locale to forward to Catalog by-linkid endpoints via the Accept-Language\n * header so they return localized name/title/description. Returns the active\n * locale only when localization is enabled; otherwise `undefined`, so\n * non-localized stores send no header and falls back to the store's default\n * registered language (legacy behavior).\n *\n * Read at request time (not client construction) because `ctx.storage.locale`\n * is mutated later by the collection resolver.\n */\nexport const getCatalogLocale = (ctx: GraphqlContext): string | undefined =>\n isLocalizationEnabled(ctx) ? ctx.storage.locale || undefined : undefined\n","import { parse } from 'cookie'\n\nexport interface IntelligentSearchFacet {\n key: string\n value: string\n}\n\ntype FuzzyFacet = {\n key: 'fuzzy'\n value: '0' | '1' | 'auto'\n}\n\ntype OperatorFacet = {\n key: 'operator'\n value: 'and' | 'or'\n}\n\ntype SegmentParams = {\n sc?: string | number\n regionId?: string\n country?: string\n locale?: string\n 'zip-code'?: string\n coordinates?: string\n pickupPoint?: string\n deliveryZonesHash?: string\n pickupPointHash?: string\n utmSource?: string\n utmCampaign?: string\n utmiCampaign?: string\n campaigns?: string\n priceTables?: string\n}\n\nexport type Sort =\n | 'price:desc'\n | 'price:asc'\n | 'orders:desc'\n | 'name:desc'\n | 'name:asc'\n | 'release:desc'\n | 'discount:desc'\n | ''\n\nexport type ProductIdentifierField = 'id' | 'slug' | 'ean' | 'reference' | 'sku'\n\nexport type IntelligentSearchEndpoint =\n | 'product-search'\n | 'facets'\n | 'catalog-count'\n | 'products'\n | 'search-suggestions'\n | 'top-searches'\n\nexport interface IntelligentSearchDefaults {\n salesChannel?: string | number\n regionId?: string\n locale: string\n hideUnavailableItems?: boolean\n simulationBehavior?: 'default' | 'skip' | 'only1P'\n showSponsored?: boolean\n}\n\nexport interface IntelligentSearchRequestArgs {\n query?: string\n page?: number\n count?: number\n sort?: Sort\n selectedFacets?: IntelligentSearchFacet[]\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n sponsoredCount?: number\n allowRedirect?: boolean\n field?: ProductIdentifierField\n value?: string\n}\n\nexport interface IntelligentSearchRequestInput {\n endpoint: IntelligentSearchEndpoint\n /** Decoded vtex_segment object (params + extraFacets are extracted internally). */\n segment?: Record<string, unknown>\n defaults?: IntelligentSearchDefaults\n args?: IntelligentSearchRequestArgs\n}\n\nexport interface IntelligentSearchRequest {\n /** Attribute path segment only (no base URL or endpoint prefix). */\n path: string\n params: URLSearchParams\n toString(): string\n}\n\nconst FUZZY_KEY = 'fuzzy'\nconst OPERATOR_KEY = 'operator'\nconst PICKUP_POINT_KEY = 'pickupPoint'\nconst SHIPPING_KEY = 'shipping'\nconst DELIVERY_OPTIONS_KEY = 'delivery-options'\nconst IN_STOCK_KEY = 'in-stock'\nconst POLICY_KEY = 'trade-policy'\nconst REGION_KEY = 'region-id'\n\nconst PATH_EXCLUDED_KEYS = new Set([\n POLICY_KEY,\n REGION_KEY,\n FUZZY_KEY,\n OPERATOR_KEY,\n PICKUP_POINT_KEY,\n])\n\nconst SHIPPING_FACET_KEYS = new Set([\n 'zip-code',\n 'pickupPoint',\n 'country',\n 'coordinates',\n 'deliveryZonesHash',\n 'pickupPointsHash',\n])\n\nconst encodeSafeURI = (uri: string) => encodeURI(decodeURI(uri))\n\nconst removeDiacriticsFromURL = (url: string) =>\n encodeURIComponent(\n decodeURIComponent(url)\n .normalize('NFD')\n // biome-ignore lint/suspicious/noMisleadingCharacterClass: After NFD normalization, combining marks are separated and can be matched individually\n .replaceAll(/[\\u0300-\\u036f]/g, '')\n )\n\nconst PICKUP_IN_POINT_SUFFIX_RE = /^pickup-in-point-(.+)$/\n\n/**\n * Reads and decodes the `vtex_segment` cookie. Does not create a segment.\n * Returns an empty object when the cookie is absent or invalid.\n */\nexport function parseSegmentCookie(\n cookieHeader?: string\n): Record<string, unknown> {\n if (!cookieHeader) {\n return {}\n }\n\n try {\n const cookies = parse(cookieHeader)\n const segmentToken = cookies.vtex_segment\n\n if (!segmentToken) {\n return {}\n }\n\n const decoded = Buffer.from(segmentToken, 'base64').toString('utf-8')\n\n return JSON.parse(decoded) as Record<string, unknown>\n } catch {\n return {}\n }\n}\n\nfunction parseSegmentFacetsString(facetsStr: string): {\n shipping: Record<string, string>\n extraFacets: IntelligentSearchFacet[]\n} {\n const shipping: Record<string, string> = {}\n const extraFacets: IntelligentSearchFacet[] = []\n\n for (const pair of facetsStr.split(';')) {\n const eqIdx = pair.indexOf('=')\n\n if (eqIdx < 0) continue\n\n const key = pair.slice(0, eqIdx)\n const value = pair.slice(eqIdx + 1)\n\n if (!key || !value) continue\n\n if (SHIPPING_FACET_KEYS.has(key)) {\n shipping[key] = value\n } else {\n // NOTE: productClusterIds (and any other repeated facet key, e.g. for\n // excludent collections) must stay as path segments, not collapse into\n // a single query param — IS expects productClusterIds/X/productClusterIds/not:Y/.\n extraFacets.push({ key, value })\n }\n }\n\n return { shipping, extraFacets }\n}\n\nfunction extractSegmentData(segment: Record<string, unknown>): {\n segmentParams: SegmentParams\n extraFacets: IntelligentSearchFacet[]\n} {\n const facetsStr = typeof segment.facets === 'string' ? segment.facets : ''\n const { shipping, extraFacets } = parseSegmentFacetsString(facetsStr)\n\n return {\n segmentParams: {\n sc: segment.channel as string | number | undefined,\n regionId: segment.regionId as string | undefined,\n country: (segment.countryCode as string | undefined) ?? shipping.country,\n locale: segment.cultureInfo as string | undefined,\n 'zip-code': shipping['zip-code'],\n coordinates: shipping.coordinates,\n pickupPoint: shipping.pickupPoint,\n deliveryZonesHash: shipping.deliveryZonesHash,\n pickupPointHash: shipping.pickupPointsHash,\n utmSource: (segment.utm_source as string | undefined) ?? undefined,\n utmCampaign: (segment.utm_campaign as string | undefined) ?? undefined,\n utmiCampaign: (segment.utmi_campaign as string | undefined) ?? undefined,\n campaigns:\n typeof segment.campaigns === 'string' ? segment.campaigns : undefined,\n priceTables: (segment.priceTables as string | undefined) ?? undefined,\n },\n extraFacets,\n }\n}\n\nfunction appendSegmentParams(\n params: URLSearchParams,\n segmentParams: SegmentParams\n) {\n const entries: Array<[string, string | number | undefined]> = [\n ['sc', segmentParams.sc],\n ['regionId', segmentParams.regionId],\n ['country', segmentParams.country],\n ['locale', segmentParams.locale],\n ['zip-code', segmentParams['zip-code']],\n ['coordinates', segmentParams.coordinates],\n ['pickupPoint', segmentParams.pickupPoint],\n ['deliveryZonesHash', segmentParams.deliveryZonesHash],\n ['pickupPointHash', segmentParams.pickupPointHash],\n ['utmSource', segmentParams.utmSource],\n ['utmCampaign', segmentParams.utmCampaign],\n ['utmiCampaign', segmentParams.utmiCampaign],\n ['campaigns', segmentParams.campaigns],\n ['priceTables', segmentParams.priceTables],\n ]\n\n for (const [key, value] of entries) {\n if (value !== undefined && value !== null && value !== '') {\n params.append(key, String(value))\n }\n }\n}\n\nfunction extractPickupPointIdFromShippingFacetValue(\n value: string\n): string | undefined {\n const match = PICKUP_IN_POINT_SUFFIX_RE.exec(value)\n\n return match?.[1]\n}\n\nfunction extractPickupPointIdFromPathShippingFacet(\n selectedFacetsFromPath: IntelligentSearchFacet[]\n): string | undefined {\n const shipping = selectedFacetsFromPath.find((f) => f.key === 'shipping')\n const rawId = shipping\n ? extractPickupPointIdFromShippingFacetValue(shipping.value)\n : undefined\n\n if (rawId === undefined) {\n return undefined\n }\n\n try {\n return decodeURIComponent(rawId)\n } catch {\n return rawId\n }\n}\n\nfunction mergeSegmentParamsWithPickupFromPath(\n segmentParams: SegmentParams | undefined,\n selectedFacetsFromPath: IntelligentSearchFacet[]\n): SegmentParams | undefined {\n const pathPickupId = extractPickupPointIdFromPathShippingFacet(\n selectedFacetsFromPath\n )\n\n if (pathPickupId === undefined) {\n return segmentParams\n }\n\n return {\n ...segmentParams,\n pickupPoint: pathPickupId,\n }\n}\n\nfunction normalizePickupInPointShippingFacets(\n selectedFacets: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n return selectedFacets.map((facet) => {\n if (facet.key !== 'shipping') {\n return facet\n }\n\n const id = extractPickupPointIdFromShippingFacetValue(facet.value)\n\n if (id === undefined) {\n return facet\n }\n\n return { ...facet, value: 'pickup-in-point' }\n })\n}\n\nfunction concatSelectedFacets(\n selectedFacets: IntelligentSearchFacet[],\n selectedFacetsFromSegment: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n let result = [...selectedFacets]\n const hasShipping = result.some((f) => f.key === 'shipping')\n\n for (const facet of selectedFacetsFromSegment) {\n if (!hasShipping || facet.key !== 'shipping') {\n result.push(facet)\n }\n }\n\n if (result.some((f) => f.key === 'shipping' && f.value === 'ignore')) {\n result = result.filter((f) => f.key !== 'shipping')\n }\n\n return normalizePickupInPointShippingFacets(result)\n}\n\nfunction buildAttributePath(selectedFacets: IntelligentSearchFacet[]) {\n return selectedFacets.reduce((attributePath, facet) => {\n let { key, value } = facet\n\n if (key === 'priceRange') {\n key = 'price'\n value = value.replace(' TO ', ':')\n }\n\n return key === 'ft'\n ? attributePath\n : `${attributePath}${encodeSafeURI(key)}/${removeDiacriticsFromURL(encodeSafeURI(value)).replaceAll(/ |%20/g, '-')}/`\n }, '')\n}\n\nconst isFuzzyFacet = (facet: IntelligentSearchFacet): facet is FuzzyFacet =>\n facet.key === 'fuzzy' &&\n (facet.value === '0' || facet.value === '1' || facet.value === 'auto')\n\nconst isOperatorFacet = (\n facet: IntelligentSearchFacet\n): facet is OperatorFacet =>\n facet.key === 'operator' && (facet.value === 'and' || facet.value === 'or')\n\nfunction resolveSegmentData(\n segment: Record<string, unknown> | undefined,\n defaults: IntelligentSearchDefaults | undefined\n): { segmentParams: SegmentParams; extraFacets: IntelligentSearchFacet[] } {\n const { segmentParams, extraFacets } = extractSegmentData(segment ?? {})\n\n // Server-provided defaults are authoritative for sales channel/region: the\n // raw `vtex_segment` cookie is client-supplied base64 JSON and must not be\n // able to override the trusted server context. Only fall back to the cookie\n // values when no default is provided.\n const sc = defaults?.salesChannel ?? segmentParams.sc\n const regionId = defaults?.regionId ?? segmentParams.regionId\n const locale = defaults?.locale ?? segmentParams.locale ?? ''\n\n return {\n segmentParams: {\n ...segmentParams,\n ...(sc ? { sc } : {}),\n ...(regionId ? { regionId } : {}),\n locale,\n },\n extraFacets,\n }\n}\n\nfunction preparePathFacets(\n facets: IntelligentSearchFacet[],\n extraFacets: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n const pathFacets = facets.filter(({ key }) => !PATH_EXCLUDED_KEYS.has(key))\n\n const shippingFacet =\n facets.find(\n ({ key, value }) =>\n key === SHIPPING_KEY && value !== 'all-delivery-methods'\n ) ?? null\n\n const deliveryOptionsFacet =\n facets.find(\n ({ key, value }) =>\n key === DELIVERY_OPTIONS_KEY && value !== 'all-delivery-options'\n ) ?? null\n\n const withShippingFacets = [...pathFacets]\n\n // `pathFacets` may already contain the shipping/delivery-options facets, so\n // only push them when they are not already present to avoid duplicated path\n // segments like `shipping/delivery/shipping/delivery/`.\n const hasShippingInPath = withShippingFacets.some(\n ({ key }) => key === SHIPPING_KEY\n )\n const hasDeliveryOptionsInPath = withShippingFacets.some(\n ({ key }) => key === DELIVERY_OPTIONS_KEY\n )\n\n if (shippingFacet !== null && !hasShippingInPath) {\n withShippingFacets.push(shippingFacet)\n }\n\n if (deliveryOptionsFacet !== null && !hasDeliveryOptionsInPath) {\n withShippingFacets.push(deliveryOptionsFacet)\n }\n\n return concatSelectedFacets(withShippingFacets, extraFacets)\n}\n\nfunction addSearchParamsFacets(\n facets: IntelligentSearchFacet[],\n params: URLSearchParams\n) {\n const fuzzyFacet = facets.find(({ key }) => key === FUZZY_KEY) ?? null\n const operatorFacet = facets.find(({ key }) => key === OPERATOR_KEY) ?? null\n const pickupPointFacet =\n facets.find(({ key }) => key === PICKUP_POINT_KEY) ?? null\n\n if (fuzzyFacet && isFuzzyFacet(fuzzyFacet)) {\n params.append(FUZZY_KEY, fuzzyFacet.value)\n }\n\n if (operatorFacet && isOperatorFacet(operatorFacet)) {\n params.append(OPERATOR_KEY, operatorFacet.value)\n }\n\n if (pickupPointFacet) {\n params.append(PICKUP_POINT_KEY, pickupPointFacet.value)\n }\n}\n\ninterface SearchLikeParams {\n includePagination: boolean\n includeSort: boolean\n}\n\nfunction buildSearchLikeParams(\n args: IntelligentSearchRequestArgs,\n defaults: IntelligentSearchDefaults | undefined,\n segmentData: {\n segmentParams: SegmentParams\n extraFacets: IntelligentSearchFacet[]\n },\n options: SearchLikeParams\n): { params: URLSearchParams; path: string } {\n const {\n query = '',\n page,\n count,\n sort,\n selectedFacets = [],\n showInvisibleItems,\n sponsoredCount,\n hideUnavailableItems: searchHideUnavailableItems,\n allowRedirect = false,\n } = args\n\n const params = new URLSearchParams()\n\n if (options.includePagination && page !== undefined && count !== undefined) {\n const from = page * count\n const to = count === 0 ? from : from + count - 1\n\n params.append('from', from.toString())\n params.append('to', to.toString())\n }\n\n if (query) {\n params.append('query', query)\n }\n\n if (options.includeSort && sort) {\n params.append('sort', sort)\n }\n\n const mergedSegmentParams = mergeSegmentParamsWithPickupFromPath(\n segmentData.segmentParams,\n selectedFacets\n )\n\n appendSegmentParams(params, mergedSegmentParams ?? segmentData.segmentParams)\n addSearchParamsFacets(selectedFacets, params)\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n if (defaults?.hideUnavailableItems !== undefined) {\n const inStockFacet = selectedFacets.find(({ key }) => key === IN_STOCK_KEY)\n const shouldHideUnavailableItems = inStockFacet\n ? inStockFacet.value\n : (searchHideUnavailableItems?.toString() ??\n defaults.hideUnavailableItems.toString())\n\n params.append('hideUnavailableItems', shouldHideUnavailableItems)\n }\n\n if (defaults?.simulationBehavior !== undefined) {\n params.append('simulationBehavior', defaults.simulationBehavior.toString())\n }\n\n if (defaults?.showSponsored !== undefined) {\n params.append('showSponsored', defaults.showSponsored.toString())\n }\n\n if (sponsoredCount !== undefined) {\n params.append('sponsoredCount', sponsoredCount.toString())\n }\n\n if (allowRedirect !== undefined) {\n params.append('allowRedirect', allowRedirect.toString())\n }\n\n const path = buildAttributePath(\n preparePathFacets(selectedFacets, segmentData.extraFacets)\n )\n\n return { params, path }\n}\n\nfunction buildProductsParams(\n args: IntelligentSearchRequestArgs,\n segmentParams: SegmentParams\n): URLSearchParams {\n const { field, value, hideUnavailableItems, showInvisibleItems } = args\n\n const params = new URLSearchParams({\n field: field ?? '',\n value: value ?? '',\n })\n\n appendSegmentParams(params, segmentParams)\n\n if (hideUnavailableItems) {\n params.append('hideUnavailableItems', 'true')\n }\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n return params\n}\n\nfunction createRequest(\n path: string,\n params: URLSearchParams\n): IntelligentSearchRequest {\n return {\n path,\n params,\n toString() {\n const qs = params.toString()\n\n if (!path) {\n return qs ? `?${qs}` : ''\n }\n\n return qs ? `${path}?${qs}` : path\n },\n }\n}\n\n/**\n * Pure builder for intelligent-search v1 path + query params.\n * Callers assemble the full URL: `/api/intelligent-search/v1/${endpoint}/${request.path}?${request.params}`.\n */\nexport function buildIntelligentSearchRequest(\n input: IntelligentSearchRequestInput\n): IntelligentSearchRequest {\n const { endpoint, segment, defaults, args = {} } = input\n const segmentData = resolveSegmentData(segment, defaults)\n\n switch (endpoint) {\n case 'product-search':\n case 'facets': {\n const { params, path } = buildSearchLikeParams(\n args,\n defaults,\n segmentData,\n { includePagination: true, includeSort: true }\n )\n\n return createRequest(path, params)\n }\n\n case 'catalog-count': {\n const { params, path } = buildSearchLikeParams(\n args,\n defaults,\n segmentData,\n { includePagination: false, includeSort: false }\n )\n\n return createRequest(path, params)\n }\n\n case 'products': {\n const params = buildProductsParams(args, segmentData.segmentParams)\n\n return createRequest('', params)\n }\n\n case 'search-suggestions': {\n const params = new URLSearchParams({\n query: args.query?.toString() ?? '',\n locale: defaults?.locale ?? segmentData.segmentParams.locale ?? '',\n })\n\n return createRequest('', params)\n }\n\n case 'top-searches': {\n const params = new URLSearchParams({\n locale: defaults?.locale ?? segmentData.segmentParams.locale ?? '',\n })\n\n return createRequest('', params)\n }\n\n default: {\n const _exhaustive: never = endpoint\n\n throw new Error(`Unknown intelligent-search endpoint: ${_exhaustive}`)\n }\n }\n}\n","import pLimit from 'p-limit'\nimport type { Options } from '../../../../typings/globals'\n\nimport type { GraphqlContext } from '../../'\nimport { getWithCookie } from '../../utils/cookies'\nimport type { SelectedFacet } from '../../utils/facets'\nimport { isLocalizationEnabled } from '../../utils/localization'\nimport {\n buildIntelligentSearchRequest,\n parseSegmentCookie,\n type ProductIdentifierField,\n type Sort,\n} from '../../utils/intelligentSearchRequest'\nimport { fetchAPI } from '../fetch'\nimport type {\n Facet,\n FacetSearchResult,\n FacetValueBoolean,\n} from './types/FacetSearchResult'\nimport type { ProductCountResult } from './types/ProductCountResult'\nimport type {\n Product,\n ProductSearchResult,\n Suggestion,\n} from './types/ProductSearchResult'\n\nexport type {\n ProductIdentifierField,\n Sort,\n} from '../../utils/intelligentSearchRequest'\n\n// Bounds simultaneous IS v1 /products calls; values cardinality is capped\n// upstream by DataLoader maxBatchSize (99) and cross-sell/products `first`.\nconst PRODUCTS_BY_IDENTIFIER_CONCURRENCY = 10\n\nexport interface SearchArgs {\n query?: string\n page: number\n count: number\n type: 'product_search' | 'facets' | 'sponsored_products'\n sort?: Sort\n selectedFacets?: SelectedFacet[]\n fuzzy?: '0' | '1' | 'auto'\n hideUnavailableItems?: boolean\n showInvisibleItems?: boolean\n showSponsored?: boolean\n sponsoredCount?: number\n allowRedirect?: boolean\n}\n\nexport interface ProductLocator {\n field: 'id' | 'slug'\n value: string\n}\n\nexport interface FetchProductArgs {\n field: ProductIdentifierField\n value: string\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n}\n\nexport interface ProductsByIdentifierArgs {\n field: ProductIdentifierField\n values: string[]\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n}\n\nexport const isFacetBoolean = (\n facet: Facet\n): facet is Facet<FacetValueBoolean> => facet.type === 'TEXT'\n\nfunction getRegionIdFromContext(ctx: GraphqlContext): string | undefined {\n const { regionId, seller } = ctx.storage.channel\n const sellerRegionId = seller\n ? Buffer.from(`SW#${seller}`).toString('base64')\n : undefined\n\n return sellerRegionId ?? (regionId || undefined)\n}\n\nfunction getSegmentLocale(ctx: GraphqlContext): string {\n const segment = parseSegmentCookie(ctx.headers?.cookie)\n const cultureInfo = (segment.cultureInfo as string | undefined) || ''\n\n // Locale flows from the URL into IS in one chain:\n // router.locale (Next.js)\n // → selectedFacets locale facet (useLocalizedVariables in @faststore/core)\n // → ctx.storage.locale (mutateLocaleContext in query.ts)\n // → IS locale query param (here)\n //\n // For localized stores: prefer storage.locale over the vtex_segment cookie.\n // The cookie can lag after locale navigation, while storage.locale is derived\n // from the trusted selectedFacets locale facet in the same request.\n\n return isLocalizationEnabled(ctx)\n ? ctx.storage.locale || cultureInfo\n : cultureInfo || ctx.storage.locale || ''\n}\n\nexport const IntelligentSearch = (\n {\n account,\n environment,\n hideUnavailableItems,\n simulationBehavior,\n showSponsored,\n subDomainPrefix,\n }: Options,\n ctx: GraphqlContext\n) => {\n const base = `https://${account}.${environment}.com.br`\n const withCookie = getWithCookie(ctx)\n const segment = parseSegmentCookie(ctx.headers?.cookie)\n\n const requestDefaults = () => ({\n salesChannel: ctx.storage.channel.salesChannel,\n regionId: getRegionIdFromContext(ctx),\n locale: getSegmentLocale(ctx),\n hideUnavailableItems,\n simulationBehavior,\n showSponsored,\n })\n\n const host =\n new Headers(ctx.headers).get('x-forwarded-host') ?? ctx.headers?.host ?? ''\n\n const selectedPrefix = subDomainPrefix\n ? subDomainPrefix\n .map((prefix) => prefix + '.')\n .find((prefix) => host.includes(prefix)) || ''\n : ''\n\n const forwardedHost = host.replace(selectedPrefix, '')\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const search = <T>({ type, ...args }: SearchArgs): Promise<T> => {\n const endpoint = type === 'facets' ? 'facets' : 'product-search'\n const request = buildIntelligentSearchRequest({\n endpoint,\n segment,\n defaults: requestDefaults(),\n args,\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/${endpoint}/${request.path}?${request.params.toString()}`,\n { headers }\n )\n }\n\n const products = (args: Omit<SearchArgs, 'type'>) =>\n search<ProductSearchResult>({ ...args, type: 'product_search' })\n\n const fetchProduct = ({\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n }: FetchProductArgs): Promise<Product> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'products',\n segment,\n defaults: requestDefaults(),\n args: {\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n },\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/products?${request.params.toString()}`,\n { headers }\n )\n }\n\n const productsByIdentifier = async ({\n field,\n values,\n showInvisibleItems,\n hideUnavailableItems: hideUnavailable,\n }: ProductsByIdentifierArgs): Promise<Product[]> => {\n const limit = pLimit(PRODUCTS_BY_IDENTIFIER_CONCURRENCY)\n\n const productsResult = await Promise.all(\n values.map((value) =>\n limit(async () => {\n try {\n return await fetchProduct({\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n })\n } catch {\n return null\n }\n })\n )\n )\n\n return productsResult.filter(\n (product): product is Product => product !== null\n )\n }\n\n const suggestedTerms = (\n args: Omit<SearchArgs, 'type'>\n ): Promise<Suggestion> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'search-suggestions',\n segment,\n defaults: requestDefaults(),\n args: { query: args.query },\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/search-suggestions?${request.params.toString()}`,\n { headers }\n )\n }\n\n const topSearches = (): Promise<Suggestion> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'top-searches',\n segment,\n defaults: requestDefaults(),\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/top-searches?${request.params.toString()}`,\n { headers }\n )\n }\n\n const facets = (args: Omit<SearchArgs, 'type'>) =>\n search<FacetSearchResult>({ ...args, type: 'facets' })\n\n const productCount = (\n args: Omit<SearchArgs, 'type' | 'page' | 'count' | 'sort'>\n ): Promise<ProductCountResult> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'catalog-count',\n segment,\n defaults: requestDefaults(),\n args,\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/catalog-count/${request.path}?${request.params.toString()}`,\n { headers }\n )\n }\n\n return {\n facets,\n products,\n fetchProduct,\n productsByIdentifier,\n suggestedTerms,\n topSearches,\n productCount,\n }\n}\n","import type { GraphqlContext } from '..'\nimport type { Options } from '../../../typings/globals'\nimport { CatalogDataplane } from './catalog'\nimport { VtexCommerce } from './commerce'\nimport { IntelligentSearch } from './search'\n\nexport type Clients = ReturnType<typeof getClients>\n\nexport const getClients = (options: Options, ctx: GraphqlContext) => {\n const search = IntelligentSearch(options, ctx)\n const commerce = VtexCommerce(options, ctx)\n const catalog = CatalogDataplane(options)\n\n return {\n search,\n commerce,\n catalog,\n }\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\nimport type { Options } from '../../../typings/globals'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type {\n ByLinkIdBrandResponse,\n ByLinkIdCategoryResponse,\n ByLinkIdCollectionResponse,\n} from '../clients/commerce/types/ByLinkId'\n\nconst CONCURRENT_REQUESTS_MAX = 20\n\n/**\n * Load key for the collection DataLoader. `locale` is captured at the call\n * site (not re-read from mutable `ctx.storage`) so concurrent aliased\n * `collection` fields with different locales cannot share a cache entry or\n * race on Accept-Language.\n */\nexport type CollectionLoadKey = {\n slug: string\n /** Catalog Accept-Language; `undefined` when localization is disabled. */\n locale?: string\n}\n\nexport type ByLinkIdCategoryRoot = ByLinkIdCategoryResponse & {\n entityType: 'category'\n /**\n * Full accumulated input slug injected by the loader (e.g. \"vestuario/camisetas\").\n * Used by slugifyRoot so that meta.selectedFacets builds the correct facet keys\n * without relying on root.url (which is absent in the by-linkid response).\n */\n slug: string\n}\n\nexport type ByLinkIdBrandRoot = ByLinkIdBrandResponse & {\n entityType: 'brand'\n}\n\nexport type ByLinkIdCollectionRoot = ByLinkIdCollectionResponse & {\n entityType: 'collection'\n}\n\nexport type Root =\n | ByLinkIdCategoryRoot\n | ByLinkIdBrandRoot\n | ByLinkIdCollectionRoot\n\nexport const isCategory = (root: Root): root is ByLinkIdCategoryRoot =>\n root.entityType === 'category'\n\nexport const isBrand = (root: Root): root is ByLinkIdBrandRoot =>\n root.entityType === 'brand'\n\nexport const isCollection = (root: Root): root is ByLinkIdCollectionRoot =>\n root.entityType === 'collection'\n\nexport const getCollectionLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (keys: readonly CollectionLoadKey[]): Promise<Root[]> =>\n Promise.all(\n keys.map((key) =>\n limit(async () => {\n // Normalize to lowercase for DataLoader cache-key consistency\n // (e.g. \"Sporting\" and \"sporting\" are the same). The by-linkid API is\n // case-insensitive by design (it preserves the legacy pagetype behavior).\n // Accents are significant and are preserved by toLowerCase() (e.g. \"vestuário\").\n const normalizedSlug = key.slug.toLowerCase()\n // Use the locale captured on the load key — do not re-read\n // ctx.storage.locale here (it can change mid-request).\n const locale = key.locale\n\n // Step 1: category\n // Pass the full path so the API validates each segment and returns only\n // the unambiguous leaf category. E.g. \"vestuario/camisetas\" resolves to\n // the \"camisetas\" that is a child of \"vestuario\", not any other category\n // that happens to share the linkId \"camisetas\".\n // The full slug is also injected into the result for meta.selectedFacets\n // and breadcrumb URL construction.\n const category = await clients.commerce.catalog.byLinkId.category(\n normalizedSlug,\n locale\n )\n if (category) {\n return {\n ...category,\n entityType: 'category' as const,\n slug: normalizedSlug,\n }\n }\n\n // Step 2: brand (always single-segment)\n const brand = await clients.commerce.catalog.byLinkId.brand(\n normalizedSlug,\n locale\n )\n if (brand) {\n return { ...brand, entityType: 'brand' as const }\n }\n\n // Step 3: collection cluster (always single-segment)\n const collection = await clients.commerce.catalog.byLinkId.collection(\n normalizedSlug,\n locale\n )\n if (collection) {\n return { ...collection, entityType: 'collection' as const }\n }\n\n throw new NotFoundError(\n `No catalog entity found for slug: ${key.slug}. Cascade exhausted (category → brand → collection).`\n )\n })\n )\n )\n\n return new DataLoader<CollectionLoadKey, Root, string>(loader, {\n // DataLoader is used for caching, not batching\n batch: false,\n // Dedup by lowercased slug + captured locale so casing variants share an\n // entry while same-slug / different-locale loads stay isolated.\n cacheKeyFn: ({ slug, locale }) => `${slug.toLowerCase()}::${locale ?? ''}`,\n })\n}\n","import DataLoader from 'dataloader'\nimport type { Options } from '../../../typings/globals'\n\nimport type { Clients } from '../clients'\n\nimport type { SalesChannel } from './../clients/commerce/types/SalesChannel'\n\nexport const getSalesChannelLoader = (_: Options, clients: Clients) => {\n const loader = async (channels: readonly string[]) =>\n Promise.all(channels.map((sc) => clients.commerce.catalog.salesChannel(sc)))\n\n return new DataLoader<string, SalesChannel>(loader)\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\nimport type { Options } from '../../../typings/globals'\n\nimport type { Clients } from '../clients'\nimport type {\n ShippingItem,\n Simulation,\n SimulationArgs,\n} from '../clients/commerce/types/Simulation'\n\n// Limits concurrent requests to the API per request cycle\nconst CONCURRENT_REQUESTS_MAX = 1\n\nexport const getSimulationLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (simulationArgs: readonly SimulationArgs[]) => {\n const allItems = simulationArgs.reduce((acc, { items }: SimulationArgs) => {\n return [...acc, items]\n }, [] as ShippingItem[][])\n\n const items = [...allItems.flat()]\n const simulation = await clients.commerce.checkout.simulation({\n country: simulationArgs[0].country,\n postalCode: simulationArgs[0].postalCode,\n items,\n })\n\n // Sort and filter simulation since Checkout API may return\n // items that we didn't ask for\n const simulated = simulation.items.reduce(\n (acc, item) => {\n const index = item.requestIndex\n\n if (typeof index === 'number' && index < acc.length) {\n acc[index] = item\n }\n\n return acc\n },\n Array(items.length).fill(null) as Simulation['items']\n )\n\n const itemsIndices = allItems.reduce(\n (acc, curr) => [...acc, curr.length + acc[acc.length - 1]],\n [0]\n )\n\n return allItems.map((__, index) => ({\n ...simulation,\n items: simulated\n .slice(itemsIndices[index], itemsIndices[index + 1])\n .filter((item) => Boolean(item)),\n }))\n }\n\n const limited = async (allItems: readonly SimulationArgs[]) =>\n limit(loader, allItems)\n\n return new DataLoader<SimulationArgs, Simulation>(limited, {\n maxBatchSize: 50,\n })\n}\n","import sanitizeHtmlLib from 'sanitize-html'\n\n/**\n * For now, we're using sanitize-html's default set\n * of allowed tags and attributes, which don't even include img elements\n *\n * It is known many client depends on pontentially vulnerable tags, such as script tags\n * We chose to be restrictive at first, and document those restrictions later.\n *\n * When expanding the set of allowed tags and attributes, please consider performance, privacy and security.\n *\n * This possibily breaks compatibility with Portal and Store Framework,\n * which both allows an enormous amount of tags and attributes\n *\n * This was a thoughtful decision that can be reviewed in the future given\n * research was made to back up those changes.\n */\nexport const sanitizeHtml = (\n dirty: Parameters<typeof sanitizeHtmlLib>[0],\n options?: Parameters<typeof sanitizeHtmlLib>[1]\n) => sanitizeHtmlLib(dirty, options)\n","import type { Product, Item } from '../clients/search/types/ProductSearchResult'\nimport { sanitizeHtml } from './sanitizeHtml'\n\nexport type EnhancedSku = Item & { isVariantOf: Product }\n\nfunction sanitizeProduct(product: Product): Product {\n return {\n ...product,\n description: product.description\n ? sanitizeHtml(product.description)\n : product.description,\n }\n}\n\nexport const enhanceSku = (item: Item, product: Product): EnhancedSku => ({\n ...item,\n isVariantOf: sanitizeProduct(product),\n})\n","import DataLoader from 'dataloader'\nimport type { Options } from '../../../typings/globals'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type { EnhancedSku } from '../utils/enhanceSku'\nimport { enhanceSku } from '../utils/enhanceSku'\n\nexport const getSkuLoader = ({ flags }: Options, clients: Clients) => {\n const loader = async (keys: readonly string[]) => {\n const skuIds = keys.map((key) => key.split('-')[0])\n const showInvisibleItems = keys.some(\n (key) => key.split('-')[1] === 'invisibleItems'\n )\n\n const products = await clients.search.productsByIdentifier({\n field: 'sku',\n values: skuIds,\n showInvisibleItems,\n ...(flags?.enableUnavailableItemsOnCart && {\n hideUnavailableItems: false,\n }),\n })\n\n const skuBySkuId = products.reduce(\n (acc, product) => {\n for (const sku of product.items) {\n acc[sku.itemId] = enhanceSku(sku, product)\n }\n\n return acc\n },\n {} as Record<string, EnhancedSku>\n )\n\n const skus = skuIds.map((skuId) => skuBySkuId[skuId])\n const missingSkus = skuIds.filter((skuId) => !skuBySkuId[skuId])\n\n if (missingSkus.length > 0) {\n throw new NotFoundError(\n `Search API did not found the following skus: ${missingSkus.join(',')}`\n )\n }\n\n return skus\n }\n\n return new DataLoader<string, EnhancedSku>(loader, {\n maxBatchSize: 99, // Max allowed batch size of Search API\n })\n}\n","import type { GraphqlContext } from '..'\nimport type { Options } from '../../../typings/globals'\nimport { getCollectionLoader } from './collection'\nimport { getSalesChannelLoader } from './salesChannel'\nimport { getSimulationLoader } from './simulation'\nimport { getSkuLoader } from './sku'\n\nexport type Loaders = ReturnType<typeof getLoaders>\n\nexport const getLoaders = (options: Options, ctx: GraphqlContext) => {\n const { clients } = ctx\n const skuLoader = getSkuLoader(options, clients)\n const simulationLoader = getSimulationLoader(options, clients)\n const collectionLoader = getCollectionLoader(options, clients)\n const salesChannelLoader = getSalesChannelLoader(options, clients)\n\n return {\n skuLoader,\n simulationLoader,\n collectionLoader,\n salesChannelLoader,\n }\n}\n","import type { CommertialOffer } from '../clients/search/types/ProductSearchResult'\n\nexport const inStock = (offer: Pick<CommertialOffer, 'AvailableQuantity'>) =>\n offer.AvailableQuantity > 0\n\nexport const price = (offer: Pick<CommertialOffer, 'spotPrice'>) =>\n offer.spotPrice ?? 0\nexport const sellingPrice = (offer: CommertialOffer) => offer.Price ?? 0\n\nexport const availability = (available: boolean) =>\n available ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'\n\n// Smallest Available Spot Price First\nexport const bestOfferFirst = (\n a: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>,\n b: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>\n) => {\n if (inStock(a) && !inStock(b)) {\n return -1\n }\n\n if (!inStock(a) && inStock(b)) {\n return 1\n }\n\n return price(a) - price(b)\n}\n\nexport const inStockOrderFormItem = (itemAvailability: string) =>\n itemAvailability === 'available'\n","export const withTax = (price: number, tax = 0, unitMultiplier = 1) => {\n const unitTax = tax / unitMultiplier\n\n return Math.round((price + unitTax) * 100) / 100\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { inStock, price } from '../utils/productStock'\nimport { withTax } from '../utils/taxes'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.offers>>\n\nconst getHighPrice = (\n offers: Root,\n options: { includeTaxes: boolean } = { includeTaxes: false }\n) => {\n const availableOffers = offers.filter(inStock)\n const highOffer = availableOffers[availableOffers.length - 1]\n const highPrice = highOffer ? price(highOffer) : 0\n if (!options.includeTaxes) {\n return highPrice\n }\n\n return withTax(highPrice, highOffer?.Tax, highOffer?.product?.unitMultiplier)\n}\n\nconst getLowPrice = (\n offers: Root,\n options: { includeTaxes: boolean } = { includeTaxes: false }\n) => {\n const [lowOffer] = offers.filter(inStock)\n\n const lowPrice = lowOffer ? price(lowOffer) : 0\n\n if (!options.includeTaxes) {\n return lowPrice\n }\n\n return withTax(lowPrice, lowOffer?.Tax, lowOffer?.product?.unitMultiplier)\n}\n\nexport const StoreAggregateOffer: Record<string, GraphqlResolver<Root>> & {\n offers: GraphqlResolver<Root, any, Root>\n} = {\n highPrice: (offers) => getHighPrice(offers),\n lowPrice: (offers) => getLowPrice(offers),\n lowPriceWithTaxes: (offers) => getLowPrice(offers, { includeTaxes: true }),\n offerCount: (offers) => offers.length,\n priceCurrency: async (_, __, ctx) => {\n const {\n loaders: { salesChannelLoader },\n storage: { channel },\n } = ctx\n\n const sc = await salesChannelLoader.load(channel.salesChannel)\n\n return sc.CurrencyCode ?? ''\n },\n offers: (offers) => offers,\n}\n","import type { GraphqlResolver } from '..'\n\n// TODO: Add a review system integration\nexport const StoreAggregateRating: Record<string, GraphqlResolver> = {\n ratingValue: () => 5,\n reviewCount: () => 0,\n}\n","/**\n * VTEX catalog slugify function\n *\n * Copied from:\n * https://github.com/vtex/rewriter/blob/1ce2010783e0586cab42534ce2fb7a983d8a3a84/node/clients/catalog.ts#L72\n *\n * Sometimes, we need to slugify strings for creating urls. An example is the\n * brand urls, where we create them from the brand's name.\n * This slugify function should match exactly what VTEX catalog generates. Any mismatch\n * will lead to broken links.\n * Hopefully, we had this function implemented on VTEX IO and we've been using it for\n * years now. However, looking at the code, I think we can save lots of computing. I'm\n * in a hurry for doing these tests now, so I'll leave a small TODO.\n *\n * TODO: Research for better ways of computing this slugify function. Things I'd try are:\n * - Join those 3 regexs for special characters into a single one.\n * - Replace the regexp of `removeDiacritics` function with a Map. We can make the complexity\n * of this function be O(n) with n=string.length\n *\n */\nconst from =\n 'ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a'\n\nconst to =\n 'AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa'\n\nconst removeDiacritics = (str: string) => {\n let newStr = str.slice(0)\n\n for (let i = 0; i < from.length; i++) {\n newStr = newStr.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i))\n }\n\n return newStr\n}\n\nconst slugifySpecialCharacters = (str: string) => {\n return str.replace(/[·/_,:]/, '-')\n}\n\nexport function slugify(str: string) {\n const noCommas = str.replace(/,/g, '')\n const replaced = noCommas.replace(/[*+~.()'\"!:@&\\[\\]`/ %$#?{}><=_^]/g, '-')\n const slugified = slugifySpecialCharacters(removeDiacritics(replaced))\n\n return slugified.toLowerCase()\n}\n","import type { GraphqlContext, GraphqlResolver } from '..'\nimport type { Brand } from '../clients/commerce/types/Brand'\nimport type { CategoryTree } from '../clients/commerce/types/CategoryTree'\nimport type { CollectionPageType } from '../clients/commerce/types/Portal'\nimport {\n isBrand,\n isCategory,\n isCollection,\n type ByLinkIdBrandRoot,\n type ByLinkIdCategoryRoot,\n type ByLinkIdCollectionRoot,\n} from '../loaders/collection'\nimport { getCatalogLocale, getLocalizationConfig } from '../utils/localization'\nimport { slugify } from '../utils/slugify'\n\ntype ByLinkIdRoot =\n | ByLinkIdCategoryRoot\n | ByLinkIdBrandRoot\n | ByLinkIdCollectionRoot\n\n/**\n * @deprecated Legacy pagetype-based shape. It is no longer produced at runtime\n * since the by-linkid migration and only remains in the public `Root` union to\n * avoid a breaking change for stores that still reference `StoreCollectionRoot`.\n *\n * TODO: remove in the next major of `@faststore/api` (drop from the `Root`\n * union below) — this is a breaking change and must ship with a BREAKING CHANGE note.\n */\nexport type LegacyStoreCollectionRoot =\n | Brand\n | (CategoryTree & { level: number })\n | CollectionPageType\n\n/**\n * Public `StoreCollectionRoot` type (re-exported from the package entrypoint).\n * Kept as a backward-compatible superset: the legacy members are retained\n * (see {@link LegacyStoreCollectionRoot}) so existing consumers keep compiling,\n * while `ByLinkIdRoot` reflects the real runtime shape.\n */\nexport type Root = ByLinkIdRoot | LegacyStoreCollectionRoot\n\n/**\n * Lowercases a catalog slug so one spelling is announced per locale.\n *\n * Merchants register linkIds in whatever casing they typed (\"Elettronica\",\n * \"Eletronicos\"), and by-linkid resolves any casing, so without this every\n * variant would be a legitimate URL advertising itself as canonical. Accents\n * are preserved: they are part of the registered slug, not a casing artifact.\n */\nconst canonicalizeSlug = (slug: string): string => slug.toLowerCase()\n\n/**\n * Loads the by-linkid entity for every level of a collection slug, so\n * \"vestuario/camisetas\" resolves both \"vestuario\" and \"vestuario/camisetas\".\n * The collectionLoader cache means a segment already fetched by another\n * resolver of the same request costs nothing here.\n */\nconst loadSegmentEntities = (\n ctx: GraphqlContext,\n slug: string\n): Promise<ByLinkIdRoot[]> => {\n const segments = slug.split('/').filter(Boolean)\n const {\n loaders: { collectionLoader },\n } = ctx\n\n return Promise.all(\n segments.map((_, index) =>\n collectionLoader.load({\n slug: segments.slice(0, index + 1).join('/'),\n locale: getCatalogLocale(ctx),\n })\n )\n )\n}\n\nconst slugifyRoot = (root: ByLinkIdRoot): string => {\n if (isCategory(root)) {\n // root.slug is the full accumulated input slug (e.g. \"vestuario/camisetas\"),\n // injected by the loader — no URL parsing needed.\n return root.slug\n }\n\n if (isBrand(root)) {\n return root.linkId\n }\n\n // collection — linkId may be null for clusters not yet registered in multilanguage\n return root.linkId ?? slugify(root.name)\n}\n\nexport const StoreCollection: Record<string, GraphqlResolver<ByLinkIdRoot>> = {\n id: ({ id }) => id.toString(),\n slug: (root) => slugifyRoot(root),\n seo: (root) => ({\n title: root.title ?? root.name,\n // pagetype.metaTagDescription and catalog `description` share the same\n // source (confirmed with Catalog). Prefer metaTagDescription when present\n // for forward-compat; fall back to description for by-linkid parity.\n description: root.metaTagDescription ?? root.description,\n }),\n type: (root) => {\n if (isBrand(root)) return 'Brand'\n // Clusters and curated collections share the collection/by-linkid endpoint,\n // whose response has no discriminator between them, so both report as\n // 'Collection'. The enum still declares 'Cluster' for backward compat.\n if (isCollection(root)) return 'Collection'\n // Department = root category (no parent); Category = everything else.\n // SubCategory distinction (3rd level+) requires recursive parent lookup — deferred.\n return root.fatherCategoryId === null ? 'Department' : 'Category'\n },\n meta: async (root, _, ctx) => {\n const slug = slugifyRoot(root)\n\n if (isBrand(root)) {\n return { selectedFacets: [{ key: 'brand', value: slug }] }\n }\n\n if (isCollection(root)) {\n return { selectedFacets: [{ key: 'productclusterids', value: root.id }] }\n }\n\n // For categories, IS expects the canonical (default-locale) slug in selectedFacets\n // regardless of which locale the current request uses. `linkId` carries the slug\n // registered for the *requested* locale, so it is the wrong one here whenever the\n // shopper is browsing anything but the default locale; availableLinkIds is keyed by\n // locale and gives us the default-locale slug directly.\n const { defaultLocale } = getLocalizationConfig(ctx)\n\n const entities = await loadSegmentEntities(ctx, slug)\n\n return {\n selectedFacets: entities.map((entity, index) => ({\n key: `category-${index + 1}`,\n value:\n (defaultLocale && entity.availableLinkIds?.[defaultLocale]) ||\n entity.linkId,\n })),\n }\n },\n breadcrumbList: async (root, _, ctx) => {\n const collections = await loadSegmentEntities(ctx, slugifyRoot(root))\n\n return {\n itemListElement: collections.map((collection, index) => ({\n item: `/${slugifyRoot(collection)}`,\n name: collection.name,\n position: index + 1,\n })),\n numberOfItems: collections.length,\n }\n },\n\n otherLocales: async (root, _, ctx) => {\n const localizationConfig = getLocalizationConfig(ctx)\n\n if (!localizationConfig.enabled) return null\n\n const configuredLocales = Object.keys(localizationConfig.locales ?? {})\n\n if (configuredLocales.length === 0) return null\n\n const slug = slugifyRoot(root)\n\n if (slug.split('/').filter(Boolean).length === 0) return null\n\n let entities: ByLinkIdRoot[]\n\n try {\n entities = await loadSegmentEntities(ctx, slug)\n } catch (err) {\n console.warn('[otherLocales] failed to load collection entities:', err)\n\n return null\n }\n\n return configuredLocales\n .map((configuredLocale) => {\n // Every locale, including the one being rendered, is read from\n // availableLinkIds, which holds registered translations only. by-linkid\n // resolves an untranslated segment by falling back to a slug that\n // exists in another locale, so trusting its `linkId` here would\n // advertise an alternate the target locale never registered and break\n // the reciprocity hreflang requires. The page still declares itself\n // canonical through `canonicalSlug`, which is free to fall back\n // precisely because it is not an hreflang annotation.\n const parts: string[] = []\n\n for (const entity of entities) {\n const linkId = entity.availableLinkIds?.[configuredLocale]\n\n if (!linkId) return null\n\n parts.push(linkId)\n }\n\n return parts.length > 0\n ? {\n locale: configuredLocale,\n slug: canonicalizeSlug(parts.join('/')),\n }\n : null\n })\n .filter((e): e is { locale: string; slug: string } => e !== null)\n },\n\n canonicalSlug: async (root, _, ctx) => {\n const slug = slugifyRoot(root)\n\n if (slug.split('/').filter(Boolean).length === 0) return null\n\n let entities: ByLinkIdRoot[]\n\n try {\n entities = await loadSegmentEntities(ctx, slug)\n } catch (err) {\n console.warn('[canonicalSlug] failed to load collection entities:', err)\n\n return null\n }\n\n const parts = entities.map((entity) => entity.linkId)\n\n // A segment with no linkId leaves nothing better than the visited slug to\n // announce, so the page keeps describing itself by the path it was reached\n // through.\n return parts.every((part): part is string => Boolean(part))\n ? canonicalizeSlug(parts.join('/'))\n : canonicalizeSlug(slug)\n },\n}\n","import type { Maybe } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport interface SelectedFacet {\n key: string\n value: string\n}\n\nexport interface CrossSellingFacet {\n key: keyof typeof FACET_CROSS_SELLING_MAP\n value: string\n}\n\nexport const FACET_CROSS_SELLING_MAP = {\n buy: 'whoboughtalsobought',\n view: 'whosawalsosaw',\n similars: 'similars',\n viewAndBought: 'whosawalsobought',\n accessories: 'accessories',\n suggestions: 'suggestions',\n} as const\n\nexport type FuzzyFacet = {\n key: 'fuzzy'\n value: '0' | '1' | 'auto'\n}\n\nexport type OperatorFacet = {\n key: 'operator'\n value: 'and' | 'or'\n}\n\n/**\n * Transform facets from the store to VTEX platform facets.\n * For instance, the channel in Store becomes trade-policy and regionId in VTEX's realm\n * */\nexport const transformSelectedFacet = ({ key, value }: SelectedFacet) => {\n switch (key) {\n case 'price': {\n return { key, value: value.replace('-to-', ':') }\n }\n\n case 'channel':\n case 'locale':\n case 'buy':\n case 'view':\n case 'similars':\n case 'viewAndBought':\n case 'accessories':\n case 'suggestions': {\n return [] // remove this facet from search\n }\n\n default:\n return { key, value }\n }\n}\n\nexport const parseRange = (range: string): [number, number] | null => {\n const splitted = range.split(':').map(Number)\n\n if (\n splitted.length !== 2 ||\n Number.isNaN(splitted[0]) ||\n Number.isNaN(splitted[1])\n ) {\n return null\n }\n\n return splitted as [number, number]\n}\n\nexport const isCrossSelling = (x: string): x is CrossSellingFacet['key'] =>\n typeof (FACET_CROSS_SELLING_MAP as Record<string, string>)[x] === 'string'\n\nexport const findCrossSelling = (facets?: Maybe<SelectedFacet[]>) => {\n const filtered = facets?.filter((x): x is CrossSellingFacet =>\n isCrossSelling(x.key)\n )\n\n if (Array.isArray(filtered) && filtered.length > 1) {\n throw new BadRequestError(\n `You passed ${filtered.length} cross selling facets but only one is allowed. Please leave one of the following facet: ${filtered.map((x) => x.key).join(',')}`\n )\n }\n\n return filtered?.[0] ?? null\n}\n\nexport const findSlug = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'slug')?.value ?? null\n\nexport const findSkuId = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'id')?.value ?? null\n\nexport const findLocale = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'locale')?.value ?? null\n\nexport const findChannel = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((facet) => facet.key === 'channel')?.value ?? null\n","/**\n * More info at: https://en.wikipedia.org/wiki/Order_statistic\n */\n\n// O(n) search to find the max of an array\nexport const min = <T>(array: T[], cmp: (a: T, b: T) => number) => {\n let best = 0\n\n for (let curr = 1; curr < array.length; curr++) {\n if (cmp(array[best], array[curr]) > 0) {\n best = curr\n }\n }\n\n return array[best]\n}\n","import type { GraphqlResolver } from '..'\nimport type {\n Facet,\n FacetValueBoolean,\n FacetValueRange,\n} from '../clients/search/types/FacetSearchResult'\nimport { parseRange } from '../utils/facets'\nimport { min } from '../utils/orderStatistics'\n\nexport type Root = Facet\n\nexport const StoreFacet: Record<string, GraphqlResolver<Root>> = {\n __resolveType: ({ type, values }) => {\n if (type !== 'TEXT' && type !== 'DELIVERY') {\n return 'StoreFacetRange'\n }\n\n if (!values || values.length === 0) {\n return 'StoreFacetBoolean'\n }\n\n if (values.every((value) => (value as FacetValueRange).range)) {\n return 'StoreFacetRange'\n }\n\n return 'StoreFacetBoolean'\n },\n}\n\nexport const StoreFacetBoolean: Record<\n string,\n GraphqlResolver<Facet<FacetValueBoolean>>\n> = {\n key: ({ key }) => key,\n label: ({ name }) => name,\n values: ({ values }) => values.sort((a, b) => a.name.localeCompare(b.name)),\n}\n\nexport const StoreFacetRange: Record<\n string,\n GraphqlResolver<Facet<FacetValueRange>>\n> = {\n key: ({ key }) => key,\n label: ({ name }) => name,\n min: ({ values, key }, _, { storage: { searchArgs } }) => {\n /**\n * Fetch the selected range the user queried.\n *\n * This is necessary because, differently from boolean facets, Search API does\n * not return the selected values, making us have to implement it in here\n */\n const selectedRange = parseRange(\n searchArgs?.selectedFacets?.find((facet) => facet.key === key)?.value ??\n ''\n )\n\n const facet = min(values, (a, b) => a.range.from - b.range.from)\n const globalMin = facet?.range?.from ?? 0\n\n return {\n selected: selectedRange?.[0] ?? globalMin,\n absolute: globalMin,\n }\n },\n max: ({ values, key }, _, { storage: { searchArgs } }) => {\n /**\n * Fetch the selected range the user queried.\n *\n * This is necessary because, differently from boolean facets, Search API does\n * not return the selected values, making us have to implement it in here\n */\n const selectedRange = parseRange(\n searchArgs?.selectedFacets?.find((facet) => facet.key === key)?.value ??\n ''\n )\n\n const facet = min(values, (a, b) => b.range.to - a.range.to)\n const globalMax = facet?.range?.to ?? 0\n\n return {\n selected: selectedRange?.[1] ?? globalMax,\n absolute: globalMax,\n }\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { FacetValueBoolean } from '../clients/search/types/FacetSearchResult'\n\nexport const StoreFacetValueBoolean: Record<\n string,\n GraphqlResolver<FacetValueBoolean>\n> = {\n value: ({ value }) => value,\n label: ({ name }) => name || 'unknown',\n selected: ({ selected }) => selected,\n quantity: ({ quantity }) => quantity,\n}\n","import type { GraphqlContext } from '..'\nimport type {\n MutationCancelOrderArgs,\n UserOrderCancel,\n} from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const cancelOrder = async (\n _: any,\n { data }: MutationCancelOrderArgs,\n { clients: { commerce } }: GraphqlContext\n): Promise<UserOrderCancel | null> => {\n if (!data?.orderId) {\n throw new BadRequestError('Missing orderId')\n }\n\n const response = await commerce.checkout.cancelOrder(data)\n return { data: response?.data }\n}\n","import type {\n CommercialAuthorizationResponse,\n ProcessOrderAuthorizationRule,\n} from '../../../__generated__/schema'\n\n/**\n * Extracts the first pending rule for authorization where the user is the next authorizer.\n * Returns null if no such rule exists or if the commercial authorization is not pending.\n */\nexport function extractRuleForAuthorization(\n commercialAuth: CommercialAuthorizationResponse | null | undefined\n): ProcessOrderAuthorizationRule | null {\n if (!commercialAuth || commercialAuth.status !== 'pending') {\n return null\n }\n\n for (const dimension of commercialAuth.dimensionStatus) {\n if (dimension.status !== 'pending') {\n continue\n }\n\n const pendingRule = dimension.ruleCollection.find(\n (rule) => rule.status === 'pending' && rule.isUserNextAuthorizer\n )\n\n if (pendingRule) {\n return {\n rule: pendingRule,\n orderAuthorizationId: commercialAuth.id,\n dimensionId: dimension.id,\n }\n }\n }\n\n return null\n}\n\n/**\n * Checks if there are pending rules for other authorizers in the commercial authorization.\n * Returns true if all pending rules are not for the current user (i.e., the user is not the next authorizer).\n */\nexport function isPendingForOtherAuthorizer(\n commercialAuth: CommercialAuthorizationResponse | null | undefined\n): boolean {\n if (!commercialAuth || commercialAuth.status !== 'pending') return false\n\n const pendingRules = commercialAuth.dimensionStatus\n .filter((dimension) => dimension.status === 'pending')\n .flatMap((dimension) => dimension.ruleCollection)\n .filter((rule) => rule.status === 'pending')\n\n if (pendingRules.length === 0) return false\n\n return pendingRules.every((rule) => !rule.isUserNextAuthorizer)\n}\n","import type { GraphqlContext } from '..'\nimport type {\n IProcessOrderAuthorization,\n ProcessOrderAuthorizationResponse,\n} from '../../../__generated__/schema'\nimport {\n extractRuleForAuthorization,\n isPendingForOtherAuthorizer,\n} from '../utils/commercialAuth'\n\nexport const processOrderAuthorization = async (\n _: any,\n { data }: { data: IProcessOrderAuthorization },\n { clients: { commerce } }: GraphqlContext\n): Promise<ProcessOrderAuthorizationResponse | null> => {\n // Process the authorization\n const commercialAuth = await commerce.oms.processOrderAuthorization(data)\n\n // Extract pending authorization for current user\n const ruleForAuthorization = extractRuleForAuthorization(commercialAuth)\n\n // Check if there are pending authorizations for other users\n const isPendingForOther =\n !ruleForAuthorization && isPendingForOtherAuthorizer(commercialAuth)\n\n return {\n isPendingForOtherAuthorizer: isPendingForOther,\n ruleForAuthorization,\n }\n}\n","import type { GraphqlContext } from '..'\nimport type { MutationStartOrderEntryOperationArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const startOrderEntryOperation = async (\n _: unknown,\n { data }: MutationStartOrderEntryOperationArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!data?.objectKey) {\n throw new BadRequestError('Missing objectKey')\n }\n\n const orderFormId =\n data.orderFormId ||\n (await commerce.orderEntry.createOrderForm()).orderFormId\n\n return commerce.orderEntry.startOperation({\n objectKey: data.objectKey,\n orderFormId,\n sessionToken: data.sessionToken ?? undefined,\n })\n}\n","import type { GraphqlContext } from '../index'\n\n/**\n * Starts (or updates) the anonymous personalization session for the current\n * shopper via the Recommendations BFF.\n *\n * The BFF replies with the `vtex-rec-user-id`/`vtex-rec-user-start-session`\n * Set-Cookie headers, which the client forwards to the browser through\n * `ctx.storage.cookies`. Returns `true` once the session has been started.\n */\nexport const startRecommendationSession = async (\n _: unknown,\n __: unknown,\n ctx: GraphqlContext\n) => {\n const result =\n await ctx.clients.commerce.recommendation.startRecommendationSession()\n\n // The BFF may not be ready on the first call and can resolve without a\n // session payload. Only report success once a session actually exists (its\n // `recommendationsUserId`); otherwise surface an error so the caller retries\n // instead of treating an empty response as a started session.\n if (!result?.recommendationsUserId) {\n throw new Error(\n 'Failed to start recommendation session: no session data returned'\n )\n }\n\n return true\n}\n","import type { GraphqlContext } from '..'\nimport type {\n MutationSubscribeToNewsletterArgs,\n PersonNewsletter,\n} from '../../../__generated__/schema'\n\nexport const subscribeToNewsletter = async (\n _: any,\n { data }: MutationSubscribeToNewsletterArgs,\n { clients: { commerce } }: GraphqlContext\n): Promise<PersonNewsletter | null> => {\n const response = await commerce.subscribeToNewsletter(data)\n return { id: response?.Id }\n}\n","import type { GraphqlContext } from '..'\nimport type { MutationUploadFileToOrderEntryArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const uploadFileToOrderEntry = async (\n _: unknown,\n { data }: MutationUploadFileToOrderEntryArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n const { fileContent, fileName, mimeType } = data\n\n if (!fileContent || !fileName || !mimeType) {\n throw new BadRequestError(\n 'Missing required fields: fileContent, fileName, mimeType'\n )\n }\n\n const normalized = fileContent.replaceAll(/\\s/g, '')\n\n const MAX_FILE_BYTES = 5 * 1024 * 1024\n const estimatedBytes = Math.floor((normalized.length * 3) / 4)\n\n if (estimatedBytes > MAX_FILE_BYTES) {\n throw new BadRequestError('File exceeds maximum allowed size of 5MB')\n }\n\n const isValidBase64 =\n /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n normalized\n )\n\n if (!isValidBase64) {\n throw new BadRequestError('Invalid Base64 fileContent')\n }\n\n const fileBuffer = Buffer.from(normalized, 'base64')\n\n const result = await commerce.orderEntry.uploadFile({\n fileBuffer,\n fileName,\n mimeType,\n })\n\n return result\n}\n","export interface Channel {\n seller?: string\n regionId?: string\n salesChannel?: string\n hasOnlyDefaultSalesChannel?: boolean\n}\n\nexport default class ChannelMarshal {\n public static parse(channelString: string): Required<Channel> {\n try {\n const parsedChannel = JSON.parse(channelString) as Channel\n\n return {\n seller: parsedChannel.seller ?? '',\n regionId: parsedChannel.regionId ?? '',\n salesChannel: parsedChannel.salesChannel ?? '',\n hasOnlyDefaultSalesChannel:\n parsedChannel.hasOnlyDefaultSalesChannel ?? true,\n }\n } catch (error) {\n console.error(error)\n\n throw new Error('Malformed channel string')\n }\n }\n\n public static stringify(channel: Channel): string {\n return JSON.stringify(channel)\n }\n}\n","import type { Channel } from './channel'\nimport ChannelMarshal from './channel'\n\n/**\n * When session SC and orderForm SC diverge, keep Checkout on the orderForm\n * trade policy. Used after external cart changes (stale etag / Quick Order) and\n * on later validations while the browser session still lags.\n *\n * Forcing the session SC (refetch / item updates with `sc=session`) would drop\n * items that exist only on the orderForm's sales channel.\n */\nexport function channelWhenSessionDivergesFromOrderForm(\n currentChannel: Required<Channel>,\n orderFormSalesChannel: string | null | undefined\n): string | null {\n if (orderFormSalesChannel == null || orderFormSalesChannel === '') {\n return null\n }\n\n if (\n String(orderFormSalesChannel) === String(currentChannel.salesChannel ?? '')\n ) {\n return null\n }\n\n return ChannelMarshal.stringify({\n ...currentChannel,\n salesChannel: String(orderFormSalesChannel),\n hasOnlyDefaultSalesChannel: false,\n })\n}\n","import type { GraphqlContext } from '..'\nimport ChannelMarshal from './channel'\n\nexport const mutateChannelContext = (\n ctx: GraphqlContext,\n channelString: string\n) => {\n ctx.storage.channel = ChannelMarshal.parse(channelString)\n}\n\nexport const mutateLocaleContext = (ctx: GraphqlContext, locale: string) => {\n ctx.storage.locale = locale\n}\n","import crypto from 'node:crypto'\n\nexport const md5 = (payload: string) =>\n crypto.createHash('md5').update(payload).digest('hex')\n","import type { IStorePropertyValue } from '../../../__generated__/schema'\nimport type { Attachment } from '../clients/commerce/types/OrderForm'\nimport type { Attribute } from '../clients/search/types/ProductSearchResult'\nimport { md5 } from './md5'\n\nexport const VALUE_REFERENCES = {\n attachment: 'ATTACHMENT',\n specification: 'SPECIFICATION',\n attribute: 'ATTRIBUTE',\n} as const\n\nexport function attachmentToPropertyValue(attachment: Attachment) {\n return {\n name: attachment.name,\n value: attachment.content,\n valueReference: VALUE_REFERENCES.attachment,\n }\n}\n\nexport function attributeToPropertyValue(attribute: Attribute) {\n return {\n propertyID: attribute.id,\n name: attribute.name,\n value: attribute.value,\n valueReference: {\n valueReference: VALUE_REFERENCES.attribute,\n visible: attribute.visible,\n },\n }\n}\n\nexport function getPropertyId(item: IStorePropertyValue) {\n return md5(\n `${item.name}:${JSON.stringify(item.value)}:${item.valueReference}`\n )\n}\n","import type { IStoreSession } from '../../../__generated__/schema'\nimport type { SelectedAddress } from '../clients/commerce/types/ShippingData'\n\nexport const createNewAddress = (session: IStoreSession) => {\n const postalCode = session.postalCode\n const geoCoordinates = session.geoCoordinates\n\n // If the address from the session has changed and it do not exist we will create the new one\n const addressSession: SelectedAddress = {\n addressType: session.addressType || null,\n postalCode: postalCode || null,\n city: null,\n state: null,\n country: session.country || null,\n street: null,\n number: null,\n neighborhood: null,\n complement: null,\n reference: null,\n geoCoordinates: [],\n }\n\n if (geoCoordinates) {\n const latitude =\n typeof geoCoordinates === 'object' && 'latitude' in geoCoordinates\n ? geoCoordinates.latitude\n : null\n const longitude =\n typeof geoCoordinates === 'object' && 'longitude' in geoCoordinates\n ? geoCoordinates.longitude\n : null\n addressSession.geoCoordinates =\n latitude !== null && longitude !== null ? [longitude, latitude] : []\n }\n\n return [addressSession]\n}\n","import type { IStoreSession } from '../../../__generated__/schema'\nimport type { OrderForm } from '../clients/commerce/types/OrderForm'\n\nexport const getAddressOrderForm = (\n orderForm: OrderForm,\n session: IStoreSession,\n addressChanged: boolean\n) => {\n const postalCode = session.postalCode\n const geoCoordinates = session.geoCoordinates\n const availableAddresses = orderForm?.shippingData?.availableAddresses ?? []\n const selectedAddresses = orderForm?.shippingData?.selectedAddresses ?? []\n // Validate if no change for the address was made and the deliveryMode has changed we can return the address from the orderForm\n if (!addressChanged && selectedAddresses.length > 0) {\n return [selectedAddresses[0]]\n }\n\n // Validate if the address from the session already exists at the availableAddresses from the OrderForm to avoid duplication\n if (addressChanged && availableAddresses.length > 0) {\n for (const address of availableAddresses) {\n if (postalCode && geoCoordinates) {\n const addressMatcher =\n address.postalCode === postalCode ||\n (address.geoCoordinates[0] === geoCoordinates.longitude &&\n address.geoCoordinates[1] === geoCoordinates.latitude)\n if (addressMatcher) {\n return [address]\n }\n }\n if (postalCode && !geoCoordinates) {\n const addressMatcher = address.postalCode === postalCode\n if (addressMatcher) {\n return [address]\n }\n }\n if (geoCoordinates && !postalCode) {\n const addressMatcher =\n address.geoCoordinates[0] === geoCoordinates.longitude &&\n address.geoCoordinates[1] === geoCoordinates.latitude\n if (addressMatcher) {\n return [address]\n }\n }\n }\n }\n\n return null\n}\n","import type {\n IStoreGeoCoordinates,\n IStoreSession,\n} from '../../../__generated__/schema'\nimport type {\n CheckoutAddress,\n OrderForm,\n LogisticsInfo,\n} from '../clients/commerce/types/OrderForm'\n\nexport const shouldUpdateShippingData = (\n orderForm: OrderForm,\n session: IStoreSession\n) => {\n if (!hasSessionPostalCodeOrGeoCoordinates(session)) {\n return { updateShipping: false, addressChanged: false }\n }\n\n if (!hasItems(orderForm)) {\n return { updateShipping: false, addressChanged: false }\n }\n\n const [selectedAddress] = orderForm?.shippingData?.selectedAddresses ?? []\n if (\n checkPostalCode(selectedAddress, session.postalCode) ||\n checkGeoCoordinates(selectedAddress, session.geoCoordinates) ||\n checkAddressType(selectedAddress, session.addressType)\n ) {\n return { updateShipping: true, addressChanged: true }\n }\n\n // The logisticsInfo will always exist if there´s at least one item inside the cart\n const { logisticsInfo } = orderForm.shippingData!\n\n if (shouldUpdateDeliveryInfo(logisticsInfo, session)) {\n return { updateShipping: true, addressChanged: false }\n }\n return { updateShipping: false, addressChanged: false }\n}\n\n// Validate if theres any postal Code or GeoCoordinates set at the session\nconst hasSessionPostalCodeOrGeoCoordinates = (session: IStoreSession) => {\n return (\n !!session.postalCode ||\n (session.geoCoordinates?.latitude && session.geoCoordinates?.longitude)\n )\n}\n\n// Validate if theres a difference between the session postal code and orderForm postal code\nconst checkPostalCode = (\n address: CheckoutAddress | null,\n postalCode: string | null | undefined\n) => {\n return typeof postalCode === 'string' && address?.postalCode !== postalCode\n}\n\n// Validate if theres a difference between the session geoCoords and orderForm geoCoords\nconst checkGeoCoordinates = (\n address: CheckoutAddress | null,\n geoCoordinates: IStoreGeoCoordinates | null | undefined\n) => {\n return (\n typeof geoCoordinates?.latitude === 'number' &&\n typeof geoCoordinates?.longitude === 'number' &&\n (address?.geoCoordinates[0] !== geoCoordinates?.longitude ||\n address?.geoCoordinates[1] !== geoCoordinates?.latitude)\n )\n}\n\nconst checkAddressType = (\n address: CheckoutAddress | null,\n addressType: string | null | undefined\n) => {\n return typeof addressType === 'string' && address?.addressType !== addressType\n}\n\n// Validate if theres any item inside the orderForm\nconst hasItems = (orderForm: OrderForm) => {\n return orderForm.items.length !== 0\n}\n\nconst shouldUpdateDeliveryInfo = (\n logisticsInfo: LogisticsInfo[],\n session: IStoreSession | null\n) => {\n const deliveryChannel = session?.deliveryMode?.deliveryChannel\n const deliveryMethod = session?.deliveryMode?.deliveryMethod\n const { startDate, endDate } = session?.deliveryMode?.deliveryWindow || {}\n\n return logisticsInfo.some(\n ({ selectedDeliveryChannel, selectedSla, slas }) => {\n const checkDeliveryChannel =\n deliveryChannel && selectedDeliveryChannel !== deliveryChannel\n const checkDeliveryMethod =\n deliveryMethod && selectedSla !== deliveryMethod\n\n return slas?.some((sla) => {\n if (\n (checkDeliveryChannel && sla.deliveryChannel === deliveryChannel) ||\n (checkDeliveryMethod && sla.id === deliveryMethod)\n ) {\n return true\n }\n return (\n startDate &&\n endDate &&\n sla.deliveryChannel === deliveryChannel &&\n sla.id === deliveryMethod &&\n (!sla?.deliveryWindow ||\n sla?.deliveryWindow?.startDateUtc !== startDate ||\n sla?.deliveryWindow?.endDateUtc !== endDate) &&\n sla.availableDeliveryWindows?.some(\n (window) =>\n window?.startDateUtc === startDate &&\n window?.endDateUtc === endDate\n )\n )\n })\n }\n )\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport { parse } from 'cookie'\nimport { channelWhenSessionDivergesFromOrderForm } from '../utils/cartSalesChannel'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { md5 } from '../utils/md5'\nimport {\n attachmentToPropertyValue,\n getPropertyId,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\n\nimport type { GraphqlContext } from '..'\nimport type {\n IStoreOffer,\n IStoreOrder,\n IStorePropertyValue,\n IStoreSession,\n Maybe,\n MutationValidateCartArgs,\n} from '../../../__generated__/schema'\nimport type {\n OrderForm,\n OrderFormInputItem,\n OrderFormItem,\n} from '../clients/commerce/types/OrderForm'\nimport type { SelectedAddress } from '../clients/commerce/types/ShippingData'\nimport { createNewAddress } from '../utils/createNewAddress'\nimport { getAddressOrderForm } from '../utils/getAddressOrderForm'\nimport { shouldUpdateShippingData } from '../utils/shouldUpdateShippingData'\nimport { parseJwt } from '../utils/cookies'\nimport type { SessionJwt } from '../clients/commerce/types/Session'\n\ntype Indexed<T> = T & { index?: number }\n\nconst isAttachment = (value: IStorePropertyValue) =>\n value.valueReference === VALUE_REFERENCES.attachment\n\nconst getId = (item: IStoreOffer) =>\n [\n item.itemOffered.sku,\n item.seller.identifier,\n item.price < 0.01 ? 'Gift' : undefined,\n item.itemOffered.additionalProperty\n ?.filter(isAttachment)\n .map(getPropertyId)\n .join('-'),\n ]\n .filter(Boolean)\n .join('::')\n\nconst orderFormItemToOffer = (\n item: OrderFormItem,\n index?: number\n): Indexed<IStoreOffer> => ({\n listPrice: item.listPrice / 100,\n price: item.sellingPrice / 100,\n quantity: item.quantity,\n seller: { identifier: item.seller },\n itemOffered: {\n sku: item.id,\n image: [],\n name: item.name,\n additionalProperty: item.attachments.map(attachmentToPropertyValue),\n },\n index,\n})\n\nconst offerToOrderItemInput = (\n offer: Indexed<IStoreOffer>\n): OrderFormInputItem => ({\n quantity: offer.quantity,\n seller: offer.seller.identifier,\n id: offer.itemOffered.sku,\n index: offer.index,\n attachments: (\n offer.itemOffered.additionalProperty?.filter(isAttachment) ?? []\n ).map((attachment) => ({\n name: attachment.name,\n content: attachment.value,\n })),\n ...(offer.priceToken ? { priceToken: offer.priceToken } : {}),\n})\n\nconst groupById = (offers: IStoreOffer[]): Map<string, IStoreOffer[]> =>\n offers.reduce((acc, item) => {\n const id = getId(item)\n\n if (!acc.has(id)) {\n acc.set(id, [])\n }\n\n acc.get(id)?.push(item)\n\n return acc\n }, new Map<string, IStoreOffer[]>())\n\nconst equals = (storeOrder: IStoreOrder, orderForm: OrderForm) => {\n // Omit priceToken: it exists on the browser payload but not on orderForm items.\n const pick = (\n { priceToken: _, ...item }: Indexed<IStoreOffer>,\n index: number\n ) => ({\n ...item,\n itemOffered: {\n sku: item.itemOffered.sku,\n },\n index,\n })\n\n const orderFormItems = orderForm.items.map(orderFormItemToOffer).map(pick)\n const storeOrderItems = storeOrder.acceptedOffer.map(pick)\n\n const isSameOrder = storeOrder.orderNumber === orderForm.orderFormId\n const orderItemsAreSync = deepEquals(orderFormItems, storeOrderItems)\n\n return isSameOrder && orderItemsAreSync\n}\n\nfunction hasChildItem(items: OrderFormItem[], itemId: string) {\n return items?.some(\n (item) =>\n item.parentItemIndex !== null &&\n item.parentItemIndex !== undefined &&\n items[item.parentItemIndex]?.id === itemId\n )\n}\n\nfunction hasParentItem(items: OrderFormItem[], itemId: string) {\n return items?.some(\n (item) => item.id === itemId && item.parentItemIndex !== null\n )\n}\n\nconst joinItems = (form: OrderForm) => {\n const itemsById = form.items.reduce(\n (acc, item, idx) => {\n const id =\n hasParentItem(form.items, item.id) || hasChildItem(form.items, item.id)\n ? `${getId(orderFormItemToOffer(item))}::${idx}`\n : getId(orderFormItemToOffer(item))\n\n if (!acc[id]) {\n acc[id] = []\n }\n\n acc[id].push(item)\n\n return acc\n },\n {} as Record<string, OrderFormItem[]>\n )\n\n return {\n ...form,\n items: Object.values(itemsById).map((items) => {\n const [item] = items\n const quantity = items.reduce((acc, i) => acc + i.quantity, 0)\n const totalPrice = items.reduce(\n (acc, i) =>\n acc +\n (i?.priceDefinition?.total ??\n (i?.quantity ?? 0) * (i?.sellingPrice ?? 0)),\n 0\n )\n\n return {\n ...item,\n quantity,\n sellingPrice: totalPrice / quantity,\n }\n }),\n }\n}\n\nconst orderFormToCart = async (\n form: OrderForm,\n skuLoader: GraphqlContext['loaders']['skuLoader'],\n shouldSplitItem?: boolean | null,\n adoptedSalesChannel?: string | null\n) => {\n return {\n order: {\n orderNumber: form.orderFormId,\n acceptedOffer: form.items.map(async (item) => ({\n ...item,\n product: await skuLoader.load(`${item.id}-invisibleItems`),\n })),\n shouldSplitItem,\n ...(adoptedSalesChannel ? { salesChannel: adoptedSalesChannel } : {}),\n },\n messages: form.messages.map(({ text, status }) => ({\n text,\n status: status.toUpperCase(),\n })),\n }\n}\n\nconst getOrderFormEtag = ({ items }: OrderForm, sessionJwt: SessionJwt) => {\n // Only include critical item properties in etag to avoid false positives\n // when prices or availability change due to regionalization\n\n // Include:\n // - id (SKU): to detect item additions/removals\n // - quantity: to detect quantity changes\n // - seller: to detect seller changes\n // - attachments: to detect customizations/personalizations changes\n const criticalItems = items.map((item) => ({\n id: item.id,\n quantity: item.quantity,\n seller: item.seller,\n attachments: item.attachments, // customizations\n }))\n\n return md5(\n JSON.stringify({ sessionId: sessionJwt?.id ?? '', items: criticalItems })\n )\n}\n\nconst setOrderFormEtag = async (\n form: OrderForm,\n commerce: GraphqlContext['clients']['commerce'],\n sessionJwt: SessionJwt\n) => {\n try {\n const orderForm = await commerce.checkout.setCustomData({\n id: form.orderFormId,\n appId: 'faststore',\n key: 'cartEtag',\n value: getOrderFormEtag(form, sessionJwt),\n })\n\n return orderForm\n } catch (err) {\n console.error(\n 'Error while setting custom data to orderForm.\\n Make sure to add the following custom app to the orderForm: \\n{\"fields\":[\"cartEtag\"],\"id\":\"faststore\",\"major\":1}.\\n More info at: https://developers.vtex.com/vtex-rest-api/docs/customizable-fields-with-checkout-api'\n )\n\n throw err\n }\n}\n\n/**\n * Checks if cartEtag stored on customData is up to date\n * @description If cartEtag is not up to date, this means that\n * another system changed the cart, like Checkout UI or Order Placed\n * or another device which has the same cart open with FastStore\n */\nconst isOrderFormStale = (form: OrderForm, sessionJwt: SessionJwt) => {\n const faststoreData = form.customData?.customApps.find(\n (app) => app.id === 'faststore'\n )\n\n const oldEtag = faststoreData?.fields?.cartEtag\n\n if (oldEtag == null) {\n return true\n }\n\n const newEtag = getOrderFormEtag(form, sessionJwt)\n\n return newEtag !== oldEtag\n}\n\nconst clearOrderFormMessages = async (\n id: string,\n { clients: { commerce } }: GraphqlContext\n) => {\n return commerce.checkout.clearOrderFormMessages({\n id,\n })\n}\n\nconst updateOrderFormShippingData = async (\n orderForm: OrderForm,\n session: Maybe<IStoreSession> | undefined,\n { clients: { commerce } }: GraphqlContext\n) => {\n // Stores that are not yet providing the session while validating the cart\n // should not be able to update the shipping data\n //\n // This was causing errors while validating regionalizated carts\n // because the following code was trying to change the shippingData to an undefined address/session\n\n if (!session) {\n return orderForm\n }\n\n const { updateShipping, addressChanged } = shouldUpdateShippingData(\n orderForm,\n session\n )\n\n if (updateShipping) {\n // Check if the orderForm address matches the one from the session\n const oldAddress = getAddressOrderForm(orderForm, session, addressChanged)\n\n const address = oldAddress ? oldAddress : createNewAddress(session)\n\n const selectedAddresses = address as SelectedAddress[]\n\n const hasDeliveryWindow = session.deliveryMode?.deliveryWindow\n ? true\n : false\n\n if (hasDeliveryWindow) {\n // if you have a Delivery Window you have to first get the delivery window to set the desired after\n await commerce.checkout.shippingData(\n {\n id: orderForm.orderFormId,\n index: orderForm.items.length,\n deliveryMode: session.deliveryMode,\n selectedAddresses: selectedAddresses,\n },\n false\n )\n }\n\n return commerce.checkout.shippingData(\n {\n id: orderForm.orderFormId,\n index: orderForm.items.length,\n deliveryMode: session.deliveryMode,\n selectedAddresses: selectedAddresses,\n },\n true\n )\n }\n return orderForm\n}\n\nconst getCookieCheckoutOrderNumber = (ctx: string, nameCookie: string) => {\n if (!ctx) {\n return ''\n }\n\n const cookies = parse(ctx)\n const cookieValue = cookies[nameCookie]\n return cookieValue ? cookieValue.split('=')[1] : ''\n}\n\n/** Keep Checkout on the orderForm SC when the browser session lags behind it. */\nconst adoptOrderFormSalesChannelWhenSessionDiverges = (\n ctx: GraphqlContext,\n orderForm: OrderForm\n): string | null => {\n const adoptedChannel = channelWhenSessionDivergesFromOrderForm(\n ctx.storage.channel,\n orderForm.salesChannel\n )\n\n if (adoptedChannel) {\n mutateChannelContext(ctx, adoptedChannel)\n return orderForm.salesChannel ? String(orderForm.salesChannel) : null\n }\n\n return null\n}\n\n/** Return a cart only when an SC was adopted (so the client can sync session). */\nconst cartWhenSalesChannelAdoptedOrNull = (\n form: OrderForm,\n skuLoader: GraphqlContext['loaders']['skuLoader'],\n shouldSplitItem: boolean | null | undefined,\n adoptedSalesChannel: string | null\n) => {\n if (!adoptedSalesChannel) {\n return null\n }\n\n return orderFormToCart(form, skuLoader, shouldSplitItem, adoptedSalesChannel)\n}\n\n/**\n * This resolver implements the optimistic cart behavior. The main idea in here\n * is that we receive a cart from the UI (as query params) and we validate it with\n * the commerce platform. If the cart is valid, we return null, if the cart is\n * invalid according to the commerce platform, we return the new cart the UI should use\n * instead.\n *\n * The algorithm is something like:\n * 1. Fetch orderForm from VTEX\n * 2. Compute delta changes between the orderForm and the UI's cart\n * 3. Update the orderForm in VTEX platform accordingly\n * 4. If any changes were made, send to the UI the new cart. Null otherwise\n */\nexport const validateCart = async (\n _: unknown,\n { cart: { order }, session }: MutationValidateCartArgs,\n ctx: GraphqlContext\n) => {\n const orderFormIdFromCookie = getCookieCheckoutOrderNumber(\n ctx.headers.cookie,\n 'checkout.vtex.com'\n )\n const {\n clients: { commerce },\n loaders: { skuLoader },\n } = ctx\n\n const channel = session?.channel\n const locale = session?.locale\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n // Step1: Get OrderForm from VTEX Commerce.\n // For existing carts (`orderFormId` present), omit `sc` on the first GET so\n // Checkout keeps the orderForm's current sales channel. Passing a stale\n // session SC (e.g. after Quick Order) would recalculate the cart and drop\n // items only available in the orderForm's trade policy. New carts still\n // send `sc` from the session (see commerce.checkout.orderForm).\n const orderFormId = orderFormIdFromCookie || undefined\n const orderForm = await commerce.checkout.orderForm({\n id: orderFormId,\n channel: ctx.storage.channel,\n preserveSalesChannel: Boolean(orderFormId),\n })\n const orderNumber = orderForm.orderFormId\n\n // Clear messages so it doesn't keep populating toasts on a loop\n // In the next validateCart mutation it will only have messages if a new message is created on orderForm\n if (orderForm.messages.length !== 0) {\n await clearOrderFormMessages(orderNumber, ctx)\n }\n\n const sessionCookie = parse(ctx?.headers?.cookie ?? '')?.vtex_session\n const sessionJwt = parseJwt(sessionCookie)\n\n const { acceptedOffer, shouldSplitItem } = order\n\n // Step1.5: Check if another system changed the orderForm with this orderNumber\n // If so, this means the user interacted with this cart elsewhere and expects\n // to see this new cart state instead of what's stored on the user's browser.\n const isStale = isOrderFormStale(orderForm, sessionJwt)\n\n if (isStale) {\n // Adopt the orderForm SC so subsequent checkout calls (etag, etc.) stay\n // on the trade policy that actually owns the items.\n const adoptedSalesChannel = adoptOrderFormSalesChannelWhenSessionDiverges(\n ctx,\n orderForm\n )\n\n const newOrderForm = await setOrderFormEtag(\n orderForm,\n commerce,\n sessionJwt\n ).then(joinItems)\n if (orderNumber) {\n return orderFormToCart(\n newOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n }\n\n // Keep Checkout on the orderForm trade policy when the browser session still\n // has a stale SC (Quick Order). Refetching with `sc=session` would wipe\n // items that exist only on the orderForm's sales channel.\n const adoptedSalesChannel = adoptOrderFormSalesChannelWhenSessionDiverges(\n ctx,\n orderForm\n )\n\n // Step2: Process items from both browser and checkout so they have the same shape\n const browserItemsById = groupById(acceptedOffer)\n const originItemsById = groupById(orderForm.items.map(orderFormItemToOffer))\n const originItems = Array.from(originItemsById.entries()) // items on the VTEX platform backend\n const browserItems = Array.from(browserItemsById.entries()) // items on the user's browser\n\n // Step3: Compute delta changes\n const { itemsToAdd, itemsToUpdate } = browserItems.reduce(\n (acc, [id, items]) => {\n const maybeOriginItem = originItemsById.get(id)\n\n // Adding new items to cart\n if (!maybeOriginItem) {\n items.forEach((item) => acc.itemsToAdd.push(item))\n\n return acc\n }\n\n // Update existing items\n const [head, ...tail] = maybeOriginItem\n\n if (\n hasParentItem(orderForm.items, head.itemOffered.sku) ||\n hasChildItem(orderForm.items, head.itemOffered.sku)\n ) {\n acc.itemsToUpdate.push(head)\n\n return acc\n }\n\n const totalQuantity = items.reduce((acc, curr) => acc + curr.quantity, 0)\n\n // set total quantity to first item\n acc.itemsToUpdate.push({\n ...head,\n quantity: totalQuantity,\n })\n\n // Remove all the rest\n tail.forEach((item) => acc.itemsToUpdate.push({ ...item, quantity: 0 }))\n\n return acc\n },\n {\n itemsToAdd: [] as IStoreOffer[],\n itemsToUpdate: [] as IStoreOffer[],\n }\n )\n\n const itemsToDelete = originItems\n .filter(([id]) => !browserItemsById.has(id))\n .flatMap(([, items]) => items.map((item) => ({ ...item, quantity: 0 })))\n\n const changes = [...itemsToAdd, ...itemsToUpdate, ...itemsToDelete].map(\n offerToOrderItemInput\n )\n\n // Check if shippingData needs to be updated\n const { updateShipping } = session\n ? shouldUpdateShippingData(orderForm, session)\n : { updateShipping: false }\n\n // If there are no item/shipping changes: still return the cart when we\n // adopted the orderForm SC so the client can align `fs::session`.\n if (changes.length === 0 && !updateShipping) {\n return cartWhenSalesChannelAdoptedOrNull(\n orderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n\n // Step4: Apply delta changes to order form\n let updatedOrderForm: OrderForm\n\n if (changes.length > 0) {\n // Update items first if there are changes\n updatedOrderForm = await commerce.checkout\n .updateOrderFormItems({\n id: orderForm.orderFormId,\n orderItems: changes,\n shouldSplitItem,\n })\n .then((form: OrderForm) =>\n updateOrderFormShippingData(form, session, ctx)\n )\n } else {\n // Only update shippingData if there are no item changes\n updatedOrderForm = await updateOrderFormShippingData(\n orderForm,\n session,\n ctx\n )\n }\n\n // Continue with marketingData, clientPreferencesData (locale), and etag updates.\n updatedOrderForm = await Promise.resolve(updatedOrderForm)\n // update marketingData\n .then((form: OrderForm) => {\n if (session?.marketingData) {\n const updatedMarketingData = {\n ...form.marketingData,\n ...session.marketingData,\n }\n\n return commerce.checkout.marketingData({\n id: orderForm.orderFormId,\n marketingData: updatedMarketingData,\n })\n }\n\n return form\n })\n\n // update session locale to orderForm clientPreferencesData when there are changes (same pattern as storePreferencesData)\n .then((form: OrderForm) => {\n if (locale && form.clientPreferencesData?.locale !== locale) {\n return commerce.checkout.clientPreferencesData({\n id: form.orderFormId,\n clientPreferencesData: {\n ...form.clientPreferencesData,\n locale,\n },\n })\n }\n return form\n })\n // update orderForm etag so we know last time we touched this orderForm\n .then((form: OrderForm) => setOrderFormEtag(form, commerce, sessionJwt))\n .then(joinItems)\n\n const equalMessages = deepEquals(\n orderForm.messages,\n updatedOrderForm.messages\n )\n\n // Step5: If no changes detected before/after updating orderForm, the order is validated\n if (equals(order, updatedOrderForm) && equalMessages) {\n return cartWhenSalesChannelAdoptedOrNull(\n updatedOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n\n // Step6: There were changes, convert orderForm to StoreCart\n return orderFormToCart(\n updatedOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n}\n","import type { Channel } from './channel'\nimport ChannelMarshal from './channel'\n\n/**\n * Builds the session `channel` string after Session Manager responds.\n *\n * When the client already pinned an explicit SC (e.g. adopted from the\n * orderForm after Quick Order), keep it. Session Manager often still reports\n * the default SC and would otherwise overwrite the adoption.\n */\nexport function channelAfterSessionManager(\n channel: Required<Channel>,\n storeChannelValue: string | null | undefined,\n regionId: string | null | undefined,\n sellerId: string | undefined\n): string {\n const hasExplicitSalesChannel = channel.hasOnlyDefaultSalesChannel === false\n\n const storeSalesChannel = storeChannelValue ?? undefined\n const resolvedRegionId = regionId ?? channel.regionId\n\n return ChannelMarshal.stringify({\n salesChannel: hasExplicitSalesChannel\n ? channel.salesChannel || storeSalesChannel\n : (storeSalesChannel ?? channel.salesChannel),\n regionId: resolvedRegionId ?? undefined,\n seller: sellerId,\n hasOnlyDefaultSalesChannel: hasExplicitSalesChannel\n ? false\n : !storeSalesChannel,\n })\n}\n","import type { ContractResponse } from '../clients/commerce/Contract'\nimport type {\n SessionAvailableContract,\n Shopper,\n} from '../clients/commerce/types/Session'\n\ntype ProfileNameFields = {\n firstName?: { value?: string | null } | null\n lastName?: { value?: string | null } | null\n} | null\n\n/**\n * Display name from Master Data, aligned with buyer-portal `personalDataToContract`.\n */\nexport const resolveContractDisplayNameFromMd = (\n contract: ContractResponse | null | undefined\n): string => {\n const corporateName = (contract?.corporateName ?? '').trim()\n\n if (corporateName) {\n return corporateName\n }\n\n return (contract?.firstName ?? '').trim()\n}\n\nconst isSessionAvailableContract = (\n value: unknown\n): value is SessionAvailableContract => {\n if (!value || typeof value !== 'object') {\n return false\n }\n\n const contract = value as Record<string, unknown>\n\n return (\n typeof contract.customerId === 'string' &&\n contract.customerId.trim() !== '' &&\n typeof contract.contractName === 'string' &&\n typeof contract.isActive === 'boolean' &&\n typeof contract.isCurrent === 'boolean'\n )\n}\n\n/**\n * Parses VTEX session `shopper.availableContracts` into a typed list.\n */\nexport const parseSessionAvailableContracts = (\n shopper: Shopper | null | undefined\n): SessionAvailableContract[] => {\n const raw = shopper?.availableContracts?.value\n\n if (!Array.isArray(raw)) {\n return []\n }\n\n return raw.filter(isSessionAvailableContract)\n}\n\n/**\n * Whether a session contract is eligible for the switcher list.\n */\nexport const isSwitchableSessionContract = (\n contract: SessionAvailableContract | null | undefined\n): boolean => {\n if (!contract?.customerId) {\n return false\n }\n\n const name = (contract.contractName ?? '').trim()\n\n return Boolean(name && contract.isActive)\n}\n\n/**\n * Resolves the active contract id from VTEX session namespaces.\n */\nexport const resolveActiveContractIdFromSession = (\n sessionData: {\n namespaces?: {\n shopper?: Shopper | null\n authentication?: { customerId?: { value?: string | null } | null } | null\n profile?: { id?: { value?: string | null } | null } | null\n } | null\n } | null\n): string => {\n return (\n sessionData?.namespaces?.shopper?.activeContractId?.value?.trim() ??\n sessionData?.namespaces?.authentication?.customerId?.value?.trim() ??\n sessionData?.namespaces?.profile?.id?.value?.trim() ??\n ''\n )\n}\n\n/**\n * Maps session contracts to GraphQL `StoreContract` entries.\n */\nexport const mapSessionContractsToStoreContracts = (\n contracts: SessionAvailableContract[],\n activeContractId = ''\n): Array<{ id: string; corporateName: string; isActive: boolean }> => {\n const normalizedActiveId = activeContractId.trim()\n\n return contracts.filter(isSwitchableSessionContract).map((contract) => ({\n id: contract.customerId,\n corporateName: contract.contractName.trim(),\n isActive: normalizedActiveId\n ? contract.customerId === normalizedActiveId\n : contract.isCurrent,\n }))\n}\n\n/**\n * Whether a CL record is eligible for contract switcher summaries (attached list).\n */\nexport const isSwitchableContractSummary = (\n contract: ContractResponse | null | undefined\n): boolean => {\n if (!contract) {\n return false\n }\n\n const name = resolveContractDisplayNameFromMd(contract)\n const email = (contract.email ?? '').trim()\n\n return Boolean(name && email)\n}\n\n/**\n * Resolves the active contract name: Master Data first, then VTEX session profile.\n * Matches `accountProfile` / buyer-portal behavior when CL lookup fails.\n */\nexport const resolveActiveContractDisplayName = (\n contract: ContractResponse | null | undefined,\n profile: ProfileNameFields\n): string => {\n const fromMasterData = resolveContractDisplayNameFromMd(contract)\n\n if (fromMasterData) {\n return fromMasterData\n }\n\n return (profile?.firstName?.value ?? '').trim()\n}\n","import type { GraphqlContext } from '..'\nimport type {\n StoreMarketingData,\n StoreSession,\n} from '../../../__generated__/schema'\nimport type { Channel } from './channel'\nimport { resolveActiveContractDisplayName } from './contract'\nimport { getAuthCookie, parseJwt } from './cookies'\n\nexport async function getPreciseLocationData(\n clients: GraphqlContext['clients'],\n country: string,\n postalCode: string\n) {\n try {\n const address = await clients.commerce.checkout.address({\n postalCode,\n country,\n })\n\n const geoCoordinates = address.geoCoordinates\n ? {\n latitude: address.geoCoordinates[1],\n longitude: address.geoCoordinates[0],\n }\n : null\n\n return { city: address.city, geoCoordinates }\n } catch (err) {\n console.error(\n `Error while getting geo coordinates for the current postal code (${postalCode}) and country (${country}).\\n`\n )\n\n throw err\n }\n}\n\nexport function buildSessionSearchParams(\n search: string,\n channel: Required<Channel>,\n postalCode: string,\n country: string,\n geoCoordinates: StoreSession['geoCoordinates'],\n locale: string\n) {\n const params = new URLSearchParams(search)\n\n // Remove facets so they do not interfere with session data / vtex_segment\n if (params.has('facets')) {\n params.delete('facets')\n }\n\n params.set('sc', params.get('sc') ?? channel.salesChannel)\n\n if (postalCode) {\n params.set('postalCode', postalCode)\n }\n\n if (country) {\n params.set('country', country)\n }\n\n if (geoCoordinates) {\n params.set(\n 'geoCoordinates',\n `${geoCoordinates.longitude},${geoCoordinates.latitude}` // long,lat is the format expected\n )\n }\n\n // Sending the locale to the session, the store-session app will update cultureInfo\n params.set('locale', locale)\n\n return params\n}\n\nexport function buildMarketingData(\n params: URLSearchParams,\n oldMarketingData: StoreSession['marketingData']\n): StoreMarketingData {\n return {\n utmCampaign:\n params.get('utm_campaign') ?? oldMarketingData?.utmCampaign ?? '',\n utmMedium: params.get('utm_medium') ?? oldMarketingData?.utmMedium ?? '',\n utmSource: params.get('utm_source') ?? oldMarketingData?.utmSource ?? '',\n utmiCampaign: params.get('utmi_cp') ?? oldMarketingData?.utmiCampaign ?? '',\n utmiPage: params.get('utmi_p') ?? oldMarketingData?.utmiPage ?? '',\n utmiPart: params.get('utmi_pc') ?? oldMarketingData?.utmiPart ?? '',\n }\n}\n\nexport async function resolveJwtClaims(\n clients: GraphqlContext['clients'],\n cookie: string | undefined,\n account: string\n) {\n const jwt = parseJwt(getAuthCookie(cookie ?? '', account))\n let isValidJwt = false\n\n if (jwt) {\n try {\n const vtexIdResponse = await clients.commerce.vtexid.validate()\n isValidJwt = vtexIdResponse?.authStatus?.toLowerCase() === 'success'\n } catch (error) {\n console.warn('JWT validation failed:', error)\n isValidJwt = false\n }\n }\n\n return {\n isRepresentative: isValidJwt ? Boolean(jwt?.isRepresentative) : false,\n customerId: isValidJwt ? jwt?.customerId : undefined,\n unitId: isValidJwt ? jwt?.unitId : undefined,\n }\n}\n\nexport async function resolveSellerInRegion(\n clients: GraphqlContext['clients'],\n channel: Required<Channel>,\n postalCode: string,\n geoCoordinates: StoreSession['geoCoordinates'],\n country: string,\n salesChannel: string\n) {\n if (!channel.seller || !(postalCode || geoCoordinates)) {\n return undefined\n }\n\n const regionData = await clients.commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n\n return region?.sellers.find((seller) => channel.seller === seller.id)?.id\n}\n\nfunction shopperString(value: { value?: unknown } | null | undefined): string {\n return typeof value?.value === 'string' ? value.value : ''\n}\n\nexport function buildB2bSession(args: {\n isRepresentative: boolean\n authentication: {\n customerId?: { value?: string | null } | null\n unitName?: { value?: string | null } | null\n unitId?: { value?: string | null } | null\n storeUserEmail?: { value?: string | null } | null\n } | null\n shopper: {\n firstName?: { value?: unknown } | null\n lastName?: { value?: unknown } | null\n organizationManager?: { value?: boolean | null } | null\n } | null\n publicData: { postalCode?: { value?: string | null } | null } | null\n profile: Parameters<typeof resolveActiveContractDisplayName>[1]\n contract: Parameters<typeof resolveActiveContractDisplayName>[0]\n customerId?: string\n unitId?: string\n}) {\n if (!args.isRepresentative) {\n return null\n }\n\n const firstName = shopperString(args.shopper?.firstName)\n const lastName = shopperString(args.shopper?.lastName)\n\n return {\n isRepresentative: true,\n customerId: args.authentication?.customerId?.value ?? args.customerId ?? '',\n unitName: args.authentication?.unitName?.value ?? '',\n unitId: args.authentication?.unitId?.value ?? args.unitId ?? '',\n firstName,\n lastName,\n userName: `${firstName} ${lastName}`.trim(),\n userEmail: args.authentication?.storeUserEmail?.value ?? '',\n savedPostalCode: args.publicData?.postalCode?.value ?? '',\n contractName: resolveActiveContractDisplayName(args.contract, args.profile),\n organizationManager: args.shopper?.organizationManager?.value ?? false,\n }\n}\n\nexport function buildPersonFromProfile(\n profile: {\n id?: { value?: string | null } | null\n email?: { value?: string | null } | null\n firstName?: { value?: string | null } | null\n lastName?: { value?: string | null } | null\n } | null\n) {\n if (!profile?.id) {\n return null\n }\n\n return {\n id: profile.id?.value ?? '',\n email: profile.email?.value ?? '',\n givenName: profile.firstName?.value ?? '',\n familyName: profile.lastName?.value ?? '',\n }\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport type { GraphqlContext } from '..'\nimport type {\n MutationValidateSessionArgs,\n StoreSession,\n} from '../../../__generated__/schema'\nimport ChannelMarshal from '../utils/channel'\nimport { channelAfterSessionManager } from '../utils/sessionChannel'\nimport {\n buildB2bSession,\n buildMarketingData,\n buildPersonFromProfile,\n buildSessionSearchParams,\n getPreciseLocationData,\n resolveJwtClaims,\n resolveSellerInRegion,\n} from '../utils/validateSessionHelpers'\n\ntype SessionStoreNamespace = {\n channel?: { value?: string | null } | null\n currencyCode?: { value?: string | null } | null\n currencySymbol?: { value?: string | null } | null\n countryCode?: { value?: string | null } | null\n}\n\ntype SessionCheckoutNamespace = {\n regionId?: { value?: string | null } | null\n}\n\nexport const validateSession = async (\n _: any,\n { session: oldSession, search }: MutationValidateSessionArgs,\n { clients, headers, account }: GraphqlContext\n): Promise<StoreSession | null> => {\n const channel = ChannelMarshal.parse(oldSession.channel ?? '')\n const postalCode = String(oldSession.postalCode ?? '')\n const country = oldSession.country ?? ''\n let city = oldSession.city ?? null\n let geoCoordinates = oldSession.geoCoordinates ?? null\n\n const shouldGetPreciseLocation = !city || !geoCoordinates\n if (shouldGetPreciseLocation && postalCode !== '' && country !== '') {\n const preciseLocation = await getPreciseLocationData(\n clients,\n country,\n postalCode\n )\n city = preciseLocation.city\n geoCoordinates = preciseLocation.geoCoordinates\n }\n\n /**\n * The Session Manager API (https://developers.vtex.com/docs/api-reference/session-manager-api#patch-/api/sessions) adds the query params to the session public namespace.\n * This is used by Checkout (checkout-session) and Intelligent Search (search-session)\n */\n const params = buildSessionSearchParams(\n search,\n channel,\n postalCode,\n country,\n geoCoordinates,\n oldSession.locale\n )\n const marketingData = buildMarketingData(params, oldSession.marketingData)\n const { isRepresentative, customerId, unitId } = await resolveJwtClaims(\n clients,\n headers?.cookie,\n account\n )\n\n const sessionData = await clients.commerce\n .session(params.toString())\n .catch(() => null)\n\n const profile = sessionData?.namespaces.profile ?? null\n const shopper = sessionData?.namespaces.shopper ?? null\n const store = (sessionData?.namespaces.store ??\n null) as SessionStoreNamespace | null\n const authentication = sessionData?.namespaces.authentication ?? null\n const checkout = (sessionData?.namespaces.checkout ??\n null) as SessionCheckoutNamespace | null\n const publicData = sessionData?.namespaces.public ?? null\n\n let contract = null\n if (isRepresentative && profile?.id?.value) {\n try {\n contract = await clients.commerce.masterData.getContractById({\n contractId: profile.id.value,\n })\n } catch {\n console.error(\n `Error while getting contract data for profile ID (${profile.id.value}).\\n`\n )\n }\n }\n\n const sellerId = await resolveSellerInRegion(\n clients,\n channel,\n postalCode,\n geoCoordinates,\n country,\n params.get('sc') ?? channel.salesChannel\n )\n\n const newSession = {\n ...oldSession,\n currency: {\n code: store?.currencyCode?.value ?? oldSession.currency.code,\n symbol: store?.currencySymbol?.value ?? oldSession.currency.symbol,\n },\n country: store?.countryCode?.value ?? country,\n channel: channelAfterSessionManager(\n channel,\n store?.channel?.value,\n checkout?.regionId?.value,\n sellerId\n ),\n /**\n * B2B data structure in Session:\n * - Logged user data (shopper): `shopper` namespace\n * - Unit data: `authentication` namespace\n * - Contract data: `profile` namespace (those info will be available inside Faststore's Session `person` object)\n */\n b2b: buildB2bSession({\n isRepresentative,\n authentication,\n shopper,\n publicData,\n profile,\n contract,\n customerId,\n unitId,\n }),\n marketingData,\n person: buildPersonFromProfile(profile),\n geoCoordinates:\n (geoCoordinates?.latitude &&\n geoCoordinates?.longitude &&\n geoCoordinates) ||\n null,\n city,\n }\n\n if (deepEquals(oldSession, newSession)) {\n return null\n }\n\n return newSession\n}\n","import { cancelOrder } from './cancelOrder'\nimport { processOrderAuthorization } from './processOrderAuthorization'\nimport { startOrderEntryOperation } from './startOrderEntryOperation'\nimport { startRecommendationSession } from './startRecommendationSession'\nimport { subscribeToNewsletter } from './subscribeToNewsletter'\nimport { uploadFileToOrderEntry } from './uploadFileToOrderEntry'\nimport { validateCart } from './validateCart'\nimport { validateSession } from './validateSession'\n\nexport const Mutation = {\n validateCart,\n validateSession,\n subscribeToNewsletter,\n cancelOrder,\n processOrderAuthorization,\n uploadFileToOrderEntry,\n startOrderEntryOperation,\n startRecommendationSession,\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","import type { GraphQLScalarSerializer } from 'graphql'\nimport { GraphQLScalarType, type GraphQLScalarValueParser } from 'graphql'\nimport { Kind } from 'graphql/language'\n\nconst toObjectOrString: GraphQLScalarValueParser<any> = (value) => {\n if (typeof value === 'string') {\n return getValueAsObjectOrString(value)\n }\n\n return null\n}\n\nfunction getValueAsObjectOrString(value: string) {\n try {\n return JSON.parse(value)\n } catch (e) {\n return value\n }\n}\n\nconst stringify: GraphQLScalarSerializer<string | null> = (value) => {\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n if (typeof value === 'string') {\n return value\n }\n\n return null\n}\n\nexport const ObjectOrString = new GraphQLScalarType({\n name: 'ObjectOrString',\n description:\n 'A string or the string representation of an object (a stringified object).',\n parseValue: toObjectOrString,\n serialize: stringify,\n parseLiteral(ast) {\n if (ast.kind === Kind.STRING) {\n return getValueAsObjectOrString(ast.value)\n }\n\n return null\n },\n})\n","import type { GraphqlResolver } from '..'\nimport type { ArrayElementType } from '../../../typings/globals'\nimport type { OrderFormItem } from '../clients/commerce/types/OrderForm'\nimport type { EnhancedSku } from '../utils/enhanceSku'\nimport {\n availability,\n inStock,\n inStockOrderFormItem,\n price,\n sellingPrice,\n} from '../utils/productStock'\nimport { withTax } from '../utils/taxes'\nimport type { StoreAggregateOffer } from './aggregateOffer'\n\ntype OrderFormProduct = OrderFormItem & { product: EnhancedSku }\ntype SearchProduct = ArrayElementType<\n ReturnType<typeof StoreAggregateOffer.offers>\n>\nexport type Root = SearchProduct | OrderFormProduct\n\nconst isSearchItem = (item: Root): item is SearchProduct =>\n 'Price' in item && 'seller' in item && 'product' in item\n\nconst isOrderFormItem = (item: Root): item is OrderFormProduct =>\n 'skuName' in item\n\nexport const StoreOffer: Record<string, GraphqlResolver<Root>> = {\n priceCurrency: async (_, __, ctx) => {\n const {\n loaders: { salesChannelLoader },\n storage: { channel },\n } = ctx\n\n const sc = await salesChannelLoader.load(channel.salesChannel)\n\n return sc.CurrencyCode ?? ''\n },\n priceValidUntil: (root) => {\n if (isSearchItem(root)) {\n return root.PriceValidUntil ?? ''\n }\n\n if (isOrderFormItem(root)) {\n return root.priceValidUntil ?? ''\n }\n\n return null\n },\n itemCondition: () => 'https://schema.org/NewCondition',\n availability: async (root) => {\n if (isSearchItem(root)) {\n return availability(inStock(root))\n }\n\n if (isOrderFormItem(root)) {\n return availability(inStockOrderFormItem(root.availability))\n }\n\n return null\n },\n seller: (root, _, ctx) => {\n if (isSearchItem(root)) {\n return {\n identifier: ctx.storage.channel?.seller || root.seller.sellerId || '',\n }\n }\n\n if (isOrderFormItem(root)) {\n return {\n identifier: root.seller,\n }\n }\n\n return null\n },\n price: (root) => {\n if (isSearchItem(root)) {\n return price(root)\n }\n\n if (isOrderFormItem(root)) {\n return root.sellingPrice / 1e2\n }\n\n return null\n },\n priceWithTaxes: (root) => {\n if (isSearchItem(root)) {\n return withTax(price(root), root?.Tax, root.product.unitMultiplier)\n }\n\n if (isOrderFormItem(root)) {\n return withTax(\n root.sellingPrice / 1e2,\n root.tax / 1e2,\n root.unitMultiplier\n )\n }\n\n return null\n },\n sellingPrice: (root) => {\n if (isSearchItem(root)) {\n return sellingPrice(root)\n }\n\n if (isOrderFormItem(root)) {\n return root.sellingPrice / 1e2\n }\n\n return null\n },\n listPrice: (root) => {\n if (isSearchItem(root)) {\n return root.ListPrice ?? 0\n }\n\n if (isOrderFormItem(root)) {\n return root.listPrice / 1e2\n }\n\n return null\n },\n listPriceWithTaxes: (root) => {\n if (isSearchItem(root)) {\n return withTax(\n root.ListPrice ?? 0,\n root?.Tax,\n root.product.unitMultiplier\n )\n }\n\n if (isOrderFormItem(root)) {\n return withTax(root.listPrice / 1e2, root.tax / 1e2, root.unitMultiplier)\n }\n\n return null\n },\n itemOffered: (root) => {\n if (isSearchItem(root)) {\n return root.product\n }\n\n if (isOrderFormItem(root)) {\n return {\n ...root.product,\n attachmentsValues: root.attachments,\n }\n }\n\n return null\n },\n quantity: (root) => {\n if (isSearchItem(root)) {\n return root.AvailableQuantity ?? 0\n }\n\n if (isOrderFormItem(root)) {\n return root.quantity\n }\n\n return null\n },\n isGift: (root) => {\n if (isOrderFormItem(root)) {\n return root.isGift ?? false\n }\n\n return null\n },\n priceToken: (root) => {\n if (isSearchItem(root)) {\n return root.PriceToken ?? null\n }\n\n return null\n },\n}\n","import type { Product } from '../clients/search/types/ProductSearchResult'\n\nexport const canonicalFromProduct = ({ linkText }: Product) => `/${linkText}/p`\n","import type { CommertialOffer } from '../clients/search/types/ProductSearchResult'\n\nexport type EnhancedCommercialOffer<S, P> = CommertialOffer & {\n seller: S\n product: P\n}\n\nexport const enhanceCommercialOffer = <S, P>({\n offer,\n seller,\n product,\n}: {\n offer: CommertialOffer\n seller: S\n product: P\n}): EnhancedCommercialOffer<S, P> => ({\n ...offer,\n product,\n seller,\n})\n","/**\n * `StoreProduct.releaseDate` is documented in the schema as ISO 8601, but\n * Intelligent Search delivers whatever the account has stored — epoch\n * milliseconds for some, an ISO string for others. Normalizing here keeps the\n * resolver honest about the contract it advertises.\n */\n\n// Epoch values are disambiguated by magnitude, not digit count: anything at or\n// above this is milliseconds (>= 1973-03-03), anything below is seconds. A\n// millisecond value under the threshold is read as seconds — accepted, since no\n// real catalog carries a release date that early, and a digit-count heuristic\n// leaves a strictly larger hole (9-digit seconds and 12-digit milliseconds both\n// fall through to the string parser, which reads them as a year).\nconst MILLISECONDS_THRESHOLD = 1e11\n\nconst isAllDigits = (value: string) => /^\\d+$/.test(value)\n\n// An ISO date-time with no timezone designator. `new Date()` reads these as\n// host-local time (date-only forms are already read as UTC), which would make\n// the emitted calendar day depend on the build machine's zone.\nconst ISO_DATE_TIME_WITHOUT_ZONE =\n /^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$/\n\nconst toDate = (value: string): Date => {\n if (!isAllDigits(value)) {\n return new Date(\n ISO_DATE_TIME_WITHOUT_ZONE.test(value) ? `${value}Z` : value\n )\n }\n\n const epoch = Number(value)\n\n return new Date(epoch >= MILLISECONDS_THRESHOLD ? epoch : epoch * 1000)\n}\n\n/**\n * Normalizes a release date to an ISO 8601 calendar date (`YYYY-MM-DD`).\n *\n * Accepts epoch milliseconds, epoch seconds, and date strings. Returns an empty\n * string when the input is absent or unparseable — never throws, and never\n * returns `\"Invalid Date\"`.\n *\n * The calendar day is always taken in UTC, so a build produces the same markup\n * on any machine. An input carrying a timezone offset is converted first, which\n * means `2026-03-23T21:00:00-05:00` normalizes to `2026-03-24`. That is\n * deliberate: preserving the source calendar day would make the output depend on\n * the offset embedded in each record. An input with no timezone designator is\n * read as UTC rather than as host-local time, for the same reason.\n */\nexport const normalizeReleaseDate = (\n value: string | number | null | undefined\n): string => {\n if (value === null || value === undefined) {\n return ''\n }\n\n const raw = String(value).trim()\n\n if (raw === '') {\n return ''\n }\n\n const date = toDate(raw)\n\n if (Number.isNaN(date.getTime())) {\n return ''\n }\n\n return date.toISOString().slice(0, 10)\n}\n","import type { GraphqlContext, GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type { StoreImage, StoreProductImageArgs } from '../../..'\nimport type { LocalizedProductEntry } from '../clients/catalog'\nimport type { Attachment } from '../clients/commerce/types/OrderForm'\nimport { canonicalFromProduct } from '../utils/canonical'\nimport type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer'\nimport { enhanceCommercialOffer } from '../utils/enhanceCommercialOffer'\nimport {\n getConfiguredLocales,\n getDefaultLocale,\n isLocalizationEnabled,\n} from '../utils/localization'\nimport { bestOfferFirst } from '../utils/productStock'\nimport {\n attachmentToPropertyValue,\n attributeToPropertyValue,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\nimport { normalizeReleaseDate } from '../utils/releaseDate'\nimport { slugify } from '../utils/slugify'\nimport type { Query } from './query'\n\ntype QueryProduct = PromiseType<ReturnType<typeof Query.product>>\n\nexport type Root = QueryProduct & {\n attachmentsValues?: Attachment[]\n unitMultiplier: number\n}\n\nconst DEFAULT_IMAGE = {\n imageText: 'image',\n imageUrl:\n 'https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg',\n imageLabel: 'label',\n}\n\nconst getSlug = (link: string, id: string) => `${link}-${id}`\nconst getPath = (link: string, id: string) => `/${getSlug(link, id)}/p`\nconst nonEmptyArray = <T>(array: T[] | null | undefined) =>\n Array.isArray(array) && array.length > 0 ? array : null\n\nfunction removeTrailingSlashes(path: string) {\n return path.replace(/^\\/+|\\/+$/g, '')\n}\n\n/**\n * Returns a cached-or-fetched localized product entry from the Catalog Dataplane.\n * The promise is stored in `ctx.storage.productTranslationsCache` so it is shared\n * across the `breadcrumbList`, `otherLocales`, and slug-validation resolvers within\n * the same request.\n *\n * The in-flight promise (not just the resolved value) is cached so concurrent\n * sibling resolvers dedupe to a single Catalog Dataplane request instead of each\n * missing the cache and issuing a duplicate fetch.\n */\nexport async function getLocalizedProductEntry(\n ctx: GraphqlContext,\n productId: string,\n locale: string\n): Promise<LocalizedProductEntry | null> {\n const cacheKey = `${productId}:${locale}`\n ctx.storage.productTranslationsCache ??= new Map()\n const cache = ctx.storage.productTranslationsCache\n\n const cached = cache.get(cacheKey)\n if (cached) return cached\n\n const entry = (async (): Promise<LocalizedProductEntry | null> => {\n try {\n const result = await ctx.clients.catalog.getLocalizedProduct(\n productId,\n locale\n )\n\n return {\n linkId: result.linkId,\n categories: result.categories ?? [],\n availableLinkIds: result.availableLinkIds ?? {},\n }\n } catch (err) {\n // Without this the fallback is silent: the breadcrumb renders the IS\n // category names, always in the default language, and the page can be\n // frozen in that state by `revalidate: false`.\n console.warn(\n `[getLocalizedProductEntry] failed to load product ${productId} for locale ${locale}:`,\n err\n )\n\n return null\n }\n })()\n\n cache.set(cacheKey, entry)\n\n return entry\n}\n\n/**\n * Finds the index of the main category tree that matches the given category ID.\n * This avoids including similar categories in the breadcrumb list.\n * If Intelligent Search starts providing the list without similar categories, we'll have direct access to the main tree\n * and we won't need this logic. Hopefully in the future we can remove this.\n *\n * @param categoriesIds - An array of category IDs representing different category trees.\n * @param categoryId - The category ID to find within the category trees.\n * @returns The index of the main category tree that contains the given category ID.\n * If the category ID is not found, returns 0 - it should always be found, but the fallback was added for safety.\n */\nconst findMainTreeIndex = (categoriesIds: string[], categoryId: string) => {\n const mainTreeIndex = categoriesIds.findIndex((idsTree) => {\n const lastId = removeTrailingSlashes(idsTree).split('/').at(-1)\n return lastId === categoryId\n })\n return mainTreeIndex < 0 ? 0 : mainTreeIndex\n}\n\nexport const StoreProduct: Record<string, GraphqlResolver<Root>> & {\n offers: GraphqlResolver<\n Root,\n any,\n Array<EnhancedCommercialOffer<Root['sellers'][number], Root>>\n >\n\n isVariantOf: GraphqlResolver<Root, any, Root>\n\n image: GraphqlResolver<Root, any, StoreImage[]>\n} = {\n productID: ({ itemId }) => itemId,\n name: ({ isVariantOf, name }) => name ?? isVariantOf.productName,\n slug: ({ isVariantOf: { linkText }, itemId }) => getSlug(linkText, itemId),\n description: ({ isVariantOf: { description } }) => description,\n seo: ({ isVariantOf }) => ({\n title: isVariantOf.productTitle || isVariantOf.productName,\n description: isVariantOf.metaTagDescription || isVariantOf.description,\n canonical: canonicalFromProduct(isVariantOf),\n }),\n brand: ({ isVariantOf: { brand } }) => ({ name: brand }),\n unitMultiplier: ({ unitMultiplier }) => unitMultiplier,\n breadcrumbList: async (root, _args, ctx) => {\n const {\n isVariantOf: {\n categories,\n productName,\n linkText,\n categoryId,\n categoriesIds,\n productId,\n },\n itemId,\n } = root\n\n const mainTreeIndex = findMainTreeIndex(categoriesIds, categoryId)\n const mainTree = categories[mainTreeIndex]\n const splittedCategories = removeTrailingSlashes(mainTree).split('/')\n\n const locale = ctx.storage.locale\n\n if (isLocalizationEnabled(ctx) && locale) {\n const entry = await getLocalizedProductEntry(ctx, productId, locale)\n\n if (entry) {\n // Extract the category IDs that belong to the main tree (same tree chosen from IS above).\n // A product can be registered in multiple trees; Catalog Dataplane returns all of them\n // in categories[], so we filter to only the ones matching this tree's IDs.\n const mainTreeIds = new Set(\n removeTrailingSlashes(categoriesIds[mainTreeIndex])\n .split('/')\n .filter(Boolean)\n )\n\n const localizedCategories = entry.categories\n .filter((category) => mainTreeIds.has(category.id.toString()))\n .sort(\n (a, b) =>\n a.fullPath.split('/').length - b.fullPath.split('/').length\n )\n\n // Length guard: if Catalog Dataplane returns fewer categories than IS expects\n // (e.g. data inconsistency or empty categories), fall through to the IS fallback.\n const hasAllBreadcrumbLevels =\n localizedCategories.length === splittedCategories.length\n if (hasAllBreadcrumbLevels) {\n return {\n itemListElement: [\n // Category items: both name and slug come from Catalog Dataplane, ensuring\n // they are always consistent with each other for the requested locale.\n ...localizedCategories.map((category, index) => ({\n name: category.name,\n item: `/${category.fullPathUriName}/`,\n position: index + 1,\n })),\n {\n name: productName,\n item: getPath(entry.linkId, itemId),\n position: splittedCategories.length + 1,\n },\n ],\n numberOfItems: splittedCategories.length,\n }\n }\n }\n }\n\n // Fallback: localization disabled, Catalog Dataplane unavailable, or category count mismatch.\n // Builds paths by applying slugify() to the IS category names, which mirrors the behaviour\n // of the VTEX Rewriter for default-locale slugs.\n return {\n itemListElement: [\n ...splittedCategories.map((name, index) => {\n const item = `/${splittedCategories\n .slice(0, index + 1)\n .map(slugify)\n .join('/')}/`\n return {\n name,\n item,\n position: index + 1,\n }\n }),\n {\n name: productName,\n item: getPath(linkText, itemId),\n position: splittedCategories.length + 1,\n },\n ],\n numberOfItems: splittedCategories.length,\n }\n },\n image: ({ images }, args) => {\n const resolvedImages = (nonEmptyArray(images) ?? [DEFAULT_IMAGE]).map(\n ({ imageUrl, imageText, imageLabel }) => ({\n alternateName: imageText ?? '',\n url: imageUrl.replace('vteximg.com.br', 'vtexassets.com'),\n keywords: imageLabel,\n })\n )\n\n if (typeof args !== 'object') {\n return resolvedImages\n }\n\n let { context, limit } = args as StoreProductImageArgs\n\n const shouldFilter = context !== 'generic'\n\n // Normalize count to undefined as we want any negative value to always return the full list of images\n limit = limit || -1\n limit = limit <= -1 ? undefined : limit\n\n let filteredImages = shouldFilter\n ? resolvedImages.filter(\n ({ keywords: imageKeywords }) => imageKeywords === context\n )\n : resolvedImages\n\n filteredImages =\n filteredImages.length === 0 ? resolvedImages : filteredImages\n\n return filteredImages.slice(0, limit)\n },\n sku: ({ itemId }) => itemId,\n gtin: ({ ean, referenceId }) => (ean ? ean : (referenceId[0]?.Value ?? '')),\n mpn: ({ isVariantOf: { manufacturerCode } }) => manufacturerCode ?? '',\n review: () => [],\n aggregateRating: () => ({}),\n offers: (root) =>\n root.sellers\n .map((seller) =>\n enhanceCommercialOffer({\n offer: seller.commertialOffer,\n seller,\n product: root,\n })\n )\n .sort(bestOfferFirst),\n isVariantOf: (root) => root,\n additionalProperty: ({\n // Search uses the name variations for specifications\n variations: specifications = [],\n attachmentsValues = [],\n attributes = [],\n }) => {\n const propertyValueSpecifications = specifications.flatMap(\n ({ name, values }) =>\n values.map((value) => ({\n name,\n value,\n valueReference: VALUE_REFERENCES.specification,\n }))\n )\n\n const propertyValueAttachments = attachmentsValues.map(\n attachmentToPropertyValue\n )\n\n const propertyValueAttributes = attributes.map(attributeToPropertyValue)\n\n return [\n ...propertyValueSpecifications,\n ...propertyValueAttachments,\n ...propertyValueAttributes,\n ]\n },\n hasSpecifications: ({ isVariantOf }) =>\n Boolean(isVariantOf.skuSpecifications?.length),\n skuSpecifications: ({ isVariantOf: { skuSpecifications } }) =>\n skuSpecifications ?? [],\n specificationGroups: ({ isVariantOf: { specificationGroups } }) =>\n specificationGroups,\n releaseDate: ({ isVariantOf: { releaseDate } }) =>\n normalizeReleaseDate(releaseDate),\n advertisement: ({ isVariantOf: { advertisement } }) => advertisement,\n deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges } }) =>\n deliveryPromisesBadges,\n otherLocales: async (root, _args, ctx) => {\n if (!isLocalizationEnabled(ctx)) return null\n\n const configuredLocales = getConfiguredLocales(ctx)\n\n if (configuredLocales.length === 0) return null\n\n const productId = root.isVariantOf.productId\n const itemId = root.itemId\n const locale = ctx.storage.locale\n\n // availableLinkIds returns localized slug for every locale,\n // we fetch for the current locale (reusing the request-scoped cache shared with the slug and\n // breadcrumb resolvers) and read the full map from the response.\n const entry = await getLocalizedProductEntry(ctx, productId, locale)\n\n if (!entry?.availableLinkIds) return null\n\n const { availableLinkIds } = entry\n\n return configuredLocales\n .map((configuredLocale) => {\n // availableLinkIds is identical whichever locale the Dataplane is queried\n // with, so deriving every slug from it keeps the hreflang cluster\n // reciprocal. The Intelligent Search linkText cannot stand in for a\n // missing entry: it is localized to the locale being browsed, which would\n // both point other locales at a 404 and make the advertised set depend on\n // which locale served the request.\n const linkId = availableLinkIds[configuredLocale]\n\n // Locales with no registered localized slug are omitted rather than\n // guessed, so an alternate is only ever advertised for a slug the catalog\n // actually resolves. A product with no translations advertises no\n // alternates at all, from any locale. Navigating to an omitted locale is\n // served by `defaultLocaleSlug`, which is free to guess precisely because\n // it never reaches an hreflang annotation.\n return linkId\n ? { locale: configuredLocale, slug: getSlug(linkId, itemId) }\n : null\n })\n .filter((e): e is { locale: string; slug: string } => e !== null)\n },\n defaultLocaleSlug: async (root, _args, ctx) => {\n if (!isLocalizationEnabled(ctx)) return null\n\n const defaultLocale = getDefaultLocale(ctx)\n\n if (!defaultLocale) return null\n\n const { productId, linkText } = root.isVariantOf\n const itemId = root.itemId\n\n // Reuses the request-scoped entry `otherLocales` already loads, so serving\n // both fields costs a single Dataplane call.\n const entry = await getLocalizedProductEntry(\n ctx,\n productId,\n ctx.storage.locale\n )\n\n // linkText is localized to the locale being browsed, which is what makes it\n // unusable for hreflang. It is acceptable here because an untranslated\n // product carries the same slug in every locale, so linkText *is* the\n // default-locale slug in the exact case where availableLinkIds is empty.\n // A product translated for the browsed locale but not for the default one\n // still yields a wrong guess; that URL 404s, which is the pre-existing\n // behavior and still better than dropping the shopper on the locale root.\n const linkId = entry?.availableLinkIds?.[defaultLocale] ?? linkText\n\n return getSlug(linkId, itemId)\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport { VALUE_REFERENCES } from '../utils/propertyValue'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.isVariantOf>>\n\nconst BLOCKED_SPECIFICATIONS = new Set(['allSpecifications'])\n\nexport const StoreProductGroup: Record<string, GraphqlResolver<Root>> = {\n hasVariant: (root) =>\n root.isVariantOf.items.map((item) => enhanceSku(item, root.isVariantOf)),\n productGroupID: ({ isVariantOf }) => isVariantOf.productId,\n name: (root) => root.isVariantOf.productName,\n skuVariants: (root) => root,\n additionalProperty: ({ isVariantOf: { specificationGroups } }) =>\n specificationGroups\n // Filter sku specifications so we don't mix them with product specs.\n .filter(\n (specificationGroup) =>\n !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)\n )\n // Transform specs back into product specs.\n .flatMap(({ specifications }) =>\n specifications.flatMap(({ name, values }) =>\n values.map((value) => ({\n name,\n value,\n valueReference: VALUE_REFERENCES.specification,\n }))\n )\n ),\n}\n","import type { GraphqlResolver } from '..'\nimport type { StorePropertyValue as StorePropertyValueType } from '../../../__generated__/schema'\nimport { getPropertyId } from '../utils/propertyValue'\n\nexport type Root = StorePropertyValueType\n\nexport const StorePropertyValue: Record<string, GraphqlResolver<Root>> = {\n propertyID: (root) => root.propertyID || getPropertyId(root),\n name: ({ name }) => name,\n value: ({ value }) => value,\n valueReference: ({ valueReference }) => valueReference,\n}\n","import { min } from './orderStatistics'\nimport { bestOfferFirst } from './productStock'\nimport type { Item } from '../clients/search/types/ProductSearchResult'\n\n/**\n * This function implements Portal heuristics for returning the best sku for a product.\n *\n * The best sku is the one with the best (cheapest available) offer\n * */\nexport const pickBestSku = (skus: Item[]) => {\n const offersBySku = skus.flatMap((sku) =>\n sku.sellers.map((seller) => ({\n offer: seller.commertialOffer,\n sku,\n }))\n )\n\n const best = min(offersBySku, ({ offer: o1 }, { offer: o2 }) =>\n bestOfferFirst(o1, o2)\n )\n\n return best ? best.sku : skus[0]\n}\n\nexport const isValidSkuId = (skuId: string) =>\n skuId !== '' && !Number.isNaN(Number(skuId))\n","import { BadRequestError } from '../../errors'\nimport type { QueryRecommendationsArgs } from '../../../__generated__/schema'\nimport type { GraphqlContext } from '../index'\nimport { enhanceSku, type EnhancedSku } from '../utils/enhanceSku'\nimport { pickBestSku } from '../utils/sku'\n\n// Structural check for a recommendations campaign VRN\n// (`vrn:recommendations:<account>:<campaign-type>:<campaign-id>`). Kept generic\n// on purpose: the authoritative campaign taxonomy lives in `@faststore/core`,\n// and `@faststore/api` must not depend on it, so we only validate the shape.\nconst RECOMMENDATION_VRN_PATTERN = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/\n\n/**\n * Resolves personalized recommendations for a campaign.\n *\n * The VTEX Recommendations BFF already returns the products fully hydrated in\n * the same Intelligent Search shape used by the `search` query. We map them\n * straight to the normalized `StoreProduct` shape (`pickBestSku` + `enhanceSku`)\n * so recommendation shelves render identical cards to regular shelves, while\n * preserving the recommendation order returned by the BFF.\n */\nexport const recommendations = async (\n _: unknown,\n { campaignVrn, userId, products }: QueryRecommendationsArgs,\n ctx: GraphqlContext\n) => {\n const {\n clients: { commerce },\n } = ctx\n\n const { salesChannel } = ctx.storage.channel\n\n // Validate inputs server-side so only clean, well-formed payloads reach the\n // Recommendations BFF (see @faststore/api server-side validation principle).\n const normalizedCampaignVrn = campaignVrn?.trim()\n if (\n !normalizedCampaignVrn ||\n !RECOMMENDATION_VRN_PATTERN.test(normalizedCampaignVrn)\n ) {\n throw new BadRequestError(`Invalid campaignVrn: \"${campaignVrn}\"`)\n }\n\n const normalizedUserId = userId?.trim()\n if (userId != null && !normalizedUserId) {\n throw new BadRequestError('Invalid userId: must be a non-empty string')\n }\n\n if (\n products != null &&\n (!Array.isArray(products) || products.some((product) => !product?.trim()))\n ) {\n throw new BadRequestError(\n 'Invalid products: must be an array of non-empty strings'\n )\n }\n\n const response = await commerce.recommendation.recommendations({\n campaignVrn: normalizedCampaignVrn,\n userId: normalizedUserId || undefined,\n products: products ?? [],\n salesChannel: salesChannel ?? undefined,\n locale: ctx.storage.locale,\n })\n\n const { campaign, correlationId } = response\n\n const orderedProducts = (response.products ?? [])\n .map((product) => {\n const sku = pickBestSku(product.items)\n\n return sku ? enhanceSku(sku, product) : null\n })\n .filter((sku): sku is EnhancedSku => Boolean(sku))\n\n return {\n products: orderedProducts,\n correlationId,\n campaign,\n }\n}\n","export const SORT_MAP = {\n price_desc: 'price:desc',\n price_asc: 'price:asc',\n orders_desc: 'orders:desc',\n name_desc: 'name:desc',\n name_asc: 'name:asc',\n release_desc: 'release:desc',\n discount_desc: 'discount:desc',\n score_desc: '',\n} as const\n","import type { GraphqlContext } from '..'\nimport type { QueryOrderEntryOperationArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const getOrderEntryOperation = async (\n _: unknown,\n { operationId }: QueryOrderEntryOperationArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!operationId) {\n throw new BadRequestError('Missing operationId')\n }\n\n return commerce.orderEntry.getOperation({ operationId })\n}\n","import type { GraphqlContext } from '..'\nimport type { QueryOrderFormItemsArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const getOrderFormItems = async (\n _: unknown,\n { orderFormId }: QueryOrderFormItemsArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!orderFormId) {\n throw new BadRequestError('Missing orderFormId')\n }\n\n const { items } = await commerce.orderEntry.getOrderFormItems({ orderFormId })\n return (items ?? []).map((item) => ({\n id: item.id,\n name: item.name,\n price: item.price,\n listPrice: item.listPrice,\n quantity: item.quantity,\n imageUrl: item.imageUrl ?? null,\n availability: item.availability,\n seller: item.seller,\n unitMultiplier: item.unitMultiplier ?? 1,\n }))\n}\n","import type {\n ProcessOrderAuthorizationRule,\n QueryAllCollectionsArgs,\n QueryAllProductsArgs,\n QueryAvailableContractsArgs,\n QueryCollectionArgs,\n QueryListUserOrdersArgs,\n QueryPickupPointsArgs,\n QueryProductArgs,\n QueryProductCountArgs,\n QueryProductsArgs,\n QueryProfileArgs,\n QueryRedirectArgs,\n QuerySearchArgs,\n QuerySellersArgs,\n QueryShippingArgs,\n QueryUserOrderArgs,\n SavedCard,\n StoreContract,\n UserOrderFromList,\n} from '../../../__generated__/schema'\nimport { recommendations } from './recommendations'\nimport {\n BadRequestError,\n ForbiddenError,\n NotFoundError,\n isForbiddenError,\n isNotFoundError,\n} from '../../errors'\nimport type { CategoryTree } from '../clients/commerce/types/CategoryTree'\nimport type { ProfileAddress } from '../clients/commerce/types/Profile'\nimport type { SearchArgs } from '../clients/search'\nimport type { ProductSearchResult } from '../clients/search/types/ProductSearchResult'\nimport type { GraphqlContext } from '../index'\nimport type {\n ByLinkIdBrandRoot,\n ByLinkIdCategoryRoot,\n} from '../loaders/collection'\nimport { extractRuleForAuthorization } from '../utils/commercialAuth'\nimport {\n mapSessionContractsToStoreContracts,\n parseSessionAvailableContracts,\n resolveActiveContractDisplayName,\n resolveActiveContractIdFromSession,\n} from '../utils/contract'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\nimport { enhanceSku, type EnhancedSku } from '../utils/enhanceSku'\nimport {\n findChannel,\n findCrossSelling,\n findLocale,\n findSkuId,\n findSlug,\n transformSelectedFacet,\n} from '../utils/facets'\nimport { getCatalogLocale, isLocalizationEnabled } from '../utils/localization'\nimport { isValidSkuId, pickBestSku } from '../utils/sku'\nimport { slugify } from '../utils/slugify'\nimport { SORT_MAP } from '../utils/sort'\nimport { FACET_CROSS_SELLING_MAP } from './../utils/facets'\nimport { StoreCollection } from './collection'\nimport { getOrderEntryOperation } from './getOrderEntryOperation'\nimport { getOrderFormItems } from './getOrderFormItems'\nimport { getLocalizedProductEntry } from './product'\n\n/**\n * Validates that a slug mismatch between IS linkText and the requested slug is\n * actually a localized slug match. Fetches the localized product entry from\n * Catalog Dataplane (with request-scoped caching) and checks whether the slug\n * prefix matches the localized linkId for the current locale.\n *\n * Returns true if the slug is a valid localized match, false otherwise\n * (including when the Dataplane API is unavailable).\n */\nasync function isLocalizedSlugMatch(\n ctx: GraphqlContext,\n slug: string,\n productGroupID: string,\n locale: string\n): Promise<boolean> {\n const slugPrefix = slug.slice(0, slug.lastIndexOf('-'))\n const entry = await getLocalizedProductEntry(ctx, productGroupID, locale)\n\n return entry?.linkId === slugPrefix\n}\n\nconst INVALID_SKU_ID_ERROR = 'Invalid SkuId'\nconst SLUG_MISMATCH_ERROR =\n 'Slug was set but the fetched sku does not satisfy the slug condition.'\n\n/**\n * License Manager resource key gating personal card management. Spelled as the\n * platform registers it — the PRD's prose lowercases the leading `u`, but the\n * key the API answers for is `UseAdHocCard`.\n */\nconst AD_HOC_CARD_RESOURCE_KEY = 'UseAdHocCard'\n\nconst shouldFallbackToProductRoute = (error: unknown) =>\n isNotFoundError(error) ||\n (error instanceof Error &&\n (error.message === INVALID_SKU_ID_ERROR ||\n error.message.startsWith(SLUG_MISMATCH_ERROR)))\n\n/**\n * Here be dragons 🦄🦄🦄\n *\n * In some cases, the slug has a valid skuId for a different product. This\n * guards that the fetched sku is the one we actually asked for, throwing\n * SLUG_MISMATCH_ERROR (caught by the caller) when it isn't.\n *\n * When localization is enabled, the slug prefix may be a localized LinkId that\n * differs from the IS linkText. linkText follows the locale being browsed\n * rather than the default one, so a mismatch is not by itself evidence of a\n * wrong sku. We validate against the Catalog Dataplane API before rejecting\n * the slug.\n */\nasync function assertSkuMatchesSlug(\n ctx: GraphqlContext,\n sku: EnhancedSku,\n slug: string | null | undefined,\n locale: string | null | undefined\n): Promise<void> {\n const { linkText, productId } = sku.isVariantOf\n\n if (!slug || !linkText || slug.startsWith(linkText)) {\n return\n }\n\n const isValidLocalizedMatch =\n isLocalizationEnabled(ctx) &&\n locale &&\n isValidSkuId(slug.split('-').pop() ?? '') &&\n (await isLocalizedSlugMatch(ctx, slug, productId, locale))\n\n if (isValidLocalizedMatch) {\n return\n }\n\n throw new Error(`${SLUG_MISMATCH_ERROR} slug: ${slug}, linkText: ${linkText}`)\n}\n\n/**\n * Fallback used when the sku/slug lookup above fails (invalid skuId, not\n * found, or slug mismatch): resolves the slug through the legacy pagetype\n * route and fetches the product from Intelligent Search by id instead.\n */\nasync function fetchProductBySlugFallback(\n ctx: GraphqlContext,\n slug: string | null | undefined\n): Promise<EnhancedSku> {\n if (slug == null) {\n throw new BadRequestError('Missing slug or id')\n }\n\n const {\n clients: { commerce, search },\n } = ctx\n\n const route = await commerce.catalog.portal.pagetype(`${slug}/p`)\n\n if (route.pageType !== 'Product' || !route.id) {\n throw new NotFoundError(`No product found for slug ${slug}`)\n }\n\n const product = await search\n .fetchProduct({\n field: 'id',\n value: String(route.id),\n })\n .catch(() => null)\n\n if (!product) {\n throw new NotFoundError(`No product found for id ${route.id}`)\n }\n\n return enhanceSku(pickBestSku(product.items), product)\n}\n\nexport const Query = {\n product: async (\n _: unknown,\n { locator }: QueryProductArgs,\n ctx: GraphqlContext\n ) => {\n // Insert channel in context for later usage\n const channel = findChannel(locator)\n const locale = findLocale(locator)\n const id = findSkuId(locator)\n const slug = findSlug(locator)\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n const {\n loaders: { skuLoader },\n } = ctx\n\n try {\n const skuId = id ?? slug?.split('-').pop() ?? ''\n\n if (!isValidSkuId(skuId)) {\n throw new Error(INVALID_SKU_ID_ERROR)\n }\n\n const sku = await skuLoader.load(skuId)\n\n await assertSkuMatchesSlug(ctx, sku, slug, locale)\n\n return sku\n } catch (err) {\n if (!shouldFallbackToProductRoute(err)) {\n throw err\n }\n\n return fetchProductBySlugFallback(ctx, slug)\n }\n },\n collection: (\n _: unknown,\n { slug }: QueryCollectionArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n // The request locale is set on ctx.storage.locale by the core `execute`\n // wrapper (from Next.js i18n) rather than a GraphQL argument, so overridable\n // fragments (API extensions) that also select `collection` keep merging\n // without argument conflicts.\n return collectionLoader.load({\n slug,\n locale: getCatalogLocale(ctx),\n })\n },\n search: async (\n _: unknown,\n {\n first,\n after: maybeAfter,\n sort,\n term,\n selectedFacets,\n sponsoredCount,\n }: QuerySearchArgs,\n ctx: GraphqlContext\n ) => {\n // Insert channel in context for later usage\n const channel = findChannel(selectedFacets)\n const locale = findLocale(selectedFacets)\n const crossSelling = findCrossSelling(selectedFacets)\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n const searchArgs: Omit<SearchArgs, 'type'> = {\n page: Math.ceil(after / first) || 0,\n count: first,\n query: term ?? undefined,\n sort: SORT_MAP[sort ?? 'score_desc'] ?? SORT_MAP.score_desc,\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n sponsoredCount: sponsoredCount ?? undefined,\n }\n\n /**\n * In case we are using crossSelling, we fetch product IDs from the\n * cross selling API and then hydrate them using the PDP endpoint\n * via productsByIdentifier.\n */\n if (crossSelling) {\n const crossSellingProducts =\n await ctx.clients.commerce.catalog.products.crossselling({\n type: FACET_CROSS_SELLING_MAP[crossSelling.key],\n productId: crossSelling.value,\n })\n\n const productIds = crossSellingProducts\n .map((x) => x.productId)\n .slice(0, first)\n\n const productSearchPromise: Promise<ProductSearchResult> =\n ctx.clients.search\n .productsByIdentifier({ field: 'id', values: productIds })\n .then((products) => ({\n products,\n recordsFiltered: products.length,\n pagination: {\n count: products.length,\n current: { index: 0, proxyURL: '' },\n before: [],\n after: [],\n perPage: first,\n next: { index: 0, proxyURL: '' },\n previous: { index: 0, proxyURL: '' },\n first: { index: 0, proxyURL: '' },\n last: { index: 0, proxyURL: '' },\n },\n sampling: false,\n options: { sorts: [], counts: [] },\n translated: false,\n locale: '',\n query: '',\n operator: 'and',\n fuzzy: '0',\n searchId: '',\n }))\n\n return { searchArgs, productSearchPromise }\n }\n\n const productSearchPromise = ctx.clients.search.products(searchArgs)\n\n return { searchArgs, productSearchPromise }\n },\n allProducts: async (\n _: unknown,\n { first, after: maybeAfter }: QueryAllProductsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n const products = await search.products({\n page: Math.ceil(after / first),\n count: first,\n })\n\n const skus = products.products\n .flatMap((product) =>\n product.items.map((sku) => enhanceSku(sku, product))\n )\n .filter((sku) => sku.sellers.length > 0)\n\n return {\n pageInfo: {\n hasNextPage: products.pagination.after.length > 0,\n hasPreviousPage: products.pagination.before.length > 0,\n startCursor: '0',\n endCursor: products.recordsFiltered.toString(),\n totalCount: products.recordsFiltered,\n },\n // after + index is bigger than after+first itself because of the array flat() above\n edges: skus.map((sku, index) => ({\n node: sku,\n cursor: (after + index).toString(),\n })),\n }\n },\n products: async (\n _: unknown,\n { productIds }: QueryProductsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n if (!productIds.length) {\n return []\n }\n\n const products = await search.productsByIdentifier({\n field: 'id',\n values: productIds,\n })\n\n return products\n .flatMap((product) =>\n product.items.map((sku) => enhanceSku(sku, product))\n )\n .filter(\n (sku) => productIds.includes(sku.itemId) && sku.sellers.length > 0\n )\n },\n allCollections: async (\n _: unknown,\n { first, after: maybeAfter }: QueryAllCollectionsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n\n const [brands, tree] = await Promise.all([\n commerce.catalog.brand.list(),\n commerce.catalog.category.tree(),\n ])\n\n // Flatten the category tree. parentId is tracked per node so\n // the type resolver can correctly classify Departments (fatherCategoryId: null)\n // vs Categories (fatherCategoryId: number).\n const categoryRoots: ByLinkIdCategoryRoot[] = []\n const dfs = (node: CategoryTree, parentId: number | null) => {\n categoryRoots.push({\n id: node.id,\n name: node.name,\n fatherCategoryId: parentId,\n linkId: slugify(node.name),\n title: node.Title,\n description: null,\n metaTagDescription: node.MetaTagDescription,\n availableLinkIds: null,\n entityType: 'category' as const,\n slug: new URL(node.url).pathname.slice(1).toLowerCase(),\n })\n\n for (const child of node.children) {\n dfs(child, node.id)\n }\n }\n\n for (const node of tree) {\n dfs(node, null)\n }\n\n const brandRoots: ByLinkIdBrandRoot[] = brands\n .filter((brand) => brand.isActive)\n .map((brand) => ({\n id: brand.id,\n name: brand.name,\n linkId: slugify(brand.name),\n title: brand.title,\n description: null,\n metaTagDescription: brand.metaTagDescription,\n availableLinkIds: null,\n entityType: 'brand' as const,\n }))\n\n const collections = [...brandRoots, ...categoryRoots]\n\n const validCollections = collections\n // Nullable slugs may cause one route to override the other\n .filter((node) => Boolean(StoreCollection.slug(node, null, ctx, null)))\n\n return {\n pageInfo: {\n hasNextPage: validCollections.length - after > first,\n hasPreviousPage: after > 0,\n startCursor: '0',\n endCursor: (\n Math.min(first, validCollections.length - after) - 1\n ).toString(),\n totalCount: validCollections.length,\n },\n edges: validCollections\n .slice(after, after + first)\n .map((node, index) => ({\n node,\n cursor: (after + index).toString(),\n })),\n }\n },\n shipping: async (\n _: unknown,\n { country, items, postalCode }: QueryShippingArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { simulationLoader },\n clients: { commerce },\n } = ctx\n\n const [simulation, address] = await Promise.all([\n simulationLoader.load({ country, items, postalCode }),\n commerce.checkout.address({ postalCode, country }),\n ])\n\n return {\n ...simulation,\n address,\n }\n },\n redirect: async (\n _: unknown,\n { term, selectedFacets }: QueryRedirectArgs,\n ctx: GraphqlContext\n ) => {\n // Currently the search redirection can be done through a search term or filter (facet) so we limit the redirect query to always have one of these values otherwise we do not execute it.\n // https://help.vtex.com/en/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/4Gd2wLQFbCwTsh8RUDwSoL?&utm_source=autocomplete\n if (!term && (!selectedFacets || !selectedFacets.length)) {\n return null\n }\n\n const { redirect } = await ctx.clients.search.products({\n page: 1,\n count: 1,\n query: term ?? undefined,\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n allowRedirect: true,\n })\n\n return {\n url: redirect,\n }\n },\n sellers: async (\n _: unknown,\n { postalCode, geoCoordinates, country, salesChannel }: QuerySellersArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const regionData = await commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n const { id, sellers } = region\n\n return {\n id,\n sellers,\n }\n },\n profile: async (\n _: unknown,\n { id }: QueryProfileArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const addresses = await commerce.profile.addresses(id)\n\n function mapAddressesToList(\n addressesObj: Record<string, string>\n ): ProfileAddress[] {\n if (!addressesObj || Object.keys(addressesObj).length === 0) {\n return []\n }\n\n return Object.values(addressesObj).map(\n (stringifiedObj) => JSON.parse(stringifiedObj) as ProfileAddress\n )\n }\n\n const parsedAddresses = mapAddressesToList(addresses)\n\n return { addresses: parsedAddresses }\n },\n productCount: async (\n _: unknown,\n { term }: QueryProductCountArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n const result = await search.productCount({\n query: term ?? undefined,\n })\n\n return result\n },\n userOrder: async (\n _: unknown,\n { orderId }: QueryUserOrderArgs,\n ctx: GraphqlContext\n ) => {\n try {\n if (!orderId) {\n throw new BadRequestError('Missing orderId')\n }\n\n const {\n clients: { commerce },\n } = ctx\n\n const order = await commerce.oms.userOrder({ orderId })\n\n if (!order) {\n throw new NotFoundError(`No order found for id ${orderId}`)\n }\n\n let ruleForAuthorization: ProcessOrderAuthorizationRule | null = null\n\n try {\n /**\n * This endpoint could return a 404 error if has not an authorization\n * for the order, so we catch the error and return null\n * instead of throwing an error.\n */\n const commercialAuth =\n await commerce.oms.getCommercialAuthorizationsByOrderId({ orderId })\n\n ruleForAuthorization = extractRuleForAuthorization(commercialAuth)\n } catch (err: any) {}\n\n const shopperSearch =\n (await commerce.masterData.getShopperById({\n userId: order.purchaseAgentData?.purchaseAgents?.[0]?.userId ?? '',\n })) ?? []\n const shopper = shopperSearch[0] ?? {}\n\n return {\n orderId: order.orderId,\n creationDate: order.creationDate,\n totals: order.totals,\n items: order.items,\n shippingData: order.shippingData,\n paymentData: order.paymentData,\n customData: order.customData,\n status: order.status,\n statusDescription: order.statusDescription,\n allowCancellation: order.allowCancellation,\n storePreferencesData: order.storePreferencesData,\n clientProfileData: order.clientProfileData,\n canProcessOrderAuthorization:\n (order.status === 'waiting-for-confirmation' ||\n order.status === 'waiting-for-authorization') &&\n !!ruleForAuthorization,\n ruleForAuthorization,\n shopper: {\n firstName: shopper?.firstName || '',\n lastName: shopper?.lastName || '',\n email: shopper?.email || '',\n phone: shopper?.phone || '',\n },\n budgetData: order.budgetData ?? { budgets: [] },\n }\n } catch (error) {\n const errorMessage = (error as Error).message\n\n let result: {\n code?: string\n message?: string\n exception?: any\n } = {}\n\n /** The errorMessage can be in:\n * JSON format: {\"error\":{\"code\":\"OMS007\",\"message\":\"Order Not Found\",\"exception\":null}}\n * Plain text format: \"No authorized\"\n * Unknown format\n */\n try {\n const parsed = JSON.parse(errorMessage)\n result = parsed.error || parsed\n } catch {\n result = { message: errorMessage }\n }\n\n const message = result?.message || errorMessage\n\n if (isNotFoundError(error)) {\n throw new NotFoundError(`No order found for id ${orderId}. ${message}.`)\n }\n\n if (isForbiddenError(error)) {\n throw new ForbiddenError(\n `You are forbidden to interact with order with id ${orderId}. ${message}.`\n )\n }\n\n // Fallback for other Errors\n throw error\n }\n },\n listUserOrders: async (\n _: unknown,\n filters: QueryListUserOrdersArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const orders = await commerce.oms.listUserOrders(filters)\n\n return {\n list: orders.list?.map((order: UserOrderFromList) => ({\n orderId: order.orderId,\n creationDate: order.creationDate,\n clientName: order.clientName,\n items: order.items,\n totalValue: order.totalValue,\n status: order.status,\n statusDescription: order.statusDescription,\n ShippingEstimatedDate: order.ShippingEstimatedDate,\n customFields: order.customFields,\n currencyCode: order.currencyCode,\n })),\n paging: orders.paging,\n }\n },\n listCreditCards: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n clients: { commerce },\n } = ctx\n\n const cards = await commerce.savedCards.listCreditCards()\n\n return {\n list: cards?.map((card: SavedCard) => ({\n accountId: card.accountId,\n bin: card.bin,\n cardNumber: card.cardNumber,\n cardLabel: card.cardLabel,\n paymentSystem: card.paymentSystem,\n paymentSystemName: card.paymentSystemName,\n isDefault: card.isDefault,\n isActive: card.isActive,\n origin: card.origin,\n })),\n }\n },\n hasAdHocCardAccess: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n const userId = jwt?.userId ?? ''\n\n // No resolvable user means no organizational policy to enforce — the\n // caller (page/menu) still applies its own `unitId` check.\n if (!userId) {\n return true\n }\n\n // The permission is a License Manager resource key resolved from the\n // user's roles, not a token claim. Fail open on any failure, matching how\n // the checkout BFF treats an unavailable/disabled permission service.\n const granted = await commerce.licenseManager\n .isResourceGranted({ userId, resourceKey: AD_HOC_CARD_RESOURCE_KEY })\n .catch(() => null)\n\n return typeof granted === 'boolean' ? granted : true\n },\n listUserQuotes: async (\n _: unknown,\n filters: {\n page?: number\n perPage?: number\n status?: string[]\n createdAtFrom?: string\n createdAtTo?: string\n expiresAtFrom?: string\n expiresAtTo?: string\n label?: string\n },\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const result = await commerce.quotes.listUserQuotes(filters)\n\n const uniqueCreatedByIds = [\n ...new Set(result.items.map((quote) => quote.createdBy).filter(Boolean)),\n ] as string[]\n\n const createdByNameById = new Map<string, string>()\n await Promise.all(\n uniqueCreatedByIds.map(async (userId) => {\n try {\n const [shopper] = await commerce.masterData.getShopperById({\n userId,\n })\n if (shopper) {\n const fullName = [shopper.firstName, shopper.lastName]\n .filter(Boolean)\n .join(' ')\n if (fullName) createdByNameById.set(userId, fullName)\n }\n } catch {\n // Fall back to the raw id below if the lookup fails\n }\n })\n )\n\n const list = result.items.map((quote) => ({\n id: quote.id,\n status: quote.status,\n label: quote.label ?? null,\n createdAt: quote.createdAt,\n expiresAt: quote.expiresAt,\n amount: quote.amount,\n createdBy: quote.createdBy\n ? (createdByNameById.get(quote.createdBy) ?? quote.createdBy)\n : null,\n }))\n\n return {\n list,\n paging: {\n total: result.totalItems,\n currentPage: result.pageNumber,\n perPage: result.pageSize,\n },\n }\n },\n validateUser: async (_: unknown, __: unknown, _ctx: GraphqlContext) => {\n // Authentication is now handled by @auth directive\n // If we reach here, validation was successful, otherwise an error would have been thrown\n return {\n isValid: true,\n }\n },\n isOrganizationMember: async (\n _: unknown,\n __: unknown,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const sessionData = await commerce.session('').catch(() => null)\n\n return Boolean(sessionData?.namespaces.authentication?.unitId?.value)\n },\n // only b2b users\n userDetails: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n const userId = jwt?.userId ?? ''\n\n const [sessionData, shopperResult, lmRoles] = await Promise.all([\n commerce.session('').catch(() => null),\n userId\n ? commerce.masterData.getShopperById({ userId }).catch(() => null)\n : Promise.resolve(null),\n userId\n ? commerce.licenseManager.getUserRoles({ userId }).catch(() => null)\n : Promise.resolve(null),\n ])\n\n const shopper = shopperResult?.[0]\n const authentication = sessionData?.namespaces.authentication ?? null\n\n const fullName =\n `${(shopper?.firstName ?? '').trim()} ${(shopper?.lastName ?? '').trim()}`.trim()\n\n return {\n username: authentication?.storeUserEmail?.value ?? '',\n name: fullName,\n email: authentication?.storeUserEmail?.value ?? '',\n phone: shopper?.phone ?? '',\n role: lmRoles?.Roles?.map((r) => r.Name) ?? [],\n orgUnit: authentication?.unitName?.value ?? '',\n }\n },\n // If isRepresentative, return b2b information.\n // If not, return b2c user information\n accountProfile: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n\n if (!jwt?.userId) {\n return null\n }\n\n if (jwt?.isRepresentative) {\n const sessionData = await commerce.session('').catch(() => null)\n\n if (!sessionData) {\n return null\n }\n\n const profile = sessionData.namespaces.profile ?? null\n const shopper = sessionData.namespaces.shopper ?? null\n const authentication = sessionData.namespaces.authentication ?? null\n\n const contractId =\n resolveActiveContractIdFromSession(sessionData) ||\n jwt?.customerId?.trim() ||\n ''\n\n let contract = null\n if (contractId) {\n try {\n contract = await commerce.masterData.getContractById({ contractId })\n } catch (err) {\n console.error(\n `Error while getting contract data for contract ID (${contractId}).`,\n err\n )\n }\n }\n\n const shopperName =\n `${(shopper?.firstName?.value ?? '').trim()} ${(shopper?.lastName?.value ?? '').trim()}`.trim()\n const name =\n resolveActiveContractDisplayName(contract, profile) || shopperName\n\n return {\n name: name || '',\n email:\n profile?.email?.value || authentication?.storeUserEmail?.value || '',\n id:\n profile?.id?.value ||\n authentication?.customerId?.value ||\n jwt?.customerId?.trim() ||\n '',\n // createdAt: '',\n }\n }\n\n const user = await commerce.licenseManager\n .getUserById({\n userId: jwt?.userId,\n })\n .catch(() => null)\n\n return {\n name: user?.name || '',\n email: user?.email || '',\n id: user?.id || '',\n // createdAt: '',\n }\n },\n // only b2b users\n // Contract list from VTEX session `shopper.availableContracts`.\n availableContracts: async (\n _: unknown,\n { orgUnitId }: QueryAvailableContractsArgs,\n ctx: GraphqlContext\n ): Promise<StoreContract[]> => {\n if (!orgUnitId) {\n throw new BadRequestError('Missing orgUnitId')\n }\n\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const sessionData = await commerce.session('').catch(() => null)\n const authToken = getAuthCookie(headers?.cookie ?? '', account)\n let jwt: ReturnType<typeof parseJwt> = null\n\n try {\n jwt = authToken ? parseJwt(authToken) : null\n } catch {\n jwt = null\n }\n\n const sessionUnitId =\n sessionData?.namespaces.authentication?.unitId?.value?.trim() ??\n jwt?.unitId?.trim() ??\n ''\n\n if (!sessionUnitId || sessionUnitId !== orgUnitId) {\n throw new ForbiddenError(\n 'You are not allowed to list contracts for this organization unit'\n )\n }\n\n const contracts = parseSessionAvailableContracts(\n sessionData?.namespaces.shopper\n )\n\n const activeContractId =\n resolveActiveContractIdFromSession(sessionData) ||\n jwt?.customerId?.trim() ||\n ''\n\n return mapSessionContractsToStoreContracts(contracts, activeContractId)\n },\n pickupPoints: async (\n _: unknown,\n { geoCoordinates }: QueryPickupPointsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const result = await commerce.checkout.pickupPoints({\n geoCoordinates,\n })\n\n return result\n },\n orderEntryOperation: getOrderEntryOperation,\n orderFormItems: getOrderFormItems,\n recommendations,\n}\n","import type { GraphqlResolver } from '..'\n\nexport const StoreReview: Record<string, GraphqlResolver> = {\n reviewRating: () => ({\n ratingValue: 5,\n bestRating: 5,\n }),\n author: () => ({\n name: '',\n }),\n}\n","import type { GraphqlResolver } from '..'\nimport type { SearchArgs } from '../clients/search'\nimport type { Facet } from '../clients/search/types/FacetSearchResult'\nimport type { ProductSearchResult } from '../clients/search/types/ProductSearchResult'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport { pickBestSku } from '../utils/sku'\n\nexport type Root = {\n searchArgs: Omit<SearchArgs, 'type'>\n productSearchPromise: Promise<ProductSearchResult>\n}\n\nconst isRootFacet = (facet: Facet, isDepartment: boolean, isBrand: boolean) =>\n isDepartment\n ? facet.key === 'category-1'\n : isBrand\n ? facet.key === 'brand'\n : false\n\nexport const StoreSearchResult: Record<string, GraphqlResolver<Root>> = {\n suggestions: async (root, _, ctx) => {\n const {\n clients: { search },\n } = ctx\n\n const { searchArgs } = root\n\n // If there's no search query, suggest the most popular searches.\n if (!searchArgs.query) {\n const topSearches = await search.topSearches()\n\n return {\n terms: topSearches.searches.map((item) => ({\n value: item.term,\n count: item.count,\n })),\n products: [],\n }\n }\n\n const { productSearchPromise } = root\n const [terms, productSearchResult] = await Promise.all([\n search.suggestedTerms(searchArgs),\n productSearchPromise,\n ])\n\n const skus = productSearchResult.products\n .map((product) => {\n // What determines the presentation of the SKU is the price order\n // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278\n const maybeSku = pickBestSku(product.items)\n\n return maybeSku && enhanceSku(maybeSku, product)\n })\n .filter((sku) => !!sku)\n\n const { searches } = terms\n\n return {\n terms: searches.map((item) => ({ value: item.term, count: item.count })),\n products: skus,\n }\n },\n products: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n const skus = productSearchResult.products\n .map((product) => {\n // What determines the presentation of the SKU is the price order\n // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278\n const maybeSku = pickBestSku(product.items)\n\n return maybeSku && enhanceSku(maybeSku, product)\n })\n .filter((sku) => !!sku)\n\n return {\n pageInfo: {\n hasNextPage: productSearchResult.pagination.after.length > 0,\n hasPreviousPage: productSearchResult.pagination.before.length > 0,\n startCursor: '0',\n endCursor: productSearchResult.recordsFiltered.toString(),\n totalCount: productSearchResult.recordsFiltered,\n },\n edges: skus.map((sku, index) => ({\n node: sku,\n cursor: index.toString(),\n })),\n }\n },\n facets: async ({ searchArgs }, _, ctx) => {\n const {\n clients: { search: is },\n } = ctx\n\n ctx.storage.searchArgs = searchArgs\n\n const { facets = [] } = await is.facets(searchArgs)\n\n const isCollectionPage = !searchArgs.query\n\n const isDepartment = searchArgs.selectedFacets?.length\n ? searchArgs.selectedFacets[0].key === 'category-1'\n : false\n\n const isBrand = searchArgs.selectedFacets?.length\n ? searchArgs.selectedFacets[0].key === 'brand'\n : false\n\n const filteredFacets = facets\n // Remove root facet on category and brand pages\n // TODO: Hide category filters for category pages. E.g. /office/desks\n .filter(\n (facet) =>\n !isCollectionPage || !isRootFacet(facet, isDepartment, isBrand)\n )\n\n return filteredFacets\n },\n metadata: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n return {\n isTermMisspelled: productSearchResult.correction?.misspelled ?? false,\n logicalOperator: productSearchResult.operator,\n fuzzy: productSearchResult.fuzzy,\n }\n },\n searchId: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n return productSearchResult.searchId\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.seo>> & {\n titleTemplate?: string\n}\n\nexport const StoreSeo: Record<string, GraphqlResolver<Root>> = {\n title: ({ title }) => title ?? '',\n description: ({ description }) => description ?? '',\n canonical: ({ canonical }) => canonical ?? '',\n titleTemplate: () => '',\n}\n","import type { GraphqlResolver } from '..'\n\ntype Unit = 'bd' | 'd' | 'h' | 'm'\nconst units = ['bd', 'd', 'h', 'm'] as const\n\nconst isUnit = (x: any): x is Unit => units.includes(x)\n\nconst localizedEstimates: Record<string, Record<string, string>> = {\n bd: {\n 0: 'Today',\n 1: 'In 1 business day',\n other: `Up to # business days`,\n },\n d: {\n 0: 'Today',\n 1: 'In 1 day',\n other: 'Up to # days',\n },\n h: {\n 0: 'Now',\n 1: 'In 1 hour',\n other: 'Up to # hours',\n },\n m: {\n 0: 'Now',\n 1: 'In 1 minute',\n other: 'Up to # minutes',\n },\n}\n\n/**\n * Transforms estimate (e.g 3bd) into friendly format (e.g Up to 3 business days)\n * based on https://github.com/vtex-apps/shipping-estimate-translator/blob/13e17055d6353dd3f3f4c31bae77ab049002809b/messages/en.json\n */\n\nexport const getLocalizedEstimates = (estimate: string): string => {\n const [amount, unit] = [estimate.split(/\\D+/)[0], estimate.split(/[0-9]+/)[1]]\n\n const isAmountNumber = amount !== '' && !Number.isNaN(Number(amount))\n const isUnitValid = isUnit(unit)\n\n if (!isAmountNumber || !isUnitValid) {\n return ''\n }\n\n const amountKey = Number(amount) < 2 ? Number(amount) : 'other'\n\n return localizedEstimates[unit][amountKey].replace('#', amount) ?? ''\n}\n\nexport type Root = {\n name?: string\n friendlyName?: string\n price?: number\n shippingEstimate?: string\n}\n\nexport const ShippingSLA: Record<string, GraphqlResolver<Root>> = {\n carrier: (root) => root?.friendlyName ?? root?.name ?? '',\n price: (root) => (root?.price ? root.price / 100 : root?.price),\n localizedEstimates: (root) =>\n root?.shippingEstimate ? getLocalizedEstimates(root.shippingEstimate) : '',\n}\n","import type { StoreProduct as StoreProductType } from '../../..'\nimport type { Product, Item } from '../clients/search/types/ProductSearchResult'\n\nexport type SkuVariants = StoreProductType[]\n\nexport type SkuVariantsByName = Record<string, Array<FormattedSkuVariant>>\n\ntype FormattedSkuVariant = {\n alt: string\n src: string\n label: string\n value: string\n}\n\nconst SKU_IMAGE_LABEL = 'skuvariation'\n\n/**\n * Attempts to find an image labeled by the specific variationName\n * if none is found, search for the `skuvariation`, defaulting to the\n * first image of the SKU\n */\nfunction findSkuVariantImage(\n availableImages: Item['images'],\n variationName?: string\n) {\n const variationSpecificImageLabel =\n `${SKU_IMAGE_LABEL}${variationName}`.toLowerCase()\n\n const variationSpecificImage = availableImages.find(\n (imageProperties) =>\n imageProperties.imageLabel === variationSpecificImageLabel\n )\n\n if (variationSpecificImage) {\n return variationSpecificImage\n }\n\n const skuImage = availableImages.find(\n (imageProperties) => imageProperties.imageLabel === SKU_IMAGE_LABEL\n )\n\n return skuImage ? skuImage : availableImages[0]\n}\n\nexport function createSlugsMap(\n variants: Item[],\n dominantVariantName: string,\n baseSlug: string\n) {\n /**\n * Maps property value combinations to their respective SKU's slug. Enables\n * us to retrieve the slug for the SKU that matches the currently selected\n * variations in O(1) time.\n *\n * Example: `'Color-Red-Size-40': 'classic-shoes-37'`\n */\n const slugsMap: Record<string, string> = {}\n\n variants.forEach((variant) => {\n const skuSpecificationProperties = variant.variations\n\n if (skuSpecificationProperties.length === 0) {\n return\n }\n\n // Make sure that the 'name-value' pair for the dominant variation\n // is always the first one.\n const dominantNameValue = `${dominantVariantName}-${\n skuSpecificationProperties.find(\n (variationDetails) => variationDetails.name === dominantVariantName\n )?.values[0] ?? ''\n }`\n\n const skuVariantKey = skuSpecificationProperties.reduce((acc, property) => {\n const shouldIgnore = property.name === dominantVariantName\n\n if (shouldIgnore) {\n return acc\n }\n\n return acc + `-${property.name}-${property.values[0]}`\n }, dominantNameValue)\n\n slugsMap[skuVariantKey] = `${baseSlug}-${variant.itemId}`\n })\n\n return slugsMap\n}\n\nexport function getActiveSkuVariations(variations: Item['variations']) {\n const activeVariations: Record<string, string> = {}\n\n variations.forEach((variation) => {\n activeVariations[variation.name] = variation.values[0]\n })\n\n return activeVariations\n}\n\nexport function getVariantsByName(\n skuSpecifications: Product['skuSpecifications']\n) {\n const variants: Record<string, string[]> = {}\n\n skuSpecifications?.forEach((specification) => {\n variants[specification.field.originalName ?? specification.field.name] =\n specification.values.map((value) => value.originalName ?? value.name)\n })\n\n return variants\n}\n\nfunction compare(a: string, b: string) {\n // Values are always represented as Strings, so we need to handle numbers\n // in this special case.\n if (!Number.isNaN(Number(a) - Number(b))) {\n return Number(a) - Number(b)\n }\n\n if (a < b) {\n return -1\n }\n\n if (a > b) {\n return 1\n }\n\n return 0\n}\n\nfunction sortVariants(variantsByName: SkuVariantsByName) {\n const sortedVariants = variantsByName\n\n for (const variantProperty in variantsByName) {\n const areAllNumbers = variantsByName[variantProperty].every(\n (option: any) => !Number.isNaN(Number(option.value))\n )\n\n // Preserve Admin's variants order for cases variants are strings\n areAllNumbers &&\n variantsByName[variantProperty].sort((a, b) => compare(a.value, b.value))\n }\n\n return sortedVariants\n}\n\nexport function getFormattedVariations(\n variants: Item[],\n dominantVariantName: string,\n dominantVariantValue: string\n) {\n /**\n * SKU options already formatted and indexed by their property name.\n *\n * Ex: {\n * `Size`: [\n * { label: '42', value: '42' },\n * { label: '41', value: '41' },\n * { label: '39', value: '39' },\n * ]\n * }\n */\n const variantsByName: SkuVariantsByName = {}\n\n const previouslySeenPropertyValues = new Set<string>()\n\n variants.forEach((variant) => {\n if (variant.variations.length === 0) {\n return\n }\n\n const dominantVariantEntry = variant.variations.find(\n (variation) => variation.name === dominantVariantName\n )\n\n const matchesDominantVariant =\n dominantVariantEntry?.values[0] === dominantVariantValue\n\n if (!matchesDominantVariant) {\n const nameValueIdentifier = `${dominantVariantName}-${dominantVariantEntry?.values[0]}`\n\n if (\n !dominantVariantEntry ||\n previouslySeenPropertyValues.has(nameValueIdentifier)\n ) {\n return\n }\n\n previouslySeenPropertyValues.add(nameValueIdentifier)\n\n const variantImageToUse = findSkuVariantImage(\n variant.images,\n dominantVariantName\n )\n\n const formattedVariant = {\n src: variantImageToUse.imageUrl,\n alt: variantImageToUse.imageLabel ?? '',\n label: `${dominantVariantName}: ${dominantVariantEntry.values[0]}`,\n value: dominantVariantEntry.values[0],\n }\n\n if (variantsByName[dominantVariantEntry.name]) {\n variantsByName[dominantVariantEntry.name].push(formattedVariant)\n } else {\n variantsByName[dominantVariantEntry.name] = [formattedVariant]\n }\n\n return\n }\n\n variant.variations.forEach((variationProperty) => {\n const nameValueIdentifier = `${variationProperty.name}-${variationProperty.values[0]}`\n\n if (previouslySeenPropertyValues.has(nameValueIdentifier)) {\n return\n }\n\n previouslySeenPropertyValues.add(nameValueIdentifier)\n\n const variantImageToUse = findSkuVariantImage(\n variant.images,\n variationProperty.name\n )\n\n const formattedVariant = {\n src: variantImageToUse.imageUrl,\n alt: variantImageToUse.imageText ?? '',\n label: `${variationProperty.name}: ${variationProperty.values[0]}`,\n value: variationProperty.values[0],\n }\n\n if (variantsByName[variationProperty.name]) {\n variantsByName[variationProperty.name].push(formattedVariant)\n } else {\n variantsByName[variationProperty.name] = [formattedVariant]\n }\n })\n })\n\n return sortVariants(variantsByName)\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport {\n createSlugsMap,\n getActiveSkuVariations,\n getFormattedVariations,\n getVariantsByName,\n} from '../utils/skuVariants'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.isVariantOf>>\n\ntype SlugsMapArgs = {\n dominantVariantName: string\n}\n\nexport const SkuVariants: Record<string, GraphqlResolver<Root>> = {\n activeVariations: (root) => getActiveSkuVariations(root.variations),\n allVariantsByName: (root) =>\n getVariantsByName(root.isVariantOf.skuSpecifications),\n\n slugsMap: (root, args) =>\n createSlugsMap(\n root.isVariantOf.items,\n (args as SlugsMapArgs).dominantVariantName ?? root.variations[0]?.name,\n root.isVariantOf.linkText\n ),\n\n availableVariations: (root, args) => {\n const dominantVariantName =\n (args as SlugsMapArgs).dominantVariantName ?? root.variations[0]?.name\n const activeVariations = getActiveSkuVariations(root.variations)\n\n const activeDominantVariationValue = activeVariations[dominantVariantName]\n\n const filteredFormattedVariations = getFormattedVariations(\n root.isVariantOf.items,\n dominantVariantName,\n activeDominantVariationValue\n )\n\n return filteredFormattedVariations\n },\n allVariantProducts: (root) =>\n root.isVariantOf.items.map((item) => enhanceSku(item, root.isVariantOf)),\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type {\n Maybe,\n UserOrderCustomField,\n UserOrderDeliveryOption,\n UserOrderPriceTag,\n} from '../../..'\nimport type { Query } from './query'\nimport { getLocalizedEstimates } from './shippingSLA'\n\ntype QueryUserOrder = PromiseType<ReturnType<typeof Query.userOrder>>\n\nexport type Root = QueryUserOrder\n\nconst deliveryChannelsMapping = {\n ['pickup-in-point']: 'Pickup',\n delivery: 'Delivery',\n pickup: 'Pickup',\n ['take-away']: 'Take away',\n ['']: '',\n} as const\n\nexport const UserOrderResult: Record<string, GraphqlResolver<Root>> = {\n deliveryOptionsData: (root) => {\n const { shippingData, items } = root\n const logisticsInfo = shippingData?.logisticsInfo || []\n const addresses = shippingData?.selectedAddresses ||\n shippingData?.availableAddresses || [shippingData?.address]\n\n const groupedDeliveryOptions = logisticsInfo.reduce(\n (acc, logisticsItem) => {\n const selectedSla = logisticsItem?.selectedSla || '' // Normal / Express\n const deliveryChannel =\n logisticsItem?.selectedDeliveryChannel ||\n logisticsItem?.deliveryChannel ||\n ''\n const deliveryCompany = logisticsItem?.deliveryCompany || '' // Correios / Fedex\n const deliveryWindow = logisticsItem?.deliveryWindow\n const pickupStoreInfo = logisticsItem?.pickupStoreInfo\n const shippingEstimate = logisticsItem?.shippingEstimate || '' // 1bd\n const friendlyShippingEstimate = logisticsItem?.shippingEstimate\n ? getLocalizedEstimates(logisticsItem?.shippingEstimate) // e.g. transform 3bd into Up to 3 business days\n : ''\n\n const shippingEstimateDate = logisticsItem?.shippingEstimateDate || '' // 2023-10-02T00:00:00Z\n const addressId = logisticsItem?.addressId || '' // 5230338247839\n\n const itemIndex = logisticsItem?.itemIndex ?? 0\n const item = items?.[itemIndex]\n const seller = item?.seller || ''\n\n const groupKey = `${selectedSla}|${deliveryChannel}|${deliveryCompany}|${seller}|${shippingEstimate}|${shippingEstimateDate}|${addressId}|${deliveryWindow?.startDateUtc}|${deliveryWindow?.endDateUtc}`\n\n const address = addresses?.find(\n (address) => address?.addressId === addressId\n )\n\n const friendlyDeliveryOptionName =\n `${deliveryChannelsMapping[deliveryChannel as keyof typeof deliveryChannelsMapping] || ''} ${friendlyShippingEstimate} ${address?.neighborhood ? `to ${address?.neighborhood}` : ''}`.trim()\n\n // TODO check other totals like bundleItems etc\n const { taxPriceTagsTotal, taxPriceTags } = filterTaxPriceTags(\n (item?.priceTags ?? []) as UserOrderPriceTag[]\n )\n\n const itemTotal =\n (item?.sellingPrice ?? 0) * (item?.quantity ?? 0) +\n (item?.tax ?? 0) +\n (taxPriceTagsTotal ?? 0)\n\n if (!acc[groupKey]) {\n acc[groupKey] = {\n // static fields\n selectedSla,\n deliveryChannel,\n deliveryCompany,\n deliveryWindow,\n shippingEstimate,\n shippingEstimateDate,\n seller,\n friendlyShippingEstimate,\n friendlyDeliveryOptionName,\n address,\n pickupStoreInfo,\n // dynamic fields\n quantityOfDifferentItems: 0,\n total: 0,\n items: [],\n }\n }\n\n if (acc[groupKey]) {\n acc[groupKey].items?.push({\n id: item?.id || '',\n uniqueId: item?.uniqueId || '',\n name: item?.name || '',\n quantity: item?.quantity || 0,\n price: item?.price || 0,\n sellingPrice: item?.sellingPrice || 0,\n imageUrl: item?.imageUrl || '',\n taxPriceTags: taxPriceTags ?? [],\n taxPriceTagsTotal: taxPriceTagsTotal ?? 0,\n tax: item?.tax || 0,\n total: itemTotal,\n })\n\n acc[groupKey].quantityOfDifferentItems =\n (acc[groupKey].quantityOfDifferentItems ?? 0) + 1\n acc[groupKey].total = (acc[groupKey].total ?? 0) + itemTotal\n }\n\n return acc\n },\n {} as Record<string, UserOrderDeliveryOption>\n )\n\n const deliveryOptions = Object.values(groupedDeliveryOptions)\n\n const contactInformation = shippingData?.contactInformation?.[0]\n const contact = {\n name:\n `${contactInformation?.firstName ?? ''} ${contactInformation?.lastName ?? ''}`.trim() ||\n deliveryOptions?.[0]?.address?.receiverName ||\n '',\n email: contactInformation?.email || '',\n phone: contactInformation?.phone || '',\n }\n\n return {\n deliveryOptions,\n contact,\n }\n },\n customFields: (root) => {\n const customFields = root?.customData?.customFields || []\n return (\n Object.values(\n customFields.reduce(\n (\n acc: Record<\n string,\n {\n type: string\n id: string\n fields: UserOrderCustomField['fields']\n }\n >,\n entry: Maybe<UserOrderCustomField>\n ) => {\n const type = entry?.linkedEntity?.type || ''\n const id = entry?.linkedEntity?.id || ''\n const key = `${type}|${id || ''}`\n if (!acc[key]) {\n acc[key] = { type, id, fields: [] }\n }\n acc[key].fields.push(...(entry?.fields || []))\n return acc\n },\n {}\n )\n ) || []\n )\n // Example of custom fields\n // return [\n // {\n // type: 'item',\n // id: '9009169',\n // fields: [\n // {\n // name: 'costCenter',\n // value: 'CC1',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'item',\n // id: 'ECEAC03EBA2B4BBFA7E899CD4CA5121B',\n // fields: [\n // {\n // name: 'costCenter',\n // value: 'CC2',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'address',\n // id: 'work-A1',\n // fields: [\n // {\n // name: 'desktop',\n // value: 'A1',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'order',\n // id: '',\n // fields: [\n // {\n // name: 'poNumber',\n // value: '111222333',\n // refId: 'externalId',\n // },\n // {\n // name: 'release',\n // value: '123',\n // refId: 'externalId',\n // },\n // ],\n // },\n // ]\n },\n}\n\n// logic copied from https://github.com/vtex/my-orders/blob/3271bdd4216851fb21b64093769d73183868e362/react/components/Order/ChangeSummary/ChangeV2/shared/filterPriceTags.js#L59-L60\nexport function filterTaxPriceTags(priceTags: UserOrderPriceTag[]) {\n const multiplier = 100\n\n const taxPriceTags = priceTags.filter((priceTag) =>\n priceTag?.name?.includes('TAX')\n )\n\n const taxPriceTagsTotal = taxPriceTags.reduce(\n (acc, curr) => acc + (curr.rawValue ? curr.rawValue * multiplier : 0),\n 0\n )\n\n return {\n taxPriceTags,\n taxPriceTagsTotal,\n }\n}\n","import { StoreAggregateOffer } from './aggregateOffer'\nimport { StoreAggregateRating } from './aggregateRating'\nimport { StoreCollection } from './collection'\nimport { StoreFacet, StoreFacetBoolean, StoreFacetRange } from './facet'\nimport { StoreFacetValueBoolean } from './faceValue'\nimport { Mutation } from './mutation'\nimport { ObjectOrString } from './objectOrString'\nimport { StoreOffer } from './offer'\nimport { StoreProduct } from './product'\nimport { StoreProductGroup } from './productGroup'\nimport { StorePropertyValue } from './propertyValue'\nimport { Query } from './query'\nimport { StoreReview } from './review'\nimport { StoreSearchResult } from './searchResult'\nimport { StoreSeo } from './seo'\nimport { ShippingSLA } from './shippingSLA'\nimport { SkuVariants } from './skuVariations'\nimport { UserOrderResult } from './userOrder'\n\nconst VtexResolvers = {\n StoreCollection,\n StoreAggregateOffer,\n StoreProduct,\n StoreSeo,\n StoreFacet,\n StoreFacetBoolean,\n StoreFacetRange,\n StoreFacetValueBoolean,\n StoreOffer,\n StoreAggregateRating,\n StoreReview,\n StoreProductGroup,\n StoreSearchResult,\n StorePropertyValue,\n SkuVariants,\n ShippingSLA,\n UserOrderResult,\n ObjectOrString,\n Query,\n Mutation,\n}\n\nexport const getResolvers = () => VtexResolvers\n","export default \"\\\"\\\"\\\"\\nAddress information.\\n\\\"\\\"\\\"\\ntype Address {\\n \\\"\\\"\\\"\\n Address postal code\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Address city\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Address state\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n Address country\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n Address street\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n Address number\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n Address neighborhood\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n Address complement\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n Address reference\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n Address geoCoordinates\\n \\\"\\\"\\\"\\n geoCoordinates: [Float]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAdvertisement information about a specific product in a campaign\\n\\\"\\\"\\\"\\ntype Advertisement {\\n \\\"\\\"\\\"\\n Advertiser ID of the product.\\n \\\"\\\"\\\"\\n adId: String!\\n \\\"\\\"\\\"\\n Campaign ID.\\n \\\"\\\"\\\"\\n campaignId: String!\\n \\\"\\\"\\\"\\n Cost of the action, usually Cost Per Click.\\n \\\"\\\"\\\"\\n actionCost: Float!\\n \\\"\\\"\\\"\\n Advertiser Request ID.\\n \\\"\\\"\\\"\\n adRequestId: String!\\n \\\"\\\"\\\"\\n Advertiser Response ID.\\n \\\"\\\"\\\"\\n adResponseId: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.\\n\\\"\\\"\\\"\\ntype StoreAggregateOffer {\\n \\\"\\\"\\\"\\n Highest price among all sellers.\\n \\\"\\\"\\\"\\n highPrice: Float!\\n \\\"\\\"\\\"\\n Lowest price among all sellers.\\n \\\"\\\"\\\"\\n lowPrice: Float!\\n \\\"\\\"\\\"\\n Lowest price among all sellers with current taxes.\\n \\\"\\\"\\\"\\n lowPriceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Number of sellers selling this SKU.\\n \\\"\\\"\\\"\\n offerCount: Int!\\n \\\"\\\"\\\"\\n ISO code of the currency used for the offer prices.\\n \\\"\\\"\\\"\\n priceCurrency: String!\\n \\\"\\\"\\\"\\n Array with information on each available offer.\\n \\\"\\\"\\\"\\n offers: [StoreOffer!]!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAverage rating, based on multiple ratings or reviews.\\n\\\"\\\"\\\"\\ntype StoreAggregateRating {\\n \\\"\\\"\\\"\\n Value of the aggregate rating.\\n \\\"\\\"\\\"\\n ratingValue: Float!\\n \\\"\\\"\\\"\\n Total number of ratings.\\n \\\"\\\"\\\"\\n reviewCount: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\ninformation about the author of a product review or rating.\\n\\\"\\\"\\\"\\ntype StoreAuthor {\\n \\\"\\\"\\\"\\n Author name.\\n \\\"\\\"\\\"\\n name: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nBrand of a given product.\\n\\\"\\\"\\\"\\ntype StoreBrand {\\n \\\"\\\"\\\"\\n Brand name.\\n \\\"\\\"\\\"\\n name: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nItem of a list.\\n\\\"\\\"\\\"\\ntype StoreListItem {\\n \\\"\\\"\\\"\\n List item value.\\n \\\"\\\"\\\"\\n item: String!\\n \\\"\\\"\\\"\\n Name of the list item.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Position of the item in the list.\\n \\\"\\\"\\\"\\n position: Int!\\n}\\n\\n\\\"\\\"\\\"\\nList of items consisting of chain linked web pages, ending with the current page.\\n\\\"\\\"\\\"\\ntype StoreBreadcrumbList {\\n \\\"\\\"\\\"\\n Array with breadcrumb elements.\\n \\\"\\\"\\\"\\n itemListElement: [StoreListItem!]!\\n \\\"\\\"\\\"\\n Number of breadcrumbs in the list.\\n \\\"\\\"\\\"\\n numberOfItems: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nShopping cart message.\\n\\\"\\\"\\\"\\ntype StoreCartMessage {\\n \\\"\\\"\\\"\\n Shopping cart message text.\\n \\\"\\\"\\\"\\n text: String!\\n \\\"\\\"\\\"\\n Shopping cart message status, which can be `INFO`, `WARNING` or `ERROR`.\\n \\\"\\\"\\\"\\n status: StoreStatus!\\n}\\n\\n\\\"\\\"\\\"\\nShopping cart information.\\n\\\"\\\"\\\"\\ntype StoreCart {\\n \\\"\\\"\\\"\\n Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`.\\n \\\"\\\"\\\"\\n order: StoreOrder!\\n \\\"\\\"\\\"\\n List of shopping cart messages.\\n \\\"\\\"\\\"\\n messages: [StoreCartMessage!]!\\n}\\n\\n\\\"\\\"\\\"\\nShopping cart input.\\n\\\"\\\"\\\"\\ninput IStoreCart {\\n \\\"\\\"\\\"\\n Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`.\\n \\\"\\\"\\\"\\n order: IStoreOrder!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct collection type. Possible values are `Department`, `Category`, `Brand` or `Collection`.\\n\\n`SubCategory` and `Cluster` are still declared for backward compatibility but are\\ndeprecated and never returned.\\n\\\"\\\"\\\"\\nenum StoreCollectionType {\\n \\\"\\\"\\\"\\n First level of product categorization.\\n \\\"\\\"\\\"\\n Department\\n \\\"\\\"\\\"\\n Second level of product categorization.\\n \\\"\\\"\\\"\\n Category\\n \\\"\\\"\\\"\\n Third level of product categorization.\\n\\n Deprecated: never returned — third-level categories resolve as `Category`.\\n \\\"\\\"\\\"\\n SubCategory\\n @deprecated(\\n reason: \\\"Never returned since the by-linkid migration: the category response only exposes `fatherCategoryId`, which distinguishes root from non-root but not tree depth, so third-level categories resolve as `Category`. Scheduled for removal in the next major.\\\"\\n )\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n Brand\\n \\\"\\\"\\\"\\n Product cluster.\\n\\n Deprecated: never returned — clusters resolve as `Collection`.\\n \\\"\\\"\\\"\\n Cluster\\n @deprecated(\\n reason: \\\"Never returned since the by-linkid migration: clusters and curated collections are both served by `collection/by-linkid`, whose response carries no discriminator between them, so both resolve as `Collection`. Scheduled for removal in the next major.\\\"\\n )\\n \\\"\\\"\\\"\\n Product collection.\\n \\\"\\\"\\\"\\n Collection\\n}\\n\\n\\\"\\\"\\\"\\nProduct collection facet, used for search.\\n\\\"\\\"\\\"\\ntype StoreCollectionFacet {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet value.\\n \\\"\\\"\\\"\\n value: String!\\n}\\n\\n\\\"\\\"\\\"\\nCollection meta information. Used for search.\\n\\\"\\\"\\\"\\ntype StoreCollectionMeta {\\n \\\"\\\"\\\"\\n List of selected collection facets.\\n \\\"\\\"\\\"\\n selectedFacets: [StoreCollectionFacet!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct collection information.\\n\\\"\\\"\\\"\\ntype StoreCollection {\\n \\\"\\\"\\\"\\n Meta tag data.\\n \\\"\\\"\\\"\\n seo: StoreSeo!\\n \\\"\\\"\\\"\\n List of items consisting of chain linked web pages, ending with the current page.\\n \\\"\\\"\\\"\\n breadcrumbList: StoreBreadcrumbList!\\n \\\"\\\"\\\"\\n Collection meta information. Used for search.\\n \\\"\\\"\\\"\\n meta: StoreCollectionMeta!\\n \\\"\\\"\\\"\\n Collection ID.\\n \\\"\\\"\\\"\\n id: ID!\\n \\\"\\\"\\\"\\n Corresponding collection URL slug, with which to retrieve this entity.\\n \\\"\\\"\\\"\\n slug: String!\\n \\\"\\\"\\\"\\n Collection type.\\n \\\"\\\"\\\"\\n type: StoreCollectionType!\\n \\\"\\\"\\\"\\n Localized versions of this collection for all available locales.\\n Only announces slugs the catalog has registered for each locale, so it is safe\\n to build hreflang annotations from. Only populated when localization is\\n enabled.\\n \\\"\\\"\\\"\\n otherLocales: [StoreCollectionLocale!]\\n \\\"\\\"\\\"\\n Slug the catalog resolves for the requested locale, lowercased.\\n Meant for the page's canonical URL: `slug` echoes the path the shopper\\n visited, and by-linkid matches case-insensitively, so without this every\\n casing variant would claim to be canonical. Unlike `otherLocales`, it may fall\\n back to a slug registered for another locale, so it must never be used to\\n build hreflang annotations.\\n \\\"\\\"\\\"\\n canonicalSlug: String\\n}\\n\\n\\\"\\\"\\\"\\nLocalized collection data for a specific locale.\\n\\\"\\\"\\\"\\ntype StoreCollectionLocale {\\n \\\"\\\"\\\"\\n Locale code (e.g. \\\"pt-BR\\\", \\\"it-IT\\\").\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Localized collection slug (e.g. \\\"vestuario/camisetas\\\").\\n \\\"\\\"\\\"\\n slug: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nDelivery Promise badge.\\n\\\"\\\"\\\"\\ntype DeliveryPromiseBadge {\\n \\\"\\\"\\\"\\n Badge type.\\n \\\"\\\"\\\"\\n typeName: String\\n}\\n\"","export default \"union StoreFacet = StoreFacetRange | StoreFacetBoolean\\n\\n\\\"\\\"\\\"\\nSearch facet range information.\\n\\\"\\\"\\\"\\ntype StoreFacetRange {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Minimum facet range value.\\n \\\"\\\"\\\"\\n min: StoreFacetValueRange!\\n \\\"\\\"\\\"\\n Maximum facet range value.\\n \\\"\\\"\\\"\\n max: StoreFacetValueRange!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet boolean information.\\n\\\"\\\"\\\"\\ntype StoreFacetBoolean {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Array with information on each facet value.\\n \\\"\\\"\\\"\\n values: [StoreFacetValueBoolean!]!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet range value information. Used for minimum and maximum range values.\\n\\\"\\\"\\\"\\ntype StoreFacetValueRange {\\n \\\"\\\"\\\"\\n Search facet range absolute value.\\n \\\"\\\"\\\"\\n absolute: Float!\\n \\\"\\\"\\\"\\n Search facet range selected value.\\n \\\"\\\"\\\"\\n selected: Float!\\n}\\n\\n\\\"\\\"\\\"\\nInformation of a specific facet value.\\n\\\"\\\"\\\"\\ntype StoreFacetValueBoolean {\\n \\\"\\\"\\\"\\n Facet value.\\n \\\"\\\"\\\"\\n value: String!\\n \\\"\\\"\\\"\\n Facet value label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Indicates whether facet is selected.\\n \\\"\\\"\\\"\\n selected: Boolean!\\n \\\"\\\"\\\"\\n Number of items with this facet.\\n \\\"\\\"\\\"\\n quantity: Int\\n}\\n\"","export default \"\\\"\\\"\\\"\\nImage.\\n\\\"\\\"\\\"\\ntype StoreImage {\\n \\\"\\\"\\\"\\n Image URL.\\n \\\"\\\"\\\"\\n url: String!\\n \\\"\\\"\\\"\\n Alias for the image.\\n \\\"\\\"\\\"\\n alternateName: String!\\n}\\n\\n\\\"\\\"\\\"\\nImage input.\\n\\\"\\\"\\\"\\ninput IStoreImage {\\n \\\"\\\"\\\"\\n Image input URL.\\n \\\"\\\"\\\"\\n url: String!\\n \\\"\\\"\\\"\\n Alias for the input image.\\n \\\"\\\"\\\"\\n alternateName: String!\\n}\\n\"","export default \"type Mutation {\\n \\\"\\\"\\\"\\n Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns `null`.\\n \\\"\\\"\\\"\\n validateCart(cart: IStoreCart!, session: IStoreSession): StoreCart\\n \\\"\\\"\\\"\\n Updates a web session with the specified values.\\n \\\"\\\"\\\"\\n validateSession(session: IStoreSession!, search: String!): StoreSession\\n \\\"\\\"\\\"\\n Subscribes a new person to the newsletter list.\\n \\\"\\\"\\\"\\n subscribeToNewsletter(data: IPersonNewsletter!): PersonNewsletter\\n \\\"\\\"\\\"\\n Cancels user order\\n \\\"\\\"\\\"\\n cancelOrder(data: IUserOrderCancel!): UserOrderCancel\\n \\\"\\\"\\\"\\n Process Order Authorization\\n \\\"\\\"\\\"\\n processOrderAuthorization(\\n data: IProcessOrderAuthorization!\\n ): ProcessOrderAuthorizationResponse\\n \\\"\\\"\\\"\\n Uploads a file to the Order Entry Service and returns the S3 object key.\\n The file must be Base64-encoded and passed via the `data` input.\\n The returned `objectKey` is required to start an order entry operation.\\n \\\"\\\"\\\"\\n uploadFileToOrderEntry(data: IOrderEntryUpload!): StoreOrderEntryUploadResult\\n @auth\\n \\\"\\\"\\\"\\n Submits an uploaded file for bulk import into a VTEX cart via the Order Entry Service.\\n Returns an operationId to poll for the operation status.\\n \\\"\\\"\\\"\\n startOrderEntryOperation(\\n data: IOrderEntryOperation!\\n ): StoreOrderEntryOperationResult @auth\\n \\\"\\\"\\\"\\n Starts an anonymous personalization session for the current shopper.\\n \\\"\\\"\\\"\\n startRecommendationSession: Boolean!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nNewsletter information.\\n\\\"\\\"\\\"\\ntype PersonNewsletter {\\n \\\"\\\"\\\"\\n Person's ID in the newsletter list.\\n \\\"\\\"\\\"\\n id: String!\\n}\\n\\n\\\"\\\"\\\"\\nPerson data input to the newsletter.\\n\\\"\\\"\\\"\\ninput IPersonNewsletter {\\n \\\"\\\"\\\"\\n Person's name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Person's email.\\n \\\"\\\"\\\"\\n email: String!\\n}\\n\"","export default \"scalar ObjectOrString\\n\"","export default \"\\\"\\\"\\\"\\nOffer information.\\n\\\"\\\"\\\"\\ntype StoreOffer {\\n \\\"\\\"\\\"\\n This is displayed as the \\\"from\\\" price in the context of promotions' price comparison. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n listPrice: Float!\\n \\\"\\\"\\\"\\n List price among with current taxes.\\n \\\"\\\"\\\"\\n listPriceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n sellingPrice: Float!\\n \\\"\\\"\\\"\\n ISO code of the currency used for the offer prices.\\n \\\"\\\"\\\"\\n priceCurrency: String!\\n \\\"\\\"\\\"\\n Also known as spot price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n Also known as spot price with taxes.\\n \\\"\\\"\\\"\\n priceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.\\n \\\"\\\"\\\"\\n priceValidUntil: String!\\n \\\"\\\"\\\"\\n Offer item condition.\\n \\\"\\\"\\\"\\n itemCondition: String!\\n \\\"\\\"\\\"\\n Offer item availability.\\n \\\"\\\"\\\"\\n availability: String!\\n \\\"\\\"\\\"\\n Seller responsible for the offer.\\n \\\"\\\"\\\"\\n seller: StoreOrganization!\\n \\\"\\\"\\\"\\n Information on the item being offered.\\n \\\"\\\"\\\"\\n itemOffered: StoreProduct!\\n \\\"\\\"\\\"\\n Number of items offered.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Whether this offer is a gift (e.g. free promotional item).\\n \\\"\\\"\\\"\\n isGift: Boolean\\n \\\"\\\"\\\"\\n Signed price token (JWT) used by the Pricing Fallback feature. When present, it should be\\n forwarded to Checkout on add-to-cart so the platform can trust the offer's price even if\\n the Pricing System is unavailable. May be null when the signing step fails or the feature is disabled.\\n \\\"\\\"\\\"\\n priceToken: String\\n}\\n\\n\\\"\\\"\\\"\\nOffer input.\\n\\\"\\\"\\\"\\ninput IStoreOffer {\\n \\\"\\\"\\\"\\n Also known as spot price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n This is displayed as the \\\"from\\\" price in the context of promotions' price comparison. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n listPrice: Float!\\n \\\"\\\"\\\"\\n Seller responsible for the offer.\\n \\\"\\\"\\\"\\n seller: IStoreOrganization!\\n \\\"\\\"\\\"\\n Information on the item being offered.\\n \\\"\\\"\\\"\\n itemOffered: IStoreProduct!\\n \\\"\\\"\\\"\\n Number of items offered.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Signed price token (JWT) from the Pricing Fallback feature, forwarded to Checkout on add-to-cart.\\n \\\"\\\"\\\"\\n priceToken: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInformation of a specific order.\\n\\\"\\\"\\\"\\ntype StoreOrder {\\n \\\"\\\"\\\"\\n ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).\\n \\\"\\\"\\\"\\n orderNumber: String!\\n \\\"\\\"\\\"\\n Array with information on each accepted offer.\\n \\\"\\\"\\\"\\n acceptedOffer: [StoreOffer!]!\\n \\\"\\\"\\\"\\n Indicates whether or not items with attachments should be split.\\n \\\"\\\"\\\"\\n shouldSplitItem: Boolean\\n \\\"\\\"\\\"\\n Sales channel of the underlying orderForm when FastStore adopted it because\\n the browser session was stale (e.g. after Quick Order). Clients should align\\n `session.channel` to this value. Null when no SC adoption happened.\\n \\\"\\\"\\\"\\n salesChannel: String\\n}\\n\\n\\\"\\\"\\\"\\nOrder input.\\n\\\"\\\"\\\"\\ninput IStoreOrder {\\n \\\"\\\"\\\"\\n ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).\\n \\\"\\\"\\\"\\n orderNumber: String!\\n \\\"\\\"\\\"\\n Array with information on each accepted offer.\\n \\\"\\\"\\\"\\n acceptedOffer: [IStoreOffer!]!\\n \\\"\\\"\\\"\\n Indicates whether or not items with attachments should be split.\\n \\\"\\\"\\\"\\n shouldSplitItem: Boolean\\n}\\n\"","export default \"\\\"\\\"\\\"\\nCommercial Authorization response.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationResponse {\\n \\\"\\\"\\\"\\n Commercial Authorization ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Order ID associated with the commercial authorization.\\n \\\"\\\"\\\"\\n orderId: String!\\n \\\"\\\"\\\"\\n Workflow instance ID.\\n \\\"\\\"\\\"\\n workflowInstanceId: String!\\n \\\"\\\"\\\"\\n Current status of the commercial authorization.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n List of units.\\n \\\"\\\"\\\"\\n units: [String!]!\\n \\\"\\\"\\\"\\n Callback endpoint URL.\\n \\\"\\\"\\\"\\n callbackEndpoint: String!\\n \\\"\\\"\\\"\\n Total order value desired by the seller.\\n \\\"\\\"\\\"\\n totalOrderValueDesiredBySeller: Float!\\n \\\"\\\"\\\"\\n Marketplace payment value.\\n \\\"\\\"\\\"\\n marketPlacePaymentValue: Float!\\n \\\"\\\"\\\"\\n Collection of items in the commercial authorization.\\n \\\"\\\"\\\"\\n itemCollection: [CommercialAuthorizationItem!]!\\n \\\"\\\"\\\"\\n Additional information as key-value pairs.\\n \\\"\\\"\\\"\\n additionalInfo: JSONObject!\\n \\\"\\\"\\\"\\n Dimension status information.\\n \\\"\\\"\\\"\\n dimensionStatus: [CommercialAuthorizationDimensionStatus!]!\\n \\\"\\\"\\\"\\n Creation version.\\n \\\"\\\"\\\"\\n creationVersion: String!\\n \\\"\\\"\\\"\\n Creation environment.\\n \\\"\\\"\\\"\\n creationEnvironment: String!\\n \\\"\\\"\\\"\\n User profile ID.\\n \\\"\\\"\\\"\\n userProfileId: String!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization status.\\n\\\"\\\"\\\"\\nenum CommercialAuthorizationStatus {\\n \\\"\\\"\\\"\\n Authorization is pending.\\n \\\"\\\"\\\"\\n pending\\n \\\"\\\"\\\"\\n Authorization has been accepted.\\n \\\"\\\"\\\"\\n accepted\\n \\\"\\\"\\\"\\n Authorization has been denied.\\n \\\"\\\"\\\"\\n denied\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization item.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationItem {\\n \\\"\\\"\\\"\\n Item ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Item SKU.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Item price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n Total system discount applied.\\n \\\"\\\"\\\"\\n totalSystemDiscount: Float!\\n \\\"\\\"\\\"\\n Total manual discount applied.\\n \\\"\\\"\\\"\\n totalManualDiscount: Float!\\n \\\"\\\"\\\"\\n Item quantity.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Additional information as key-value pairs.\\n \\\"\\\"\\\"\\n additionalInfo: JSONObject!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization dimension status.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationDimensionStatus {\\n \\\"\\\"\\\"\\n Dimension status ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Dimension status name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Unit ID, if applicable.\\n \\\"\\\"\\\"\\n unitId: String\\n \\\"\\\"\\\"\\n Current status of the dimension.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n Dimension score.\\n \\\"\\\"\\\"\\n score: Float!\\n \\\"\\\"\\\"\\n Priority level.\\n \\\"\\\"\\\"\\n priority: Int!\\n \\\"\\\"\\\"\\n Indicates if simulation should be performed.\\n \\\"\\\"\\\"\\n shouldSimulate: Boolean!\\n \\\"\\\"\\\"\\n Collection of rules for this dimension.\\n \\\"\\\"\\\"\\n ruleCollection: [CommercialAuthorizationRule!]!\\n \\\"\\\"\\\"\\n Creation date.\\n \\\"\\\"\\\"\\n creationDate: String!\\n \\\"\\\"\\\"\\n Creation version.\\n \\\"\\\"\\\"\\n creationVersion: String!\\n \\\"\\\"\\\"\\n Creation environment.\\n \\\"\\\"\\\"\\n creationEnvironment: String!\\n \\\"\\\"\\\"\\n Indicates if all rules acceptance is required.\\n \\\"\\\"\\\"\\n requireAllRulesAcceptance: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRule {\\n \\\"\\\"\\\"\\n Rule ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Rule name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Current status of the rule.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n DO ID, if applicable.\\n \\\"\\\"\\\"\\n doId: String\\n \\\"\\\"\\\"\\n List of authorized email addresses.\\n \\\"\\\"\\\"\\n authorizedEmails: [String!]!\\n \\\"\\\"\\\"\\n Rule priority.\\n \\\"\\\"\\\"\\n priority: Int!\\n \\\"\\\"\\\"\\n Rule trigger configuration.\\n \\\"\\\"\\\"\\n trigger: CommercialAuthorizationRuleTrigger!\\n \\\"\\\"\\\"\\n Timeout value.\\n \\\"\\\"\\\"\\n timeout: Int!\\n \\\"\\\"\\\"\\n Indicates if notification is enabled.\\n \\\"\\\"\\\"\\n notification: Boolean!\\n \\\"\\\"\\\"\\n Score interval configuration.\\n \\\"\\\"\\\"\\n scoreInterval: CommercialAuthorizationRuleScoreInterval!\\n \\\"\\\"\\\"\\n Authorization data, if available.\\n \\\"\\\"\\\"\\n authorizationData: CommercialAuthorizationRuleAuthorizationData\\n \\\"\\\"\\\"\\n Indicates that the user is listed as one of the possible approvers,\\n but does not necessarily mean that he or she is the next in the chain to approve.\\n \\\"\\\"\\\"\\n isUserAuthorized: Boolean!\\n \\\"\\\"\\\"\\n Indicates that the user is next in the approval chain.\\n This means that they must take an approval or rejection action.\\n \\\"\\\"\\\"\\n isUserNextAuthorizer: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTrigger {\\n \\\"\\\"\\\"\\n Trigger condition.\\n \\\"\\\"\\\"\\n condition: CommercialAuthorizationRuleTriggerCondition!\\n \\\"\\\"\\\"\\n Trigger effect.\\n \\\"\\\"\\\"\\n effect: CommercialAuthorizationRuleTriggerEffect!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger condition.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTriggerCondition {\\n \\\"\\\"\\\"\\n Condition type.\\n \\\"\\\"\\\"\\n conditionType: Int!\\n \\\"\\\"\\\"\\n Condition description.\\n \\\"\\\"\\\"\\n description: String\\n \\\"\\\"\\\"\\n Less than value.\\n \\\"\\\"\\\"\\n lessThan: Float\\n \\\"\\\"\\\"\\n Greater than value.\\n \\\"\\\"\\\"\\n greatherThan: Float\\n \\\"\\\"\\\"\\n Condition expression.\\n \\\"\\\"\\\"\\n expression: String\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger effect.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTriggerEffect {\\n \\\"\\\"\\\"\\n Effect description.\\n \\\"\\\"\\\"\\n description: String\\n \\\"\\\"\\\"\\n Effect type.\\n \\\"\\\"\\\"\\n effectType: Int!\\n \\\"\\\"\\\"\\n Function path.\\n \\\"\\\"\\\"\\n funcPath: String\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule score interval.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleScoreInterval {\\n \\\"\\\"\\\"\\n Accept score threshold.\\n \\\"\\\"\\\"\\n accept: Float!\\n \\\"\\\"\\\"\\n Deny score threshold.\\n \\\"\\\"\\\"\\n deny: Float!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule authorization data.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleAuthorizationData {\\n \\\"\\\"\\\"\\n Indicates if all approvals are required.\\n \\\"\\\"\\\"\\n requireAllApprovals: Boolean!\\n \\\"\\\"\\\"\\n List of authorizers.\\n \\\"\\\"\\\"\\n authorizers: [CommercialAuthorizationRuleAuthorizer!]!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule authorizer.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleAuthorizer {\\n \\\"\\\"\\\"\\n Authorizer ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Authorizer email.\\n \\\"\\\"\\\"\\n email: String\\n \\\"\\\"\\\"\\n Authorizer type.\\n \\\"\\\"\\\"\\n type: String!\\n \\\"\\\"\\\"\\n Authorization date.\\n \\\"\\\"\\\"\\n authorizationDate: String\\n}\\n\\n\\\"\\\"\\\"\\nInput to get commercial authorizations by order ID.\\n\\\"\\\"\\\"\\ninput ICommercialAuthorizationByOrderId {\\n \\\"\\\"\\\"\\n Order ID to get commercial authorizations for.\\n \\\"\\\"\\\"\\n orderId: String!\\n}\\n\\n\\\"\\\"\\\"\\nInput to process order authorization (approve or reject).\\n\\\"\\\"\\\"\\ninput IProcessOrderAuthorization {\\n \\\"\\\"\\\"\\n Order authorization ID.\\n \\\"\\\"\\\"\\n orderAuthorizationId: String!\\n \\\"\\\"\\\"\\n Rule ID associated with the authorization.\\n \\\"\\\"\\\"\\n ruleId: String!\\n \\\"\\\"\\\"\\n Dimension ID associated with the authorization.\\n \\\"\\\"\\\"\\n dimensionId: String!\\n \\\"\\\"\\\"\\n Whether the authorization is approved (true) or rejected (false).\\n \\\"\\\"\\\"\\n approved: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nProcess Order Authorization response.\\n\\\"\\\"\\\"\\ntype ProcessOrderAuthorizationResponse {\\n \\\"\\\"\\\"\\n Indicates if authorization is pending for other authorizers.\\n \\\"\\\"\\\"\\n isPendingForOtherAuthorizer: Boolean!\\n \\\"\\\"\\\"\\n The updated rule for authorization, if any.\\n \\\"\\\"\\\"\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n}\\n\\n\\\"\\\"\\\"\\nExtended Commercial Authorization rule with additional process context.\\n\\\"\\\"\\\"\\ntype ProcessOrderAuthorizationRule {\\n \\\"\\\"\\\"\\n Order authorization ID.\\n \\\"\\\"\\\"\\n orderAuthorizationId: String!\\n \\\"\\\"\\\"\\n Dimension ID.\\n \\\"\\\"\\\"\\n dimensionId: String!\\n \\\"\\\"\\\"\\n Base rule information.\\n \\\"\\\"\\\"\\n rule: CommercialAuthorizationRule!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInput for uploading a file to the Order Entry Service.\\nThe file is transmitted as a Base64-encoded string so it can travel\\nthrough the standard GraphQL JSON pipeline without multipart support.\\n\\\"\\\"\\\"\\ninput IOrderEntryUpload {\\n \\\"\\\"\\\"\\n Base64-encoded file content.\\n \\\"\\\"\\\"\\n fileContent: String!\\n \\\"\\\"\\\"\\n Original file name (e.g. \\\"order.csv\\\").\\n \\\"\\\"\\\"\\n fileName: String!\\n \\\"\\\"\\\"\\n MIME type of the file (e.g. \\\"text/csv\\\", \\\"image/png\\\").\\n \\\"\\\"\\\"\\n mimeType: String!\\n}\\n\\n\\\"\\\"\\\"\\nResult returned after uploading a file to the Order Entry Service.\\n\\\"\\\"\\\"\\ntype StoreOrderEntryUploadResult {\\n objectKey: String!\\n}\\n\\ninput IOrderEntryOperation {\\n objectKey: String!\\n orderFormId: String\\n sessionToken: String\\n}\\n\\ntype StoreOrderEntryOperationResult {\\n operationId: String!\\n}\\n\\ntype StoreOrderEntryMissingItem {\\n itemId: String!\\n itemName: String\\n reason: String!\\n}\\n\\ntype StoreOrderEntryOperationStatus {\\n status: String!\\n entityId: String\\n message: String\\n missingItems: [StoreOrderEntryMissingItem!]\\n}\\n\\ntype StoreOrderFormCartItem {\\n id: String!\\n name: String!\\n price: Int!\\n listPrice: Int!\\n quantity: Int!\\n imageUrl: String\\n availability: String!\\n seller: String!\\n unitMultiplier: Float\\n}\\n\"","export default \"\\\"\\\"\\\"\\nOrganization.\\n\\\"\\\"\\\"\\ntype StoreOrganization {\\n \\\"\\\"\\\"\\n Organization ID.\\n \\\"\\\"\\\"\\n identifier: String!\\n}\\n\\n\\\"\\\"\\\"\\nOrganization input.\\n\\\"\\\"\\\"\\ninput IStoreOrganization {\\n \\\"\\\"\\\"\\n Organization ID.\\n \\\"\\\"\\\"\\n identifier: String!\\n}\\n\\n\\\"\\\"\\\"\\nA commercial contract available to a buyer's Organization Unit.\\n\\\"\\\"\\\"\\ntype StoreContract {\\n \\\"\\\"\\\"\\n Contract identifier (the contract/scope ID associated with the Organization Unit).\\n \\\"\\\"\\\"\\n id: ID!\\n \\\"\\\"\\\"\\n Human-readable corporate name of the contract (resolved from MasterData).\\n \\\"\\\"\\\"\\n corporateName: String!\\n \\\"\\\"\\\"\\n Indicates whether this contract is the one currently active in the session.\\n \\\"\\\"\\\"\\n isActive: Boolean!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nWhenever you make a query that allows for pagination, such as `allProducts` or `allCollections`, you can check `StorePageInfo` to learn more about the complete set of items and use it to paginate your queries.\\n\\\"\\\"\\\"\\ntype StorePageInfo {\\n \\\"\\\"\\\"\\n Indicates whether there is at least one more page with items after the ones returned in the current query.\\n \\\"\\\"\\\"\\n hasNextPage: Boolean!\\n \\\"\\\"\\\"\\n Indicates whether there is at least one more page with items before the ones returned in the current query.\\n \\\"\\\"\\\"\\n hasPreviousPage: Boolean!\\n \\\"\\\"\\\"\\n Cursor corresponding to the first possible item.\\n \\\"\\\"\\\"\\n startCursor: String!\\n \\\"\\\"\\\"\\n Cursor corresponding to the last possible item.\\n \\\"\\\"\\\"\\n endCursor: String!\\n \\\"\\\"\\\"\\n Total number of items (products or collections), not pages.\\n \\\"\\\"\\\"\\n totalCount: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInput type for setting a new password.\\n\\\"\\\"\\\"\\ninput ISetPassword {\\n \\\"\\\"\\\"\\n The email of the user for whom the password is being set.\\n \\\"\\\"\\\"\\n email: String!\\n\\n \\\"\\\"\\\"\\n The new password to be set for the user.\\n \\\"\\\"\\\"\\n newPassword: String!\\n\\n \\\"\\\"\\\"\\n The current password of the user, required for verification before changing to the new password.\\n \\\"\\\"\\\"\\n currentPassword: String!\\n\\n \\\"\\\"\\\"\\n Optional access key for the user, used in some authentication flows.\\n \\\"\\\"\\\"\\n accesskey: String\\n\\n \\\"\\\"\\\"\\n Optional reCAPTCHA token for security verification.\\n \\\"\\\"\\\"\\n recaptcha: String\\n}\\n\\n\\\"\\\"\\\"\\nResponse type for setting a new password.\\n\\\"\\\"\\\"\\ntype SetPasswordResponse {\\n \\\"\\\"\\\"\\n Indicates whether the password was successfully set.\\n \\\"\\\"\\\"\\n success: Boolean!\\n \\\"\\\"\\\"\\n Message providing additional information about the operation.\\n \\\"\\\"\\\"\\n message: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nClient profile data.\\n\\\"\\\"\\\"\\ntype StorePerson {\\n \\\"\\\"\\\"\\n Client ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Client email.\\n \\\"\\\"\\\"\\n email: String!\\n \\\"\\\"\\\"\\n Client first name.\\n \\\"\\\"\\\"\\n givenName: String!\\n \\\"\\\"\\\"\\n Client last name.\\n \\\"\\\"\\\"\\n familyName: String!\\n}\\n\\n\\\"\\\"\\\"\\nClient profile data.\\n\\\"\\\"\\\"\\ninput IStorePerson {\\n \\\"\\\"\\\"\\n Client ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Client email.\\n \\\"\\\"\\\"\\n email: String!\\n \\\"\\\"\\\"\\n Client first name.\\n \\\"\\\"\\\"\\n givenName: String!\\n \\\"\\\"\\\"\\n Client last name.\\n \\\"\\\"\\\"\\n familyName: String!\\n}\\n\"","export default \"type PickupPointAddress {\\n \\\"\\\"\\\"\\n Address city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Address neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n Address number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n Address postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Address street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n Address state.\\n \\\"\\\"\\\"\\n state: String\\n}\\n\\ntype BusinessHour {\\n \\\"\\\"\\\"\\n Number that represents the day of the week.\\n \\\"\\\"\\\"\\n dayOfWeek: Int\\n \\\"\\\"\\\"\\n Business hour opening time.\\n \\\"\\\"\\\"\\n openingTime: String\\n \\\"\\\"\\\"\\n Business hour closing time.\\n \\\"\\\"\\\"\\n closingTime: String\\n}\\n\\ntype PickupPointDistance {\\n \\\"\\\"\\\"\\n Pickup point ID.\\n \\\"\\\"\\\"\\n pickupId: String\\n \\\"\\\"\\\"\\n Pickup point distance.\\n \\\"\\\"\\\"\\n distance: Float\\n \\\"\\\"\\\"\\n Pickup point name.\\n \\\"\\\"\\\"\\n pickupName: String\\n \\\"\\\"\\\"\\n Whether the pickup point is active.\\n \\\"\\\"\\\"\\n isActive: Boolean\\n \\\"\\\"\\\"\\n Pickup point address.\\n \\\"\\\"\\\"\\n address: PickupPointAddress\\n \\\"\\\"\\\"\\n Pickup point business hours.\\n \\\"\\\"\\\"\\n businessHours: [BusinessHour]\\n}\\n\\ntype PickupPoints {\\n \\\"\\\"\\\"\\n List of pickup point distances for the given location.\\n \\\"\\\"\\\"\\n pickupPointDistances: [PickupPointDistance]\\n \\\"\\\"\\\"\\n Hash of the pickup points data.\\n \\\"\\\"\\\"\\n pickupPointsHash: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ntype StoreProduct {\\n \\\"\\\"\\\"\\n Meta tag data.\\n \\\"\\\"\\\"\\n seo: StoreSeo!\\n \\\"\\\"\\\"\\n List of items consisting of chain linked web pages, ending with the current page.\\n \\\"\\\"\\\"\\n breadcrumbList: StoreBreadcrumbList!\\n \\\"\\\"\\\"\\n Corresponding collection URL slug, with which to retrieve this entity.\\n \\\"\\\"\\\"\\n slug: String!\\n \\\"\\\"\\\"\\n Product name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.\\n \\\"\\\"\\\"\\n productID: String!\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n brand: StoreBrand!\\n \\\"\\\"\\\"\\n Product description.\\n \\\"\\\"\\\"\\n description: String!\\n \\\"\\\"\\\"\\n Array of images.\\n \\\"\\\"\\\"\\n image(context: String = \\\"generic\\\", limit: Int = -1): [StoreImage!]!\\n \\\"\\\"\\\"\\n Aggregate offer information.\\n \\\"\\\"\\\"\\n offers: StoreAggregateOffer!\\n \\\"\\\"\\\"\\n Stock Keeping Unit. Merchant-specific ID for the product.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Global Trade Item Number.\\n \\\"\\\"\\\"\\n gtin: String!\\n \\\"\\\"\\\"\\n Manufacturer Part Number. Identifies the product to its manufacturer.\\n \\\"\\\"\\\"\\n mpn: String!\\n \\\"\\\"\\\"\\n Array with review information.\\n \\\"\\\"\\\"\\n review: [StoreReview!]!\\n \\\"\\\"\\\"\\n Aggregate ratings data.\\n \\\"\\\"\\\"\\n aggregateRating: StoreAggregateRating!\\n \\\"\\\"\\\"\\n Indicates product group related to this product.\\n \\\"\\\"\\\"\\n isVariantOf: StoreProductGroup!\\n \\\"\\\"\\\"\\n Array of additional properties.\\n \\\"\\\"\\\"\\n additionalProperty: [StorePropertyValue!]!\\n \\\"\\\"\\\"\\n The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601\\n \\\"\\\"\\\"\\n releaseDate: String!\\n \\\"\\\"\\\"\\n Sku Unit Multiplier\\n \\\"\\\"\\\"\\n unitMultiplier: Float\\n \\\"\\\"\\\"\\n Advertisement information about the product.\\n \\\"\\\"\\\"\\n advertisement: Advertisement\\n \\\"\\\"\\\"\\n Indicates whether the product has specifications.\\n \\\"\\\"\\\"\\n hasSpecifications: Boolean\\n \\\"\\\"\\\"\\n Indicate the specifications of a product.\\n \\\"\\\"\\\"\\n skuSpecifications: [SkuSpecification!]!\\n \\\"\\\"\\\"\\n Indicate the specifications of a group of SKUs.\\n \\\"\\\"\\\"\\n specificationGroups: [SpecificationGroup!]!\\n \\\"\\\"\\\"\\n Delivery Promise product's badge.\\n \\\"\\\"\\\"\\n deliveryPromiseBadges: [DeliveryPromiseBadge]\\n \\\"\\\"\\\"\\n Localized versions of this product for all available locales.\\n Only populated when localization is enabled.\\n \\\"\\\"\\\"\\n otherLocales: [StoreProductLocale!]\\n \\\"\\\"\\\"\\n Slug for the store's default locale, including the SKU ID suffix.\\n Navigation fallback for the locale selector when the target locale is absent\\n from `otherLocales`. Best-effort: it may point at a slug the catalog has not\\n registered for the default locale, so it must never be used to build hreflang\\n annotations. Only populated when localization is enabled.\\n \\\"\\\"\\\"\\n defaultLocaleSlug: String\\n}\\n\\n\\\"\\\"\\\"\\nLocalized product data for a specific locale.\\n\\\"\\\"\\\"\\ntype StoreProductLocale {\\n \\\"\\\"\\\"\\n Locale code (e.g. \\\"pt-BR\\\", \\\"it-IT\\\").\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Localized product slug including the SKU ID suffix (e.g. \\\"adidas-polo-uomo-65\\\").\\n \\\"\\\"\\\"\\n slug: String!\\n}\\n\\ntype SkuSpecification {\\n field: SKUSpecificationField!\\n values: [SKUSpecificationValue!]!\\n}\\n\\ntype SKUSpecificationValue {\\n name: String!\\n id: String\\n fieldId: String\\n originalName: String\\n}\\n\\ntype SKUSpecificationField {\\n name: String!\\n originalName: String\\n id: String\\n}\\n\\ntype SpecificationGroup {\\n name: String!\\n originalName: String!\\n specifications: [Specification!]!\\n}\\n\\ntype Specification {\\n name: String!\\n originalName: String!\\n values: [String!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ninput IStoreProduct {\\n \\\"\\\"\\\"\\n Stock Keeping Unit. Merchant-specific ID for the product.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Product name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Array of product images.\\n \\\"\\\"\\\"\\n image: [IStoreImage!]!\\n \\\"\\\"\\\"\\n Custom Product Additional Properties.\\n \\\"\\\"\\\"\\n additionalProperty: [IStorePropertyValue!]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ntype StoreProductGroup {\\n \\\"\\\"\\\"\\n Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#).\\n \\\"\\\"\\\"\\n hasVariant: [StoreProduct!]!\\n \\\"\\\"\\\"\\n Product group ID.\\n \\\"\\\"\\\"\\n productGroupID: String!\\n \\\"\\\"\\\"\\n Product group name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Array of additional properties.\\n \\\"\\\"\\\"\\n additionalProperty: [StorePropertyValue!]!\\n \\\"\\\"\\\"\\n Object containing data structures to facilitate handling different SKU\\n variant properties. Specially useful for implementing SKU selection \\n components.\\n \\\"\\\"\\\"\\n skuVariants: SkuVariants\\n}\\n\"","export default \"type Profile {\\n \\\"\\\"\\\"\\n Collection of user's address\\n \\\"\\\"\\\"\\n addresses: [ProfileAddress]\\n}\\n\\ntype ProfileAddress {\\n \\\"\\\"\\\"\\n ProfileAddress address name/id.\\n \\\"\\\"\\\"\\n addressName: String\\n \\\"\\\"\\\"\\n ProfileAddress address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n ProfileAddress postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n ProfileAddress city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n ProfileAddress state.\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n ProfileAddress country.\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n ProfileAddress street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n ProfileAddress number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n ProfileAddress neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n ProfileAddress complement.\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n ProfileAddress reference.\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n ProfileAddress receiver name.\\n \\\"\\\"\\\"\\n receiverName: String\\n \\\"\\\"\\\"\\n ProfileAddress geo coordinate.\\n \\\"\\\"\\\"\\n geoCoordinate: [Float]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProperties that can be associated with products and products groups.\\n\\\"\\\"\\\"\\ntype StorePropertyValue {\\n \\\"\\\"\\\"\\n Property id. This propert changes according to the content of the object.\\n \\\"\\\"\\\"\\n propertyID: String!\\n \\\"\\\"\\\"\\n Property value. May hold a string or the string representation of an object.\\n \\\"\\\"\\\"\\n value: ObjectOrString!\\n \\\"\\\"\\\"\\n Property name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Specifies the nature of the value\\n \\\"\\\"\\\"\\n valueReference: ObjectOrString!\\n}\\n\\ninput IStorePropertyValue {\\n \\\"\\\"\\\"\\n Property id. This propert changes according to the content of the object.\\n \\\"\\\"\\\"\\n propertyID: String\\n \\\"\\\"\\\"\\n Property value. May hold a string or the string representation of an object.\\n \\\"\\\"\\\"\\n value: ObjectOrString!\\n \\\"\\\"\\\"\\n Property name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Specifies the nature of the value\\n \\\"\\\"\\\"\\n valueReference: ObjectOrString!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nEach product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.\\n\\\"\\\"\\\"\\ntype StoreProductEdge {\\n \\\"\\\"\\\"\\n Each product node contains the information of a product returned by the query.\\n \\\"\\\"\\\"\\n node: StoreProduct!\\n \\\"\\\"\\\"\\n Product cursor. Used as pagination reference.\\n \\\"\\\"\\\"\\n cursor: String!\\n}\\n\\n\\\"\\\"\\\"\\nProduct connections, including pagination information and products returned by the query.\\n\\\"\\\"\\\"\\ntype StoreProductConnection {\\n \\\"\\\"\\\"\\n Product pagination information.\\n \\\"\\\"\\\"\\n pageInfo: StorePageInfo!\\n \\\"\\\"\\\"\\n Array with product connection edges, each containing a product and a corresponding cursor.\\n \\\"\\\"\\\"\\n edges: [StoreProductEdge!]!\\n}\\n\\n\\\"\\\"\\\"\\nEach collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.\\n\\\"\\\"\\\"\\ntype StoreCollectionEdge {\\n \\\"\\\"\\\"\\n Each collection node contains the information of a product collection returned by the query.\\n \\\"\\\"\\\"\\n node: StoreCollection!\\n \\\"\\\"\\\"\\n Collection cursor. Used as pagination reference.\\n \\\"\\\"\\\"\\n cursor: String!\\n}\\n\\n\\\"\\\"\\\"\\nCollection connections, including pagination information and collections returned by the query.\\n\\\"\\\"\\\"\\ntype StoreCollectionConnection {\\n \\\"\\\"\\\"\\n Collection pagination information.\\n \\\"\\\"\\\"\\n pageInfo: StorePageInfo!\\n \\\"\\\"\\\"\\n Array with collection connection page edges, each containing a collection and a corresponding cursor..\\n \\\"\\\"\\\"\\n edges: [StoreCollectionEdge!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct search results sorting options.\\n\\\"\\\"\\\"\\nenum StoreSort {\\n \\\"\\\"\\\"\\n Sort by price, from highest to lowest.\\n \\\"\\\"\\\"\\n price_desc\\n \\\"\\\"\\\"\\n Sort by price, from lowest to highest.\\n \\\"\\\"\\\"\\n price_asc\\n \\\"\\\"\\\"\\n Sort by orders, from highest to lowest.\\n \\\"\\\"\\\"\\n orders_desc\\n \\\"\\\"\\\"\\n Sort by name, in reverse alphabetical order.\\n \\\"\\\"\\\"\\n name_desc\\n \\\"\\\"\\\"\\n Sort by name, in alphabetical order.\\n \\\"\\\"\\\"\\n name_asc\\n \\\"\\\"\\\"\\n Sort by release date, from highest to lowest.\\n \\\"\\\"\\\"\\n release_desc\\n \\\"\\\"\\\"\\n Sort by discount value, from highest to lowest.\\n \\\"\\\"\\\"\\n discount_desc\\n \\\"\\\"\\\"\\n Sort by product score, from highest to lowest.\\n \\\"\\\"\\\"\\n score_desc\\n}\\n\\n\\\"\\\"\\\"\\nSelected search facet input.\\n\\\"\\\"\\\"\\ninput IStoreSelectedFacet {\\n \\\"\\\"\\\"\\n Selected search facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Selected search facet value.\\n \\\"\\\"\\\"\\n value: String!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet type.\\n\\\"\\\"\\\"\\nenum StoreFacetType {\\n \\\"\\\"\\\"\\n Indicates boolean search facet.\\n \\\"\\\"\\\"\\n BOOLEAN\\n \\\"\\\"\\\"\\n Indicates range type search facet.\\n \\\"\\\"\\\"\\n RANGE\\n}\\n\\n\\\"\\\"\\\"\\nSuggestion term.\\n\\\"\\\"\\\"\\ntype StoreSuggestionTerm {\\n \\\"\\\"\\\"\\n The term.\\n \\\"\\\"\\\"\\n value: String!\\n \\\"\\\"\\\"\\n Its occurrences count.\\n \\\"\\\"\\\"\\n count: Int!\\n}\\n\\n\\\"\\\"\\\"\\nSuggestions information.\\n\\\"\\\"\\\"\\ntype StoreSuggestions {\\n \\\"\\\"\\\"\\n Array with suggestion terms.\\n \\\"\\\"\\\"\\n terms: [StoreSuggestionTerm!]!\\n \\\"\\\"\\\"\\n Array with suggestion products' information.\\n \\\"\\\"\\\"\\n products: [StoreProduct!]!\\n}\\n\\n\\\"\\\"\\\"\\nSearch result.\\n\\\"\\\"\\\"\\ntype SearchMetadata {\\n \\\"\\\"\\\"\\n Indicates if the search term was misspelled.\\n \\\"\\\"\\\"\\n isTermMisspelled: Boolean!\\n \\\"\\\"\\\"\\n Logical operator used to run the search.\\n \\\"\\\"\\\"\\n logicalOperator: String!\\n \\\"\\\"\\\"\\n Indicates how the search engine corrected the misspelled word by using fuzzy logic.\\n \\\"\\\"\\\"\\n fuzzy: String\\n}\\n\\n\\\"\\\"\\\"\\nSearch result.\\n\\\"\\\"\\\"\\ntype StoreSearchResult {\\n \\\"\\\"\\\"\\n Search result products.\\n \\\"\\\"\\\"\\n products: StoreProductConnection!\\n \\\"\\\"\\\"\\n Array of search result facets.\\n \\\"\\\"\\\"\\n facets: [StoreFacet!]!\\n \\\"\\\"\\\"\\n Search result suggestions.\\n \\\"\\\"\\\"\\n suggestions: StoreSuggestions!\\n \\\"\\\"\\\"\\n Search result metadata. Additional data can be used to send analytics events.\\n \\\"\\\"\\\"\\n metadata: SearchMetadata\\n \\\"\\\"\\\"\\n Search result searchId. Unique identifier for the search query can be used to correlate search analytics events.\\n \\\"\\\"\\\"\\n searchId: String!\\n}\\n\\ninput IGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\ntype ProductCountResult {\\n \\\"\\\"\\\"\\n Total product count.\\n \\\"\\\"\\\"\\n total: Int!\\n}\\n\\ntype Query {\\n \\\"\\\"\\\"\\n Returns the details of a product based on the specified locator.\\n \\\"\\\"\\\"\\n product(\\n \\\"\\\"\\\"\\n An array of selected search facets.\\n \\\"\\\"\\\"\\n locator: [IStoreSelectedFacet!]!\\n ): StoreProduct!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the details of a collection based on the collection slug.\\n \\\"\\\"\\\"\\n collection(\\n \\\"\\\"\\\"\\n Collection slug.\\n \\\"\\\"\\\"\\n slug: String!\\n ): StoreCollection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the result of a product, facet, or suggestion search.\\n \\\"\\\"\\\"\\n search(\\n \\\"\\\"\\\"\\n Search pagination argument, indicating how many results should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n \\\"\\\"\\\"\\n Search results sorting mode.\\n \\\"\\\"\\\"\\n sort: StoreSort = score_desc\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String = \\\"\\\"\\n \\\"\\\"\\\"\\n Array of selected search facets.\\n \\\"\\\"\\\"\\n selectedFacets: [IStoreSelectedFacet!]\\n \\\"\\\"\\\"\\n Search advertisement products return in result.\\n \\\"\\\"\\\"\\n sponsoredCount: Int\\n ): StoreSearchResult!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about all products.\\n \\\"\\\"\\\"\\n allProducts(\\n \\\"\\\"\\\"\\n Product pagination argument, indicating how many items should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n ): StoreProductConnection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about selected products.\\n \\\"\\\"\\\"\\n products(productIds: [String!]!): [StoreProduct!]!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about all collections.\\n \\\"\\\"\\\"\\n allCollections(\\n \\\"\\\"\\\"\\n Collection pagination argument, indicating how many items should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n ): StoreCollectionConnection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about shipping simulation.\\n \\\"\\\"\\\"\\n shipping(\\n \\\"\\\"\\\"\\n List of SKU products\\n \\\"\\\"\\\"\\n items: [IShippingItem!]!\\n \\\"\\\"\\\"\\n Postal code to freight calculator\\n \\\"\\\"\\\"\\n postalCode: String!\\n \\\"\\\"\\\"\\n Country of postal code\\n \\\"\\\"\\\"\\n country: String!\\n ): ShippingData\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns if there's a redirect for a search.\\n \\\"\\\"\\\"\\n redirect(\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String\\n \\\"\\\"\\\"\\n Array of selected search facets.\\n \\\"\\\"\\\"\\n selectedFacets: [IStoreSelectedFacet!]\\n ): StoreRedirect\\n\\n \\\"\\\"\\\"\\n Returns a list of sellers available for a specific localization.\\n \\\"\\\"\\\"\\n sellers(\\n \\\"\\\"\\\"\\n Postal code input to calculate sellers\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Geocoordinates input to calculate sellers\\n \\\"\\\"\\\"\\n geoCoordinates: IGeoCoordinates\\n \\\"\\\"\\\"\\n Country of localization\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Sales channel of the navigation\\n \\\"\\\"\\\"\\n salesChannel: String\\n ): SellersData\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the profile.\\n \\\"\\\"\\\"\\n profile(\\n \\\"\\\"\\\"\\n Identifier for user.\\n \\\"\\\"\\\"\\n id: String!\\n ): Profile\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the total product count information based on a specific location accessible through the VTEX segment cookie.\\n \\\"\\\"\\\"\\n productCount(\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String\\n ): ProductCountResult\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the Details of an User Order.\\n \\\"\\\"\\\"\\n userOrder(\\n \\\"\\\"\\\"\\n Identifier for the order.\\n \\\"\\\"\\\"\\n orderId: String!\\n ): UserOrderResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the list of saved credit cards for the current user.\\n \\\"\\\"\\\"\\n listCreditCards: SavedCardListResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Whether the current user holds the ad-hoc card platform permission, which\\n gates personal card management for Unit/Contract-affiliated buyers.\\n\\n Resolved from the user's roles by License Manager — it is not a session token\\n claim. Fails open (`true`) when the permission service is unreachable, so an\\n outage never locks buyers out of their own cards.\\n \\\"\\\"\\\"\\n hasAdHocCardAccess: Boolean!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 60, staleWhileRevalidate: 300)\\n\\n \\\"\\\"\\\"\\n Returns the list of Orders that the User can view.\\n \\\"\\\"\\\"\\n listUserOrders(\\n \\\"\\\"\\\"\\n Page number of the list of orders.\\n \\\"\\\"\\\"\\n page: Int\\n \\\"\\\"\\\"\\n Quantity of items per page of the list of orders.\\n \\\"\\\"\\\"\\n perPage: Int\\n \\\"\\\"\\\"\\n Status of the list of orders.\\n \\\"\\\"\\\"\\n status: [String]\\n \\\"\\\"\\\"\\n Initial date of the list of orders.\\n \\\"\\\"\\\"\\n dateInitial: String\\n \\\"\\\"\\\"\\n Final date of the list of orders.\\n \\\"\\\"\\\"\\n dateFinal: String\\n \\\"\\\"\\\"\\n Text used to full text filter of the list of orders.\\n \\\"\\\"\\\"\\n text: String\\n \\\"\\\"\\\"\\n Client email used to filter of the list of orders.\\n \\\"\\\"\\\"\\n clientEmail: String\\n \\\"\\\"\\\"\\n Filter orders that are pending user approval.\\n \\\"\\\"\\\"\\n pendingMyApproval: Boolean\\n ): UserOrderListMinimalResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the list of Quotes that the authenticated Buyer can view.\\n \\\"\\\"\\\"\\n listUserQuotes(\\n \\\"\\\"\\\"\\n Page number (1-based).\\n \\\"\\\"\\\"\\n page: Int\\n \\\"\\\"\\\"\\n Number of items per page.\\n \\\"\\\"\\\"\\n perPage: Int\\n \\\"\\\"\\\"\\n Filter by quote status values.\\n \\\"\\\"\\\"\\n status: [String]\\n \\\"\\\"\\\"\\n Filter quotes created on or after this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n createdAtFrom: String\\n \\\"\\\"\\\"\\n Filter quotes created on or before this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n createdAtTo: String\\n \\\"\\\"\\\"\\n Filter quotes expiring on or after this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n expiresAtFrom: String\\n \\\"\\\"\\\"\\n Filter quotes expiring on or before this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n expiresAtTo: String\\n \\\"\\\"\\\"\\n Filter quotes by label (partial match).\\n \\\"\\\"\\\"\\n label: String\\n ): UserQuoteListResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the current user details.\\n \\\"\\\"\\\"\\n userDetails: StoreUserDetails!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the account profile information for the current authenticated user (b2b or b2c user).\\n \\\"\\\"\\\"\\n accountProfile: StoreAccountProfile!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the user validation.\\n \\\"\\\"\\\"\\n validateUser: ValidateUserData\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Lists the commercial contracts associated with the given Organization Unit,\\n resolved to human-readable corporate names. Governed: only contracts associated\\n with the authenticated buyer's Organization Unit are returned.\\n \\\"\\\"\\\"\\n availableContracts(\\n \\\"\\\"\\\"\\n The Organization Unit identifier whose contracts will be listed.\\n \\\"\\\"\\\"\\n orgUnitId: String!\\n ): [StoreContract!]! @auth @cacheControl(scope: \\\"private\\\", sMaxAge: 0)\\n\\n \\\"\\\"\\\"\\n Returns whether the current authenticated user belongs to a B2B organization unit.\\n \\\"\\\"\\\"\\n isOrganizationMember: Boolean!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns a list of pickup points near to the given geo coordinates.\\n \\\"\\\"\\\"\\n pickupPoints(\\n \\\"\\\"\\\"\\n Geo coordinates input.\\n \\\"\\\"\\\"\\n geoCoordinates: IStoreGeoCoordinates\\n ): PickupPoints\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n \\\"\\\"\\\"\\n Returns the status of an Order Entry Service operation by its ID.\\n \\\"\\\"\\\"\\n orderEntryOperation(operationId: String!): StoreOrderEntryOperationStatus\\n @auth\\n \\\"\\\"\\\"\\n Returns the items in an orderForm by its ID.\\n \\\"\\\"\\\"\\n orderFormItems(orderFormId: String!): [StoreOrderFormCartItem!]! @auth\\n \\\"\\\"\\\"\\n Returns personalized product recommendations for a given campaign.\\n \\\"\\\"\\\"\\n recommendations(\\n campaignVrn: String!\\n userId: String\\n products: [String!]\\n ): RecommendationResponse!\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 120, staleWhileRevalidate: 3600)\\n}\\n\\ntype ValidateUserData {\\n \\\"\\\"\\\"\\n Indicates if the user is valid.\\n \\\"\\\"\\\"\\n isValid: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nRedirect informations, including url returned by the query.\\nhttps://schema.org/Thing\\n\\\"\\\"\\\"\\ntype StoreRedirect {\\n \\\"\\\"\\\"\\n URL to redirect\\n \\\"\\\"\\\"\\n url: String\\n}\\n\\n\\\"\\\"\\\"\\nRegionalization with sellers information.\\n\\\"\\\"\\\"\\ntype SellersData {\\n \\\"\\\"\\\"\\n Identification of region.\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n List of sellers.\\n \\\"\\\"\\\"\\n sellers: [SellerInfo]\\n}\\n\\n\\\"\\\"\\\"\\nInformation of sellers.\\n\\\"\\\"\\\"\\ntype SellerInfo {\\n \\\"\\\"\\\"\\n Identification of the seller\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n Name of the seller\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n Logo of the seller\\n \\\"\\\"\\\"\\n logo: String\\n}\\n\\n\\\"\\\"\\\"\\nUser details information.\\n\\\"\\\"\\\"\\ntype StoreUserDetails {\\n \\\"\\\"\\\"\\n User's username (login). May differ from email when Alternative Login is enabled.\\n \\\"\\\"\\\"\\n username: String\\n \\\"\\\"\\\"\\n User's name.\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n User's email.\\n \\\"\\\"\\\"\\n email: String\\n \\\"\\\"\\\"\\n User's phone number.\\n \\\"\\\"\\\"\\n phone: String\\n \\\"\\\"\\\"\\n User's role.\\n \\\"\\\"\\\"\\n role: [String]\\n \\\"\\\"\\\"\\n User's organizational unit.\\n \\\"\\\"\\\"\\n orgUnit: String\\n}\\n\\n\\\"\\\"\\\"\\nAccount profile information.\\n\\\"\\\"\\\"\\ntype StoreAccountProfile {\\n name: String\\n email: String\\n id: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nSummary of a quote returned in list results.\\n\\\"\\\"\\\"\\ntype UserQuoteSummary {\\n \\\"\\\"\\\"\\n Unique identifier of the quote.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Status of the quote.\\n \\\"\\\"\\\"\\n status: String!\\n \\\"\\\"\\\"\\n Optional label assigned to the quote.\\n \\\"\\\"\\\"\\n label: String\\n \\\"\\\"\\\"\\n ISO 8601 date-time when the quote was created.\\n \\\"\\\"\\\"\\n createdAt: String!\\n \\\"\\\"\\\"\\n ISO 8601 date-time when the quote expires.\\n \\\"\\\"\\\"\\n expiresAt: String!\\n \\\"\\\"\\\"\\n Total amount of the quote.\\n \\\"\\\"\\\"\\n amount: Float!\\n \\\"\\\"\\\"\\n Name or email of the user who created the quote.\\n \\\"\\\"\\\"\\n createdBy: String\\n}\\n\\n\\\"\\\"\\\"\\nResult returned by the listUserQuotes query.\\n\\\"\\\"\\\"\\ntype UserQuoteListResult {\\n \\\"\\\"\\\"\\n Array of quote summaries for the current page.\\n \\\"\\\"\\\"\\n list: [UserQuoteSummary!]!\\n \\\"\\\"\\\"\\n Pagination information.\\n \\\"\\\"\\\"\\n paging: UserQuoteListPaging!\\n}\\n\\n\\\"\\\"\\\"\\nPagination metadata for the quotes list.\\n\\\"\\\"\\\"\\ntype UserQuoteListPaging {\\n \\\"\\\"\\\"\\n Total number of quotes matching the query.\\n \\\"\\\"\\\"\\n total: Int!\\n \\\"\\\"\\\"\\n Current page number (1-based).\\n \\\"\\\"\\\"\\n currentPage: Int!\\n \\\"\\\"\\\"\\n Number of items per page.\\n \\\"\\\"\\\"\\n perPage: Int!\\n}\\n\"","export default \"type RecommendationResponse {\\n products: [StoreProduct!]!\\n correlationId: String!\\n campaign: RecommendationCampaign!\\n}\\n\\ntype RecommendationCampaign {\\n id: String!\\n title: String\\n type: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInformation of a given review rating.\\n\\\"\\\"\\\"\\ntype StoreReviewRating {\\n \\\"\\\"\\\"\\n Rating value.\\n \\\"\\\"\\\"\\n ratingValue: Float!\\n \\\"\\\"\\\"\\n Best rating value.\\n \\\"\\\"\\\"\\n bestRating: Float!\\n}\\n\\n\\\"\\\"\\\"\\nInformation of a given review.\\n\\\"\\\"\\\"\\ntype StoreReview {\\n \\\"\\\"\\\"\\n Review rating information.\\n \\\"\\\"\\\"\\n reviewRating: StoreReviewRating!\\n \\\"\\\"\\\"\\n Review author.\\n \\\"\\\"\\\"\\n author: StoreAuthor!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nWhether a saved card is personally owned by the buyer or shared by their\\nOrganization/Contract. Resolved server-side by the Saved-cards service from\\nthe buyer's `useAdHocCard` role — never inferred client-side.\\n\\\"\\\"\\\"\\nenum CardOrigin {\\n personal\\n shared\\n}\\n\\n\\\"\\\"\\\"\\nA saved payment card returned by the Saved-cards service.\\n\\\"\\\"\\\"\\ntype SavedCard {\\n \\\"\\\"\\\"\\n Account identifier that owns the card.\\n \\\"\\\"\\\"\\n accountId: String\\n \\\"\\\"\\\"\\n First digits of the card (BIN).\\n \\\"\\\"\\\"\\n bin: String\\n \\\"\\\"\\\"\\n Masked card number, per PCI display rules.\\n \\\"\\\"\\\"\\n cardNumber: String\\n \\\"\\\"\\\"\\n Buyer- or admin-assigned nickname for the card (e.g. \\\"Team lunch card\\\"), when\\n the Saved-cards service has one on file. Absent for most cards — callers\\n should fall back to `paymentSystemName` for display.\\n \\\"\\\"\\\"\\n cardLabel: String\\n \\\"\\\"\\\"\\n Numeric payment system identifier.\\n \\\"\\\"\\\"\\n paymentSystem: String\\n \\\"\\\"\\\"\\n Human-readable payment system name (e.g. Visa, Mastercard).\\n \\\"\\\"\\\"\\n paymentSystemName: String\\n \\\"\\\"\\\"\\n Whether this card is the account default.\\n \\\"\\\"\\\"\\n isDefault: Boolean\\n \\\"\\\"\\\"\\n Whether this card is active.\\n \\\"\\\"\\\"\\n isActive: Boolean\\n \\\"\\\"\\\"\\n Whether this card is personally owned by the buyer or shared by their\\n Organization/Contract.\\n \\\"\\\"\\\"\\n origin: CardOrigin!\\n}\\n\\n\\\"\\\"\\\"\\nResult of listing the current user's saved credit cards.\\n\\\"\\\"\\\"\\ntype SavedCardListResult {\\n \\\"\\\"\\\"\\n The list of saved credit cards.\\n \\\"\\\"\\\"\\n list: [SavedCard!]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nSearch Engine Optimization (SEO) tags data.\\n\\\"\\\"\\\"\\ntype StoreSeo {\\n \\\"\\\"\\\"\\n Title tag.\\n \\\"\\\"\\\"\\n title: String!\\n \\\"\\\"\\\"\\n Title template tag.\\n \\\"\\\"\\\"\\n titleTemplate: String!\\n \\\"\\\"\\\"\\n Description tag.\\n \\\"\\\"\\\"\\n description: String!\\n \\\"\\\"\\\"\\n Canonical tag.\\n \\\"\\\"\\\"\\n canonical: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nCurrency information.\\n\\\"\\\"\\\"\\ntype StoreCurrency {\\n \\\"\\\"\\\"\\n Currency code (e.g: USD).\\n \\\"\\\"\\\"\\n code: String!\\n \\\"\\\"\\\"\\n Currency symbol (e.g: $).\\n \\\"\\\"\\\"\\n symbol: String!\\n}\\n\\ninput IStoreCurrency {\\n \\\"\\\"\\\"\\n Currency code (e.g: USD).\\n \\\"\\\"\\\"\\n code: String!\\n \\\"\\\"\\\"\\n Currency symbol (e.g: $).\\n \\\"\\\"\\\"\\n symbol: String!\\n}\\n\\n\\\"\\\"\\\"\\nMarketing information.\\n\\\"\\\"\\\"\\ntype StoreMarketingData {\\n utmCampaign: String\\n utmMedium: String\\n utmSource: String\\n utmiCampaign: String\\n utmiPart: String\\n utmiPage: String\\n}\\n\\ninput IStoreMarketingData {\\n utmCampaign: String\\n utmMedium: String\\n utmSource: String\\n utmiCampaign: String\\n utmiPart: String\\n utmiPage: String\\n}\\n\\n\\\"\\\"\\\"\\nGeographic coordinates information.\\n\\\"\\\"\\\"\\ntype StoreGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\ninput IStoreGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery window information.\\n\\\"\\\"\\\"\\ntype StoreDeliveryWindow {\\n \\\"\\\"\\\"\\n The delivery window start date information.\\n \\\"\\\"\\\"\\n startDate: String!\\n \\\"\\\"\\\"\\n The delivery window end date information.\\n \\\"\\\"\\\"\\n endDate: String!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery window information.\\n\\\"\\\"\\\"\\ninput IStoreDeliveryWindow {\\n \\\"\\\"\\\"\\n The delivery window start date information.\\n \\\"\\\"\\\"\\n startDate: String!\\n \\\"\\\"\\\"\\n The delivery window end date information.\\n \\\"\\\"\\\"\\n endDate: String!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery mode information.\\n\\\"\\\"\\\"\\ntype StoreDeliveryMode {\\n \\\"\\\"\\\"\\n The delivery channel information of the session.\\n \\\"\\\"\\\"\\n deliveryChannel: String!\\n \\\"\\\"\\\"\\n The delivery method information of the session.\\n \\\"\\\"\\\"\\n deliveryMethod: String!\\n \\\"\\\"\\\"\\n The delivery window information of the session.\\n \\\"\\\"\\\"\\n deliveryWindow: StoreDeliveryWindow\\n}\\n\\ninput IStoreDeliveryMode {\\n \\\"\\\"\\\"\\n The delivery channel information of the session.\\n \\\"\\\"\\\"\\n deliveryChannel: String!\\n \\\"\\\"\\\"\\n The delivery method information of the session.\\n \\\"\\\"\\\"\\n deliveryMethod: String!\\n \\\"\\\"\\\"\\n The delivery window information of the session.\\n \\\"\\\"\\\"\\n deliveryWindow: IStoreDeliveryWindow\\n}\\n\\n\\\"\\\"\\\"\\nSession information.\\n\\\"\\\"\\\"\\ntype StoreSession {\\n \\\"\\\"\\\"\\n Session locale.\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Session currency.\\n \\\"\\\"\\\"\\n currency: StoreCurrency!\\n \\\"\\\"\\\"\\n Session country.\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Session channel.\\n \\\"\\\"\\\"\\n channel: String\\n \\\"\\\"\\\"\\n Session delivery mode.\\n \\\"\\\"\\\"\\n deliveryMode: StoreDeliveryMode\\n \\\"\\\"\\\"\\n Session address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n Session city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Session postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Session input geoCoordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: StoreGeoCoordinates\\n \\\"\\\"\\\"\\n Session input person.\\n \\\"\\\"\\\"\\n person: StorePerson\\n \\\"\\\"\\\"\\n B2B Information.\\n \\\"\\\"\\\"\\n b2b: StoreB2B\\n \\\"\\\"\\\"\\n Marketing information.\\n \\\"\\\"\\\"\\n marketingData: StoreMarketingData\\n \\\"\\\"\\\"\\n Refresh token after Information.\\n \\\"\\\"\\\"\\n refreshAfter: String\\n}\\n\\ntype StoreB2B {\\n customerId: String!\\n isRepresentative: Boolean\\n unitName: String\\n unitId: String\\n firstName: String\\n lastName: String\\n userName: String\\n userEmail: String\\n savedPostalCode: String\\n contractName: String\\n organizationManager: Boolean\\n}\\n\\ninput IStoreB2B {\\n customerId: String!\\n isRepresentative: Boolean\\n unitName: String\\n unitId: String\\n firstName: String\\n lastName: String\\n userName: String\\n userEmail: String\\n savedPostalCode: String\\n contractName: String\\n organizationManager: Boolean\\n}\\n\\n\\\"\\\"\\\"\\nSession input.\\n\\\"\\\"\\\"\\ninput IStoreSession {\\n \\\"\\\"\\\"\\n Session input locale.\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Session input currency.\\n \\\"\\\"\\\"\\n currency: IStoreCurrency!\\n \\\"\\\"\\\"\\n Session input country.\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Session input channel.\\n \\\"\\\"\\\"\\n channel: String\\n \\\"\\\"\\\"\\n Session input delivery mode.\\n \\\"\\\"\\\"\\n deliveryMode: IStoreDeliveryMode\\n \\\"\\\"\\\"\\n Session input address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n Session input city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Session input postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Session input geoCoordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: IStoreGeoCoordinates\\n \\\"\\\"\\\"\\n Session input person.\\n \\\"\\\"\\\"\\n person: IStorePerson\\n \\\"\\\"\\\"\\n Session input b2b.\\n \\\"\\\"\\\"\\n b2b: IStoreB2B\\n \\\"\\\"\\\"\\n Marketing information input.\\n \\\"\\\"\\\"\\n marketingData: IStoreMarketingData\\n \\\"\\\"\\\"\\n Refresh token after Information.\\n \\\"\\\"\\\"\\n refreshAfter: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nShipping Simulation item input.\\n\\\"\\\"\\\"\\ninput IShippingItem {\\n \\\"\\\"\\\"\\n ShippingItem ID / Sku.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Number of items.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Seller responsible for the ShippingItem.\\n \\\"\\\"\\\"\\n seller: String!\\n}\\n\\n\\\"\\\"\\\"\\nShipping Simulation information.\\n\\\"\\\"\\\"\\ntype ShippingData {\\n \\\"\\\"\\\"\\n List of LogisticsItem.\\n \\\"\\\"\\\"\\n items: [LogisticsItem]\\n \\\"\\\"\\\"\\n List of LogisticsInfo.\\n \\\"\\\"\\\"\\n logisticsInfo: [LogisticsInfo]\\n \\\"\\\"\\\"\\n List of MessageInfo.\\n \\\"\\\"\\\"\\n messages: [MessageInfo]\\n \\\"\\\"\\\"\\n Address information.\\n \\\"\\\"\\\"\\n address: Address\\n}\\n\\n\\\"\\\"\\\"\\nShipping Simulation Logistic Item.\\n\\\"\\\"\\\"\\ntype LogisticsItem {\\n \\\"\\\"\\\"\\n LogisticsItem ID / Sku.\\n \\\"\\\"\\\"\\n id: String\\n requestIndex: Int\\n \\\"\\\"\\\"\\n Number of items.\\n \\\"\\\"\\\"\\n quantity: Int\\n \\\"\\\"\\\"\\n Seller responsible for the ShippingItem.\\n \\\"\\\"\\\"\\n seller: String\\n \\\"\\\"\\\"\\n List of Sellers.\\n \\\"\\\"\\\"\\n sellerChain: [String]\\n \\\"\\\"\\\"\\n LogisticsItem tax.\\n \\\"\\\"\\\"\\n tax: Int\\n \\\"\\\"\\\"\\n Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.\\n \\\"\\\"\\\"\\n priceValidUntil: String\\n \\\"\\\"\\\"\\n LogisticsItem price.\\n \\\"\\\"\\\"\\n price: Int\\n \\\"\\\"\\\"\\n LogisticsItem listPrice.\\n \\\"\\\"\\\"\\n listPrice: Int\\n \\\"\\\"\\\"\\n LogisticsItem rewardValue.\\n \\\"\\\"\\\"\\n rewardValue: Int\\n \\\"\\\"\\\"\\n LogisticsItem sellingPrice.\\n \\\"\\\"\\\"\\n sellingPrice: Int\\n \\\"\\\"\\\"\\n LogisticsItem measurementUnit.\\n \\\"\\\"\\\"\\n measurementUnit: String\\n \\\"\\\"\\\"\\n LogisticsItem unitMultiplier.\\n \\\"\\\"\\\"\\n unitMultiplier: Int\\n \\\"\\\"\\\"\\n LogisticsItem availability.\\n \\\"\\\"\\\"\\n availability: String\\n}\\n\\ntype LogisticsInfo {\\n \\\"\\\"\\\"\\n LogisticsInfo itemIndex.\\n \\\"\\\"\\\"\\n itemIndex: String\\n \\\"\\\"\\\"\\n LogisticsInfo selectedSla.\\n \\\"\\\"\\\"\\n selectedSla: String\\n \\\"\\\"\\\"\\n List of LogisticsInfo ShippingSLA.\\n \\\"\\\"\\\"\\n slas: [ShippingSLA]\\n}\\n\\ntype ShippingSLA {\\n \\\"\\\"\\\"\\n ShippingSLA id.\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n ShippingSLA name.\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n ShippingSLA price.\\n \\\"\\\"\\\"\\n price: Float\\n \\\"\\\"\\\"\\n ShippingSLA shipping estimate.\\n \\\"\\\"\\\"\\n shippingEstimate: String\\n \\\"\\\"\\\"\\n ShippingSLA localized shipping estimate.\\n Note: this will always return a localized string for locale `en-US`.\\n \\\"\\\"\\\"\\n localizedEstimates: String\\n \\\"\\\"\\\"\\n ShippingSLA available delivery windows.\\n \\\"\\\"\\\"\\n availableDeliveryWindows: [AvailableDeliveryWindows]\\n \\\"\\\"\\\"\\n ShippingSLA shipping estimate date.\\n \\\"\\\"\\\"\\n shippingEstimateDate: String\\n \\\"\\\"\\\"\\n List of ShippingSLA delivery ids.\\n \\\"\\\"\\\"\\n deliveryIds: [DeliveryIds]\\n \\\"\\\"\\\"\\n ShippingSLA delivery channel.\\n \\\"\\\"\\\"\\n deliveryChannel: String\\n \\\"\\\"\\\"\\n ShippingSLA friendly name.\\n \\\"\\\"\\\"\\n friendlyName: String\\n \\\"\\\"\\\"\\n ShippingSLA carrier.\\n \\\"\\\"\\\"\\n carrier: String\\n \\\"\\\"\\\"\\n ShippingSLA pickup point id.\\n \\\"\\\"\\\"\\n pickupPointId: String\\n \\\"\\\"\\\"\\n ShippingSLA pickup store info.\\n \\\"\\\"\\\"\\n pickupStoreInfo: PickupStoreInfo\\n \\\"\\\"\\\"\\n ShippingSLA pickup distance.\\n \\\"\\\"\\\"\\n pickupDistance: Float\\n}\\n\\ntype AvailableDeliveryWindows {\\n \\\"\\\"\\\"\\n Available delivery window start date in UTC\\n \\\"\\\"\\\"\\n startDateUtc: String\\n \\\"\\\"\\\"\\n Available delivery window end date in UTC\\n \\\"\\\"\\\"\\n endDateUtc: String\\n \\\"\\\"\\\"\\n Available delivery window price\\n \\\"\\\"\\\"\\n price: Int\\n \\\"\\\"\\\"\\n Available delivery window list price\\n \\\"\\\"\\\"\\n listPrice: Int\\n \\\"\\\"\\\"\\n Available delivery window tax\\n \\\"\\\"\\\"\\n tax: Int\\n}\\n\\ntype DeliveryIds {\\n \\\"\\\"\\\"\\n DeliveryIds courier id\\n \\\"\\\"\\\"\\n courierId: String\\n \\\"\\\"\\\"\\n DeliveryIds warehouse id\\n \\\"\\\"\\\"\\n warehouseId: String\\n \\\"\\\"\\\"\\n DeliveryIds dock id\\n \\\"\\\"\\\"\\n dockId: String\\n \\\"\\\"\\\"\\n DeliveryIds courier name\\n \\\"\\\"\\\"\\n courierName: String\\n \\\"\\\"\\\"\\n DeliveryIds quantity\\n \\\"\\\"\\\"\\n quantity: Int\\n}\\n\\ntype PickupStoreInfo {\\n \\\"\\\"\\\"\\n PickupStoreInfo friendly name.\\n \\\"\\\"\\\"\\n friendlyName: String\\n \\\"\\\"\\\"\\n PickupStoreInfo address.\\n \\\"\\\"\\\"\\n address: PickupAddress\\n \\\"\\\"\\\"\\n PickupStoreInfo additional information.\\n \\\"\\\"\\\"\\n additionalInfo: String\\n \\\"\\\"\\\"\\n PickupStoreInfo dock id.\\n \\\"\\\"\\\"\\n dockId: String\\n \\\"\\\"\\\"\\n Information if the store has pickup enable.\\n \\\"\\\"\\\"\\n isPickupStore: Boolean\\n}\\n\\ntype PickupAddress {\\n \\\"\\\"\\\"\\n PickupAddress address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n PickupAddress receiver name.\\n \\\"\\\"\\\"\\n receiverName: String\\n \\\"\\\"\\\"\\n PickupAddress address id.\\n \\\"\\\"\\\"\\n addressId: String\\n \\\"\\\"\\\"\\n PickupAddress postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n PickupAddress city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n PickupAddress state.\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n PickupAddress country.\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n PickupAddress street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n PickupAddress number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n PickupAddress neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n PickupAddress complement.\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n PickupAddress reference.\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n PickupAddress geo coordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: [Float]\\n}\\n\\ntype MessageInfo {\\n \\\"\\\"\\\"\\n MessageInfo code.\\n \\\"\\\"\\\"\\n code: String\\n \\\"\\\"\\\"\\n MessageInfo text.\\n \\\"\\\"\\\"\\n text: String\\n \\\"\\\"\\\"\\n MessageInfo status.\\n \\\"\\\"\\\"\\n status: String\\n \\\"\\\"\\\"\\n MessageInfo fields.\\n \\\"\\\"\\\"\\n fields: MessageFields\\n}\\n\\ntype MessageFields {\\n \\\"\\\"\\\"\\n MessageFields item index.\\n \\\"\\\"\\\"\\n itemIndex: String\\n \\\"\\\"\\\"\\n MessageFields ean.\\n \\\"\\\"\\\"\\n ean: String\\n \\\"\\\"\\\"\\n MessageFields sku name.\\n \\\"\\\"\\\"\\n skuName: String\\n}\\n\"","export default \"type SkuVariants {\\n \\\"\\\"\\\"\\n SKU property values for the current SKU.\\n \\\"\\\"\\\"\\n activeVariations: ActiveVariations\\n \\\"\\\"\\\"\\n All available options for each SKU variant property, indexed by their name.\\n \\\"\\\"\\\"\\n allVariantsByName: VariantsByName\\n \\\"\\\"\\\"\\n Maps property value combinations to their respective SKU's slug. Enables\\n us to retrieve the slug for the SKU that matches the currently selected\\n variations in O(1) time.\\n If `dominantVariantName` is not present, the first variant will be \\n considered the dominant one.\\n \\\"\\\"\\\"\\n slugsMap(dominantVariantName: String): SlugsMap\\n \\\"\\\"\\\"\\n Available options for each varying SKU property, taking into account the\\n `dominantVariantName` property. Returns all available options for the\\n dominant property, and only options that can be combined with its current\\n value for other properties.\\n If `dominantVariantName` is not present, the first variant will be \\n considered the dominant one.\\n \\\"\\\"\\\"\\n availableVariations(dominantVariantName: String): FormattedVariants\\n\\n \\\"\\\"\\\"\\n All available options for each SKU variant property, indexed by their name.\\n \\\"\\\"\\\"\\n allVariantProducts: [StoreProduct!]\\n}\\n\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n 'Color-Red-Size-40': 'classic-shoes-37'\\n}\\n```\\n\\\"\\\"\\\"\\nscalar SlugsMap\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: 'Red', Size: '42'\\n}\\n```\\n\\\"\\\"\\\"\\nscalar ActiveVariations\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: [ \\\"Red\\\", \\\"Blue\\\", \\\"Green\\\" ],\\n Size: [ \\\"40\\\", \\\"41\\\" ]\\n}\\n```\\n\\\"\\\"\\\"\\nscalar VariantsByName\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: [\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n },\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n }\\n ],\\n Size: [\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n }\\n ]\\n}\\n```\\n\\\"\\\"\\\"\\nscalar FormattedVariants\\n\"","export default \"\\\"\\\"\\\"\\nStatus used to indicate a message type. For instance, a shopping cart informative or error message.\\n\\\"\\\"\\\"\\nenum StoreStatus {\\n INFO\\n WARNING\\n ERROR\\n}\\n\"","export default \"scalar JSONObject\\n\\ntype UserOrder {\\n orderId: String\\n sequence: String\\n marketplaceOrderId: String\\n marketplaceServicesEndpoint: String\\n sellerOrderId: String\\n origin: String\\n affiliateId: String\\n salesChannel: String\\n merchantName: String\\n status: String\\n workflowIsInError: Boolean\\n statusDescription: String\\n value: Float\\n creationDate: String\\n lastChange: String\\n orderGroup: String\\n giftRegistryData: String\\n marketingData: String\\n callCenterOperatorData: String\\n followUpEmail: String\\n lastMessage: String\\n hostname: String\\n invoiceData: String\\n changesAttachment: String\\n openTextField: String\\n roundingError: Int\\n orderFormId: String\\n commercialConditionData: String\\n isCompleted: Boolean\\n allowCancellation: Boolean\\n allowEdition: Boolean\\n isCheckedIn: Boolean\\n authorizedDate: String\\n invoicedDate: String\\n cancelReason: String\\n subscriptionData: String\\n taxData: String\\n checkedInPickupPointId: String\\n cancellationData: UserOrderCancellationData\\n cancellationRequests: [UserOrderCancellationRequest]\\n customData: UserOrderCustomData\\n clientPreferencesData: UserOrderClientPreferencesData\\n itemMetadata: UserOrderItemMetadata\\n marketplace: UserOrderMarketplace\\n storePreferencesData: UserOrderStorePreferencesData\\n sellers: [UserOrderStoreSellers]\\n packageAttachment: UserOrderPackageAttachment\\n paymentData: UserOrderPaymentData\\n shippingData: UserOrderShippingData\\n ratesAndBenefitsData: UserOrderRatesAndBenefitsData\\n clientProfileData: UserOrderClientProfileData\\n marketplaceItems: [UserOrderItems]\\n items: [UserOrderItems]\\n totals: [UserOrderTotals]\\n deliveryOptionsData: UserOrderDeliveryOptionsData\\n customFields: [UserOrderCustomFieldsGrouped]\\n canProcessOrderAuthorization: Boolean\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n purchaseAgentData: UserOrderPurchaseAgentData\\n budgetData: UserOrderBudgetData\\n}\\n\\ntype UserOrderPurchaseAgentData {\\n purchaseAgents: [UserOrderPurchaseAgent]\\n}\\n\\ntype UserOrderPurchaseAgent {\\n userId: String\\n versionId: String\\n persona: String\\n unitId: String\\n}\\n\\ntype UserOrderResult {\\n orderId: String\\n creationDate: String\\n status: String\\n canProcessOrderAuthorization: Boolean\\n statusDescription: String\\n allowCancellation: Boolean\\n storePreferencesData: UserOrderStorePreferencesData\\n clientProfileData: UserOrderClientProfileData\\n customData: UserOrderCustomData\\n customFields: [UserOrderCustomFieldsGrouped]\\n deliveryOptionsData: UserOrderDeliveryOptionsData\\n paymentData: UserOrderPaymentData\\n totals: [UserOrderTotals]\\n shippingData: UserOrderShippingData\\n items: [UserOrderItems]\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n shopper: UserOrderShopper\\n budgetData: UserOrderBudgetData\\n}\\n\\ntype UserOrderShopper {\\n firstName: String\\n lastName: String\\n email: String\\n phone: String\\n}\\n\\ntype UserOrderListResult {\\n list: [UserOrderFromList!]\\n paging: UserOrderListPaging\\n stats: UserOrderListStats\\n facets: [String]\\n reportRecordsLimit: Int\\n}\\n\\ntype UserOrderListPaging {\\n total: Int\\n pages: Int\\n currentPage: Int\\n perPage: Int\\n}\\n\\ntype UserOrderListStats {\\n stats: UserOrderListStatsData\\n}\\n\\ntype UserOrderListStatsData {\\n totalValue: UserOrderListStatsValue\\n totalItems: UserOrderListStatsValue\\n}\\n\\ntype UserOrderListStatsValue {\\n Count: Int\\n Max: Float\\n Mean: Float\\n Min: Float\\n Missing: Int\\n StdDev: Float\\n Sum: Float\\n SumOfSquares: Float\\n Facets: JSONObject\\n}\\n\\ntype UserOrderFromList {\\n orderId: String\\n creationDate: String\\n clientName: String\\n items: [UserOrderItemsSummarized]\\n totalValue: Float\\n paymentNames: String\\n status: String\\n statusDescription: String\\n marketPlaceOrderId: String\\n sequence: String\\n salesChannel: String\\n affiliateId: String\\n origin: String\\n workflowInErrorState: Boolean\\n workflowInRetry: Boolean\\n lastMessageUnread: String\\n ShippingEstimatedDate: String\\n ShippingEstimatedDateMax: String\\n ShippingEstimatedDateMin: String\\n orderIsComplete: Boolean\\n listId: String\\n listType: String\\n authorizedDate: String\\n callCenterOperatorName: String\\n totalItems: Int\\n currencyCode: String\\n hostname: String\\n invoiceOutput: [String]\\n invoiceInput: [String]\\n lastChange: String\\n isAllDelivered: Boolean\\n isAnyDelivered: Boolean\\n giftCardProviders: [String]\\n orderFormId: String\\n paymentApprovedDate: String\\n readyForHandlingDate: String\\n deliveryDates: [String]\\n customFields: [UserOrderFromListCustomFields]\\n}\\n\\ntype UserOrderCustomData {\\n customApps: [UserOrderCustomApp]\\n customFields: [UserOrderCustomField]\\n}\\n\\ntype UserOrderCustomApp {\\n fields: UserOrderFields\\n id: String\\n major: Int\\n}\\n\\ntype UserOrderFields {\\n cartEtag: String\\n}\\n\\ntype UserOrderStoreSellers {\\n id: String\\n name: String\\n logo: String\\n fulfillmentEndpoint: String\\n}\\n\\ntype UserOrderClientPreferencesData {\\n locale: String\\n optinNewsLetter: Boolean\\n}\\n\\ntype UserOrderItemMetadata {\\n Items: [UserOrderItemMetadataItem]\\n}\\n\\ntype UserOrderItemMetadataItem {\\n Id: String\\n Seller: String\\n Name: String\\n SkuName: String\\n ProductId: String\\n RefId: String\\n Ean: String\\n ImageUrl: String\\n DetailUrl: String\\n AssemblyOptions: [UserOrderAssemblyOptions]\\n}\\n\\ntype UserOrderAssemblyOptions {\\n Id: String\\n Name: String\\n Required: Boolean\\n}\\n\\ntype UserOrderOfferings {\\n type: String\\n id: String\\n name: String\\n price: Float\\n}\\n\\ntype UserOrderMarketplace {\\n baseURL: String\\n isCertified: String\\n name: String\\n}\\n\\ntype UserOrderCurrencyFormatInfo {\\n CurrencyDecimalDigits: Int\\n CurrencyDecimalSeparator: String\\n CurrencyGroupSeparator: String\\n CurrencyGroupSize: Int\\n StartsWithCurrencySymbol: Boolean\\n}\\n\\ntype UserOrderStorePreferencesData {\\n countryCode: String\\n currencyCode: String\\n currencyLocale: Int\\n currencySymbol: String\\n timeZone: String\\n currencyFormatInfo: UserOrderCurrencyFormatInfo\\n}\\n\\ntype UserOrderPackageAttachment {\\n packages: [UserOrderPackage]\\n}\\n\\ntype UserOrderPackage {\\n courier: String\\n courierStatus: UserOrderCourierStatus\\n invoiceNumber: String!\\n invoiceUrl: String\\n invoiceValue: Float!\\n extraValue: Float\\n issuanceDate: String\\n items: [UserOrderPackageItem!]\\n trackingNumber: String\\n trackingUrl: String\\n invoiceKey: String\\n type: UserOrderInvoiceType\\n restitutions: UserOrderRestitutions\\n}\\n\\ntype UserOrderCourierStatus {\\n data: [UserOrderTrackingInformation!]\\n finished: Boolean\\n status: String\\n}\\n\\ntype UserOrderTrackingInformation {\\n city: String\\n description: String\\n lastChange: String\\n state: String\\n}\\n\\nenum UserOrderInvoiceType {\\n Input\\n Output\\n}\\n\\ntype UserOrderPackageItem {\\n description: String\\n itemIndex: Int\\n price: Int\\n quantity: Int\\n}\\n\\ntype UserOrderRestitutions {\\n Refund: UserOrderRestitutionOption\\n GiftCard: UserOrderRestitutionOption\\n}\\n\\ntype UserOrderRestitutionOption {\\n value: Float\\n items: [UserOrderRestitutionItem!]\\n}\\n\\ntype UserOrderRestitutionItem {\\n useFreight: Boolean\\n isCompensation: Boolean\\n compensationValue: Float\\n itemIndex: Int\\n id: ID\\n quantity: Int\\n price: Float\\n description: String\\n unitMultiplier: Float\\n}\\n\\ntype UserOrderPaymentConnectorResponses {\\n Tid: String\\n ReturnCode: String\\n Message: String\\n authId: String\\n}\\n\\ntype UserOrderPayments {\\n id: String\\n paymentSystem: String\\n paymentSystemName: String\\n value: Int\\n installments: Int\\n referenceValue: Int\\n cardHolder: String\\n cardNumber: String\\n firstDigits: String\\n lastDigits: String\\n cvv2: String\\n expireMonth: String\\n expireYear: String\\n url: String\\n giftCardId: String\\n giftCardName: String\\n giftCardCaption: String\\n redemptionCode: String\\n group: String\\n tid: String\\n dueDate: String\\n connectorResponses: UserOrderPaymentConnectorResponses\\n giftCardProvider: String\\n giftCardAsDiscount: String\\n koinUrl: String\\n accountId: String\\n parentAccountId: String\\n bankIssuedInvoiceIdentificationNumber: String\\n bankIssuedInvoiceIdentificationNumberFormatted: String\\n bankIssuedInvoiceBarCodeNumber: String\\n bankIssuedInvoiceBarCodeType: String\\n billingAddress: String\\n paymentOrigin: String\\n}\\n\\ntype UserOrderTransactions {\\n isActive: Boolean\\n transactionId: String\\n merchantName: String\\n payments: [UserOrderPayments]\\n}\\n\\ntype UserOrderPaymentData {\\n transactions: [UserOrderTransactions]\\n giftCards: [String]\\n}\\n\\ntype UserOrderPickupStoreInfo {\\n additionalInfo: String\\n address: UserOrderAddress\\n dockId: String\\n friendlyName: String\\n isPickupStore: Boolean\\n}\\n\\ntype UserOrderDeliveryChannels {\\n id: String\\n stockBalance: Int\\n}\\n\\ntype UserOrderDeliveryIds {\\n courierId: String\\n courierName: String\\n dockId: String\\n quantity: Int\\n warehouseId: String\\n accountCarrierName: String\\n kitItemDetails: [String]\\n}\\ntype UserOrderDeliveryWindow {\\n startDateUtc: String\\n endDateUtc: String\\n price: Float\\n}\\n\\ntype UserOrderSlas {\\n id: String\\n name: String\\n shippingEstimate: String\\n shippingEstimateDate: String\\n deliveryWindow: UserOrderDeliveryWindow\\n listPrice: Float\\n price: Float\\n deliveryChannel: String\\n polygonName: String\\n lockTTL: String\\n pickupPointId: String\\n transitTime: String\\n pickupDistance: Int\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n deliveryIds: [UserOrderDeliveryIds]\\n availableDeliveryWindows: [UserOrderDeliveryWindow]\\n}\\n\\ntype UserOrderLogisticsInfo {\\n itemIndex: Int\\n itemId: String\\n selectedDeliveryChannel: String\\n selectedSla: String\\n lockTTL: String\\n price: Float\\n listPrice: Float\\n sellingPrice: Float\\n deliveryWindow: UserOrderDeliveryWindow\\n deliveryCompany: String\\n shippingEstimate: String\\n shippingEstimateDate: String\\n deliveryChannel: String\\n addressId: String\\n versionId: String\\n entityId: String\\n polygonName: String\\n pickupPointId: String\\n transitTime: String\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n deliveryChannels: [UserOrderDeliveryChannels]\\n deliveryIds: [UserOrderDeliveryIds]\\n shipsTo: [String]\\n slas: [UserOrderSlas]\\n}\\n\\ntype UserOrderAddress {\\n addressType: String\\n receiverName: String\\n addressId: String\\n versionId: String\\n entityId: String\\n postalCode: String\\n city: String\\n state: String\\n country: String\\n street: String\\n number: String\\n neighborhood: String\\n complement: String\\n reference: String\\n geoCoordinates: [Float]\\n}\\n\\ntype UserOrderShippingData {\\n id: String\\n trackingHints: String\\n contactInformation: [UserOrderContactInformation]\\n availableAddresses: [UserOrderAddress]\\n selectedAddresses: [UserOrderAddress]\\n logisticsInfo: [UserOrderLogisticsInfo]\\n address: UserOrderAddress\\n}\\n\\ntype UserOrderRatesAndBenefitsData {\\n id: String\\n rateAndBenefitsIdentifiers: [UserOrderRateAndBenefitsIdentifier]\\n}\\n\\ntype UserOrderRateAndBenefitsIdentifier {\\n id: ID\\n additionalInfo: String\\n description: String\\n featured: Boolean\\n name: String\\n}\\n\\ntype UserOrderClientProfileData {\\n id: String\\n email: String\\n firstName: String\\n lastName: String\\n documentType: String\\n document: String\\n phone: String\\n corporateName: String\\n tradeName: String\\n corporateDocument: String\\n stateInscription: String\\n corporatePhone: String\\n isCorporate: Boolean\\n userProfileId: String\\n userProfileVersion: String\\n customerClass: String\\n customerCode: String\\n}\\n\\ntype UserOrderSellingPrices {\\n value: Float\\n quantity: Int\\n}\\n\\ntype UserOrderPriceDefinition {\\n calculatedSellingPrice: Float\\n total: Float\\n reason: String\\n sellingPrices: [UserOrderSellingPrices]\\n}\\n\\ntype UserOrderDimension {\\n cubicweight: Float\\n height: Int\\n length: Int\\n weight: Int\\n width: Int\\n}\\n\\ntype UserOrderCategories {\\n id: Int\\n name: String\\n}\\n\\ntype UserOrderAdditionalInfo {\\n brandName: String\\n brandId: String\\n categoriesIds: String\\n productClusterId: String\\n commercialConditionId: String\\n offeringInfo: String\\n offeringType: String\\n offeringTypeId: String\\n dimension: UserOrderDimension\\n categories: [UserOrderCategories]\\n}\\n\\ntype UserOrderAttachmentOfferings {\\n name: String\\n required: Boolean\\n}\\n\\ntype UserOrderItemAttachment {\\n name: String\\n}\\n\\ntype UserOrderItems {\\n uniqueId: String\\n id: String\\n productId: String\\n ean: String\\n lockId: String\\n quantity: Int\\n seller: String\\n name: String\\n refId: String\\n price: Float\\n listPrice: Float\\n manualPrice: String\\n manualPriceAppliedBy: String\\n imageUrl: String\\n detailUrl: String\\n sellerSku: String\\n priceValidUntil: String\\n commission: Float\\n tax: Float\\n preSaleDate: String\\n measurementUnit: String\\n unitMultiplier: Float\\n sellingPrice: Float\\n isGift: Boolean\\n shippingPrice: String\\n rewardValue: Float\\n freightCommission: Float\\n taxCode: String\\n parentItemIndex: String\\n parentAssemblyBinding: String\\n callCenterOperator: String\\n serialNumbers: String\\n costPrice: Float\\n assemblies: [String]\\n priceDefinition: UserOrderPriceDefinition\\n additionalInfo: UserOrderAdditionalInfo\\n attachmentOfferings: [UserOrderAttachmentOfferings]\\n offerings: [UserOrderOfferings]\\n params: [String]\\n bundleItems: [UserOrderItems]\\n components: [UserOrderItems]\\n priceTags: [UserOrderPriceTag]\\n attachments: [UserOrderAttachments]\\n itemAttachment: UserOrderItemAttachment\\n}\\n\\ntype UserOrderItemsSummarized {\\n seller: String\\n quantity: Int\\n description: String\\n ean: String\\n refId: String\\n id: String\\n productId: String\\n sellingPrice: Float\\n price: Float\\n}\\n\\ntype UserOrderAttachments {\\n name: String\\n content: JSONObject\\n}\\n\\ntype UserOrderPriceTag {\\n name: String!\\n value: Float\\n rawValue: Float!\\n rate: Float\\n jurisCode: String\\n jurisType: String\\n jurisName: String\\n isPercentual: Boolean\\n identifier: String\\n owner: String\\n}\\n\\ntype UserOrderTotals {\\n id: String\\n name: String\\n value: Float\\n}\\n\\ntype UserOrderContactInformation {\\n id: ID!\\n email: String\\n firstName: String\\n lastName: String\\n document: String\\n documentType: String\\n phone: String\\n}\\n\\ntype UserOrderDeliveryOptionsData {\\n deliveryOptions: [UserOrderDeliveryOption]\\n contact: UserOrderDeliveryOptionsContact\\n}\\n\\ntype UserOrderDeliveryOption {\\n selectedSla: String\\n deliveryChannel: String\\n deliveryCompany: String\\n deliveryWindow: UserOrderDeliveryWindow\\n shippingEstimate: String\\n shippingEstimateDate: String\\n friendlyShippingEstimate: String\\n friendlyDeliveryOptionName: String\\n seller: String\\n address: UserOrderAddress\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n quantityOfDifferentItems: Int\\n total: Int\\n items: [UserOrderDeliveryOptionsItems]\\n}\\n\\ntype UserOrderDeliveryOptionsItems {\\n id: String\\n uniqueId: String\\n name: String\\n quantity: Int\\n price: Float\\n sellingPrice: Float\\n imageUrl: String\\n tax: Float\\n taxPriceTags: [UserOrderPriceTag]\\n taxPriceTagsTotal: Float\\n total: Float\\n}\\n\\ntype UserOrderDeliveryOptionsContact {\\n name: String\\n email: String\\n phone: String\\n}\\n\\ntype UserOrderCancel {\\n data: String\\n}\\n\\n\\\"\\\"\\\"\\nInput to the cancel order API.\\n\\\"\\\"\\\"\\ninput IUserOrderCancel {\\n \\\"\\\"\\\"\\n Person's name.\\n \\\"\\\"\\\"\\n orderId: String!\\n \\\"\\\"\\\"\\n Customer's email.\\n \\\"\\\"\\\"\\n customerEmail: String\\n \\\"\\\"\\\"\\n Reason.\\n \\\"\\\"\\\"\\n reason: String\\n}\\n\\ntype UserOrderCancellationData {\\n RequestedByUser: Boolean\\n RequestedBySystem: Boolean\\n RequestedBySellerNotification: Boolean\\n RequestedByPaymentNotification: Boolean\\n Reason: String\\n CancellationDate: String\\n}\\n\\ntype UserOrderCancellationRequest {\\n id: String\\n reason: String\\n cancellationRequestDate: String\\n requestedByUser: Boolean\\n deniedBySeller: Boolean\\n deniedBySellerReason: String\\n cancellationRequestDenyDate: String\\n}\\n\\ntype UserOrderCustomField {\\n linkedEntity: UserOrderCustomFieldLinkedEntity!\\n fields: [UserOrderCustomFieldField!]!\\n}\\n\\ntype UserOrderCustomFieldLinkedEntity {\\n type: String!\\n id: String\\n}\\n\\ntype UserOrderCustomFieldField {\\n name: String!\\n value: String!\\n refId: String\\n}\\n\\ntype UserOrderCustomFieldsGrouped {\\n type: String!\\n id: String\\n fields: [UserOrderCustomFieldField]\\n}\\n\\ntype UserOrderFromListCustomFields {\\n type: String\\n value: [String]\\n}\\n\\ntype UserOrderListMinimalResult {\\n list: [UserOrderFromListMinimal]\\n paging: UserOrderListPaging\\n}\\n\\ntype UserOrderFromListMinimal {\\n orderId: String\\n creationDate: String\\n clientName: String\\n items: [UserOrderItemsSummarized]\\n totalValue: Float\\n status: String\\n statusDescription: String\\n ShippingEstimatedDate: String\\n customFields: [UserOrderFromListCustomFields]\\n currencyCode: String\\n}\\n\\ntype UserOrderBudgetData {\\n budgets: [UserOrderBudget]\\n}\\n\\ntype UserOrderBudget {\\n id: String\\n name: String\\n unitId: String\\n cycleConfiguration: UserOrderBudgetCycleConfiguration\\n balance: UserOrderBudgetBalance\\n allocations: [UserOrderBudgetAllocation]\\n}\\n\\ntype UserOrderBudgetCycleConfiguration {\\n startDate: String\\n endDate: String\\n autoResetOnPeriodEnd: Boolean\\n carryOverBalance: Boolean\\n}\\n\\ntype UserOrderBudgetBalance {\\n amount: Float\\n balanceAdjustment: Float\\n remaining: Float\\n}\\n\\ntype UserOrderBudgetAllocation {\\n id: String\\n linkedEntity: UserOrderBudgetAllocationLinkedEntity\\n balance: UserOrderBudgetBalance\\n reservations: JSONObject\\n ToBeSpent: Float\\n}\\n\\ntype UserOrderBudgetAllocationLinkedEntity {\\n type: String\\n id: String\\n}\\n\"","/// <reference types=\"vite/client\" />\n\nconst modules: Record<string, string> = import.meta.glob('./*.graphql', {\n eager: true,\n query: '?raw',\n import: 'default',\n})\nimport { mergeTypeDefs } from '@graphql-tools/merge'\nimport { parse, print } from 'graphql'\n\nconst ParsedVtexGraphqlSchema = print(\n Object.values(modules)\n .map((s) => parse(s))\n .reduce((finalSchema, schema) =>\n mergeTypeDefs([finalSchema, schema], { sort: true })\n )\n)\n\nexport const typeDefs = ParsedVtexGraphqlSchema\n\nexport default typeDefs\n","import { mergeSchemas } from '@graphql-tools/schema'\nimport { type GraphQLSchema, isSchema } from 'graphql'\nimport { withDirectives } from '../../directives'\nimport authDirective from '../../directives/auth'\nimport cacheControlDirective from '../../directives/cacheControl'\nimport { ResolverTrace } from '../../observability/telemetry'\nimport type { FeatureFlags, Options, Resolver } from '../../typings/globals'\nimport type { Clients } from './clients'\nimport { getClients } from './clients'\nimport type { SearchArgs } from './clients/search'\nimport type { Loaders } from './loaders'\nimport { getLoaders } from './loaders'\nimport { getResolvers as nativeGetResolvers } from './resolvers'\nimport typeDefs from './typeDefs'\nimport type { Channel } from './utils/channel'\nimport ChannelMarshal from './utils/channel'\n\nexport interface GraphqlContext {\n /** Request scope ID */\n id: string\n clients: Clients\n loaders: Loaders\n /**\n * @description Storage updated at each request.\n *\n * Use this datastructure to store and share small values in the context.\n * Use it with caution since dependecy injection leads to a more complex code\n * */\n storage: {\n channel: Required<Channel>\n locale: string\n flags: FeatureFlags\n searchArgs?: Omit<SearchArgs, 'type'>\n cookies: Map<string, Record<string, string>>\n /**\n * Cached in-flight localized product lookups keyed by \"productId:locale\".\n * Stores the promise (not just the resolved value) so concurrent sibling\n * resolvers (slug validation, otherLocales, breadcrumb) dedupe to a single\n * Catalog Dataplane request within the same request.\n */\n productTranslationsCache?: Map<\n string,\n Promise<import('./clients/catalog').LocalizedProductEntry | null>\n >\n }\n headers: Record<string, string>\n account: string\n OTEL_ENABLED: boolean\n /** Discovery config passed from @faststore/core, including localization settings. */\n discoveryConfig?: Record<string, unknown>\n}\n\nexport const GraphqlVtexContextFactory = async (options: Options) => {\n return (ctx: any): GraphqlContext => {\n ctx.storage = {\n channel: ChannelMarshal.parse(options.channel),\n flags: options.flags ?? {},\n locale: options.locale,\n cookies: new Map<string, Record<string, string>>(),\n }\n ctx.account = options.account\n ctx.OTEL_ENABLED = options.OTEL_ENABLED\n ctx.discoveryConfig = options.discoveryConfig\n // Build clients/loaders last: they capture `ctx` and read storage,\n // discoveryConfig, etc. at request time, so everything they may depend on\n // must already be assigned.\n ctx.clients = getClients(options, ctx)\n ctx.loaders = getLoaders(options, ctx)\n\n return ctx\n }\n}\n\nexport type GraphqlResolver<S = any, V = any, R = any> = Resolver<\n GraphqlContext,\n S,\n V,\n R\n>\n\nexport function getResolvers() {\n const resolvers = nativeGetResolvers()\n\n const finalResolvers: any = {}\n for (const [key, resolver] of Object.entries(resolvers)) {\n finalResolvers[key] = Object.fromEntries(\n Object.entries(resolver).map(([name, resolverFunction]) => {\n if (typeof resolverFunction !== 'function')\n return [name, resolverFunction]\n\n return [name, ResolverTrace(resolverFunction, `${key}(${name})`)]\n })\n )\n }\n\n return finalResolvers as typeof resolvers\n}\n\nexport function GraphqlVtexSchema(mergeSchema?: GraphQLSchema) {\n const withCacheControl = withDirectives([\n cacheControlDirective,\n authDirective,\n ])\n\n const platformSchema = withCacheControl(getResolvers(), typeDefs)\n\n if (mergeSchema && isSchema(mergeSchema)) {\n return mergeSchemas({\n schemas: [platformSchema, mergeSchema],\n })\n }\n\n return platformSchema\n}\n"],"names":["CardOrigin","CommercialAuthorizationStatus","StoreCollectionType","StoreFacetType","StoreSort","StoreStatus","UserOrderInvoiceType","getWithAppKeyAndToken","additionalHeaders","appKey","appToken","ForbiddenError","validateUserAuthentication","ctx","commerce","UnauthorizedError","error","status","NAME","directive","schema","mapSchema","MapperKind","fieldConfig","getDirective","originalResolver","root","args","context","info","stringify","cacheControl","forcePrivate","scope","sMaxAge","staleWhileRevalidate","min","a","b","minScope","resolver","obj","withDirectives","directives","resolvers","typeDef","finalTypeDef","mergeTypeDefs","typeDefs","transformer","makeExecutableSchema","OTELLogger","logger","ResolverTrace","fn","resolverName","source","vars","graphqlContext","span","OTELAPI","version","name","otelContext","result","value","recordResolverError","FastStoreError","extensions","message","BadRequestError","NotFoundError","isFastStoreError","isBadRequestError","isUnauthorizedError","isForbiddenError","isNotFoundError","USER_AGENT","packageJson","fetchAPI","init","options","response","fetch","text","CatalogDataplane","account","environment","base","productId","locale","normalizeCookies","cookieString","cookieMap","cookies","processedKeys","cookie","trimmedCookie","equalIndex","key","MATCH_FIRST_SET_COOKIE_KEY_VALUE","updatesContextStorageCookies","setCookieValue","matchCookie","cookieKey","cookieValue","setCookie","headers","getStoreCookie","getUpdatedCookie","normalizedCookie","contextStorageCookies","existingCookies","storageCookieKey","storageCookieValue","updatesCookieValueByKey","getWithCookie","updatedCookie","getAuthCookie","normalizedCookies","parse","MATCH_COOKIE_KEY_VALUE","cookieParts","parseJwt","token","REC_ORIGIN_SUFFIX","BASE_INIT","encodeLinkIdPath","linkId","byLinkIdInit","QUOTE_ISO_DATE","QUOTE_VALID_STATUSES","validateListUserQuotesArgs","page","perPage","createdAtFrom","createdAtTo","expiresAtFrom","expiresAtTo","field","invalid","s","buildListUserQuotesParams","label","params","VtexCommerce","incrementAddress","subDomainPrefix","storeCookies","withCookie","withAppKeyAndToken","host","selectedPrefix","prefix","forwardedHost","recommendationBase","recommendationHeaders","withBuyerAuthHeaders","authToken","sc","depth","slug","type","groupByProduct","salesChannel","id","index","deliveryMode","selectedAddresses","setDeliveryWindow","deliveryWindow","mappedBody","_","itemIndex","marketingData","clientPreferencesData","refreshOutdatedData","channel","preserveSalesChannel","orderFormPath","url","orderItems","allowOutdatedData","shouldSplitItem","appId","postalCode","geoCoordinates","country","orderId","customerEmail","reason","search","sessionCookie","data","userId","dateInitial","dateFinal","clientEmail","pendingMyApproval","dateInitialTimestamp","dateFinalTimestamp","orderAuthorizationId","dimensionId","ruleId","approved","body","orgUnitId","email","resourceKey","contractId","userIdNormalized","fileBuffer","fileName","mimeType","autHeaders","boundary","CRLF","safeMimeType","safeFileName","headerPart","footer","headerBytes","footerBytes","offset","objectKey","orderFormId","sessionToken","operationId","campaignVrn","products","getLocalizationConfig","isLocalizationEnabled","getConfiguredLocales","getDefaultLocale","getCatalogLocale","FUZZY_KEY","OPERATOR_KEY","PICKUP_POINT_KEY","SHIPPING_KEY","DELIVERY_OPTIONS_KEY","IN_STOCK_KEY","POLICY_KEY","REGION_KEY","PATH_EXCLUDED_KEYS","SHIPPING_FACET_KEYS","encodeSafeURI","uri","removeDiacriticsFromURL","PICKUP_IN_POINT_SUFFIX_RE","parseSegmentCookie","cookieHeader","segmentToken","decoded","parseSegmentFacetsString","facetsStr","shipping","extraFacets","pair","eqIdx","extractSegmentData","segment","appendSegmentParams","segmentParams","entries","extractPickupPointIdFromShippingFacetValue","extractPickupPointIdFromPathShippingFacet","selectedFacetsFromPath","f","rawId","mergeSegmentParamsWithPickupFromPath","pathPickupId","normalizePickupInPointShippingFacets","selectedFacets","facet","concatSelectedFacets","selectedFacetsFromSegment","hasShipping","buildAttributePath","attributePath","isFuzzyFacet","isOperatorFacet","resolveSegmentData","defaults","regionId","preparePathFacets","facets","pathFacets","shippingFacet","deliveryOptionsFacet","withShippingFacets","hasShippingInPath","hasDeliveryOptionsInPath","addSearchParamsFacets","fuzzyFacet","operatorFacet","pickupPointFacet","buildSearchLikeParams","segmentData","query","count","sort","showInvisibleItems","sponsoredCount","searchHideUnavailableItems","allowRedirect","from","to","mergedSegmentParams","inStockFacet","shouldHideUnavailableItems","path","buildProductsParams","hideUnavailableItems","createRequest","qs","buildIntelligentSearchRequest","input","endpoint","_exhaustive","PRODUCTS_BY_IDENTIFIER_CONCURRENCY","getRegionIdFromContext","seller","getSegmentLocale","cultureInfo","IntelligentSearch","simulationBehavior","showSponsored","requestDefaults","request","fetchProduct","hideUnavailable","values","limit","pLimit","product","getClients","catalog","CONCURRENT_REQUESTS_MAX","isCategory","isBrand","isCollection","getCollectionLoader","clients","loader","keys","normalizedSlug","category","brand","collection","DataLoader","getSalesChannelLoader","channels","getSimulationLoader","simulationArgs","allItems","acc","items","simulation","simulated","item","itemsIndices","curr","__","limited","sanitizeHtml","dirty","sanitizeHtmlLib","sanitizeProduct","enhanceSku","getSkuLoader","flags","skuIds","skuBySkuId","sku","skus","skuId","missingSkus","getLoaders","skuLoader","simulationLoader","collectionLoader","salesChannelLoader","inStock","offer","price","sellingPrice","availability","available","bestOfferFirst","inStockOrderFormItem","itemAvailability","withTax","tax","unitMultiplier","unitTax","getHighPrice","offers","availableOffers","highOffer","highPrice","getLowPrice","lowOffer","lowPrice","StoreAggregateOffer","StoreAggregateRating","removeDiacritics","str","newStr","i","slugifySpecialCharacters","slugify","replaced","canonicalizeSlug","loadSegmentEntities","segments","slugifyRoot","StoreCollection","defaultLocale","entity","collections","localizationConfig","configuredLocales","entities","err","configuredLocale","parts","e","part","FACET_CROSS_SELLING_MAP","transformSelectedFacet","parseRange","range","splitted","isCrossSelling","x","findCrossSelling","filtered","findSlug","findSkuId","findLocale","findChannel","array","cmp","best","StoreFacet","StoreFacetBoolean","StoreFacetRange","searchArgs","selectedRange","globalMin","globalMax","StoreFacetValueBoolean","selected","quantity","cancelOrder","extractRuleForAuthorization","commercialAuth","dimension","pendingRule","rule","isPendingForOtherAuthorizer","pendingRules","processOrderAuthorization","ruleForAuthorization","startOrderEntryOperation","startRecommendationSession","subscribeToNewsletter","uploadFileToOrderEntry","fileContent","normalized","MAX_FILE_BYTES","ChannelMarshal","channelString","parsedChannel","channelWhenSessionDivergesFromOrderForm","currentChannel","orderFormSalesChannel","mutateChannelContext","mutateLocaleContext","md5","payload","crypto","VALUE_REFERENCES","attachmentToPropertyValue","attachment","attributeToPropertyValue","attribute","getPropertyId","createNewAddress","session","addressSession","latitude","longitude","getAddressOrderForm","orderForm","addressChanged","availableAddresses","address","shouldUpdateShippingData","hasSessionPostalCodeOrGeoCoordinates","hasItems","selectedAddress","checkPostalCode","checkGeoCoordinates","checkAddressType","logisticsInfo","shouldUpdateDeliveryInfo","addressType","deliveryChannel","deliveryMethod","startDate","endDate","selectedDeliveryChannel","selectedSla","slas","checkDeliveryChannel","checkDeliveryMethod","sla","window","isAttachment","getId","orderFormItemToOffer","offerToOrderItemInput","groupById","equals","storeOrder","pick","orderFormItems","storeOrderItems","isSameOrder","orderItemsAreSync","deepEquals","hasChildItem","itemId","hasParentItem","joinItems","form","itemsById","idx","totalPrice","orderFormToCart","adoptedSalesChannel","getOrderFormEtag","sessionJwt","criticalItems","setOrderFormEtag","isOrderFormStale","oldEtag","app","clearOrderFormMessages","updateOrderFormShippingData","updateShipping","oldAddress","getCookieCheckoutOrderNumber","nameCookie","adoptOrderFormSalesChannelWhenSessionDiverges","adoptedChannel","cartWhenSalesChannelAdoptedOrNull","validateCart","order","orderFormIdFromCookie","orderNumber","acceptedOffer","newOrderForm","browserItemsById","originItemsById","originItems","browserItems","itemsToAdd","itemsToUpdate","maybeOriginItem","head","tail","totalQuantity","itemsToDelete","changes","updatedOrderForm","updatedMarketingData","equalMessages","channelAfterSessionManager","storeChannelValue","sellerId","hasExplicitSalesChannel","storeSalesChannel","resolvedRegionId","resolveContractDisplayNameFromMd","contract","corporateName","isSessionAvailableContract","parseSessionAvailableContracts","shopper","raw","isSwitchableSessionContract","resolveActiveContractIdFromSession","sessionData","mapSessionContractsToStoreContracts","contracts","activeContractId","normalizedActiveId","resolveActiveContractDisplayName","profile","fromMasterData","getPreciseLocationData","buildSessionSearchParams","buildMarketingData","oldMarketingData","resolveJwtClaims","jwt","isValidJwt","resolveSellerInRegion","shopperString","buildB2bSession","firstName","lastName","buildPersonFromProfile","validateSession","oldSession","city","preciseLocation","isRepresentative","customerId","unitId","store","authentication","checkout","publicData","newSession","Mutation","Kind","toObjectOrString","getValueAsObjectOrString","ObjectOrString","GraphQLScalarType","ast","isSearchItem","isOrderFormItem","StoreOffer","canonicalFromProduct","linkText","enhanceCommercialOffer","MILLISECONDS_THRESHOLD","isAllDigits","ISO_DATE_TIME_WITHOUT_ZONE","toDate","epoch","normalizeReleaseDate","date","DEFAULT_IMAGE","getSlug","link","getPath","nonEmptyArray","removeTrailingSlashes","getLocalizedProductEntry","cacheKey","cache","cached","entry","findMainTreeIndex","categoriesIds","categoryId","mainTreeIndex","idsTree","StoreProduct","isVariantOf","description","_args","categories","productName","mainTree","splittedCategories","mainTreeIds","localizedCategories","images","resolvedImages","imageUrl","imageText","imageLabel","shouldFilter","filteredImages","imageKeywords","ean","referenceId","manufacturerCode","specifications","attachmentsValues","attributes","propertyValueSpecifications","propertyValueAttachments","propertyValueAttributes","skuSpecifications","specificationGroups","releaseDate","advertisement","deliveryPromisesBadges","availableLinkIds","BLOCKED_SPECIFICATIONS","StoreProductGroup","specificationGroup","StorePropertyValue","valueReference","pickBestSku","offersBySku","o1","o2","isValidSkuId","RECOMMENDATION_VRN_PATTERN","recommendations","normalizedCampaignVrn","normalizedUserId","campaign","correlationId","SORT_MAP","getOrderEntryOperation","getOrderFormItems","isLocalizedSlugMatch","productGroupID","slugPrefix","INVALID_SKU_ID_ERROR","SLUG_MISMATCH_ERROR","AD_HOC_CARD_RESOURCE_KEY","shouldFallbackToProductRoute","assertSkuMatchesSlug","fetchProductBySlugFallback","route","Query","locator","first","maybeAfter","term","crossSelling","after","productIds","productSearchPromise","brands","tree","categoryRoots","dfs","node","parentId","child","validCollections","redirect","region","sellers","addresses","mapAddressesToList","addressesObj","stringifiedObj","errorMessage","parsed","filters","orders","card","granted","uniqueCreatedByIds","quote","createdByNameById","fullName","_ctx","shopperResult","lmRoles","r","shopperName","user","sessionUnitId","StoreReview","isRootFacet","isDepartment","StoreSearchResult","terms","productSearchResult","maybeSku","searches","is","isCollectionPage","StoreSeo","title","canonical","units","isUnit","localizedEstimates","getLocalizedEstimates","estimate","amount","unit","isAmountNumber","isUnitValid","amountKey","ShippingSLA","SKU_IMAGE_LABEL","findSkuVariantImage","availableImages","variationName","variationSpecificImageLabel","variationSpecificImage","imageProperties","skuImage","createSlugsMap","variants","dominantVariantName","baseSlug","slugsMap","variant","skuSpecificationProperties","dominantNameValue","variationDetails","skuVariantKey","property","getActiveSkuVariations","variations","activeVariations","variation","getVariantsByName","specification","compare","sortVariants","variantsByName","sortedVariants","variantProperty","option","getFormattedVariations","dominantVariantValue","previouslySeenPropertyValues","dominantVariantEntry","nameValueIdentifier","variantImageToUse","formattedVariant","variationProperty","SkuVariants","activeDominantVariationValue","deliveryChannelsMapping","UserOrderResult","shippingData","groupedDeliveryOptions","logisticsItem","deliveryCompany","pickupStoreInfo","shippingEstimate","friendlyShippingEstimate","shippingEstimateDate","addressId","groupKey","friendlyDeliveryOptionName","taxPriceTagsTotal","taxPriceTags","filterTaxPriceTags","itemTotal","deliveryOptions","contactInformation","contact","customFields","priceTags","priceTag","VtexResolvers","getResolvers","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","__vite_glob_0_18","__vite_glob_0_19","__vite_glob_0_20","__vite_glob_0_21","__vite_glob_0_22","__vite_glob_0_23","__vite_glob_0_24","__vite_glob_0_25","__vite_glob_0_26","__vite_glob_0_27","__vite_glob_0_28","__vite_glob_0_29","__vite_glob_0_30","__vite_glob_0_31","__vite_glob_0_32","__vite_glob_0_33","__vite_glob_0_34","__vite_glob_0_35","__vite_glob_0_36","__vite_glob_0_37","__vite_glob_0_38","modules","ParsedVtexGraphqlSchema","print","finalSchema","GraphqlVtexContextFactory","nativeGetResolvers","finalResolvers","resolverFunction","GraphqlVtexSchema","mergeSchema","platformSchema","cacheControlDirective","authDirective","isSchema","mergeSchemas"],"mappings":";;;;;;;;;;;;AAqJO,IAAWA,uBAAAA,OAChBA,EAAA,WAAW,YACXA,EAAA,SAAS,UAFOA,IAAAA,MAAA,CAAA,CAAA,GA8LAC,uBAAAA,OAEhBA,EAAA,WAAW,YAEXA,EAAA,SAAS,UAETA,EAAA,UAAU,WANMA,IAAAA,MAAA,CAAA,CAAA,GAunCAC,uBAAAA,OAEh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W9P,GAASpE,CAAG,GACrCA,EAAI,UAAU4W,GAAWxS,GAASpE,CAAG,GAE9BA;AAWJ,SAAS00B,KAAe;AAC7B,QAAM3yB,IAAYw1B,GAAA,GAEZC,IAAsB,CAAA;AAC5B,aAAW,CAAClyB,GAAK3D,CAAQ,KAAK,OAAO,QAAQI,CAAS;AACpD,IAAAy1B,EAAelyB,CAAG,IAAI,OAAO;AAAA,MAC3B,OAAO,QAAQ3D,CAAQ,EAAE,IAAI,CAAC,CAACsB,GAAMw0B,CAAgB,MAC/C,OAAOA,KAAqB,aACvB,CAACx0B,GAAMw0B,CAAgB,IAEzB,CAACx0B,GAAMT,GAAci1B,GAAkB,GAAGnyB,CAAG,IAAIrC,CAAI,GAAG,CAAC,CACjE;AAAA,IAAA;AAIL,SAAOu0B;AACT;AAEO,SAASE,GAAkBC,GAA6B;AAM7D,QAAMC,IALmB/1B,GAAe;AAAA,IACtCg2B;AAAAA,IACAC;AAAAA,EAAA,CACD,EAEuCpD,GAAA,GAAgBvyB,EAAQ;AAEhE,SAAIw1B,KAAeI,GAASJ,CAAW,IAC9BK,GAAa;AAAA,IAClB,SAAS,CAACJ,GAAgBD,CAAW;AAAA,EAAA,CACtC,IAGIC;AACT;","x_google_ignoreList":[53]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/__generated__/schema.ts","../../src/platforms/vtex/utils/auth.ts","../../src/directives/auth.ts","../../src/directives/cacheControl.ts","../../src/directives/index.ts","../../src/observability/telemetry.ts","../../src/platforms/errors.ts","../../src/platforms/vtex/clients/fetch.ts","../../src/platforms/vtex/clients/catalog/index.ts","../../src/platforms/vtex/utils/cookies.ts","../../src/platforms/vtex/clients/commerce/index.ts","../../src/platforms/vtex/utils/localization.ts","../../src/platforms/vtex/utils/intelligentSearchRequest.ts","../../src/platforms/vtex/clients/search/index.ts","../../src/platforms/vtex/clients/index.ts","../../src/platforms/vtex/loaders/collection.ts","../../src/platforms/vtex/loaders/salesChannel.ts","../../src/platforms/vtex/loaders/simulation.ts","../../src/platforms/vtex/utils/sanitizeHtml.ts","../../src/platforms/vtex/utils/enhanceSku.ts","../../src/platforms/vtex/loaders/sku.ts","../../src/platforms/vtex/loaders/index.ts","../../src/platforms/vtex/utils/productStock.ts","../../src/platforms/vtex/utils/taxes.ts","../../src/platforms/vtex/resolvers/aggregateOffer.ts","../../src/platforms/vtex/resolvers/aggregateRating.ts","../../src/platforms/vtex/utils/slugify.ts","../../src/platforms/vtex/resolvers/collection.ts","../../src/platforms/vtex/utils/facets.ts","../../src/platforms/vtex/utils/orderStatistics.ts","../../src/platforms/vtex/resolvers/facet.ts","../../src/platforms/vtex/resolvers/faceValue.ts","../../src/platforms/vtex/resolvers/cancelOrder.ts","../../src/platforms/vtex/utils/commercialAuth.ts","../../src/platforms/vtex/resolvers/processOrderAuthorization.ts","../../src/platforms/vtex/resolvers/startOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/startRecommendationSession.ts","../../src/platforms/vtex/resolvers/subscribeToNewsletter.ts","../../src/platforms/vtex/resolvers/uploadFileToOrderEntry.ts","../../src/platforms/vtex/utils/channel.ts","../../src/platforms/vtex/utils/cartSalesChannel.ts","../../src/platforms/vtex/utils/contex.ts","../../src/platforms/vtex/utils/md5.ts","../../src/platforms/vtex/utils/propertyValue.ts","../../src/platforms/vtex/utils/createNewAddress.ts","../../src/platforms/vtex/utils/getAddressOrderForm.ts","../../src/platforms/vtex/utils/shouldUpdateShippingData.ts","../../src/platforms/vtex/resolvers/validateCart.ts","../../src/platforms/vtex/utils/sessionChannel.ts","../../src/platforms/vtex/utils/contract.ts","../../src/platforms/vtex/utils/validateSessionHelpers.ts","../../src/platforms/vtex/resolvers/validateSession.ts","../../src/platforms/vtex/resolvers/mutation.ts","../../../../node_modules/.pnpm/graphql@16.11.0/node_modules/graphql/language/kinds.mjs","../../src/platforms/vtex/resolvers/objectOrString.ts","../../src/platforms/vtex/resolvers/offer.ts","../../src/platforms/vtex/utils/canonical.ts","../../src/platforms/vtex/utils/enhanceCommercialOffer.ts","../../src/platforms/vtex/utils/releaseDate.ts","../../src/platforms/vtex/resolvers/product.ts","../../src/platforms/vtex/resolvers/productGroup.ts","../../src/platforms/vtex/resolvers/propertyValue.ts","../../src/platforms/vtex/utils/sku.ts","../../src/platforms/vtex/resolvers/recommendations.ts","../../src/platforms/vtex/utils/sort.ts","../../src/platforms/vtex/resolvers/getOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/getOrderFormItems.ts","../../src/platforms/vtex/resolvers/query.ts","../../src/platforms/vtex/resolvers/review.ts","../../src/platforms/vtex/resolvers/searchResult.ts","../../src/platforms/vtex/resolvers/seo.ts","../../src/platforms/vtex/resolvers/shippingSLA.ts","../../src/platforms/vtex/utils/skuVariants.ts","../../src/platforms/vtex/resolvers/skuVariations.ts","../../src/platforms/vtex/resolvers/userOrder.ts","../../src/platforms/vtex/resolvers/index.ts","../../src/platforms/vtex/typeDefs/address.graphql?raw","../../src/platforms/vtex/typeDefs/advertisement.graphql?raw","../../src/platforms/vtex/typeDefs/aggregateOffer.graphql?raw","../../src/platforms/vtex/typeDefs/aggregateRating.graphql?raw","../../src/platforms/vtex/typeDefs/author.graphql?raw","../../src/platforms/vtex/typeDefs/brand.graphql?raw","../../src/platforms/vtex/typeDefs/breadcrumb.graphql?raw","../../src/platforms/vtex/typeDefs/cart.graphql?raw","../../src/platforms/vtex/typeDefs/collection.graphql?raw","../../src/platforms/vtex/typeDefs/deliveryPromisesBadge.graphql?raw","../../src/platforms/vtex/typeDefs/facet.graphql?raw","../../src/platforms/vtex/typeDefs/image.graphql?raw","../../src/platforms/vtex/typeDefs/mutation.graphql?raw","../../src/platforms/vtex/typeDefs/newsletter.graphql?raw","../../src/platforms/vtex/typeDefs/objectOrString.graphql?raw","../../src/platforms/vtex/typeDefs/offer.graphql?raw","../../src/platforms/vtex/typeDefs/order.graphql?raw","../../src/platforms/vtex/typeDefs/orderCommercialAuthorizaton.graphql?raw","../../src/platforms/vtex/typeDefs/orderEntry.graphql?raw","../../src/platforms/vtex/typeDefs/organization.graphql?raw","../../src/platforms/vtex/typeDefs/pageInfo.graphql?raw","../../src/platforms/vtex/typeDefs/password.graphql?raw","../../src/platforms/vtex/typeDefs/person.graphql?raw","../../src/platforms/vtex/typeDefs/pickupPoints.graphql?raw","../../src/platforms/vtex/typeDefs/product.graphql?raw","../../src/platforms/vtex/typeDefs/productGroup.graphql?raw","../../src/platforms/vtex/typeDefs/profile.graphql?raw","../../src/platforms/vtex/typeDefs/propertyValue.graphql?raw","../../src/platforms/vtex/typeDefs/query.graphql?raw","../../src/platforms/vtex/typeDefs/quote.graphql?raw","../../src/platforms/vtex/typeDefs/recommendation.graphql?raw","../../src/platforms/vtex/typeDefs/review.graphql?raw","../../src/platforms/vtex/typeDefs/savedCard.graphql?raw","../../src/platforms/vtex/typeDefs/seo.graphql?raw","../../src/platforms/vtex/typeDefs/session.graphql?raw","../../src/platforms/vtex/typeDefs/shipping.graphql?raw","../../src/platforms/vtex/typeDefs/skuVariants.graphql?raw","../../src/platforms/vtex/typeDefs/status.graphql?raw","../../src/platforms/vtex/typeDefs/userOrder.graphql?raw","../../src/platforms/vtex/typeDefs/index.ts","../../src/platforms/vtex/index.ts"],"sourcesContent":["export type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: 'Red', Size: '42'\n * }\n * ```\n */\n ActiveVariations: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: [\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * },\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * }\n * ],\n * Size: [\n * {\n * src: \"https://storecomponents.vtexassets.com/...\",\n * alt: \"...\",\n * label: \"...\",\n * value: \"...\"\n * }\n * ]\n * }\n * ```\n */\n FormattedVariants: { input: any; output: any; }\n JSONObject: { input: any; output: any; }\n ObjectOrString: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * 'Color-Red-Size-40': 'classic-shoes-37'\n * }\n * ```\n */\n SlugsMap: { input: any; output: any; }\n /**\n * Example:\n *\n * ```json\n * {\n * Color: [ \"Red\", \"Blue\", \"Green\" ],\n * Size: [ \"40\", \"41\" ]\n * }\n * ```\n */\n VariantsByName: { input: any; output: any; }\n};\n\n/** Address information. */\nexport type Address = {\n __typename?: 'Address';\n /** Address city */\n city?: Maybe<Scalars['String']['output']>;\n /** Address complement */\n complement?: Maybe<Scalars['String']['output']>;\n /** Address country */\n country?: Maybe<Scalars['String']['output']>;\n /** Address geoCoordinates */\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** Address neighborhood */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** Address number */\n number?: Maybe<Scalars['String']['output']>;\n /** Address postal code */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Address reference */\n reference?: Maybe<Scalars['String']['output']>;\n /** Address state */\n state?: Maybe<Scalars['String']['output']>;\n /** Address street */\n street?: Maybe<Scalars['String']['output']>;\n};\n\n/** Advertisement information about a specific product in a campaign */\nexport type Advertisement = {\n __typename?: 'Advertisement';\n /** Cost of the action, usually Cost Per Click. */\n actionCost: Scalars['Float']['output'];\n /** Advertiser ID of the product. */\n adId: Scalars['String']['output'];\n /** Advertiser Request ID. */\n adRequestId: Scalars['String']['output'];\n /** Advertiser Response ID. */\n adResponseId: Scalars['String']['output'];\n /** Campaign ID. */\n campaignId: Scalars['String']['output'];\n};\n\nexport type AvailableDeliveryWindows = {\n __typename?: 'AvailableDeliveryWindows';\n /** Available delivery window end date in UTC */\n endDateUtc?: Maybe<Scalars['String']['output']>;\n /** Available delivery window list price */\n listPrice?: Maybe<Scalars['Int']['output']>;\n /** Available delivery window price */\n price?: Maybe<Scalars['Int']['output']>;\n /** Available delivery window start date in UTC */\n startDateUtc?: Maybe<Scalars['String']['output']>;\n /** Available delivery window tax */\n tax?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type BusinessHour = {\n __typename?: 'BusinessHour';\n /** Business hour closing time. */\n closingTime?: Maybe<Scalars['String']['output']>;\n /** Number that represents the day of the week. */\n dayOfWeek?: Maybe<Scalars['Int']['output']>;\n /** Business hour opening time. */\n openingTime?: Maybe<Scalars['String']['output']>;\n};\n\n/**\n * Whether a saved card is personally owned by the buyer or shared by their\n * Organization/Contract. Resolved server-side by the Saved-cards service from\n * the buyer's `useAdHocCard` role — never inferred client-side.\n */\nexport const enum CardOrigin {\n Personal = 'personal',\n Shared = 'shared'\n};\n\n/** Commercial Authorization dimension status. */\nexport type CommercialAuthorizationDimensionStatus = {\n __typename?: 'CommercialAuthorizationDimensionStatus';\n /** Creation date. */\n creationDate: Scalars['String']['output'];\n /** Creation environment. */\n creationEnvironment: Scalars['String']['output'];\n /** Creation version. */\n creationVersion: Scalars['String']['output'];\n /** Dimension status ID. */\n id: Scalars['String']['output'];\n /** Dimension status name. */\n name: Scalars['String']['output'];\n /** Priority level. */\n priority: Scalars['Int']['output'];\n /** Indicates if all rules acceptance is required. */\n requireAllRulesAcceptance: Scalars['Boolean']['output'];\n /** Collection of rules for this dimension. */\n ruleCollection: Array<CommercialAuthorizationRule>;\n /** Dimension score. */\n score: Scalars['Float']['output'];\n /** Indicates if simulation should be performed. */\n shouldSimulate: Scalars['Boolean']['output'];\n /** Current status of the dimension. */\n status: CommercialAuthorizationStatus;\n /** Unit ID, if applicable. */\n unitId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Commercial Authorization item. */\nexport type CommercialAuthorizationItem = {\n __typename?: 'CommercialAuthorizationItem';\n /** Additional information as key-value pairs. */\n additionalInfo: Scalars['JSONObject']['output'];\n /** Item ID. */\n id: Scalars['String']['output'];\n /** Item price. */\n price: Scalars['Float']['output'];\n /** Item quantity. */\n quantity: Scalars['Int']['output'];\n /** Item SKU. */\n sku: Scalars['String']['output'];\n /** Total manual discount applied. */\n totalManualDiscount: Scalars['Float']['output'];\n /** Total system discount applied. */\n totalSystemDiscount: Scalars['Float']['output'];\n};\n\n/** Commercial Authorization response. */\nexport type CommercialAuthorizationResponse = {\n __typename?: 'CommercialAuthorizationResponse';\n /** Additional information as key-value pairs. */\n additionalInfo: Scalars['JSONObject']['output'];\n /** Callback endpoint URL. */\n callbackEndpoint: Scalars['String']['output'];\n /** Creation environment. */\n creationEnvironment: Scalars['String']['output'];\n /** Creation version. */\n creationVersion: Scalars['String']['output'];\n /** Dimension status information. */\n dimensionStatus: Array<CommercialAuthorizationDimensionStatus>;\n /** Commercial Authorization ID. */\n id: Scalars['String']['output'];\n /** Collection of items in the commercial authorization. */\n itemCollection: Array<CommercialAuthorizationItem>;\n /** Marketplace payment value. */\n marketPlacePaymentValue: Scalars['Float']['output'];\n /** Order ID associated with the commercial authorization. */\n orderId: Scalars['String']['output'];\n /** Current status of the commercial authorization. */\n status: CommercialAuthorizationStatus;\n /** Total order value desired by the seller. */\n totalOrderValueDesiredBySeller: Scalars['Float']['output'];\n /** List of units. */\n units: Array<Scalars['String']['output']>;\n /** User profile ID. */\n userProfileId: Scalars['String']['output'];\n /** Workflow instance ID. */\n workflowInstanceId: Scalars['String']['output'];\n};\n\n/** Commercial Authorization rule. */\nexport type CommercialAuthorizationRule = {\n __typename?: 'CommercialAuthorizationRule';\n /** Authorization data, if available. */\n authorizationData?: Maybe<CommercialAuthorizationRuleAuthorizationData>;\n /** List of authorized email addresses. */\n authorizedEmails: Array<Scalars['String']['output']>;\n /** DO ID, if applicable. */\n doId?: Maybe<Scalars['String']['output']>;\n /** Rule ID. */\n id: Scalars['String']['output'];\n /**\n * Indicates that the user is listed as one of the possible approvers,\n * but does not necessarily mean that he or she is the next in the chain to approve.\n */\n isUserAuthorized: Scalars['Boolean']['output'];\n /**\n * Indicates that the user is next in the approval chain.\n * This means that they must take an approval or rejection action.\n */\n isUserNextAuthorizer: Scalars['Boolean']['output'];\n /** Rule name. */\n name: Scalars['String']['output'];\n /** Indicates if notification is enabled. */\n notification: Scalars['Boolean']['output'];\n /** Rule priority. */\n priority: Scalars['Int']['output'];\n /** Score interval configuration. */\n scoreInterval: CommercialAuthorizationRuleScoreInterval;\n /** Current status of the rule. */\n status: CommercialAuthorizationStatus;\n /** Timeout value. */\n timeout: Scalars['Int']['output'];\n /** Rule trigger configuration. */\n trigger: CommercialAuthorizationRuleTrigger;\n};\n\n/** Commercial Authorization rule authorization data. */\nexport type CommercialAuthorizationRuleAuthorizationData = {\n __typename?: 'CommercialAuthorizationRuleAuthorizationData';\n /** List of authorizers. */\n authorizers: Array<CommercialAuthorizationRuleAuthorizer>;\n /** Indicates if all approvals are required. */\n requireAllApprovals: Scalars['Boolean']['output'];\n};\n\n/** Commercial Authorization rule authorizer. */\nexport type CommercialAuthorizationRuleAuthorizer = {\n __typename?: 'CommercialAuthorizationRuleAuthorizer';\n /** Authorization date. */\n authorizationDate?: Maybe<Scalars['String']['output']>;\n /** Authorizer email. */\n email?: Maybe<Scalars['String']['output']>;\n /** Authorizer ID. */\n id: Scalars['String']['output'];\n /** Authorizer type. */\n type: Scalars['String']['output'];\n};\n\n/** Commercial Authorization rule score interval. */\nexport type CommercialAuthorizationRuleScoreInterval = {\n __typename?: 'CommercialAuthorizationRuleScoreInterval';\n /** Accept score threshold. */\n accept: Scalars['Float']['output'];\n /** Deny score threshold. */\n deny: Scalars['Float']['output'];\n};\n\n/** Commercial Authorization rule trigger. */\nexport type CommercialAuthorizationRuleTrigger = {\n __typename?: 'CommercialAuthorizationRuleTrigger';\n /** Trigger condition. */\n condition: CommercialAuthorizationRuleTriggerCondition;\n /** Trigger effect. */\n effect: CommercialAuthorizationRuleTriggerEffect;\n};\n\n/** Commercial Authorization rule trigger condition. */\nexport type CommercialAuthorizationRuleTriggerCondition = {\n __typename?: 'CommercialAuthorizationRuleTriggerCondition';\n /** Condition type. */\n conditionType: Scalars['Int']['output'];\n /** Condition description. */\n description?: Maybe<Scalars['String']['output']>;\n /** Condition expression. */\n expression?: Maybe<Scalars['String']['output']>;\n /** Greater than value. */\n greatherThan?: Maybe<Scalars['Float']['output']>;\n /** Less than value. */\n lessThan?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Commercial Authorization rule trigger effect. */\nexport type CommercialAuthorizationRuleTriggerEffect = {\n __typename?: 'CommercialAuthorizationRuleTriggerEffect';\n /** Effect description. */\n description?: Maybe<Scalars['String']['output']>;\n /** Effect type. */\n effectType: Scalars['Int']['output'];\n /** Function path. */\n funcPath?: Maybe<Scalars['String']['output']>;\n};\n\n/** Commercial Authorization status. */\nexport const enum CommercialAuthorizationStatus {\n /** Authorization has been accepted. */\n Accepted = 'accepted',\n /** Authorization has been denied. */\n Denied = 'denied',\n /** Authorization is pending. */\n Pending = 'pending'\n};\n\nexport type DeliveryIds = {\n __typename?: 'DeliveryIds';\n /** DeliveryIds courier id */\n courierId?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds courier name */\n courierName?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds dock id */\n dockId?: Maybe<Scalars['String']['output']>;\n /** DeliveryIds quantity */\n quantity?: Maybe<Scalars['Int']['output']>;\n /** DeliveryIds warehouse id */\n warehouseId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Delivery Promise badge. */\nexport type DeliveryPromiseBadge = {\n __typename?: 'DeliveryPromiseBadge';\n /** Badge type. */\n typeName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Input to get commercial authorizations by order ID. */\nexport type ICommercialAuthorizationByOrderId = {\n /** Order ID to get commercial authorizations for. */\n orderId: Scalars['String']['input'];\n};\n\nexport type IGeoCoordinates = {\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['input'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['input'];\n};\n\nexport type IOrderEntryOperation = {\n objectKey: Scalars['String']['input'];\n orderFormId?: InputMaybe<Scalars['String']['input']>;\n sessionToken?: InputMaybe<Scalars['String']['input']>;\n};\n\n/**\n * Input for uploading a file to the Order Entry Service.\n * The file is transmitted as a Base64-encoded string so it can travel\n * through the standard GraphQL JSON pipeline without multipart support.\n */\nexport type IOrderEntryUpload = {\n /** Base64-encoded file content. */\n fileContent: Scalars['String']['input'];\n /** Original file name (e.g. \"order.csv\"). */\n fileName: Scalars['String']['input'];\n /** MIME type of the file (e.g. \"text/csv\", \"image/png\"). */\n mimeType: Scalars['String']['input'];\n};\n\n/** Person data input to the newsletter. */\nexport type IPersonNewsletter = {\n /** Person's email. */\n email: Scalars['String']['input'];\n /** Person's name. */\n name: Scalars['String']['input'];\n};\n\n/** Input to process order authorization (approve or reject). */\nexport type IProcessOrderAuthorization = {\n /** Whether the authorization is approved (true) or rejected (false). */\n approved: Scalars['Boolean']['input'];\n /** Dimension ID associated with the authorization. */\n dimensionId: Scalars['String']['input'];\n /** Order authorization ID. */\n orderAuthorizationId: Scalars['String']['input'];\n /** Rule ID associated with the authorization. */\n ruleId: Scalars['String']['input'];\n};\n\n/** Input type for setting a new password. */\nexport type ISetPassword = {\n /** Optional access key for the user, used in some authentication flows. */\n accesskey?: InputMaybe<Scalars['String']['input']>;\n /** The current password of the user, required for verification before changing to the new password. */\n currentPassword: Scalars['String']['input'];\n /** The email of the user for whom the password is being set. */\n email: Scalars['String']['input'];\n /** The new password to be set for the user. */\n newPassword: Scalars['String']['input'];\n /** Optional reCAPTCHA token for security verification. */\n recaptcha?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Shipping Simulation item input. */\nexport type IShippingItem = {\n /** ShippingItem ID / Sku. */\n id: Scalars['String']['input'];\n /** Number of items. */\n quantity: Scalars['Int']['input'];\n /** Seller responsible for the ShippingItem. */\n seller: Scalars['String']['input'];\n};\n\nexport type IStoreB2B = {\n contractName?: InputMaybe<Scalars['String']['input']>;\n customerId: Scalars['String']['input'];\n firstName?: InputMaybe<Scalars['String']['input']>;\n isRepresentative?: InputMaybe<Scalars['Boolean']['input']>;\n lastName?: InputMaybe<Scalars['String']['input']>;\n organizationManager?: InputMaybe<Scalars['Boolean']['input']>;\n savedPostalCode?: InputMaybe<Scalars['String']['input']>;\n unitId?: InputMaybe<Scalars['String']['input']>;\n unitName?: InputMaybe<Scalars['String']['input']>;\n userEmail?: InputMaybe<Scalars['String']['input']>;\n userName?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Shopping cart input. */\nexport type IStoreCart = {\n /** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */\n order: IStoreOrder;\n};\n\nexport type IStoreCurrency = {\n /** Currency code (e.g: USD). */\n code: Scalars['String']['input'];\n /** Currency symbol (e.g: $). */\n symbol: Scalars['String']['input'];\n};\n\nexport type IStoreDeliveryMode = {\n /** The delivery channel information of the session. */\n deliveryChannel: Scalars['String']['input'];\n /** The delivery method information of the session. */\n deliveryMethod: Scalars['String']['input'];\n /** The delivery window information of the session. */\n deliveryWindow?: InputMaybe<IStoreDeliveryWindow>;\n};\n\n/** Delivery window information. */\nexport type IStoreDeliveryWindow = {\n /** The delivery window end date information. */\n endDate: Scalars['String']['input'];\n /** The delivery window start date information. */\n startDate: Scalars['String']['input'];\n};\n\nexport type IStoreGeoCoordinates = {\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['input'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['input'];\n};\n\n/** Image input. */\nexport type IStoreImage = {\n /** Alias for the input image. */\n alternateName: Scalars['String']['input'];\n /** Image input URL. */\n url: Scalars['String']['input'];\n};\n\nexport type IStoreMarketingData = {\n utmCampaign?: InputMaybe<Scalars['String']['input']>;\n utmMedium?: InputMaybe<Scalars['String']['input']>;\n utmSource?: InputMaybe<Scalars['String']['input']>;\n utmiCampaign?: InputMaybe<Scalars['String']['input']>;\n utmiPage?: InputMaybe<Scalars['String']['input']>;\n utmiPart?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Offer input. */\nexport type IStoreOffer = {\n /** Information on the item being offered. */\n itemOffered: IStoreProduct;\n /** This is displayed as the \"from\" price in the context of promotions' price comparison. This may change before it reaches the shelf. */\n listPrice: Scalars['Float']['input'];\n /** Also known as spot price. */\n price: Scalars['Float']['input'];\n /** Signed price token (JWT) from the Pricing Fallback feature, forwarded to Checkout on add-to-cart. */\n priceToken?: InputMaybe<Scalars['String']['input']>;\n /** Number of items offered. */\n quantity: Scalars['Int']['input'];\n /** Seller responsible for the offer. */\n seller: IStoreOrganization;\n};\n\n/** Order input. */\nexport type IStoreOrder = {\n /** Array with information on each accepted offer. */\n acceptedOffer: Array<IStoreOffer>;\n /** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */\n orderNumber: Scalars['String']['input'];\n /** Indicates whether or not items with attachments should be split. */\n shouldSplitItem?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Organization input. */\nexport type IStoreOrganization = {\n /** Organization ID. */\n identifier: Scalars['String']['input'];\n};\n\n/** Client profile data. */\nexport type IStorePerson = {\n /** Client email. */\n email: Scalars['String']['input'];\n /** Client last name. */\n familyName: Scalars['String']['input'];\n /** Client first name. */\n givenName: Scalars['String']['input'];\n /** Client ID. */\n id: Scalars['String']['input'];\n};\n\n/** Product input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type IStoreProduct = {\n /** Custom Product Additional Properties. */\n additionalProperty?: InputMaybe<Array<IStorePropertyValue>>;\n /** Array of product images. */\n image: Array<IStoreImage>;\n /** Product name. */\n name: Scalars['String']['input'];\n /** Stock Keeping Unit. Merchant-specific ID for the product. */\n sku: Scalars['String']['input'];\n};\n\nexport type IStorePropertyValue = {\n /** Property name. */\n name: Scalars['String']['input'];\n /** Property id. This propert changes according to the content of the object. */\n propertyID?: InputMaybe<Scalars['String']['input']>;\n /** Property value. May hold a string or the string representation of an object. */\n value: Scalars['ObjectOrString']['input'];\n /** Specifies the nature of the value */\n valueReference: Scalars['ObjectOrString']['input'];\n};\n\n/** Selected search facet input. */\nexport type IStoreSelectedFacet = {\n /** Selected search facet key. */\n key: Scalars['String']['input'];\n /** Selected search facet value. */\n value: Scalars['String']['input'];\n};\n\n/** Session input. */\nexport type IStoreSession = {\n /** Session input address type. */\n addressType?: InputMaybe<Scalars['String']['input']>;\n /** Session input b2b. */\n b2b?: InputMaybe<IStoreB2B>;\n /** Session input channel. */\n channel?: InputMaybe<Scalars['String']['input']>;\n /** Session input city. */\n city?: InputMaybe<Scalars['String']['input']>;\n /** Session input country. */\n country: Scalars['String']['input'];\n /** Session input currency. */\n currency: IStoreCurrency;\n /** Session input delivery mode. */\n deliveryMode?: InputMaybe<IStoreDeliveryMode>;\n /** Session input geoCoordinates. */\n geoCoordinates?: InputMaybe<IStoreGeoCoordinates>;\n /** Session input locale. */\n locale: Scalars['String']['input'];\n /** Marketing information input. */\n marketingData?: InputMaybe<IStoreMarketingData>;\n /** Session input person. */\n person?: InputMaybe<IStorePerson>;\n /** Session input postal code. */\n postalCode?: InputMaybe<Scalars['String']['input']>;\n /** Refresh token after Information. */\n refreshAfter?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Input to the cancel order API. */\nexport type IUserOrderCancel = {\n /** Customer's email. */\n customerEmail?: InputMaybe<Scalars['String']['input']>;\n /** Person's name. */\n orderId: Scalars['String']['input'];\n /** Reason. */\n reason?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type LogisticsInfo = {\n __typename?: 'LogisticsInfo';\n /** LogisticsInfo itemIndex. */\n itemIndex?: Maybe<Scalars['String']['output']>;\n /** LogisticsInfo selectedSla. */\n selectedSla?: Maybe<Scalars['String']['output']>;\n /** List of LogisticsInfo ShippingSLA. */\n slas?: Maybe<Array<Maybe<ShippingSla>>>;\n};\n\n/** Shipping Simulation Logistic Item. */\nexport type LogisticsItem = {\n __typename?: 'LogisticsItem';\n /** LogisticsItem availability. */\n availability?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem ID / Sku. */\n id?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem listPrice. */\n listPrice?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem measurementUnit. */\n measurementUnit?: Maybe<Scalars['String']['output']>;\n /** LogisticsItem price. */\n price?: Maybe<Scalars['Int']['output']>;\n /** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */\n priceValidUntil?: Maybe<Scalars['String']['output']>;\n /** Number of items. */\n quantity?: Maybe<Scalars['Int']['output']>;\n requestIndex?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem rewardValue. */\n rewardValue?: Maybe<Scalars['Int']['output']>;\n /** Seller responsible for the ShippingItem. */\n seller?: Maybe<Scalars['String']['output']>;\n /** List of Sellers. */\n sellerChain?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n /** LogisticsItem sellingPrice. */\n sellingPrice?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem tax. */\n tax?: Maybe<Scalars['Int']['output']>;\n /** LogisticsItem unitMultiplier. */\n unitMultiplier?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type MessageFields = {\n __typename?: 'MessageFields';\n /** MessageFields ean. */\n ean?: Maybe<Scalars['String']['output']>;\n /** MessageFields item index. */\n itemIndex?: Maybe<Scalars['String']['output']>;\n /** MessageFields sku name. */\n skuName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type MessageInfo = {\n __typename?: 'MessageInfo';\n /** MessageInfo code. */\n code?: Maybe<Scalars['String']['output']>;\n /** MessageInfo fields. */\n fields?: Maybe<MessageFields>;\n /** MessageInfo status. */\n status?: Maybe<Scalars['String']['output']>;\n /** MessageInfo text. */\n text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n /** Cancels user order */\n cancelOrder?: Maybe<UserOrderCancel>;\n /** Process Order Authorization */\n processOrderAuthorization?: Maybe<ProcessOrderAuthorizationResponse>;\n /**\n * Submits an uploaded file for bulk import into a VTEX cart via the Order Entry Service.\n * Returns an operationId to poll for the operation status.\n */\n startOrderEntryOperation?: Maybe<StoreOrderEntryOperationResult>;\n /** Starts an anonymous personalization session for the current shopper. */\n startRecommendationSession: Scalars['Boolean']['output'];\n /** Subscribes a new person to the newsletter list. */\n subscribeToNewsletter?: Maybe<PersonNewsletter>;\n /**\n * Uploads a file to the Order Entry Service and returns the S3 object key.\n * The file must be Base64-encoded and passed via the `data` input.\n * The returned `objectKey` is required to start an order entry operation.\n */\n uploadFileToOrderEntry?: Maybe<StoreOrderEntryUploadResult>;\n /** Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns `null`. */\n validateCart?: Maybe<StoreCart>;\n /** Updates a web session with the specified values. */\n validateSession?: Maybe<StoreSession>;\n};\n\n\nexport type MutationCancelOrderArgs = {\n data: IUserOrderCancel;\n};\n\n\nexport type MutationProcessOrderAuthorizationArgs = {\n data: IProcessOrderAuthorization;\n};\n\n\nexport type MutationStartOrderEntryOperationArgs = {\n data: IOrderEntryOperation;\n};\n\n\nexport type MutationSubscribeToNewsletterArgs = {\n data: IPersonNewsletter;\n};\n\n\nexport type MutationUploadFileToOrderEntryArgs = {\n data: IOrderEntryUpload;\n};\n\n\nexport type MutationValidateCartArgs = {\n cart: IStoreCart;\n session?: InputMaybe<IStoreSession>;\n};\n\n\nexport type MutationValidateSessionArgs = {\n search: Scalars['String']['input'];\n session: IStoreSession;\n};\n\n/** Newsletter information. */\nexport type PersonNewsletter = {\n __typename?: 'PersonNewsletter';\n /** Person's ID in the newsletter list. */\n id: Scalars['String']['output'];\n};\n\nexport type PickupAddress = {\n __typename?: 'PickupAddress';\n /** PickupAddress address id. */\n addressId?: Maybe<Scalars['String']['output']>;\n /** PickupAddress address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** PickupAddress city. */\n city?: Maybe<Scalars['String']['output']>;\n /** PickupAddress complement. */\n complement?: Maybe<Scalars['String']['output']>;\n /** PickupAddress country. */\n country?: Maybe<Scalars['String']['output']>;\n /** PickupAddress geo coordinates. */\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** PickupAddress neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** PickupAddress number. */\n number?: Maybe<Scalars['String']['output']>;\n /** PickupAddress postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** PickupAddress receiver name. */\n receiverName?: Maybe<Scalars['String']['output']>;\n /** PickupAddress reference. */\n reference?: Maybe<Scalars['String']['output']>;\n /** PickupAddress state. */\n state?: Maybe<Scalars['String']['output']>;\n /** PickupAddress street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPointAddress = {\n __typename?: 'PickupPointAddress';\n /** Address city. */\n city?: Maybe<Scalars['String']['output']>;\n /** Address neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** Address number. */\n number?: Maybe<Scalars['String']['output']>;\n /** Address postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Address state. */\n state?: Maybe<Scalars['String']['output']>;\n /** Address street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPointDistance = {\n __typename?: 'PickupPointDistance';\n /** Pickup point address. */\n address?: Maybe<PickupPointAddress>;\n /** Pickup point business hours. */\n businessHours?: Maybe<Array<Maybe<BusinessHour>>>;\n /** Pickup point distance. */\n distance?: Maybe<Scalars['Float']['output']>;\n /** Whether the pickup point is active. */\n isActive?: Maybe<Scalars['Boolean']['output']>;\n /** Pickup point ID. */\n pickupId?: Maybe<Scalars['String']['output']>;\n /** Pickup point name. */\n pickupName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupPoints = {\n __typename?: 'PickupPoints';\n /** List of pickup point distances for the given location. */\n pickupPointDistances?: Maybe<Array<Maybe<PickupPointDistance>>>;\n /** Hash of the pickup points data. */\n pickupPointsHash?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PickupStoreInfo = {\n __typename?: 'PickupStoreInfo';\n /** PickupStoreInfo additional information. */\n additionalInfo?: Maybe<Scalars['String']['output']>;\n /** PickupStoreInfo address. */\n address?: Maybe<PickupAddress>;\n /** PickupStoreInfo dock id. */\n dockId?: Maybe<Scalars['String']['output']>;\n /** PickupStoreInfo friendly name. */\n friendlyName?: Maybe<Scalars['String']['output']>;\n /** Information if the store has pickup enable. */\n isPickupStore?: Maybe<Scalars['Boolean']['output']>;\n};\n\n/** Process Order Authorization response. */\nexport type ProcessOrderAuthorizationResponse = {\n __typename?: 'ProcessOrderAuthorizationResponse';\n /** Indicates if authorization is pending for other authorizers. */\n isPendingForOtherAuthorizer: Scalars['Boolean']['output'];\n /** The updated rule for authorization, if any. */\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n};\n\n/** Extended Commercial Authorization rule with additional process context. */\nexport type ProcessOrderAuthorizationRule = {\n __typename?: 'ProcessOrderAuthorizationRule';\n /** Dimension ID. */\n dimensionId: Scalars['String']['output'];\n /** Order authorization ID. */\n orderAuthorizationId: Scalars['String']['output'];\n /** Base rule information. */\n rule: CommercialAuthorizationRule;\n};\n\nexport type ProductCountResult = {\n __typename?: 'ProductCountResult';\n /** Total product count. */\n total: Scalars['Int']['output'];\n};\n\nexport type Profile = {\n __typename?: 'Profile';\n /** Collection of user's address */\n addresses?: Maybe<Array<Maybe<ProfileAddress>>>;\n};\n\nexport type ProfileAddress = {\n __typename?: 'ProfileAddress';\n /** ProfileAddress address name/id. */\n addressName?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress city. */\n city?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress complement. */\n complement?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress country. */\n country?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress geo coordinate. */\n geoCoordinate?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n /** ProfileAddress neighborhood. */\n neighborhood?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress number. */\n number?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress receiver name. */\n receiverName?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress reference. */\n reference?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress state. */\n state?: Maybe<Scalars['String']['output']>;\n /** ProfileAddress street. */\n street?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Query = {\n __typename?: 'Query';\n /** Returns the account profile information for the current authenticated user (b2b or b2c user). */\n accountProfile: StoreAccountProfile;\n /** Returns information about all collections. */\n allCollections: StoreCollectionConnection;\n /** Returns information about all products. */\n allProducts: StoreProductConnection;\n /**\n * Lists the commercial contracts associated with the given Organization Unit,\n * resolved to human-readable corporate names. Governed: only contracts associated\n * with the authenticated buyer's Organization Unit are returned.\n */\n availableContracts: Array<StoreContract>;\n /** Returns the details of a collection based on the collection slug. */\n collection: StoreCollection;\n /**\n * Whether the current user holds the ad-hoc card platform permission, which\n * gates personal card management for Unit/Contract-affiliated buyers.\n *\n * Resolved from the user's roles by License Manager — it is not a session token\n * claim. Fails open (`true`) when the permission service is unreachable, so an\n * outage never locks buyers out of their own cards.\n */\n hasAdHocCardAccess: Scalars['Boolean']['output'];\n /** Returns whether the current authenticated user belongs to a B2B organization unit. */\n isOrganizationMember: Scalars['Boolean']['output'];\n /** Returns the list of saved credit cards for the current user. */\n listCreditCards?: Maybe<SavedCardListResult>;\n /** Returns the list of Orders that the User can view. */\n listUserOrders?: Maybe<UserOrderListMinimalResult>;\n /** Returns the list of Quotes that the authenticated Buyer can view. */\n listUserQuotes?: Maybe<UserQuoteListResult>;\n /** Returns the status of an Order Entry Service operation by its ID. */\n orderEntryOperation?: Maybe<StoreOrderEntryOperationStatus>;\n /** Returns the items in an orderForm by its ID. */\n orderFormItems: Array<StoreOrderFormCartItem>;\n /** Returns a list of pickup points near to the given geo coordinates. */\n pickupPoints?: Maybe<PickupPoints>;\n /** Returns the details of a product based on the specified locator. */\n product: StoreProduct;\n /** Returns the total product count information based on a specific location accessible through the VTEX segment cookie. */\n productCount?: Maybe<ProductCountResult>;\n /** Returns information about selected products. */\n products: Array<StoreProduct>;\n /** Returns information about the profile. */\n profile?: Maybe<Profile>;\n /** Returns personalized product recommendations for a given campaign. */\n recommendations: RecommendationResponse;\n /** Returns if there's a redirect for a search. */\n redirect?: Maybe<StoreRedirect>;\n /** Returns the result of a product, facet, or suggestion search. */\n search: StoreSearchResult;\n /** Returns a list of sellers available for a specific localization. */\n sellers?: Maybe<SellersData>;\n /** Returns information about shipping simulation. */\n shipping?: Maybe<ShippingData>;\n /** Returns information about the current user details. */\n userDetails: StoreUserDetails;\n /** Returns information about the Details of an User Order. */\n userOrder?: Maybe<UserOrderResult>;\n /** Returns information about the user validation. */\n validateUser?: Maybe<ValidateUserData>;\n};\n\n\nexport type QueryAllCollectionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n};\n\n\nexport type QueryAllProductsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n};\n\n\nexport type QueryAvailableContractsArgs = {\n orgUnitId: Scalars['String']['input'];\n};\n\n\nexport type QueryCollectionArgs = {\n slug: Scalars['String']['input'];\n};\n\n\nexport type QueryListUserOrdersArgs = {\n clientEmail?: InputMaybe<Scalars['String']['input']>;\n dateFinal?: InputMaybe<Scalars['String']['input']>;\n dateInitial?: InputMaybe<Scalars['String']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n pendingMyApproval?: InputMaybe<Scalars['Boolean']['input']>;\n perPage?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n text?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryListUserQuotesArgs = {\n createdAtFrom?: InputMaybe<Scalars['String']['input']>;\n createdAtTo?: InputMaybe<Scalars['String']['input']>;\n expiresAtFrom?: InputMaybe<Scalars['String']['input']>;\n expiresAtTo?: InputMaybe<Scalars['String']['input']>;\n label?: InputMaybe<Scalars['String']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n perPage?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n};\n\n\nexport type QueryOrderEntryOperationArgs = {\n operationId: Scalars['String']['input'];\n};\n\n\nexport type QueryOrderFormItemsArgs = {\n orderFormId: Scalars['String']['input'];\n};\n\n\nexport type QueryPickupPointsArgs = {\n geoCoordinates?: InputMaybe<IStoreGeoCoordinates>;\n};\n\n\nexport type QueryProductArgs = {\n locator: Array<IStoreSelectedFacet>;\n};\n\n\nexport type QueryProductCountArgs = {\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryProductsArgs = {\n productIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryProfileArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryRecommendationsArgs = {\n campaignVrn: Scalars['String']['input'];\n products?: InputMaybe<Array<Scalars['String']['input']>>;\n userId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryRedirectArgs = {\n selectedFacets?: InputMaybe<Array<IStoreSelectedFacet>>;\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySearchArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n first: Scalars['Int']['input'];\n selectedFacets?: InputMaybe<Array<IStoreSelectedFacet>>;\n sort?: InputMaybe<StoreSort>;\n sponsoredCount?: InputMaybe<Scalars['Int']['input']>;\n term?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySellersArgs = {\n country: Scalars['String']['input'];\n geoCoordinates?: InputMaybe<IGeoCoordinates>;\n postalCode?: InputMaybe<Scalars['String']['input']>;\n salesChannel?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryShippingArgs = {\n country: Scalars['String']['input'];\n items: Array<IShippingItem>;\n postalCode: Scalars['String']['input'];\n};\n\n\nexport type QueryUserOrderArgs = {\n orderId: Scalars['String']['input'];\n};\n\nexport type RecommendationCampaign = {\n __typename?: 'RecommendationCampaign';\n id: Scalars['String']['output'];\n title?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type RecommendationResponse = {\n __typename?: 'RecommendationResponse';\n campaign: RecommendationCampaign;\n correlationId: Scalars['String']['output'];\n products: Array<StoreProduct>;\n};\n\nexport type SkuSpecificationField = {\n __typename?: 'SKUSpecificationField';\n id?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n originalName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SkuSpecificationValue = {\n __typename?: 'SKUSpecificationValue';\n fieldId?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n originalName?: Maybe<Scalars['String']['output']>;\n};\n\n/** A saved payment card returned by the Saved-cards service. */\nexport type SavedCard = {\n __typename?: 'SavedCard';\n /** Account identifier that owns the card. */\n accountId?: Maybe<Scalars['String']['output']>;\n /** First digits of the card (BIN). */\n bin?: Maybe<Scalars['String']['output']>;\n /**\n * Buyer- or admin-assigned nickname for the card (e.g. \"Team lunch card\"), when\n * the Saved-cards service has one on file. Absent for most cards — callers\n * should fall back to `paymentSystemName` for display.\n */\n cardLabel?: Maybe<Scalars['String']['output']>;\n /** Masked card number, per PCI display rules. */\n cardNumber?: Maybe<Scalars['String']['output']>;\n /** Whether this card is active. */\n isActive?: Maybe<Scalars['Boolean']['output']>;\n /** Whether this card is the account default. */\n isDefault?: Maybe<Scalars['Boolean']['output']>;\n /**\n * Whether this card is personally owned by the buyer or shared by their\n * Organization/Contract.\n */\n origin: CardOrigin;\n /** Numeric payment system identifier. */\n paymentSystem?: Maybe<Scalars['String']['output']>;\n /** Human-readable payment system name (e.g. Visa, Mastercard). */\n paymentSystemName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Result of listing the current user's saved credit cards. */\nexport type SavedCardListResult = {\n __typename?: 'SavedCardListResult';\n /** The list of saved credit cards. */\n list?: Maybe<Array<SavedCard>>;\n};\n\n/** Search result. */\nexport type SearchMetadata = {\n __typename?: 'SearchMetadata';\n /** Indicates how the search engine corrected the misspelled word by using fuzzy logic. */\n fuzzy?: Maybe<Scalars['String']['output']>;\n /** Indicates if the search term was misspelled. */\n isTermMisspelled: Scalars['Boolean']['output'];\n /** Logical operator used to run the search. */\n logicalOperator: Scalars['String']['output'];\n};\n\n/** Information of sellers. */\nexport type SellerInfo = {\n __typename?: 'SellerInfo';\n /** Identification of the seller */\n id?: Maybe<Scalars['String']['output']>;\n /** Logo of the seller */\n logo?: Maybe<Scalars['String']['output']>;\n /** Name of the seller */\n name?: Maybe<Scalars['String']['output']>;\n};\n\n/** Regionalization with sellers information. */\nexport type SellersData = {\n __typename?: 'SellersData';\n /** Identification of region. */\n id?: Maybe<Scalars['String']['output']>;\n /** List of sellers. */\n sellers?: Maybe<Array<Maybe<SellerInfo>>>;\n};\n\n/** Response type for setting a new password. */\nexport type SetPasswordResponse = {\n __typename?: 'SetPasswordResponse';\n /** Message providing additional information about the operation. */\n message?: Maybe<Scalars['String']['output']>;\n /** Indicates whether the password was successfully set. */\n success: Scalars['Boolean']['output'];\n};\n\n/** Shipping Simulation information. */\nexport type ShippingData = {\n __typename?: 'ShippingData';\n /** Address information. */\n address?: Maybe<Address>;\n /** List of LogisticsItem. */\n items?: Maybe<Array<Maybe<LogisticsItem>>>;\n /** List of LogisticsInfo. */\n logisticsInfo?: Maybe<Array<Maybe<LogisticsInfo>>>;\n /** List of MessageInfo. */\n messages?: Maybe<Array<Maybe<MessageInfo>>>;\n};\n\nexport type ShippingSla = {\n __typename?: 'ShippingSLA';\n /** ShippingSLA available delivery windows. */\n availableDeliveryWindows?: Maybe<Array<Maybe<AvailableDeliveryWindows>>>;\n /** ShippingSLA carrier. */\n carrier?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA delivery channel. */\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n /** List of ShippingSLA delivery ids. */\n deliveryIds?: Maybe<Array<Maybe<DeliveryIds>>>;\n /** ShippingSLA friendly name. */\n friendlyName?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA id. */\n id?: Maybe<Scalars['String']['output']>;\n /**\n * ShippingSLA localized shipping estimate.\n * Note: this will always return a localized string for locale `en-US`.\n */\n localizedEstimates?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA name. */\n name?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA pickup distance. */\n pickupDistance?: Maybe<Scalars['Float']['output']>;\n /** ShippingSLA pickup point id. */\n pickupPointId?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA pickup store info. */\n pickupStoreInfo?: Maybe<PickupStoreInfo>;\n /** ShippingSLA price. */\n price?: Maybe<Scalars['Float']['output']>;\n /** ShippingSLA shipping estimate. */\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n /** ShippingSLA shipping estimate date. */\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SkuSpecification = {\n __typename?: 'SkuSpecification';\n field: SkuSpecificationField;\n values: Array<SkuSpecificationValue>;\n};\n\nexport type SkuVariants = {\n __typename?: 'SkuVariants';\n /** SKU property values for the current SKU. */\n activeVariations?: Maybe<Scalars['ActiveVariations']['output']>;\n /** All available options for each SKU variant property, indexed by their name. */\n allVariantProducts?: Maybe<Array<StoreProduct>>;\n /** All available options for each SKU variant property, indexed by their name. */\n allVariantsByName?: Maybe<Scalars['VariantsByName']['output']>;\n /**\n * Available options for each varying SKU property, taking into account the\n * `dominantVariantName` property. Returns all available options for the\n * dominant property, and only options that can be combined with its current\n * value for other properties.\n * If `dominantVariantName` is not present, the first variant will be\n * considered the dominant one.\n */\n availableVariations?: Maybe<Scalars['FormattedVariants']['output']>;\n /**\n * Maps property value combinations to their respective SKU's slug. Enables\n * us to retrieve the slug for the SKU that matches the currently selected\n * variations in O(1) time.\n * If `dominantVariantName` is not present, the first variant will be\n * considered the dominant one.\n */\n slugsMap?: Maybe<Scalars['SlugsMap']['output']>;\n};\n\n\nexport type SkuVariantsAvailableVariationsArgs = {\n dominantVariantName?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SkuVariantsSlugsMapArgs = {\n dominantVariantName?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Specification = {\n __typename?: 'Specification';\n name: Scalars['String']['output'];\n originalName: Scalars['String']['output'];\n values: Array<Scalars['String']['output']>;\n};\n\nexport type SpecificationGroup = {\n __typename?: 'SpecificationGroup';\n name: Scalars['String']['output'];\n originalName: Scalars['String']['output'];\n specifications: Array<Specification>;\n};\n\n/** Account profile information. */\nexport type StoreAccountProfile = {\n __typename?: 'StoreAccountProfile';\n email?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\n/** Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers. */\nexport type StoreAggregateOffer = {\n __typename?: 'StoreAggregateOffer';\n /** Highest price among all sellers. */\n highPrice: Scalars['Float']['output'];\n /** Lowest price among all sellers. */\n lowPrice: Scalars['Float']['output'];\n /** Lowest price among all sellers with current taxes. */\n lowPriceWithTaxes: Scalars['Float']['output'];\n /** Number of sellers selling this SKU. */\n offerCount: Scalars['Int']['output'];\n /** Array with information on each available offer. */\n offers: Array<StoreOffer>;\n /** ISO code of the currency used for the offer prices. */\n priceCurrency: Scalars['String']['output'];\n};\n\n/** Average rating, based on multiple ratings or reviews. */\nexport type StoreAggregateRating = {\n __typename?: 'StoreAggregateRating';\n /** Value of the aggregate rating. */\n ratingValue: Scalars['Float']['output'];\n /** Total number of ratings. */\n reviewCount: Scalars['Int']['output'];\n};\n\n/** information about the author of a product review or rating. */\nexport type StoreAuthor = {\n __typename?: 'StoreAuthor';\n /** Author name. */\n name: Scalars['String']['output'];\n};\n\nexport type StoreB2B = {\n __typename?: 'StoreB2B';\n contractName?: Maybe<Scalars['String']['output']>;\n customerId: Scalars['String']['output'];\n firstName?: Maybe<Scalars['String']['output']>;\n isRepresentative?: Maybe<Scalars['Boolean']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n organizationManager?: Maybe<Scalars['Boolean']['output']>;\n savedPostalCode?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n unitName?: Maybe<Scalars['String']['output']>;\n userEmail?: Maybe<Scalars['String']['output']>;\n userName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Brand of a given product. */\nexport type StoreBrand = {\n __typename?: 'StoreBrand';\n /** Brand name. */\n name: Scalars['String']['output'];\n};\n\n/** List of items consisting of chain linked web pages, ending with the current page. */\nexport type StoreBreadcrumbList = {\n __typename?: 'StoreBreadcrumbList';\n /** Array with breadcrumb elements. */\n itemListElement: Array<StoreListItem>;\n /** Number of breadcrumbs in the list. */\n numberOfItems: Scalars['Int']['output'];\n};\n\n/** Shopping cart information. */\nexport type StoreCart = {\n __typename?: 'StoreCart';\n /** List of shopping cart messages. */\n messages: Array<StoreCartMessage>;\n /** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */\n order: StoreOrder;\n};\n\n/** Shopping cart message. */\nexport type StoreCartMessage = {\n __typename?: 'StoreCartMessage';\n /** Shopping cart message status, which can be `INFO`, `WARNING` or `ERROR`. */\n status: StoreStatus;\n /** Shopping cart message text. */\n text: Scalars['String']['output'];\n};\n\n/** Product collection information. */\nexport type StoreCollection = {\n __typename?: 'StoreCollection';\n /** List of items consisting of chain linked web pages, ending with the current page. */\n breadcrumbList: StoreBreadcrumbList;\n /**\n * Slug the catalog resolves for the requested locale, lowercased.\n * Meant for the page's canonical URL: `slug` echoes the path the shopper\n * visited, and by-linkid matches case-insensitively, so without this every\n * casing variant would claim to be canonical. Unlike `otherLocales`, it may fall\n * back to a slug registered for another locale, so it must never be used to\n * build hreflang annotations.\n */\n canonicalSlug?: Maybe<Scalars['String']['output']>;\n /** Collection ID. */\n id: Scalars['ID']['output'];\n /** Collection meta information. Used for search. */\n meta: StoreCollectionMeta;\n /**\n * Localized versions of this collection for all available locales.\n * Only announces slugs the catalog has registered for each locale, so it is safe\n * to build hreflang annotations from. Only populated when localization is\n * enabled.\n */\n otherLocales?: Maybe<Array<StoreCollectionLocale>>;\n /** Meta tag data. */\n seo: StoreSeo;\n /** Corresponding collection URL slug, with which to retrieve this entity. */\n slug: Scalars['String']['output'];\n /** Collection type. */\n type: StoreCollectionType;\n};\n\n/** Collection connections, including pagination information and collections returned by the query. */\nexport type StoreCollectionConnection = {\n __typename?: 'StoreCollectionConnection';\n /** Array with collection connection page edges, each containing a collection and a corresponding cursor.. */\n edges: Array<StoreCollectionEdge>;\n /** Collection pagination information. */\n pageInfo: StorePageInfo;\n};\n\n/** Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination. */\nexport type StoreCollectionEdge = {\n __typename?: 'StoreCollectionEdge';\n /** Collection cursor. Used as pagination reference. */\n cursor: Scalars['String']['output'];\n /** Each collection node contains the information of a product collection returned by the query. */\n node: StoreCollection;\n};\n\n/** Product collection facet, used for search. */\nexport type StoreCollectionFacet = {\n __typename?: 'StoreCollectionFacet';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet value. */\n value: Scalars['String']['output'];\n};\n\n/** Localized collection data for a specific locale. */\nexport type StoreCollectionLocale = {\n __typename?: 'StoreCollectionLocale';\n /** Locale code (e.g. \"pt-BR\", \"it-IT\"). */\n locale: Scalars['String']['output'];\n /** Localized collection slug (e.g. \"vestuario/camisetas\"). */\n slug: Scalars['String']['output'];\n};\n\n/** Collection meta information. Used for search. */\nexport type StoreCollectionMeta = {\n __typename?: 'StoreCollectionMeta';\n /** List of selected collection facets. */\n selectedFacets: Array<StoreCollectionFacet>;\n};\n\n/**\n * Product collection type. Possible values are `Department`, `Category`, `Brand` or `Collection`.\n *\n * `SubCategory` and `Cluster` are still declared for backward compatibility but are\n * deprecated and never returned.\n */\nexport const enum StoreCollectionType {\n /** Product brand. */\n Brand = 'Brand',\n /** Second level of product categorization. */\n Category = 'Category',\n /**\n * Product cluster.\n *\n * Deprecated: never returned — clusters resolve as `Collection`.\n * @deprecated Never returned since the by-linkid migration: clusters and curated collections are both served by `collection/by-linkid`, whose response carries no discriminator between them, so both resolve as `Collection`. Scheduled for removal in the next major.\n */\n Cluster = 'Cluster',\n /** Product collection. */\n Collection = 'Collection',\n /** First level of product categorization. */\n Department = 'Department',\n /**\n * Third level of product categorization.\n *\n * Deprecated: never returned — third-level categories resolve as `Category`.\n * @deprecated Never returned since the by-linkid migration: the category response only exposes `fatherCategoryId`, which distinguishes root from non-root but not tree depth, so third-level categories resolve as `Category`. Scheduled for removal in the next major.\n */\n SubCategory = 'SubCategory'\n};\n\n/** A commercial contract available to a buyer's Organization Unit. */\nexport type StoreContract = {\n __typename?: 'StoreContract';\n /** Human-readable corporate name of the contract (resolved from MasterData). */\n corporateName: Scalars['String']['output'];\n /** Contract identifier (the contract/scope ID associated with the Organization Unit). */\n id: Scalars['ID']['output'];\n /** Indicates whether this contract is the one currently active in the session. */\n isActive: Scalars['Boolean']['output'];\n /** Indicates whether this contract is the Organization Unit's default contract. */\n isDefault: Scalars['Boolean']['output'];\n};\n\n/** Currency information. */\nexport type StoreCurrency = {\n __typename?: 'StoreCurrency';\n /** Currency code (e.g: USD). */\n code: Scalars['String']['output'];\n /** Currency symbol (e.g: $). */\n symbol: Scalars['String']['output'];\n};\n\n/** Delivery mode information. */\nexport type StoreDeliveryMode = {\n __typename?: 'StoreDeliveryMode';\n /** The delivery channel information of the session. */\n deliveryChannel: Scalars['String']['output'];\n /** The delivery method information of the session. */\n deliveryMethod: Scalars['String']['output'];\n /** The delivery window information of the session. */\n deliveryWindow?: Maybe<StoreDeliveryWindow>;\n};\n\n/** Delivery window information. */\nexport type StoreDeliveryWindow = {\n __typename?: 'StoreDeliveryWindow';\n /** The delivery window end date information. */\n endDate: Scalars['String']['output'];\n /** The delivery window start date information. */\n startDate: Scalars['String']['output'];\n};\n\nexport type StoreFacet = StoreFacetBoolean | StoreFacetRange;\n\n/** Search facet boolean information. */\nexport type StoreFacetBoolean = {\n __typename?: 'StoreFacetBoolean';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet label. */\n label: Scalars['String']['output'];\n /** Array with information on each facet value. */\n values: Array<StoreFacetValueBoolean>;\n};\n\n/** Search facet range information. */\nexport type StoreFacetRange = {\n __typename?: 'StoreFacetRange';\n /** Facet key. */\n key: Scalars['String']['output'];\n /** Facet label. */\n label: Scalars['String']['output'];\n /** Maximum facet range value. */\n max: StoreFacetValueRange;\n /** Minimum facet range value. */\n min: StoreFacetValueRange;\n};\n\n/** Search facet type. */\nexport const enum StoreFacetType {\n /** Indicates boolean search facet. */\n Boolean = 'BOOLEAN',\n /** Indicates range type search facet. */\n Range = 'RANGE'\n};\n\n/** Information of a specific facet value. */\nexport type StoreFacetValueBoolean = {\n __typename?: 'StoreFacetValueBoolean';\n /** Facet value label. */\n label: Scalars['String']['output'];\n /** Number of items with this facet. */\n quantity?: Maybe<Scalars['Int']['output']>;\n /** Indicates whether facet is selected. */\n selected: Scalars['Boolean']['output'];\n /** Facet value. */\n value: Scalars['String']['output'];\n};\n\n/** Search facet range value information. Used for minimum and maximum range values. */\nexport type StoreFacetValueRange = {\n __typename?: 'StoreFacetValueRange';\n /** Search facet range absolute value. */\n absolute: Scalars['Float']['output'];\n /** Search facet range selected value. */\n selected: Scalars['Float']['output'];\n};\n\n/** Geographic coordinates information. */\nexport type StoreGeoCoordinates = {\n __typename?: 'StoreGeoCoordinates';\n /** The latitude of the geographic coordinates. */\n latitude: Scalars['Float']['output'];\n /** The longitude of the geographic coordinates. */\n longitude: Scalars['Float']['output'];\n};\n\n/** Image. */\nexport type StoreImage = {\n __typename?: 'StoreImage';\n /** Alias for the image. */\n alternateName: Scalars['String']['output'];\n /** Image URL. */\n url: Scalars['String']['output'];\n};\n\n/** Item of a list. */\nexport type StoreListItem = {\n __typename?: 'StoreListItem';\n /** List item value. */\n item: Scalars['String']['output'];\n /** Name of the list item. */\n name: Scalars['String']['output'];\n /** Position of the item in the list. */\n position: Scalars['Int']['output'];\n};\n\n/** Marketing information. */\nexport type StoreMarketingData = {\n __typename?: 'StoreMarketingData';\n utmCampaign?: Maybe<Scalars['String']['output']>;\n utmMedium?: Maybe<Scalars['String']['output']>;\n utmSource?: Maybe<Scalars['String']['output']>;\n utmiCampaign?: Maybe<Scalars['String']['output']>;\n utmiPage?: Maybe<Scalars['String']['output']>;\n utmiPart?: Maybe<Scalars['String']['output']>;\n};\n\n/** Offer information. */\nexport type StoreOffer = {\n __typename?: 'StoreOffer';\n /** Offer item availability. */\n availability: Scalars['String']['output'];\n /** Whether this offer is a gift (e.g. free promotional item). */\n isGift?: Maybe<Scalars['Boolean']['output']>;\n /** Offer item condition. */\n itemCondition: Scalars['String']['output'];\n /** Information on the item being offered. */\n itemOffered: StoreProduct;\n /** This is displayed as the \"from\" price in the context of promotions' price comparison. This may change before it reaches the shelf. */\n listPrice: Scalars['Float']['output'];\n /** List price among with current taxes. */\n listPriceWithTaxes: Scalars['Float']['output'];\n /** Also known as spot price. */\n price: Scalars['Float']['output'];\n /** ISO code of the currency used for the offer prices. */\n priceCurrency: Scalars['String']['output'];\n /**\n * Signed price token (JWT) used by the Pricing Fallback feature. When present, it should be\n * forwarded to Checkout on add-to-cart so the platform can trust the offer's price even if\n * the Pricing System is unavailable. May be null when the signing step fails or the feature is disabled.\n */\n priceToken?: Maybe<Scalars['String']['output']>;\n /** Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time. */\n priceValidUntil: Scalars['String']['output'];\n /** Also known as spot price with taxes. */\n priceWithTaxes: Scalars['Float']['output'];\n /** Number of items offered. */\n quantity: Scalars['Int']['output'];\n /** Seller responsible for the offer. */\n seller: StoreOrganization;\n /** Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf. */\n sellingPrice: Scalars['Float']['output'];\n};\n\n/** Information of a specific order. */\nexport type StoreOrder = {\n __typename?: 'StoreOrder';\n /** Array with information on each accepted offer. */\n acceptedOffer: Array<StoreOffer>;\n /** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */\n orderNumber: Scalars['String']['output'];\n /**\n * Sales channel of the underlying orderForm when FastStore adopted it because\n * the browser session was stale (e.g. after Quick Order). Clients should align\n * `session.channel` to this value. Null when no SC adoption happened.\n */\n salesChannel?: Maybe<Scalars['String']['output']>;\n /** Indicates whether or not items with attachments should be split. */\n shouldSplitItem?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type StoreOrderEntryMissingItem = {\n __typename?: 'StoreOrderEntryMissingItem';\n itemId: Scalars['String']['output'];\n itemName?: Maybe<Scalars['String']['output']>;\n reason: Scalars['String']['output'];\n};\n\nexport type StoreOrderEntryOperationResult = {\n __typename?: 'StoreOrderEntryOperationResult';\n operationId: Scalars['String']['output'];\n};\n\nexport type StoreOrderEntryOperationStatus = {\n __typename?: 'StoreOrderEntryOperationStatus';\n entityId?: Maybe<Scalars['String']['output']>;\n message?: Maybe<Scalars['String']['output']>;\n missingItems?: Maybe<Array<StoreOrderEntryMissingItem>>;\n status: Scalars['String']['output'];\n};\n\n/** Result returned after uploading a file to the Order Entry Service. */\nexport type StoreOrderEntryUploadResult = {\n __typename?: 'StoreOrderEntryUploadResult';\n objectKey: Scalars['String']['output'];\n};\n\nexport type StoreOrderFormCartItem = {\n __typename?: 'StoreOrderFormCartItem';\n availability: Scalars['String']['output'];\n id: Scalars['String']['output'];\n imageUrl?: Maybe<Scalars['String']['output']>;\n listPrice: Scalars['Int']['output'];\n name: Scalars['String']['output'];\n price: Scalars['Int']['output'];\n quantity: Scalars['Int']['output'];\n seller: Scalars['String']['output'];\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Organization. */\nexport type StoreOrganization = {\n __typename?: 'StoreOrganization';\n /** Organization ID. */\n identifier: Scalars['String']['output'];\n};\n\n/** Whenever you make a query that allows for pagination, such as `allProducts` or `allCollections`, you can check `StorePageInfo` to learn more about the complete set of items and use it to paginate your queries. */\nexport type StorePageInfo = {\n __typename?: 'StorePageInfo';\n /** Cursor corresponding to the last possible item. */\n endCursor: Scalars['String']['output'];\n /** Indicates whether there is at least one more page with items after the ones returned in the current query. */\n hasNextPage: Scalars['Boolean']['output'];\n /** Indicates whether there is at least one more page with items before the ones returned in the current query. */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** Cursor corresponding to the first possible item. */\n startCursor: Scalars['String']['output'];\n /** Total number of items (products or collections), not pages. */\n totalCount: Scalars['Int']['output'];\n};\n\n/** Client profile data. */\nexport type StorePerson = {\n __typename?: 'StorePerson';\n /** Client email. */\n email: Scalars['String']['output'];\n /** Client last name. */\n familyName: Scalars['String']['output'];\n /** Client first name. */\n givenName: Scalars['String']['output'];\n /** Client ID. */\n id: Scalars['String']['output'];\n};\n\n/** Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProduct = {\n __typename?: 'StoreProduct';\n /** Array of additional properties. */\n additionalProperty: Array<StorePropertyValue>;\n /** Advertisement information about the product. */\n advertisement?: Maybe<Advertisement>;\n /** Aggregate ratings data. */\n aggregateRating: StoreAggregateRating;\n /** Product brand. */\n brand: StoreBrand;\n /** List of items consisting of chain linked web pages, ending with the current page. */\n breadcrumbList: StoreBreadcrumbList;\n /**\n * Slug for the store's default locale, including the SKU ID suffix.\n * Navigation fallback for the locale selector when the target locale is absent\n * from `otherLocales`. Best-effort: it may point at a slug the catalog has not\n * registered for the default locale, so it must never be used to build hreflang\n * annotations. Only populated when localization is enabled.\n */\n defaultLocaleSlug?: Maybe<Scalars['String']['output']>;\n /** Delivery Promise product's badge. */\n deliveryPromiseBadges?: Maybe<Array<Maybe<DeliveryPromiseBadge>>>;\n /** Product description. */\n description: Scalars['String']['output'];\n /** Global Trade Item Number. */\n gtin: Scalars['String']['output'];\n /** Indicates whether the product has specifications. */\n hasSpecifications?: Maybe<Scalars['Boolean']['output']>;\n /** Array of images. */\n image: Array<StoreImage>;\n /** Indicates product group related to this product. */\n isVariantOf: StoreProductGroup;\n /** Manufacturer Part Number. Identifies the product to its manufacturer. */\n mpn: Scalars['String']['output'];\n /** Product name. */\n name: Scalars['String']['output'];\n /** Aggregate offer information. */\n offers: StoreAggregateOffer;\n /**\n * Localized versions of this product for all available locales.\n * Only populated when localization is enabled.\n */\n otherLocales?: Maybe<Array<StoreProductLocale>>;\n /** Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs. */\n productID: Scalars['String']['output'];\n /** The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601 */\n releaseDate: Scalars['String']['output'];\n /** Array with review information. */\n review: Array<StoreReview>;\n /** Meta tag data. */\n seo: StoreSeo;\n /** Stock Keeping Unit. Merchant-specific ID for the product. */\n sku: Scalars['String']['output'];\n /** Indicate the specifications of a product. */\n skuSpecifications: Array<SkuSpecification>;\n /** Corresponding collection URL slug, with which to retrieve this entity. */\n slug: Scalars['String']['output'];\n /** Indicate the specifications of a group of SKUs. */\n specificationGroups: Array<SpecificationGroup>;\n /** Sku Unit Multiplier */\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\n\n/** Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProductImageArgs = {\n context?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Product connections, including pagination information and products returned by the query. */\nexport type StoreProductConnection = {\n __typename?: 'StoreProductConnection';\n /** Array with product connection edges, each containing a product and a corresponding cursor. */\n edges: Array<StoreProductEdge>;\n /** Product pagination information. */\n pageInfo: StorePageInfo;\n};\n\n/** Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination. */\nexport type StoreProductEdge = {\n __typename?: 'StoreProductEdge';\n /** Product cursor. Used as pagination reference. */\n cursor: Scalars['String']['output'];\n /** Each product node contains the information of a product returned by the query. */\n node: StoreProduct;\n};\n\n/** Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on. */\nexport type StoreProductGroup = {\n __typename?: 'StoreProductGroup';\n /** Array of additional properties. */\n additionalProperty: Array<StorePropertyValue>;\n /** Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). */\n hasVariant: Array<StoreProduct>;\n /** Product group name. */\n name: Scalars['String']['output'];\n /** Product group ID. */\n productGroupID: Scalars['String']['output'];\n /**\n * Object containing data structures to facilitate handling different SKU\n * variant properties. Specially useful for implementing SKU selection\n * components.\n */\n skuVariants?: Maybe<SkuVariants>;\n};\n\n/** Localized product data for a specific locale. */\nexport type StoreProductLocale = {\n __typename?: 'StoreProductLocale';\n /** Locale code (e.g. \"pt-BR\", \"it-IT\"). */\n locale: Scalars['String']['output'];\n /** Localized product slug including the SKU ID suffix (e.g. \"adidas-polo-uomo-65\"). */\n slug: Scalars['String']['output'];\n};\n\n/** Properties that can be associated with products and products groups. */\nexport type StorePropertyValue = {\n __typename?: 'StorePropertyValue';\n /** Property name. */\n name: Scalars['String']['output'];\n /** Property id. This propert changes according to the content of the object. */\n propertyID: Scalars['String']['output'];\n /** Property value. May hold a string or the string representation of an object. */\n value: Scalars['ObjectOrString']['output'];\n /** Specifies the nature of the value */\n valueReference: Scalars['ObjectOrString']['output'];\n};\n\n/**\n * Redirect informations, including url returned by the query.\n * https://schema.org/Thing\n */\nexport type StoreRedirect = {\n __typename?: 'StoreRedirect';\n /** URL to redirect */\n url?: Maybe<Scalars['String']['output']>;\n};\n\n/** Information of a given review. */\nexport type StoreReview = {\n __typename?: 'StoreReview';\n /** Review author. */\n author: StoreAuthor;\n /** Review rating information. */\n reviewRating: StoreReviewRating;\n};\n\n/** Information of a given review rating. */\nexport type StoreReviewRating = {\n __typename?: 'StoreReviewRating';\n /** Best rating value. */\n bestRating: Scalars['Float']['output'];\n /** Rating value. */\n ratingValue: Scalars['Float']['output'];\n};\n\n/** Search result. */\nexport type StoreSearchResult = {\n __typename?: 'StoreSearchResult';\n /** Array of search result facets. */\n facets: Array<StoreFacet>;\n /** Search result metadata. Additional data can be used to send analytics events. */\n metadata?: Maybe<SearchMetadata>;\n /** Search result products. */\n products: StoreProductConnection;\n /** Search result searchId. Unique identifier for the search query can be used to correlate search analytics events. */\n searchId: Scalars['String']['output'];\n /** Search result suggestions. */\n suggestions: StoreSuggestions;\n};\n\n/** Search Engine Optimization (SEO) tags data. */\nexport type StoreSeo = {\n __typename?: 'StoreSeo';\n /** Canonical tag. */\n canonical: Scalars['String']['output'];\n /** Description tag. */\n description: Scalars['String']['output'];\n /** Title tag. */\n title: Scalars['String']['output'];\n /** Title template tag. */\n titleTemplate: Scalars['String']['output'];\n};\n\n/** Session information. */\nexport type StoreSession = {\n __typename?: 'StoreSession';\n /** Session address type. */\n addressType?: Maybe<Scalars['String']['output']>;\n /** B2B Information. */\n b2b?: Maybe<StoreB2B>;\n /** Session channel. */\n channel?: Maybe<Scalars['String']['output']>;\n /** Session city. */\n city?: Maybe<Scalars['String']['output']>;\n /** Session country. */\n country: Scalars['String']['output'];\n /** Session currency. */\n currency: StoreCurrency;\n /** Session delivery mode. */\n deliveryMode?: Maybe<StoreDeliveryMode>;\n /** Session input geoCoordinates. */\n geoCoordinates?: Maybe<StoreGeoCoordinates>;\n /** Session locale. */\n locale: Scalars['String']['output'];\n /** Marketing information. */\n marketingData?: Maybe<StoreMarketingData>;\n /** Session input person. */\n person?: Maybe<StorePerson>;\n /** Session postal code. */\n postalCode?: Maybe<Scalars['String']['output']>;\n /** Refresh token after Information. */\n refreshAfter?: Maybe<Scalars['String']['output']>;\n};\n\n/** Product search results sorting options. */\nexport const enum StoreSort {\n /** Sort by discount value, from highest to lowest. */\n DiscountDesc = 'discount_desc',\n /** Sort by name, in alphabetical order. */\n NameAsc = 'name_asc',\n /** Sort by name, in reverse alphabetical order. */\n NameDesc = 'name_desc',\n /** Sort by orders, from highest to lowest. */\n OrdersDesc = 'orders_desc',\n /** Sort by price, from lowest to highest. */\n PriceAsc = 'price_asc',\n /** Sort by price, from highest to lowest. */\n PriceDesc = 'price_desc',\n /** Sort by release date, from highest to lowest. */\n ReleaseDesc = 'release_desc',\n /** Sort by product score, from highest to lowest. */\n ScoreDesc = 'score_desc'\n};\n\n/** Status used to indicate a message type. For instance, a shopping cart informative or error message. */\nexport const enum StoreStatus {\n Error = 'ERROR',\n Info = 'INFO',\n Warning = 'WARNING'\n};\n\n/** Suggestion term. */\nexport type StoreSuggestionTerm = {\n __typename?: 'StoreSuggestionTerm';\n /** Its occurrences count. */\n count: Scalars['Int']['output'];\n /** The term. */\n value: Scalars['String']['output'];\n};\n\n/** Suggestions information. */\nexport type StoreSuggestions = {\n __typename?: 'StoreSuggestions';\n /** Array with suggestion products' information. */\n products: Array<StoreProduct>;\n /** Array with suggestion terms. */\n terms: Array<StoreSuggestionTerm>;\n};\n\n/** User details information. */\nexport type StoreUserDetails = {\n __typename?: 'StoreUserDetails';\n /** User's email. */\n email?: Maybe<Scalars['String']['output']>;\n /** User's name. */\n name?: Maybe<Scalars['String']['output']>;\n /** User's organizational unit. */\n orgUnit?: Maybe<Scalars['String']['output']>;\n /** User's phone number. */\n phone?: Maybe<Scalars['String']['output']>;\n /** User's role. */\n role?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n /** User's username (login). May differ from email when Alternative Login is enabled. */\n username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrder = {\n __typename?: 'UserOrder';\n affiliateId?: Maybe<Scalars['String']['output']>;\n allowCancellation?: Maybe<Scalars['Boolean']['output']>;\n allowEdition?: Maybe<Scalars['Boolean']['output']>;\n authorizedDate?: Maybe<Scalars['String']['output']>;\n budgetData?: Maybe<UserOrderBudgetData>;\n callCenterOperatorData?: Maybe<Scalars['String']['output']>;\n canProcessOrderAuthorization?: Maybe<Scalars['Boolean']['output']>;\n cancelReason?: Maybe<Scalars['String']['output']>;\n cancellationData?: Maybe<UserOrderCancellationData>;\n cancellationRequests?: Maybe<Array<Maybe<UserOrderCancellationRequest>>>;\n changesAttachment?: Maybe<Scalars['String']['output']>;\n checkedInPickupPointId?: Maybe<Scalars['String']['output']>;\n clientPreferencesData?: Maybe<UserOrderClientPreferencesData>;\n clientProfileData?: Maybe<UserOrderClientProfileData>;\n commercialConditionData?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n customData?: Maybe<UserOrderCustomData>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>;\n deliveryOptionsData?: Maybe<UserOrderDeliveryOptionsData>;\n followUpEmail?: Maybe<Scalars['String']['output']>;\n giftRegistryData?: Maybe<Scalars['String']['output']>;\n hostname?: Maybe<Scalars['String']['output']>;\n invoiceData?: Maybe<Scalars['String']['output']>;\n invoicedDate?: Maybe<Scalars['String']['output']>;\n isCheckedIn?: Maybe<Scalars['Boolean']['output']>;\n isCompleted?: Maybe<Scalars['Boolean']['output']>;\n itemMetadata?: Maybe<UserOrderItemMetadata>;\n items?: Maybe<Array<Maybe<UserOrderItems>>>;\n lastChange?: Maybe<Scalars['String']['output']>;\n lastMessage?: Maybe<Scalars['String']['output']>;\n marketingData?: Maybe<Scalars['String']['output']>;\n marketplace?: Maybe<UserOrderMarketplace>;\n marketplaceItems?: Maybe<Array<Maybe<UserOrderItems>>>;\n marketplaceOrderId?: Maybe<Scalars['String']['output']>;\n marketplaceServicesEndpoint?: Maybe<Scalars['String']['output']>;\n merchantName?: Maybe<Scalars['String']['output']>;\n openTextField?: Maybe<Scalars['String']['output']>;\n orderFormId?: Maybe<Scalars['String']['output']>;\n orderGroup?: Maybe<Scalars['String']['output']>;\n orderId?: Maybe<Scalars['String']['output']>;\n origin?: Maybe<Scalars['String']['output']>;\n packageAttachment?: Maybe<UserOrderPackageAttachment>;\n paymentData?: Maybe<UserOrderPaymentData>;\n purchaseAgentData?: Maybe<UserOrderPurchaseAgentData>;\n ratesAndBenefitsData?: Maybe<UserOrderRatesAndBenefitsData>;\n roundingError?: Maybe<Scalars['Int']['output']>;\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n salesChannel?: Maybe<Scalars['String']['output']>;\n sellerOrderId?: Maybe<Scalars['String']['output']>;\n sellers?: Maybe<Array<Maybe<UserOrderStoreSellers>>>;\n sequence?: Maybe<Scalars['String']['output']>;\n shippingData?: Maybe<UserOrderShippingData>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n storePreferencesData?: Maybe<UserOrderStorePreferencesData>;\n subscriptionData?: Maybe<Scalars['String']['output']>;\n taxData?: Maybe<Scalars['String']['output']>;\n totals?: Maybe<Array<Maybe<UserOrderTotals>>>;\n value?: Maybe<Scalars['Float']['output']>;\n workflowIsInError?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAdditionalInfo = {\n __typename?: 'UserOrderAdditionalInfo';\n brandId?: Maybe<Scalars['String']['output']>;\n brandName?: Maybe<Scalars['String']['output']>;\n categories?: Maybe<Array<Maybe<UserOrderCategories>>>;\n categoriesIds?: Maybe<Scalars['String']['output']>;\n commercialConditionId?: Maybe<Scalars['String']['output']>;\n dimension?: Maybe<UserOrderDimension>;\n offeringInfo?: Maybe<Scalars['String']['output']>;\n offeringType?: Maybe<Scalars['String']['output']>;\n offeringTypeId?: Maybe<Scalars['String']['output']>;\n productClusterId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderAddress = {\n __typename?: 'UserOrderAddress';\n addressId?: Maybe<Scalars['String']['output']>;\n addressType?: Maybe<Scalars['String']['output']>;\n city?: Maybe<Scalars['String']['output']>;\n complement?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n entityId?: Maybe<Scalars['String']['output']>;\n geoCoordinates?: Maybe<Array<Maybe<Scalars['Float']['output']>>>;\n neighborhood?: Maybe<Scalars['String']['output']>;\n number?: Maybe<Scalars['String']['output']>;\n postalCode?: Maybe<Scalars['String']['output']>;\n receiverName?: Maybe<Scalars['String']['output']>;\n reference?: Maybe<Scalars['String']['output']>;\n state?: Maybe<Scalars['String']['output']>;\n street?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderAssemblyOptions = {\n __typename?: 'UserOrderAssemblyOptions';\n Id?: Maybe<Scalars['String']['output']>;\n Name?: Maybe<Scalars['String']['output']>;\n Required?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAttachmentOfferings = {\n __typename?: 'UserOrderAttachmentOfferings';\n name?: Maybe<Scalars['String']['output']>;\n required?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderAttachments = {\n __typename?: 'UserOrderAttachments';\n content?: Maybe<Scalars['JSONObject']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudget = {\n __typename?: 'UserOrderBudget';\n allocations?: Maybe<Array<Maybe<UserOrderBudgetAllocation>>>;\n balance?: Maybe<UserOrderBudgetBalance>;\n cycleConfiguration?: Maybe<UserOrderBudgetCycleConfiguration>;\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetAllocation = {\n __typename?: 'UserOrderBudgetAllocation';\n ToBeSpent?: Maybe<Scalars['Float']['output']>;\n balance?: Maybe<UserOrderBudgetBalance>;\n id?: Maybe<Scalars['String']['output']>;\n linkedEntity?: Maybe<UserOrderBudgetAllocationLinkedEntity>;\n reservations?: Maybe<Scalars['JSONObject']['output']>;\n};\n\nexport type UserOrderBudgetAllocationLinkedEntity = {\n __typename?: 'UserOrderBudgetAllocationLinkedEntity';\n id?: Maybe<Scalars['String']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetBalance = {\n __typename?: 'UserOrderBudgetBalance';\n amount?: Maybe<Scalars['Float']['output']>;\n balanceAdjustment?: Maybe<Scalars['Float']['output']>;\n remaining?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderBudgetCycleConfiguration = {\n __typename?: 'UserOrderBudgetCycleConfiguration';\n autoResetOnPeriodEnd?: Maybe<Scalars['Boolean']['output']>;\n carryOverBalance?: Maybe<Scalars['Boolean']['output']>;\n endDate?: Maybe<Scalars['String']['output']>;\n startDate?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderBudgetData = {\n __typename?: 'UserOrderBudgetData';\n budgets?: Maybe<Array<Maybe<UserOrderBudget>>>;\n};\n\nexport type UserOrderCancel = {\n __typename?: 'UserOrderCancel';\n data?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCancellationData = {\n __typename?: 'UserOrderCancellationData';\n CancellationDate?: Maybe<Scalars['String']['output']>;\n Reason?: Maybe<Scalars['String']['output']>;\n RequestedByPaymentNotification?: Maybe<Scalars['Boolean']['output']>;\n RequestedBySellerNotification?: Maybe<Scalars['Boolean']['output']>;\n RequestedBySystem?: Maybe<Scalars['Boolean']['output']>;\n RequestedByUser?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCancellationRequest = {\n __typename?: 'UserOrderCancellationRequest';\n cancellationRequestDate?: Maybe<Scalars['String']['output']>;\n cancellationRequestDenyDate?: Maybe<Scalars['String']['output']>;\n deniedBySeller?: Maybe<Scalars['Boolean']['output']>;\n deniedBySellerReason?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n requestedByUser?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCategories = {\n __typename?: 'UserOrderCategories';\n id?: Maybe<Scalars['Int']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderClientPreferencesData = {\n __typename?: 'UserOrderClientPreferencesData';\n locale?: Maybe<Scalars['String']['output']>;\n optinNewsLetter?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderClientProfileData = {\n __typename?: 'UserOrderClientProfileData';\n corporateDocument?: Maybe<Scalars['String']['output']>;\n corporateName?: Maybe<Scalars['String']['output']>;\n corporatePhone?: Maybe<Scalars['String']['output']>;\n customerClass?: Maybe<Scalars['String']['output']>;\n customerCode?: Maybe<Scalars['String']['output']>;\n document?: Maybe<Scalars['String']['output']>;\n documentType?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n isCorporate?: Maybe<Scalars['Boolean']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n stateInscription?: Maybe<Scalars['String']['output']>;\n tradeName?: Maybe<Scalars['String']['output']>;\n userProfileId?: Maybe<Scalars['String']['output']>;\n userProfileVersion?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderContactInformation = {\n __typename?: 'UserOrderContactInformation';\n document?: Maybe<Scalars['String']['output']>;\n documentType?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n id: Scalars['ID']['output'];\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCourierStatus = {\n __typename?: 'UserOrderCourierStatus';\n data?: Maybe<Array<UserOrderTrackingInformation>>;\n finished?: Maybe<Scalars['Boolean']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderCurrencyFormatInfo = {\n __typename?: 'UserOrderCurrencyFormatInfo';\n CurrencyDecimalDigits?: Maybe<Scalars['Int']['output']>;\n CurrencyDecimalSeparator?: Maybe<Scalars['String']['output']>;\n CurrencyGroupSeparator?: Maybe<Scalars['String']['output']>;\n CurrencyGroupSize?: Maybe<Scalars['Int']['output']>;\n StartsWithCurrencySymbol?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderCustomApp = {\n __typename?: 'UserOrderCustomApp';\n fields?: Maybe<UserOrderFields>;\n id?: Maybe<Scalars['String']['output']>;\n major?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderCustomData = {\n __typename?: 'UserOrderCustomData';\n customApps?: Maybe<Array<Maybe<UserOrderCustomApp>>>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomField>>>;\n};\n\nexport type UserOrderCustomField = {\n __typename?: 'UserOrderCustomField';\n fields: Array<UserOrderCustomFieldField>;\n linkedEntity: UserOrderCustomFieldLinkedEntity;\n};\n\nexport type UserOrderCustomFieldField = {\n __typename?: 'UserOrderCustomFieldField';\n name: Scalars['String']['output'];\n refId?: Maybe<Scalars['String']['output']>;\n value: Scalars['String']['output'];\n};\n\nexport type UserOrderCustomFieldLinkedEntity = {\n __typename?: 'UserOrderCustomFieldLinkedEntity';\n id?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type UserOrderCustomFieldsGrouped = {\n __typename?: 'UserOrderCustomFieldsGrouped';\n fields?: Maybe<Array<Maybe<UserOrderCustomFieldField>>>;\n id?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type UserOrderDeliveryChannels = {\n __typename?: 'UserOrderDeliveryChannels';\n id?: Maybe<Scalars['String']['output']>;\n stockBalance?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderDeliveryIds = {\n __typename?: 'UserOrderDeliveryIds';\n accountCarrierName?: Maybe<Scalars['String']['output']>;\n courierId?: Maybe<Scalars['String']['output']>;\n courierName?: Maybe<Scalars['String']['output']>;\n dockId?: Maybe<Scalars['String']['output']>;\n kitItemDetails?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n quantity?: Maybe<Scalars['Int']['output']>;\n warehouseId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryOption = {\n __typename?: 'UserOrderDeliveryOption';\n address?: Maybe<UserOrderAddress>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryCompany?: Maybe<Scalars['String']['output']>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n friendlyDeliveryOptionName?: Maybe<Scalars['String']['output']>;\n friendlyShippingEstimate?: Maybe<Scalars['String']['output']>;\n items?: Maybe<Array<Maybe<UserOrderDeliveryOptionsItems>>>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n quantityOfDifferentItems?: Maybe<Scalars['Int']['output']>;\n selectedSla?: Maybe<Scalars['String']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n total?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderDeliveryOptionsContact = {\n __typename?: 'UserOrderDeliveryOptionsContact';\n email?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryOptionsData = {\n __typename?: 'UserOrderDeliveryOptionsData';\n contact?: Maybe<UserOrderDeliveryOptionsContact>;\n deliveryOptions?: Maybe<Array<Maybe<UserOrderDeliveryOption>>>;\n};\n\nexport type UserOrderDeliveryOptionsItems = {\n __typename?: 'UserOrderDeliveryOptionsItems';\n id?: Maybe<Scalars['String']['output']>;\n imageUrl?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n tax?: Maybe<Scalars['Float']['output']>;\n taxPriceTags?: Maybe<Array<Maybe<UserOrderPriceTag>>>;\n taxPriceTagsTotal?: Maybe<Scalars['Float']['output']>;\n total?: Maybe<Scalars['Float']['output']>;\n uniqueId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDeliveryWindow = {\n __typename?: 'UserOrderDeliveryWindow';\n endDateUtc?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n startDateUtc?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderDimension = {\n __typename?: 'UserOrderDimension';\n cubicweight?: Maybe<Scalars['Float']['output']>;\n height?: Maybe<Scalars['Int']['output']>;\n length?: Maybe<Scalars['Int']['output']>;\n weight?: Maybe<Scalars['Int']['output']>;\n width?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderFields = {\n __typename?: 'UserOrderFields';\n cartEtag?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderFromList = {\n __typename?: 'UserOrderFromList';\n ShippingEstimatedDate?: Maybe<Scalars['String']['output']>;\n ShippingEstimatedDateMax?: Maybe<Scalars['String']['output']>;\n ShippingEstimatedDateMin?: Maybe<Scalars['String']['output']>;\n affiliateId?: Maybe<Scalars['String']['output']>;\n authorizedDate?: Maybe<Scalars['String']['output']>;\n callCenterOperatorName?: Maybe<Scalars['String']['output']>;\n clientName?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n customFields?: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>;\n deliveryDates?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n giftCardProviders?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n hostname?: Maybe<Scalars['String']['output']>;\n invoiceInput?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n invoiceOutput?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n isAllDelivered?: Maybe<Scalars['Boolean']['output']>;\n isAnyDelivered?: Maybe<Scalars['Boolean']['output']>;\n items?: Maybe<Array<Maybe<UserOrderItemsSummarized>>>;\n lastChange?: Maybe<Scalars['String']['output']>;\n lastMessageUnread?: Maybe<Scalars['String']['output']>;\n listId?: Maybe<Scalars['String']['output']>;\n listType?: Maybe<Scalars['String']['output']>;\n marketPlaceOrderId?: Maybe<Scalars['String']['output']>;\n orderFormId?: Maybe<Scalars['String']['output']>;\n orderId?: Maybe<Scalars['String']['output']>;\n orderIsComplete?: Maybe<Scalars['Boolean']['output']>;\n origin?: Maybe<Scalars['String']['output']>;\n paymentApprovedDate?: Maybe<Scalars['String']['output']>;\n paymentNames?: Maybe<Scalars['String']['output']>;\n readyForHandlingDate?: Maybe<Scalars['String']['output']>;\n salesChannel?: Maybe<Scalars['String']['output']>;\n sequence?: Maybe<Scalars['String']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n totalItems?: Maybe<Scalars['Int']['output']>;\n totalValue?: Maybe<Scalars['Float']['output']>;\n workflowInErrorState?: Maybe<Scalars['Boolean']['output']>;\n workflowInRetry?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderFromListCustomFields = {\n __typename?: 'UserOrderFromListCustomFields';\n type?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n};\n\nexport type UserOrderFromListMinimal = {\n __typename?: 'UserOrderFromListMinimal';\n ShippingEstimatedDate?: Maybe<Scalars['String']['output']>;\n clientName?: Maybe<Scalars['String']['output']>;\n creationDate?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n customFields?: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>;\n items?: Maybe<Array<Maybe<UserOrderItemsSummarized>>>;\n orderId?: Maybe<Scalars['String']['output']>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n totalValue?: Maybe<Scalars['Float']['output']>;\n};\n\nexport const enum UserOrderInvoiceType {\n Input = 'Input',\n Output = 'Output'\n};\n\nexport type UserOrderItemAttachment = {\n __typename?: 'UserOrderItemAttachment';\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderItemMetadata = {\n __typename?: 'UserOrderItemMetadata';\n Items?: Maybe<Array<Maybe<UserOrderItemMetadataItem>>>;\n};\n\nexport type UserOrderItemMetadataItem = {\n __typename?: 'UserOrderItemMetadataItem';\n AssemblyOptions?: Maybe<Array<Maybe<UserOrderAssemblyOptions>>>;\n DetailUrl?: Maybe<Scalars['String']['output']>;\n Ean?: Maybe<Scalars['String']['output']>;\n Id?: Maybe<Scalars['String']['output']>;\n ImageUrl?: Maybe<Scalars['String']['output']>;\n Name?: Maybe<Scalars['String']['output']>;\n ProductId?: Maybe<Scalars['String']['output']>;\n RefId?: Maybe<Scalars['String']['output']>;\n Seller?: Maybe<Scalars['String']['output']>;\n SkuName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderItems = {\n __typename?: 'UserOrderItems';\n additionalInfo?: Maybe<UserOrderAdditionalInfo>;\n assemblies?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n attachmentOfferings?: Maybe<Array<Maybe<UserOrderAttachmentOfferings>>>;\n attachments?: Maybe<Array<Maybe<UserOrderAttachments>>>;\n bundleItems?: Maybe<Array<Maybe<UserOrderItems>>>;\n callCenterOperator?: Maybe<Scalars['String']['output']>;\n commission?: Maybe<Scalars['Float']['output']>;\n components?: Maybe<Array<Maybe<UserOrderItems>>>;\n costPrice?: Maybe<Scalars['Float']['output']>;\n detailUrl?: Maybe<Scalars['String']['output']>;\n ean?: Maybe<Scalars['String']['output']>;\n freightCommission?: Maybe<Scalars['Float']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n imageUrl?: Maybe<Scalars['String']['output']>;\n isGift?: Maybe<Scalars['Boolean']['output']>;\n itemAttachment?: Maybe<UserOrderItemAttachment>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockId?: Maybe<Scalars['String']['output']>;\n manualPrice?: Maybe<Scalars['String']['output']>;\n manualPriceAppliedBy?: Maybe<Scalars['String']['output']>;\n measurementUnit?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n offerings?: Maybe<Array<Maybe<UserOrderOfferings>>>;\n params?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n parentAssemblyBinding?: Maybe<Scalars['String']['output']>;\n parentItemIndex?: Maybe<Scalars['String']['output']>;\n preSaleDate?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n priceDefinition?: Maybe<UserOrderPriceDefinition>;\n priceTags?: Maybe<Array<Maybe<UserOrderPriceTag>>>;\n priceValidUntil?: Maybe<Scalars['String']['output']>;\n productId?: Maybe<Scalars['String']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n refId?: Maybe<Scalars['String']['output']>;\n rewardValue?: Maybe<Scalars['Float']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n sellerSku?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n serialNumbers?: Maybe<Scalars['String']['output']>;\n shippingPrice?: Maybe<Scalars['String']['output']>;\n tax?: Maybe<Scalars['Float']['output']>;\n taxCode?: Maybe<Scalars['String']['output']>;\n uniqueId?: Maybe<Scalars['String']['output']>;\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderItemsSummarized = {\n __typename?: 'UserOrderItemsSummarized';\n description?: Maybe<Scalars['String']['output']>;\n ean?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n productId?: Maybe<Scalars['String']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n refId?: Maybe<Scalars['String']['output']>;\n seller?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderListMinimalResult = {\n __typename?: 'UserOrderListMinimalResult';\n list?: Maybe<Array<Maybe<UserOrderFromListMinimal>>>;\n paging?: Maybe<UserOrderListPaging>;\n};\n\nexport type UserOrderListPaging = {\n __typename?: 'UserOrderListPaging';\n currentPage?: Maybe<Scalars['Int']['output']>;\n pages?: Maybe<Scalars['Int']['output']>;\n perPage?: Maybe<Scalars['Int']['output']>;\n total?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderListResult = {\n __typename?: 'UserOrderListResult';\n facets?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n list?: Maybe<Array<UserOrderFromList>>;\n paging?: Maybe<UserOrderListPaging>;\n reportRecordsLimit?: Maybe<Scalars['Int']['output']>;\n stats?: Maybe<UserOrderListStats>;\n};\n\nexport type UserOrderListStats = {\n __typename?: 'UserOrderListStats';\n stats?: Maybe<UserOrderListStatsData>;\n};\n\nexport type UserOrderListStatsData = {\n __typename?: 'UserOrderListStatsData';\n totalItems?: Maybe<UserOrderListStatsValue>;\n totalValue?: Maybe<UserOrderListStatsValue>;\n};\n\nexport type UserOrderListStatsValue = {\n __typename?: 'UserOrderListStatsValue';\n Count?: Maybe<Scalars['Int']['output']>;\n Facets?: Maybe<Scalars['JSONObject']['output']>;\n Max?: Maybe<Scalars['Float']['output']>;\n Mean?: Maybe<Scalars['Float']['output']>;\n Min?: Maybe<Scalars['Float']['output']>;\n Missing?: Maybe<Scalars['Int']['output']>;\n StdDev?: Maybe<Scalars['Float']['output']>;\n Sum?: Maybe<Scalars['Float']['output']>;\n SumOfSquares?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderLogisticsInfo = {\n __typename?: 'UserOrderLogisticsInfo';\n addressId?: Maybe<Scalars['String']['output']>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryChannels?: Maybe<Array<Maybe<UserOrderDeliveryChannels>>>;\n deliveryCompany?: Maybe<Scalars['String']['output']>;\n deliveryIds?: Maybe<Array<Maybe<UserOrderDeliveryIds>>>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n entityId?: Maybe<Scalars['String']['output']>;\n itemId?: Maybe<Scalars['String']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockTTL?: Maybe<Scalars['String']['output']>;\n pickupPointId?: Maybe<Scalars['String']['output']>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n polygonName?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n selectedDeliveryChannel?: Maybe<Scalars['String']['output']>;\n selectedSla?: Maybe<Scalars['String']['output']>;\n sellingPrice?: Maybe<Scalars['Float']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n shipsTo?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n slas?: Maybe<Array<Maybe<UserOrderSlas>>>;\n transitTime?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderMarketplace = {\n __typename?: 'UserOrderMarketplace';\n baseURL?: Maybe<Scalars['String']['output']>;\n isCertified?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderOfferings = {\n __typename?: 'UserOrderOfferings';\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPackage = {\n __typename?: 'UserOrderPackage';\n courier?: Maybe<Scalars['String']['output']>;\n courierStatus?: Maybe<UserOrderCourierStatus>;\n extraValue?: Maybe<Scalars['Float']['output']>;\n invoiceKey?: Maybe<Scalars['String']['output']>;\n invoiceNumber: Scalars['String']['output'];\n invoiceUrl?: Maybe<Scalars['String']['output']>;\n invoiceValue: Scalars['Float']['output'];\n issuanceDate?: Maybe<Scalars['String']['output']>;\n items?: Maybe<Array<UserOrderPackageItem>>;\n restitutions?: Maybe<UserOrderRestitutions>;\n trackingNumber?: Maybe<Scalars['String']['output']>;\n trackingUrl?: Maybe<Scalars['String']['output']>;\n type?: Maybe<UserOrderInvoiceType>;\n};\n\nexport type UserOrderPackageAttachment = {\n __typename?: 'UserOrderPackageAttachment';\n packages?: Maybe<Array<Maybe<UserOrderPackage>>>;\n};\n\nexport type UserOrderPackageItem = {\n __typename?: 'UserOrderPackageItem';\n description?: Maybe<Scalars['String']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n price?: Maybe<Scalars['Int']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderPaymentConnectorResponses = {\n __typename?: 'UserOrderPaymentConnectorResponses';\n Message?: Maybe<Scalars['String']['output']>;\n ReturnCode?: Maybe<Scalars['String']['output']>;\n Tid?: Maybe<Scalars['String']['output']>;\n authId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPaymentData = {\n __typename?: 'UserOrderPaymentData';\n giftCards?: Maybe<Array<Maybe<Scalars['String']['output']>>>;\n transactions?: Maybe<Array<Maybe<UserOrderTransactions>>>;\n};\n\nexport type UserOrderPayments = {\n __typename?: 'UserOrderPayments';\n accountId?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceBarCodeNumber?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceBarCodeType?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceIdentificationNumber?: Maybe<Scalars['String']['output']>;\n bankIssuedInvoiceIdentificationNumberFormatted?: Maybe<Scalars['String']['output']>;\n billingAddress?: Maybe<Scalars['String']['output']>;\n cardHolder?: Maybe<Scalars['String']['output']>;\n cardNumber?: Maybe<Scalars['String']['output']>;\n connectorResponses?: Maybe<UserOrderPaymentConnectorResponses>;\n cvv2?: Maybe<Scalars['String']['output']>;\n dueDate?: Maybe<Scalars['String']['output']>;\n expireMonth?: Maybe<Scalars['String']['output']>;\n expireYear?: Maybe<Scalars['String']['output']>;\n firstDigits?: Maybe<Scalars['String']['output']>;\n giftCardAsDiscount?: Maybe<Scalars['String']['output']>;\n giftCardCaption?: Maybe<Scalars['String']['output']>;\n giftCardId?: Maybe<Scalars['String']['output']>;\n giftCardName?: Maybe<Scalars['String']['output']>;\n giftCardProvider?: Maybe<Scalars['String']['output']>;\n group?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n installments?: Maybe<Scalars['Int']['output']>;\n koinUrl?: Maybe<Scalars['String']['output']>;\n lastDigits?: Maybe<Scalars['String']['output']>;\n parentAccountId?: Maybe<Scalars['String']['output']>;\n paymentOrigin?: Maybe<Scalars['String']['output']>;\n paymentSystem?: Maybe<Scalars['String']['output']>;\n paymentSystemName?: Maybe<Scalars['String']['output']>;\n redemptionCode?: Maybe<Scalars['String']['output']>;\n referenceValue?: Maybe<Scalars['Int']['output']>;\n tid?: Maybe<Scalars['String']['output']>;\n url?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type UserOrderPickupStoreInfo = {\n __typename?: 'UserOrderPickupStoreInfo';\n additionalInfo?: Maybe<Scalars['String']['output']>;\n address?: Maybe<UserOrderAddress>;\n dockId?: Maybe<Scalars['String']['output']>;\n friendlyName?: Maybe<Scalars['String']['output']>;\n isPickupStore?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderPriceDefinition = {\n __typename?: 'UserOrderPriceDefinition';\n calculatedSellingPrice?: Maybe<Scalars['Float']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n sellingPrices?: Maybe<Array<Maybe<UserOrderSellingPrices>>>;\n total?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderPriceTag = {\n __typename?: 'UserOrderPriceTag';\n identifier?: Maybe<Scalars['String']['output']>;\n isPercentual?: Maybe<Scalars['Boolean']['output']>;\n jurisCode?: Maybe<Scalars['String']['output']>;\n jurisName?: Maybe<Scalars['String']['output']>;\n jurisType?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n owner?: Maybe<Scalars['String']['output']>;\n rate?: Maybe<Scalars['Float']['output']>;\n rawValue: Scalars['Float']['output'];\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderPurchaseAgent = {\n __typename?: 'UserOrderPurchaseAgent';\n persona?: Maybe<Scalars['String']['output']>;\n unitId?: Maybe<Scalars['String']['output']>;\n userId?: Maybe<Scalars['String']['output']>;\n versionId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderPurchaseAgentData = {\n __typename?: 'UserOrderPurchaseAgentData';\n purchaseAgents?: Maybe<Array<Maybe<UserOrderPurchaseAgent>>>;\n};\n\nexport type UserOrderRateAndBenefitsIdentifier = {\n __typename?: 'UserOrderRateAndBenefitsIdentifier';\n additionalInfo?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n featured?: Maybe<Scalars['Boolean']['output']>;\n id?: Maybe<Scalars['ID']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderRatesAndBenefitsData = {\n __typename?: 'UserOrderRatesAndBenefitsData';\n id?: Maybe<Scalars['String']['output']>;\n rateAndBenefitsIdentifiers?: Maybe<Array<Maybe<UserOrderRateAndBenefitsIdentifier>>>;\n};\n\nexport type UserOrderRestitutionItem = {\n __typename?: 'UserOrderRestitutionItem';\n compensationValue?: Maybe<Scalars['Float']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['ID']['output']>;\n isCompensation?: Maybe<Scalars['Boolean']['output']>;\n itemIndex?: Maybe<Scalars['Int']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n quantity?: Maybe<Scalars['Int']['output']>;\n unitMultiplier?: Maybe<Scalars['Float']['output']>;\n useFreight?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type UserOrderRestitutionOption = {\n __typename?: 'UserOrderRestitutionOption';\n items?: Maybe<Array<UserOrderRestitutionItem>>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderRestitutions = {\n __typename?: 'UserOrderRestitutions';\n GiftCard?: Maybe<UserOrderRestitutionOption>;\n Refund?: Maybe<UserOrderRestitutionOption>;\n};\n\nexport type UserOrderResult = {\n __typename?: 'UserOrderResult';\n allowCancellation?: Maybe<Scalars['Boolean']['output']>;\n budgetData?: Maybe<UserOrderBudgetData>;\n canProcessOrderAuthorization?: Maybe<Scalars['Boolean']['output']>;\n clientProfileData?: Maybe<UserOrderClientProfileData>;\n creationDate?: Maybe<Scalars['String']['output']>;\n customData?: Maybe<UserOrderCustomData>;\n customFields?: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>;\n deliveryOptionsData?: Maybe<UserOrderDeliveryOptionsData>;\n items?: Maybe<Array<Maybe<UserOrderItems>>>;\n orderId?: Maybe<Scalars['String']['output']>;\n paymentData?: Maybe<UserOrderPaymentData>;\n ruleForAuthorization?: Maybe<ProcessOrderAuthorizationRule>;\n shippingData?: Maybe<UserOrderShippingData>;\n shopper?: Maybe<UserOrderShopper>;\n status?: Maybe<Scalars['String']['output']>;\n statusDescription?: Maybe<Scalars['String']['output']>;\n storePreferencesData?: Maybe<UserOrderStorePreferencesData>;\n totals?: Maybe<Array<Maybe<UserOrderTotals>>>;\n};\n\nexport type UserOrderSellingPrices = {\n __typename?: 'UserOrderSellingPrices';\n quantity?: Maybe<Scalars['Int']['output']>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderShippingData = {\n __typename?: 'UserOrderShippingData';\n address?: Maybe<UserOrderAddress>;\n availableAddresses?: Maybe<Array<Maybe<UserOrderAddress>>>;\n contactInformation?: Maybe<Array<Maybe<UserOrderContactInformation>>>;\n id?: Maybe<Scalars['String']['output']>;\n logisticsInfo?: Maybe<Array<Maybe<UserOrderLogisticsInfo>>>;\n selectedAddresses?: Maybe<Array<Maybe<UserOrderAddress>>>;\n trackingHints?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderShopper = {\n __typename?: 'UserOrderShopper';\n email?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n phone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderSlas = {\n __typename?: 'UserOrderSlas';\n availableDeliveryWindows?: Maybe<Array<Maybe<UserOrderDeliveryWindow>>>;\n deliveryChannel?: Maybe<Scalars['String']['output']>;\n deliveryIds?: Maybe<Array<Maybe<UserOrderDeliveryIds>>>;\n deliveryWindow?: Maybe<UserOrderDeliveryWindow>;\n id?: Maybe<Scalars['String']['output']>;\n listPrice?: Maybe<Scalars['Float']['output']>;\n lockTTL?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n pickupDistance?: Maybe<Scalars['Int']['output']>;\n pickupPointId?: Maybe<Scalars['String']['output']>;\n pickupStoreInfo?: Maybe<UserOrderPickupStoreInfo>;\n polygonName?: Maybe<Scalars['String']['output']>;\n price?: Maybe<Scalars['Float']['output']>;\n shippingEstimate?: Maybe<Scalars['String']['output']>;\n shippingEstimateDate?: Maybe<Scalars['String']['output']>;\n transitTime?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderStorePreferencesData = {\n __typename?: 'UserOrderStorePreferencesData';\n countryCode?: Maybe<Scalars['String']['output']>;\n currencyCode?: Maybe<Scalars['String']['output']>;\n currencyFormatInfo?: Maybe<UserOrderCurrencyFormatInfo>;\n currencyLocale?: Maybe<Scalars['Int']['output']>;\n currencySymbol?: Maybe<Scalars['String']['output']>;\n timeZone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderStoreSellers = {\n __typename?: 'UserOrderStoreSellers';\n fulfillmentEndpoint?: Maybe<Scalars['String']['output']>;\n id?: Maybe<Scalars['String']['output']>;\n logo?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderTotals = {\n __typename?: 'UserOrderTotals';\n id?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type UserOrderTrackingInformation = {\n __typename?: 'UserOrderTrackingInformation';\n city?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n lastChange?: Maybe<Scalars['String']['output']>;\n state?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserOrderTransactions = {\n __typename?: 'UserOrderTransactions';\n isActive?: Maybe<Scalars['Boolean']['output']>;\n merchantName?: Maybe<Scalars['String']['output']>;\n payments?: Maybe<Array<Maybe<UserOrderPayments>>>;\n transactionId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Pagination metadata for the quotes list. */\nexport type UserQuoteListPaging = {\n __typename?: 'UserQuoteListPaging';\n /** Current page number (1-based). */\n currentPage: Scalars['Int']['output'];\n /** Number of items per page. */\n perPage: Scalars['Int']['output'];\n /** Total number of quotes matching the query. */\n total: Scalars['Int']['output'];\n};\n\n/** Result returned by the listUserQuotes query. */\nexport type UserQuoteListResult = {\n __typename?: 'UserQuoteListResult';\n /** Array of quote summaries for the current page. */\n list: Array<UserQuoteSummary>;\n /** Pagination information. */\n paging: UserQuoteListPaging;\n};\n\n/** Summary of a quote returned in list results. */\nexport type UserQuoteSummary = {\n __typename?: 'UserQuoteSummary';\n /** Total amount of the quote. */\n amount: Scalars['Float']['output'];\n /** ISO 8601 date-time when the quote was created. */\n createdAt: Scalars['String']['output'];\n /** Name or email of the user who created the quote. */\n createdBy?: Maybe<Scalars['String']['output']>;\n /** ISO 8601 date-time when the quote expires. */\n expiresAt: Scalars['String']['output'];\n /** Unique identifier of the quote. */\n id: Scalars['String']['output'];\n /** Optional label assigned to the quote. */\n label?: Maybe<Scalars['String']['output']>;\n /** Status of the quote. */\n status: Scalars['String']['output'];\n};\n\nexport type ValidateUserData = {\n __typename?: 'ValidateUserData';\n /** Indicates if the user is valid. */\n isValid: Scalars['Boolean']['output'];\n};\n","import { ForbiddenError, UnauthorizedError } from '../../..'\nimport type { GraphqlContext } from '../index'\n\n/**\n * Creates a function that adds VTEX API AppKey and AppToken headers to requests.\n * These credentials are used for server-to-server authentication with VTEX APIs.\n *\n * @returns A function that accepts additional headers and returns them merged with authentication headers\n * @throws {ForbiddenError} When FS_DISCOVERY_APP_KEY or FS_DISCOVERY_APP_TOKEN environment variables are not set\n */\nexport const getWithAppKeyAndToken = () => {\n return function withAppKeyAndToken<T extends Record<string, string>>(\n additionalHeaders: T = {} as T\n ): T & { 'X-VTEX-API-AppKey': string; 'X-VTEX-API-AppToken': string } {\n const appKey = process.env.FS_DISCOVERY_APP_KEY ?? ''\n const appToken = process.env.FS_DISCOVERY_APP_TOKEN ?? ''\n\n if (!appKey || !appToken) {\n throw new ForbiddenError('No authentication AppKey and AppToken passed.')\n }\n\n return {\n ...additionalHeaders,\n 'X-VTEX-API-AppKey': appKey,\n 'X-VTEX-API-AppToken': appToken,\n }\n }\n}\n\n/**\n * Utility function to validate user authentication\n * Centralized validation logic for all account-related resolvers\n */\nexport const validateUserAuthentication = async (\n ctx: GraphqlContext\n): Promise<void> => {\n const {\n clients: { commerce },\n } = ctx\n\n try {\n const validation = await commerce.vtexid.validate()\n\n if (validation?.authStatus?.toLowerCase() !== 'success') {\n throw new UnauthorizedError('Authentication required')\n }\n } catch (error) {\n const status = (error as any).extensions?.status ?? (error as any).status\n\n if (status === 401) {\n throw new UnauthorizedError('Authentication required')\n }\n\n if (status === 403) {\n throw new ForbiddenError('You are not allowed to access this resource')\n }\n\n // For any other error, throw UnauthorizedError as it likely needs token refresh\n throw new UnauthorizedError('Authentication required')\n }\n}\n","import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nimport { validateUserAuthentication } from '../platforms/vtex/utils/auth'\nimport type { Directive } from './index'\n\nconst NAME = 'auth'\n\nconst directive: Directive = {\n typeDefs: `directive @auth on FIELD_DEFINITION`,\n transformer: (schema: GraphQLSchema) => {\n return mapSchema(schema, {\n [MapperKind.OBJECT_FIELD]: (fieldConfig) => {\n const authDirective = getDirective(schema, fieldConfig, NAME)?.[0]\n\n if (authDirective) {\n const originalResolver = fieldConfig.resolve\n\n fieldConfig.resolve = async (root, args, context, info) => {\n // Validate user authentication before proceeding with the resolver\n await validateUserAuthentication(context)\n\n // Continue with the original resolver\n return originalResolver?.(root, args, context, info)\n }\n }\n\n return fieldConfig\n },\n })\n },\n}\n\nexport default directive\n","import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nimport type { Directive } from './index'\n\nconst NAME = 'cacheControl'\n\nexport interface CacheControl {\n sMaxAge?: number\n staleWhileRevalidate?: number\n scope?: string\n}\n\nexport const stringify = (\n cacheControl: CacheControl,\n forcePrivate?: boolean\n): string => {\n const {\n scope = 'private',\n sMaxAge = 0,\n staleWhileRevalidate = 0,\n } = cacheControl\n const finalScope = forcePrivate ? 'private' : scope\n return `${finalScope}, s-maxage=${sMaxAge}, stale-while-revalidate=${staleWhileRevalidate}`\n}\n\nconst min = (a: number | undefined, b: number | undefined) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a > b ? b : a\n }\n\n if (typeof a === 'number') {\n return a\n }\n\n return b\n}\n\nconst minScope = (a: string | undefined, b: string | undefined) => {\n if (typeof a === 'string' && typeof b === 'string') {\n return a === 'public' && b === 'public' ? 'public' : 'private'\n }\n\n return a || b\n}\n\nconst directive: Directive = {\n typeDefs: `directive @cacheControl(sMaxAge: Int, staleWhileRevalidate: Int, scope: String) on FIELD_DEFINITION`,\n transformer: (schema: GraphQLSchema) =>\n mapSchema(schema, {\n [MapperKind.OBJECT_FIELD]: (fieldConfig) => {\n const cacheControl = getDirective(schema, fieldConfig, NAME)?.[0] as\n | CacheControl\n | undefined\n\n if (cacheControl) {\n const { sMaxAge, staleWhileRevalidate, scope } = cacheControl\n\n const resolver = fieldConfig.resolve\n\n fieldConfig.resolve = (obj, args, ctx, info) => {\n ctx.cacheControl = {\n sMaxAge: min(ctx.cacheControl?.sMaxAge, sMaxAge),\n staleWhileRevalidate: min(\n ctx.cacheControl?.staleWhileRevalidate,\n staleWhileRevalidate\n ),\n scope: minScope(ctx.cacheControl?.scope, scope),\n }\n\n return resolver?.(obj, args, ctx, info)\n }\n }\n\n return fieldConfig\n },\n }),\n}\n\nexport default directive\n","import { mergeTypeDefs } from '@graphql-tools/merge'\nimport { makeExecutableSchema } from '@graphql-tools/schema'\nimport type { IResolvers, TypeSource } from '@graphql-tools/utils'\nimport type { GraphQLSchema } from 'graphql'\n\nexport { default as AuthDirective } from './auth'\nexport { default as CacheControlDirective } from './cacheControl'\n\nexport type Directive = {\n typeDefs: string\n transformer: (schema: GraphQLSchema) => GraphQLSchema\n}\n\nexport const withDirectives =\n (directives?: Array<Directive>) =>\n (resolvers: IResolvers<any, any>, typeDef: TypeSource) => {\n const finalTypeDef = mergeTypeDefs([\n ...(directives ?? []).map(({ typeDefs }) => typeDefs),\n typeDef,\n ])\n\n return (directives ?? []).reduce(\n (schema, { transformer }) => transformer?.(schema) ?? schema,\n makeExecutableSchema({\n typeDefs: finalTypeDef,\n resolvers,\n })\n )\n }\n","import { logger, OTELAPI } from '@faststore/diagnostics'\nimport { name, version } from '../../package.json' with { type: 'json' }\n\nconst OTELLogger = logger('@faststore/api')\n\nexport const ResolverTrace = <\n TContext extends {\n OTEL_ENABLED: boolean\n account: string\n discoveryConfig: Record<string, any>\n },\n TSource = any,\n TVars = any,\n TReturn = any,\n>(\n fn: (source: TSource, vars: TVars, context: TContext, info: any) => TReturn,\n resolverName = 'Unknown Graphql Resolver'\n) => {\n return (\n source: TSource,\n vars: TVars,\n graphqlContext: TContext,\n info: any\n ): TReturn => {\n if (!graphqlContext?.OTEL_ENABLED) {\n return fn(source, vars, graphqlContext, info)\n }\n\n const span = OTELAPI.trace.getTracer('Graphql').startSpan(resolverName, {\n kind: OTELAPI.SpanKind.INTERNAL,\n attributes: {\n timestamp: Date.now(),\n '@faststore_version': version,\n '@faststore_package_name': name,\n '@faststore_account_name': graphqlContext.account,\n '@faststore_environment': process.env.NODE_ENV,\n '@faststore_resolver_parent_type': info?.parentType?.name,\n '@faststore_resolver_field_name': info?.fieldName,\n },\n })\n\n const otelContext = OTELAPI.trace.setSpan(OTELAPI.context.active(), span)\n\n try {\n const result = OTELAPI.context.with(otelContext, () =>\n fn(source, vars, graphqlContext, info)\n )\n\n if (result instanceof Promise) {\n return result.then(\n (value) => {\n span.end()\n\n return value\n },\n (error) => recordResolverError(error, span, resolverName)\n ) as TReturn\n }\n\n span.end()\n\n return result\n } catch (error) {\n return recordResolverError(error, span, resolverName)\n }\n }\n}\n\n/** Marks the span as failed and rethrows, keeping call sites linear. */\nfunction recordResolverError(\n error: unknown,\n span: OTELAPI.Span,\n resolverName: string\n): never {\n span.setStatus({ code: OTELAPI.SpanStatusCode.ERROR })\n span.recordException(error as Error)\n span.end()\n\n console.error(`Error at resolver: ${resolverName}: \\n %o`, error)\n OTELLogger('error', 'Error at resolver: %s\\n%o', resolverName, error)\n\n throw error\n}\n","type ErrorType =\n | 'BadRequestError'\n | 'UnauthorizedError'\n | 'NotFoundError'\n | 'RedirectError'\n | 'ForbiddenError'\n | 'UnknownError'\n\ninterface Extension {\n type: ErrorType\n status: number\n}\n\nexport class FastStoreError<T extends Extension = Extension> extends Error {\n constructor(\n public extensions: T,\n message?: string\n ) {\n super(message)\n this.name = 'FastStoreError'\n }\n}\n\nexport class BadRequestError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 400, type: 'BadRequestError' }, message)\n }\n}\n\nexport class UnauthorizedError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 401, type: 'UnauthorizedError' }, message)\n }\n}\n\nexport class ForbiddenError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 403, type: 'ForbiddenError' }, message)\n }\n}\n\nexport class NotFoundError extends FastStoreError {\n constructor(message?: string) {\n super({ status: 404, type: 'NotFoundError' }, message)\n }\n}\n\nexport const isFastStoreError = (error: any): error is FastStoreError =>\n error?.name === 'FastStoreError'\n\nexport const isBadRequestError = (error: any): error is BadRequestError =>\n error?.extensions?.type === 'BadRequestError'\n\nexport const isUnauthorizedError = (error: any): error is UnauthorizedError =>\n error?.extensions?.type === 'UnauthorizedError'\n\nexport const isForbiddenError = (error: any): error is ForbiddenError =>\n error?.extensions?.type === 'ForbiddenError'\n\nexport const isNotFoundError = (error: any): error is NotFoundError =>\n error?.extensions?.type === 'NotFoundError'\n","import fetch from 'isomorphic-unfetch'\nimport packageJson from '../../../../package.json' with { type: 'json' }\nimport {\n BadRequestError,\n FastStoreError,\n ForbiddenError,\n NotFoundError,\n UnauthorizedError,\n} from '../../errors'\n\nconst USER_AGENT = `${packageJson.name}@${packageJson.version}`\n\ninterface FetchAPIOptions {\n storeCookies?: (headers: Headers) => void\n}\n\nexport const fetchAPI = async (\n info: RequestInfo,\n init?: RequestInit,\n options?: FetchAPIOptions\n) => {\n const response = await fetch(info, {\n ...init,\n headers: {\n ...(init?.headers ?? {}),\n 'User-Agent': USER_AGENT,\n },\n })\n\n if (response.ok) {\n if (options?.storeCookies) {\n options.storeCookies(response.headers)\n }\n\n return response.status !== 204 ? response.json() : undefined\n }\n\n console.error(info, init, response)\n const text = await response.text()\n\n // Check if response has a valid status property\n if (typeof response?.status === 'number') {\n switch (response.status) {\n case 400:\n throw new BadRequestError(text)\n case 401:\n throw new UnauthorizedError(text)\n case 403:\n throw new ForbiddenError(text)\n case 404:\n throw new NotFoundError(text)\n default:\n throw new FastStoreError(\n { status: response.status, type: 'UnknownError' },\n text\n )\n }\n }\n\n // Fallback to generic Error if status doesn't exist or is invalid - maybe network error\n throw new Error(text)\n}\n","import type { Options } from '../../../../typings/globals'\nimport { fetchAPI } from '../fetch'\n\nexport interface LocalizedCategoryEntry {\n id: number\n name: string\n /** Slash-separated IDs from root to this node, e.g. \"9281/9285\". Used to determine depth. */\n fullPath: string\n /** Slash-separated localized slugs from root to this node, e.g. \"apparel/t-shirts\". */\n fullPathUriName: string\n}\n\nexport interface LocalizedProductEntry {\n linkId: string\n /** All categories the product belongs to across all trees, as returned by Catalog Dataplane. */\n categories: LocalizedCategoryEntry[]\n /** Localized linkIds keyed by locale, covering all available locales in a single response. */\n availableLinkIds: Record<string, string>\n}\n\nexport interface LocalizedProductResponse {\n id: number\n linkId: string\n name: string\n /** Leaf category (deepest level) the product is registered under. */\n category: LocalizedCategoryEntry | null\n /** Full ancestry chain for every category tree the product belongs to. */\n categories: LocalizedCategoryEntry[]\n /** Localized linkIds keyed by locale, covering all available locales in a single response. */\n availableLinkIds: Record<string, string>\n}\n\n/**\n * Client for the VTEX Catalog Dataplane API.\n * Uses Accept-Language header to return locale-specific product data.\n */\nexport const CatalogDataplane = ({ account, environment }: Options) => {\n const base = `https://${account}.${environment}.com.br`\n\n return {\n getLocalizedProduct: (\n productId: string,\n locale: string\n ): Promise<LocalizedProductResponse> =>\n fetchAPI(`${base}/api/catalog-dataplane/product/${productId}`, {\n method: 'GET',\n headers: {\n 'Accept-Language': locale,\n 'Content-Type': 'application/json',\n },\n }),\n }\n}\n","import { parse } from 'cookie'\nimport type { GraphqlContext } from '../index'\n\nexport interface ContextForCookies {\n headers: GraphqlContext['headers']\n storage: Pick<GraphqlContext['storage'], 'cookies'>\n}\n\n/**\n * Normalizes cookie string by removing duplicates and keeping the last value for each key\n * Example: \"key1=value1; key2=value2; key1=value3\" -> \"key2=value2; key1=value3\"\n */\nconst normalizeCookies = (cookieString: string): string => {\n if (!cookieString) {\n return cookieString\n }\n\n const cookieMap = new Map<string, string>()\n const cookies = cookieString.split(';')\n const processedKeys: string[] = []\n\n // Process cookies to build map with last values and track order\n cookies.forEach((cookie) => {\n const trimmedCookie = cookie.trim()\n if (trimmedCookie) {\n const equalIndex = trimmedCookie.indexOf('=')\n if (equalIndex > 0) {\n const key = trimmedCookie.substring(0, equalIndex)\n const value = trimmedCookie.substring(equalIndex + 1)\n\n // If this is the first time we see this key, record its position\n if (!cookieMap.has(key)) {\n processedKeys.push(key)\n }\n\n cookieMap.set(key, value)\n }\n }\n })\n\n // Rebuild cookie string maintaining the order of first appearance\n return processedKeys.map((key) => `${key}=${cookieMap.get(key)}`).join('; ')\n}\n\nconst MATCH_FIRST_SET_COOKIE_KEY_VALUE = /^([^=]+)=([^;]*)/\n\n/**\n * This function updates the ctx.storage.cookies, that is used in each request.\n *\n * ctx.storage.cookies is a Map<string[1], Record<string, string>[2]> where,\n * [1] cookie key\n * [2] {\n * value: cookie value,\n * setCookie: setCookie used in browser response\n * }\n */\nexport const updatesContextStorageCookies = (\n ctx: Pick<GraphqlContext, 'storage'>,\n setCookieValue: string\n) => {\n const matchCookie = setCookieValue.match(MATCH_FIRST_SET_COOKIE_KEY_VALUE)\n\n if (matchCookie) {\n const cookieKey = matchCookie[1]\n const cookieValue = matchCookie[2]\n\n ctx.storage.cookies.set(cookieKey, {\n value: cookieValue,\n setCookie: setCookieValue,\n })\n }\n}\n\nexport const setCookie = (\n ctx: Pick<GraphqlContext, 'storage'>,\n headers: Headers\n) => {\n headers\n .getSetCookie()\n .forEach((setCookieValue) =>\n updatesContextStorageCookies(ctx, setCookieValue)\n )\n}\n\nexport const getStoreCookie =\n (ctx: Pick<GraphqlContext, 'storage'>) => (headers: Headers) =>\n setCookie(ctx, headers)\n\n/**\n * This function returns a modified copy of the original cookie header (ctx.headers.cookie from the first request)\n * with the cookie values that comes in each request (ctx.storage.cookies).\n * If there is no cookies in storage, the ctx.headers?.cookie is used\n *\n * ctx.storage.cookies is a Map<string[1], Record<string, string>[2]> where,\n * [1] cookie key\n * [2] {\n * value: cookie value,\n * setCookie: setCookie used in browser response\n * }\n */\nexport const getUpdatedCookie = (ctx: ContextForCookies) => {\n if (!ctx.headers?.cookie) {\n return null\n }\n\n // Normalize cookies to handle duplicates (keep last value)\n const normalizedCookie = normalizeCookies(ctx.headers.cookie)\n const contextStorageCookies = Array.from(ctx.storage.cookies.entries())\n\n if (contextStorageCookies.length === 0) {\n return normalizedCookie\n }\n\n return contextStorageCookies.reduce(\n (existingCookies, [storageCookieKey, { value: storageCookieValue }]) =>\n updatesCookieValueByKey(\n existingCookies,\n storageCookieKey,\n storageCookieValue\n ),\n normalizedCookie\n )\n}\n\nexport const getWithCookie = (ctx: ContextForCookies) =>\n function withCookie<T extends Record<string, any>>(\n headers: T\n ): T & { cookie?: string } {\n const updatedCookie = getUpdatedCookie(ctx)\n\n if (!updatedCookie) {\n return headers\n }\n\n return {\n ...headers,\n cookie: updatedCookie,\n }\n }\n\nexport const getAuthCookie = (cookies: string, account: string) => {\n const normalizedCookies = normalizeCookies(cookies)\n const parsedCookies = parse(normalizedCookies)\n const authCookie = parsedCookies[`VtexIdclientAutCookie_${account}`]\n return authCookie || ''\n}\n\n/**\n * This function updates the cookie value based on its key\n *\n * const existingCookies = 'key=value1; key2=; key3=value3';\n * const storageCookieKey = 'key2';\n * const storageCookieValue = 'value2'\n *\n * updatesCookieValueByKey(existingCookies, storageCookieKey, storageCookieValue) returns 'key=value1; key2=value2; key3=value3';\n */\nexport const updatesCookieValueByKey = (\n existingCookies: string,\n storageCookieKey: string,\n storageCookieValue: string\n) => {\n const MATCH_COOKIE_KEY_VALUE = new RegExp(`(${storageCookieKey})=([^;]*)`)\n const cookieParts = existingCookies.match(MATCH_COOKIE_KEY_VALUE)\n\n // replaces original cookie with the one coming from storage\n if (cookieParts) {\n return existingCookies.replace(\n cookieParts[0],\n `${cookieParts[1]}=${storageCookieValue}`\n )\n }\n\n // add new storage cookie to the original list of cookies\n return `${existingCookies};${storageCookieKey}=${storageCookieValue}`\n}\n\nexport function parseJwt(token: string) {\n if (!token) {\n return null\n }\n\n try {\n return JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString())\n } catch {\n // Malformed structure/base64/JSON — treat the same as no token, instead\n // of throwing and 500ing the caller's request.\n return null\n }\n}\n","import { parse } from 'cookie'\nimport type { Options } from '../../../../typings/globals'\nimport type { FACET_CROSS_SELLING_MAP } from '../../utils/facets'\nimport { fetchAPI } from '../fetch'\n\nimport {\n BadRequestError,\n type CommercialAuthorizationResponse,\n type ICommercialAuthorizationByOrderId,\n type IProcessOrderAuthorization,\n type IUserOrderCancel,\n type QueryListUserOrdersArgs,\n type SavedCard,\n type StoreMarketingData,\n type UserOrder,\n type UserOrderCancel,\n type UserOrderListResult,\n} from '../../../..'\nimport { isNotFoundError } from '../../../errors'\nimport type { GraphqlContext } from '../../index'\nimport { getWithAppKeyAndToken } from '../../utils/auth'\nimport type { Channel } from '../../utils/channel'\nimport {\n getAuthCookie,\n getStoreCookie,\n getUpdatedCookie,\n getWithCookie,\n} from '../../utils/cookies'\nimport type { ContractResponse } from './Contract'\nimport type { Address, AddressInput } from './types/Address'\nimport type { Brand } from './types/Brand'\nimport type {\n ByLinkIdBrandResponse,\n ByLinkIdCategoryResponse,\n ByLinkIdCollectionResponse,\n} from './types/ByLinkId'\nimport type { CategoryTree } from './types/CategoryTree'\nimport type { MasterDataResponse } from './types/Newsletter'\nimport type {\n ClientPreferencesData,\n OrderForm,\n OrderFormInputItem,\n} from './types/OrderForm'\nimport type { PickupPoints, PickupPointsInput } from './types/PickupPoints'\nimport type { PortalPagetype } from './types/Portal'\nimport type { PortalProduct } from './types/Product'\nimport type { Region, RegionInput } from './types/Region'\nimport type { SalesChannel } from './types/SalesChannel'\nimport type { Session } from './types/Session'\nimport type { AttachedContractsResponse } from './types/StoreFrontContracts'\nimport type { DeliveryMode, SelectedAddress } from './types/ShippingData'\nimport type {\n Simulation,\n SimulationArgs,\n SimulationOptions,\n} from './types/Simulation'\nimport type {\n RecommendationResult,\n StartRecommendationSessionResult,\n} from './types/RecommendationResult'\nimport type { ScopesByUnit, UnitResponse } from './types/Unit'\nimport type { VtexIdResponse } from './types/VtexId'\nimport type { QuoteListResult, ListUserQuotesArgs } from './types/Quote'\n\ntype ValueOf<T> = T extends Record<string, infer K> ? K : never\n\n// Identifies the storefront origin to the Recommendations BFF, as required by\n// the API (`x-vtex-rec-origin` header).\nconst REC_ORIGIN_SUFFIX = 'storefront/faststore.recommendation-shelf@v4'\n\nexport interface RecommendationArgs {\n campaignVrn: string\n userId?: string\n products?: string[]\n salesChannel?: string\n locale?: string\n}\n\nconst BASE_INIT = {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n}\n\n/**\n * Encode a by-linkid path for the category endpoint. Category link paths can be\n * multi-segment (e.g. \"computer---software/eletronicos\"); the Catalog endpoint\n * expects the \"/\" separators to stay literal so it can validate each level,\n * while each segment is individually URL-encoded. Running encodeURIComponent on\n * the whole string would turn \"/\" into \"%2F\" and break multi-segment resolution.\n */\nconst encodeLinkIdPath = (linkId: string): string =>\n linkId.split('/').map(encodeURIComponent).join('/')\n\n/**\n * Build the fetch init that forwards a locale to a by-linkid endpoint. When no\n * locale is provided the endpoint falls back to the store's default registered\n * language (non-localized stores behavior).\n */\nconst byLinkIdInit = (locale?: string): RequestInit | undefined =>\n locale ? { headers: { 'Accept-Language': locale } } : undefined\n\nconst QUOTE_ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}$/\nconst QUOTE_VALID_STATUSES = new Set([\n 'Draft',\n 'Requested',\n 'InReview',\n 'Reviewed',\n 'Approved',\n 'Declined',\n 'Expired',\n 'ConvertedToCart',\n 'ConvertedToOrder',\n])\n\nfunction validateListUserQuotesArgs({\n page,\n perPage,\n status,\n createdAtFrom,\n createdAtTo,\n expiresAtFrom,\n expiresAtTo,\n}: ListUserQuotesArgs): void {\n if (page !== undefined && (!Number.isInteger(page) || page < 1)) {\n throw new Error(\n `listUserQuotes: invalid page \"${page}\" — must be a positive integer`\n )\n }\n if (perPage !== undefined && (!Number.isInteger(perPage) || perPage < 1)) {\n throw new Error(\n `listUserQuotes: invalid perPage \"${perPage}\" — must be a positive integer`\n )\n }\n for (const [field, value] of [\n ['createdAtFrom', createdAtFrom],\n ['createdAtTo', createdAtTo],\n ['expiresAtFrom', expiresAtFrom],\n ['expiresAtTo', expiresAtTo],\n ] as [string, string | undefined][]) {\n if (value && !QUOTE_ISO_DATE.test(value)) {\n throw new Error(\n `listUserQuotes: invalid ${field} \"${value}\" — must be YYYY-MM-DD`\n )\n }\n }\n if (status && status.length > 0) {\n const invalid = status.filter((s) => !QUOTE_VALID_STATUSES.has(s))\n if (invalid.length > 0) {\n throw new Error(\n `listUserQuotes: invalid status values: ${invalid.join(', ')}`\n )\n }\n }\n}\n\nfunction buildListUserQuotesParams({\n page,\n perPage,\n status,\n createdAtFrom,\n createdAtTo,\n expiresAtFrom,\n expiresAtTo,\n label,\n}: ListUserQuotesArgs): URLSearchParams {\n const params = new URLSearchParams()\n\n if (page) params.append('pageNumber', page.toString())\n if (perPage) params.append('pageSize', perPage.toString())\n status?.forEach((s) => params.append('status', s))\n if (createdAtFrom) params.append('createdAtFrom', createdAtFrom)\n if (createdAtTo) params.append('createdAtTo', createdAtTo)\n if (expiresAtFrom) params.append('expiresAtFrom', expiresAtFrom)\n if (expiresAtTo) params.append('expiresAtTo', expiresAtTo)\n if (label?.trim()) params.append('label', label.trim())\n\n return params\n}\n\nexport const VtexCommerce = (\n { account, environment, incrementAddress, subDomainPrefix }: Options,\n ctx: GraphqlContext\n) => {\n const base = `https://${account}.${environment}.com.br`\n const storeCookies = getStoreCookie(ctx)\n const withCookie = getWithCookie(ctx)\n const withAppKeyAndToken = getWithAppKeyAndToken()\n\n const host =\n new Headers(ctx.headers).get('x-forwarded-host') ?? ctx.headers?.host ?? ''\n\n const selectedPrefix = subDomainPrefix\n ? subDomainPrefix\n .map((prefix) => prefix + '.')\n .find((prefix) => host.includes(prefix)) || ''\n : ''\n\n const forwardedHost = host.replace(selectedPrefix, '')\n\n // Recommendations BFF (`/api/recommend-bff/v2`) lives under the same account\n // host as the other commerce APIs, so it's exposed here as a namespace.\n const recommendationBase = `${base}/api/recommend-bff/v2`\n const recommendationHeaders: HeadersInit = withCookie({\n accept: 'application/json',\n 'content-type': 'application/json',\n 'x-vtex-rec-origin': `${account}/${REC_ORIGIN_SUFFIX}`,\n })\n const withBuyerAuthHeaders = (\n additionalHeaders: Record<string, string> = {}\n ): HeadersInit => {\n const authToken = getAuthCookie(getUpdatedCookie(ctx) ?? '', account)\n\n return withCookie({\n ...additionalHeaders,\n 'X-FORWARDED-HOST': forwardedHost,\n ...(authToken ? { [`VtexIdclientAutCookie_${account}`]: authToken } : {}),\n })\n }\n\n return {\n catalog: {\n salesChannel: (sc: string): Promise<SalesChannel> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/saleschannel/${sc}`,\n undefined,\n { storeCookies }\n ),\n brand: {\n list: (): Promise<Brand[]> =>\n fetchAPI(`${base}/api/catalog_system/pub/brand/list`, undefined, {\n storeCookies,\n }),\n },\n category: {\n tree: (depth = 3): Promise<CategoryTree[]> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/category/tree/${depth}`,\n undefined,\n { storeCookies }\n ),\n },\n portal: {\n pagetype: (slug: string): Promise<PortalPagetype> =>\n fetchAPI(\n `${base}/api/catalog_system/pub/portal/pagetype/${slug}`,\n undefined,\n { storeCookies }\n ),\n },\n byLinkId: {\n // The by-linkid endpoints resolve a slug to a single catalog entity\n // (or 404 when there is no match). We surface a 404 as `null` so the\n // loader can cascade category → brand → collection.\n category: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdCategoryResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/category/by-linkid/${encodeLinkIdPath(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n brand: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdBrandResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/brand/by-linkid/${encodeURIComponent(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n collection: async (\n linkId: string,\n locale?: string\n ): Promise<ByLinkIdCollectionResponse | null> => {\n try {\n return await fetchAPI(\n `${base}/api/catalog_system/pub/collection/by-linkid/${encodeURIComponent(linkId)}`,\n byLinkIdInit(locale)\n )\n } catch (error) {\n if (isNotFoundError(error)) return null\n throw error\n }\n },\n },\n products: {\n crossselling: ({\n type,\n productId,\n groupByProduct = true,\n }: {\n type: ValueOf<typeof FACET_CROSS_SELLING_MAP>\n productId: string\n groupByProduct?: boolean\n }): Promise<PortalProduct[]> => {\n const params = new URLSearchParams({\n sc: ctx.storage.channel.salesChannel,\n groupByProduct: groupByProduct.toString(),\n })\n\n return fetchAPI(\n `${base}/api/catalog_system/pub/products/crossselling/${type}/${productId}?${params}`,\n undefined,\n { storeCookies }\n )\n },\n },\n },\n checkout: {\n simulation: (\n args: SimulationArgs,\n { salesChannel }: SimulationOptions = ctx.storage.channel\n ): Promise<Simulation> => {\n const params = new URLSearchParams({\n sc: salesChannel,\n })\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForms/simulation?${params.toString()}`,\n {\n ...BASE_INIT,\n headers,\n body: JSON.stringify(args),\n },\n { storeCookies }\n )\n },\n shippingData: (\n {\n id,\n index,\n deliveryMode,\n selectedAddresses,\n }: {\n id: string\n index: number\n deliveryMode?: DeliveryMode | null\n selectedAddresses: SelectedAddress[]\n },\n setDeliveryWindow?: boolean\n ): Promise<OrderForm> => {\n const deliveryWindow = setDeliveryWindow\n ? {\n startDateUtc: deliveryMode?.deliveryWindow?.startDate,\n endDateUtc: deliveryMode?.deliveryWindow?.endDate,\n }\n : null\n\n const mappedBody = {\n logisticsInfo: Array.from({ length: index }, (_, itemIndex) => ({\n itemIndex,\n selectedDeliveryChannel: deliveryMode?.deliveryChannel || null,\n selectedSla: deliveryMode?.deliveryMethod || null,\n deliveryWindow: deliveryWindow,\n })),\n selectedAddresses: selectedAddresses,\n clearAddressIfPostalCodeNotFound: incrementAddress,\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/shippingData`,\n {\n ...BASE_INIT,\n headers,\n body: JSON.stringify(mappedBody),\n },\n { storeCookies }\n )\n },\n marketingData: ({\n id,\n marketingData,\n }: {\n id: string\n marketingData: StoreMarketingData\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/marketingData`,\n {\n headers,\n body: JSON.stringify(marketingData),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n clientPreferencesData: ({\n id,\n clientPreferencesData,\n }: {\n id: string\n clientPreferencesData: ClientPreferencesData\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/attachments/clientPreferencesData`,\n {\n headers,\n body: JSON.stringify(clientPreferencesData),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n orderForm: ({\n id,\n refreshOutdatedData = true,\n channel = ctx.storage.channel,\n preserveSalesChannel = false,\n }: {\n id?: string\n refreshOutdatedData?: boolean\n channel?: Required<Channel>\n /**\n * When true, omit the `sc` query param so Checkout keeps the cart's\n * current sales channel. Use this when the session SC may be stale\n * relative to an external flow (e.g. Quick Order) that already\n * advanced the orderForm.\n */\n preserveSalesChannel?: boolean\n }): Promise<OrderForm> => {\n const { salesChannel } = channel\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const params = new URLSearchParams()\n // New carts (no id) always need an explicit SC. Existing carts may\n // omit it so Checkout does not recalculate under a stale session SC.\n if (!preserveSalesChannel || !id) {\n params.set('sc', salesChannel)\n }\n if (id) {\n params.set('refreshOutdatedData', refreshOutdatedData.toString())\n }\n const orderFormPath = id ? `/${id}` : ''\n // Always has at least `sc` (new cart) or `refreshOutdatedData` (existing).\n const url = `${base}/api/checkout/pub/orderForm${orderFormPath}?${params}`\n\n return fetchAPI(\n url,\n {\n ...BASE_INIT,\n headers,\n ...(id ? {} : { body: '{}' }),\n },\n { storeCookies }\n )\n },\n clearOrderFormMessages: ({ id }: { id: string }) => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/messages/clear`,\n {\n ...BASE_INIT,\n headers,\n body: '{}',\n }\n )\n },\n updateOrderFormItems: ({\n id,\n orderItems,\n allowOutdatedData = 'paymentData',\n salesChannel = ctx.storage.channel.salesChannel,\n shouldSplitItem = true,\n }: {\n id: string\n orderItems: OrderFormInputItem[]\n allowOutdatedData?: 'paymentData'\n salesChannel?: string\n shouldSplitItem?: boolean | null\n }): Promise<OrderForm> => {\n const params = new URLSearchParams({\n allowOutdatedData,\n sc: salesChannel,\n })\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/items?${params}`,\n {\n headers,\n body: JSON.stringify({\n orderItems,\n noSplitItem: !shouldSplitItem,\n }),\n method: 'PATCH',\n },\n { storeCookies }\n )\n },\n setCustomData: ({\n id,\n appId,\n key,\n value,\n }: {\n id: string\n appId: string\n key: string\n value: string\n }): Promise<OrderForm> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${id}/customData/${appId}/${key}`,\n {\n headers,\n body: JSON.stringify({ value }),\n method: 'PUT',\n }\n )\n },\n region: async ({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n }: RegionInput): Promise<Region[]> => {\n const params = new URLSearchParams({\n country: country,\n sc: salesChannel ?? '',\n })\n\n postalCode\n ? params.append('postalCode', postalCode)\n : params.append(\n 'geoCoordinates',\n `${geoCoordinates?.longitude};${geoCoordinates?.latitude}`\n )\n\n const url = `${base}/api/checkout/pub/regions/?${params.toString()}`\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n url,\n {\n headers,\n },\n { storeCookies }\n )\n },\n address: async ({\n postalCode,\n country,\n }: AddressInput): Promise<Address> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/postal-code/${country}/${postalCode}`,\n {\n headers,\n },\n { storeCookies }\n )\n },\n cancelOrder: ({\n orderId,\n customerEmail,\n reason,\n }: IUserOrderCancel): Promise<UserOrderCancel> | undefined => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/checkout/pub/orders/${orderId}/user-cancel-request`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify({\n customerEmail,\n reason,\n }),\n },\n {}\n )\n },\n pickupPoints: ({\n geoCoordinates,\n }: PickupPointsInput): Promise<PickupPoints> => {\n if (!geoCoordinates) {\n throw new Error(\n 'Missing required parameter for listing pickup points.'\n )\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/logistics-shipping/pickuppoints/_search`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify({ coordinate: geoCoordinates }),\n },\n { storeCookies }\n )\n },\n },\n session: (search: string): Promise<Session> => {\n const params = new URLSearchParams(search)\n\n params.set(\n 'items',\n 'profile.id,profile.email,profile.firstName,profile.lastName,profile.phone,shopper.firstName,shopper.lastName,shopper.organizationManager,shopper.availableContracts,shopper.activeContractId,store.channel,store.countryCode,store.cultureInfo,store.currencyCode,store.currencySymbol,authentication.customerId,authentication.storeUserId,authentication.storeUserEmail,authentication.unitId,authentication.unitName,checkout.regionId,public.postalCode'\n )\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n })\n\n const sessionCookie = parse(ctx?.headers?.cookie ?? '')?.vtex_session\n\n return fetchAPI(\n `${base}/api/sessions?${params.toString()}`,\n {\n method: sessionCookie ? 'PATCH' : 'POST',\n headers,\n body: '{}',\n },\n { storeCookies }\n )\n },\n storeFront: {\n /**\n * Attached contracts of an Org Unit from the buyer-portal store-front BFF\n * (requires the `buyer-portal-graphql` IO app). Buyer cookie forwarded;\n * no app keys involved.\n */\n attachedContracts: (\n orgUnitId: string\n ): Promise<AttachedContractsResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n })\n\n return fetchAPI(\n `https://${account}.myvtex.com/_v/store-front/units/${encodeURIComponent(\n orgUnitId\n )}/contracts/attached?details=true`,\n { headers },\n { storeCookies }\n )\n },\n },\n subscribeToNewsletter: (data: {\n name: string\n email: string\n }): Promise<MasterDataResponse> => {\n return fetchAPI(\n `${base}/api/dataentities/NL/documents/`,\n {\n ...BASE_INIT,\n body: JSON.stringify({ ...data, isNewsletterOptIn: true }),\n method: 'PATCH',\n },\n { storeCookies }\n )\n },\n profile: {\n addresses: async (userId: string): Promise<Record<string, string>> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/profile-system/pvt/profiles/${userId}/addresses`,\n { headers },\n { storeCookies }\n )\n },\n },\n oms: {\n userOrder: ({ orderId }: { orderId: string }): Promise<UserOrder> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/oms/user/orders/${orderId}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n listUserOrders: ({\n page,\n status,\n dateInitial,\n dateFinal,\n text,\n clientEmail,\n perPage,\n pendingMyApproval,\n }: QueryListUserOrdersArgs): Promise<UserOrderListResult> => {\n const params = new URLSearchParams()\n\n if (dateInitial) {\n const dateInitialTimestamp = new Date(dateInitial).setHours(\n 0,\n 0,\n 0,\n 0\n )\n dateInitial = new Date(dateInitialTimestamp).toISOString()\n }\n if (dateFinal) {\n const dateFinalTimestamp = new Date(dateFinal).setHours(\n 23,\n 59,\n 59,\n 999\n )\n dateFinal = new Date(dateFinalTimestamp).toISOString()\n }\n\n if (text) params.append('text', text)\n\n if (status && status.length > 0) {\n params.append('status', status.filter(Boolean).join(','))\n }\n\n if (dateInitial && dateFinal) {\n params.append(\n 'creation_date',\n `creationDate:[${dateInitial} TO ${dateFinal}]`\n )\n } else if (dateInitial) {\n params.append('creation_date', `creationDate:[${dateInitial} TO *]`)\n } else if (dateFinal) {\n params.append('creation_date', `creationDate:[* TO ${dateFinal}]`)\n }\n\n if (clientEmail) params.append('clientEmail', clientEmail)\n if (page) params.append('page', page.toString())\n if (perPage) params.append('per_page', perPage.toString())\n if (pendingMyApproval) {\n params.append('my_pending_approvals', String(true))\n }\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/oms/user/orders?${params.toString()}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n getCommercialAuthorizationsByOrderId: ({\n orderId,\n }: ICommercialAuthorizationByOrderId): Promise<CommercialAuthorizationResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/${account}/commercial-authorizations/order/${orderId}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n processOrderAuthorization: async ({\n orderAuthorizationId,\n dimensionId,\n ruleId,\n approved,\n }: IProcessOrderAuthorization): Promise<CommercialAuthorizationResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const APPROVAL_SCORE = 100\n const REJECTION_SCORE = 0\n\n const body = {\n params: {\n ruleId,\n dimensionId,\n score: approved ? APPROVAL_SCORE : REJECTION_SCORE,\n },\n }\n\n return fetchAPI(\n `${base}/${account}/commercial-authorizations/${orderAuthorizationId}/callback`,\n {\n method: 'POST',\n headers,\n body: JSON.stringify(body),\n },\n { storeCookies }\n )\n },\n },\n savedCards: {\n listCreditCards: (): Promise<SavedCard[]> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/saved-cards/credit-card?an=${account}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n },\n units: {\n getUnitByUserId: ({\n userId,\n }: { userId: string }): Promise<UnitResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${userId}/unit`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getOrgUnitById: ({\n orgUnitId,\n }: { orgUnitId: string }): Promise<UnitResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${orgUnitId}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getScopesByOrgUnit: ({\n orgUnitId,\n }: { orgUnitId: string }): Promise<ScopesByUnit> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/units/v1/${orgUnitId}/scopes`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n licenseManager: {\n getUserById: ({\n userId,\n }: { userId: string }): Promise<{\n id: string\n name: string\n email: string\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/users/${userId}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getUserByEmail: ({\n email,\n }: { email: string }): Promise<{\n id: string\n name: string\n email: string\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/pvt/users/${email}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getUserRoles: ({\n userId,\n }: { userId: string }): Promise<{\n Email: string\n Roles: Array<{ Id: number; Name: string }>\n }> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/storefront/users/${userId}/roles`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n /**\n * Whether a License Manager resource key is granted to the user. The\n * endpoint resolves the user's roles into the resource key server-side,\n * so callers never have to match role names (which are account-\n * configurable). Responds with a bare boolean.\n */\n isResourceGranted: ({\n userId,\n resourceKey,\n }: { userId: string; resourceKey: string }): Promise<boolean> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/license-manager/storefront/bff/users/${userId}/resources/${resourceKey}/granted?an=${account}`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n masterData: {\n getContractById: ({\n contractId,\n }: { contractId: string }): Promise<ContractResponse> => {\n if (!contractId) {\n throw new BadRequestError('Missing contractId to fetch CL fields.')\n }\n\n const headers: HeadersInit = withBuyerAuthHeaders({\n Accept: 'application/json',\n 'content-type': 'application/json',\n })\n\n return fetchAPI(\n `${base}/api/dataentities/CL/documents/${contractId}?_fields=_all`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n getShopperById: ({\n userId,\n }: { userId: string }): Promise<\n Array<{\n firstName: string\n lastName: string\n email: string\n phone: string\n }>\n > => {\n if (!userId) {\n throw new BadRequestError('Missing userId to fetch shopper name.')\n }\n\n const headers: HeadersInit = withAppKeyAndToken({\n Accept: 'application/json',\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const userIdNormalized = userId.replace(/-/g, '') // Normalize userId by removing hyphens\n\n return fetchAPI(\n `${base}/api/dataentities/shopper/search?_where=(userId=${userIdNormalized} OR userId=${userId})&_fields=_all&_schema=v1`,\n {\n method: 'GET',\n headers,\n },\n {}\n )\n },\n },\n quotes: {\n listUserQuotes: (args: ListUserQuotesArgs): Promise<QuoteListResult> => {\n validateListUserQuotesArgs(args)\n\n const params = buildListUserQuotesParams(args)\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/quoting/quotes?${params.toString()}`,\n {\n method: 'GET',\n headers,\n },\n { storeCookies }\n )\n },\n },\n vtexid: {\n validate: (): Promise<VtexIdResponse> => {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n // Read from the merged cookie set so the body token stays in sync with\n // the `cookie` header (both pull from request + storage updates).\n const token = getAuthCookie(getUpdatedCookie(ctx) ?? '', account)\n\n return fetchAPI(\n `${base}/api/vtexid/credential/validate`,\n {\n headers,\n body: JSON.stringify({ token }),\n method: 'POST',\n },\n { storeCookies }\n )\n },\n },\n orderEntry: {\n uploadFile: ({\n fileBuffer,\n fileName,\n mimeType,\n }: {\n fileBuffer: Buffer\n fileName: string\n mimeType: string\n }): Promise<{ objectKey: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const boundary = `----FastStoreUploadBoundary${Date.now()}`\n const CRLF = '\\r\\n'\n\n const SAFE_MIME_PATTERN =\n /^[a-zA-Z0-9][a-zA-Z0-9!#$&\\-.^_]*\\/[a-zA-Z0-9][a-zA-Z0-9!#$&\\-.^_+]*$/\n const safeMimeType = SAFE_MIME_PATTERN.test(mimeType)\n ? mimeType\n : 'application/octet-stream'\n const safeFileName = fileName.replaceAll(/[\\r\\n\"]/g, '_')\n\n const headerPart = [\n `--${boundary}`,\n `Content-Disposition: form-data; name=\"file\"; filename=\"${safeFileName}\"`,\n `Content-Type: ${safeMimeType}`,\n '',\n '',\n ].join(CRLF)\n\n const footer = `${CRLF}--${boundary}--${CRLF}`\n\n const headerBytes = Buffer.from(headerPart)\n const footerBytes = Buffer.from(footer)\n const body = new Uint8Array(\n headerBytes.byteLength +\n fileBuffer.byteLength +\n footerBytes.byteLength\n )\n let offset = 0\n body.set(headerBytes, offset)\n offset += headerBytes.byteLength\n body.set(fileBuffer, offset)\n offset += fileBuffer.byteLength\n body.set(footerBytes, offset)\n\n return fetchAPI(\n `${base}/api/order-entry/upload?an=${account}`,\n {\n method: 'POST',\n headers: {\n ...autHeaders,\n 'content-type': `multipart/form-data; boundary=${boundary}`,\n },\n body: body.buffer,\n },\n {}\n )\n },\n\n startOperation: ({\n objectKey,\n orderFormId,\n sessionToken,\n }: {\n objectKey: string\n orderFormId: string\n sessionToken?: string\n }): Promise<{ operationId: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n const body = JSON.stringify({\n objectKey,\n orderFormId,\n operation: 'CreateCart',\n ...(sessionToken ? { sessionToken } : {}),\n })\n\n return fetchAPI(\n `${base}/api/order-entry/operation?an=${account}`,\n {\n method: 'POST',\n headers: autHeaders,\n body,\n },\n {}\n )\n },\n\n getOperation: ({\n operationId,\n }: {\n operationId: string\n }): Promise<{\n status: string\n entityId: string\n message?: string\n missingItems?: Array<{\n itemId: string\n itemName?: string\n reason: string\n }>\n }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n return fetchAPI(\n `${base}/api/order-entry/operation/${operationId}?an=${account}`,\n {\n method: 'GET',\n headers: autHeaders,\n },\n {}\n )\n },\n\n createOrderForm: (): Promise<{ orderFormId: string }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm?sc=${ctx.storage.channel.salesChannel}`,\n {\n method: 'POST',\n headers: autHeaders,\n body: '{}',\n },\n {}\n )\n },\n\n getOrderFormItems: ({\n orderFormId,\n }: {\n orderFormId: string\n }): Promise<{ items: import('./types/OrderForm').OrderFormItem[] }> => {\n const autHeaders = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${orderFormId}`,\n {\n method: 'GET',\n headers: autHeaders,\n },\n {}\n )\n },\n },\n\n // Anonymous personalization / recommendations served by the VTEX\n // Recommendations BFF. The BFF replies with `vtex-rec-*` Set-Cookie headers\n // (forwarded to the browser via `ctx.storage.cookies`) and returns products\n // already hydrated in the Intelligent Search shape.\n recommendation: {\n recommendations: ({\n campaignVrn,\n userId,\n products = [],\n salesChannel,\n locale,\n }: RecommendationArgs): Promise<RecommendationResult> => {\n const params = new URLSearchParams({ an: account, campaignVrn })\n\n if (userId) {\n params.append('userId', userId)\n }\n\n if (products.length > 0) {\n params.append('products', products.join(','))\n }\n\n if (salesChannel) {\n params.append('salesChannel', salesChannel)\n }\n\n if (locale) {\n params.append('locale', locale)\n }\n\n return fetchAPI(\n `${recommendationBase}/recommendations?${params.toString()}`,\n { headers: recommendationHeaders },\n { storeCookies }\n )\n },\n\n startRecommendationSession: (): Promise<\n StartRecommendationSessionResult | undefined\n > => {\n const params = new URLSearchParams({ an: account })\n\n return fetchAPI(\n `${recommendationBase}/users/start-session?${params.toString()}`,\n { method: 'POST', headers: recommendationHeaders },\n { storeCookies }\n )\n },\n },\n }\n}\n","import type { GraphqlContext } from '..'\n\nexport interface LocalizationConfig {\n enabled?: boolean\n defaultLocale?: string\n locales?: Record<string, unknown>\n}\n\nexport const getLocalizationConfig = (\n ctx: GraphqlContext\n): LocalizationConfig =>\n (ctx.discoveryConfig as { localization?: LocalizationConfig } | undefined)\n ?.localization ?? {}\n\nexport const isLocalizationEnabled = (ctx: GraphqlContext): boolean =>\n getLocalizationConfig(ctx).enabled === true\n\nexport const getConfiguredLocales = (ctx: GraphqlContext): string[] =>\n Object.keys(getLocalizationConfig(ctx).locales ?? {})\n\nexport const getDefaultLocale = (ctx: GraphqlContext): string | undefined =>\n getLocalizationConfig(ctx).defaultLocale\n\n/**\n * Whether `locale` is one of the store's configured locales. Used to validate\n * client-supplied locale input before propagating it to downstream platform\n * APIs. Returns false when localization is disabled (no configured locales).\n */\nexport const isConfiguredLocale = (\n ctx: GraphqlContext,\n locale: string\n): boolean => getConfiguredLocales(ctx).includes(locale)\n\n/**\n * Locale to forward to Catalog by-linkid endpoints via the Accept-Language\n * header so they return localized name/title/description. Returns the active\n * locale only when localization is enabled; otherwise `undefined`, so\n * non-localized stores send no header and falls back to the store's default\n * registered language (legacy behavior).\n *\n * Read at request time (not client construction) because `ctx.storage.locale`\n * is mutated later by the collection resolver.\n */\nexport const getCatalogLocale = (ctx: GraphqlContext): string | undefined =>\n isLocalizationEnabled(ctx) ? ctx.storage.locale || undefined : undefined\n","import { parse } from 'cookie'\n\nexport interface IntelligentSearchFacet {\n key: string\n value: string\n}\n\ntype FuzzyFacet = {\n key: 'fuzzy'\n value: '0' | '1' | 'auto'\n}\n\ntype OperatorFacet = {\n key: 'operator'\n value: 'and' | 'or'\n}\n\ntype SegmentParams = {\n sc?: string | number\n regionId?: string\n country?: string\n locale?: string\n 'zip-code'?: string\n coordinates?: string\n pickupPoint?: string\n deliveryZonesHash?: string\n pickupPointHash?: string\n utmSource?: string\n utmCampaign?: string\n utmiCampaign?: string\n campaigns?: string\n priceTables?: string\n}\n\nexport type Sort =\n | 'price:desc'\n | 'price:asc'\n | 'orders:desc'\n | 'name:desc'\n | 'name:asc'\n | 'release:desc'\n | 'discount:desc'\n | ''\n\nexport type ProductIdentifierField = 'id' | 'slug' | 'ean' | 'reference' | 'sku'\n\nexport type IntelligentSearchEndpoint =\n | 'product-search'\n | 'facets'\n | 'catalog-count'\n | 'products'\n | 'search-suggestions'\n | 'top-searches'\n\nexport interface IntelligentSearchDefaults {\n salesChannel?: string | number\n regionId?: string\n locale: string\n hideUnavailableItems?: boolean\n simulationBehavior?: 'default' | 'skip' | 'only1P'\n showSponsored?: boolean\n}\n\nexport interface IntelligentSearchRequestArgs {\n query?: string\n page?: number\n count?: number\n sort?: Sort\n selectedFacets?: IntelligentSearchFacet[]\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n sponsoredCount?: number\n allowRedirect?: boolean\n field?: ProductIdentifierField\n value?: string\n}\n\nexport interface IntelligentSearchRequestInput {\n endpoint: IntelligentSearchEndpoint\n /** Decoded vtex_segment object (params + extraFacets are extracted internally). */\n segment?: Record<string, unknown>\n defaults?: IntelligentSearchDefaults\n args?: IntelligentSearchRequestArgs\n}\n\nexport interface IntelligentSearchRequest {\n /** Attribute path segment only (no base URL or endpoint prefix). */\n path: string\n params: URLSearchParams\n toString(): string\n}\n\nconst FUZZY_KEY = 'fuzzy'\nconst OPERATOR_KEY = 'operator'\nconst PICKUP_POINT_KEY = 'pickupPoint'\nconst SHIPPING_KEY = 'shipping'\nconst DELIVERY_OPTIONS_KEY = 'delivery-options'\nconst IN_STOCK_KEY = 'in-stock'\nconst POLICY_KEY = 'trade-policy'\nconst REGION_KEY = 'region-id'\n\nconst PATH_EXCLUDED_KEYS = new Set([\n POLICY_KEY,\n REGION_KEY,\n FUZZY_KEY,\n OPERATOR_KEY,\n PICKUP_POINT_KEY,\n])\n\nconst SHIPPING_FACET_KEYS = new Set([\n 'zip-code',\n 'pickupPoint',\n 'country',\n 'coordinates',\n 'deliveryZonesHash',\n 'pickupPointsHash',\n])\n\nconst encodeSafeURI = (uri: string) => encodeURI(decodeURI(uri))\n\nconst removeDiacriticsFromURL = (url: string) =>\n encodeURIComponent(\n decodeURIComponent(url)\n .normalize('NFD')\n // biome-ignore lint/suspicious/noMisleadingCharacterClass: After NFD normalization, combining marks are separated and can be matched individually\n .replaceAll(/[\\u0300-\\u036f]/g, '')\n )\n\nconst PICKUP_IN_POINT_SUFFIX_RE = /^pickup-in-point-(.+)$/\n\n/**\n * Reads and decodes the `vtex_segment` cookie. Does not create a segment.\n * Returns an empty object when the cookie is absent or invalid.\n */\nexport function parseSegmentCookie(\n cookieHeader?: string\n): Record<string, unknown> {\n if (!cookieHeader) {\n return {}\n }\n\n try {\n const cookies = parse(cookieHeader)\n const segmentToken = cookies.vtex_segment\n\n if (!segmentToken) {\n return {}\n }\n\n const decoded = Buffer.from(segmentToken, 'base64').toString('utf-8')\n\n return JSON.parse(decoded) as Record<string, unknown>\n } catch {\n return {}\n }\n}\n\nfunction parseSegmentFacetsString(facetsStr: string): {\n shipping: Record<string, string>\n extraFacets: IntelligentSearchFacet[]\n} {\n const shipping: Record<string, string> = {}\n const extraFacets: IntelligentSearchFacet[] = []\n\n for (const pair of facetsStr.split(';')) {\n const eqIdx = pair.indexOf('=')\n\n if (eqIdx < 0) continue\n\n const key = pair.slice(0, eqIdx)\n const value = pair.slice(eqIdx + 1)\n\n if (!key || !value) continue\n\n if (SHIPPING_FACET_KEYS.has(key)) {\n shipping[key] = value\n } else {\n // NOTE: productClusterIds (and any other repeated facet key, e.g. for\n // excludent collections) must stay as path segments, not collapse into\n // a single query param — IS expects productClusterIds/X/productClusterIds/not:Y/.\n extraFacets.push({ key, value })\n }\n }\n\n return { shipping, extraFacets }\n}\n\nfunction extractSegmentData(segment: Record<string, unknown>): {\n segmentParams: SegmentParams\n extraFacets: IntelligentSearchFacet[]\n} {\n const facetsStr = typeof segment.facets === 'string' ? segment.facets : ''\n const { shipping, extraFacets } = parseSegmentFacetsString(facetsStr)\n\n return {\n segmentParams: {\n sc: segment.channel as string | number | undefined,\n regionId: segment.regionId as string | undefined,\n country: (segment.countryCode as string | undefined) ?? shipping.country,\n locale: segment.cultureInfo as string | undefined,\n 'zip-code': shipping['zip-code'],\n coordinates: shipping.coordinates,\n pickupPoint: shipping.pickupPoint,\n deliveryZonesHash: shipping.deliveryZonesHash,\n pickupPointHash: shipping.pickupPointsHash,\n utmSource: (segment.utm_source as string | undefined) ?? undefined,\n utmCampaign: (segment.utm_campaign as string | undefined) ?? undefined,\n utmiCampaign: (segment.utmi_campaign as string | undefined) ?? undefined,\n campaigns:\n typeof segment.campaigns === 'string' ? segment.campaigns : undefined,\n priceTables: (segment.priceTables as string | undefined) ?? undefined,\n },\n extraFacets,\n }\n}\n\nfunction appendSegmentParams(\n params: URLSearchParams,\n segmentParams: SegmentParams\n) {\n const entries: Array<[string, string | number | undefined]> = [\n ['sc', segmentParams.sc],\n ['regionId', segmentParams.regionId],\n ['country', segmentParams.country],\n ['locale', segmentParams.locale],\n ['zip-code', segmentParams['zip-code']],\n ['coordinates', segmentParams.coordinates],\n ['pickupPoint', segmentParams.pickupPoint],\n ['deliveryZonesHash', segmentParams.deliveryZonesHash],\n ['pickupPointHash', segmentParams.pickupPointHash],\n ['utmSource', segmentParams.utmSource],\n ['utmCampaign', segmentParams.utmCampaign],\n ['utmiCampaign', segmentParams.utmiCampaign],\n ['campaigns', segmentParams.campaigns],\n ['priceTables', segmentParams.priceTables],\n ]\n\n for (const [key, value] of entries) {\n if (value !== undefined && value !== null && value !== '') {\n params.append(key, String(value))\n }\n }\n}\n\nfunction extractPickupPointIdFromShippingFacetValue(\n value: string\n): string | undefined {\n const match = PICKUP_IN_POINT_SUFFIX_RE.exec(value)\n\n return match?.[1]\n}\n\nfunction extractPickupPointIdFromPathShippingFacet(\n selectedFacetsFromPath: IntelligentSearchFacet[]\n): string | undefined {\n const shipping = selectedFacetsFromPath.find((f) => f.key === 'shipping')\n const rawId = shipping\n ? extractPickupPointIdFromShippingFacetValue(shipping.value)\n : undefined\n\n if (rawId === undefined) {\n return undefined\n }\n\n try {\n return decodeURIComponent(rawId)\n } catch {\n return rawId\n }\n}\n\nfunction mergeSegmentParamsWithPickupFromPath(\n segmentParams: SegmentParams | undefined,\n selectedFacetsFromPath: IntelligentSearchFacet[]\n): SegmentParams | undefined {\n const pathPickupId = extractPickupPointIdFromPathShippingFacet(\n selectedFacetsFromPath\n )\n\n if (pathPickupId === undefined) {\n return segmentParams\n }\n\n return {\n ...segmentParams,\n pickupPoint: pathPickupId,\n }\n}\n\nfunction normalizePickupInPointShippingFacets(\n selectedFacets: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n return selectedFacets.map((facet) => {\n if (facet.key !== 'shipping') {\n return facet\n }\n\n const id = extractPickupPointIdFromShippingFacetValue(facet.value)\n\n if (id === undefined) {\n return facet\n }\n\n return { ...facet, value: 'pickup-in-point' }\n })\n}\n\nfunction concatSelectedFacets(\n selectedFacets: IntelligentSearchFacet[],\n selectedFacetsFromSegment: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n let result = [...selectedFacets]\n const hasShipping = result.some((f) => f.key === 'shipping')\n\n for (const facet of selectedFacetsFromSegment) {\n if (!hasShipping || facet.key !== 'shipping') {\n result.push(facet)\n }\n }\n\n if (result.some((f) => f.key === 'shipping' && f.value === 'ignore')) {\n result = result.filter((f) => f.key !== 'shipping')\n }\n\n return normalizePickupInPointShippingFacets(result)\n}\n\nfunction buildAttributePath(selectedFacets: IntelligentSearchFacet[]) {\n return selectedFacets.reduce((attributePath, facet) => {\n let { key, value } = facet\n\n if (key === 'priceRange') {\n key = 'price'\n value = value.replace(' TO ', ':')\n }\n\n return key === 'ft'\n ? attributePath\n : `${attributePath}${encodeSafeURI(key)}/${removeDiacriticsFromURL(encodeSafeURI(value)).replaceAll(/ |%20/g, '-')}/`\n }, '')\n}\n\nconst isFuzzyFacet = (facet: IntelligentSearchFacet): facet is FuzzyFacet =>\n facet.key === 'fuzzy' &&\n (facet.value === '0' || facet.value === '1' || facet.value === 'auto')\n\nconst isOperatorFacet = (\n facet: IntelligentSearchFacet\n): facet is OperatorFacet =>\n facet.key === 'operator' && (facet.value === 'and' || facet.value === 'or')\n\nfunction resolveSegmentData(\n segment: Record<string, unknown> | undefined,\n defaults: IntelligentSearchDefaults | undefined\n): { segmentParams: SegmentParams; extraFacets: IntelligentSearchFacet[] } {\n const { segmentParams, extraFacets } = extractSegmentData(segment ?? {})\n\n // Server-provided defaults are authoritative for sales channel/region: the\n // raw `vtex_segment` cookie is client-supplied base64 JSON and must not be\n // able to override the trusted server context. Only fall back to the cookie\n // values when no default is provided.\n const sc = defaults?.salesChannel ?? segmentParams.sc\n const regionId = defaults?.regionId ?? segmentParams.regionId\n const locale = defaults?.locale ?? segmentParams.locale ?? ''\n\n return {\n segmentParams: {\n ...segmentParams,\n ...(sc ? { sc } : {}),\n ...(regionId ? { regionId } : {}),\n locale,\n },\n extraFacets,\n }\n}\n\nfunction preparePathFacets(\n facets: IntelligentSearchFacet[],\n extraFacets: IntelligentSearchFacet[]\n): IntelligentSearchFacet[] {\n const pathFacets = facets.filter(({ key }) => !PATH_EXCLUDED_KEYS.has(key))\n\n const shippingFacet =\n facets.find(\n ({ key, value }) =>\n key === SHIPPING_KEY && value !== 'all-delivery-methods'\n ) ?? null\n\n const deliveryOptionsFacet =\n facets.find(\n ({ key, value }) =>\n key === DELIVERY_OPTIONS_KEY && value !== 'all-delivery-options'\n ) ?? null\n\n const withShippingFacets = [...pathFacets]\n\n // `pathFacets` may already contain the shipping/delivery-options facets, so\n // only push them when they are not already present to avoid duplicated path\n // segments like `shipping/delivery/shipping/delivery/`.\n const hasShippingInPath = withShippingFacets.some(\n ({ key }) => key === SHIPPING_KEY\n )\n const hasDeliveryOptionsInPath = withShippingFacets.some(\n ({ key }) => key === DELIVERY_OPTIONS_KEY\n )\n\n if (shippingFacet !== null && !hasShippingInPath) {\n withShippingFacets.push(shippingFacet)\n }\n\n if (deliveryOptionsFacet !== null && !hasDeliveryOptionsInPath) {\n withShippingFacets.push(deliveryOptionsFacet)\n }\n\n return concatSelectedFacets(withShippingFacets, extraFacets)\n}\n\nfunction addSearchParamsFacets(\n facets: IntelligentSearchFacet[],\n params: URLSearchParams\n) {\n const fuzzyFacet = facets.find(({ key }) => key === FUZZY_KEY) ?? null\n const operatorFacet = facets.find(({ key }) => key === OPERATOR_KEY) ?? null\n const pickupPointFacet =\n facets.find(({ key }) => key === PICKUP_POINT_KEY) ?? null\n\n if (fuzzyFacet && isFuzzyFacet(fuzzyFacet)) {\n params.append(FUZZY_KEY, fuzzyFacet.value)\n }\n\n if (operatorFacet && isOperatorFacet(operatorFacet)) {\n params.append(OPERATOR_KEY, operatorFacet.value)\n }\n\n if (pickupPointFacet) {\n params.append(PICKUP_POINT_KEY, pickupPointFacet.value)\n }\n}\n\ninterface SearchLikeParams {\n includePagination: boolean\n includeSort: boolean\n}\n\nfunction buildSearchLikeParams(\n args: IntelligentSearchRequestArgs,\n defaults: IntelligentSearchDefaults | undefined,\n segmentData: {\n segmentParams: SegmentParams\n extraFacets: IntelligentSearchFacet[]\n },\n options: SearchLikeParams\n): { params: URLSearchParams; path: string } {\n const {\n query = '',\n page,\n count,\n sort,\n selectedFacets = [],\n showInvisibleItems,\n sponsoredCount,\n hideUnavailableItems: searchHideUnavailableItems,\n allowRedirect = false,\n } = args\n\n const params = new URLSearchParams()\n\n if (options.includePagination && page !== undefined && count !== undefined) {\n const from = page * count\n const to = count === 0 ? from : from + count - 1\n\n params.append('from', from.toString())\n params.append('to', to.toString())\n }\n\n if (query) {\n params.append('query', query)\n }\n\n if (options.includeSort && sort) {\n params.append('sort', sort)\n }\n\n const mergedSegmentParams = mergeSegmentParamsWithPickupFromPath(\n segmentData.segmentParams,\n selectedFacets\n )\n\n appendSegmentParams(params, mergedSegmentParams ?? segmentData.segmentParams)\n addSearchParamsFacets(selectedFacets, params)\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n if (defaults?.hideUnavailableItems !== undefined) {\n const inStockFacet = selectedFacets.find(({ key }) => key === IN_STOCK_KEY)\n const shouldHideUnavailableItems = inStockFacet\n ? inStockFacet.value\n : (searchHideUnavailableItems?.toString() ??\n defaults.hideUnavailableItems.toString())\n\n params.append('hideUnavailableItems', shouldHideUnavailableItems)\n }\n\n if (defaults?.simulationBehavior !== undefined) {\n params.append('simulationBehavior', defaults.simulationBehavior.toString())\n }\n\n if (defaults?.showSponsored !== undefined) {\n params.append('showSponsored', defaults.showSponsored.toString())\n }\n\n if (sponsoredCount !== undefined) {\n params.append('sponsoredCount', sponsoredCount.toString())\n }\n\n if (allowRedirect !== undefined) {\n params.append('allowRedirect', allowRedirect.toString())\n }\n\n const path = buildAttributePath(\n preparePathFacets(selectedFacets, segmentData.extraFacets)\n )\n\n return { params, path }\n}\n\nfunction buildProductsParams(\n args: IntelligentSearchRequestArgs,\n segmentParams: SegmentParams\n): URLSearchParams {\n const { field, value, hideUnavailableItems, showInvisibleItems } = args\n\n const params = new URLSearchParams({\n field: field ?? '',\n value: value ?? '',\n })\n\n appendSegmentParams(params, segmentParams)\n\n if (hideUnavailableItems) {\n params.append('hideUnavailableItems', 'true')\n }\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n return params\n}\n\nfunction createRequest(\n path: string,\n params: URLSearchParams\n): IntelligentSearchRequest {\n return {\n path,\n params,\n toString() {\n const qs = params.toString()\n\n if (!path) {\n return qs ? `?${qs}` : ''\n }\n\n return qs ? `${path}?${qs}` : path\n },\n }\n}\n\n/**\n * Pure builder for intelligent-search v1 path + query params.\n * Callers assemble the full URL: `/api/intelligent-search/v1/${endpoint}/${request.path}?${request.params}`.\n */\nexport function buildIntelligentSearchRequest(\n input: IntelligentSearchRequestInput\n): IntelligentSearchRequest {\n const { endpoint, segment, defaults, args = {} } = input\n const segmentData = resolveSegmentData(segment, defaults)\n\n switch (endpoint) {\n case 'product-search':\n case 'facets': {\n const { params, path } = buildSearchLikeParams(\n args,\n defaults,\n segmentData,\n { includePagination: true, includeSort: true }\n )\n\n return createRequest(path, params)\n }\n\n case 'catalog-count': {\n const { params, path } = buildSearchLikeParams(\n args,\n defaults,\n segmentData,\n { includePagination: false, includeSort: false }\n )\n\n return createRequest(path, params)\n }\n\n case 'products': {\n const params = buildProductsParams(args, segmentData.segmentParams)\n\n return createRequest('', params)\n }\n\n case 'search-suggestions': {\n const params = new URLSearchParams({\n query: args.query?.toString() ?? '',\n locale: defaults?.locale ?? segmentData.segmentParams.locale ?? '',\n })\n\n return createRequest('', params)\n }\n\n case 'top-searches': {\n const params = new URLSearchParams({\n locale: defaults?.locale ?? segmentData.segmentParams.locale ?? '',\n })\n\n return createRequest('', params)\n }\n\n default: {\n const _exhaustive: never = endpoint\n\n throw new Error(`Unknown intelligent-search endpoint: ${_exhaustive}`)\n }\n }\n}\n","import pLimit from 'p-limit'\nimport type { Options } from '../../../../typings/globals'\n\nimport type { GraphqlContext } from '../../'\nimport { getWithCookie } from '../../utils/cookies'\nimport type { SelectedFacet } from '../../utils/facets'\nimport { isLocalizationEnabled } from '../../utils/localization'\nimport {\n buildIntelligentSearchRequest,\n parseSegmentCookie,\n type ProductIdentifierField,\n type Sort,\n} from '../../utils/intelligentSearchRequest'\nimport { fetchAPI } from '../fetch'\nimport type {\n Facet,\n FacetSearchResult,\n FacetValueBoolean,\n} from './types/FacetSearchResult'\nimport type { ProductCountResult } from './types/ProductCountResult'\nimport type {\n Product,\n ProductSearchResult,\n Suggestion,\n} from './types/ProductSearchResult'\n\nexport type {\n ProductIdentifierField,\n Sort,\n} from '../../utils/intelligentSearchRequest'\n\n// Bounds simultaneous IS v1 /products calls; values cardinality is capped\n// upstream by DataLoader maxBatchSize (99) and cross-sell/products `first`.\nconst PRODUCTS_BY_IDENTIFIER_CONCURRENCY = 10\n\nexport interface SearchArgs {\n query?: string\n page: number\n count: number\n type: 'product_search' | 'facets' | 'sponsored_products'\n sort?: Sort\n selectedFacets?: SelectedFacet[]\n fuzzy?: '0' | '1' | 'auto'\n hideUnavailableItems?: boolean\n showInvisibleItems?: boolean\n showSponsored?: boolean\n sponsoredCount?: number\n allowRedirect?: boolean\n}\n\nexport interface ProductLocator {\n field: 'id' | 'slug'\n value: string\n}\n\nexport interface FetchProductArgs {\n field: ProductIdentifierField\n value: string\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n}\n\nexport interface ProductsByIdentifierArgs {\n field: ProductIdentifierField\n values: string[]\n showInvisibleItems?: boolean\n hideUnavailableItems?: boolean\n}\n\nexport const isFacetBoolean = (\n facet: Facet\n): facet is Facet<FacetValueBoolean> => facet.type === 'TEXT'\n\nfunction getRegionIdFromContext(ctx: GraphqlContext): string | undefined {\n const { regionId, seller } = ctx.storage.channel\n const sellerRegionId = seller\n ? Buffer.from(`SW#${seller}`).toString('base64')\n : undefined\n\n return sellerRegionId ?? (regionId || undefined)\n}\n\nfunction getSegmentLocale(ctx: GraphqlContext): string {\n const segment = parseSegmentCookie(ctx.headers?.cookie)\n const cultureInfo = (segment.cultureInfo as string | undefined) || ''\n\n // Locale flows from the URL into IS in one chain:\n // router.locale (Next.js)\n // → selectedFacets locale facet (useLocalizedVariables in @faststore/core)\n // → ctx.storage.locale (mutateLocaleContext in query.ts)\n // → IS locale query param (here)\n //\n // For localized stores: prefer storage.locale over the vtex_segment cookie.\n // The cookie can lag after locale navigation, while storage.locale is derived\n // from the trusted selectedFacets locale facet in the same request.\n\n return isLocalizationEnabled(ctx)\n ? ctx.storage.locale || cultureInfo\n : cultureInfo || ctx.storage.locale || ''\n}\n\nexport const IntelligentSearch = (\n {\n account,\n environment,\n hideUnavailableItems,\n simulationBehavior,\n showSponsored,\n subDomainPrefix,\n }: Options,\n ctx: GraphqlContext\n) => {\n const base = `https://${account}.${environment}.com.br`\n const withCookie = getWithCookie(ctx)\n const segment = parseSegmentCookie(ctx.headers?.cookie)\n\n const requestDefaults = () => ({\n salesChannel: ctx.storage.channel.salesChannel,\n regionId: getRegionIdFromContext(ctx),\n locale: getSegmentLocale(ctx),\n hideUnavailableItems,\n simulationBehavior,\n showSponsored,\n })\n\n const host =\n new Headers(ctx.headers).get('x-forwarded-host') ?? ctx.headers?.host ?? ''\n\n const selectedPrefix = subDomainPrefix\n ? subDomainPrefix\n .map((prefix) => prefix + '.')\n .find((prefix) => host.includes(prefix)) || ''\n : ''\n\n const forwardedHost = host.replace(selectedPrefix, '')\n\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const search = <T>({ type, ...args }: SearchArgs): Promise<T> => {\n const endpoint = type === 'facets' ? 'facets' : 'product-search'\n const request = buildIntelligentSearchRequest({\n endpoint,\n segment,\n defaults: requestDefaults(),\n args,\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/${endpoint}/${request.path}?${request.params.toString()}`,\n { headers }\n )\n }\n\n const products = (args: Omit<SearchArgs, 'type'>) =>\n search<ProductSearchResult>({ ...args, type: 'product_search' })\n\n const fetchProduct = ({\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n }: FetchProductArgs): Promise<Product> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'products',\n segment,\n defaults: requestDefaults(),\n args: {\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n },\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/products?${request.params.toString()}`,\n { headers }\n )\n }\n\n const productsByIdentifier = async ({\n field,\n values,\n showInvisibleItems,\n hideUnavailableItems: hideUnavailable,\n }: ProductsByIdentifierArgs): Promise<Product[]> => {\n const limit = pLimit(PRODUCTS_BY_IDENTIFIER_CONCURRENCY)\n\n const productsResult = await Promise.all(\n values.map((value) =>\n limit(async () => {\n try {\n return await fetchProduct({\n field,\n value,\n hideUnavailableItems: hideUnavailable,\n showInvisibleItems,\n })\n } catch {\n return null\n }\n })\n )\n )\n\n return productsResult.filter(\n (product): product is Product => product !== null\n )\n }\n\n const suggestedTerms = (\n args: Omit<SearchArgs, 'type'>\n ): Promise<Suggestion> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'search-suggestions',\n segment,\n defaults: requestDefaults(),\n args: { query: args.query },\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/search-suggestions?${request.params.toString()}`,\n { headers }\n )\n }\n\n const topSearches = (): Promise<Suggestion> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'top-searches',\n segment,\n defaults: requestDefaults(),\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/top-searches?${request.params.toString()}`,\n { headers }\n )\n }\n\n const facets = (args: Omit<SearchArgs, 'type'>) =>\n search<FacetSearchResult>({ ...args, type: 'facets' })\n\n const productCount = (\n args: Omit<SearchArgs, 'type' | 'page' | 'count' | 'sort'>\n ): Promise<ProductCountResult> => {\n const request = buildIntelligentSearchRequest({\n endpoint: 'catalog-count',\n segment,\n defaults: requestDefaults(),\n args,\n })\n\n return fetchAPI(\n `${base}/api/intelligent-search/v1/catalog-count/${request.path}?${request.params.toString()}`,\n { headers }\n )\n }\n\n return {\n facets,\n products,\n fetchProduct,\n productsByIdentifier,\n suggestedTerms,\n topSearches,\n productCount,\n }\n}\n","import type { GraphqlContext } from '..'\nimport type { Options } from '../../../typings/globals'\nimport { CatalogDataplane } from './catalog'\nimport { VtexCommerce } from './commerce'\nimport { IntelligentSearch } from './search'\n\nexport type Clients = ReturnType<typeof getClients>\n\nexport const getClients = (options: Options, ctx: GraphqlContext) => {\n const search = IntelligentSearch(options, ctx)\n const commerce = VtexCommerce(options, ctx)\n const catalog = CatalogDataplane(options)\n\n return {\n search,\n commerce,\n catalog,\n }\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\nimport type { Options } from '../../../typings/globals'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type {\n ByLinkIdBrandResponse,\n ByLinkIdCategoryResponse,\n ByLinkIdCollectionResponse,\n} from '../clients/commerce/types/ByLinkId'\n\nconst CONCURRENT_REQUESTS_MAX = 20\n\n/**\n * Load key for the collection DataLoader. `locale` is captured at the call\n * site (not re-read from mutable `ctx.storage`) so concurrent aliased\n * `collection` fields with different locales cannot share a cache entry or\n * race on Accept-Language.\n */\nexport type CollectionLoadKey = {\n slug: string\n /** Catalog Accept-Language; `undefined` when localization is disabled. */\n locale?: string\n}\n\nexport type ByLinkIdCategoryRoot = ByLinkIdCategoryResponse & {\n entityType: 'category'\n /**\n * Full accumulated input slug injected by the loader (e.g. \"vestuario/camisetas\").\n * Used by slugifyRoot so that meta.selectedFacets builds the correct facet keys\n * without relying on root.url (which is absent in the by-linkid response).\n */\n slug: string\n}\n\nexport type ByLinkIdBrandRoot = ByLinkIdBrandResponse & {\n entityType: 'brand'\n}\n\nexport type ByLinkIdCollectionRoot = ByLinkIdCollectionResponse & {\n entityType: 'collection'\n}\n\nexport type Root =\n | ByLinkIdCategoryRoot\n | ByLinkIdBrandRoot\n | ByLinkIdCollectionRoot\n\nexport const isCategory = (root: Root): root is ByLinkIdCategoryRoot =>\n root.entityType === 'category'\n\nexport const isBrand = (root: Root): root is ByLinkIdBrandRoot =>\n root.entityType === 'brand'\n\nexport const isCollection = (root: Root): root is ByLinkIdCollectionRoot =>\n root.entityType === 'collection'\n\nexport const getCollectionLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (keys: readonly CollectionLoadKey[]): Promise<Root[]> =>\n Promise.all(\n keys.map((key) =>\n limit(async () => {\n // Normalize to lowercase for DataLoader cache-key consistency\n // (e.g. \"Sporting\" and \"sporting\" are the same). The by-linkid API is\n // case-insensitive by design (it preserves the legacy pagetype behavior).\n // Accents are significant and are preserved by toLowerCase() (e.g. \"vestuário\").\n const normalizedSlug = key.slug.toLowerCase()\n // Use the locale captured on the load key — do not re-read\n // ctx.storage.locale here (it can change mid-request).\n const locale = key.locale\n\n // Step 1: category\n // Pass the full path so the API validates each segment and returns only\n // the unambiguous leaf category. E.g. \"vestuario/camisetas\" resolves to\n // the \"camisetas\" that is a child of \"vestuario\", not any other category\n // that happens to share the linkId \"camisetas\".\n // The full slug is also injected into the result for meta.selectedFacets\n // and breadcrumb URL construction.\n const category = await clients.commerce.catalog.byLinkId.category(\n normalizedSlug,\n locale\n )\n if (category) {\n return {\n ...category,\n entityType: 'category' as const,\n slug: normalizedSlug,\n }\n }\n\n // Step 2: brand (always single-segment)\n const brand = await clients.commerce.catalog.byLinkId.brand(\n normalizedSlug,\n locale\n )\n if (brand) {\n return { ...brand, entityType: 'brand' as const }\n }\n\n // Step 3: collection cluster (always single-segment)\n const collection = await clients.commerce.catalog.byLinkId.collection(\n normalizedSlug,\n locale\n )\n if (collection) {\n return { ...collection, entityType: 'collection' as const }\n }\n\n throw new NotFoundError(\n `No catalog entity found for slug: ${key.slug}. Cascade exhausted (category → brand → collection).`\n )\n })\n )\n )\n\n return new DataLoader<CollectionLoadKey, Root, string>(loader, {\n // DataLoader is used for caching, not batching\n batch: false,\n // Dedup by lowercased slug + captured locale so casing variants share an\n // entry while same-slug / different-locale loads stay isolated.\n cacheKeyFn: ({ slug, locale }) => `${slug.toLowerCase()}::${locale ?? ''}`,\n })\n}\n","import DataLoader from 'dataloader'\nimport type { Options } from '../../../typings/globals'\n\nimport type { Clients } from '../clients'\n\nimport type { SalesChannel } from './../clients/commerce/types/SalesChannel'\n\nexport const getSalesChannelLoader = (_: Options, clients: Clients) => {\n const loader = async (channels: readonly string[]) =>\n Promise.all(channels.map((sc) => clients.commerce.catalog.salesChannel(sc)))\n\n return new DataLoader<string, SalesChannel>(loader)\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\nimport type { Options } from '../../../typings/globals'\n\nimport type { Clients } from '../clients'\nimport type {\n ShippingItem,\n Simulation,\n SimulationArgs,\n} from '../clients/commerce/types/Simulation'\n\n// Limits concurrent requests to the API per request cycle\nconst CONCURRENT_REQUESTS_MAX = 1\n\nexport const getSimulationLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (simulationArgs: readonly SimulationArgs[]) => {\n const allItems = simulationArgs.reduce((acc, { items }: SimulationArgs) => {\n return [...acc, items]\n }, [] as ShippingItem[][])\n\n const items = [...allItems.flat()]\n const simulation = await clients.commerce.checkout.simulation({\n country: simulationArgs[0].country,\n postalCode: simulationArgs[0].postalCode,\n items,\n })\n\n // Sort and filter simulation since Checkout API may return\n // items that we didn't ask for\n const simulated = simulation.items.reduce(\n (acc, item) => {\n const index = item.requestIndex\n\n if (typeof index === 'number' && index < acc.length) {\n acc[index] = item\n }\n\n return acc\n },\n Array(items.length).fill(null) as Simulation['items']\n )\n\n const itemsIndices = allItems.reduce(\n (acc, curr) => [...acc, curr.length + acc[acc.length - 1]],\n [0]\n )\n\n return allItems.map((__, index) => ({\n ...simulation,\n items: simulated\n .slice(itemsIndices[index], itemsIndices[index + 1])\n .filter((item) => Boolean(item)),\n }))\n }\n\n const limited = async (allItems: readonly SimulationArgs[]) =>\n limit(loader, allItems)\n\n return new DataLoader<SimulationArgs, Simulation>(limited, {\n maxBatchSize: 50,\n })\n}\n","import sanitizeHtmlLib from 'sanitize-html'\n\n/**\n * For now, we're using sanitize-html's default set\n * of allowed tags and attributes, which don't even include img elements\n *\n * It is known many client depends on pontentially vulnerable tags, such as script tags\n * We chose to be restrictive at first, and document those restrictions later.\n *\n * When expanding the set of allowed tags and attributes, please consider performance, privacy and security.\n *\n * This possibily breaks compatibility with Portal and Store Framework,\n * which both allows an enormous amount of tags and attributes\n *\n * This was a thoughtful decision that can be reviewed in the future given\n * research was made to back up those changes.\n */\nexport const sanitizeHtml = (\n dirty: Parameters<typeof sanitizeHtmlLib>[0],\n options?: Parameters<typeof sanitizeHtmlLib>[1]\n) => sanitizeHtmlLib(dirty, options)\n","import type { Product, Item } from '../clients/search/types/ProductSearchResult'\nimport { sanitizeHtml } from './sanitizeHtml'\n\nexport type EnhancedSku = Item & { isVariantOf: Product }\n\nfunction sanitizeProduct(product: Product): Product {\n return {\n ...product,\n description: product.description\n ? sanitizeHtml(product.description)\n : product.description,\n }\n}\n\nexport const enhanceSku = (item: Item, product: Product): EnhancedSku => ({\n ...item,\n isVariantOf: sanitizeProduct(product),\n})\n","import DataLoader from 'dataloader'\nimport type { Options } from '../../../typings/globals'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type { EnhancedSku } from '../utils/enhanceSku'\nimport { enhanceSku } from '../utils/enhanceSku'\n\nexport const getSkuLoader = ({ flags }: Options, clients: Clients) => {\n const loader = async (keys: readonly string[]) => {\n const skuIds = keys.map((key) => key.split('-')[0])\n const showInvisibleItems = keys.some(\n (key) => key.split('-')[1] === 'invisibleItems'\n )\n\n const products = await clients.search.productsByIdentifier({\n field: 'sku',\n values: skuIds,\n showInvisibleItems,\n ...(flags?.enableUnavailableItemsOnCart && {\n hideUnavailableItems: false,\n }),\n })\n\n const skuBySkuId = products.reduce(\n (acc, product) => {\n for (const sku of product.items) {\n acc[sku.itemId] = enhanceSku(sku, product)\n }\n\n return acc\n },\n {} as Record<string, EnhancedSku>\n )\n\n const skus = skuIds.map((skuId) => skuBySkuId[skuId])\n const missingSkus = skuIds.filter((skuId) => !skuBySkuId[skuId])\n\n if (missingSkus.length > 0) {\n throw new NotFoundError(\n `Search API did not found the following skus: ${missingSkus.join(',')}`\n )\n }\n\n return skus\n }\n\n return new DataLoader<string, EnhancedSku>(loader, {\n maxBatchSize: 99, // Max allowed batch size of Search API\n })\n}\n","import type { GraphqlContext } from '..'\nimport type { Options } from '../../../typings/globals'\nimport { getCollectionLoader } from './collection'\nimport { getSalesChannelLoader } from './salesChannel'\nimport { getSimulationLoader } from './simulation'\nimport { getSkuLoader } from './sku'\n\nexport type Loaders = ReturnType<typeof getLoaders>\n\nexport const getLoaders = (options: Options, ctx: GraphqlContext) => {\n const { clients } = ctx\n const skuLoader = getSkuLoader(options, clients)\n const simulationLoader = getSimulationLoader(options, clients)\n const collectionLoader = getCollectionLoader(options, clients)\n const salesChannelLoader = getSalesChannelLoader(options, clients)\n\n return {\n skuLoader,\n simulationLoader,\n collectionLoader,\n salesChannelLoader,\n }\n}\n","import type { CommertialOffer } from '../clients/search/types/ProductSearchResult'\n\nexport const inStock = (offer: Pick<CommertialOffer, 'AvailableQuantity'>) =>\n offer.AvailableQuantity > 0\n\nexport const price = (offer: Pick<CommertialOffer, 'spotPrice'>) =>\n offer.spotPrice ?? 0\nexport const sellingPrice = (offer: CommertialOffer) => offer.Price ?? 0\n\nexport const availability = (available: boolean) =>\n available ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'\n\n// Smallest Available Spot Price First\nexport const bestOfferFirst = (\n a: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>,\n b: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>\n) => {\n if (inStock(a) && !inStock(b)) {\n return -1\n }\n\n if (!inStock(a) && inStock(b)) {\n return 1\n }\n\n return price(a) - price(b)\n}\n\nexport const inStockOrderFormItem = (itemAvailability: string) =>\n itemAvailability === 'available'\n","export const withTax = (price: number, tax = 0, unitMultiplier = 1) => {\n const unitTax = tax / unitMultiplier\n\n return Math.round((price + unitTax) * 100) / 100\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { inStock, price } from '../utils/productStock'\nimport { withTax } from '../utils/taxes'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.offers>>\n\nconst getHighPrice = (\n offers: Root,\n options: { includeTaxes: boolean } = { includeTaxes: false }\n) => {\n const availableOffers = offers.filter(inStock)\n const highOffer = availableOffers[availableOffers.length - 1]\n const highPrice = highOffer ? price(highOffer) : 0\n if (!options.includeTaxes) {\n return highPrice\n }\n\n return withTax(highPrice, highOffer?.Tax, highOffer?.product?.unitMultiplier)\n}\n\nconst getLowPrice = (\n offers: Root,\n options: { includeTaxes: boolean } = { includeTaxes: false }\n) => {\n const [lowOffer] = offers.filter(inStock)\n\n const lowPrice = lowOffer ? price(lowOffer) : 0\n\n if (!options.includeTaxes) {\n return lowPrice\n }\n\n return withTax(lowPrice, lowOffer?.Tax, lowOffer?.product?.unitMultiplier)\n}\n\nexport const StoreAggregateOffer: Record<string, GraphqlResolver<Root>> & {\n offers: GraphqlResolver<Root, any, Root>\n} = {\n highPrice: (offers) => getHighPrice(offers),\n lowPrice: (offers) => getLowPrice(offers),\n lowPriceWithTaxes: (offers) => getLowPrice(offers, { includeTaxes: true }),\n offerCount: (offers) => offers.length,\n priceCurrency: async (_, __, ctx) => {\n const {\n loaders: { salesChannelLoader },\n storage: { channel },\n } = ctx\n\n const sc = await salesChannelLoader.load(channel.salesChannel)\n\n return sc.CurrencyCode ?? ''\n },\n offers: (offers) => offers,\n}\n","import type { GraphqlResolver } from '..'\n\n// TODO: Add a review system integration\nexport const StoreAggregateRating: Record<string, GraphqlResolver> = {\n ratingValue: () => 5,\n reviewCount: () => 0,\n}\n","/**\n * VTEX catalog slugify function\n *\n * Copied from:\n * https://github.com/vtex/rewriter/blob/1ce2010783e0586cab42534ce2fb7a983d8a3a84/node/clients/catalog.ts#L72\n *\n * Sometimes, we need to slugify strings for creating urls. An example is the\n * brand urls, where we create them from the brand's name.\n * This slugify function should match exactly what VTEX catalog generates. Any mismatch\n * will lead to broken links.\n * Hopefully, we had this function implemented on VTEX IO and we've been using it for\n * years now. However, looking at the code, I think we can save lots of computing. I'm\n * in a hurry for doing these tests now, so I'll leave a small TODO.\n *\n * TODO: Research for better ways of computing this slugify function. Things I'd try are:\n * - Join those 3 regexs for special characters into a single one.\n * - Replace the regexp of `removeDiacritics` function with a Map. We can make the complexity\n * of this function be O(n) with n=string.length\n *\n */\nconst from =\n 'ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a'\n\nconst to =\n 'AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa'\n\nconst removeDiacritics = (str: string) => {\n let newStr = str.slice(0)\n\n for (let i = 0; i < from.length; i++) {\n newStr = newStr.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i))\n }\n\n return newStr\n}\n\nconst slugifySpecialCharacters = (str: string) => {\n return str.replace(/[·/_,:]/, '-')\n}\n\nexport function slugify(str: string) {\n const noCommas = str.replace(/,/g, '')\n const replaced = noCommas.replace(/[*+~.()'\"!:@&\\[\\]`/ %$#?{}><=_^]/g, '-')\n const slugified = slugifySpecialCharacters(removeDiacritics(replaced))\n\n return slugified.toLowerCase()\n}\n","import type { GraphqlContext, GraphqlResolver } from '..'\nimport type { Brand } from '../clients/commerce/types/Brand'\nimport type { CategoryTree } from '../clients/commerce/types/CategoryTree'\nimport type { CollectionPageType } from '../clients/commerce/types/Portal'\nimport {\n isBrand,\n isCategory,\n isCollection,\n type ByLinkIdBrandRoot,\n type ByLinkIdCategoryRoot,\n type ByLinkIdCollectionRoot,\n} from '../loaders/collection'\nimport { getCatalogLocale, getLocalizationConfig } from '../utils/localization'\nimport { slugify } from '../utils/slugify'\n\ntype ByLinkIdRoot =\n | ByLinkIdCategoryRoot\n | ByLinkIdBrandRoot\n | ByLinkIdCollectionRoot\n\n/**\n * @deprecated Legacy pagetype-based shape. It is no longer produced at runtime\n * since the by-linkid migration and only remains in the public `Root` union to\n * avoid a breaking change for stores that still reference `StoreCollectionRoot`.\n *\n * TODO: remove in the next major of `@faststore/api` (drop from the `Root`\n * union below) — this is a breaking change and must ship with a BREAKING CHANGE note.\n */\nexport type LegacyStoreCollectionRoot =\n | Brand\n | (CategoryTree & { level: number })\n | CollectionPageType\n\n/**\n * Public `StoreCollectionRoot` type (re-exported from the package entrypoint).\n * Kept as a backward-compatible superset: the legacy members are retained\n * (see {@link LegacyStoreCollectionRoot}) so existing consumers keep compiling,\n * while `ByLinkIdRoot` reflects the real runtime shape.\n */\nexport type Root = ByLinkIdRoot | LegacyStoreCollectionRoot\n\n/**\n * Lowercases a catalog slug so one spelling is announced per locale.\n *\n * Merchants register linkIds in whatever casing they typed (\"Elettronica\",\n * \"Eletronicos\"), and by-linkid resolves any casing, so without this every\n * variant would be a legitimate URL advertising itself as canonical. Accents\n * are preserved: they are part of the registered slug, not a casing artifact.\n */\nconst canonicalizeSlug = (slug: string): string => slug.toLowerCase()\n\n/**\n * Loads the by-linkid entity for every level of a collection slug, so\n * \"vestuario/camisetas\" resolves both \"vestuario\" and \"vestuario/camisetas\".\n * The collectionLoader cache means a segment already fetched by another\n * resolver of the same request costs nothing here.\n */\nconst loadSegmentEntities = (\n ctx: GraphqlContext,\n slug: string\n): Promise<ByLinkIdRoot[]> => {\n const segments = slug.split('/').filter(Boolean)\n const {\n loaders: { collectionLoader },\n } = ctx\n\n return Promise.all(\n segments.map((_, index) =>\n collectionLoader.load({\n slug: segments.slice(0, index + 1).join('/'),\n locale: getCatalogLocale(ctx),\n })\n )\n )\n}\n\nconst slugifyRoot = (root: ByLinkIdRoot): string => {\n if (isCategory(root)) {\n // root.slug is the full accumulated input slug (e.g. \"vestuario/camisetas\"),\n // injected by the loader — no URL parsing needed.\n return root.slug\n }\n\n if (isBrand(root)) {\n return root.linkId\n }\n\n // collection — linkId may be null for clusters not yet registered in multilanguage\n return root.linkId ?? slugify(root.name)\n}\n\nexport const StoreCollection: Record<string, GraphqlResolver<ByLinkIdRoot>> = {\n id: ({ id }) => id.toString(),\n slug: (root) => slugifyRoot(root),\n seo: (root) => ({\n title: root.title ?? root.name,\n // pagetype.metaTagDescription and catalog `description` share the same\n // source (confirmed with Catalog). Prefer metaTagDescription when present\n // for forward-compat; fall back to description for by-linkid parity.\n description: root.metaTagDescription ?? root.description,\n }),\n type: (root) => {\n if (isBrand(root)) return 'Brand'\n // Clusters and curated collections share the collection/by-linkid endpoint,\n // whose response has no discriminator between them, so both report as\n // 'Collection'. The enum still declares 'Cluster' for backward compat.\n if (isCollection(root)) return 'Collection'\n // Department = root category (no parent); Category = everything else.\n // SubCategory distinction (3rd level+) requires recursive parent lookup — deferred.\n return root.fatherCategoryId === null ? 'Department' : 'Category'\n },\n meta: async (root, _, ctx) => {\n const slug = slugifyRoot(root)\n\n if (isBrand(root)) {\n return { selectedFacets: [{ key: 'brand', value: slug }] }\n }\n\n if (isCollection(root)) {\n return { selectedFacets: [{ key: 'productclusterids', value: root.id }] }\n }\n\n // For categories, IS expects the canonical (default-locale) slug in selectedFacets\n // regardless of which locale the current request uses. `linkId` carries the slug\n // registered for the *requested* locale, so it is the wrong one here whenever the\n // shopper is browsing anything but the default locale; availableLinkIds is keyed by\n // locale and gives us the default-locale slug directly.\n const { defaultLocale } = getLocalizationConfig(ctx)\n\n const entities = await loadSegmentEntities(ctx, slug)\n\n return {\n selectedFacets: entities.map((entity, index) => ({\n key: `category-${index + 1}`,\n value:\n (defaultLocale && entity.availableLinkIds?.[defaultLocale]) ||\n entity.linkId,\n })),\n }\n },\n breadcrumbList: async (root, _, ctx) => {\n const collections = await loadSegmentEntities(ctx, slugifyRoot(root))\n\n return {\n itemListElement: collections.map((collection, index) => ({\n item: `/${slugifyRoot(collection)}`,\n name: collection.name,\n position: index + 1,\n })),\n numberOfItems: collections.length,\n }\n },\n\n otherLocales: async (root, _, ctx) => {\n const localizationConfig = getLocalizationConfig(ctx)\n\n if (!localizationConfig.enabled) return null\n\n const configuredLocales = Object.keys(localizationConfig.locales ?? {})\n\n if (configuredLocales.length === 0) return null\n\n const slug = slugifyRoot(root)\n\n if (slug.split('/').filter(Boolean).length === 0) return null\n\n let entities: ByLinkIdRoot[]\n\n try {\n entities = await loadSegmentEntities(ctx, slug)\n } catch (err) {\n console.warn('[otherLocales] failed to load collection entities:', err)\n\n return null\n }\n\n return configuredLocales\n .map((configuredLocale) => {\n // Every locale, including the one being rendered, is read from\n // availableLinkIds, which holds registered translations only. by-linkid\n // resolves an untranslated segment by falling back to a slug that\n // exists in another locale, so trusting its `linkId` here would\n // advertise an alternate the target locale never registered and break\n // the reciprocity hreflang requires. The page still declares itself\n // canonical through `canonicalSlug`, which is free to fall back\n // precisely because it is not an hreflang annotation.\n const parts: string[] = []\n\n for (const entity of entities) {\n const linkId = entity.availableLinkIds?.[configuredLocale]\n\n if (!linkId) return null\n\n parts.push(linkId)\n }\n\n return parts.length > 0\n ? {\n locale: configuredLocale,\n slug: canonicalizeSlug(parts.join('/')),\n }\n : null\n })\n .filter((e): e is { locale: string; slug: string } => e !== null)\n },\n\n canonicalSlug: async (root, _, ctx) => {\n const slug = slugifyRoot(root)\n\n if (slug.split('/').filter(Boolean).length === 0) return null\n\n let entities: ByLinkIdRoot[]\n\n try {\n entities = await loadSegmentEntities(ctx, slug)\n } catch (err) {\n console.warn('[canonicalSlug] failed to load collection entities:', err)\n\n return null\n }\n\n const parts = entities.map((entity) => entity.linkId)\n\n // A segment with no linkId leaves nothing better than the visited slug to\n // announce, so the page keeps describing itself by the path it was reached\n // through.\n return parts.every((part): part is string => Boolean(part))\n ? canonicalizeSlug(parts.join('/'))\n : canonicalizeSlug(slug)\n },\n}\n","import type { Maybe } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport interface SelectedFacet {\n key: string\n value: string\n}\n\nexport interface CrossSellingFacet {\n key: keyof typeof FACET_CROSS_SELLING_MAP\n value: string\n}\n\nexport const FACET_CROSS_SELLING_MAP = {\n buy: 'whoboughtalsobought',\n view: 'whosawalsosaw',\n similars: 'similars',\n viewAndBought: 'whosawalsobought',\n accessories: 'accessories',\n suggestions: 'suggestions',\n} as const\n\nexport type FuzzyFacet = {\n key: 'fuzzy'\n value: '0' | '1' | 'auto'\n}\n\nexport type OperatorFacet = {\n key: 'operator'\n value: 'and' | 'or'\n}\n\n/**\n * Transform facets from the store to VTEX platform facets.\n * For instance, the channel in Store becomes trade-policy and regionId in VTEX's realm\n * */\nexport const transformSelectedFacet = ({ key, value }: SelectedFacet) => {\n switch (key) {\n case 'price': {\n return { key, value: value.replace('-to-', ':') }\n }\n\n case 'channel':\n case 'locale':\n case 'buy':\n case 'view':\n case 'similars':\n case 'viewAndBought':\n case 'accessories':\n case 'suggestions': {\n return [] // remove this facet from search\n }\n\n default:\n return { key, value }\n }\n}\n\nexport const parseRange = (range: string): [number, number] | null => {\n const splitted = range.split(':').map(Number)\n\n if (\n splitted.length !== 2 ||\n Number.isNaN(splitted[0]) ||\n Number.isNaN(splitted[1])\n ) {\n return null\n }\n\n return splitted as [number, number]\n}\n\nexport const isCrossSelling = (x: string): x is CrossSellingFacet['key'] =>\n typeof (FACET_CROSS_SELLING_MAP as Record<string, string>)[x] === 'string'\n\nexport const findCrossSelling = (facets?: Maybe<SelectedFacet[]>) => {\n const filtered = facets?.filter((x): x is CrossSellingFacet =>\n isCrossSelling(x.key)\n )\n\n if (Array.isArray(filtered) && filtered.length > 1) {\n throw new BadRequestError(\n `You passed ${filtered.length} cross selling facets but only one is allowed. Please leave one of the following facet: ${filtered.map((x) => x.key).join(',')}`\n )\n }\n\n return filtered?.[0] ?? null\n}\n\nexport const findSlug = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'slug')?.value ?? null\n\nexport const findSkuId = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'id')?.value ?? null\n\nexport const findLocale = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((x) => x.key === 'locale')?.value ?? null\n\nexport const findChannel = (facets?: Maybe<SelectedFacet[]>) =>\n facets?.find((facet) => facet.key === 'channel')?.value ?? null\n","/**\n * More info at: https://en.wikipedia.org/wiki/Order_statistic\n */\n\n// O(n) search to find the max of an array\nexport const min = <T>(array: T[], cmp: (a: T, b: T) => number) => {\n let best = 0\n\n for (let curr = 1; curr < array.length; curr++) {\n if (cmp(array[best], array[curr]) > 0) {\n best = curr\n }\n }\n\n return array[best]\n}\n","import type { GraphqlResolver } from '..'\nimport type {\n Facet,\n FacetValueBoolean,\n FacetValueRange,\n} from '../clients/search/types/FacetSearchResult'\nimport { parseRange } from '../utils/facets'\nimport { min } from '../utils/orderStatistics'\n\nexport type Root = Facet\n\nexport const StoreFacet: Record<string, GraphqlResolver<Root>> = {\n __resolveType: ({ type, values }) => {\n if (type !== 'TEXT' && type !== 'DELIVERY') {\n return 'StoreFacetRange'\n }\n\n if (!values || values.length === 0) {\n return 'StoreFacetBoolean'\n }\n\n if (values.every((value) => (value as FacetValueRange).range)) {\n return 'StoreFacetRange'\n }\n\n return 'StoreFacetBoolean'\n },\n}\n\nexport const StoreFacetBoolean: Record<\n string,\n GraphqlResolver<Facet<FacetValueBoolean>>\n> = {\n key: ({ key }) => key,\n label: ({ name }) => name,\n values: ({ values }) => values.sort((a, b) => a.name.localeCompare(b.name)),\n}\n\nexport const StoreFacetRange: Record<\n string,\n GraphqlResolver<Facet<FacetValueRange>>\n> = {\n key: ({ key }) => key,\n label: ({ name }) => name,\n min: ({ values, key }, _, { storage: { searchArgs } }) => {\n /**\n * Fetch the selected range the user queried.\n *\n * This is necessary because, differently from boolean facets, Search API does\n * not return the selected values, making us have to implement it in here\n */\n const selectedRange = parseRange(\n searchArgs?.selectedFacets?.find((facet) => facet.key === key)?.value ??\n ''\n )\n\n const facet = min(values, (a, b) => a.range.from - b.range.from)\n const globalMin = facet?.range?.from ?? 0\n\n return {\n selected: selectedRange?.[0] ?? globalMin,\n absolute: globalMin,\n }\n },\n max: ({ values, key }, _, { storage: { searchArgs } }) => {\n /**\n * Fetch the selected range the user queried.\n *\n * This is necessary because, differently from boolean facets, Search API does\n * not return the selected values, making us have to implement it in here\n */\n const selectedRange = parseRange(\n searchArgs?.selectedFacets?.find((facet) => facet.key === key)?.value ??\n ''\n )\n\n const facet = min(values, (a, b) => b.range.to - a.range.to)\n const globalMax = facet?.range?.to ?? 0\n\n return {\n selected: selectedRange?.[1] ?? globalMax,\n absolute: globalMax,\n }\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { FacetValueBoolean } from '../clients/search/types/FacetSearchResult'\n\nexport const StoreFacetValueBoolean: Record<\n string,\n GraphqlResolver<FacetValueBoolean>\n> = {\n value: ({ value }) => value,\n label: ({ name }) => name || 'unknown',\n selected: ({ selected }) => selected,\n quantity: ({ quantity }) => quantity,\n}\n","import type { GraphqlContext } from '..'\nimport type {\n MutationCancelOrderArgs,\n UserOrderCancel,\n} from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const cancelOrder = async (\n _: any,\n { data }: MutationCancelOrderArgs,\n { clients: { commerce } }: GraphqlContext\n): Promise<UserOrderCancel | null> => {\n if (!data?.orderId) {\n throw new BadRequestError('Missing orderId')\n }\n\n const response = await commerce.checkout.cancelOrder(data)\n return { data: response?.data }\n}\n","import type {\n CommercialAuthorizationResponse,\n ProcessOrderAuthorizationRule,\n} from '../../../__generated__/schema'\n\n/**\n * Extracts the first pending rule for authorization where the user is the next authorizer.\n * Returns null if no such rule exists or if the commercial authorization is not pending.\n */\nexport function extractRuleForAuthorization(\n commercialAuth: CommercialAuthorizationResponse | null | undefined\n): ProcessOrderAuthorizationRule | null {\n if (!commercialAuth || commercialAuth.status !== 'pending') {\n return null\n }\n\n for (const dimension of commercialAuth.dimensionStatus) {\n if (dimension.status !== 'pending') {\n continue\n }\n\n const pendingRule = dimension.ruleCollection.find(\n (rule) => rule.status === 'pending' && rule.isUserNextAuthorizer\n )\n\n if (pendingRule) {\n return {\n rule: pendingRule,\n orderAuthorizationId: commercialAuth.id,\n dimensionId: dimension.id,\n }\n }\n }\n\n return null\n}\n\n/**\n * Checks if there are pending rules for other authorizers in the commercial authorization.\n * Returns true if all pending rules are not for the current user (i.e., the user is not the next authorizer).\n */\nexport function isPendingForOtherAuthorizer(\n commercialAuth: CommercialAuthorizationResponse | null | undefined\n): boolean {\n if (!commercialAuth || commercialAuth.status !== 'pending') return false\n\n const pendingRules = commercialAuth.dimensionStatus\n .filter((dimension) => dimension.status === 'pending')\n .flatMap((dimension) => dimension.ruleCollection)\n .filter((rule) => rule.status === 'pending')\n\n if (pendingRules.length === 0) return false\n\n return pendingRules.every((rule) => !rule.isUserNextAuthorizer)\n}\n","import type { GraphqlContext } from '..'\nimport type {\n IProcessOrderAuthorization,\n ProcessOrderAuthorizationResponse,\n} from '../../../__generated__/schema'\nimport {\n extractRuleForAuthorization,\n isPendingForOtherAuthorizer,\n} from '../utils/commercialAuth'\n\nexport const processOrderAuthorization = async (\n _: any,\n { data }: { data: IProcessOrderAuthorization },\n { clients: { commerce } }: GraphqlContext\n): Promise<ProcessOrderAuthorizationResponse | null> => {\n // Process the authorization\n const commercialAuth = await commerce.oms.processOrderAuthorization(data)\n\n // Extract pending authorization for current user\n const ruleForAuthorization = extractRuleForAuthorization(commercialAuth)\n\n // Check if there are pending authorizations for other users\n const isPendingForOther =\n !ruleForAuthorization && isPendingForOtherAuthorizer(commercialAuth)\n\n return {\n isPendingForOtherAuthorizer: isPendingForOther,\n ruleForAuthorization,\n }\n}\n","import type { GraphqlContext } from '..'\nimport type { MutationStartOrderEntryOperationArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const startOrderEntryOperation = async (\n _: unknown,\n { data }: MutationStartOrderEntryOperationArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!data?.objectKey) {\n throw new BadRequestError('Missing objectKey')\n }\n\n const orderFormId =\n data.orderFormId ||\n (await commerce.orderEntry.createOrderForm()).orderFormId\n\n return commerce.orderEntry.startOperation({\n objectKey: data.objectKey,\n orderFormId,\n sessionToken: data.sessionToken ?? undefined,\n })\n}\n","import type { GraphqlContext } from '../index'\n\n/**\n * Starts (or updates) the anonymous personalization session for the current\n * shopper via the Recommendations BFF.\n *\n * The BFF replies with the `vtex-rec-user-id`/`vtex-rec-user-start-session`\n * Set-Cookie headers, which the client forwards to the browser through\n * `ctx.storage.cookies`. Returns `true` once the session has been started.\n */\nexport const startRecommendationSession = async (\n _: unknown,\n __: unknown,\n ctx: GraphqlContext\n) => {\n const result =\n await ctx.clients.commerce.recommendation.startRecommendationSession()\n\n // The BFF may not be ready on the first call and can resolve without a\n // session payload. Only report success once a session actually exists (its\n // `recommendationsUserId`); otherwise surface an error so the caller retries\n // instead of treating an empty response as a started session.\n if (!result?.recommendationsUserId) {\n throw new Error(\n 'Failed to start recommendation session: no session data returned'\n )\n }\n\n return true\n}\n","import type { GraphqlContext } from '..'\nimport type {\n MutationSubscribeToNewsletterArgs,\n PersonNewsletter,\n} from '../../../__generated__/schema'\n\nexport const subscribeToNewsletter = async (\n _: any,\n { data }: MutationSubscribeToNewsletterArgs,\n { clients: { commerce } }: GraphqlContext\n): Promise<PersonNewsletter | null> => {\n const response = await commerce.subscribeToNewsletter(data)\n return { id: response?.Id }\n}\n","import type { GraphqlContext } from '..'\nimport type { MutationUploadFileToOrderEntryArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const uploadFileToOrderEntry = async (\n _: unknown,\n { data }: MutationUploadFileToOrderEntryArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n const { fileContent, fileName, mimeType } = data\n\n if (!fileContent || !fileName || !mimeType) {\n throw new BadRequestError(\n 'Missing required fields: fileContent, fileName, mimeType'\n )\n }\n\n const normalized = fileContent.replaceAll(/\\s/g, '')\n\n const MAX_FILE_BYTES = 5 * 1024 * 1024\n const estimatedBytes = Math.floor((normalized.length * 3) / 4)\n\n if (estimatedBytes > MAX_FILE_BYTES) {\n throw new BadRequestError('File exceeds maximum allowed size of 5MB')\n }\n\n const isValidBase64 =\n /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(\n normalized\n )\n\n if (!isValidBase64) {\n throw new BadRequestError('Invalid Base64 fileContent')\n }\n\n const fileBuffer = Buffer.from(normalized, 'base64')\n\n const result = await commerce.orderEntry.uploadFile({\n fileBuffer,\n fileName,\n mimeType,\n })\n\n return result\n}\n","export interface Channel {\n seller?: string\n regionId?: string\n salesChannel?: string\n hasOnlyDefaultSalesChannel?: boolean\n}\n\nexport default class ChannelMarshal {\n public static parse(channelString: string): Required<Channel> {\n try {\n const parsedChannel = JSON.parse(channelString) as Channel\n\n return {\n seller: parsedChannel.seller ?? '',\n regionId: parsedChannel.regionId ?? '',\n salesChannel: parsedChannel.salesChannel ?? '',\n hasOnlyDefaultSalesChannel:\n parsedChannel.hasOnlyDefaultSalesChannel ?? true,\n }\n } catch (error) {\n console.error(error)\n\n throw new Error('Malformed channel string')\n }\n }\n\n public static stringify(channel: Channel): string {\n return JSON.stringify(channel)\n }\n}\n","import type { Channel } from './channel'\nimport ChannelMarshal from './channel'\n\n/**\n * When session SC and orderForm SC diverge, keep Checkout on the orderForm\n * trade policy. Used after external cart changes (stale etag / Quick Order) and\n * on later validations while the browser session still lags.\n *\n * Forcing the session SC (refetch / item updates with `sc=session`) would drop\n * items that exist only on the orderForm's sales channel.\n */\nexport function channelWhenSessionDivergesFromOrderForm(\n currentChannel: Required<Channel>,\n orderFormSalesChannel: string | null | undefined\n): string | null {\n if (orderFormSalesChannel == null || orderFormSalesChannel === '') {\n return null\n }\n\n if (\n String(orderFormSalesChannel) === String(currentChannel.salesChannel ?? '')\n ) {\n return null\n }\n\n return ChannelMarshal.stringify({\n ...currentChannel,\n salesChannel: String(orderFormSalesChannel),\n hasOnlyDefaultSalesChannel: false,\n })\n}\n","import type { GraphqlContext } from '..'\nimport ChannelMarshal from './channel'\n\nexport const mutateChannelContext = (\n ctx: GraphqlContext,\n channelString: string\n) => {\n ctx.storage.channel = ChannelMarshal.parse(channelString)\n}\n\nexport const mutateLocaleContext = (ctx: GraphqlContext, locale: string) => {\n ctx.storage.locale = locale\n}\n","import crypto from 'node:crypto'\n\nexport const md5 = (payload: string) =>\n crypto.createHash('md5').update(payload).digest('hex')\n","import type { IStorePropertyValue } from '../../../__generated__/schema'\nimport type { Attachment } from '../clients/commerce/types/OrderForm'\nimport type { Attribute } from '../clients/search/types/ProductSearchResult'\nimport { md5 } from './md5'\n\nexport const VALUE_REFERENCES = {\n attachment: 'ATTACHMENT',\n specification: 'SPECIFICATION',\n attribute: 'ATTRIBUTE',\n} as const\n\nexport function attachmentToPropertyValue(attachment: Attachment) {\n return {\n name: attachment.name,\n value: attachment.content,\n valueReference: VALUE_REFERENCES.attachment,\n }\n}\n\nexport function attributeToPropertyValue(attribute: Attribute) {\n return {\n propertyID: attribute.id,\n name: attribute.name,\n value: attribute.value,\n valueReference: {\n valueReference: VALUE_REFERENCES.attribute,\n visible: attribute.visible,\n },\n }\n}\n\nexport function getPropertyId(item: IStorePropertyValue) {\n return md5(\n `${item.name}:${JSON.stringify(item.value)}:${item.valueReference}`\n )\n}\n","import type { IStoreSession } from '../../../__generated__/schema'\nimport type { SelectedAddress } from '../clients/commerce/types/ShippingData'\n\nexport const createNewAddress = (session: IStoreSession) => {\n const postalCode = session.postalCode\n const geoCoordinates = session.geoCoordinates\n\n // If the address from the session has changed and it do not exist we will create the new one\n const addressSession: SelectedAddress = {\n addressType: session.addressType || null,\n postalCode: postalCode || null,\n city: null,\n state: null,\n country: session.country || null,\n street: null,\n number: null,\n neighborhood: null,\n complement: null,\n reference: null,\n geoCoordinates: [],\n }\n\n if (geoCoordinates) {\n const latitude =\n typeof geoCoordinates === 'object' && 'latitude' in geoCoordinates\n ? geoCoordinates.latitude\n : null\n const longitude =\n typeof geoCoordinates === 'object' && 'longitude' in geoCoordinates\n ? geoCoordinates.longitude\n : null\n addressSession.geoCoordinates =\n latitude !== null && longitude !== null ? [longitude, latitude] : []\n }\n\n return [addressSession]\n}\n","import type { IStoreSession } from '../../../__generated__/schema'\nimport type { OrderForm } from '../clients/commerce/types/OrderForm'\n\nexport const getAddressOrderForm = (\n orderForm: OrderForm,\n session: IStoreSession,\n addressChanged: boolean\n) => {\n const postalCode = session.postalCode\n const geoCoordinates = session.geoCoordinates\n const availableAddresses = orderForm?.shippingData?.availableAddresses ?? []\n const selectedAddresses = orderForm?.shippingData?.selectedAddresses ?? []\n // Validate if no change for the address was made and the deliveryMode has changed we can return the address from the orderForm\n if (!addressChanged && selectedAddresses.length > 0) {\n return [selectedAddresses[0]]\n }\n\n // Validate if the address from the session already exists at the availableAddresses from the OrderForm to avoid duplication\n if (addressChanged && availableAddresses.length > 0) {\n for (const address of availableAddresses) {\n if (postalCode && geoCoordinates) {\n const addressMatcher =\n address.postalCode === postalCode ||\n (address.geoCoordinates[0] === geoCoordinates.longitude &&\n address.geoCoordinates[1] === geoCoordinates.latitude)\n if (addressMatcher) {\n return [address]\n }\n }\n if (postalCode && !geoCoordinates) {\n const addressMatcher = address.postalCode === postalCode\n if (addressMatcher) {\n return [address]\n }\n }\n if (geoCoordinates && !postalCode) {\n const addressMatcher =\n address.geoCoordinates[0] === geoCoordinates.longitude &&\n address.geoCoordinates[1] === geoCoordinates.latitude\n if (addressMatcher) {\n return [address]\n }\n }\n }\n }\n\n return null\n}\n","import type {\n IStoreGeoCoordinates,\n IStoreSession,\n} from '../../../__generated__/schema'\nimport type {\n CheckoutAddress,\n OrderForm,\n LogisticsInfo,\n} from '../clients/commerce/types/OrderForm'\n\nexport const shouldUpdateShippingData = (\n orderForm: OrderForm,\n session: IStoreSession\n) => {\n if (!hasSessionPostalCodeOrGeoCoordinates(session)) {\n return { updateShipping: false, addressChanged: false }\n }\n\n if (!hasItems(orderForm)) {\n return { updateShipping: false, addressChanged: false }\n }\n\n const [selectedAddress] = orderForm?.shippingData?.selectedAddresses ?? []\n if (\n checkPostalCode(selectedAddress, session.postalCode) ||\n checkGeoCoordinates(selectedAddress, session.geoCoordinates) ||\n checkAddressType(selectedAddress, session.addressType)\n ) {\n return { updateShipping: true, addressChanged: true }\n }\n\n // The logisticsInfo will always exist if there´s at least one item inside the cart\n const { logisticsInfo } = orderForm.shippingData!\n\n if (shouldUpdateDeliveryInfo(logisticsInfo, session)) {\n return { updateShipping: true, addressChanged: false }\n }\n return { updateShipping: false, addressChanged: false }\n}\n\n// Validate if theres any postal Code or GeoCoordinates set at the session\nconst hasSessionPostalCodeOrGeoCoordinates = (session: IStoreSession) => {\n return (\n !!session.postalCode ||\n (session.geoCoordinates?.latitude && session.geoCoordinates?.longitude)\n )\n}\n\n// Validate if theres a difference between the session postal code and orderForm postal code\nconst checkPostalCode = (\n address: CheckoutAddress | null,\n postalCode: string | null | undefined\n) => {\n return typeof postalCode === 'string' && address?.postalCode !== postalCode\n}\n\n// Validate if theres a difference between the session geoCoords and orderForm geoCoords\nconst checkGeoCoordinates = (\n address: CheckoutAddress | null,\n geoCoordinates: IStoreGeoCoordinates | null | undefined\n) => {\n return (\n typeof geoCoordinates?.latitude === 'number' &&\n typeof geoCoordinates?.longitude === 'number' &&\n (address?.geoCoordinates[0] !== geoCoordinates?.longitude ||\n address?.geoCoordinates[1] !== geoCoordinates?.latitude)\n )\n}\n\nconst checkAddressType = (\n address: CheckoutAddress | null,\n addressType: string | null | undefined\n) => {\n return typeof addressType === 'string' && address?.addressType !== addressType\n}\n\n// Validate if theres any item inside the orderForm\nconst hasItems = (orderForm: OrderForm) => {\n return orderForm.items.length !== 0\n}\n\nconst shouldUpdateDeliveryInfo = (\n logisticsInfo: LogisticsInfo[],\n session: IStoreSession | null\n) => {\n const deliveryChannel = session?.deliveryMode?.deliveryChannel\n const deliveryMethod = session?.deliveryMode?.deliveryMethod\n const { startDate, endDate } = session?.deliveryMode?.deliveryWindow || {}\n\n return logisticsInfo.some(\n ({ selectedDeliveryChannel, selectedSla, slas }) => {\n const checkDeliveryChannel =\n deliveryChannel && selectedDeliveryChannel !== deliveryChannel\n const checkDeliveryMethod =\n deliveryMethod && selectedSla !== deliveryMethod\n\n return slas?.some((sla) => {\n if (\n (checkDeliveryChannel && sla.deliveryChannel === deliveryChannel) ||\n (checkDeliveryMethod && sla.id === deliveryMethod)\n ) {\n return true\n }\n return (\n startDate &&\n endDate &&\n sla.deliveryChannel === deliveryChannel &&\n sla.id === deliveryMethod &&\n (!sla?.deliveryWindow ||\n sla?.deliveryWindow?.startDateUtc !== startDate ||\n sla?.deliveryWindow?.endDateUtc !== endDate) &&\n sla.availableDeliveryWindows?.some(\n (window) =>\n window?.startDateUtc === startDate &&\n window?.endDateUtc === endDate\n )\n )\n })\n }\n )\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport { parse } from 'cookie'\nimport { channelWhenSessionDivergesFromOrderForm } from '../utils/cartSalesChannel'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { md5 } from '../utils/md5'\nimport {\n attachmentToPropertyValue,\n getPropertyId,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\n\nimport type { GraphqlContext } from '..'\nimport type {\n IStoreOffer,\n IStoreOrder,\n IStorePropertyValue,\n IStoreSession,\n Maybe,\n MutationValidateCartArgs,\n} from '../../../__generated__/schema'\nimport type {\n OrderForm,\n OrderFormInputItem,\n OrderFormItem,\n} from '../clients/commerce/types/OrderForm'\nimport type { SelectedAddress } from '../clients/commerce/types/ShippingData'\nimport { createNewAddress } from '../utils/createNewAddress'\nimport { getAddressOrderForm } from '../utils/getAddressOrderForm'\nimport { shouldUpdateShippingData } from '../utils/shouldUpdateShippingData'\nimport { parseJwt } from '../utils/cookies'\nimport type { SessionJwt } from '../clients/commerce/types/Session'\n\ntype Indexed<T> = T & { index?: number }\n\nconst isAttachment = (value: IStorePropertyValue) =>\n value.valueReference === VALUE_REFERENCES.attachment\n\nconst getId = (item: IStoreOffer) =>\n [\n item.itemOffered.sku,\n item.seller.identifier,\n item.price < 0.01 ? 'Gift' : undefined,\n item.itemOffered.additionalProperty\n ?.filter(isAttachment)\n .map(getPropertyId)\n .join('-'),\n ]\n .filter(Boolean)\n .join('::')\n\nconst orderFormItemToOffer = (\n item: OrderFormItem,\n index?: number\n): Indexed<IStoreOffer> => ({\n listPrice: item.listPrice / 100,\n price: item.sellingPrice / 100,\n quantity: item.quantity,\n seller: { identifier: item.seller },\n itemOffered: {\n sku: item.id,\n image: [],\n name: item.name,\n additionalProperty: item.attachments.map(attachmentToPropertyValue),\n },\n index,\n})\n\nconst offerToOrderItemInput = (\n offer: Indexed<IStoreOffer>\n): OrderFormInputItem => ({\n quantity: offer.quantity,\n seller: offer.seller.identifier,\n id: offer.itemOffered.sku,\n index: offer.index,\n attachments: (\n offer.itemOffered.additionalProperty?.filter(isAttachment) ?? []\n ).map((attachment) => ({\n name: attachment.name,\n content: attachment.value,\n })),\n ...(offer.priceToken ? { priceToken: offer.priceToken } : {}),\n})\n\nconst groupById = (offers: IStoreOffer[]): Map<string, IStoreOffer[]> =>\n offers.reduce((acc, item) => {\n const id = getId(item)\n\n if (!acc.has(id)) {\n acc.set(id, [])\n }\n\n acc.get(id)?.push(item)\n\n return acc\n }, new Map<string, IStoreOffer[]>())\n\nconst equals = (storeOrder: IStoreOrder, orderForm: OrderForm) => {\n // Omit priceToken: it exists on the browser payload but not on orderForm items.\n const pick = (\n { priceToken: _, ...item }: Indexed<IStoreOffer>,\n index: number\n ) => ({\n ...item,\n itemOffered: {\n sku: item.itemOffered.sku,\n },\n index,\n })\n\n const orderFormItems = orderForm.items.map(orderFormItemToOffer).map(pick)\n const storeOrderItems = storeOrder.acceptedOffer.map(pick)\n\n const isSameOrder = storeOrder.orderNumber === orderForm.orderFormId\n const orderItemsAreSync = deepEquals(orderFormItems, storeOrderItems)\n\n return isSameOrder && orderItemsAreSync\n}\n\nfunction hasChildItem(items: OrderFormItem[], itemId: string) {\n return items?.some(\n (item) =>\n item.parentItemIndex !== null &&\n item.parentItemIndex !== undefined &&\n items[item.parentItemIndex]?.id === itemId\n )\n}\n\nfunction hasParentItem(items: OrderFormItem[], itemId: string) {\n return items?.some(\n (item) => item.id === itemId && item.parentItemIndex !== null\n )\n}\n\nconst joinItems = (form: OrderForm) => {\n const itemsById = form.items.reduce(\n (acc, item, idx) => {\n const id =\n hasParentItem(form.items, item.id) || hasChildItem(form.items, item.id)\n ? `${getId(orderFormItemToOffer(item))}::${idx}`\n : getId(orderFormItemToOffer(item))\n\n if (!acc[id]) {\n acc[id] = []\n }\n\n acc[id].push(item)\n\n return acc\n },\n {} as Record<string, OrderFormItem[]>\n )\n\n return {\n ...form,\n items: Object.values(itemsById).map((items) => {\n const [item] = items\n const quantity = items.reduce((acc, i) => acc + i.quantity, 0)\n const totalPrice = items.reduce(\n (acc, i) =>\n acc +\n (i?.priceDefinition?.total ??\n (i?.quantity ?? 0) * (i?.sellingPrice ?? 0)),\n 0\n )\n\n return {\n ...item,\n quantity,\n sellingPrice: totalPrice / quantity,\n }\n }),\n }\n}\n\nconst orderFormToCart = async (\n form: OrderForm,\n skuLoader: GraphqlContext['loaders']['skuLoader'],\n shouldSplitItem?: boolean | null,\n adoptedSalesChannel?: string | null\n) => {\n return {\n order: {\n orderNumber: form.orderFormId,\n acceptedOffer: form.items.map(async (item) => ({\n ...item,\n product: await skuLoader.load(`${item.id}-invisibleItems`),\n })),\n shouldSplitItem,\n ...(adoptedSalesChannel ? { salesChannel: adoptedSalesChannel } : {}),\n },\n messages: form.messages.map(({ text, status }) => ({\n text,\n status: status.toUpperCase(),\n })),\n }\n}\n\nconst getOrderFormEtag = ({ items }: OrderForm, sessionJwt: SessionJwt) => {\n // Only include critical item properties in etag to avoid false positives\n // when prices or availability change due to regionalization\n\n // Include:\n // - id (SKU): to detect item additions/removals\n // - quantity: to detect quantity changes\n // - seller: to detect seller changes\n // - attachments: to detect customizations/personalizations changes\n const criticalItems = items.map((item) => ({\n id: item.id,\n quantity: item.quantity,\n seller: item.seller,\n attachments: item.attachments, // customizations\n }))\n\n return md5(\n JSON.stringify({ sessionId: sessionJwt?.id ?? '', items: criticalItems })\n )\n}\n\nconst setOrderFormEtag = async (\n form: OrderForm,\n commerce: GraphqlContext['clients']['commerce'],\n sessionJwt: SessionJwt\n) => {\n try {\n const orderForm = await commerce.checkout.setCustomData({\n id: form.orderFormId,\n appId: 'faststore',\n key: 'cartEtag',\n value: getOrderFormEtag(form, sessionJwt),\n })\n\n return orderForm\n } catch (err) {\n console.error(\n 'Error while setting custom data to orderForm.\\n Make sure to add the following custom app to the orderForm: \\n{\"fields\":[\"cartEtag\"],\"id\":\"faststore\",\"major\":1}.\\n More info at: https://developers.vtex.com/vtex-rest-api/docs/customizable-fields-with-checkout-api'\n )\n\n throw err\n }\n}\n\n/**\n * Checks if cartEtag stored on customData is up to date\n * @description If cartEtag is not up to date, this means that\n * another system changed the cart, like Checkout UI or Order Placed\n * or another device which has the same cart open with FastStore\n */\nconst isOrderFormStale = (form: OrderForm, sessionJwt: SessionJwt) => {\n const faststoreData = form.customData?.customApps.find(\n (app) => app.id === 'faststore'\n )\n\n const oldEtag = faststoreData?.fields?.cartEtag\n\n if (oldEtag == null) {\n return true\n }\n\n const newEtag = getOrderFormEtag(form, sessionJwt)\n\n return newEtag !== oldEtag\n}\n\nconst clearOrderFormMessages = async (\n id: string,\n { clients: { commerce } }: GraphqlContext\n) => {\n return commerce.checkout.clearOrderFormMessages({\n id,\n })\n}\n\nconst updateOrderFormShippingData = async (\n orderForm: OrderForm,\n session: Maybe<IStoreSession> | undefined,\n { clients: { commerce } }: GraphqlContext\n) => {\n // Stores that are not yet providing the session while validating the cart\n // should not be able to update the shipping data\n //\n // This was causing errors while validating regionalizated carts\n // because the following code was trying to change the shippingData to an undefined address/session\n\n if (!session) {\n return orderForm\n }\n\n const { updateShipping, addressChanged } = shouldUpdateShippingData(\n orderForm,\n session\n )\n\n if (updateShipping) {\n // Check if the orderForm address matches the one from the session\n const oldAddress = getAddressOrderForm(orderForm, session, addressChanged)\n\n const address = oldAddress ? oldAddress : createNewAddress(session)\n\n const selectedAddresses = address as SelectedAddress[]\n\n const hasDeliveryWindow = session.deliveryMode?.deliveryWindow\n ? true\n : false\n\n if (hasDeliveryWindow) {\n // if you have a Delivery Window you have to first get the delivery window to set the desired after\n await commerce.checkout.shippingData(\n {\n id: orderForm.orderFormId,\n index: orderForm.items.length,\n deliveryMode: session.deliveryMode,\n selectedAddresses: selectedAddresses,\n },\n false\n )\n }\n\n return commerce.checkout.shippingData(\n {\n id: orderForm.orderFormId,\n index: orderForm.items.length,\n deliveryMode: session.deliveryMode,\n selectedAddresses: selectedAddresses,\n },\n true\n )\n }\n return orderForm\n}\n\nconst getCookieCheckoutOrderNumber = (ctx: string, nameCookie: string) => {\n if (!ctx) {\n return ''\n }\n\n const cookies = parse(ctx)\n const cookieValue = cookies[nameCookie]\n return cookieValue ? cookieValue.split('=')[1] : ''\n}\n\n/** Keep Checkout on the orderForm SC when the browser session lags behind it. */\nconst adoptOrderFormSalesChannelWhenSessionDiverges = (\n ctx: GraphqlContext,\n orderForm: OrderForm\n): string | null => {\n const adoptedChannel = channelWhenSessionDivergesFromOrderForm(\n ctx.storage.channel,\n orderForm.salesChannel\n )\n\n if (adoptedChannel) {\n mutateChannelContext(ctx, adoptedChannel)\n return orderForm.salesChannel ? String(orderForm.salesChannel) : null\n }\n\n return null\n}\n\n/** Return a cart only when an SC was adopted (so the client can sync session). */\nconst cartWhenSalesChannelAdoptedOrNull = (\n form: OrderForm,\n skuLoader: GraphqlContext['loaders']['skuLoader'],\n shouldSplitItem: boolean | null | undefined,\n adoptedSalesChannel: string | null\n) => {\n if (!adoptedSalesChannel) {\n return null\n }\n\n return orderFormToCart(form, skuLoader, shouldSplitItem, adoptedSalesChannel)\n}\n\n/**\n * This resolver implements the optimistic cart behavior. The main idea in here\n * is that we receive a cart from the UI (as query params) and we validate it with\n * the commerce platform. If the cart is valid, we return null, if the cart is\n * invalid according to the commerce platform, we return the new cart the UI should use\n * instead.\n *\n * The algorithm is something like:\n * 1. Fetch orderForm from VTEX\n * 2. Compute delta changes between the orderForm and the UI's cart\n * 3. Update the orderForm in VTEX platform accordingly\n * 4. If any changes were made, send to the UI the new cart. Null otherwise\n */\nexport const validateCart = async (\n _: unknown,\n { cart: { order }, session }: MutationValidateCartArgs,\n ctx: GraphqlContext\n) => {\n const orderFormIdFromCookie = getCookieCheckoutOrderNumber(\n ctx.headers.cookie,\n 'checkout.vtex.com'\n )\n const {\n clients: { commerce },\n loaders: { skuLoader },\n } = ctx\n\n const channel = session?.channel\n const locale = session?.locale\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n // Step1: Get OrderForm from VTEX Commerce.\n // For existing carts (`orderFormId` present), omit `sc` on the first GET so\n // Checkout keeps the orderForm's current sales channel. Passing a stale\n // session SC (e.g. after Quick Order) would recalculate the cart and drop\n // items only available in the orderForm's trade policy. New carts still\n // send `sc` from the session (see commerce.checkout.orderForm).\n const orderFormId = orderFormIdFromCookie || undefined\n const orderForm = await commerce.checkout.orderForm({\n id: orderFormId,\n channel: ctx.storage.channel,\n preserveSalesChannel: Boolean(orderFormId),\n })\n const orderNumber = orderForm.orderFormId\n\n // Clear messages so it doesn't keep populating toasts on a loop\n // In the next validateCart mutation it will only have messages if a new message is created on orderForm\n if (orderForm.messages.length !== 0) {\n await clearOrderFormMessages(orderNumber, ctx)\n }\n\n const sessionCookie = parse(ctx?.headers?.cookie ?? '')?.vtex_session\n const sessionJwt = parseJwt(sessionCookie)\n\n const { acceptedOffer, shouldSplitItem } = order\n\n // Step1.5: Check if another system changed the orderForm with this orderNumber\n // If so, this means the user interacted with this cart elsewhere and expects\n // to see this new cart state instead of what's stored on the user's browser.\n const isStale = isOrderFormStale(orderForm, sessionJwt)\n\n if (isStale) {\n // Adopt the orderForm SC so subsequent checkout calls (etag, etc.) stay\n // on the trade policy that actually owns the items.\n const adoptedSalesChannel = adoptOrderFormSalesChannelWhenSessionDiverges(\n ctx,\n orderForm\n )\n\n const newOrderForm = await setOrderFormEtag(\n orderForm,\n commerce,\n sessionJwt\n ).then(joinItems)\n if (orderNumber) {\n return orderFormToCart(\n newOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n }\n\n // Keep Checkout on the orderForm trade policy when the browser session still\n // has a stale SC (Quick Order). Refetching with `sc=session` would wipe\n // items that exist only on the orderForm's sales channel.\n const adoptedSalesChannel = adoptOrderFormSalesChannelWhenSessionDiverges(\n ctx,\n orderForm\n )\n\n // Step2: Process items from both browser and checkout so they have the same shape\n const browserItemsById = groupById(acceptedOffer)\n const originItemsById = groupById(orderForm.items.map(orderFormItemToOffer))\n const originItems = Array.from(originItemsById.entries()) // items on the VTEX platform backend\n const browserItems = Array.from(browserItemsById.entries()) // items on the user's browser\n\n // Step3: Compute delta changes\n const { itemsToAdd, itemsToUpdate } = browserItems.reduce(\n (acc, [id, items]) => {\n const maybeOriginItem = originItemsById.get(id)\n\n // Adding new items to cart\n if (!maybeOriginItem) {\n items.forEach((item) => acc.itemsToAdd.push(item))\n\n return acc\n }\n\n // Update existing items\n const [head, ...tail] = maybeOriginItem\n\n if (\n hasParentItem(orderForm.items, head.itemOffered.sku) ||\n hasChildItem(orderForm.items, head.itemOffered.sku)\n ) {\n acc.itemsToUpdate.push(head)\n\n return acc\n }\n\n const totalQuantity = items.reduce((acc, curr) => acc + curr.quantity, 0)\n\n // set total quantity to first item\n acc.itemsToUpdate.push({\n ...head,\n quantity: totalQuantity,\n })\n\n // Remove all the rest\n tail.forEach((item) => acc.itemsToUpdate.push({ ...item, quantity: 0 }))\n\n return acc\n },\n {\n itemsToAdd: [] as IStoreOffer[],\n itemsToUpdate: [] as IStoreOffer[],\n }\n )\n\n const itemsToDelete = originItems\n .filter(([id]) => !browserItemsById.has(id))\n .flatMap(([, items]) => items.map((item) => ({ ...item, quantity: 0 })))\n\n const changes = [...itemsToAdd, ...itemsToUpdate, ...itemsToDelete].map(\n offerToOrderItemInput\n )\n\n // Check if shippingData needs to be updated\n const { updateShipping } = session\n ? shouldUpdateShippingData(orderForm, session)\n : { updateShipping: false }\n\n // If there are no item/shipping changes: still return the cart when we\n // adopted the orderForm SC so the client can align `fs::session`.\n if (changes.length === 0 && !updateShipping) {\n return cartWhenSalesChannelAdoptedOrNull(\n orderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n\n // Step4: Apply delta changes to order form\n let updatedOrderForm: OrderForm\n\n if (changes.length > 0) {\n // Update items first if there are changes\n updatedOrderForm = await commerce.checkout\n .updateOrderFormItems({\n id: orderForm.orderFormId,\n orderItems: changes,\n shouldSplitItem,\n })\n .then((form: OrderForm) =>\n updateOrderFormShippingData(form, session, ctx)\n )\n } else {\n // Only update shippingData if there are no item changes\n updatedOrderForm = await updateOrderFormShippingData(\n orderForm,\n session,\n ctx\n )\n }\n\n // Continue with marketingData, clientPreferencesData (locale), and etag updates.\n updatedOrderForm = await Promise.resolve(updatedOrderForm)\n // update marketingData\n .then((form: OrderForm) => {\n if (session?.marketingData) {\n const updatedMarketingData = {\n ...form.marketingData,\n ...session.marketingData,\n }\n\n return commerce.checkout.marketingData({\n id: orderForm.orderFormId,\n marketingData: updatedMarketingData,\n })\n }\n\n return form\n })\n\n // update session locale to orderForm clientPreferencesData when there are changes (same pattern as storePreferencesData)\n .then((form: OrderForm) => {\n if (locale && form.clientPreferencesData?.locale !== locale) {\n return commerce.checkout.clientPreferencesData({\n id: form.orderFormId,\n clientPreferencesData: {\n ...form.clientPreferencesData,\n locale,\n },\n })\n }\n return form\n })\n // update orderForm etag so we know last time we touched this orderForm\n .then((form: OrderForm) => setOrderFormEtag(form, commerce, sessionJwt))\n .then(joinItems)\n\n const equalMessages = deepEquals(\n orderForm.messages,\n updatedOrderForm.messages\n )\n\n // Step5: If no changes detected before/after updating orderForm, the order is validated\n if (equals(order, updatedOrderForm) && equalMessages) {\n return cartWhenSalesChannelAdoptedOrNull(\n updatedOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n }\n\n // Step6: There were changes, convert orderForm to StoreCart\n return orderFormToCart(\n updatedOrderForm,\n skuLoader,\n shouldSplitItem,\n adoptedSalesChannel\n )\n}\n","import type { Channel } from './channel'\nimport ChannelMarshal from './channel'\n\n/**\n * Builds the session `channel` string after Session Manager responds.\n *\n * When the client already pinned an explicit SC (e.g. adopted from the\n * orderForm after Quick Order), keep it. Session Manager often still reports\n * the default SC and would otherwise overwrite the adoption.\n */\nexport function channelAfterSessionManager(\n channel: Required<Channel>,\n storeChannelValue: string | null | undefined,\n regionId: string | null | undefined,\n sellerId: string | undefined\n): string {\n const hasExplicitSalesChannel = channel.hasOnlyDefaultSalesChannel === false\n\n const storeSalesChannel = storeChannelValue ?? undefined\n const resolvedRegionId = regionId ?? channel.regionId\n\n return ChannelMarshal.stringify({\n salesChannel: hasExplicitSalesChannel\n ? channel.salesChannel || storeSalesChannel\n : (storeSalesChannel ?? channel.salesChannel),\n regionId: resolvedRegionId ?? undefined,\n seller: sellerId,\n hasOnlyDefaultSalesChannel: hasExplicitSalesChannel\n ? false\n : !storeSalesChannel,\n })\n}\n","import type { ContractResponse } from '../clients/commerce/Contract'\nimport type {\n SessionAvailableContract,\n Shopper,\n} from '../clients/commerce/types/Session'\nimport type { AttachedContract } from '../clients/commerce/types/StoreFrontContracts'\n\ntype ProfileNameFields = {\n firstName?: { value?: string | null } | null\n lastName?: { value?: string | null } | null\n} | null\n\n/**\n * Display name from Master Data, aligned with buyer-portal `personalDataToContract`.\n */\nexport const resolveContractDisplayNameFromMd = (\n contract: ContractResponse | null | undefined\n): string => {\n const corporateName = (contract?.corporateName ?? '').trim()\n\n if (corporateName) {\n return corporateName\n }\n\n return (contract?.firstName ?? '').trim()\n}\n\nconst isSessionAvailableContract = (\n value: unknown\n): value is SessionAvailableContract => {\n if (!value || typeof value !== 'object') {\n return false\n }\n\n const contract = value as Record<string, unknown>\n\n return (\n typeof contract.customerId === 'string' &&\n contract.customerId.trim() !== '' &&\n typeof contract.contractName === 'string' &&\n typeof contract.isActive === 'boolean' &&\n typeof contract.isCurrent === 'boolean'\n )\n}\n\n/**\n * Parses VTEX session `shopper.availableContracts` into a typed list.\n */\nexport const parseSessionAvailableContracts = (\n shopper: Shopper | null | undefined\n): SessionAvailableContract[] => {\n const raw = shopper?.availableContracts?.value\n\n if (!Array.isArray(raw)) {\n return []\n }\n\n return raw.filter(isSessionAvailableContract)\n}\n\n/**\n * Whether a session contract is eligible for the switcher list.\n */\nexport const isSwitchableSessionContract = (\n contract: SessionAvailableContract | null | undefined\n): boolean => {\n if (!contract?.customerId) {\n return false\n }\n\n const name = (contract.contractName ?? '').trim()\n\n return Boolean(name && contract.isActive)\n}\n\n/**\n * Resolves the active contract id from VTEX session namespaces.\n */\nexport const resolveActiveContractIdFromSession = (\n sessionData: {\n namespaces?: {\n shopper?: Shopper | null\n authentication?: { customerId?: { value?: string | null } | null } | null\n profile?: { id?: { value?: string | null } | null } | null\n } | null\n } | null\n): string => {\n return (\n sessionData?.namespaces?.shopper?.activeContractId?.value?.trim() ??\n sessionData?.namespaces?.authentication?.customerId?.value?.trim() ??\n sessionData?.namespaces?.profile?.id?.value?.trim() ??\n ''\n )\n}\n\n/**\n * Unit default = explicit `isDefault` when the BFF sends one, else the first\n * attached contract (same rule as faststore-plugin-buyer-portal\n * `list-attached-contracts.service.ts`).\n *\n * `fetchAPI` returns unvalidated JSON, so only a real boolean `true` counts as\n * an explicit default — a truthy `'false'` string must fall through to the\n * BFF's ordering instead of hijacking the flag.\n */\nexport const resolveDefaultContractId = (\n attached: AttachedContract[] | null | undefined\n): string => {\n if (!Array.isArray(attached) || attached.length === 0) return ''\n const chosen =\n attached.find((contract) => contract?.isDefault === true) ?? attached[0]\n\n return String(chosen?.id ?? '').trim()\n}\n\n/**\n * Maps session contracts to GraphQL `StoreContract` entries.\n */\nexport const mapSessionContractsToStoreContracts = (\n contracts: SessionAvailableContract[],\n activeContractId = '',\n defaultContractId = ''\n): Array<{\n id: string\n corporateName: string\n isActive: boolean\n isDefault: boolean\n}> => {\n const normalizedActiveId = activeContractId.trim()\n const normalizedDefaultId = defaultContractId.trim()\n\n return contracts.filter(isSwitchableSessionContract).map((contract) => ({\n id: contract.customerId,\n corporateName: contract.contractName.trim(),\n isActive: normalizedActiveId\n ? contract.customerId === normalizedActiveId\n : contract.isCurrent,\n isDefault:\n normalizedDefaultId !== '' && contract.customerId === normalizedDefaultId,\n }))\n}\n\n/**\n * Whether a CL record is eligible for contract switcher summaries (attached list).\n */\nexport const isSwitchableContractSummary = (\n contract: ContractResponse | null | undefined\n): boolean => {\n if (!contract) {\n return false\n }\n\n const name = resolveContractDisplayNameFromMd(contract)\n const email = (contract.email ?? '').trim()\n\n return Boolean(name && email)\n}\n\n/**\n * Resolves the active contract name: Master Data first, then VTEX session profile.\n * Matches `accountProfile` / buyer-portal behavior when CL lookup fails.\n */\nexport const resolveActiveContractDisplayName = (\n contract: ContractResponse | null | undefined,\n profile: ProfileNameFields\n): string => {\n const fromMasterData = resolveContractDisplayNameFromMd(contract)\n\n if (fromMasterData) {\n return fromMasterData\n }\n\n return (profile?.firstName?.value ?? '').trim()\n}\n","import type { GraphqlContext } from '..'\nimport type {\n StoreMarketingData,\n StoreSession,\n} from '../../../__generated__/schema'\nimport type { Channel } from './channel'\nimport { resolveActiveContractDisplayName } from './contract'\nimport { getAuthCookie, parseJwt } from './cookies'\n\nexport async function getPreciseLocationData(\n clients: GraphqlContext['clients'],\n country: string,\n postalCode: string\n) {\n try {\n const address = await clients.commerce.checkout.address({\n postalCode,\n country,\n })\n\n const geoCoordinates = address.geoCoordinates\n ? {\n latitude: address.geoCoordinates[1],\n longitude: address.geoCoordinates[0],\n }\n : null\n\n return { city: address.city, geoCoordinates }\n } catch (err) {\n console.error(\n `Error while getting geo coordinates for the current postal code (${postalCode}) and country (${country}).\\n`\n )\n\n throw err\n }\n}\n\nexport function buildSessionSearchParams(\n search: string,\n channel: Required<Channel>,\n postalCode: string,\n country: string,\n geoCoordinates: StoreSession['geoCoordinates'],\n locale: string\n) {\n const params = new URLSearchParams(search)\n\n // Remove facets so they do not interfere with session data / vtex_segment\n if (params.has('facets')) {\n params.delete('facets')\n }\n\n params.set('sc', params.get('sc') ?? channel.salesChannel)\n\n if (postalCode) {\n params.set('postalCode', postalCode)\n }\n\n if (country) {\n params.set('country', country)\n }\n\n if (geoCoordinates) {\n params.set(\n 'geoCoordinates',\n `${geoCoordinates.longitude},${geoCoordinates.latitude}` // long,lat is the format expected\n )\n }\n\n // Sending the locale to the session, the store-session app will update cultureInfo\n params.set('locale', locale)\n\n return params\n}\n\nexport function buildMarketingData(\n params: URLSearchParams,\n oldMarketingData: StoreSession['marketingData']\n): StoreMarketingData {\n return {\n utmCampaign:\n params.get('utm_campaign') ?? oldMarketingData?.utmCampaign ?? '',\n utmMedium: params.get('utm_medium') ?? oldMarketingData?.utmMedium ?? '',\n utmSource: params.get('utm_source') ?? oldMarketingData?.utmSource ?? '',\n utmiCampaign: params.get('utmi_cp') ?? oldMarketingData?.utmiCampaign ?? '',\n utmiPage: params.get('utmi_p') ?? oldMarketingData?.utmiPage ?? '',\n utmiPart: params.get('utmi_pc') ?? oldMarketingData?.utmiPart ?? '',\n }\n}\n\nexport async function resolveJwtClaims(\n clients: GraphqlContext['clients'],\n cookie: string | undefined,\n account: string\n) {\n const jwt = parseJwt(getAuthCookie(cookie ?? '', account))\n let isValidJwt = false\n\n if (jwt) {\n try {\n const vtexIdResponse = await clients.commerce.vtexid.validate()\n isValidJwt = vtexIdResponse?.authStatus?.toLowerCase() === 'success'\n } catch (error) {\n console.warn('JWT validation failed:', error)\n isValidJwt = false\n }\n }\n\n return {\n isRepresentative: isValidJwt ? Boolean(jwt?.isRepresentative) : false,\n customerId: isValidJwt ? jwt?.customerId : undefined,\n unitId: isValidJwt ? jwt?.unitId : undefined,\n }\n}\n\nexport async function resolveSellerInRegion(\n clients: GraphqlContext['clients'],\n channel: Required<Channel>,\n postalCode: string,\n geoCoordinates: StoreSession['geoCoordinates'],\n country: string,\n salesChannel: string\n) {\n if (!channel.seller || !(postalCode || geoCoordinates)) {\n return undefined\n }\n\n const regionData = await clients.commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n\n return region?.sellers.find((seller) => channel.seller === seller.id)?.id\n}\n\nfunction shopperString(value: { value?: unknown } | null | undefined): string {\n return typeof value?.value === 'string' ? value.value : ''\n}\n\nexport function buildB2bSession(args: {\n isRepresentative: boolean\n authentication: {\n customerId?: { value?: string | null } | null\n unitName?: { value?: string | null } | null\n unitId?: { value?: string | null } | null\n storeUserEmail?: { value?: string | null } | null\n } | null\n shopper: {\n firstName?: { value?: unknown } | null\n lastName?: { value?: unknown } | null\n organizationManager?: { value?: boolean | null } | null\n } | null\n publicData: { postalCode?: { value?: string | null } | null } | null\n profile: Parameters<typeof resolveActiveContractDisplayName>[1]\n contract: Parameters<typeof resolveActiveContractDisplayName>[0]\n customerId?: string\n unitId?: string\n}) {\n if (!args.isRepresentative) {\n return null\n }\n\n const firstName = shopperString(args.shopper?.firstName)\n const lastName = shopperString(args.shopper?.lastName)\n\n return {\n isRepresentative: true,\n customerId: args.authentication?.customerId?.value ?? args.customerId ?? '',\n unitName: args.authentication?.unitName?.value ?? '',\n unitId: args.authentication?.unitId?.value ?? args.unitId ?? '',\n firstName,\n lastName,\n userName: `${firstName} ${lastName}`.trim(),\n userEmail: args.authentication?.storeUserEmail?.value ?? '',\n savedPostalCode: args.publicData?.postalCode?.value ?? '',\n contractName: resolveActiveContractDisplayName(args.contract, args.profile),\n organizationManager: args.shopper?.organizationManager?.value ?? false,\n }\n}\n\nexport function buildPersonFromProfile(\n profile: {\n id?: { value?: string | null } | null\n email?: { value?: string | null } | null\n firstName?: { value?: string | null } | null\n lastName?: { value?: string | null } | null\n } | null\n) {\n if (!profile?.id) {\n return null\n }\n\n return {\n id: profile.id?.value ?? '',\n email: profile.email?.value ?? '',\n givenName: profile.firstName?.value ?? '',\n familyName: profile.lastName?.value ?? '',\n }\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport type { GraphqlContext } from '..'\nimport type {\n MutationValidateSessionArgs,\n StoreSession,\n} from '../../../__generated__/schema'\nimport ChannelMarshal from '../utils/channel'\nimport { channelAfterSessionManager } from '../utils/sessionChannel'\nimport {\n buildB2bSession,\n buildMarketingData,\n buildPersonFromProfile,\n buildSessionSearchParams,\n getPreciseLocationData,\n resolveJwtClaims,\n resolveSellerInRegion,\n} from '../utils/validateSessionHelpers'\n\ntype SessionStoreNamespace = {\n channel?: { value?: string | null } | null\n currencyCode?: { value?: string | null } | null\n currencySymbol?: { value?: string | null } | null\n countryCode?: { value?: string | null } | null\n}\n\ntype SessionCheckoutNamespace = {\n regionId?: { value?: string | null } | null\n}\n\nexport const validateSession = async (\n _: any,\n { session: oldSession, search }: MutationValidateSessionArgs,\n { clients, headers, account }: GraphqlContext\n): Promise<StoreSession | null> => {\n const channel = ChannelMarshal.parse(oldSession.channel ?? '')\n const postalCode = String(oldSession.postalCode ?? '')\n const country = oldSession.country ?? ''\n let city = oldSession.city ?? null\n let geoCoordinates = oldSession.geoCoordinates ?? null\n\n const shouldGetPreciseLocation = !city || !geoCoordinates\n if (shouldGetPreciseLocation && postalCode !== '' && country !== '') {\n const preciseLocation = await getPreciseLocationData(\n clients,\n country,\n postalCode\n )\n city = preciseLocation.city\n geoCoordinates = preciseLocation.geoCoordinates\n }\n\n /**\n * The Session Manager API (https://developers.vtex.com/docs/api-reference/session-manager-api#patch-/api/sessions) adds the query params to the session public namespace.\n * This is used by Checkout (checkout-session) and Intelligent Search (search-session)\n */\n const params = buildSessionSearchParams(\n search,\n channel,\n postalCode,\n country,\n geoCoordinates,\n oldSession.locale\n )\n const marketingData = buildMarketingData(params, oldSession.marketingData)\n const { isRepresentative, customerId, unitId } = await resolveJwtClaims(\n clients,\n headers?.cookie,\n account\n )\n\n const sessionData = await clients.commerce\n .session(params.toString())\n .catch(() => null)\n\n const profile = sessionData?.namespaces.profile ?? null\n const shopper = sessionData?.namespaces.shopper ?? null\n const store = (sessionData?.namespaces.store ??\n null) as SessionStoreNamespace | null\n const authentication = sessionData?.namespaces.authentication ?? null\n const checkout = (sessionData?.namespaces.checkout ??\n null) as SessionCheckoutNamespace | null\n const publicData = sessionData?.namespaces.public ?? null\n\n let contract = null\n if (isRepresentative && profile?.id?.value) {\n try {\n contract = await clients.commerce.masterData.getContractById({\n contractId: profile.id.value,\n })\n } catch {\n console.error(\n `Error while getting contract data for profile ID (${profile.id.value}).\\n`\n )\n }\n }\n\n const sellerId = await resolveSellerInRegion(\n clients,\n channel,\n postalCode,\n geoCoordinates,\n country,\n params.get('sc') ?? channel.salesChannel\n )\n\n const newSession = {\n ...oldSession,\n currency: {\n code: store?.currencyCode?.value ?? oldSession.currency.code,\n symbol: store?.currencySymbol?.value ?? oldSession.currency.symbol,\n },\n country: store?.countryCode?.value ?? country,\n channel: channelAfterSessionManager(\n channel,\n store?.channel?.value,\n checkout?.regionId?.value,\n sellerId\n ),\n /**\n * B2B data structure in Session:\n * - Logged user data (shopper): `shopper` namespace\n * - Unit data: `authentication` namespace\n * - Contract data: `profile` namespace (those info will be available inside Faststore's Session `person` object)\n */\n b2b: buildB2bSession({\n isRepresentative,\n authentication,\n shopper,\n publicData,\n profile,\n contract,\n customerId,\n unitId,\n }),\n marketingData,\n person: buildPersonFromProfile(profile),\n geoCoordinates:\n (geoCoordinates?.latitude &&\n geoCoordinates?.longitude &&\n geoCoordinates) ||\n null,\n city,\n }\n\n if (deepEquals(oldSession, newSession)) {\n return null\n }\n\n return newSession\n}\n","import { cancelOrder } from './cancelOrder'\nimport { processOrderAuthorization } from './processOrderAuthorization'\nimport { startOrderEntryOperation } from './startOrderEntryOperation'\nimport { startRecommendationSession } from './startRecommendationSession'\nimport { subscribeToNewsletter } from './subscribeToNewsletter'\nimport { uploadFileToOrderEntry } from './uploadFileToOrderEntry'\nimport { validateCart } from './validateCart'\nimport { validateSession } from './validateSession'\n\nexport const Mutation = {\n validateCart,\n validateSession,\n subscribeToNewsletter,\n cancelOrder,\n processOrderAuthorization,\n uploadFileToOrderEntry,\n startOrderEntryOperation,\n startRecommendationSession,\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","import type { GraphQLScalarSerializer } from 'graphql'\nimport { GraphQLScalarType, type GraphQLScalarValueParser } from 'graphql'\nimport { Kind } from 'graphql/language'\n\nconst toObjectOrString: GraphQLScalarValueParser<any> = (value) => {\n if (typeof value === 'string') {\n return getValueAsObjectOrString(value)\n }\n\n return null\n}\n\nfunction getValueAsObjectOrString(value: string) {\n try {\n return JSON.parse(value)\n } catch (e) {\n return value\n }\n}\n\nconst stringify: GraphQLScalarSerializer<string | null> = (value) => {\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n if (typeof value === 'string') {\n return value\n }\n\n return null\n}\n\nexport const ObjectOrString = new GraphQLScalarType({\n name: 'ObjectOrString',\n description:\n 'A string or the string representation of an object (a stringified object).',\n parseValue: toObjectOrString,\n serialize: stringify,\n parseLiteral(ast) {\n if (ast.kind === Kind.STRING) {\n return getValueAsObjectOrString(ast.value)\n }\n\n return null\n },\n})\n","import type { GraphqlResolver } from '..'\nimport type { ArrayElementType } from '../../../typings/globals'\nimport type { OrderFormItem } from '../clients/commerce/types/OrderForm'\nimport type { EnhancedSku } from '../utils/enhanceSku'\nimport {\n availability,\n inStock,\n inStockOrderFormItem,\n price,\n sellingPrice,\n} from '../utils/productStock'\nimport { withTax } from '../utils/taxes'\nimport type { StoreAggregateOffer } from './aggregateOffer'\n\ntype OrderFormProduct = OrderFormItem & { product: EnhancedSku }\ntype SearchProduct = ArrayElementType<\n ReturnType<typeof StoreAggregateOffer.offers>\n>\nexport type Root = SearchProduct | OrderFormProduct\n\nconst isSearchItem = (item: Root): item is SearchProduct =>\n 'Price' in item && 'seller' in item && 'product' in item\n\nconst isOrderFormItem = (item: Root): item is OrderFormProduct =>\n 'skuName' in item\n\nexport const StoreOffer: Record<string, GraphqlResolver<Root>> = {\n priceCurrency: async (_, __, ctx) => {\n const {\n loaders: { salesChannelLoader },\n storage: { channel },\n } = ctx\n\n const sc = await salesChannelLoader.load(channel.salesChannel)\n\n return sc.CurrencyCode ?? ''\n },\n priceValidUntil: (root) => {\n if (isSearchItem(root)) {\n return root.PriceValidUntil ?? ''\n }\n\n if (isOrderFormItem(root)) {\n return root.priceValidUntil ?? ''\n }\n\n return null\n },\n itemCondition: () => 'https://schema.org/NewCondition',\n availability: async (root) => {\n if (isSearchItem(root)) {\n return availability(inStock(root))\n }\n\n if (isOrderFormItem(root)) {\n return availability(inStockOrderFormItem(root.availability))\n }\n\n return null\n },\n seller: (root, _, ctx) => {\n if (isSearchItem(root)) {\n return {\n identifier: ctx.storage.channel?.seller || root.seller.sellerId || '',\n }\n }\n\n if (isOrderFormItem(root)) {\n return {\n identifier: root.seller,\n }\n }\n\n return null\n },\n price: (root) => {\n if (isSearchItem(root)) {\n return price(root)\n }\n\n if (isOrderFormItem(root)) {\n return root.sellingPrice / 1e2\n }\n\n return null\n },\n priceWithTaxes: (root) => {\n if (isSearchItem(root)) {\n return withTax(price(root), root?.Tax, root.product.unitMultiplier)\n }\n\n if (isOrderFormItem(root)) {\n return withTax(\n root.sellingPrice / 1e2,\n root.tax / 1e2,\n root.unitMultiplier\n )\n }\n\n return null\n },\n sellingPrice: (root) => {\n if (isSearchItem(root)) {\n return sellingPrice(root)\n }\n\n if (isOrderFormItem(root)) {\n return root.sellingPrice / 1e2\n }\n\n return null\n },\n listPrice: (root) => {\n if (isSearchItem(root)) {\n return root.ListPrice ?? 0\n }\n\n if (isOrderFormItem(root)) {\n return root.listPrice / 1e2\n }\n\n return null\n },\n listPriceWithTaxes: (root) => {\n if (isSearchItem(root)) {\n return withTax(\n root.ListPrice ?? 0,\n root?.Tax,\n root.product.unitMultiplier\n )\n }\n\n if (isOrderFormItem(root)) {\n return withTax(root.listPrice / 1e2, root.tax / 1e2, root.unitMultiplier)\n }\n\n return null\n },\n itemOffered: (root) => {\n if (isSearchItem(root)) {\n return root.product\n }\n\n if (isOrderFormItem(root)) {\n return {\n ...root.product,\n attachmentsValues: root.attachments,\n }\n }\n\n return null\n },\n quantity: (root) => {\n if (isSearchItem(root)) {\n return root.AvailableQuantity ?? 0\n }\n\n if (isOrderFormItem(root)) {\n return root.quantity\n }\n\n return null\n },\n isGift: (root) => {\n if (isOrderFormItem(root)) {\n return root.isGift ?? false\n }\n\n return null\n },\n priceToken: (root) => {\n if (isSearchItem(root)) {\n return root.PriceToken ?? null\n }\n\n return null\n },\n}\n","import type { Product } from '../clients/search/types/ProductSearchResult'\n\nexport const canonicalFromProduct = ({ linkText }: Product) => `/${linkText}/p`\n","import type { CommertialOffer } from '../clients/search/types/ProductSearchResult'\n\nexport type EnhancedCommercialOffer<S, P> = CommertialOffer & {\n seller: S\n product: P\n}\n\nexport const enhanceCommercialOffer = <S, P>({\n offer,\n seller,\n product,\n}: {\n offer: CommertialOffer\n seller: S\n product: P\n}): EnhancedCommercialOffer<S, P> => ({\n ...offer,\n product,\n seller,\n})\n","/**\n * `StoreProduct.releaseDate` is documented in the schema as ISO 8601, but\n * Intelligent Search delivers whatever the account has stored — epoch\n * milliseconds for some, an ISO string for others. Normalizing here keeps the\n * resolver honest about the contract it advertises.\n */\n\n// Epoch values are disambiguated by magnitude, not digit count: anything at or\n// above this is milliseconds (>= 1973-03-03), anything below is seconds. A\n// millisecond value under the threshold is read as seconds — accepted, since no\n// real catalog carries a release date that early, and a digit-count heuristic\n// leaves a strictly larger hole (9-digit seconds and 12-digit milliseconds both\n// fall through to the string parser, which reads them as a year).\nconst MILLISECONDS_THRESHOLD = 1e11\n\nconst isAllDigits = (value: string) => /^\\d+$/.test(value)\n\n// An ISO date-time with no timezone designator. `new Date()` reads these as\n// host-local time (date-only forms are already read as UTC), which would make\n// the emitted calendar day depend on the build machine's zone.\nconst ISO_DATE_TIME_WITHOUT_ZONE =\n /^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?$/\n\nconst toDate = (value: string): Date => {\n if (!isAllDigits(value)) {\n return new Date(\n ISO_DATE_TIME_WITHOUT_ZONE.test(value) ? `${value}Z` : value\n )\n }\n\n const epoch = Number(value)\n\n return new Date(epoch >= MILLISECONDS_THRESHOLD ? epoch : epoch * 1000)\n}\n\n/**\n * Normalizes a release date to an ISO 8601 calendar date (`YYYY-MM-DD`).\n *\n * Accepts epoch milliseconds, epoch seconds, and date strings. Returns an empty\n * string when the input is absent or unparseable — never throws, and never\n * returns `\"Invalid Date\"`.\n *\n * The calendar day is always taken in UTC, so a build produces the same markup\n * on any machine. An input carrying a timezone offset is converted first, which\n * means `2026-03-23T21:00:00-05:00` normalizes to `2026-03-24`. That is\n * deliberate: preserving the source calendar day would make the output depend on\n * the offset embedded in each record. An input with no timezone designator is\n * read as UTC rather than as host-local time, for the same reason.\n */\nexport const normalizeReleaseDate = (\n value: string | number | null | undefined\n): string => {\n if (value === null || value === undefined) {\n return ''\n }\n\n const raw = String(value).trim()\n\n if (raw === '') {\n return ''\n }\n\n const date = toDate(raw)\n\n if (Number.isNaN(date.getTime())) {\n return ''\n }\n\n return date.toISOString().slice(0, 10)\n}\n","import type { GraphqlContext, GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type { StoreImage, StoreProductImageArgs } from '../../..'\nimport type { LocalizedProductEntry } from '../clients/catalog'\nimport type { Attachment } from '../clients/commerce/types/OrderForm'\nimport { canonicalFromProduct } from '../utils/canonical'\nimport type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer'\nimport { enhanceCommercialOffer } from '../utils/enhanceCommercialOffer'\nimport {\n getConfiguredLocales,\n getDefaultLocale,\n isLocalizationEnabled,\n} from '../utils/localization'\nimport { bestOfferFirst } from '../utils/productStock'\nimport {\n attachmentToPropertyValue,\n attributeToPropertyValue,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\nimport { normalizeReleaseDate } from '../utils/releaseDate'\nimport { slugify } from '../utils/slugify'\nimport type { Query } from './query'\n\ntype QueryProduct = PromiseType<ReturnType<typeof Query.product>>\n\nexport type Root = QueryProduct & {\n attachmentsValues?: Attachment[]\n unitMultiplier: number\n}\n\nconst DEFAULT_IMAGE = {\n imageText: 'image',\n imageUrl:\n 'https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg',\n imageLabel: 'label',\n}\n\nconst getSlug = (link: string, id: string) => `${link}-${id}`\nconst getPath = (link: string, id: string) => `/${getSlug(link, id)}/p`\nconst nonEmptyArray = <T>(array: T[] | null | undefined) =>\n Array.isArray(array) && array.length > 0 ? array : null\n\nfunction removeTrailingSlashes(path: string) {\n return path.replace(/^\\/+|\\/+$/g, '')\n}\n\n/**\n * Returns a cached-or-fetched localized product entry from the Catalog Dataplane.\n * The promise is stored in `ctx.storage.productTranslationsCache` so it is shared\n * across the `breadcrumbList`, `otherLocales`, and slug-validation resolvers within\n * the same request.\n *\n * The in-flight promise (not just the resolved value) is cached so concurrent\n * sibling resolvers dedupe to a single Catalog Dataplane request instead of each\n * missing the cache and issuing a duplicate fetch.\n */\nexport async function getLocalizedProductEntry(\n ctx: GraphqlContext,\n productId: string,\n locale: string\n): Promise<LocalizedProductEntry | null> {\n const cacheKey = `${productId}:${locale}`\n ctx.storage.productTranslationsCache ??= new Map()\n const cache = ctx.storage.productTranslationsCache\n\n const cached = cache.get(cacheKey)\n if (cached) return cached\n\n const entry = (async (): Promise<LocalizedProductEntry | null> => {\n try {\n const result = await ctx.clients.catalog.getLocalizedProduct(\n productId,\n locale\n )\n\n return {\n linkId: result.linkId,\n categories: result.categories ?? [],\n availableLinkIds: result.availableLinkIds ?? {},\n }\n } catch (err) {\n // Without this the fallback is silent: the breadcrumb renders the IS\n // category names, always in the default language, and the page can be\n // frozen in that state by `revalidate: false`.\n console.warn(\n `[getLocalizedProductEntry] failed to load product ${productId} for locale ${locale}:`,\n err\n )\n\n return null\n }\n })()\n\n cache.set(cacheKey, entry)\n\n return entry\n}\n\n/**\n * Finds the index of the main category tree that matches the given category ID.\n * This avoids including similar categories in the breadcrumb list.\n * If Intelligent Search starts providing the list without similar categories, we'll have direct access to the main tree\n * and we won't need this logic. Hopefully in the future we can remove this.\n *\n * @param categoriesIds - An array of category IDs representing different category trees.\n * @param categoryId - The category ID to find within the category trees.\n * @returns The index of the main category tree that contains the given category ID.\n * If the category ID is not found, returns 0 - it should always be found, but the fallback was added for safety.\n */\nconst findMainTreeIndex = (categoriesIds: string[], categoryId: string) => {\n const mainTreeIndex = categoriesIds.findIndex((idsTree) => {\n const lastId = removeTrailingSlashes(idsTree).split('/').at(-1)\n return lastId === categoryId\n })\n return mainTreeIndex < 0 ? 0 : mainTreeIndex\n}\n\nexport const StoreProduct: Record<string, GraphqlResolver<Root>> & {\n offers: GraphqlResolver<\n Root,\n any,\n Array<EnhancedCommercialOffer<Root['sellers'][number], Root>>\n >\n\n isVariantOf: GraphqlResolver<Root, any, Root>\n\n image: GraphqlResolver<Root, any, StoreImage[]>\n} = {\n productID: ({ itemId }) => itemId,\n name: ({ isVariantOf, name }) => name ?? isVariantOf.productName,\n slug: ({ isVariantOf: { linkText }, itemId }) => getSlug(linkText, itemId),\n description: ({ isVariantOf: { description } }) => description,\n seo: ({ isVariantOf }) => ({\n title: isVariantOf.productTitle || isVariantOf.productName,\n description: isVariantOf.metaTagDescription || isVariantOf.description,\n canonical: canonicalFromProduct(isVariantOf),\n }),\n brand: ({ isVariantOf: { brand } }) => ({ name: brand }),\n unitMultiplier: ({ unitMultiplier }) => unitMultiplier,\n breadcrumbList: async (root, _args, ctx) => {\n const {\n isVariantOf: {\n categories,\n productName,\n linkText,\n categoryId,\n categoriesIds,\n productId,\n },\n itemId,\n } = root\n\n const mainTreeIndex = findMainTreeIndex(categoriesIds, categoryId)\n const mainTree = categories[mainTreeIndex]\n const splittedCategories = removeTrailingSlashes(mainTree).split('/')\n\n const locale = ctx.storage.locale\n\n if (isLocalizationEnabled(ctx) && locale) {\n const entry = await getLocalizedProductEntry(ctx, productId, locale)\n\n if (entry) {\n // Extract the category IDs that belong to the main tree (same tree chosen from IS above).\n // A product can be registered in multiple trees; Catalog Dataplane returns all of them\n // in categories[], so we filter to only the ones matching this tree's IDs.\n const mainTreeIds = new Set(\n removeTrailingSlashes(categoriesIds[mainTreeIndex])\n .split('/')\n .filter(Boolean)\n )\n\n const localizedCategories = entry.categories\n .filter((category) => mainTreeIds.has(category.id.toString()))\n .sort(\n (a, b) =>\n a.fullPath.split('/').length - b.fullPath.split('/').length\n )\n\n // Length guard: if Catalog Dataplane returns fewer categories than IS expects\n // (e.g. data inconsistency or empty categories), fall through to the IS fallback.\n const hasAllBreadcrumbLevels =\n localizedCategories.length === splittedCategories.length\n if (hasAllBreadcrumbLevels) {\n return {\n itemListElement: [\n // Category items: both name and slug come from Catalog Dataplane, ensuring\n // they are always consistent with each other for the requested locale.\n ...localizedCategories.map((category, index) => ({\n name: category.name,\n item: `/${category.fullPathUriName}/`,\n position: index + 1,\n })),\n {\n name: productName,\n item: getPath(entry.linkId, itemId),\n position: splittedCategories.length + 1,\n },\n ],\n numberOfItems: splittedCategories.length,\n }\n }\n }\n }\n\n // Fallback: localization disabled, Catalog Dataplane unavailable, or category count mismatch.\n // Builds paths by applying slugify() to the IS category names, which mirrors the behaviour\n // of the VTEX Rewriter for default-locale slugs.\n return {\n itemListElement: [\n ...splittedCategories.map((name, index) => {\n const item = `/${splittedCategories\n .slice(0, index + 1)\n .map(slugify)\n .join('/')}/`\n return {\n name,\n item,\n position: index + 1,\n }\n }),\n {\n name: productName,\n item: getPath(linkText, itemId),\n position: splittedCategories.length + 1,\n },\n ],\n numberOfItems: splittedCategories.length,\n }\n },\n image: ({ images }, args) => {\n const resolvedImages = (nonEmptyArray(images) ?? [DEFAULT_IMAGE]).map(\n ({ imageUrl, imageText, imageLabel }) => ({\n alternateName: imageText ?? '',\n url: imageUrl.replace('vteximg.com.br', 'vtexassets.com'),\n keywords: imageLabel,\n })\n )\n\n if (typeof args !== 'object') {\n return resolvedImages\n }\n\n let { context, limit } = args as StoreProductImageArgs\n\n const shouldFilter = context !== 'generic'\n\n // Normalize count to undefined as we want any negative value to always return the full list of images\n limit = limit || -1\n limit = limit <= -1 ? undefined : limit\n\n let filteredImages = shouldFilter\n ? resolvedImages.filter(\n ({ keywords: imageKeywords }) => imageKeywords === context\n )\n : resolvedImages\n\n filteredImages =\n filteredImages.length === 0 ? resolvedImages : filteredImages\n\n return filteredImages.slice(0, limit)\n },\n sku: ({ itemId }) => itemId,\n gtin: ({ ean, referenceId }) => (ean ? ean : (referenceId[0]?.Value ?? '')),\n mpn: ({ isVariantOf: { manufacturerCode } }) => manufacturerCode ?? '',\n review: () => [],\n aggregateRating: () => ({}),\n offers: (root) =>\n root.sellers\n .map((seller) =>\n enhanceCommercialOffer({\n offer: seller.commertialOffer,\n seller,\n product: root,\n })\n )\n .sort(bestOfferFirst),\n isVariantOf: (root) => root,\n additionalProperty: ({\n // Search uses the name variations for specifications\n variations: specifications = [],\n attachmentsValues = [],\n attributes = [],\n }) => {\n const propertyValueSpecifications = specifications.flatMap(\n ({ name, values }) =>\n values.map((value) => ({\n name,\n value,\n valueReference: VALUE_REFERENCES.specification,\n }))\n )\n\n const propertyValueAttachments = attachmentsValues.map(\n attachmentToPropertyValue\n )\n\n const propertyValueAttributes = attributes.map(attributeToPropertyValue)\n\n return [\n ...propertyValueSpecifications,\n ...propertyValueAttachments,\n ...propertyValueAttributes,\n ]\n },\n hasSpecifications: ({ isVariantOf }) =>\n Boolean(isVariantOf.skuSpecifications?.length),\n skuSpecifications: ({ isVariantOf: { skuSpecifications } }) =>\n skuSpecifications ?? [],\n specificationGroups: ({ isVariantOf: { specificationGroups } }) =>\n specificationGroups,\n releaseDate: ({ isVariantOf: { releaseDate } }) =>\n normalizeReleaseDate(releaseDate),\n advertisement: ({ isVariantOf: { advertisement } }) => advertisement,\n deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges } }) =>\n deliveryPromisesBadges,\n otherLocales: async (root, _args, ctx) => {\n if (!isLocalizationEnabled(ctx)) return null\n\n const configuredLocales = getConfiguredLocales(ctx)\n\n if (configuredLocales.length === 0) return null\n\n const productId = root.isVariantOf.productId\n const itemId = root.itemId\n const locale = ctx.storage.locale\n\n // availableLinkIds returns localized slug for every locale,\n // we fetch for the current locale (reusing the request-scoped cache shared with the slug and\n // breadcrumb resolvers) and read the full map from the response.\n const entry = await getLocalizedProductEntry(ctx, productId, locale)\n\n if (!entry?.availableLinkIds) return null\n\n const { availableLinkIds } = entry\n\n return configuredLocales\n .map((configuredLocale) => {\n // availableLinkIds is identical whichever locale the Dataplane is queried\n // with, so deriving every slug from it keeps the hreflang cluster\n // reciprocal. The Intelligent Search linkText cannot stand in for a\n // missing entry: it is localized to the locale being browsed, which would\n // both point other locales at a 404 and make the advertised set depend on\n // which locale served the request.\n const linkId = availableLinkIds[configuredLocale]\n\n // Locales with no registered localized slug are omitted rather than\n // guessed, so an alternate is only ever advertised for a slug the catalog\n // actually resolves. A product with no translations advertises no\n // alternates at all, from any locale. Navigating to an omitted locale is\n // served by `defaultLocaleSlug`, which is free to guess precisely because\n // it never reaches an hreflang annotation.\n return linkId\n ? { locale: configuredLocale, slug: getSlug(linkId, itemId) }\n : null\n })\n .filter((e): e is { locale: string; slug: string } => e !== null)\n },\n defaultLocaleSlug: async (root, _args, ctx) => {\n if (!isLocalizationEnabled(ctx)) return null\n\n const defaultLocale = getDefaultLocale(ctx)\n\n if (!defaultLocale) return null\n\n const { productId, linkText } = root.isVariantOf\n const itemId = root.itemId\n\n // Reuses the request-scoped entry `otherLocales` already loads, so serving\n // both fields costs a single Dataplane call.\n const entry = await getLocalizedProductEntry(\n ctx,\n productId,\n ctx.storage.locale\n )\n\n // linkText is localized to the locale being browsed, which is what makes it\n // unusable for hreflang. It is acceptable here because an untranslated\n // product carries the same slug in every locale, so linkText *is* the\n // default-locale slug in the exact case where availableLinkIds is empty.\n // A product translated for the browsed locale but not for the default one\n // still yields a wrong guess; that URL 404s, which is the pre-existing\n // behavior and still better than dropping the shopper on the locale root.\n const linkId = entry?.availableLinkIds?.[defaultLocale] ?? linkText\n\n return getSlug(linkId, itemId)\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport { VALUE_REFERENCES } from '../utils/propertyValue'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.isVariantOf>>\n\nconst BLOCKED_SPECIFICATIONS = new Set(['allSpecifications'])\n\nexport const StoreProductGroup: Record<string, GraphqlResolver<Root>> = {\n hasVariant: (root) =>\n root.isVariantOf.items.map((item) => enhanceSku(item, root.isVariantOf)),\n productGroupID: ({ isVariantOf }) => isVariantOf.productId,\n name: (root) => root.isVariantOf.productName,\n skuVariants: (root) => root,\n additionalProperty: ({ isVariantOf: { specificationGroups } }) =>\n specificationGroups\n // Filter sku specifications so we don't mix them with product specs.\n .filter(\n (specificationGroup) =>\n !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)\n )\n // Transform specs back into product specs.\n .flatMap(({ specifications }) =>\n specifications.flatMap(({ name, values }) =>\n values.map((value) => ({\n name,\n value,\n valueReference: VALUE_REFERENCES.specification,\n }))\n )\n ),\n}\n","import type { GraphqlResolver } from '..'\nimport type { StorePropertyValue as StorePropertyValueType } from '../../../__generated__/schema'\nimport { getPropertyId } from '../utils/propertyValue'\n\nexport type Root = StorePropertyValueType\n\nexport const StorePropertyValue: Record<string, GraphqlResolver<Root>> = {\n propertyID: (root) => root.propertyID || getPropertyId(root),\n name: ({ name }) => name,\n value: ({ value }) => value,\n valueReference: ({ valueReference }) => valueReference,\n}\n","import { min } from './orderStatistics'\nimport { bestOfferFirst } from './productStock'\nimport type { Item } from '../clients/search/types/ProductSearchResult'\n\n/**\n * This function implements Portal heuristics for returning the best sku for a product.\n *\n * The best sku is the one with the best (cheapest available) offer\n * */\nexport const pickBestSku = (skus: Item[]) => {\n const offersBySku = skus.flatMap((sku) =>\n sku.sellers.map((seller) => ({\n offer: seller.commertialOffer,\n sku,\n }))\n )\n\n const best = min(offersBySku, ({ offer: o1 }, { offer: o2 }) =>\n bestOfferFirst(o1, o2)\n )\n\n return best ? best.sku : skus[0]\n}\n\nexport const isValidSkuId = (skuId: string) =>\n skuId !== '' && !Number.isNaN(Number(skuId))\n","import { BadRequestError } from '../../errors'\nimport type { QueryRecommendationsArgs } from '../../../__generated__/schema'\nimport type { GraphqlContext } from '../index'\nimport { enhanceSku, type EnhancedSku } from '../utils/enhanceSku'\nimport { pickBestSku } from '../utils/sku'\n\n// Structural check for a recommendations campaign VRN\n// (`vrn:recommendations:<account>:<campaign-type>:<campaign-id>`). Kept generic\n// on purpose: the authoritative campaign taxonomy lives in `@faststore/core`,\n// and `@faststore/api` must not depend on it, so we only validate the shape.\nconst RECOMMENDATION_VRN_PATTERN = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/\n\n/**\n * Resolves personalized recommendations for a campaign.\n *\n * The VTEX Recommendations BFF already returns the products fully hydrated in\n * the same Intelligent Search shape used by the `search` query. We map them\n * straight to the normalized `StoreProduct` shape (`pickBestSku` + `enhanceSku`)\n * so recommendation shelves render identical cards to regular shelves, while\n * preserving the recommendation order returned by the BFF.\n */\nexport const recommendations = async (\n _: unknown,\n { campaignVrn, userId, products }: QueryRecommendationsArgs,\n ctx: GraphqlContext\n) => {\n const {\n clients: { commerce },\n } = ctx\n\n const { salesChannel } = ctx.storage.channel\n\n // Validate inputs server-side so only clean, well-formed payloads reach the\n // Recommendations BFF (see @faststore/api server-side validation principle).\n const normalizedCampaignVrn = campaignVrn?.trim()\n if (\n !normalizedCampaignVrn ||\n !RECOMMENDATION_VRN_PATTERN.test(normalizedCampaignVrn)\n ) {\n throw new BadRequestError(`Invalid campaignVrn: \"${campaignVrn}\"`)\n }\n\n const normalizedUserId = userId?.trim()\n if (userId != null && !normalizedUserId) {\n throw new BadRequestError('Invalid userId: must be a non-empty string')\n }\n\n if (\n products != null &&\n (!Array.isArray(products) || products.some((product) => !product?.trim()))\n ) {\n throw new BadRequestError(\n 'Invalid products: must be an array of non-empty strings'\n )\n }\n\n const response = await commerce.recommendation.recommendations({\n campaignVrn: normalizedCampaignVrn,\n userId: normalizedUserId || undefined,\n products: products ?? [],\n salesChannel: salesChannel ?? undefined,\n locale: ctx.storage.locale,\n })\n\n const { campaign, correlationId } = response\n\n const orderedProducts = (response.products ?? [])\n .map((product) => {\n const sku = pickBestSku(product.items)\n\n return sku ? enhanceSku(sku, product) : null\n })\n .filter((sku): sku is EnhancedSku => Boolean(sku))\n\n return {\n products: orderedProducts,\n correlationId,\n campaign,\n }\n}\n","export const SORT_MAP = {\n price_desc: 'price:desc',\n price_asc: 'price:asc',\n orders_desc: 'orders:desc',\n name_desc: 'name:desc',\n name_asc: 'name:asc',\n release_desc: 'release:desc',\n discount_desc: 'discount:desc',\n score_desc: '',\n} as const\n","import type { GraphqlContext } from '..'\nimport type { QueryOrderEntryOperationArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const getOrderEntryOperation = async (\n _: unknown,\n { operationId }: QueryOrderEntryOperationArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!operationId) {\n throw new BadRequestError('Missing operationId')\n }\n\n return commerce.orderEntry.getOperation({ operationId })\n}\n","import type { GraphqlContext } from '..'\nimport type { QueryOrderFormItemsArgs } from '../../../__generated__/schema'\nimport { BadRequestError } from '../../errors'\n\nexport const getOrderFormItems = async (\n _: unknown,\n { orderFormId }: QueryOrderFormItemsArgs,\n { clients: { commerce } }: GraphqlContext\n) => {\n if (!orderFormId) {\n throw new BadRequestError('Missing orderFormId')\n }\n\n const { items } = await commerce.orderEntry.getOrderFormItems({ orderFormId })\n return (items ?? []).map((item) => ({\n id: item.id,\n name: item.name,\n price: item.price,\n listPrice: item.listPrice,\n quantity: item.quantity,\n imageUrl: item.imageUrl ?? null,\n availability: item.availability,\n seller: item.seller,\n unitMultiplier: item.unitMultiplier ?? 1,\n }))\n}\n","import type {\n ProcessOrderAuthorizationRule,\n QueryAllCollectionsArgs,\n QueryAllProductsArgs,\n QueryAvailableContractsArgs,\n QueryCollectionArgs,\n QueryListUserOrdersArgs,\n QueryPickupPointsArgs,\n QueryProductArgs,\n QueryProductCountArgs,\n QueryProductsArgs,\n QueryProfileArgs,\n QueryRedirectArgs,\n QuerySearchArgs,\n QuerySellersArgs,\n QueryShippingArgs,\n QueryUserOrderArgs,\n SavedCard,\n StoreContract,\n UserOrderFromList,\n} from '../../../__generated__/schema'\nimport { recommendations } from './recommendations'\nimport {\n BadRequestError,\n ForbiddenError,\n NotFoundError,\n isForbiddenError,\n isNotFoundError,\n} from '../../errors'\nimport type { CategoryTree } from '../clients/commerce/types/CategoryTree'\nimport type { ProfileAddress } from '../clients/commerce/types/Profile'\nimport type { SearchArgs } from '../clients/search'\nimport type { ProductSearchResult } from '../clients/search/types/ProductSearchResult'\nimport type { GraphqlContext } from '../index'\nimport type {\n ByLinkIdBrandRoot,\n ByLinkIdCategoryRoot,\n} from '../loaders/collection'\nimport { extractRuleForAuthorization } from '../utils/commercialAuth'\nimport {\n mapSessionContractsToStoreContracts,\n parseSessionAvailableContracts,\n resolveActiveContractDisplayName,\n resolveActiveContractIdFromSession,\n resolveDefaultContractId,\n} from '../utils/contract'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\nimport { enhanceSku, type EnhancedSku } from '../utils/enhanceSku'\nimport {\n findChannel,\n findCrossSelling,\n findLocale,\n findSkuId,\n findSlug,\n transformSelectedFacet,\n} from '../utils/facets'\nimport { getCatalogLocale, isLocalizationEnabled } from '../utils/localization'\nimport { isValidSkuId, pickBestSku } from '../utils/sku'\nimport { slugify } from '../utils/slugify'\nimport { SORT_MAP } from '../utils/sort'\nimport { FACET_CROSS_SELLING_MAP } from './../utils/facets'\nimport { StoreCollection } from './collection'\nimport { getOrderEntryOperation } from './getOrderEntryOperation'\nimport { getOrderFormItems } from './getOrderFormItems'\nimport { getLocalizedProductEntry } from './product'\n\n/**\n * Validates that a slug mismatch between IS linkText and the requested slug is\n * actually a localized slug match. Fetches the localized product entry from\n * Catalog Dataplane (with request-scoped caching) and checks whether the slug\n * prefix matches the localized linkId for the current locale.\n *\n * Returns true if the slug is a valid localized match, false otherwise\n * (including when the Dataplane API is unavailable).\n */\nasync function isLocalizedSlugMatch(\n ctx: GraphqlContext,\n slug: string,\n productGroupID: string,\n locale: string\n): Promise<boolean> {\n const slugPrefix = slug.slice(0, slug.lastIndexOf('-'))\n const entry = await getLocalizedProductEntry(ctx, productGroupID, locale)\n\n return entry?.linkId === slugPrefix\n}\n\nconst INVALID_SKU_ID_ERROR = 'Invalid SkuId'\nconst SLUG_MISMATCH_ERROR =\n 'Slug was set but the fetched sku does not satisfy the slug condition.'\n\n/**\n * License Manager resource key gating personal card management. Spelled as the\n * platform registers it — the PRD's prose lowercases the leading `u`, but the\n * key the API answers for is `UseAdHocCard`.\n */\nconst AD_HOC_CARD_RESOURCE_KEY = 'UseAdHocCard'\n\nconst shouldFallbackToProductRoute = (error: unknown) =>\n isNotFoundError(error) ||\n (error instanceof Error &&\n (error.message === INVALID_SKU_ID_ERROR ||\n error.message.startsWith(SLUG_MISMATCH_ERROR)))\n\n/**\n * Here be dragons 🦄🦄🦄\n *\n * In some cases, the slug has a valid skuId for a different product. This\n * guards that the fetched sku is the one we actually asked for, throwing\n * SLUG_MISMATCH_ERROR (caught by the caller) when it isn't.\n *\n * When localization is enabled, the slug prefix may be a localized LinkId that\n * differs from the IS linkText. linkText follows the locale being browsed\n * rather than the default one, so a mismatch is not by itself evidence of a\n * wrong sku. We validate against the Catalog Dataplane API before rejecting\n * the slug.\n */\nasync function assertSkuMatchesSlug(\n ctx: GraphqlContext,\n sku: EnhancedSku,\n slug: string | null | undefined,\n locale: string | null | undefined\n): Promise<void> {\n const { linkText, productId } = sku.isVariantOf\n\n if (!slug || !linkText || slug.startsWith(linkText)) {\n return\n }\n\n const isValidLocalizedMatch =\n isLocalizationEnabled(ctx) &&\n locale &&\n isValidSkuId(slug.split('-').pop() ?? '') &&\n (await isLocalizedSlugMatch(ctx, slug, productId, locale))\n\n if (isValidLocalizedMatch) {\n return\n }\n\n throw new Error(`${SLUG_MISMATCH_ERROR} slug: ${slug}, linkText: ${linkText}`)\n}\n\n/**\n * Fallback used when the sku/slug lookup above fails (invalid skuId, not\n * found, or slug mismatch): resolves the slug through the legacy pagetype\n * route and fetches the product from Intelligent Search by id instead.\n */\nasync function fetchProductBySlugFallback(\n ctx: GraphqlContext,\n slug: string | null | undefined\n): Promise<EnhancedSku> {\n if (slug == null) {\n throw new BadRequestError('Missing slug or id')\n }\n\n const {\n clients: { commerce, search },\n } = ctx\n\n const route = await commerce.catalog.portal.pagetype(`${slug}/p`)\n\n if (route.pageType !== 'Product' || !route.id) {\n throw new NotFoundError(`No product found for slug ${slug}`)\n }\n\n const product = await search\n .fetchProduct({\n field: 'id',\n value: String(route.id),\n })\n .catch(() => null)\n\n if (!product) {\n throw new NotFoundError(`No product found for id ${route.id}`)\n }\n\n return enhanceSku(pickBestSku(product.items), product)\n}\n\nexport const Query = {\n product: async (\n _: unknown,\n { locator }: QueryProductArgs,\n ctx: GraphqlContext\n ) => {\n // Insert channel in context for later usage\n const channel = findChannel(locator)\n const locale = findLocale(locator)\n const id = findSkuId(locator)\n const slug = findSlug(locator)\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n const {\n loaders: { skuLoader },\n } = ctx\n\n try {\n const skuId = id ?? slug?.split('-').pop() ?? ''\n\n if (!isValidSkuId(skuId)) {\n throw new Error(INVALID_SKU_ID_ERROR)\n }\n\n const sku = await skuLoader.load(skuId)\n\n await assertSkuMatchesSlug(ctx, sku, slug, locale)\n\n return sku\n } catch (err) {\n if (!shouldFallbackToProductRoute(err)) {\n throw err\n }\n\n return fetchProductBySlugFallback(ctx, slug)\n }\n },\n collection: (\n _: unknown,\n { slug }: QueryCollectionArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n // The request locale is set on ctx.storage.locale by the core `execute`\n // wrapper (from Next.js i18n) rather than a GraphQL argument, so overridable\n // fragments (API extensions) that also select `collection` keep merging\n // without argument conflicts.\n return collectionLoader.load({\n slug,\n locale: getCatalogLocale(ctx),\n })\n },\n search: async (\n _: unknown,\n {\n first,\n after: maybeAfter,\n sort,\n term,\n selectedFacets,\n sponsoredCount,\n }: QuerySearchArgs,\n ctx: GraphqlContext\n ) => {\n // Insert channel in context for later usage\n const channel = findChannel(selectedFacets)\n const locale = findLocale(selectedFacets)\n const crossSelling = findCrossSelling(selectedFacets)\n\n if (channel) {\n mutateChannelContext(ctx, channel)\n }\n\n if (locale) {\n mutateLocaleContext(ctx, locale)\n }\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n const searchArgs: Omit<SearchArgs, 'type'> = {\n page: Math.ceil(after / first) || 0,\n count: first,\n query: term ?? undefined,\n sort: SORT_MAP[sort ?? 'score_desc'] ?? SORT_MAP.score_desc,\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n sponsoredCount: sponsoredCount ?? undefined,\n }\n\n /**\n * In case we are using crossSelling, we fetch product IDs from the\n * cross selling API and then hydrate them using the PDP endpoint\n * via productsByIdentifier.\n */\n if (crossSelling) {\n const crossSellingProducts =\n await ctx.clients.commerce.catalog.products.crossselling({\n type: FACET_CROSS_SELLING_MAP[crossSelling.key],\n productId: crossSelling.value,\n })\n\n const productIds = crossSellingProducts\n .map((x) => x.productId)\n .slice(0, first)\n\n const productSearchPromise: Promise<ProductSearchResult> =\n ctx.clients.search\n .productsByIdentifier({ field: 'id', values: productIds })\n .then((products) => ({\n products,\n recordsFiltered: products.length,\n pagination: {\n count: products.length,\n current: { index: 0, proxyURL: '' },\n before: [],\n after: [],\n perPage: first,\n next: { index: 0, proxyURL: '' },\n previous: { index: 0, proxyURL: '' },\n first: { index: 0, proxyURL: '' },\n last: { index: 0, proxyURL: '' },\n },\n sampling: false,\n options: { sorts: [], counts: [] },\n translated: false,\n locale: '',\n query: '',\n operator: 'and',\n fuzzy: '0',\n searchId: '',\n }))\n\n return { searchArgs, productSearchPromise }\n }\n\n const productSearchPromise = ctx.clients.search.products(searchArgs)\n\n return { searchArgs, productSearchPromise }\n },\n allProducts: async (\n _: unknown,\n { first, after: maybeAfter }: QueryAllProductsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n const products = await search.products({\n page: Math.ceil(after / first),\n count: first,\n })\n\n const skus = products.products\n .flatMap((product) =>\n product.items.map((sku) => enhanceSku(sku, product))\n )\n .filter((sku) => sku.sellers.length > 0)\n\n return {\n pageInfo: {\n hasNextPage: products.pagination.after.length > 0,\n hasPreviousPage: products.pagination.before.length > 0,\n startCursor: '0',\n endCursor: products.recordsFiltered.toString(),\n totalCount: products.recordsFiltered,\n },\n // after + index is bigger than after+first itself because of the array flat() above\n edges: skus.map((sku, index) => ({\n node: sku,\n cursor: (after + index).toString(),\n })),\n }\n },\n products: async (\n _: unknown,\n { productIds }: QueryProductsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n if (!productIds.length) {\n return []\n }\n\n const products = await search.productsByIdentifier({\n field: 'id',\n values: productIds,\n })\n\n return products\n .flatMap((product) =>\n product.items.map((sku) => enhanceSku(sku, product))\n )\n .filter(\n (sku) => productIds.includes(sku.itemId) && sku.sellers.length > 0\n )\n },\n allCollections: async (\n _: unknown,\n { first, after: maybeAfter }: QueryAllCollectionsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const after = maybeAfter ? Number(maybeAfter) : 0\n\n const [brands, tree] = await Promise.all([\n commerce.catalog.brand.list(),\n commerce.catalog.category.tree(),\n ])\n\n // Flatten the category tree. parentId is tracked per node so\n // the type resolver can correctly classify Departments (fatherCategoryId: null)\n // vs Categories (fatherCategoryId: number).\n const categoryRoots: ByLinkIdCategoryRoot[] = []\n const dfs = (node: CategoryTree, parentId: number | null) => {\n categoryRoots.push({\n id: node.id,\n name: node.name,\n fatherCategoryId: parentId,\n linkId: slugify(node.name),\n title: node.Title,\n description: null,\n metaTagDescription: node.MetaTagDescription,\n availableLinkIds: null,\n entityType: 'category' as const,\n slug: new URL(node.url).pathname.slice(1).toLowerCase(),\n })\n\n for (const child of node.children) {\n dfs(child, node.id)\n }\n }\n\n for (const node of tree) {\n dfs(node, null)\n }\n\n const brandRoots: ByLinkIdBrandRoot[] = brands\n .filter((brand) => brand.isActive)\n .map((brand) => ({\n id: brand.id,\n name: brand.name,\n linkId: slugify(brand.name),\n title: brand.title,\n description: null,\n metaTagDescription: brand.metaTagDescription,\n availableLinkIds: null,\n entityType: 'brand' as const,\n }))\n\n const collections = [...brandRoots, ...categoryRoots]\n\n const validCollections = collections\n // Nullable slugs may cause one route to override the other\n .filter((node) => Boolean(StoreCollection.slug(node, null, ctx, null)))\n\n return {\n pageInfo: {\n hasNextPage: validCollections.length - after > first,\n hasPreviousPage: after > 0,\n startCursor: '0',\n endCursor: (\n Math.min(first, validCollections.length - after) - 1\n ).toString(),\n totalCount: validCollections.length,\n },\n edges: validCollections\n .slice(after, after + first)\n .map((node, index) => ({\n node,\n cursor: (after + index).toString(),\n })),\n }\n },\n shipping: async (\n _: unknown,\n { country, items, postalCode }: QueryShippingArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { simulationLoader },\n clients: { commerce },\n } = ctx\n\n const [simulation, address] = await Promise.all([\n simulationLoader.load({ country, items, postalCode }),\n commerce.checkout.address({ postalCode, country }),\n ])\n\n return {\n ...simulation,\n address,\n }\n },\n redirect: async (\n _: unknown,\n { term, selectedFacets }: QueryRedirectArgs,\n ctx: GraphqlContext\n ) => {\n // Currently the search redirection can be done through a search term or filter (facet) so we limit the redirect query to always have one of these values otherwise we do not execute it.\n // https://help.vtex.com/en/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/4Gd2wLQFbCwTsh8RUDwSoL?&utm_source=autocomplete\n if (!term && (!selectedFacets || !selectedFacets.length)) {\n return null\n }\n\n const { redirect } = await ctx.clients.search.products({\n page: 1,\n count: 1,\n query: term ?? undefined,\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n allowRedirect: true,\n })\n\n return {\n url: redirect,\n }\n },\n sellers: async (\n _: unknown,\n { postalCode, geoCoordinates, country, salesChannel }: QuerySellersArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const regionData = await commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n const { id, sellers } = region\n\n return {\n id,\n sellers,\n }\n },\n profile: async (\n _: unknown,\n { id }: QueryProfileArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const addresses = await commerce.profile.addresses(id)\n\n function mapAddressesToList(\n addressesObj: Record<string, string>\n ): ProfileAddress[] {\n if (!addressesObj || Object.keys(addressesObj).length === 0) {\n return []\n }\n\n return Object.values(addressesObj).map(\n (stringifiedObj) => JSON.parse(stringifiedObj) as ProfileAddress\n )\n }\n\n const parsedAddresses = mapAddressesToList(addresses)\n\n return { addresses: parsedAddresses }\n },\n productCount: async (\n _: unknown,\n { term }: QueryProductCountArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { search },\n } = ctx\n\n const result = await search.productCount({\n query: term ?? undefined,\n })\n\n return result\n },\n userOrder: async (\n _: unknown,\n { orderId }: QueryUserOrderArgs,\n ctx: GraphqlContext\n ) => {\n try {\n if (!orderId) {\n throw new BadRequestError('Missing orderId')\n }\n\n const {\n clients: { commerce },\n } = ctx\n\n const order = await commerce.oms.userOrder({ orderId })\n\n if (!order) {\n throw new NotFoundError(`No order found for id ${orderId}`)\n }\n\n let ruleForAuthorization: ProcessOrderAuthorizationRule | null = null\n\n try {\n /**\n * This endpoint could return a 404 error if has not an authorization\n * for the order, so we catch the error and return null\n * instead of throwing an error.\n */\n const commercialAuth =\n await commerce.oms.getCommercialAuthorizationsByOrderId({ orderId })\n\n ruleForAuthorization = extractRuleForAuthorization(commercialAuth)\n } catch (err: any) {}\n\n const shopperSearch =\n (await commerce.masterData.getShopperById({\n userId: order.purchaseAgentData?.purchaseAgents?.[0]?.userId ?? '',\n })) ?? []\n const shopper = shopperSearch[0] ?? {}\n\n return {\n orderId: order.orderId,\n creationDate: order.creationDate,\n totals: order.totals,\n items: order.items,\n shippingData: order.shippingData,\n paymentData: order.paymentData,\n customData: order.customData,\n status: order.status,\n statusDescription: order.statusDescription,\n allowCancellation: order.allowCancellation,\n storePreferencesData: order.storePreferencesData,\n clientProfileData: order.clientProfileData,\n canProcessOrderAuthorization:\n (order.status === 'waiting-for-confirmation' ||\n order.status === 'waiting-for-authorization') &&\n !!ruleForAuthorization,\n ruleForAuthorization,\n shopper: {\n firstName: shopper?.firstName || '',\n lastName: shopper?.lastName || '',\n email: shopper?.email || '',\n phone: shopper?.phone || '',\n },\n budgetData: order.budgetData ?? { budgets: [] },\n }\n } catch (error) {\n const errorMessage = (error as Error).message\n\n let result: {\n code?: string\n message?: string\n exception?: any\n } = {}\n\n /** The errorMessage can be in:\n * JSON format: {\"error\":{\"code\":\"OMS007\",\"message\":\"Order Not Found\",\"exception\":null}}\n * Plain text format: \"No authorized\"\n * Unknown format\n */\n try {\n const parsed = JSON.parse(errorMessage)\n result = parsed.error || parsed\n } catch {\n result = { message: errorMessage }\n }\n\n const message = result?.message || errorMessage\n\n if (isNotFoundError(error)) {\n throw new NotFoundError(`No order found for id ${orderId}. ${message}.`)\n }\n\n if (isForbiddenError(error)) {\n throw new ForbiddenError(\n `You are forbidden to interact with order with id ${orderId}. ${message}.`\n )\n }\n\n // Fallback for other Errors\n throw error\n }\n },\n listUserOrders: async (\n _: unknown,\n filters: QueryListUserOrdersArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const orders = await commerce.oms.listUserOrders(filters)\n\n return {\n list: orders.list?.map((order: UserOrderFromList) => ({\n orderId: order.orderId,\n creationDate: order.creationDate,\n clientName: order.clientName,\n items: order.items,\n totalValue: order.totalValue,\n status: order.status,\n statusDescription: order.statusDescription,\n ShippingEstimatedDate: order.ShippingEstimatedDate,\n customFields: order.customFields,\n currencyCode: order.currencyCode,\n })),\n paging: orders.paging,\n }\n },\n listCreditCards: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n clients: { commerce },\n } = ctx\n\n const cards = await commerce.savedCards.listCreditCards()\n\n return {\n list: cards?.map((card: SavedCard) => ({\n accountId: card.accountId,\n bin: card.bin,\n cardNumber: card.cardNumber,\n cardLabel: card.cardLabel,\n paymentSystem: card.paymentSystem,\n paymentSystemName: card.paymentSystemName,\n isDefault: card.isDefault,\n isActive: card.isActive,\n origin: card.origin,\n })),\n }\n },\n hasAdHocCardAccess: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n const userId = jwt?.userId ?? ''\n\n // No resolvable user means no organizational policy to enforce — the\n // caller (page/menu) still applies its own `unitId` check.\n if (!userId) {\n return true\n }\n\n // The permission is a License Manager resource key resolved from the\n // user's roles, not a token claim. Fail open on any failure, matching how\n // the checkout BFF treats an unavailable/disabled permission service.\n const granted = await commerce.licenseManager\n .isResourceGranted({ userId, resourceKey: AD_HOC_CARD_RESOURCE_KEY })\n .catch(() => null)\n\n return typeof granted === 'boolean' ? granted : true\n },\n listUserQuotes: async (\n _: unknown,\n filters: {\n page?: number\n perPage?: number\n status?: string[]\n createdAtFrom?: string\n createdAtTo?: string\n expiresAtFrom?: string\n expiresAtTo?: string\n label?: string\n },\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const result = await commerce.quotes.listUserQuotes(filters)\n\n const uniqueCreatedByIds = [\n ...new Set(result.items.map((quote) => quote.createdBy).filter(Boolean)),\n ] as string[]\n\n const createdByNameById = new Map<string, string>()\n await Promise.all(\n uniqueCreatedByIds.map(async (userId) => {\n try {\n const [shopper] = await commerce.masterData.getShopperById({\n userId,\n })\n if (shopper) {\n const fullName = [shopper.firstName, shopper.lastName]\n .filter(Boolean)\n .join(' ')\n if (fullName) createdByNameById.set(userId, fullName)\n }\n } catch {\n // Fall back to the raw id below if the lookup fails\n }\n })\n )\n\n const list = result.items.map((quote) => ({\n id: quote.id,\n status: quote.status,\n label: quote.label ?? null,\n createdAt: quote.createdAt,\n expiresAt: quote.expiresAt,\n amount: quote.amount,\n createdBy: quote.createdBy\n ? (createdByNameById.get(quote.createdBy) ?? quote.createdBy)\n : null,\n }))\n\n return {\n list,\n paging: {\n total: result.totalItems,\n currentPage: result.pageNumber,\n perPage: result.pageSize,\n },\n }\n },\n validateUser: async (_: unknown, __: unknown, _ctx: GraphqlContext) => {\n // Authentication is now handled by @auth directive\n // If we reach here, validation was successful, otherwise an error would have been thrown\n return {\n isValid: true,\n }\n },\n isOrganizationMember: async (\n _: unknown,\n __: unknown,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const sessionData = await commerce.session('').catch(() => null)\n\n return Boolean(sessionData?.namespaces.authentication?.unitId?.value)\n },\n // only b2b users\n userDetails: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n const userId = jwt?.userId ?? ''\n\n const [sessionData, shopperResult, lmRoles] = await Promise.all([\n commerce.session('').catch(() => null),\n userId\n ? commerce.masterData.getShopperById({ userId }).catch(() => null)\n : Promise.resolve(null),\n userId\n ? commerce.licenseManager.getUserRoles({ userId }).catch(() => null)\n : Promise.resolve(null),\n ])\n\n const shopper = shopperResult?.[0]\n const authentication = sessionData?.namespaces.authentication ?? null\n\n const fullName =\n `${(shopper?.firstName ?? '').trim()} ${(shopper?.lastName ?? '').trim()}`.trim()\n\n return {\n username: authentication?.storeUserEmail?.value ?? '',\n name: fullName,\n email: authentication?.storeUserEmail?.value ?? '',\n phone: shopper?.phone ?? '',\n role: lmRoles?.Roles?.map((r) => r.Name) ?? [],\n orgUnit: authentication?.unitName?.value ?? '',\n }\n },\n // If isRepresentative, return b2b information.\n // If not, return b2c user information\n accountProfile: async (_: unknown, __: unknown, ctx: GraphqlContext) => {\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n\n if (!jwt?.userId) {\n return null\n }\n\n if (jwt?.isRepresentative) {\n const sessionData = await commerce.session('').catch(() => null)\n\n if (!sessionData) {\n return null\n }\n\n const profile = sessionData.namespaces.profile ?? null\n const shopper = sessionData.namespaces.shopper ?? null\n const authentication = sessionData.namespaces.authentication ?? null\n\n const contractId =\n resolveActiveContractIdFromSession(sessionData) ||\n jwt?.customerId?.trim() ||\n ''\n\n let contract = null\n if (contractId) {\n try {\n contract = await commerce.masterData.getContractById({ contractId })\n } catch (err) {\n console.error(\n `Error while getting contract data for contract ID (${contractId}).`,\n err\n )\n }\n }\n\n const shopperName =\n `${(shopper?.firstName?.value ?? '').trim()} ${(shopper?.lastName?.value ?? '').trim()}`.trim()\n const name =\n resolveActiveContractDisplayName(contract, profile) || shopperName\n\n return {\n name: name || '',\n email:\n profile?.email?.value || authentication?.storeUserEmail?.value || '',\n id:\n profile?.id?.value ||\n authentication?.customerId?.value ||\n jwt?.customerId?.trim() ||\n '',\n // createdAt: '',\n }\n }\n\n const user = await commerce.licenseManager\n .getUserById({\n userId: jwt?.userId,\n })\n .catch(() => null)\n\n return {\n name: user?.name || '',\n email: user?.email || '',\n id: user?.id || '',\n // createdAt: '',\n }\n },\n // only b2b users\n // Contract list from VTEX session `shopper.availableContracts`.\n availableContracts: async (\n _: unknown,\n { orgUnitId }: QueryAvailableContractsArgs,\n ctx: GraphqlContext\n ): Promise<StoreContract[]> => {\n if (!orgUnitId) {\n throw new BadRequestError('Missing orgUnitId')\n }\n\n const {\n account,\n headers,\n clients: { commerce },\n } = ctx\n\n const sessionData = await commerce.session('').catch(() => null)\n const authToken = getAuthCookie(headers?.cookie ?? '', account)\n let jwt: ReturnType<typeof parseJwt> = null\n\n try {\n jwt = authToken ? parseJwt(authToken) : null\n } catch {\n jwt = null\n }\n\n const sessionUnitId =\n sessionData?.namespaces.authentication?.unitId?.value?.trim() ??\n jwt?.unitId?.trim() ??\n ''\n\n if (!sessionUnitId || sessionUnitId !== orgUnitId) {\n throw new ForbiddenError(\n 'You are not allowed to list contracts for this organization unit'\n )\n }\n\n const contracts = parseSessionAvailableContracts(\n sessionData?.namespaces.shopper\n )\n\n const activeContractId =\n resolveActiveContractIdFromSession(sessionData) ||\n jwt?.customerId?.trim() ||\n ''\n\n // Default flag lives only in the store-front BFF; never block the list on it.\n const attached = await commerce.storeFront\n .attachedContracts(orgUnitId)\n .catch((error) => {\n console.warn(\n 'availableContracts: default contract lookup failed',\n error\n )\n return null\n })\n const defaultContractId = resolveDefaultContractId(attached?.contracts)\n\n return mapSessionContractsToStoreContracts(\n contracts,\n activeContractId,\n defaultContractId\n )\n },\n pickupPoints: async (\n _: unknown,\n { geoCoordinates }: QueryPickupPointsArgs,\n ctx: GraphqlContext\n ) => {\n const {\n clients: { commerce },\n } = ctx\n\n const result = await commerce.checkout.pickupPoints({\n geoCoordinates,\n })\n\n return result\n },\n orderEntryOperation: getOrderEntryOperation,\n orderFormItems: getOrderFormItems,\n recommendations,\n}\n","import type { GraphqlResolver } from '..'\n\nexport const StoreReview: Record<string, GraphqlResolver> = {\n reviewRating: () => ({\n ratingValue: 5,\n bestRating: 5,\n }),\n author: () => ({\n name: '',\n }),\n}\n","import type { GraphqlResolver } from '..'\nimport type { SearchArgs } from '../clients/search'\nimport type { Facet } from '../clients/search/types/FacetSearchResult'\nimport type { ProductSearchResult } from '../clients/search/types/ProductSearchResult'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport { pickBestSku } from '../utils/sku'\n\nexport type Root = {\n searchArgs: Omit<SearchArgs, 'type'>\n productSearchPromise: Promise<ProductSearchResult>\n}\n\nconst isRootFacet = (facet: Facet, isDepartment: boolean, isBrand: boolean) =>\n isDepartment\n ? facet.key === 'category-1'\n : isBrand\n ? facet.key === 'brand'\n : false\n\nexport const StoreSearchResult: Record<string, GraphqlResolver<Root>> = {\n suggestions: async (root, _, ctx) => {\n const {\n clients: { search },\n } = ctx\n\n const { searchArgs } = root\n\n // If there's no search query, suggest the most popular searches.\n if (!searchArgs.query) {\n const topSearches = await search.topSearches()\n\n return {\n terms: topSearches.searches.map((item) => ({\n value: item.term,\n count: item.count,\n })),\n products: [],\n }\n }\n\n const { productSearchPromise } = root\n const [terms, productSearchResult] = await Promise.all([\n search.suggestedTerms(searchArgs),\n productSearchPromise,\n ])\n\n const skus = productSearchResult.products\n .map((product) => {\n // What determines the presentation of the SKU is the price order\n // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278\n const maybeSku = pickBestSku(product.items)\n\n return maybeSku && enhanceSku(maybeSku, product)\n })\n .filter((sku) => !!sku)\n\n const { searches } = terms\n\n return {\n terms: searches.map((item) => ({ value: item.term, count: item.count })),\n products: skus,\n }\n },\n products: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n const skus = productSearchResult.products\n .map((product) => {\n // What determines the presentation of the SKU is the price order\n // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278\n const maybeSku = pickBestSku(product.items)\n\n return maybeSku && enhanceSku(maybeSku, product)\n })\n .filter((sku) => !!sku)\n\n return {\n pageInfo: {\n hasNextPage: productSearchResult.pagination.after.length > 0,\n hasPreviousPage: productSearchResult.pagination.before.length > 0,\n startCursor: '0',\n endCursor: productSearchResult.recordsFiltered.toString(),\n totalCount: productSearchResult.recordsFiltered,\n },\n edges: skus.map((sku, index) => ({\n node: sku,\n cursor: index.toString(),\n })),\n }\n },\n facets: async ({ searchArgs }, _, ctx) => {\n const {\n clients: { search: is },\n } = ctx\n\n ctx.storage.searchArgs = searchArgs\n\n const { facets = [] } = await is.facets(searchArgs)\n\n const isCollectionPage = !searchArgs.query\n\n const isDepartment = searchArgs.selectedFacets?.length\n ? searchArgs.selectedFacets[0].key === 'category-1'\n : false\n\n const isBrand = searchArgs.selectedFacets?.length\n ? searchArgs.selectedFacets[0].key === 'brand'\n : false\n\n const filteredFacets = facets\n // Remove root facet on category and brand pages\n // TODO: Hide category filters for category pages. E.g. /office/desks\n .filter(\n (facet) =>\n !isCollectionPage || !isRootFacet(facet, isDepartment, isBrand)\n )\n\n return filteredFacets\n },\n metadata: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n return {\n isTermMisspelled: productSearchResult.correction?.misspelled ?? false,\n logicalOperator: productSearchResult.operator,\n fuzzy: productSearchResult.fuzzy,\n }\n },\n searchId: async ({ productSearchPromise }) => {\n const productSearchResult = await productSearchPromise\n\n return productSearchResult.searchId\n },\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.seo>> & {\n titleTemplate?: string\n}\n\nexport const StoreSeo: Record<string, GraphqlResolver<Root>> = {\n title: ({ title }) => title ?? '',\n description: ({ description }) => description ?? '',\n canonical: ({ canonical }) => canonical ?? '',\n titleTemplate: () => '',\n}\n","import type { GraphqlResolver } from '..'\n\ntype Unit = 'bd' | 'd' | 'h' | 'm'\nconst units = ['bd', 'd', 'h', 'm'] as const\n\nconst isUnit = (x: any): x is Unit => units.includes(x)\n\nconst localizedEstimates: Record<string, Record<string, string>> = {\n bd: {\n 0: 'Today',\n 1: 'In 1 business day',\n other: `Up to # business days`,\n },\n d: {\n 0: 'Today',\n 1: 'In 1 day',\n other: 'Up to # days',\n },\n h: {\n 0: 'Now',\n 1: 'In 1 hour',\n other: 'Up to # hours',\n },\n m: {\n 0: 'Now',\n 1: 'In 1 minute',\n other: 'Up to # minutes',\n },\n}\n\n/**\n * Transforms estimate (e.g 3bd) into friendly format (e.g Up to 3 business days)\n * based on https://github.com/vtex-apps/shipping-estimate-translator/blob/13e17055d6353dd3f3f4c31bae77ab049002809b/messages/en.json\n */\n\nexport const getLocalizedEstimates = (estimate: string): string => {\n const [amount, unit] = [estimate.split(/\\D+/)[0], estimate.split(/[0-9]+/)[1]]\n\n const isAmountNumber = amount !== '' && !Number.isNaN(Number(amount))\n const isUnitValid = isUnit(unit)\n\n if (!isAmountNumber || !isUnitValid) {\n return ''\n }\n\n const amountKey = Number(amount) < 2 ? Number(amount) : 'other'\n\n return localizedEstimates[unit][amountKey].replace('#', amount) ?? ''\n}\n\nexport type Root = {\n name?: string\n friendlyName?: string\n price?: number\n shippingEstimate?: string\n}\n\nexport const ShippingSLA: Record<string, GraphqlResolver<Root>> = {\n carrier: (root) => root?.friendlyName ?? root?.name ?? '',\n price: (root) => (root?.price ? root.price / 100 : root?.price),\n localizedEstimates: (root) =>\n root?.shippingEstimate ? getLocalizedEstimates(root.shippingEstimate) : '',\n}\n","import type { StoreProduct as StoreProductType } from '../../..'\nimport type { Product, Item } from '../clients/search/types/ProductSearchResult'\n\nexport type SkuVariants = StoreProductType[]\n\nexport type SkuVariantsByName = Record<string, Array<FormattedSkuVariant>>\n\ntype FormattedSkuVariant = {\n alt: string\n src: string\n label: string\n value: string\n}\n\nconst SKU_IMAGE_LABEL = 'skuvariation'\n\n/**\n * Attempts to find an image labeled by the specific variationName\n * if none is found, search for the `skuvariation`, defaulting to the\n * first image of the SKU\n */\nfunction findSkuVariantImage(\n availableImages: Item['images'],\n variationName?: string\n) {\n const variationSpecificImageLabel =\n `${SKU_IMAGE_LABEL}${variationName}`.toLowerCase()\n\n const variationSpecificImage = availableImages.find(\n (imageProperties) =>\n imageProperties.imageLabel === variationSpecificImageLabel\n )\n\n if (variationSpecificImage) {\n return variationSpecificImage\n }\n\n const skuImage = availableImages.find(\n (imageProperties) => imageProperties.imageLabel === SKU_IMAGE_LABEL\n )\n\n return skuImage ? skuImage : availableImages[0]\n}\n\nexport function createSlugsMap(\n variants: Item[],\n dominantVariantName: string,\n baseSlug: string\n) {\n /**\n * Maps property value combinations to their respective SKU's slug. Enables\n * us to retrieve the slug for the SKU that matches the currently selected\n * variations in O(1) time.\n *\n * Example: `'Color-Red-Size-40': 'classic-shoes-37'`\n */\n const slugsMap: Record<string, string> = {}\n\n variants.forEach((variant) => {\n const skuSpecificationProperties = variant.variations\n\n if (skuSpecificationProperties.length === 0) {\n return\n }\n\n // Make sure that the 'name-value' pair for the dominant variation\n // is always the first one.\n const dominantNameValue = `${dominantVariantName}-${\n skuSpecificationProperties.find(\n (variationDetails) => variationDetails.name === dominantVariantName\n )?.values[0] ?? ''\n }`\n\n const skuVariantKey = skuSpecificationProperties.reduce((acc, property) => {\n const shouldIgnore = property.name === dominantVariantName\n\n if (shouldIgnore) {\n return acc\n }\n\n return acc + `-${property.name}-${property.values[0]}`\n }, dominantNameValue)\n\n slugsMap[skuVariantKey] = `${baseSlug}-${variant.itemId}`\n })\n\n return slugsMap\n}\n\nexport function getActiveSkuVariations(variations: Item['variations']) {\n const activeVariations: Record<string, string> = {}\n\n variations.forEach((variation) => {\n activeVariations[variation.name] = variation.values[0]\n })\n\n return activeVariations\n}\n\nexport function getVariantsByName(\n skuSpecifications: Product['skuSpecifications']\n) {\n const variants: Record<string, string[]> = {}\n\n skuSpecifications?.forEach((specification) => {\n variants[specification.field.originalName ?? specification.field.name] =\n specification.values.map((value) => value.originalName ?? value.name)\n })\n\n return variants\n}\n\nfunction compare(a: string, b: string) {\n // Values are always represented as Strings, so we need to handle numbers\n // in this special case.\n if (!Number.isNaN(Number(a) - Number(b))) {\n return Number(a) - Number(b)\n }\n\n if (a < b) {\n return -1\n }\n\n if (a > b) {\n return 1\n }\n\n return 0\n}\n\nfunction sortVariants(variantsByName: SkuVariantsByName) {\n const sortedVariants = variantsByName\n\n for (const variantProperty in variantsByName) {\n const areAllNumbers = variantsByName[variantProperty].every(\n (option: any) => !Number.isNaN(Number(option.value))\n )\n\n // Preserve Admin's variants order for cases variants are strings\n areAllNumbers &&\n variantsByName[variantProperty].sort((a, b) => compare(a.value, b.value))\n }\n\n return sortedVariants\n}\n\nexport function getFormattedVariations(\n variants: Item[],\n dominantVariantName: string,\n dominantVariantValue: string\n) {\n /**\n * SKU options already formatted and indexed by their property name.\n *\n * Ex: {\n * `Size`: [\n * { label: '42', value: '42' },\n * { label: '41', value: '41' },\n * { label: '39', value: '39' },\n * ]\n * }\n */\n const variantsByName: SkuVariantsByName = {}\n\n const previouslySeenPropertyValues = new Set<string>()\n\n variants.forEach((variant) => {\n if (variant.variations.length === 0) {\n return\n }\n\n const dominantVariantEntry = variant.variations.find(\n (variation) => variation.name === dominantVariantName\n )\n\n const matchesDominantVariant =\n dominantVariantEntry?.values[0] === dominantVariantValue\n\n if (!matchesDominantVariant) {\n const nameValueIdentifier = `${dominantVariantName}-${dominantVariantEntry?.values[0]}`\n\n if (\n !dominantVariantEntry ||\n previouslySeenPropertyValues.has(nameValueIdentifier)\n ) {\n return\n }\n\n previouslySeenPropertyValues.add(nameValueIdentifier)\n\n const variantImageToUse = findSkuVariantImage(\n variant.images,\n dominantVariantName\n )\n\n const formattedVariant = {\n src: variantImageToUse.imageUrl,\n alt: variantImageToUse.imageLabel ?? '',\n label: `${dominantVariantName}: ${dominantVariantEntry.values[0]}`,\n value: dominantVariantEntry.values[0],\n }\n\n if (variantsByName[dominantVariantEntry.name]) {\n variantsByName[dominantVariantEntry.name].push(formattedVariant)\n } else {\n variantsByName[dominantVariantEntry.name] = [formattedVariant]\n }\n\n return\n }\n\n variant.variations.forEach((variationProperty) => {\n const nameValueIdentifier = `${variationProperty.name}-${variationProperty.values[0]}`\n\n if (previouslySeenPropertyValues.has(nameValueIdentifier)) {\n return\n }\n\n previouslySeenPropertyValues.add(nameValueIdentifier)\n\n const variantImageToUse = findSkuVariantImage(\n variant.images,\n variationProperty.name\n )\n\n const formattedVariant = {\n src: variantImageToUse.imageUrl,\n alt: variantImageToUse.imageText ?? '',\n label: `${variationProperty.name}: ${variationProperty.values[0]}`,\n value: variationProperty.values[0],\n }\n\n if (variantsByName[variationProperty.name]) {\n variantsByName[variationProperty.name].push(formattedVariant)\n } else {\n variantsByName[variationProperty.name] = [formattedVariant]\n }\n })\n })\n\n return sortVariants(variantsByName)\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport {\n createSlugsMap,\n getActiveSkuVariations,\n getFormattedVariations,\n getVariantsByName,\n} from '../utils/skuVariants'\nimport type { StoreProduct } from './product'\n\nexport type Root = PromiseType<ReturnType<typeof StoreProduct.isVariantOf>>\n\ntype SlugsMapArgs = {\n dominantVariantName: string\n}\n\nexport const SkuVariants: Record<string, GraphqlResolver<Root>> = {\n activeVariations: (root) => getActiveSkuVariations(root.variations),\n allVariantsByName: (root) =>\n getVariantsByName(root.isVariantOf.skuSpecifications),\n\n slugsMap: (root, args) =>\n createSlugsMap(\n root.isVariantOf.items,\n (args as SlugsMapArgs).dominantVariantName ?? root.variations[0]?.name,\n root.isVariantOf.linkText\n ),\n\n availableVariations: (root, args) => {\n const dominantVariantName =\n (args as SlugsMapArgs).dominantVariantName ?? root.variations[0]?.name\n const activeVariations = getActiveSkuVariations(root.variations)\n\n const activeDominantVariationValue = activeVariations[dominantVariantName]\n\n const filteredFormattedVariations = getFormattedVariations(\n root.isVariantOf.items,\n dominantVariantName,\n activeDominantVariationValue\n )\n\n return filteredFormattedVariations\n },\n allVariantProducts: (root) =>\n root.isVariantOf.items.map((item) => enhanceSku(item, root.isVariantOf)),\n}\n","import type { GraphqlResolver } from '..'\nimport type { PromiseType } from '../../../typings/globals'\nimport type {\n Maybe,\n UserOrderCustomField,\n UserOrderDeliveryOption,\n UserOrderPriceTag,\n} from '../../..'\nimport type { Query } from './query'\nimport { getLocalizedEstimates } from './shippingSLA'\n\ntype QueryUserOrder = PromiseType<ReturnType<typeof Query.userOrder>>\n\nexport type Root = QueryUserOrder\n\nconst deliveryChannelsMapping = {\n ['pickup-in-point']: 'Pickup',\n delivery: 'Delivery',\n pickup: 'Pickup',\n ['take-away']: 'Take away',\n ['']: '',\n} as const\n\nexport const UserOrderResult: Record<string, GraphqlResolver<Root>> = {\n deliveryOptionsData: (root) => {\n const { shippingData, items } = root\n const logisticsInfo = shippingData?.logisticsInfo || []\n const addresses = shippingData?.selectedAddresses ||\n shippingData?.availableAddresses || [shippingData?.address]\n\n const groupedDeliveryOptions = logisticsInfo.reduce(\n (acc, logisticsItem) => {\n const selectedSla = logisticsItem?.selectedSla || '' // Normal / Express\n const deliveryChannel =\n logisticsItem?.selectedDeliveryChannel ||\n logisticsItem?.deliveryChannel ||\n ''\n const deliveryCompany = logisticsItem?.deliveryCompany || '' // Correios / Fedex\n const deliveryWindow = logisticsItem?.deliveryWindow\n const pickupStoreInfo = logisticsItem?.pickupStoreInfo\n const shippingEstimate = logisticsItem?.shippingEstimate || '' // 1bd\n const friendlyShippingEstimate = logisticsItem?.shippingEstimate\n ? getLocalizedEstimates(logisticsItem?.shippingEstimate) // e.g. transform 3bd into Up to 3 business days\n : ''\n\n const shippingEstimateDate = logisticsItem?.shippingEstimateDate || '' // 2023-10-02T00:00:00Z\n const addressId = logisticsItem?.addressId || '' // 5230338247839\n\n const itemIndex = logisticsItem?.itemIndex ?? 0\n const item = items?.[itemIndex]\n const seller = item?.seller || ''\n\n const groupKey = `${selectedSla}|${deliveryChannel}|${deliveryCompany}|${seller}|${shippingEstimate}|${shippingEstimateDate}|${addressId}|${deliveryWindow?.startDateUtc}|${deliveryWindow?.endDateUtc}`\n\n const address = addresses?.find(\n (address) => address?.addressId === addressId\n )\n\n const friendlyDeliveryOptionName =\n `${deliveryChannelsMapping[deliveryChannel as keyof typeof deliveryChannelsMapping] || ''} ${friendlyShippingEstimate} ${address?.neighborhood ? `to ${address?.neighborhood}` : ''}`.trim()\n\n // TODO check other totals like bundleItems etc\n const { taxPriceTagsTotal, taxPriceTags } = filterTaxPriceTags(\n (item?.priceTags ?? []) as UserOrderPriceTag[]\n )\n\n const itemTotal =\n (item?.sellingPrice ?? 0) * (item?.quantity ?? 0) +\n (item?.tax ?? 0) +\n (taxPriceTagsTotal ?? 0)\n\n if (!acc[groupKey]) {\n acc[groupKey] = {\n // static fields\n selectedSla,\n deliveryChannel,\n deliveryCompany,\n deliveryWindow,\n shippingEstimate,\n shippingEstimateDate,\n seller,\n friendlyShippingEstimate,\n friendlyDeliveryOptionName,\n address,\n pickupStoreInfo,\n // dynamic fields\n quantityOfDifferentItems: 0,\n total: 0,\n items: [],\n }\n }\n\n if (acc[groupKey]) {\n acc[groupKey].items?.push({\n id: item?.id || '',\n uniqueId: item?.uniqueId || '',\n name: item?.name || '',\n quantity: item?.quantity || 0,\n price: item?.price || 0,\n sellingPrice: item?.sellingPrice || 0,\n imageUrl: item?.imageUrl || '',\n taxPriceTags: taxPriceTags ?? [],\n taxPriceTagsTotal: taxPriceTagsTotal ?? 0,\n tax: item?.tax || 0,\n total: itemTotal,\n })\n\n acc[groupKey].quantityOfDifferentItems =\n (acc[groupKey].quantityOfDifferentItems ?? 0) + 1\n acc[groupKey].total = (acc[groupKey].total ?? 0) + itemTotal\n }\n\n return acc\n },\n {} as Record<string, UserOrderDeliveryOption>\n )\n\n const deliveryOptions = Object.values(groupedDeliveryOptions)\n\n const contactInformation = shippingData?.contactInformation?.[0]\n const contact = {\n name:\n `${contactInformation?.firstName ?? ''} ${contactInformation?.lastName ?? ''}`.trim() ||\n deliveryOptions?.[0]?.address?.receiverName ||\n '',\n email: contactInformation?.email || '',\n phone: contactInformation?.phone || '',\n }\n\n return {\n deliveryOptions,\n contact,\n }\n },\n customFields: (root) => {\n const customFields = root?.customData?.customFields || []\n return (\n Object.values(\n customFields.reduce(\n (\n acc: Record<\n string,\n {\n type: string\n id: string\n fields: UserOrderCustomField['fields']\n }\n >,\n entry: Maybe<UserOrderCustomField>\n ) => {\n const type = entry?.linkedEntity?.type || ''\n const id = entry?.linkedEntity?.id || ''\n const key = `${type}|${id || ''}`\n if (!acc[key]) {\n acc[key] = { type, id, fields: [] }\n }\n acc[key].fields.push(...(entry?.fields || []))\n return acc\n },\n {}\n )\n ) || []\n )\n // Example of custom fields\n // return [\n // {\n // type: 'item',\n // id: '9009169',\n // fields: [\n // {\n // name: 'costCenter',\n // value: 'CC1',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'item',\n // id: 'ECEAC03EBA2B4BBFA7E899CD4CA5121B',\n // fields: [\n // {\n // name: 'costCenter',\n // value: 'CC2',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'address',\n // id: 'work-A1',\n // fields: [\n // {\n // name: 'desktop',\n // value: 'A1',\n // refId: 'externalId',\n // },\n // ],\n // },\n // {\n // type: 'order',\n // id: '',\n // fields: [\n // {\n // name: 'poNumber',\n // value: '111222333',\n // refId: 'externalId',\n // },\n // {\n // name: 'release',\n // value: '123',\n // refId: 'externalId',\n // },\n // ],\n // },\n // ]\n },\n}\n\n// logic copied from https://github.com/vtex/my-orders/blob/3271bdd4216851fb21b64093769d73183868e362/react/components/Order/ChangeSummary/ChangeV2/shared/filterPriceTags.js#L59-L60\nexport function filterTaxPriceTags(priceTags: UserOrderPriceTag[]) {\n const multiplier = 100\n\n const taxPriceTags = priceTags.filter((priceTag) =>\n priceTag?.name?.includes('TAX')\n )\n\n const taxPriceTagsTotal = taxPriceTags.reduce(\n (acc, curr) => acc + (curr.rawValue ? curr.rawValue * multiplier : 0),\n 0\n )\n\n return {\n taxPriceTags,\n taxPriceTagsTotal,\n }\n}\n","import { StoreAggregateOffer } from './aggregateOffer'\nimport { StoreAggregateRating } from './aggregateRating'\nimport { StoreCollection } from './collection'\nimport { StoreFacet, StoreFacetBoolean, StoreFacetRange } from './facet'\nimport { StoreFacetValueBoolean } from './faceValue'\nimport { Mutation } from './mutation'\nimport { ObjectOrString } from './objectOrString'\nimport { StoreOffer } from './offer'\nimport { StoreProduct } from './product'\nimport { StoreProductGroup } from './productGroup'\nimport { StorePropertyValue } from './propertyValue'\nimport { Query } from './query'\nimport { StoreReview } from './review'\nimport { StoreSearchResult } from './searchResult'\nimport { StoreSeo } from './seo'\nimport { ShippingSLA } from './shippingSLA'\nimport { SkuVariants } from './skuVariations'\nimport { UserOrderResult } from './userOrder'\n\nconst VtexResolvers = {\n StoreCollection,\n StoreAggregateOffer,\n StoreProduct,\n StoreSeo,\n StoreFacet,\n StoreFacetBoolean,\n StoreFacetRange,\n StoreFacetValueBoolean,\n StoreOffer,\n StoreAggregateRating,\n StoreReview,\n StoreProductGroup,\n StoreSearchResult,\n StorePropertyValue,\n SkuVariants,\n ShippingSLA,\n UserOrderResult,\n ObjectOrString,\n Query,\n Mutation,\n}\n\nexport const getResolvers = () => VtexResolvers\n","export default \"\\\"\\\"\\\"\\nAddress information.\\n\\\"\\\"\\\"\\ntype Address {\\n \\\"\\\"\\\"\\n Address postal code\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Address city\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Address state\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n Address country\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n Address street\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n Address number\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n Address neighborhood\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n Address complement\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n Address reference\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n Address geoCoordinates\\n \\\"\\\"\\\"\\n geoCoordinates: [Float]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAdvertisement information about a specific product in a campaign\\n\\\"\\\"\\\"\\ntype Advertisement {\\n \\\"\\\"\\\"\\n Advertiser ID of the product.\\n \\\"\\\"\\\"\\n adId: String!\\n \\\"\\\"\\\"\\n Campaign ID.\\n \\\"\\\"\\\"\\n campaignId: String!\\n \\\"\\\"\\\"\\n Cost of the action, usually Cost Per Click.\\n \\\"\\\"\\\"\\n actionCost: Float!\\n \\\"\\\"\\\"\\n Advertiser Request ID.\\n \\\"\\\"\\\"\\n adRequestId: String!\\n \\\"\\\"\\\"\\n Advertiser Response ID.\\n \\\"\\\"\\\"\\n adResponseId: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.\\n\\\"\\\"\\\"\\ntype StoreAggregateOffer {\\n \\\"\\\"\\\"\\n Highest price among all sellers.\\n \\\"\\\"\\\"\\n highPrice: Float!\\n \\\"\\\"\\\"\\n Lowest price among all sellers.\\n \\\"\\\"\\\"\\n lowPrice: Float!\\n \\\"\\\"\\\"\\n Lowest price among all sellers with current taxes.\\n \\\"\\\"\\\"\\n lowPriceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Number of sellers selling this SKU.\\n \\\"\\\"\\\"\\n offerCount: Int!\\n \\\"\\\"\\\"\\n ISO code of the currency used for the offer prices.\\n \\\"\\\"\\\"\\n priceCurrency: String!\\n \\\"\\\"\\\"\\n Array with information on each available offer.\\n \\\"\\\"\\\"\\n offers: [StoreOffer!]!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nAverage rating, based on multiple ratings or reviews.\\n\\\"\\\"\\\"\\ntype StoreAggregateRating {\\n \\\"\\\"\\\"\\n Value of the aggregate rating.\\n \\\"\\\"\\\"\\n ratingValue: Float!\\n \\\"\\\"\\\"\\n Total number of ratings.\\n \\\"\\\"\\\"\\n reviewCount: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\ninformation about the author of a product review or rating.\\n\\\"\\\"\\\"\\ntype StoreAuthor {\\n \\\"\\\"\\\"\\n Author name.\\n \\\"\\\"\\\"\\n name: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nBrand of a given product.\\n\\\"\\\"\\\"\\ntype StoreBrand {\\n \\\"\\\"\\\"\\n Brand name.\\n \\\"\\\"\\\"\\n name: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nItem of a list.\\n\\\"\\\"\\\"\\ntype StoreListItem {\\n \\\"\\\"\\\"\\n List item value.\\n \\\"\\\"\\\"\\n item: String!\\n \\\"\\\"\\\"\\n Name of the list item.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Position of the item in the list.\\n \\\"\\\"\\\"\\n position: Int!\\n}\\n\\n\\\"\\\"\\\"\\nList of items consisting of chain linked web pages, ending with the current page.\\n\\\"\\\"\\\"\\ntype StoreBreadcrumbList {\\n \\\"\\\"\\\"\\n Array with breadcrumb elements.\\n \\\"\\\"\\\"\\n itemListElement: [StoreListItem!]!\\n \\\"\\\"\\\"\\n Number of breadcrumbs in the list.\\n \\\"\\\"\\\"\\n numberOfItems: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nShopping cart message.\\n\\\"\\\"\\\"\\ntype StoreCartMessage {\\n \\\"\\\"\\\"\\n Shopping cart message text.\\n \\\"\\\"\\\"\\n text: String!\\n \\\"\\\"\\\"\\n Shopping cart message status, which can be `INFO`, `WARNING` or `ERROR`.\\n \\\"\\\"\\\"\\n status: StoreStatus!\\n}\\n\\n\\\"\\\"\\\"\\nShopping cart information.\\n\\\"\\\"\\\"\\ntype StoreCart {\\n \\\"\\\"\\\"\\n Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`.\\n \\\"\\\"\\\"\\n order: StoreOrder!\\n \\\"\\\"\\\"\\n List of shopping cart messages.\\n \\\"\\\"\\\"\\n messages: [StoreCartMessage!]!\\n}\\n\\n\\\"\\\"\\\"\\nShopping cart input.\\n\\\"\\\"\\\"\\ninput IStoreCart {\\n \\\"\\\"\\\"\\n Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`.\\n \\\"\\\"\\\"\\n order: IStoreOrder!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct collection type. Possible values are `Department`, `Category`, `Brand` or `Collection`.\\n\\n`SubCategory` and `Cluster` are still declared for backward compatibility but are\\ndeprecated and never returned.\\n\\\"\\\"\\\"\\nenum StoreCollectionType {\\n \\\"\\\"\\\"\\n First level of product categorization.\\n \\\"\\\"\\\"\\n Department\\n \\\"\\\"\\\"\\n Second level of product categorization.\\n \\\"\\\"\\\"\\n Category\\n \\\"\\\"\\\"\\n Third level of product categorization.\\n\\n Deprecated: never returned — third-level categories resolve as `Category`.\\n \\\"\\\"\\\"\\n SubCategory\\n @deprecated(\\n reason: \\\"Never returned since the by-linkid migration: the category response only exposes `fatherCategoryId`, which distinguishes root from non-root but not tree depth, so third-level categories resolve as `Category`. Scheduled for removal in the next major.\\\"\\n )\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n Brand\\n \\\"\\\"\\\"\\n Product cluster.\\n\\n Deprecated: never returned — clusters resolve as `Collection`.\\n \\\"\\\"\\\"\\n Cluster\\n @deprecated(\\n reason: \\\"Never returned since the by-linkid migration: clusters and curated collections are both served by `collection/by-linkid`, whose response carries no discriminator between them, so both resolve as `Collection`. Scheduled for removal in the next major.\\\"\\n )\\n \\\"\\\"\\\"\\n Product collection.\\n \\\"\\\"\\\"\\n Collection\\n}\\n\\n\\\"\\\"\\\"\\nProduct collection facet, used for search.\\n\\\"\\\"\\\"\\ntype StoreCollectionFacet {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet value.\\n \\\"\\\"\\\"\\n value: String!\\n}\\n\\n\\\"\\\"\\\"\\nCollection meta information. Used for search.\\n\\\"\\\"\\\"\\ntype StoreCollectionMeta {\\n \\\"\\\"\\\"\\n List of selected collection facets.\\n \\\"\\\"\\\"\\n selectedFacets: [StoreCollectionFacet!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct collection information.\\n\\\"\\\"\\\"\\ntype StoreCollection {\\n \\\"\\\"\\\"\\n Meta tag data.\\n \\\"\\\"\\\"\\n seo: StoreSeo!\\n \\\"\\\"\\\"\\n List of items consisting of chain linked web pages, ending with the current page.\\n \\\"\\\"\\\"\\n breadcrumbList: StoreBreadcrumbList!\\n \\\"\\\"\\\"\\n Collection meta information. Used for search.\\n \\\"\\\"\\\"\\n meta: StoreCollectionMeta!\\n \\\"\\\"\\\"\\n Collection ID.\\n \\\"\\\"\\\"\\n id: ID!\\n \\\"\\\"\\\"\\n Corresponding collection URL slug, with which to retrieve this entity.\\n \\\"\\\"\\\"\\n slug: String!\\n \\\"\\\"\\\"\\n Collection type.\\n \\\"\\\"\\\"\\n type: StoreCollectionType!\\n \\\"\\\"\\\"\\n Localized versions of this collection for all available locales.\\n Only announces slugs the catalog has registered for each locale, so it is safe\\n to build hreflang annotations from. Only populated when localization is\\n enabled.\\n \\\"\\\"\\\"\\n otherLocales: [StoreCollectionLocale!]\\n \\\"\\\"\\\"\\n Slug the catalog resolves for the requested locale, lowercased.\\n Meant for the page's canonical URL: `slug` echoes the path the shopper\\n visited, and by-linkid matches case-insensitively, so without this every\\n casing variant would claim to be canonical. Unlike `otherLocales`, it may fall\\n back to a slug registered for another locale, so it must never be used to\\n build hreflang annotations.\\n \\\"\\\"\\\"\\n canonicalSlug: String\\n}\\n\\n\\\"\\\"\\\"\\nLocalized collection data for a specific locale.\\n\\\"\\\"\\\"\\ntype StoreCollectionLocale {\\n \\\"\\\"\\\"\\n Locale code (e.g. \\\"pt-BR\\\", \\\"it-IT\\\").\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Localized collection slug (e.g. \\\"vestuario/camisetas\\\").\\n \\\"\\\"\\\"\\n slug: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nDelivery Promise badge.\\n\\\"\\\"\\\"\\ntype DeliveryPromiseBadge {\\n \\\"\\\"\\\"\\n Badge type.\\n \\\"\\\"\\\"\\n typeName: String\\n}\\n\"","export default \"union StoreFacet = StoreFacetRange | StoreFacetBoolean\\n\\n\\\"\\\"\\\"\\nSearch facet range information.\\n\\\"\\\"\\\"\\ntype StoreFacetRange {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Minimum facet range value.\\n \\\"\\\"\\\"\\n min: StoreFacetValueRange!\\n \\\"\\\"\\\"\\n Maximum facet range value.\\n \\\"\\\"\\\"\\n max: StoreFacetValueRange!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet boolean information.\\n\\\"\\\"\\\"\\ntype StoreFacetBoolean {\\n \\\"\\\"\\\"\\n Facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Facet label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Array with information on each facet value.\\n \\\"\\\"\\\"\\n values: [StoreFacetValueBoolean!]!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet range value information. Used for minimum and maximum range values.\\n\\\"\\\"\\\"\\ntype StoreFacetValueRange {\\n \\\"\\\"\\\"\\n Search facet range absolute value.\\n \\\"\\\"\\\"\\n absolute: Float!\\n \\\"\\\"\\\"\\n Search facet range selected value.\\n \\\"\\\"\\\"\\n selected: Float!\\n}\\n\\n\\\"\\\"\\\"\\nInformation of a specific facet value.\\n\\\"\\\"\\\"\\ntype StoreFacetValueBoolean {\\n \\\"\\\"\\\"\\n Facet value.\\n \\\"\\\"\\\"\\n value: String!\\n \\\"\\\"\\\"\\n Facet value label.\\n \\\"\\\"\\\"\\n label: String!\\n \\\"\\\"\\\"\\n Indicates whether facet is selected.\\n \\\"\\\"\\\"\\n selected: Boolean!\\n \\\"\\\"\\\"\\n Number of items with this facet.\\n \\\"\\\"\\\"\\n quantity: Int\\n}\\n\"","export default \"\\\"\\\"\\\"\\nImage.\\n\\\"\\\"\\\"\\ntype StoreImage {\\n \\\"\\\"\\\"\\n Image URL.\\n \\\"\\\"\\\"\\n url: String!\\n \\\"\\\"\\\"\\n Alias for the image.\\n \\\"\\\"\\\"\\n alternateName: String!\\n}\\n\\n\\\"\\\"\\\"\\nImage input.\\n\\\"\\\"\\\"\\ninput IStoreImage {\\n \\\"\\\"\\\"\\n Image input URL.\\n \\\"\\\"\\\"\\n url: String!\\n \\\"\\\"\\\"\\n Alias for the input image.\\n \\\"\\\"\\\"\\n alternateName: String!\\n}\\n\"","export default \"type Mutation {\\n \\\"\\\"\\\"\\n Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns `null`.\\n \\\"\\\"\\\"\\n validateCart(cart: IStoreCart!, session: IStoreSession): StoreCart\\n \\\"\\\"\\\"\\n Updates a web session with the specified values.\\n \\\"\\\"\\\"\\n validateSession(session: IStoreSession!, search: String!): StoreSession\\n \\\"\\\"\\\"\\n Subscribes a new person to the newsletter list.\\n \\\"\\\"\\\"\\n subscribeToNewsletter(data: IPersonNewsletter!): PersonNewsletter\\n \\\"\\\"\\\"\\n Cancels user order\\n \\\"\\\"\\\"\\n cancelOrder(data: IUserOrderCancel!): UserOrderCancel\\n \\\"\\\"\\\"\\n Process Order Authorization\\n \\\"\\\"\\\"\\n processOrderAuthorization(\\n data: IProcessOrderAuthorization!\\n ): ProcessOrderAuthorizationResponse\\n \\\"\\\"\\\"\\n Uploads a file to the Order Entry Service and returns the S3 object key.\\n The file must be Base64-encoded and passed via the `data` input.\\n The returned `objectKey` is required to start an order entry operation.\\n \\\"\\\"\\\"\\n uploadFileToOrderEntry(data: IOrderEntryUpload!): StoreOrderEntryUploadResult\\n @auth\\n \\\"\\\"\\\"\\n Submits an uploaded file for bulk import into a VTEX cart via the Order Entry Service.\\n Returns an operationId to poll for the operation status.\\n \\\"\\\"\\\"\\n startOrderEntryOperation(\\n data: IOrderEntryOperation!\\n ): StoreOrderEntryOperationResult @auth\\n \\\"\\\"\\\"\\n Starts an anonymous personalization session for the current shopper.\\n \\\"\\\"\\\"\\n startRecommendationSession: Boolean!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nNewsletter information.\\n\\\"\\\"\\\"\\ntype PersonNewsletter {\\n \\\"\\\"\\\"\\n Person's ID in the newsletter list.\\n \\\"\\\"\\\"\\n id: String!\\n}\\n\\n\\\"\\\"\\\"\\nPerson data input to the newsletter.\\n\\\"\\\"\\\"\\ninput IPersonNewsletter {\\n \\\"\\\"\\\"\\n Person's name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Person's email.\\n \\\"\\\"\\\"\\n email: String!\\n}\\n\"","export default \"scalar ObjectOrString\\n\"","export default \"\\\"\\\"\\\"\\nOffer information.\\n\\\"\\\"\\\"\\ntype StoreOffer {\\n \\\"\\\"\\\"\\n This is displayed as the \\\"from\\\" price in the context of promotions' price comparison. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n listPrice: Float!\\n \\\"\\\"\\\"\\n List price among with current taxes.\\n \\\"\\\"\\\"\\n listPriceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Computed price before applying coupons, taxes or benefits. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n sellingPrice: Float!\\n \\\"\\\"\\\"\\n ISO code of the currency used for the offer prices.\\n \\\"\\\"\\\"\\n priceCurrency: String!\\n \\\"\\\"\\\"\\n Also known as spot price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n Also known as spot price with taxes.\\n \\\"\\\"\\\"\\n priceWithTaxes: Float!\\n \\\"\\\"\\\"\\n Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.\\n \\\"\\\"\\\"\\n priceValidUntil: String!\\n \\\"\\\"\\\"\\n Offer item condition.\\n \\\"\\\"\\\"\\n itemCondition: String!\\n \\\"\\\"\\\"\\n Offer item availability.\\n \\\"\\\"\\\"\\n availability: String!\\n \\\"\\\"\\\"\\n Seller responsible for the offer.\\n \\\"\\\"\\\"\\n seller: StoreOrganization!\\n \\\"\\\"\\\"\\n Information on the item being offered.\\n \\\"\\\"\\\"\\n itemOffered: StoreProduct!\\n \\\"\\\"\\\"\\n Number of items offered.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Whether this offer is a gift (e.g. free promotional item).\\n \\\"\\\"\\\"\\n isGift: Boolean\\n \\\"\\\"\\\"\\n Signed price token (JWT) used by the Pricing Fallback feature. When present, it should be\\n forwarded to Checkout on add-to-cart so the platform can trust the offer's price even if\\n the Pricing System is unavailable. May be null when the signing step fails or the feature is disabled.\\n \\\"\\\"\\\"\\n priceToken: String\\n}\\n\\n\\\"\\\"\\\"\\nOffer input.\\n\\\"\\\"\\\"\\ninput IStoreOffer {\\n \\\"\\\"\\\"\\n Also known as spot price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n This is displayed as the \\\"from\\\" price in the context of promotions' price comparison. This may change before it reaches the shelf.\\n \\\"\\\"\\\"\\n listPrice: Float!\\n \\\"\\\"\\\"\\n Seller responsible for the offer.\\n \\\"\\\"\\\"\\n seller: IStoreOrganization!\\n \\\"\\\"\\\"\\n Information on the item being offered.\\n \\\"\\\"\\\"\\n itemOffered: IStoreProduct!\\n \\\"\\\"\\\"\\n Number of items offered.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Signed price token (JWT) from the Pricing Fallback feature, forwarded to Checkout on add-to-cart.\\n \\\"\\\"\\\"\\n priceToken: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInformation of a specific order.\\n\\\"\\\"\\\"\\ntype StoreOrder {\\n \\\"\\\"\\\"\\n ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).\\n \\\"\\\"\\\"\\n orderNumber: String!\\n \\\"\\\"\\\"\\n Array with information on each accepted offer.\\n \\\"\\\"\\\"\\n acceptedOffer: [StoreOffer!]!\\n \\\"\\\"\\\"\\n Indicates whether or not items with attachments should be split.\\n \\\"\\\"\\\"\\n shouldSplitItem: Boolean\\n \\\"\\\"\\\"\\n Sales channel of the underlying orderForm when FastStore adopted it because\\n the browser session was stale (e.g. after Quick Order). Clients should align\\n `session.channel` to this value. Null when no SC adoption happened.\\n \\\"\\\"\\\"\\n salesChannel: String\\n}\\n\\n\\\"\\\"\\\"\\nOrder input.\\n\\\"\\\"\\\"\\ninput IStoreOrder {\\n \\\"\\\"\\\"\\n ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#).\\n \\\"\\\"\\\"\\n orderNumber: String!\\n \\\"\\\"\\\"\\n Array with information on each accepted offer.\\n \\\"\\\"\\\"\\n acceptedOffer: [IStoreOffer!]!\\n \\\"\\\"\\\"\\n Indicates whether or not items with attachments should be split.\\n \\\"\\\"\\\"\\n shouldSplitItem: Boolean\\n}\\n\"","export default \"\\\"\\\"\\\"\\nCommercial Authorization response.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationResponse {\\n \\\"\\\"\\\"\\n Commercial Authorization ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Order ID associated with the commercial authorization.\\n \\\"\\\"\\\"\\n orderId: String!\\n \\\"\\\"\\\"\\n Workflow instance ID.\\n \\\"\\\"\\\"\\n workflowInstanceId: String!\\n \\\"\\\"\\\"\\n Current status of the commercial authorization.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n List of units.\\n \\\"\\\"\\\"\\n units: [String!]!\\n \\\"\\\"\\\"\\n Callback endpoint URL.\\n \\\"\\\"\\\"\\n callbackEndpoint: String!\\n \\\"\\\"\\\"\\n Total order value desired by the seller.\\n \\\"\\\"\\\"\\n totalOrderValueDesiredBySeller: Float!\\n \\\"\\\"\\\"\\n Marketplace payment value.\\n \\\"\\\"\\\"\\n marketPlacePaymentValue: Float!\\n \\\"\\\"\\\"\\n Collection of items in the commercial authorization.\\n \\\"\\\"\\\"\\n itemCollection: [CommercialAuthorizationItem!]!\\n \\\"\\\"\\\"\\n Additional information as key-value pairs.\\n \\\"\\\"\\\"\\n additionalInfo: JSONObject!\\n \\\"\\\"\\\"\\n Dimension status information.\\n \\\"\\\"\\\"\\n dimensionStatus: [CommercialAuthorizationDimensionStatus!]!\\n \\\"\\\"\\\"\\n Creation version.\\n \\\"\\\"\\\"\\n creationVersion: String!\\n \\\"\\\"\\\"\\n Creation environment.\\n \\\"\\\"\\\"\\n creationEnvironment: String!\\n \\\"\\\"\\\"\\n User profile ID.\\n \\\"\\\"\\\"\\n userProfileId: String!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization status.\\n\\\"\\\"\\\"\\nenum CommercialAuthorizationStatus {\\n \\\"\\\"\\\"\\n Authorization is pending.\\n \\\"\\\"\\\"\\n pending\\n \\\"\\\"\\\"\\n Authorization has been accepted.\\n \\\"\\\"\\\"\\n accepted\\n \\\"\\\"\\\"\\n Authorization has been denied.\\n \\\"\\\"\\\"\\n denied\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization item.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationItem {\\n \\\"\\\"\\\"\\n Item ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Item SKU.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Item price.\\n \\\"\\\"\\\"\\n price: Float!\\n \\\"\\\"\\\"\\n Total system discount applied.\\n \\\"\\\"\\\"\\n totalSystemDiscount: Float!\\n \\\"\\\"\\\"\\n Total manual discount applied.\\n \\\"\\\"\\\"\\n totalManualDiscount: Float!\\n \\\"\\\"\\\"\\n Item quantity.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Additional information as key-value pairs.\\n \\\"\\\"\\\"\\n additionalInfo: JSONObject!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization dimension status.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationDimensionStatus {\\n \\\"\\\"\\\"\\n Dimension status ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Dimension status name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Unit ID, if applicable.\\n \\\"\\\"\\\"\\n unitId: String\\n \\\"\\\"\\\"\\n Current status of the dimension.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n Dimension score.\\n \\\"\\\"\\\"\\n score: Float!\\n \\\"\\\"\\\"\\n Priority level.\\n \\\"\\\"\\\"\\n priority: Int!\\n \\\"\\\"\\\"\\n Indicates if simulation should be performed.\\n \\\"\\\"\\\"\\n shouldSimulate: Boolean!\\n \\\"\\\"\\\"\\n Collection of rules for this dimension.\\n \\\"\\\"\\\"\\n ruleCollection: [CommercialAuthorizationRule!]!\\n \\\"\\\"\\\"\\n Creation date.\\n \\\"\\\"\\\"\\n creationDate: String!\\n \\\"\\\"\\\"\\n Creation version.\\n \\\"\\\"\\\"\\n creationVersion: String!\\n \\\"\\\"\\\"\\n Creation environment.\\n \\\"\\\"\\\"\\n creationEnvironment: String!\\n \\\"\\\"\\\"\\n Indicates if all rules acceptance is required.\\n \\\"\\\"\\\"\\n requireAllRulesAcceptance: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRule {\\n \\\"\\\"\\\"\\n Rule ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Rule name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Current status of the rule.\\n \\\"\\\"\\\"\\n status: CommercialAuthorizationStatus!\\n \\\"\\\"\\\"\\n DO ID, if applicable.\\n \\\"\\\"\\\"\\n doId: String\\n \\\"\\\"\\\"\\n List of authorized email addresses.\\n \\\"\\\"\\\"\\n authorizedEmails: [String!]!\\n \\\"\\\"\\\"\\n Rule priority.\\n \\\"\\\"\\\"\\n priority: Int!\\n \\\"\\\"\\\"\\n Rule trigger configuration.\\n \\\"\\\"\\\"\\n trigger: CommercialAuthorizationRuleTrigger!\\n \\\"\\\"\\\"\\n Timeout value.\\n \\\"\\\"\\\"\\n timeout: Int!\\n \\\"\\\"\\\"\\n Indicates if notification is enabled.\\n \\\"\\\"\\\"\\n notification: Boolean!\\n \\\"\\\"\\\"\\n Score interval configuration.\\n \\\"\\\"\\\"\\n scoreInterval: CommercialAuthorizationRuleScoreInterval!\\n \\\"\\\"\\\"\\n Authorization data, if available.\\n \\\"\\\"\\\"\\n authorizationData: CommercialAuthorizationRuleAuthorizationData\\n \\\"\\\"\\\"\\n Indicates that the user is listed as one of the possible approvers,\\n but does not necessarily mean that he or she is the next in the chain to approve.\\n \\\"\\\"\\\"\\n isUserAuthorized: Boolean!\\n \\\"\\\"\\\"\\n Indicates that the user is next in the approval chain.\\n This means that they must take an approval or rejection action.\\n \\\"\\\"\\\"\\n isUserNextAuthorizer: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTrigger {\\n \\\"\\\"\\\"\\n Trigger condition.\\n \\\"\\\"\\\"\\n condition: CommercialAuthorizationRuleTriggerCondition!\\n \\\"\\\"\\\"\\n Trigger effect.\\n \\\"\\\"\\\"\\n effect: CommercialAuthorizationRuleTriggerEffect!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger condition.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTriggerCondition {\\n \\\"\\\"\\\"\\n Condition type.\\n \\\"\\\"\\\"\\n conditionType: Int!\\n \\\"\\\"\\\"\\n Condition description.\\n \\\"\\\"\\\"\\n description: String\\n \\\"\\\"\\\"\\n Less than value.\\n \\\"\\\"\\\"\\n lessThan: Float\\n \\\"\\\"\\\"\\n Greater than value.\\n \\\"\\\"\\\"\\n greatherThan: Float\\n \\\"\\\"\\\"\\n Condition expression.\\n \\\"\\\"\\\"\\n expression: String\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule trigger effect.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleTriggerEffect {\\n \\\"\\\"\\\"\\n Effect description.\\n \\\"\\\"\\\"\\n description: String\\n \\\"\\\"\\\"\\n Effect type.\\n \\\"\\\"\\\"\\n effectType: Int!\\n \\\"\\\"\\\"\\n Function path.\\n \\\"\\\"\\\"\\n funcPath: String\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule score interval.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleScoreInterval {\\n \\\"\\\"\\\"\\n Accept score threshold.\\n \\\"\\\"\\\"\\n accept: Float!\\n \\\"\\\"\\\"\\n Deny score threshold.\\n \\\"\\\"\\\"\\n deny: Float!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule authorization data.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleAuthorizationData {\\n \\\"\\\"\\\"\\n Indicates if all approvals are required.\\n \\\"\\\"\\\"\\n requireAllApprovals: Boolean!\\n \\\"\\\"\\\"\\n List of authorizers.\\n \\\"\\\"\\\"\\n authorizers: [CommercialAuthorizationRuleAuthorizer!]!\\n}\\n\\n\\\"\\\"\\\"\\nCommercial Authorization rule authorizer.\\n\\\"\\\"\\\"\\ntype CommercialAuthorizationRuleAuthorizer {\\n \\\"\\\"\\\"\\n Authorizer ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Authorizer email.\\n \\\"\\\"\\\"\\n email: String\\n \\\"\\\"\\\"\\n Authorizer type.\\n \\\"\\\"\\\"\\n type: String!\\n \\\"\\\"\\\"\\n Authorization date.\\n \\\"\\\"\\\"\\n authorizationDate: String\\n}\\n\\n\\\"\\\"\\\"\\nInput to get commercial authorizations by order ID.\\n\\\"\\\"\\\"\\ninput ICommercialAuthorizationByOrderId {\\n \\\"\\\"\\\"\\n Order ID to get commercial authorizations for.\\n \\\"\\\"\\\"\\n orderId: String!\\n}\\n\\n\\\"\\\"\\\"\\nInput to process order authorization (approve or reject).\\n\\\"\\\"\\\"\\ninput IProcessOrderAuthorization {\\n \\\"\\\"\\\"\\n Order authorization ID.\\n \\\"\\\"\\\"\\n orderAuthorizationId: String!\\n \\\"\\\"\\\"\\n Rule ID associated with the authorization.\\n \\\"\\\"\\\"\\n ruleId: String!\\n \\\"\\\"\\\"\\n Dimension ID associated with the authorization.\\n \\\"\\\"\\\"\\n dimensionId: String!\\n \\\"\\\"\\\"\\n Whether the authorization is approved (true) or rejected (false).\\n \\\"\\\"\\\"\\n approved: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nProcess Order Authorization response.\\n\\\"\\\"\\\"\\ntype ProcessOrderAuthorizationResponse {\\n \\\"\\\"\\\"\\n Indicates if authorization is pending for other authorizers.\\n \\\"\\\"\\\"\\n isPendingForOtherAuthorizer: Boolean!\\n \\\"\\\"\\\"\\n The updated rule for authorization, if any.\\n \\\"\\\"\\\"\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n}\\n\\n\\\"\\\"\\\"\\nExtended Commercial Authorization rule with additional process context.\\n\\\"\\\"\\\"\\ntype ProcessOrderAuthorizationRule {\\n \\\"\\\"\\\"\\n Order authorization ID.\\n \\\"\\\"\\\"\\n orderAuthorizationId: String!\\n \\\"\\\"\\\"\\n Dimension ID.\\n \\\"\\\"\\\"\\n dimensionId: String!\\n \\\"\\\"\\\"\\n Base rule information.\\n \\\"\\\"\\\"\\n rule: CommercialAuthorizationRule!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInput for uploading a file to the Order Entry Service.\\nThe file is transmitted as a Base64-encoded string so it can travel\\nthrough the standard GraphQL JSON pipeline without multipart support.\\n\\\"\\\"\\\"\\ninput IOrderEntryUpload {\\n \\\"\\\"\\\"\\n Base64-encoded file content.\\n \\\"\\\"\\\"\\n fileContent: String!\\n \\\"\\\"\\\"\\n Original file name (e.g. \\\"order.csv\\\").\\n \\\"\\\"\\\"\\n fileName: String!\\n \\\"\\\"\\\"\\n MIME type of the file (e.g. \\\"text/csv\\\", \\\"image/png\\\").\\n \\\"\\\"\\\"\\n mimeType: String!\\n}\\n\\n\\\"\\\"\\\"\\nResult returned after uploading a file to the Order Entry Service.\\n\\\"\\\"\\\"\\ntype StoreOrderEntryUploadResult {\\n objectKey: String!\\n}\\n\\ninput IOrderEntryOperation {\\n objectKey: String!\\n orderFormId: String\\n sessionToken: String\\n}\\n\\ntype StoreOrderEntryOperationResult {\\n operationId: String!\\n}\\n\\ntype StoreOrderEntryMissingItem {\\n itemId: String!\\n itemName: String\\n reason: String!\\n}\\n\\ntype StoreOrderEntryOperationStatus {\\n status: String!\\n entityId: String\\n message: String\\n missingItems: [StoreOrderEntryMissingItem!]\\n}\\n\\ntype StoreOrderFormCartItem {\\n id: String!\\n name: String!\\n price: Int!\\n listPrice: Int!\\n quantity: Int!\\n imageUrl: String\\n availability: String!\\n seller: String!\\n unitMultiplier: Float\\n}\\n\"","export default \"\\\"\\\"\\\"\\nOrganization.\\n\\\"\\\"\\\"\\ntype StoreOrganization {\\n \\\"\\\"\\\"\\n Organization ID.\\n \\\"\\\"\\\"\\n identifier: String!\\n}\\n\\n\\\"\\\"\\\"\\nOrganization input.\\n\\\"\\\"\\\"\\ninput IStoreOrganization {\\n \\\"\\\"\\\"\\n Organization ID.\\n \\\"\\\"\\\"\\n identifier: String!\\n}\\n\\n\\\"\\\"\\\"\\nA commercial contract available to a buyer's Organization Unit.\\n\\\"\\\"\\\"\\ntype StoreContract {\\n \\\"\\\"\\\"\\n Contract identifier (the contract/scope ID associated with the Organization Unit).\\n \\\"\\\"\\\"\\n id: ID!\\n \\\"\\\"\\\"\\n Human-readable corporate name of the contract (resolved from MasterData).\\n \\\"\\\"\\\"\\n corporateName: String!\\n \\\"\\\"\\\"\\n Indicates whether this contract is the one currently active in the session.\\n \\\"\\\"\\\"\\n isActive: Boolean!\\n \\\"\\\"\\\"\\n Indicates whether this contract is the Organization Unit's default contract.\\n \\\"\\\"\\\"\\n isDefault: Boolean!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nWhenever you make a query that allows for pagination, such as `allProducts` or `allCollections`, you can check `StorePageInfo` to learn more about the complete set of items and use it to paginate your queries.\\n\\\"\\\"\\\"\\ntype StorePageInfo {\\n \\\"\\\"\\\"\\n Indicates whether there is at least one more page with items after the ones returned in the current query.\\n \\\"\\\"\\\"\\n hasNextPage: Boolean!\\n \\\"\\\"\\\"\\n Indicates whether there is at least one more page with items before the ones returned in the current query.\\n \\\"\\\"\\\"\\n hasPreviousPage: Boolean!\\n \\\"\\\"\\\"\\n Cursor corresponding to the first possible item.\\n \\\"\\\"\\\"\\n startCursor: String!\\n \\\"\\\"\\\"\\n Cursor corresponding to the last possible item.\\n \\\"\\\"\\\"\\n endCursor: String!\\n \\\"\\\"\\\"\\n Total number of items (products or collections), not pages.\\n \\\"\\\"\\\"\\n totalCount: Int!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInput type for setting a new password.\\n\\\"\\\"\\\"\\ninput ISetPassword {\\n \\\"\\\"\\\"\\n The email of the user for whom the password is being set.\\n \\\"\\\"\\\"\\n email: String!\\n\\n \\\"\\\"\\\"\\n The new password to be set for the user.\\n \\\"\\\"\\\"\\n newPassword: String!\\n\\n \\\"\\\"\\\"\\n The current password of the user, required for verification before changing to the new password.\\n \\\"\\\"\\\"\\n currentPassword: String!\\n\\n \\\"\\\"\\\"\\n Optional access key for the user, used in some authentication flows.\\n \\\"\\\"\\\"\\n accesskey: String\\n\\n \\\"\\\"\\\"\\n Optional reCAPTCHA token for security verification.\\n \\\"\\\"\\\"\\n recaptcha: String\\n}\\n\\n\\\"\\\"\\\"\\nResponse type for setting a new password.\\n\\\"\\\"\\\"\\ntype SetPasswordResponse {\\n \\\"\\\"\\\"\\n Indicates whether the password was successfully set.\\n \\\"\\\"\\\"\\n success: Boolean!\\n \\\"\\\"\\\"\\n Message providing additional information about the operation.\\n \\\"\\\"\\\"\\n message: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nClient profile data.\\n\\\"\\\"\\\"\\ntype StorePerson {\\n \\\"\\\"\\\"\\n Client ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Client email.\\n \\\"\\\"\\\"\\n email: String!\\n \\\"\\\"\\\"\\n Client first name.\\n \\\"\\\"\\\"\\n givenName: String!\\n \\\"\\\"\\\"\\n Client last name.\\n \\\"\\\"\\\"\\n familyName: String!\\n}\\n\\n\\\"\\\"\\\"\\nClient profile data.\\n\\\"\\\"\\\"\\ninput IStorePerson {\\n \\\"\\\"\\\"\\n Client ID.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Client email.\\n \\\"\\\"\\\"\\n email: String!\\n \\\"\\\"\\\"\\n Client first name.\\n \\\"\\\"\\\"\\n givenName: String!\\n \\\"\\\"\\\"\\n Client last name.\\n \\\"\\\"\\\"\\n familyName: String!\\n}\\n\"","export default \"type PickupPointAddress {\\n \\\"\\\"\\\"\\n Address city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Address neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n Address number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n Address postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Address street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n Address state.\\n \\\"\\\"\\\"\\n state: String\\n}\\n\\ntype BusinessHour {\\n \\\"\\\"\\\"\\n Number that represents the day of the week.\\n \\\"\\\"\\\"\\n dayOfWeek: Int\\n \\\"\\\"\\\"\\n Business hour opening time.\\n \\\"\\\"\\\"\\n openingTime: String\\n \\\"\\\"\\\"\\n Business hour closing time.\\n \\\"\\\"\\\"\\n closingTime: String\\n}\\n\\ntype PickupPointDistance {\\n \\\"\\\"\\\"\\n Pickup point ID.\\n \\\"\\\"\\\"\\n pickupId: String\\n \\\"\\\"\\\"\\n Pickup point distance.\\n \\\"\\\"\\\"\\n distance: Float\\n \\\"\\\"\\\"\\n Pickup point name.\\n \\\"\\\"\\\"\\n pickupName: String\\n \\\"\\\"\\\"\\n Whether the pickup point is active.\\n \\\"\\\"\\\"\\n isActive: Boolean\\n \\\"\\\"\\\"\\n Pickup point address.\\n \\\"\\\"\\\"\\n address: PickupPointAddress\\n \\\"\\\"\\\"\\n Pickup point business hours.\\n \\\"\\\"\\\"\\n businessHours: [BusinessHour]\\n}\\n\\ntype PickupPoints {\\n \\\"\\\"\\\"\\n List of pickup point distances for the given location.\\n \\\"\\\"\\\"\\n pickupPointDistances: [PickupPointDistance]\\n \\\"\\\"\\\"\\n Hash of the pickup points data.\\n \\\"\\\"\\\"\\n pickupPointsHash: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ntype StoreProduct {\\n \\\"\\\"\\\"\\n Meta tag data.\\n \\\"\\\"\\\"\\n seo: StoreSeo!\\n \\\"\\\"\\\"\\n List of items consisting of chain linked web pages, ending with the current page.\\n \\\"\\\"\\\"\\n breadcrumbList: StoreBreadcrumbList!\\n \\\"\\\"\\\"\\n Corresponding collection URL slug, with which to retrieve this entity.\\n \\\"\\\"\\\"\\n slug: String!\\n \\\"\\\"\\\"\\n Product name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.\\n \\\"\\\"\\\"\\n productID: String!\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n brand: StoreBrand!\\n \\\"\\\"\\\"\\n Product description.\\n \\\"\\\"\\\"\\n description: String!\\n \\\"\\\"\\\"\\n Array of images.\\n \\\"\\\"\\\"\\n image(context: String = \\\"generic\\\", limit: Int = -1): [StoreImage!]!\\n \\\"\\\"\\\"\\n Aggregate offer information.\\n \\\"\\\"\\\"\\n offers: StoreAggregateOffer!\\n \\\"\\\"\\\"\\n Stock Keeping Unit. Merchant-specific ID for the product.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Global Trade Item Number.\\n \\\"\\\"\\\"\\n gtin: String!\\n \\\"\\\"\\\"\\n Manufacturer Part Number. Identifies the product to its manufacturer.\\n \\\"\\\"\\\"\\n mpn: String!\\n \\\"\\\"\\\"\\n Array with review information.\\n \\\"\\\"\\\"\\n review: [StoreReview!]!\\n \\\"\\\"\\\"\\n Aggregate ratings data.\\n \\\"\\\"\\\"\\n aggregateRating: StoreAggregateRating!\\n \\\"\\\"\\\"\\n Indicates product group related to this product.\\n \\\"\\\"\\\"\\n isVariantOf: StoreProductGroup!\\n \\\"\\\"\\\"\\n Array of additional properties.\\n \\\"\\\"\\\"\\n additionalProperty: [StorePropertyValue!]!\\n \\\"\\\"\\\"\\n The product's release date. Formatted using https://en.wikipedia.org/wiki/ISO_8601\\n \\\"\\\"\\\"\\n releaseDate: String!\\n \\\"\\\"\\\"\\n Sku Unit Multiplier\\n \\\"\\\"\\\"\\n unitMultiplier: Float\\n \\\"\\\"\\\"\\n Advertisement information about the product.\\n \\\"\\\"\\\"\\n advertisement: Advertisement\\n \\\"\\\"\\\"\\n Indicates whether the product has specifications.\\n \\\"\\\"\\\"\\n hasSpecifications: Boolean\\n \\\"\\\"\\\"\\n Indicate the specifications of a product.\\n \\\"\\\"\\\"\\n skuSpecifications: [SkuSpecification!]!\\n \\\"\\\"\\\"\\n Indicate the specifications of a group of SKUs.\\n \\\"\\\"\\\"\\n specificationGroups: [SpecificationGroup!]!\\n \\\"\\\"\\\"\\n Delivery Promise product's badge.\\n \\\"\\\"\\\"\\n deliveryPromiseBadges: [DeliveryPromiseBadge]\\n \\\"\\\"\\\"\\n Localized versions of this product for all available locales.\\n Only populated when localization is enabled.\\n \\\"\\\"\\\"\\n otherLocales: [StoreProductLocale!]\\n \\\"\\\"\\\"\\n Slug for the store's default locale, including the SKU ID suffix.\\n Navigation fallback for the locale selector when the target locale is absent\\n from `otherLocales`. Best-effort: it may point at a slug the catalog has not\\n registered for the default locale, so it must never be used to build hreflang\\n annotations. Only populated when localization is enabled.\\n \\\"\\\"\\\"\\n defaultLocaleSlug: String\\n}\\n\\n\\\"\\\"\\\"\\nLocalized product data for a specific locale.\\n\\\"\\\"\\\"\\ntype StoreProductLocale {\\n \\\"\\\"\\\"\\n Locale code (e.g. \\\"pt-BR\\\", \\\"it-IT\\\").\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Localized product slug including the SKU ID suffix (e.g. \\\"adidas-polo-uomo-65\\\").\\n \\\"\\\"\\\"\\n slug: String!\\n}\\n\\ntype SkuSpecification {\\n field: SKUSpecificationField!\\n values: [SKUSpecificationValue!]!\\n}\\n\\ntype SKUSpecificationValue {\\n name: String!\\n id: String\\n fieldId: String\\n originalName: String\\n}\\n\\ntype SKUSpecificationField {\\n name: String!\\n originalName: String\\n id: String\\n}\\n\\ntype SpecificationGroup {\\n name: String!\\n originalName: String!\\n specifications: [Specification!]!\\n}\\n\\ntype Specification {\\n name: String!\\n originalName: String!\\n values: [String!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ninput IStoreProduct {\\n \\\"\\\"\\\"\\n Stock Keeping Unit. Merchant-specific ID for the product.\\n \\\"\\\"\\\"\\n sku: String!\\n \\\"\\\"\\\"\\n Product name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Array of product images.\\n \\\"\\\"\\\"\\n image: [IStoreImage!]!\\n \\\"\\\"\\\"\\n Custom Product Additional Properties.\\n \\\"\\\"\\\"\\n additionalProperty: [IStorePropertyValue!]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProduct group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.\\n\\\"\\\"\\\"\\ntype StoreProductGroup {\\n \\\"\\\"\\\"\\n Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#).\\n \\\"\\\"\\\"\\n hasVariant: [StoreProduct!]!\\n \\\"\\\"\\\"\\n Product group ID.\\n \\\"\\\"\\\"\\n productGroupID: String!\\n \\\"\\\"\\\"\\n Product group name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Array of additional properties.\\n \\\"\\\"\\\"\\n additionalProperty: [StorePropertyValue!]!\\n \\\"\\\"\\\"\\n Object containing data structures to facilitate handling different SKU\\n variant properties. Specially useful for implementing SKU selection \\n components.\\n \\\"\\\"\\\"\\n skuVariants: SkuVariants\\n}\\n\"","export default \"type Profile {\\n \\\"\\\"\\\"\\n Collection of user's address\\n \\\"\\\"\\\"\\n addresses: [ProfileAddress]\\n}\\n\\ntype ProfileAddress {\\n \\\"\\\"\\\"\\n ProfileAddress address name/id.\\n \\\"\\\"\\\"\\n addressName: String\\n \\\"\\\"\\\"\\n ProfileAddress address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n ProfileAddress postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n ProfileAddress city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n ProfileAddress state.\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n ProfileAddress country.\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n ProfileAddress street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n ProfileAddress number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n ProfileAddress neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n ProfileAddress complement.\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n ProfileAddress reference.\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n ProfileAddress receiver name.\\n \\\"\\\"\\\"\\n receiverName: String\\n \\\"\\\"\\\"\\n ProfileAddress geo coordinate.\\n \\\"\\\"\\\"\\n geoCoordinate: [Float]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nProperties that can be associated with products and products groups.\\n\\\"\\\"\\\"\\ntype StorePropertyValue {\\n \\\"\\\"\\\"\\n Property id. This propert changes according to the content of the object.\\n \\\"\\\"\\\"\\n propertyID: String!\\n \\\"\\\"\\\"\\n Property value. May hold a string or the string representation of an object.\\n \\\"\\\"\\\"\\n value: ObjectOrString!\\n \\\"\\\"\\\"\\n Property name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Specifies the nature of the value\\n \\\"\\\"\\\"\\n valueReference: ObjectOrString!\\n}\\n\\ninput IStorePropertyValue {\\n \\\"\\\"\\\"\\n Property id. This propert changes according to the content of the object.\\n \\\"\\\"\\\"\\n propertyID: String\\n \\\"\\\"\\\"\\n Property value. May hold a string or the string representation of an object.\\n \\\"\\\"\\\"\\n value: ObjectOrString!\\n \\\"\\\"\\\"\\n Property name.\\n \\\"\\\"\\\"\\n name: String!\\n \\\"\\\"\\\"\\n Specifies the nature of the value\\n \\\"\\\"\\\"\\n valueReference: ObjectOrString!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nEach product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.\\n\\\"\\\"\\\"\\ntype StoreProductEdge {\\n \\\"\\\"\\\"\\n Each product node contains the information of a product returned by the query.\\n \\\"\\\"\\\"\\n node: StoreProduct!\\n \\\"\\\"\\\"\\n Product cursor. Used as pagination reference.\\n \\\"\\\"\\\"\\n cursor: String!\\n}\\n\\n\\\"\\\"\\\"\\nProduct connections, including pagination information and products returned by the query.\\n\\\"\\\"\\\"\\ntype StoreProductConnection {\\n \\\"\\\"\\\"\\n Product pagination information.\\n \\\"\\\"\\\"\\n pageInfo: StorePageInfo!\\n \\\"\\\"\\\"\\n Array with product connection edges, each containing a product and a corresponding cursor.\\n \\\"\\\"\\\"\\n edges: [StoreProductEdge!]!\\n}\\n\\n\\\"\\\"\\\"\\nEach collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.\\n\\\"\\\"\\\"\\ntype StoreCollectionEdge {\\n \\\"\\\"\\\"\\n Each collection node contains the information of a product collection returned by the query.\\n \\\"\\\"\\\"\\n node: StoreCollection!\\n \\\"\\\"\\\"\\n Collection cursor. Used as pagination reference.\\n \\\"\\\"\\\"\\n cursor: String!\\n}\\n\\n\\\"\\\"\\\"\\nCollection connections, including pagination information and collections returned by the query.\\n\\\"\\\"\\\"\\ntype StoreCollectionConnection {\\n \\\"\\\"\\\"\\n Collection pagination information.\\n \\\"\\\"\\\"\\n pageInfo: StorePageInfo!\\n \\\"\\\"\\\"\\n Array with collection connection page edges, each containing a collection and a corresponding cursor..\\n \\\"\\\"\\\"\\n edges: [StoreCollectionEdge!]!\\n}\\n\\n\\\"\\\"\\\"\\nProduct search results sorting options.\\n\\\"\\\"\\\"\\nenum StoreSort {\\n \\\"\\\"\\\"\\n Sort by price, from highest to lowest.\\n \\\"\\\"\\\"\\n price_desc\\n \\\"\\\"\\\"\\n Sort by price, from lowest to highest.\\n \\\"\\\"\\\"\\n price_asc\\n \\\"\\\"\\\"\\n Sort by orders, from highest to lowest.\\n \\\"\\\"\\\"\\n orders_desc\\n \\\"\\\"\\\"\\n Sort by name, in reverse alphabetical order.\\n \\\"\\\"\\\"\\n name_desc\\n \\\"\\\"\\\"\\n Sort by name, in alphabetical order.\\n \\\"\\\"\\\"\\n name_asc\\n \\\"\\\"\\\"\\n Sort by release date, from highest to lowest.\\n \\\"\\\"\\\"\\n release_desc\\n \\\"\\\"\\\"\\n Sort by discount value, from highest to lowest.\\n \\\"\\\"\\\"\\n discount_desc\\n \\\"\\\"\\\"\\n Sort by product score, from highest to lowest.\\n \\\"\\\"\\\"\\n score_desc\\n}\\n\\n\\\"\\\"\\\"\\nSelected search facet input.\\n\\\"\\\"\\\"\\ninput IStoreSelectedFacet {\\n \\\"\\\"\\\"\\n Selected search facet key.\\n \\\"\\\"\\\"\\n key: String!\\n \\\"\\\"\\\"\\n Selected search facet value.\\n \\\"\\\"\\\"\\n value: String!\\n}\\n\\n\\\"\\\"\\\"\\nSearch facet type.\\n\\\"\\\"\\\"\\nenum StoreFacetType {\\n \\\"\\\"\\\"\\n Indicates boolean search facet.\\n \\\"\\\"\\\"\\n BOOLEAN\\n \\\"\\\"\\\"\\n Indicates range type search facet.\\n \\\"\\\"\\\"\\n RANGE\\n}\\n\\n\\\"\\\"\\\"\\nSuggestion term.\\n\\\"\\\"\\\"\\ntype StoreSuggestionTerm {\\n \\\"\\\"\\\"\\n The term.\\n \\\"\\\"\\\"\\n value: String!\\n \\\"\\\"\\\"\\n Its occurrences count.\\n \\\"\\\"\\\"\\n count: Int!\\n}\\n\\n\\\"\\\"\\\"\\nSuggestions information.\\n\\\"\\\"\\\"\\ntype StoreSuggestions {\\n \\\"\\\"\\\"\\n Array with suggestion terms.\\n \\\"\\\"\\\"\\n terms: [StoreSuggestionTerm!]!\\n \\\"\\\"\\\"\\n Array with suggestion products' information.\\n \\\"\\\"\\\"\\n products: [StoreProduct!]!\\n}\\n\\n\\\"\\\"\\\"\\nSearch result.\\n\\\"\\\"\\\"\\ntype SearchMetadata {\\n \\\"\\\"\\\"\\n Indicates if the search term was misspelled.\\n \\\"\\\"\\\"\\n isTermMisspelled: Boolean!\\n \\\"\\\"\\\"\\n Logical operator used to run the search.\\n \\\"\\\"\\\"\\n logicalOperator: String!\\n \\\"\\\"\\\"\\n Indicates how the search engine corrected the misspelled word by using fuzzy logic.\\n \\\"\\\"\\\"\\n fuzzy: String\\n}\\n\\n\\\"\\\"\\\"\\nSearch result.\\n\\\"\\\"\\\"\\ntype StoreSearchResult {\\n \\\"\\\"\\\"\\n Search result products.\\n \\\"\\\"\\\"\\n products: StoreProductConnection!\\n \\\"\\\"\\\"\\n Array of search result facets.\\n \\\"\\\"\\\"\\n facets: [StoreFacet!]!\\n \\\"\\\"\\\"\\n Search result suggestions.\\n \\\"\\\"\\\"\\n suggestions: StoreSuggestions!\\n \\\"\\\"\\\"\\n Search result metadata. Additional data can be used to send analytics events.\\n \\\"\\\"\\\"\\n metadata: SearchMetadata\\n \\\"\\\"\\\"\\n Search result searchId. Unique identifier for the search query can be used to correlate search analytics events.\\n \\\"\\\"\\\"\\n searchId: String!\\n}\\n\\ninput IGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\ntype ProductCountResult {\\n \\\"\\\"\\\"\\n Total product count.\\n \\\"\\\"\\\"\\n total: Int!\\n}\\n\\ntype Query {\\n \\\"\\\"\\\"\\n Returns the details of a product based on the specified locator.\\n \\\"\\\"\\\"\\n product(\\n \\\"\\\"\\\"\\n An array of selected search facets.\\n \\\"\\\"\\\"\\n locator: [IStoreSelectedFacet!]!\\n ): StoreProduct!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the details of a collection based on the collection slug.\\n \\\"\\\"\\\"\\n collection(\\n \\\"\\\"\\\"\\n Collection slug.\\n \\\"\\\"\\\"\\n slug: String!\\n ): StoreCollection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the result of a product, facet, or suggestion search.\\n \\\"\\\"\\\"\\n search(\\n \\\"\\\"\\\"\\n Search pagination argument, indicating how many results should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n \\\"\\\"\\\"\\n Search results sorting mode.\\n \\\"\\\"\\\"\\n sort: StoreSort = score_desc\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String = \\\"\\\"\\n \\\"\\\"\\\"\\n Array of selected search facets.\\n \\\"\\\"\\\"\\n selectedFacets: [IStoreSelectedFacet!]\\n \\\"\\\"\\\"\\n Search advertisement products return in result.\\n \\\"\\\"\\\"\\n sponsoredCount: Int\\n ): StoreSearchResult!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about all products.\\n \\\"\\\"\\\"\\n allProducts(\\n \\\"\\\"\\\"\\n Product pagination argument, indicating how many items should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n ): StoreProductConnection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about selected products.\\n \\\"\\\"\\\"\\n products(productIds: [String!]!): [StoreProduct!]!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about all collections.\\n \\\"\\\"\\\"\\n allCollections(\\n \\\"\\\"\\\"\\n Collection pagination argument, indicating how many items should be returned from the complete result list.\\n \\\"\\\"\\\"\\n first: Int!\\n \\\"\\\"\\\"\\n Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\\n \\\"\\\"\\\"\\n after: String\\n ): StoreCollectionConnection!\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about shipping simulation.\\n \\\"\\\"\\\"\\n shipping(\\n \\\"\\\"\\\"\\n List of SKU products\\n \\\"\\\"\\\"\\n items: [IShippingItem!]!\\n \\\"\\\"\\\"\\n Postal code to freight calculator\\n \\\"\\\"\\\"\\n postalCode: String!\\n \\\"\\\"\\\"\\n Country of postal code\\n \\\"\\\"\\\"\\n country: String!\\n ): ShippingData\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns if there's a redirect for a search.\\n \\\"\\\"\\\"\\n redirect(\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String\\n \\\"\\\"\\\"\\n Array of selected search facets.\\n \\\"\\\"\\\"\\n selectedFacets: [IStoreSelectedFacet!]\\n ): StoreRedirect\\n\\n \\\"\\\"\\\"\\n Returns a list of sellers available for a specific localization.\\n \\\"\\\"\\\"\\n sellers(\\n \\\"\\\"\\\"\\n Postal code input to calculate sellers\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Geocoordinates input to calculate sellers\\n \\\"\\\"\\\"\\n geoCoordinates: IGeoCoordinates\\n \\\"\\\"\\\"\\n Country of localization\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Sales channel of the navigation\\n \\\"\\\"\\\"\\n salesChannel: String\\n ): SellersData\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the profile.\\n \\\"\\\"\\\"\\n profile(\\n \\\"\\\"\\\"\\n Identifier for user.\\n \\\"\\\"\\\"\\n id: String!\\n ): Profile\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the total product count information based on a specific location accessible through the VTEX segment cookie.\\n \\\"\\\"\\\"\\n productCount(\\n \\\"\\\"\\\"\\n Search term.\\n \\\"\\\"\\\"\\n term: String\\n ): ProductCountResult\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the Details of an User Order.\\n \\\"\\\"\\\"\\n userOrder(\\n \\\"\\\"\\\"\\n Identifier for the order.\\n \\\"\\\"\\\"\\n orderId: String!\\n ): UserOrderResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the list of saved credit cards for the current user.\\n \\\"\\\"\\\"\\n listCreditCards: SavedCardListResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Whether the current user holds the ad-hoc card platform permission, which\\n gates personal card management for Unit/Contract-affiliated buyers.\\n\\n Resolved from the user's roles by License Manager — it is not a session token\\n claim. Fails open (`true`) when the permission service is unreachable, so an\\n outage never locks buyers out of their own cards.\\n \\\"\\\"\\\"\\n hasAdHocCardAccess: Boolean!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 60, staleWhileRevalidate: 300)\\n\\n \\\"\\\"\\\"\\n Returns the list of Orders that the User can view.\\n \\\"\\\"\\\"\\n listUserOrders(\\n \\\"\\\"\\\"\\n Page number of the list of orders.\\n \\\"\\\"\\\"\\n page: Int\\n \\\"\\\"\\\"\\n Quantity of items per page of the list of orders.\\n \\\"\\\"\\\"\\n perPage: Int\\n \\\"\\\"\\\"\\n Status of the list of orders.\\n \\\"\\\"\\\"\\n status: [String]\\n \\\"\\\"\\\"\\n Initial date of the list of orders.\\n \\\"\\\"\\\"\\n dateInitial: String\\n \\\"\\\"\\\"\\n Final date of the list of orders.\\n \\\"\\\"\\\"\\n dateFinal: String\\n \\\"\\\"\\\"\\n Text used to full text filter of the list of orders.\\n \\\"\\\"\\\"\\n text: String\\n \\\"\\\"\\\"\\n Client email used to filter of the list of orders.\\n \\\"\\\"\\\"\\n clientEmail: String\\n \\\"\\\"\\\"\\n Filter orders that are pending user approval.\\n \\\"\\\"\\\"\\n pendingMyApproval: Boolean\\n ): UserOrderListMinimalResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the list of Quotes that the authenticated Buyer can view.\\n \\\"\\\"\\\"\\n listUserQuotes(\\n \\\"\\\"\\\"\\n Page number (1-based).\\n \\\"\\\"\\\"\\n page: Int\\n \\\"\\\"\\\"\\n Number of items per page.\\n \\\"\\\"\\\"\\n perPage: Int\\n \\\"\\\"\\\"\\n Filter by quote status values.\\n \\\"\\\"\\\"\\n status: [String]\\n \\\"\\\"\\\"\\n Filter quotes created on or after this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n createdAtFrom: String\\n \\\"\\\"\\\"\\n Filter quotes created on or before this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n createdAtTo: String\\n \\\"\\\"\\\"\\n Filter quotes expiring on or after this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n expiresAtFrom: String\\n \\\"\\\"\\\"\\n Filter quotes expiring on or before this ISO 8601 date-time.\\n \\\"\\\"\\\"\\n expiresAtTo: String\\n \\\"\\\"\\\"\\n Filter quotes by label (partial match).\\n \\\"\\\"\\\"\\n label: String\\n ): UserQuoteListResult\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the current user details.\\n \\\"\\\"\\\"\\n userDetails: StoreUserDetails!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns the account profile information for the current authenticated user (b2b or b2c user).\\n \\\"\\\"\\\"\\n accountProfile: StoreAccountProfile!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns information about the user validation.\\n \\\"\\\"\\\"\\n validateUser: ValidateUserData\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Lists the commercial contracts associated with the given Organization Unit,\\n resolved to human-readable corporate names. Governed: only contracts associated\\n with the authenticated buyer's Organization Unit are returned.\\n \\\"\\\"\\\"\\n availableContracts(\\n \\\"\\\"\\\"\\n The Organization Unit identifier whose contracts will be listed.\\n \\\"\\\"\\\"\\n orgUnitId: String!\\n ): [StoreContract!]! @auth @cacheControl(scope: \\\"private\\\", sMaxAge: 0)\\n\\n \\\"\\\"\\\"\\n Returns whether the current authenticated user belongs to a B2B organization unit.\\n \\\"\\\"\\\"\\n isOrganizationMember: Boolean!\\n @auth\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n\\n \\\"\\\"\\\"\\n Returns a list of pickup points near to the given geo coordinates.\\n \\\"\\\"\\\"\\n pickupPoints(\\n \\\"\\\"\\\"\\n Geo coordinates input.\\n \\\"\\\"\\\"\\n geoCoordinates: IStoreGeoCoordinates\\n ): PickupPoints\\n @cacheControl(scope: \\\"public\\\", sMaxAge: 300, staleWhileRevalidate: 3600)\\n \\\"\\\"\\\"\\n Returns the status of an Order Entry Service operation by its ID.\\n \\\"\\\"\\\"\\n orderEntryOperation(operationId: String!): StoreOrderEntryOperationStatus\\n @auth\\n \\\"\\\"\\\"\\n Returns the items in an orderForm by its ID.\\n \\\"\\\"\\\"\\n orderFormItems(orderFormId: String!): [StoreOrderFormCartItem!]! @auth\\n \\\"\\\"\\\"\\n Returns personalized product recommendations for a given campaign.\\n \\\"\\\"\\\"\\n recommendations(\\n campaignVrn: String!\\n userId: String\\n products: [String!]\\n ): RecommendationResponse!\\n @cacheControl(scope: \\\"private\\\", sMaxAge: 120, staleWhileRevalidate: 3600)\\n}\\n\\ntype ValidateUserData {\\n \\\"\\\"\\\"\\n Indicates if the user is valid.\\n \\\"\\\"\\\"\\n isValid: Boolean!\\n}\\n\\n\\\"\\\"\\\"\\nRedirect informations, including url returned by the query.\\nhttps://schema.org/Thing\\n\\\"\\\"\\\"\\ntype StoreRedirect {\\n \\\"\\\"\\\"\\n URL to redirect\\n \\\"\\\"\\\"\\n url: String\\n}\\n\\n\\\"\\\"\\\"\\nRegionalization with sellers information.\\n\\\"\\\"\\\"\\ntype SellersData {\\n \\\"\\\"\\\"\\n Identification of region.\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n List of sellers.\\n \\\"\\\"\\\"\\n sellers: [SellerInfo]\\n}\\n\\n\\\"\\\"\\\"\\nInformation of sellers.\\n\\\"\\\"\\\"\\ntype SellerInfo {\\n \\\"\\\"\\\"\\n Identification of the seller\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n Name of the seller\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n Logo of the seller\\n \\\"\\\"\\\"\\n logo: String\\n}\\n\\n\\\"\\\"\\\"\\nUser details information.\\n\\\"\\\"\\\"\\ntype StoreUserDetails {\\n \\\"\\\"\\\"\\n User's username (login). May differ from email when Alternative Login is enabled.\\n \\\"\\\"\\\"\\n username: String\\n \\\"\\\"\\\"\\n User's name.\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n User's email.\\n \\\"\\\"\\\"\\n email: String\\n \\\"\\\"\\\"\\n User's phone number.\\n \\\"\\\"\\\"\\n phone: String\\n \\\"\\\"\\\"\\n User's role.\\n \\\"\\\"\\\"\\n role: [String]\\n \\\"\\\"\\\"\\n User's organizational unit.\\n \\\"\\\"\\\"\\n orgUnit: String\\n}\\n\\n\\\"\\\"\\\"\\nAccount profile information.\\n\\\"\\\"\\\"\\ntype StoreAccountProfile {\\n name: String\\n email: String\\n id: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nSummary of a quote returned in list results.\\n\\\"\\\"\\\"\\ntype UserQuoteSummary {\\n \\\"\\\"\\\"\\n Unique identifier of the quote.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Status of the quote.\\n \\\"\\\"\\\"\\n status: String!\\n \\\"\\\"\\\"\\n Optional label assigned to the quote.\\n \\\"\\\"\\\"\\n label: String\\n \\\"\\\"\\\"\\n ISO 8601 date-time when the quote was created.\\n \\\"\\\"\\\"\\n createdAt: String!\\n \\\"\\\"\\\"\\n ISO 8601 date-time when the quote expires.\\n \\\"\\\"\\\"\\n expiresAt: String!\\n \\\"\\\"\\\"\\n Total amount of the quote.\\n \\\"\\\"\\\"\\n amount: Float!\\n \\\"\\\"\\\"\\n Name or email of the user who created the quote.\\n \\\"\\\"\\\"\\n createdBy: String\\n}\\n\\n\\\"\\\"\\\"\\nResult returned by the listUserQuotes query.\\n\\\"\\\"\\\"\\ntype UserQuoteListResult {\\n \\\"\\\"\\\"\\n Array of quote summaries for the current page.\\n \\\"\\\"\\\"\\n list: [UserQuoteSummary!]!\\n \\\"\\\"\\\"\\n Pagination information.\\n \\\"\\\"\\\"\\n paging: UserQuoteListPaging!\\n}\\n\\n\\\"\\\"\\\"\\nPagination metadata for the quotes list.\\n\\\"\\\"\\\"\\ntype UserQuoteListPaging {\\n \\\"\\\"\\\"\\n Total number of quotes matching the query.\\n \\\"\\\"\\\"\\n total: Int!\\n \\\"\\\"\\\"\\n Current page number (1-based).\\n \\\"\\\"\\\"\\n currentPage: Int!\\n \\\"\\\"\\\"\\n Number of items per page.\\n \\\"\\\"\\\"\\n perPage: Int!\\n}\\n\"","export default \"type RecommendationResponse {\\n products: [StoreProduct!]!\\n correlationId: String!\\n campaign: RecommendationCampaign!\\n}\\n\\ntype RecommendationCampaign {\\n id: String!\\n title: String\\n type: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nInformation of a given review rating.\\n\\\"\\\"\\\"\\ntype StoreReviewRating {\\n \\\"\\\"\\\"\\n Rating value.\\n \\\"\\\"\\\"\\n ratingValue: Float!\\n \\\"\\\"\\\"\\n Best rating value.\\n \\\"\\\"\\\"\\n bestRating: Float!\\n}\\n\\n\\\"\\\"\\\"\\nInformation of a given review.\\n\\\"\\\"\\\"\\ntype StoreReview {\\n \\\"\\\"\\\"\\n Review rating information.\\n \\\"\\\"\\\"\\n reviewRating: StoreReviewRating!\\n \\\"\\\"\\\"\\n Review author.\\n \\\"\\\"\\\"\\n author: StoreAuthor!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nWhether a saved card is personally owned by the buyer or shared by their\\nOrganization/Contract. Resolved server-side by the Saved-cards service from\\nthe buyer's `useAdHocCard` role — never inferred client-side.\\n\\\"\\\"\\\"\\nenum CardOrigin {\\n personal\\n shared\\n}\\n\\n\\\"\\\"\\\"\\nA saved payment card returned by the Saved-cards service.\\n\\\"\\\"\\\"\\ntype SavedCard {\\n \\\"\\\"\\\"\\n Account identifier that owns the card.\\n \\\"\\\"\\\"\\n accountId: String\\n \\\"\\\"\\\"\\n First digits of the card (BIN).\\n \\\"\\\"\\\"\\n bin: String\\n \\\"\\\"\\\"\\n Masked card number, per PCI display rules.\\n \\\"\\\"\\\"\\n cardNumber: String\\n \\\"\\\"\\\"\\n Buyer- or admin-assigned nickname for the card (e.g. \\\"Team lunch card\\\"), when\\n the Saved-cards service has one on file. Absent for most cards — callers\\n should fall back to `paymentSystemName` for display.\\n \\\"\\\"\\\"\\n cardLabel: String\\n \\\"\\\"\\\"\\n Numeric payment system identifier.\\n \\\"\\\"\\\"\\n paymentSystem: String\\n \\\"\\\"\\\"\\n Human-readable payment system name (e.g. Visa, Mastercard).\\n \\\"\\\"\\\"\\n paymentSystemName: String\\n \\\"\\\"\\\"\\n Whether this card is the account default.\\n \\\"\\\"\\\"\\n isDefault: Boolean\\n \\\"\\\"\\\"\\n Whether this card is active.\\n \\\"\\\"\\\"\\n isActive: Boolean\\n \\\"\\\"\\\"\\n Whether this card is personally owned by the buyer or shared by their\\n Organization/Contract.\\n \\\"\\\"\\\"\\n origin: CardOrigin!\\n}\\n\\n\\\"\\\"\\\"\\nResult of listing the current user's saved credit cards.\\n\\\"\\\"\\\"\\ntype SavedCardListResult {\\n \\\"\\\"\\\"\\n The list of saved credit cards.\\n \\\"\\\"\\\"\\n list: [SavedCard!]\\n}\\n\"","export default \"\\\"\\\"\\\"\\nSearch Engine Optimization (SEO) tags data.\\n\\\"\\\"\\\"\\ntype StoreSeo {\\n \\\"\\\"\\\"\\n Title tag.\\n \\\"\\\"\\\"\\n title: String!\\n \\\"\\\"\\\"\\n Title template tag.\\n \\\"\\\"\\\"\\n titleTemplate: String!\\n \\\"\\\"\\\"\\n Description tag.\\n \\\"\\\"\\\"\\n description: String!\\n \\\"\\\"\\\"\\n Canonical tag.\\n \\\"\\\"\\\"\\n canonical: String!\\n}\\n\"","export default \"\\\"\\\"\\\"\\nCurrency information.\\n\\\"\\\"\\\"\\ntype StoreCurrency {\\n \\\"\\\"\\\"\\n Currency code (e.g: USD).\\n \\\"\\\"\\\"\\n code: String!\\n \\\"\\\"\\\"\\n Currency symbol (e.g: $).\\n \\\"\\\"\\\"\\n symbol: String!\\n}\\n\\ninput IStoreCurrency {\\n \\\"\\\"\\\"\\n Currency code (e.g: USD).\\n \\\"\\\"\\\"\\n code: String!\\n \\\"\\\"\\\"\\n Currency symbol (e.g: $).\\n \\\"\\\"\\\"\\n symbol: String!\\n}\\n\\n\\\"\\\"\\\"\\nMarketing information.\\n\\\"\\\"\\\"\\ntype StoreMarketingData {\\n utmCampaign: String\\n utmMedium: String\\n utmSource: String\\n utmiCampaign: String\\n utmiPart: String\\n utmiPage: String\\n}\\n\\ninput IStoreMarketingData {\\n utmCampaign: String\\n utmMedium: String\\n utmSource: String\\n utmiCampaign: String\\n utmiPart: String\\n utmiPage: String\\n}\\n\\n\\\"\\\"\\\"\\nGeographic coordinates information.\\n\\\"\\\"\\\"\\ntype StoreGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\ninput IStoreGeoCoordinates {\\n \\\"\\\"\\\"\\n The latitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n latitude: Float!\\n \\\"\\\"\\\"\\n The longitude of the geographic coordinates.\\n \\\"\\\"\\\"\\n longitude: Float!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery window information.\\n\\\"\\\"\\\"\\ntype StoreDeliveryWindow {\\n \\\"\\\"\\\"\\n The delivery window start date information.\\n \\\"\\\"\\\"\\n startDate: String!\\n \\\"\\\"\\\"\\n The delivery window end date information.\\n \\\"\\\"\\\"\\n endDate: String!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery window information.\\n\\\"\\\"\\\"\\ninput IStoreDeliveryWindow {\\n \\\"\\\"\\\"\\n The delivery window start date information.\\n \\\"\\\"\\\"\\n startDate: String!\\n \\\"\\\"\\\"\\n The delivery window end date information.\\n \\\"\\\"\\\"\\n endDate: String!\\n}\\n\\n\\\"\\\"\\\"\\nDelivery mode information.\\n\\\"\\\"\\\"\\ntype StoreDeliveryMode {\\n \\\"\\\"\\\"\\n The delivery channel information of the session.\\n \\\"\\\"\\\"\\n deliveryChannel: String!\\n \\\"\\\"\\\"\\n The delivery method information of the session.\\n \\\"\\\"\\\"\\n deliveryMethod: String!\\n \\\"\\\"\\\"\\n The delivery window information of the session.\\n \\\"\\\"\\\"\\n deliveryWindow: StoreDeliveryWindow\\n}\\n\\ninput IStoreDeliveryMode {\\n \\\"\\\"\\\"\\n The delivery channel information of the session.\\n \\\"\\\"\\\"\\n deliveryChannel: String!\\n \\\"\\\"\\\"\\n The delivery method information of the session.\\n \\\"\\\"\\\"\\n deliveryMethod: String!\\n \\\"\\\"\\\"\\n The delivery window information of the session.\\n \\\"\\\"\\\"\\n deliveryWindow: IStoreDeliveryWindow\\n}\\n\\n\\\"\\\"\\\"\\nSession information.\\n\\\"\\\"\\\"\\ntype StoreSession {\\n \\\"\\\"\\\"\\n Session locale.\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Session currency.\\n \\\"\\\"\\\"\\n currency: StoreCurrency!\\n \\\"\\\"\\\"\\n Session country.\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Session channel.\\n \\\"\\\"\\\"\\n channel: String\\n \\\"\\\"\\\"\\n Session delivery mode.\\n \\\"\\\"\\\"\\n deliveryMode: StoreDeliveryMode\\n \\\"\\\"\\\"\\n Session address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n Session city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Session postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Session input geoCoordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: StoreGeoCoordinates\\n \\\"\\\"\\\"\\n Session input person.\\n \\\"\\\"\\\"\\n person: StorePerson\\n \\\"\\\"\\\"\\n B2B Information.\\n \\\"\\\"\\\"\\n b2b: StoreB2B\\n \\\"\\\"\\\"\\n Marketing information.\\n \\\"\\\"\\\"\\n marketingData: StoreMarketingData\\n \\\"\\\"\\\"\\n Refresh token after Information.\\n \\\"\\\"\\\"\\n refreshAfter: String\\n}\\n\\ntype StoreB2B {\\n customerId: String!\\n isRepresentative: Boolean\\n unitName: String\\n unitId: String\\n firstName: String\\n lastName: String\\n userName: String\\n userEmail: String\\n savedPostalCode: String\\n contractName: String\\n organizationManager: Boolean\\n}\\n\\ninput IStoreB2B {\\n customerId: String!\\n isRepresentative: Boolean\\n unitName: String\\n unitId: String\\n firstName: String\\n lastName: String\\n userName: String\\n userEmail: String\\n savedPostalCode: String\\n contractName: String\\n organizationManager: Boolean\\n}\\n\\n\\\"\\\"\\\"\\nSession input.\\n\\\"\\\"\\\"\\ninput IStoreSession {\\n \\\"\\\"\\\"\\n Session input locale.\\n \\\"\\\"\\\"\\n locale: String!\\n \\\"\\\"\\\"\\n Session input currency.\\n \\\"\\\"\\\"\\n currency: IStoreCurrency!\\n \\\"\\\"\\\"\\n Session input country.\\n \\\"\\\"\\\"\\n country: String!\\n \\\"\\\"\\\"\\n Session input channel.\\n \\\"\\\"\\\"\\n channel: String\\n \\\"\\\"\\\"\\n Session input delivery mode.\\n \\\"\\\"\\\"\\n deliveryMode: IStoreDeliveryMode\\n \\\"\\\"\\\"\\n Session input address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n Session input city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n Session input postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n Session input geoCoordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: IStoreGeoCoordinates\\n \\\"\\\"\\\"\\n Session input person.\\n \\\"\\\"\\\"\\n person: IStorePerson\\n \\\"\\\"\\\"\\n Session input b2b.\\n \\\"\\\"\\\"\\n b2b: IStoreB2B\\n \\\"\\\"\\\"\\n Marketing information input.\\n \\\"\\\"\\\"\\n marketingData: IStoreMarketingData\\n \\\"\\\"\\\"\\n Refresh token after Information.\\n \\\"\\\"\\\"\\n refreshAfter: String\\n}\\n\"","export default \"\\\"\\\"\\\"\\nShipping Simulation item input.\\n\\\"\\\"\\\"\\ninput IShippingItem {\\n \\\"\\\"\\\"\\n ShippingItem ID / Sku.\\n \\\"\\\"\\\"\\n id: String!\\n \\\"\\\"\\\"\\n Number of items.\\n \\\"\\\"\\\"\\n quantity: Int!\\n \\\"\\\"\\\"\\n Seller responsible for the ShippingItem.\\n \\\"\\\"\\\"\\n seller: String!\\n}\\n\\n\\\"\\\"\\\"\\nShipping Simulation information.\\n\\\"\\\"\\\"\\ntype ShippingData {\\n \\\"\\\"\\\"\\n List of LogisticsItem.\\n \\\"\\\"\\\"\\n items: [LogisticsItem]\\n \\\"\\\"\\\"\\n List of LogisticsInfo.\\n \\\"\\\"\\\"\\n logisticsInfo: [LogisticsInfo]\\n \\\"\\\"\\\"\\n List of MessageInfo.\\n \\\"\\\"\\\"\\n messages: [MessageInfo]\\n \\\"\\\"\\\"\\n Address information.\\n \\\"\\\"\\\"\\n address: Address\\n}\\n\\n\\\"\\\"\\\"\\nShipping Simulation Logistic Item.\\n\\\"\\\"\\\"\\ntype LogisticsItem {\\n \\\"\\\"\\\"\\n LogisticsItem ID / Sku.\\n \\\"\\\"\\\"\\n id: String\\n requestIndex: Int\\n \\\"\\\"\\\"\\n Number of items.\\n \\\"\\\"\\\"\\n quantity: Int\\n \\\"\\\"\\\"\\n Seller responsible for the ShippingItem.\\n \\\"\\\"\\\"\\n seller: String\\n \\\"\\\"\\\"\\n List of Sellers.\\n \\\"\\\"\\\"\\n sellerChain: [String]\\n \\\"\\\"\\\"\\n LogisticsItem tax.\\n \\\"\\\"\\\"\\n tax: Int\\n \\\"\\\"\\\"\\n Next date in which price is scheduled to change. If there is no scheduled change, this will be set a year in the future from current time.\\n \\\"\\\"\\\"\\n priceValidUntil: String\\n \\\"\\\"\\\"\\n LogisticsItem price.\\n \\\"\\\"\\\"\\n price: Int\\n \\\"\\\"\\\"\\n LogisticsItem listPrice.\\n \\\"\\\"\\\"\\n listPrice: Int\\n \\\"\\\"\\\"\\n LogisticsItem rewardValue.\\n \\\"\\\"\\\"\\n rewardValue: Int\\n \\\"\\\"\\\"\\n LogisticsItem sellingPrice.\\n \\\"\\\"\\\"\\n sellingPrice: Int\\n \\\"\\\"\\\"\\n LogisticsItem measurementUnit.\\n \\\"\\\"\\\"\\n measurementUnit: String\\n \\\"\\\"\\\"\\n LogisticsItem unitMultiplier.\\n \\\"\\\"\\\"\\n unitMultiplier: Int\\n \\\"\\\"\\\"\\n LogisticsItem availability.\\n \\\"\\\"\\\"\\n availability: String\\n}\\n\\ntype LogisticsInfo {\\n \\\"\\\"\\\"\\n LogisticsInfo itemIndex.\\n \\\"\\\"\\\"\\n itemIndex: String\\n \\\"\\\"\\\"\\n LogisticsInfo selectedSla.\\n \\\"\\\"\\\"\\n selectedSla: String\\n \\\"\\\"\\\"\\n List of LogisticsInfo ShippingSLA.\\n \\\"\\\"\\\"\\n slas: [ShippingSLA]\\n}\\n\\ntype ShippingSLA {\\n \\\"\\\"\\\"\\n ShippingSLA id.\\n \\\"\\\"\\\"\\n id: String\\n \\\"\\\"\\\"\\n ShippingSLA name.\\n \\\"\\\"\\\"\\n name: String\\n \\\"\\\"\\\"\\n ShippingSLA price.\\n \\\"\\\"\\\"\\n price: Float\\n \\\"\\\"\\\"\\n ShippingSLA shipping estimate.\\n \\\"\\\"\\\"\\n shippingEstimate: String\\n \\\"\\\"\\\"\\n ShippingSLA localized shipping estimate.\\n Note: this will always return a localized string for locale `en-US`.\\n \\\"\\\"\\\"\\n localizedEstimates: String\\n \\\"\\\"\\\"\\n ShippingSLA available delivery windows.\\n \\\"\\\"\\\"\\n availableDeliveryWindows: [AvailableDeliveryWindows]\\n \\\"\\\"\\\"\\n ShippingSLA shipping estimate date.\\n \\\"\\\"\\\"\\n shippingEstimateDate: String\\n \\\"\\\"\\\"\\n List of ShippingSLA delivery ids.\\n \\\"\\\"\\\"\\n deliveryIds: [DeliveryIds]\\n \\\"\\\"\\\"\\n ShippingSLA delivery channel.\\n \\\"\\\"\\\"\\n deliveryChannel: String\\n \\\"\\\"\\\"\\n ShippingSLA friendly name.\\n \\\"\\\"\\\"\\n friendlyName: String\\n \\\"\\\"\\\"\\n ShippingSLA carrier.\\n \\\"\\\"\\\"\\n carrier: String\\n \\\"\\\"\\\"\\n ShippingSLA pickup point id.\\n \\\"\\\"\\\"\\n pickupPointId: String\\n \\\"\\\"\\\"\\n ShippingSLA pickup store info.\\n \\\"\\\"\\\"\\n pickupStoreInfo: PickupStoreInfo\\n \\\"\\\"\\\"\\n ShippingSLA pickup distance.\\n \\\"\\\"\\\"\\n pickupDistance: Float\\n}\\n\\ntype AvailableDeliveryWindows {\\n \\\"\\\"\\\"\\n Available delivery window start date in UTC\\n \\\"\\\"\\\"\\n startDateUtc: String\\n \\\"\\\"\\\"\\n Available delivery window end date in UTC\\n \\\"\\\"\\\"\\n endDateUtc: String\\n \\\"\\\"\\\"\\n Available delivery window price\\n \\\"\\\"\\\"\\n price: Int\\n \\\"\\\"\\\"\\n Available delivery window list price\\n \\\"\\\"\\\"\\n listPrice: Int\\n \\\"\\\"\\\"\\n Available delivery window tax\\n \\\"\\\"\\\"\\n tax: Int\\n}\\n\\ntype DeliveryIds {\\n \\\"\\\"\\\"\\n DeliveryIds courier id\\n \\\"\\\"\\\"\\n courierId: String\\n \\\"\\\"\\\"\\n DeliveryIds warehouse id\\n \\\"\\\"\\\"\\n warehouseId: String\\n \\\"\\\"\\\"\\n DeliveryIds dock id\\n \\\"\\\"\\\"\\n dockId: String\\n \\\"\\\"\\\"\\n DeliveryIds courier name\\n \\\"\\\"\\\"\\n courierName: String\\n \\\"\\\"\\\"\\n DeliveryIds quantity\\n \\\"\\\"\\\"\\n quantity: Int\\n}\\n\\ntype PickupStoreInfo {\\n \\\"\\\"\\\"\\n PickupStoreInfo friendly name.\\n \\\"\\\"\\\"\\n friendlyName: String\\n \\\"\\\"\\\"\\n PickupStoreInfo address.\\n \\\"\\\"\\\"\\n address: PickupAddress\\n \\\"\\\"\\\"\\n PickupStoreInfo additional information.\\n \\\"\\\"\\\"\\n additionalInfo: String\\n \\\"\\\"\\\"\\n PickupStoreInfo dock id.\\n \\\"\\\"\\\"\\n dockId: String\\n \\\"\\\"\\\"\\n Information if the store has pickup enable.\\n \\\"\\\"\\\"\\n isPickupStore: Boolean\\n}\\n\\ntype PickupAddress {\\n \\\"\\\"\\\"\\n PickupAddress address type.\\n \\\"\\\"\\\"\\n addressType: String\\n \\\"\\\"\\\"\\n PickupAddress receiver name.\\n \\\"\\\"\\\"\\n receiverName: String\\n \\\"\\\"\\\"\\n PickupAddress address id.\\n \\\"\\\"\\\"\\n addressId: String\\n \\\"\\\"\\\"\\n PickupAddress postal code.\\n \\\"\\\"\\\"\\n postalCode: String\\n \\\"\\\"\\\"\\n PickupAddress city.\\n \\\"\\\"\\\"\\n city: String\\n \\\"\\\"\\\"\\n PickupAddress state.\\n \\\"\\\"\\\"\\n state: String\\n \\\"\\\"\\\"\\n PickupAddress country.\\n \\\"\\\"\\\"\\n country: String\\n \\\"\\\"\\\"\\n PickupAddress street.\\n \\\"\\\"\\\"\\n street: String\\n \\\"\\\"\\\"\\n PickupAddress number.\\n \\\"\\\"\\\"\\n number: String\\n \\\"\\\"\\\"\\n PickupAddress neighborhood.\\n \\\"\\\"\\\"\\n neighborhood: String\\n \\\"\\\"\\\"\\n PickupAddress complement.\\n \\\"\\\"\\\"\\n complement: String\\n \\\"\\\"\\\"\\n PickupAddress reference.\\n \\\"\\\"\\\"\\n reference: String\\n \\\"\\\"\\\"\\n PickupAddress geo coordinates.\\n \\\"\\\"\\\"\\n geoCoordinates: [Float]\\n}\\n\\ntype MessageInfo {\\n \\\"\\\"\\\"\\n MessageInfo code.\\n \\\"\\\"\\\"\\n code: String\\n \\\"\\\"\\\"\\n MessageInfo text.\\n \\\"\\\"\\\"\\n text: String\\n \\\"\\\"\\\"\\n MessageInfo status.\\n \\\"\\\"\\\"\\n status: String\\n \\\"\\\"\\\"\\n MessageInfo fields.\\n \\\"\\\"\\\"\\n fields: MessageFields\\n}\\n\\ntype MessageFields {\\n \\\"\\\"\\\"\\n MessageFields item index.\\n \\\"\\\"\\\"\\n itemIndex: String\\n \\\"\\\"\\\"\\n MessageFields ean.\\n \\\"\\\"\\\"\\n ean: String\\n \\\"\\\"\\\"\\n MessageFields sku name.\\n \\\"\\\"\\\"\\n skuName: String\\n}\\n\"","export default \"type SkuVariants {\\n \\\"\\\"\\\"\\n SKU property values for the current SKU.\\n \\\"\\\"\\\"\\n activeVariations: ActiveVariations\\n \\\"\\\"\\\"\\n All available options for each SKU variant property, indexed by their name.\\n \\\"\\\"\\\"\\n allVariantsByName: VariantsByName\\n \\\"\\\"\\\"\\n Maps property value combinations to their respective SKU's slug. Enables\\n us to retrieve the slug for the SKU that matches the currently selected\\n variations in O(1) time.\\n If `dominantVariantName` is not present, the first variant will be \\n considered the dominant one.\\n \\\"\\\"\\\"\\n slugsMap(dominantVariantName: String): SlugsMap\\n \\\"\\\"\\\"\\n Available options for each varying SKU property, taking into account the\\n `dominantVariantName` property. Returns all available options for the\\n dominant property, and only options that can be combined with its current\\n value for other properties.\\n If `dominantVariantName` is not present, the first variant will be \\n considered the dominant one.\\n \\\"\\\"\\\"\\n availableVariations(dominantVariantName: String): FormattedVariants\\n\\n \\\"\\\"\\\"\\n All available options for each SKU variant property, indexed by their name.\\n \\\"\\\"\\\"\\n allVariantProducts: [StoreProduct!]\\n}\\n\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n 'Color-Red-Size-40': 'classic-shoes-37'\\n}\\n```\\n\\\"\\\"\\\"\\nscalar SlugsMap\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: 'Red', Size: '42'\\n}\\n```\\n\\\"\\\"\\\"\\nscalar ActiveVariations\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: [ \\\"Red\\\", \\\"Blue\\\", \\\"Green\\\" ],\\n Size: [ \\\"40\\\", \\\"41\\\" ]\\n}\\n```\\n\\\"\\\"\\\"\\nscalar VariantsByName\\n\\\"\\\"\\\"\\nExample:\\n\\n```json\\n{\\n Color: [\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n },\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n }\\n ],\\n Size: [\\n {\\n src: \\\"https://storecomponents.vtexassets.com/...\\\",\\n alt: \\\"...\\\",\\n label: \\\"...\\\",\\n value: \\\"...\\\"\\n }\\n ]\\n}\\n```\\n\\\"\\\"\\\"\\nscalar FormattedVariants\\n\"","export default \"\\\"\\\"\\\"\\nStatus used to indicate a message type. For instance, a shopping cart informative or error message.\\n\\\"\\\"\\\"\\nenum StoreStatus {\\n INFO\\n WARNING\\n ERROR\\n}\\n\"","export default \"scalar JSONObject\\n\\ntype UserOrder {\\n orderId: String\\n sequence: String\\n marketplaceOrderId: String\\n marketplaceServicesEndpoint: String\\n sellerOrderId: String\\n origin: String\\n affiliateId: String\\n salesChannel: String\\n merchantName: String\\n status: String\\n workflowIsInError: Boolean\\n statusDescription: String\\n value: Float\\n creationDate: String\\n lastChange: String\\n orderGroup: String\\n giftRegistryData: String\\n marketingData: String\\n callCenterOperatorData: String\\n followUpEmail: String\\n lastMessage: String\\n hostname: String\\n invoiceData: String\\n changesAttachment: String\\n openTextField: String\\n roundingError: Int\\n orderFormId: String\\n commercialConditionData: String\\n isCompleted: Boolean\\n allowCancellation: Boolean\\n allowEdition: Boolean\\n isCheckedIn: Boolean\\n authorizedDate: String\\n invoicedDate: String\\n cancelReason: String\\n subscriptionData: String\\n taxData: String\\n checkedInPickupPointId: String\\n cancellationData: UserOrderCancellationData\\n cancellationRequests: [UserOrderCancellationRequest]\\n customData: UserOrderCustomData\\n clientPreferencesData: UserOrderClientPreferencesData\\n itemMetadata: UserOrderItemMetadata\\n marketplace: UserOrderMarketplace\\n storePreferencesData: UserOrderStorePreferencesData\\n sellers: [UserOrderStoreSellers]\\n packageAttachment: UserOrderPackageAttachment\\n paymentData: UserOrderPaymentData\\n shippingData: UserOrderShippingData\\n ratesAndBenefitsData: UserOrderRatesAndBenefitsData\\n clientProfileData: UserOrderClientProfileData\\n marketplaceItems: [UserOrderItems]\\n items: [UserOrderItems]\\n totals: [UserOrderTotals]\\n deliveryOptionsData: UserOrderDeliveryOptionsData\\n customFields: [UserOrderCustomFieldsGrouped]\\n canProcessOrderAuthorization: Boolean\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n purchaseAgentData: UserOrderPurchaseAgentData\\n budgetData: UserOrderBudgetData\\n}\\n\\ntype UserOrderPurchaseAgentData {\\n purchaseAgents: [UserOrderPurchaseAgent]\\n}\\n\\ntype UserOrderPurchaseAgent {\\n userId: String\\n versionId: String\\n persona: String\\n unitId: String\\n}\\n\\ntype UserOrderResult {\\n orderId: String\\n creationDate: String\\n status: String\\n canProcessOrderAuthorization: Boolean\\n statusDescription: String\\n allowCancellation: Boolean\\n storePreferencesData: UserOrderStorePreferencesData\\n clientProfileData: UserOrderClientProfileData\\n customData: UserOrderCustomData\\n customFields: [UserOrderCustomFieldsGrouped]\\n deliveryOptionsData: UserOrderDeliveryOptionsData\\n paymentData: UserOrderPaymentData\\n totals: [UserOrderTotals]\\n shippingData: UserOrderShippingData\\n items: [UserOrderItems]\\n ruleForAuthorization: ProcessOrderAuthorizationRule\\n shopper: UserOrderShopper\\n budgetData: UserOrderBudgetData\\n}\\n\\ntype UserOrderShopper {\\n firstName: String\\n lastName: String\\n email: String\\n phone: String\\n}\\n\\ntype UserOrderListResult {\\n list: [UserOrderFromList!]\\n paging: UserOrderListPaging\\n stats: UserOrderListStats\\n facets: [String]\\n reportRecordsLimit: Int\\n}\\n\\ntype UserOrderListPaging {\\n total: Int\\n pages: Int\\n currentPage: Int\\n perPage: Int\\n}\\n\\ntype UserOrderListStats {\\n stats: UserOrderListStatsData\\n}\\n\\ntype UserOrderListStatsData {\\n totalValue: UserOrderListStatsValue\\n totalItems: UserOrderListStatsValue\\n}\\n\\ntype UserOrderListStatsValue {\\n Count: Int\\n Max: Float\\n Mean: Float\\n Min: Float\\n Missing: Int\\n StdDev: Float\\n Sum: Float\\n SumOfSquares: Float\\n Facets: JSONObject\\n}\\n\\ntype UserOrderFromList {\\n orderId: String\\n creationDate: String\\n clientName: String\\n items: [UserOrderItemsSummarized]\\n totalValue: Float\\n paymentNames: String\\n status: String\\n statusDescription: String\\n marketPlaceOrderId: String\\n sequence: String\\n salesChannel: String\\n affiliateId: String\\n origin: String\\n workflowInErrorState: Boolean\\n workflowInRetry: Boolean\\n lastMessageUnread: String\\n ShippingEstimatedDate: String\\n ShippingEstimatedDateMax: String\\n ShippingEstimatedDateMin: String\\n orderIsComplete: Boolean\\n listId: String\\n listType: String\\n authorizedDate: String\\n callCenterOperatorName: String\\n totalItems: Int\\n currencyCode: String\\n hostname: String\\n invoiceOutput: [String]\\n invoiceInput: [String]\\n lastChange: String\\n isAllDelivered: Boolean\\n isAnyDelivered: Boolean\\n giftCardProviders: [String]\\n orderFormId: String\\n paymentApprovedDate: String\\n readyForHandlingDate: String\\n deliveryDates: [String]\\n customFields: [UserOrderFromListCustomFields]\\n}\\n\\ntype UserOrderCustomData {\\n customApps: [UserOrderCustomApp]\\n customFields: [UserOrderCustomField]\\n}\\n\\ntype UserOrderCustomApp {\\n fields: UserOrderFields\\n id: String\\n major: Int\\n}\\n\\ntype UserOrderFields {\\n cartEtag: String\\n}\\n\\ntype UserOrderStoreSellers {\\n id: String\\n name: String\\n logo: String\\n fulfillmentEndpoint: String\\n}\\n\\ntype UserOrderClientPreferencesData {\\n locale: String\\n optinNewsLetter: Boolean\\n}\\n\\ntype UserOrderItemMetadata {\\n Items: [UserOrderItemMetadataItem]\\n}\\n\\ntype UserOrderItemMetadataItem {\\n Id: String\\n Seller: String\\n Name: String\\n SkuName: String\\n ProductId: String\\n RefId: String\\n Ean: String\\n ImageUrl: String\\n DetailUrl: String\\n AssemblyOptions: [UserOrderAssemblyOptions]\\n}\\n\\ntype UserOrderAssemblyOptions {\\n Id: String\\n Name: String\\n Required: Boolean\\n}\\n\\ntype UserOrderOfferings {\\n type: String\\n id: String\\n name: String\\n price: Float\\n}\\n\\ntype UserOrderMarketplace {\\n baseURL: String\\n isCertified: String\\n name: String\\n}\\n\\ntype UserOrderCurrencyFormatInfo {\\n CurrencyDecimalDigits: Int\\n CurrencyDecimalSeparator: String\\n CurrencyGroupSeparator: String\\n CurrencyGroupSize: Int\\n StartsWithCurrencySymbol: Boolean\\n}\\n\\ntype UserOrderStorePreferencesData {\\n countryCode: String\\n currencyCode: String\\n currencyLocale: Int\\n currencySymbol: String\\n timeZone: String\\n currencyFormatInfo: UserOrderCurrencyFormatInfo\\n}\\n\\ntype UserOrderPackageAttachment {\\n packages: [UserOrderPackage]\\n}\\n\\ntype UserOrderPackage {\\n courier: String\\n courierStatus: UserOrderCourierStatus\\n invoiceNumber: String!\\n invoiceUrl: String\\n invoiceValue: Float!\\n extraValue: Float\\n issuanceDate: String\\n items: [UserOrderPackageItem!]\\n trackingNumber: String\\n trackingUrl: String\\n invoiceKey: String\\n type: UserOrderInvoiceType\\n restitutions: UserOrderRestitutions\\n}\\n\\ntype UserOrderCourierStatus {\\n data: [UserOrderTrackingInformation!]\\n finished: Boolean\\n status: String\\n}\\n\\ntype UserOrderTrackingInformation {\\n city: String\\n description: String\\n lastChange: String\\n state: String\\n}\\n\\nenum UserOrderInvoiceType {\\n Input\\n Output\\n}\\n\\ntype UserOrderPackageItem {\\n description: String\\n itemIndex: Int\\n price: Int\\n quantity: Int\\n}\\n\\ntype UserOrderRestitutions {\\n Refund: UserOrderRestitutionOption\\n GiftCard: UserOrderRestitutionOption\\n}\\n\\ntype UserOrderRestitutionOption {\\n value: Float\\n items: [UserOrderRestitutionItem!]\\n}\\n\\ntype UserOrderRestitutionItem {\\n useFreight: Boolean\\n isCompensation: Boolean\\n compensationValue: Float\\n itemIndex: Int\\n id: ID\\n quantity: Int\\n price: Float\\n description: String\\n unitMultiplier: Float\\n}\\n\\ntype UserOrderPaymentConnectorResponses {\\n Tid: String\\n ReturnCode: String\\n Message: String\\n authId: String\\n}\\n\\ntype UserOrderPayments {\\n id: String\\n paymentSystem: String\\n paymentSystemName: String\\n value: Int\\n installments: Int\\n referenceValue: Int\\n cardHolder: String\\n cardNumber: String\\n firstDigits: String\\n lastDigits: String\\n cvv2: String\\n expireMonth: String\\n expireYear: String\\n url: String\\n giftCardId: String\\n giftCardName: String\\n giftCardCaption: String\\n redemptionCode: String\\n group: String\\n tid: String\\n dueDate: String\\n connectorResponses: UserOrderPaymentConnectorResponses\\n giftCardProvider: String\\n giftCardAsDiscount: String\\n koinUrl: String\\n accountId: String\\n parentAccountId: String\\n bankIssuedInvoiceIdentificationNumber: String\\n bankIssuedInvoiceIdentificationNumberFormatted: String\\n bankIssuedInvoiceBarCodeNumber: String\\n bankIssuedInvoiceBarCodeType: String\\n billingAddress: String\\n paymentOrigin: String\\n}\\n\\ntype UserOrderTransactions {\\n isActive: Boolean\\n transactionId: String\\n merchantName: String\\n payments: [UserOrderPayments]\\n}\\n\\ntype UserOrderPaymentData {\\n transactions: [UserOrderTransactions]\\n giftCards: [String]\\n}\\n\\ntype UserOrderPickupStoreInfo {\\n additionalInfo: String\\n address: UserOrderAddress\\n dockId: String\\n friendlyName: String\\n isPickupStore: Boolean\\n}\\n\\ntype UserOrderDeliveryChannels {\\n id: String\\n stockBalance: Int\\n}\\n\\ntype UserOrderDeliveryIds {\\n courierId: String\\n courierName: String\\n dockId: String\\n quantity: Int\\n warehouseId: String\\n accountCarrierName: String\\n kitItemDetails: [String]\\n}\\ntype UserOrderDeliveryWindow {\\n startDateUtc: String\\n endDateUtc: String\\n price: Float\\n}\\n\\ntype UserOrderSlas {\\n id: String\\n name: String\\n shippingEstimate: String\\n shippingEstimateDate: String\\n deliveryWindow: UserOrderDeliveryWindow\\n listPrice: Float\\n price: Float\\n deliveryChannel: String\\n polygonName: String\\n lockTTL: String\\n pickupPointId: String\\n transitTime: String\\n pickupDistance: Int\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n deliveryIds: [UserOrderDeliveryIds]\\n availableDeliveryWindows: [UserOrderDeliveryWindow]\\n}\\n\\ntype UserOrderLogisticsInfo {\\n itemIndex: Int\\n itemId: String\\n selectedDeliveryChannel: String\\n selectedSla: String\\n lockTTL: String\\n price: Float\\n listPrice: Float\\n sellingPrice: Float\\n deliveryWindow: UserOrderDeliveryWindow\\n deliveryCompany: String\\n shippingEstimate: String\\n shippingEstimateDate: String\\n deliveryChannel: String\\n addressId: String\\n versionId: String\\n entityId: String\\n polygonName: String\\n pickupPointId: String\\n transitTime: String\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n deliveryChannels: [UserOrderDeliveryChannels]\\n deliveryIds: [UserOrderDeliveryIds]\\n shipsTo: [String]\\n slas: [UserOrderSlas]\\n}\\n\\ntype UserOrderAddress {\\n addressType: String\\n receiverName: String\\n addressId: String\\n versionId: String\\n entityId: String\\n postalCode: String\\n city: String\\n state: String\\n country: String\\n street: String\\n number: String\\n neighborhood: String\\n complement: String\\n reference: String\\n geoCoordinates: [Float]\\n}\\n\\ntype UserOrderShippingData {\\n id: String\\n trackingHints: String\\n contactInformation: [UserOrderContactInformation]\\n availableAddresses: [UserOrderAddress]\\n selectedAddresses: [UserOrderAddress]\\n logisticsInfo: [UserOrderLogisticsInfo]\\n address: UserOrderAddress\\n}\\n\\ntype UserOrderRatesAndBenefitsData {\\n id: String\\n rateAndBenefitsIdentifiers: [UserOrderRateAndBenefitsIdentifier]\\n}\\n\\ntype UserOrderRateAndBenefitsIdentifier {\\n id: ID\\n additionalInfo: String\\n description: String\\n featured: Boolean\\n name: String\\n}\\n\\ntype UserOrderClientProfileData {\\n id: String\\n email: String\\n firstName: String\\n lastName: String\\n documentType: String\\n document: String\\n phone: String\\n corporateName: String\\n tradeName: String\\n corporateDocument: String\\n stateInscription: String\\n corporatePhone: String\\n isCorporate: Boolean\\n userProfileId: String\\n userProfileVersion: String\\n customerClass: String\\n customerCode: String\\n}\\n\\ntype UserOrderSellingPrices {\\n value: Float\\n quantity: Int\\n}\\n\\ntype UserOrderPriceDefinition {\\n calculatedSellingPrice: Float\\n total: Float\\n reason: String\\n sellingPrices: [UserOrderSellingPrices]\\n}\\n\\ntype UserOrderDimension {\\n cubicweight: Float\\n height: Int\\n length: Int\\n weight: Int\\n width: Int\\n}\\n\\ntype UserOrderCategories {\\n id: Int\\n name: String\\n}\\n\\ntype UserOrderAdditionalInfo {\\n brandName: String\\n brandId: String\\n categoriesIds: String\\n productClusterId: String\\n commercialConditionId: String\\n offeringInfo: String\\n offeringType: String\\n offeringTypeId: String\\n dimension: UserOrderDimension\\n categories: [UserOrderCategories]\\n}\\n\\ntype UserOrderAttachmentOfferings {\\n name: String\\n required: Boolean\\n}\\n\\ntype UserOrderItemAttachment {\\n name: String\\n}\\n\\ntype UserOrderItems {\\n uniqueId: String\\n id: String\\n productId: String\\n ean: String\\n lockId: String\\n quantity: Int\\n seller: String\\n name: String\\n refId: String\\n price: Float\\n listPrice: Float\\n manualPrice: String\\n manualPriceAppliedBy: String\\n imageUrl: String\\n detailUrl: String\\n sellerSku: String\\n priceValidUntil: String\\n commission: Float\\n tax: Float\\n preSaleDate: String\\n measurementUnit: String\\n unitMultiplier: Float\\n sellingPrice: Float\\n isGift: Boolean\\n shippingPrice: String\\n rewardValue: Float\\n freightCommission: Float\\n taxCode: String\\n parentItemIndex: String\\n parentAssemblyBinding: String\\n callCenterOperator: String\\n serialNumbers: String\\n costPrice: Float\\n assemblies: [String]\\n priceDefinition: UserOrderPriceDefinition\\n additionalInfo: UserOrderAdditionalInfo\\n attachmentOfferings: [UserOrderAttachmentOfferings]\\n offerings: [UserOrderOfferings]\\n params: [String]\\n bundleItems: [UserOrderItems]\\n components: [UserOrderItems]\\n priceTags: [UserOrderPriceTag]\\n attachments: [UserOrderAttachments]\\n itemAttachment: UserOrderItemAttachment\\n}\\n\\ntype UserOrderItemsSummarized {\\n seller: String\\n quantity: Int\\n description: String\\n ean: String\\n refId: String\\n id: String\\n productId: String\\n sellingPrice: Float\\n price: Float\\n}\\n\\ntype UserOrderAttachments {\\n name: String\\n content: JSONObject\\n}\\n\\ntype UserOrderPriceTag {\\n name: String!\\n value: Float\\n rawValue: Float!\\n rate: Float\\n jurisCode: String\\n jurisType: String\\n jurisName: String\\n isPercentual: Boolean\\n identifier: String\\n owner: String\\n}\\n\\ntype UserOrderTotals {\\n id: String\\n name: String\\n value: Float\\n}\\n\\ntype UserOrderContactInformation {\\n id: ID!\\n email: String\\n firstName: String\\n lastName: String\\n document: String\\n documentType: String\\n phone: String\\n}\\n\\ntype UserOrderDeliveryOptionsData {\\n deliveryOptions: [UserOrderDeliveryOption]\\n contact: UserOrderDeliveryOptionsContact\\n}\\n\\ntype UserOrderDeliveryOption {\\n selectedSla: String\\n deliveryChannel: String\\n deliveryCompany: String\\n deliveryWindow: UserOrderDeliveryWindow\\n shippingEstimate: String\\n shippingEstimateDate: String\\n friendlyShippingEstimate: String\\n friendlyDeliveryOptionName: String\\n seller: String\\n address: UserOrderAddress\\n pickupStoreInfo: UserOrderPickupStoreInfo\\n quantityOfDifferentItems: Int\\n total: Int\\n items: [UserOrderDeliveryOptionsItems]\\n}\\n\\ntype UserOrderDeliveryOptionsItems {\\n id: String\\n uniqueId: String\\n name: String\\n quantity: Int\\n price: Float\\n sellingPrice: Float\\n imageUrl: String\\n tax: Float\\n taxPriceTags: [UserOrderPriceTag]\\n taxPriceTagsTotal: Float\\n total: Float\\n}\\n\\ntype UserOrderDeliveryOptionsContact {\\n name: String\\n email: String\\n phone: String\\n}\\n\\ntype UserOrderCancel {\\n data: String\\n}\\n\\n\\\"\\\"\\\"\\nInput to the cancel order API.\\n\\\"\\\"\\\"\\ninput IUserOrderCancel {\\n \\\"\\\"\\\"\\n Person's name.\\n \\\"\\\"\\\"\\n orderId: String!\\n \\\"\\\"\\\"\\n Customer's email.\\n \\\"\\\"\\\"\\n customerEmail: String\\n \\\"\\\"\\\"\\n Reason.\\n \\\"\\\"\\\"\\n reason: String\\n}\\n\\ntype UserOrderCancellationData {\\n RequestedByUser: Boolean\\n RequestedBySystem: Boolean\\n RequestedBySellerNotification: Boolean\\n RequestedByPaymentNotification: Boolean\\n Reason: String\\n CancellationDate: String\\n}\\n\\ntype UserOrderCancellationRequest {\\n id: String\\n reason: String\\n cancellationRequestDate: String\\n requestedByUser: Boolean\\n deniedBySeller: Boolean\\n deniedBySellerReason: String\\n cancellationRequestDenyDate: String\\n}\\n\\ntype UserOrderCustomField {\\n linkedEntity: UserOrderCustomFieldLinkedEntity!\\n fields: [UserOrderCustomFieldField!]!\\n}\\n\\ntype UserOrderCustomFieldLinkedEntity {\\n type: String!\\n id: String\\n}\\n\\ntype UserOrderCustomFieldField {\\n name: String!\\n value: String!\\n refId: String\\n}\\n\\ntype UserOrderCustomFieldsGrouped {\\n type: String!\\n id: String\\n fields: [UserOrderCustomFieldField]\\n}\\n\\ntype UserOrderFromListCustomFields {\\n type: String\\n value: [String]\\n}\\n\\ntype UserOrderListMinimalResult {\\n list: [UserOrderFromListMinimal]\\n paging: UserOrderListPaging\\n}\\n\\ntype UserOrderFromListMinimal {\\n orderId: String\\n creationDate: String\\n clientName: String\\n items: [UserOrderItemsSummarized]\\n totalValue: Float\\n status: String\\n statusDescription: String\\n ShippingEstimatedDate: String\\n customFields: [UserOrderFromListCustomFields]\\n currencyCode: String\\n}\\n\\ntype UserOrderBudgetData {\\n budgets: [UserOrderBudget]\\n}\\n\\ntype UserOrderBudget {\\n id: String\\n name: String\\n unitId: String\\n cycleConfiguration: UserOrderBudgetCycleConfiguration\\n balance: UserOrderBudgetBalance\\n allocations: [UserOrderBudgetAllocation]\\n}\\n\\ntype UserOrderBudgetCycleConfiguration {\\n startDate: String\\n endDate: String\\n autoResetOnPeriodEnd: Boolean\\n carryOverBalance: Boolean\\n}\\n\\ntype UserOrderBudgetBalance {\\n amount: Float\\n balanceAdjustment: Float\\n remaining: Float\\n}\\n\\ntype UserOrderBudgetAllocation {\\n id: String\\n linkedEntity: UserOrderBudgetAllocationLinkedEntity\\n balance: UserOrderBudgetBalance\\n reservations: JSONObject\\n ToBeSpent: Float\\n}\\n\\ntype UserOrderBudgetAllocationLinkedEntity {\\n type: String\\n id: String\\n}\\n\"","/// <reference types=\"vite/client\" />\n\nconst modules: Record<string, string> = import.meta.glob('./*.graphql', {\n eager: true,\n query: '?raw',\n import: 'default',\n})\nimport { mergeTypeDefs } from '@graphql-tools/merge'\nimport { parse, print } from 'graphql'\n\nconst ParsedVtexGraphqlSchema = print(\n Object.values(modules)\n .map((s) => parse(s))\n .reduce((finalSchema, schema) =>\n mergeTypeDefs([finalSchema, schema], { sort: true })\n )\n)\n\nexport const typeDefs = ParsedVtexGraphqlSchema\n\nexport default typeDefs\n","import { mergeSchemas } from '@graphql-tools/schema'\nimport { type GraphQLSchema, isSchema } from 'graphql'\nimport { withDirectives } from '../../directives'\nimport authDirective from '../../directives/auth'\nimport cacheControlDirective from '../../directives/cacheControl'\nimport { ResolverTrace } from '../../observability/telemetry'\nimport type { FeatureFlags, Options, Resolver } from '../../typings/globals'\nimport type { Clients } from './clients'\nimport { getClients } from './clients'\nimport type { SearchArgs } from './clients/search'\nimport type { Loaders } from './loaders'\nimport { getLoaders } from './loaders'\nimport { getResolvers as nativeGetResolvers } from './resolvers'\nimport typeDefs from './typeDefs'\nimport type { Channel } from './utils/channel'\nimport ChannelMarshal from './utils/channel'\n\nexport interface GraphqlContext {\n /** Request scope ID */\n id: string\n clients: Clients\n loaders: Loaders\n /**\n * @description Storage updated at each request.\n *\n * Use this datastructure to store and share small values in the context.\n * Use it with caution since dependecy injection leads to a more complex code\n * */\n storage: {\n channel: Required<Channel>\n locale: string\n flags: FeatureFlags\n searchArgs?: Omit<SearchArgs, 'type'>\n cookies: Map<string, Record<string, string>>\n /**\n * Cached in-flight localized product lookups keyed by \"productId:locale\".\n * Stores the promise (not just the resolved value) so concurrent sibling\n * resolvers (slug validation, otherLocales, breadcrumb) dedupe to a single\n * Catalog Dataplane request within the same request.\n */\n productTranslationsCache?: Map<\n string,\n Promise<import('./clients/catalog').LocalizedProductEntry | null>\n >\n }\n headers: Record<string, string>\n account: string\n OTEL_ENABLED: boolean\n /** Discovery config passed from @faststore/core, including localization settings. */\n discoveryConfig?: Record<string, unknown>\n}\n\nexport const GraphqlVtexContextFactory = async (options: Options) => {\n return (ctx: any): GraphqlContext => {\n ctx.storage = {\n channel: ChannelMarshal.parse(options.channel),\n flags: options.flags ?? {},\n locale: options.locale,\n cookies: new Map<string, Record<string, string>>(),\n }\n ctx.account = options.account\n ctx.OTEL_ENABLED = options.OTEL_ENABLED\n ctx.discoveryConfig = options.discoveryConfig\n // Build clients/loaders last: they capture `ctx` and read storage,\n // discoveryConfig, etc. at request time, so everything they may depend on\n // must already be assigned.\n ctx.clients = getClients(options, ctx)\n ctx.loaders = getLoaders(options, ctx)\n\n return ctx\n }\n}\n\nexport type GraphqlResolver<S = any, V = any, R = any> = Resolver<\n GraphqlContext,\n S,\n V,\n R\n>\n\nexport function getResolvers() {\n const resolvers = nativeGetResolvers()\n\n const finalResolvers: any = {}\n for (const [key, resolver] of Object.entries(resolvers)) {\n finalResolvers[key] = Object.fromEntries(\n Object.entries(resolver).map(([name, resolverFunction]) => {\n if (typeof resolverFunction !== 'function')\n return [name, resolverFunction]\n\n return [name, ResolverTrace(resolverFunction, `${key}(${name})`)]\n })\n )\n }\n\n return finalResolvers as typeof resolvers\n}\n\nexport function GraphqlVtexSchema(mergeSchema?: GraphQLSchema) {\n const withCacheControl = withDirectives([\n cacheControlDirective,\n authDirective,\n ])\n\n const platformSchema = withCacheControl(getResolvers(), typeDefs)\n\n if (mergeSchema && isSchema(mergeSchema)) {\n return mergeSchemas({\n schemas: [platformSchema, mergeSchema],\n })\n }\n\n return platformSchema\n}\n"],"names":["CardOrigin","CommercialAuthorizationStatus","StoreCollectionType","StoreFacetType","StoreSort","StoreStatus","UserOrderInvoiceType","getWithAppKeyAndToken","additionalHeaders","appKey","appToken","ForbiddenError","validateUserAuthentication","ctx","commerce","UnauthorizedError","error","status","NAME","directive","schema","mapSchema","MapperKind","fieldConfig","getDirective","originalResolver","root","args","context","info","stringify","cacheControl","forcePrivate","scope","sMaxAge","staleWhileRevalidate","min","a","b","minScope","resolver","obj","withDirectives","directives","resolvers","typeDef","finalTypeDef","mergeTypeDefs","typeDefs","transformer","makeExecutableSchema","OTELLogger","logger","ResolverTrace","fn","resolverName","source","vars","graphqlContext","span","OTELAPI","version","name","otelContext","result","value","recordResolverError","FastStoreError","extensions","message","BadRequestError","NotFoundError","isFastStoreError","isBadRequestError","isUnauthorizedError","isForbiddenError","isNotFoundError","USER_AGENT","packageJson","fetchAPI","init","options","response","fetch","text","CatalogDataplane","account","environment","base","productId","locale","normalizeCookies","cookieString","cookieMap","cookies","processedKeys","cookie","trimmedCookie","equalIndex","key","MATCH_FIRST_SET_COOKIE_KEY_VALUE","updatesContextStorageCookies","setCookieValue","matchCookie","cookieKey","cookieValue","setCookie","headers","getStoreCookie","getUpdatedCookie","normalizedCookie","contextStorageCookies","existingCookies","storageCookieKey","storageCookieValue","updatesCookieValueByKey","getWithCookie","updatedCookie","getAuthCookie","normalizedCookies","parse","MATCH_COOKIE_KEY_VALUE","cookieParts","parseJwt","token","REC_ORIGIN_SUFFIX","BASE_INIT","encodeLinkIdPath","linkId","byLinkIdInit","QUOTE_ISO_DATE","QUOTE_VALID_STATUSES","validateListUserQuotesArgs","page","perPage","createdAtFrom","createdAtTo","expiresAtFrom","expiresAtTo","field","invalid","s","buildListUserQuotesParams","label","params","VtexCommerce","incrementAddress","subDomainPrefix","storeCookies","withCookie","withAppKeyAndToken","host","selectedPrefix","prefix","forwardedHost","recommendationBase","recommendationHeaders","withBuyerAuthHeaders","authToken","sc","depth","slug","type","groupByProduct","salesChannel","id","index","deliveryMode","selectedAddresses","setDeliveryWindow","deliveryWindow","mappedBody","_","itemIndex","marketingData","clientPreferencesData","refreshOutdatedData","channel","preserveSalesChannel","orderFormPath","url","orderItems","allowOutdatedData","shouldSplitItem","appId","postalCode","geoCoordinates","country","orderId","customerEmail","reason","search","sessionCookie","orgUnitId","data","userId","dateInitial","dateFinal","clientEmail","pendingMyApproval","dateInitialTimestamp","dateFinalTimestamp","orderAuthorizationId","dimensionId","ruleId","approved","body","email","resourceKey","contractId","userIdNormalized","fileBuffer","fileName","mimeType","autHeaders","boundary","CRLF","safeMimeType","safeFileName","headerPart","footer","headerBytes","footerBytes","offset","objectKey","orderFormId","sessionToken","operationId","campaignVrn","products","getLocalizationConfig","isLocalizationEnabled","getConfiguredLocales","getDefaultLocale","getCatalogLocale","FUZZY_KEY","OPERATOR_KEY","PICKUP_POINT_KEY","SHIPPING_KEY","DELIVERY_OPTIONS_KEY","IN_STOCK_KEY","POLICY_KEY","REGION_KEY","PATH_EXCLUDED_KEYS","SHIPPING_FACET_KEYS","encodeSafeURI","uri","removeDiacriticsFromURL","PICKUP_IN_POINT_SUFFIX_RE","parseSegmentCookie","cookieHeader","segmentToken","decoded","parseSegmentFacetsString","facetsStr","shipping","extraFacets","pair","eqIdx","extractSegmentData","segment","appendSegmentParams","segmentParams","entries","extractPickupPointIdFromShippingFacetValue","extractPickupPointIdFromPathShippingFacet","selectedFacetsFromPath","f","rawId","mergeSegmentParamsWithPickupFromPath","pathPickupId","normalizePickupInPointShippingFacets","selectedFacets","facet","concatSelectedFacets","selectedFacetsFromSegment","hasShipping","buildAttributePath","attributePath","isFuzzyFacet","isOperatorFacet","resolveSegmentData","defaults","regionId","preparePathFacets","facets","pathFacets","shippingFacet","deliveryOptionsFacet","withShippingFacets","hasShippingInPath","hasDeliveryOptionsInPath","addSearchParamsFacets","fuzzyFacet","operatorFacet","pickupPointFacet","buildSearchLikeParams","segmentData","query","count","sort","showInvisibleItems","sponsoredCount","searchHideUnavailableItems","allowRedirect","from","to","mergedSegmentParams","inStockFacet","shouldHideUnavailableItems","path","buildProductsParams","hideUnavailableItems","createRequest","qs","buildIntelligentSearchRequest","input","endpoint","_exhaustive","PRODUCTS_BY_IDENTIFIER_CONCURRENCY","getRegionIdFromContext","seller","getSegmentLocale","cultureInfo","IntelligentSearch","simulationBehavior","showSponsored","requestDefaults","request","fetchProduct","hideUnavailable","values","limit","pLimit","product","getClients","catalog","CONCURRENT_REQUESTS_MAX","isCategory","isBrand","isCollection","getCollectionLoader","clients","loader","keys","normalizedSlug","category","brand","collection","DataLoader","getSalesChannelLoader","channels","getSimulationLoader","simulationArgs","allItems","acc","items","simulation","simulated","item","itemsIndices","curr","__","limited","sanitizeHtml","dirty","sanitizeHtmlLib","sanitizeProduct","enhanceSku","getSkuLoader","flags","skuIds","skuBySkuId","sku","skus","skuId","missingSkus","getLoaders","skuLoader","simulationLoader","collectionLoader","salesChannelLoader","inStock","offer","price","sellingPrice","availability","available","bestOfferFirst","inStockOrderFormItem","itemAvailability","withTax","tax","unitMultiplier","unitTax","getHighPrice","offers","availableOffers","highOffer","highPrice","getLowPrice","lowOffer","lowPrice","StoreAggregateOffer","StoreAggregateRating","removeDiacritics","str","newStr","i","slugifySpecialCharacters","slugify","replaced","canonicalizeSlug","loadSegmentEntities","segments","slugifyRoot","StoreCollection","defaultLocale","entity","collections","localizationConfig","configuredLocales","entities","err","configuredLocale","parts","e","part","FACET_CROSS_SELLING_MAP","transformSelectedFacet","parseRange","range","splitted","isCrossSelling","x","findCrossSelling","filtered","findSlug","findSkuId","findLocale","findChannel","array","cmp","best","StoreFacet","StoreFacetBoolean","StoreFacetRange","searchArgs","selectedRange","globalMin","globalMax","StoreFacetValueBoolean","selected","quantity","cancelOrder","extractRuleForAuthorization","commercialAuth","dimension","pendingRule","rule","isPendingForOtherAuthorizer","pendingRules","processOrderAuthorization","ruleForAuthorization","startOrderEntryOperation","startRecommendationSession","subscribeToNewsletter","uploadFileToOrderEntry","fileContent","normalized","MAX_FILE_BYTES","ChannelMarshal","channelString","parsedChannel","channelWhenSessionDivergesFromOrderForm","currentChannel","orderFormSalesChannel","mutateChannelContext","mutateLocaleContext","md5","payload","crypto","VALUE_REFERENCES","attachmentToPropertyValue","attachment","attributeToPropertyValue","attribute","getPropertyId","createNewAddress","session","addressSession","latitude","longitude","getAddressOrderForm","orderForm","addressChanged","availableAddresses","address","shouldUpdateShippingData","hasSessionPostalCodeOrGeoCoordinates","hasItems","selectedAddress","checkPostalCode","checkGeoCoordinates","checkAddressType","logisticsInfo","shouldUpdateDeliveryInfo","addressType","deliveryChannel","deliveryMethod","startDate","endDate","selectedDeliveryChannel","selectedSla","slas","checkDeliveryChannel","checkDeliveryMethod","sla","window","isAttachment","getId","orderFormItemToOffer","offerToOrderItemInput","groupById","equals","storeOrder","pick","orderFormItems","storeOrderItems","isSameOrder","orderItemsAreSync","deepEquals","hasChildItem","itemId","hasParentItem","joinItems","form","itemsById","idx","totalPrice","orderFormToCart","adoptedSalesChannel","getOrderFormEtag","sessionJwt","criticalItems","setOrderFormEtag","isOrderFormStale","oldEtag","app","clearOrderFormMessages","updateOrderFormShippingData","updateShipping","oldAddress","getCookieCheckoutOrderNumber","nameCookie","adoptOrderFormSalesChannelWhenSessionDiverges","adoptedChannel","cartWhenSalesChannelAdoptedOrNull","validateCart","order","orderFormIdFromCookie","orderNumber","acceptedOffer","newOrderForm","browserItemsById","originItemsById","originItems","browserItems","itemsToAdd","itemsToUpdate","maybeOriginItem","head","tail","totalQuantity","itemsToDelete","changes","updatedOrderForm","updatedMarketingData","equalMessages","channelAfterSessionManager","storeChannelValue","sellerId","hasExplicitSalesChannel","storeSalesChannel","resolvedRegionId","resolveContractDisplayNameFromMd","contract","corporateName","isSessionAvailableContract","parseSessionAvailableContracts","shopper","raw","isSwitchableSessionContract","resolveActiveContractIdFromSession","sessionData","resolveDefaultContractId","attached","chosen","mapSessionContractsToStoreContracts","contracts","activeContractId","defaultContractId","normalizedActiveId","normalizedDefaultId","resolveActiveContractDisplayName","profile","fromMasterData","getPreciseLocationData","buildSessionSearchParams","buildMarketingData","oldMarketingData","resolveJwtClaims","jwt","isValidJwt","resolveSellerInRegion","shopperString","buildB2bSession","firstName","lastName","buildPersonFromProfile","validateSession","oldSession","city","preciseLocation","isRepresentative","customerId","unitId","store","authentication","checkout","publicData","newSession","Mutation","Kind","toObjectOrString","getValueAsObjectOrString","ObjectOrString","GraphQLScalarType","ast","isSearchItem","isOrderFormItem","StoreOffer","canonicalFromProduct","linkText","enhanceCommercialOffer","MILLISECONDS_THRESHOLD","isAllDigits","ISO_DATE_TIME_WITHOUT_ZONE","toDate","epoch","normalizeReleaseDate","date","DEFAULT_IMAGE","getSlug","link","getPath","nonEmptyArray","removeTrailingSlashes","getLocalizedProductEntry","cacheKey","cache","cached","entry","findMainTreeIndex","categoriesIds","categoryId","mainTreeIndex","idsTree","StoreProduct","isVariantOf","description","_args","categories","productName","mainTree","splittedCategories","mainTreeIds","localizedCategories","images","resolvedImages","imageUrl","imageText","imageLabel","shouldFilter","filteredImages","imageKeywords","ean","referenceId","manufacturerCode","specifications","attachmentsValues","attributes","propertyValueSpecifications","propertyValueAttachments","propertyValueAttributes","skuSpecifications","specificationGroups","releaseDate","advertisement","deliveryPromisesBadges","availableLinkIds","BLOCKED_SPECIFICATIONS","StoreProductGroup","specificationGroup","StorePropertyValue","valueReference","pickBestSku","offersBySku","o1","o2","isValidSkuId","RECOMMENDATION_VRN_PATTERN","recommendations","normalizedCampaignVrn","normalizedUserId","campaign","correlationId","SORT_MAP","getOrderEntryOperation","getOrderFormItems","isLocalizedSlugMatch","productGroupID","slugPrefix","INVALID_SKU_ID_ERROR","SLUG_MISMATCH_ERROR","AD_HOC_CARD_RESOURCE_KEY","shouldFallbackToProductRoute","assertSkuMatchesSlug","fetchProductBySlugFallback","route","Query","locator","first","maybeAfter","term","crossSelling","after","productIds","productSearchPromise","brands","tree","categoryRoots","dfs","node","parentId","child","validCollections","redirect","region","sellers","addresses","mapAddressesToList","addressesObj","stringifiedObj","errorMessage","parsed","filters","orders","card","granted","uniqueCreatedByIds","quote","createdByNameById","fullName","_ctx","shopperResult","lmRoles","r","shopperName","user","sessionUnitId","StoreReview","isRootFacet","isDepartment","StoreSearchResult","terms","productSearchResult","maybeSku","searches","is","isCollectionPage","StoreSeo","title","canonical","units","isUnit","localizedEstimates","getLocalizedEstimates","estimate","amount","unit","isAmountNumber","isUnitValid","amountKey","ShippingSLA","SKU_IMAGE_LABEL","findSkuVariantImage","availableImages","variationName","variationSpecificImageLabel","variationSpecificImage","imageProperties","skuImage","createSlugsMap","variants","dominantVariantName","baseSlug","slugsMap","variant","skuSpecificationProperties","dominantNameValue","variationDetails","skuVariantKey","property","getActiveSkuVariations","variations","activeVariations","variation","getVariantsByName","specification","compare","sortVariants","variantsByName","sortedVariants","variantProperty","option","getFormattedVariations","dominantVariantValue","previouslySeenPropertyValues","dominantVariantEntry","nameValueIdentifier","variantImageToUse","formattedVariant","variationProperty","SkuVariants","activeDominantVariationValue","deliveryChannelsMapping","UserOrderResult","shippingData","groupedDeliveryOptions","logisticsItem","deliveryCompany","pickupStoreInfo","shippingEstimate","friendlyShippingEstimate","shippingEstimateDate","addressId","groupKey","friendlyDeliveryOptionName","taxPriceTagsTotal","taxPriceTags","filterTaxPriceTags","itemTotal","deliveryOptions","contactInformation","contact","customFields","priceTags","priceTag","VtexResolvers","getResolvers","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","__vite_glob_0_18","__vite_glob_0_19","__vite_glob_0_20","__vite_glob_0_21","__vite_glob_0_22","__vite_glob_0_23","__vite_glob_0_24","__vite_glob_0_25","__vite_glob_0_26","__vite_glob_0_27","__vite_glob_0_28","__vite_glob_0_29","__vite_glob_0_30","__vite_glob_0_31","__vite_glob_0_32","__vite_glob_0_33","__vite_glob_0_34","__vite_glob_0_35","__vite_glob_0_36","__vite_glob_0_37","__vite_glob_0_38","modules","ParsedVtexGraphqlSchema","print","finalSchema","GraphqlVtexContextFactory","nativeGetResolvers","finalResolvers","resolverFunction","GraphqlVtexSchema","mergeSchema","platformSchema","cacheControlDirective","authDirective","isSchema","mergeSchemas"],"mappings":";;;;;;;;;;;;AAqJO,IAAWA,uBAAAA,OAChBA,EAAA,WAAW,YACXA,EAAA,SAAS,UAFOA,IAAAA,MAAA,CAAA,CAAA,GA8LAC,uBAAAA,OAEhBA,EAAA,WAAW,YAEXA,EAAA,SAAS,UAETA,EAAA,UAAU,WANMA,IAAAA,MAAA,CAAA,CAAA,GAunCAC,uBAAAA,OAEhBA,EAAA,QAAQ,SAERA,EAAA,WAAW,YAOXA,EAAA,UAAU,WAEVA,EAAA,aAAa,cAEbA,EAAA,aAAa,cAObA,EAAA,cAAc,eAtBEA,IAAAA,MAAA,CAAA,CAAA,GA8FAC,uBAAAA,OAEhBA,EAAA,UAAU,WAEVA,EAAA,QAAQ,SAJQA,IAAAA,MAAA,CAAA,CAAA,GA+ZAC,uBAAAA,OAEhBA,EAAA,eAAe,iBAEfA,EAAA,UAAU,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