@faststore/api 4.3.0-dev.4 → 4.3.0-dev.6
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 +40 -40
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +1008 -985
- package/dist/es/index.mjs.map +1 -1
- package/dist/src/platforms/vtex/clients/commerce/index.d.ts.map +1 -1
- 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/cookies.d.ts +0 -1
- package/dist/src/platforms/vtex/utils/cookies.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/platforms/vtex/clients/commerce/index.ts +73 -35
- package/src/platforms/vtex/utils/cookies.ts +0 -19
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/utils/cookies.ts","../../src/platforms/vtex/clients/commerce/index.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/subscribeToNewsletter.ts","../../src/platforms/vtex/resolvers/uploadFileToOrderEntry.ts","../../src/platforms/vtex/utils/channel.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/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/resolvers/product.ts","../../src/platforms/vtex/resolvers/productGroup.ts","../../src/platforms/vtex/resolvers/propertyValue.ts","../../src/platforms/vtex/resolvers/getOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/getOrderFormItems.ts","../../src/platforms/vtex/utils/sku.ts","../../src/platforms/vtex/utils/sort.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/review.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/** 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 /** 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 /** 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 /** Returns the details of a collection based on the collection slug. */\n collection: StoreCollection;\n /** Returns the list of Orders that the User can view. */\n listUserOrders?: Maybe<UserOrderListMinimalResult>;\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 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 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 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 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 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/** 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 /** Collection ID. */\n id: Scalars['ID']['output'];\n /** Collection meta information. Used for search. */\n meta: StoreCollectionMeta;\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/** 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/** Product collection type. Possible values are `Department`, `Category`, `Brand`, `Cluster`, `SubCategory` or `Collection`. */\nexport const enum StoreCollectionType {\n /** Product brand. */\n Brand = 'Brand',\n /** Second level of product categorization. */\n Category = 'Category',\n /** Product cluster. */\n Cluster = 'Cluster',\n /** Product collection. */\n Collection = 'Collection',\n /** First level of product categorization. */\n Department = 'Department',\n /** Third level of product categorization. */\n SubCategory = 'SubCategory'\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 /** 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 /** 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 /** 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 /** 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/** 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\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 { OTELAPI } from '@faststore/diagnostics'\nimport { name, version } from '../../package.json' with { type: 'json' }\n\nexport const ResolverTrace = <\n TContext extends {\n OTEL: Record<string, any>\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?: string\n) => {\n return (\n source: TSource,\n vars: TVars,\n graphqlContext: TContext,\n info: any\n ): TReturn => {\n if ((graphqlContext?.OTEL?.enabled ?? false) === false) {\n return fn(source, vars, graphqlContext, info)\n }\n\n const trace = OTELAPI.trace.getTracer(name, version)\n const activeContext = OTELAPI.propagation.extract(\n OTELAPI.context.active(),\n graphqlContext.OTEL\n )\n\n return OTELAPI.context.with(activeContext, () => {\n const span = trace.startSpan(resolverName ?? 'Unknown Graphql Resolver', {\n startTime: Date.now(),\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 },\n })\n\n if (!span) return fn(source, vars, graphqlContext, info)\n try {\n const returnedValue = fn(source, vars, graphqlContext, info)\n\n if (!(returnedValue instanceof Promise)) {\n span.end()\n return returnedValue\n }\n\n return returnedValue.then((value) => {\n span.end()\n return value\n }) as TReturn\n } catch (error) {\n span.end()\n console.error(`Error when executing resolver: ${resolverName}`, error)\n throw error\n }\n })\n }\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 { 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\nexport const getWithAutCookie = (ctx: ContextForCookies) => {\n const withCookie = getWithCookie(ctx)\n\n return function withAutCookie(forwardedHost: string, account: string) {\n const headers: HeadersInit = withCookie({\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n })\n\n const VtexIdclientAutCookie = getAuthCookie(\n ctx?.headers?.cookie ?? '',\n account\n )\n headers['VtexIdclientAutCookie'] = VtexIdclientAutCookie\n\n return headers\n }\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 return JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString())\n}\n","import { parse } from 'cookie'\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 StoreMarketingData,\n type UserOrder,\n type UserOrderCancel,\n type UserOrderListResult,\n} from '../../../..'\nimport type { GraphqlContext } from '../../index'\nimport { getWithAppKeyAndToken } from '../../utils/auth'\nimport type { Channel } from '../../utils/channel'\nimport {\n getStoreCookie,\n getWithAutCookie,\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 { 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 { ScopesByUnit, UnitResponse } from './types/Unit'\nimport type { VtexIdResponse } from './types/VtexId'\n\ntype ValueOf<T> = T extends Record<string, infer K> ? K : never\n\nconst BASE_INIT = {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\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 withAutCookie = getWithAutCookie(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 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 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 }: {\n id?: string\n refreshOutdatedData?: boolean\n channel?: Required<Channel>\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({ sc: salesChannel })\n if (id) {\n params.set('refreshOutdatedData', refreshOutdatedData.toString())\n }\n const url = `${base}/api/checkout/pub/orderForm${id ? `/${id}` : ''}?${params.toString()}`\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,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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 units: {\n getUnitByUserId: ({\n userId,\n }: { userId: string }): Promise<UnitResponse> => {\n const headers: HeadersInit = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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 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 = withAppKeyAndToken({\n Accept: 'application/json',\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\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 vtexid: {\n validate: (): Promise<VtexIdResponse> => {\n const headers: HeadersInit = withAutCookie(forwardedHost, account)\n\n return fetchAPI(\n `${base}/api/vtexid/credential/validate`,\n {\n headers,\n body: JSON.stringify({\n token: headers['VtexIdclientAutCookie'],\n }),\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\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: {\n ...autHeaders,\n 'Content-Type': 'application/json',\n },\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 = withAutCookie(forwardedHost, account)\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 = withAutCookie(forwardedHost, account)\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm?sc=${ctx.storage.channel.salesChannel}`,\n {\n method: 'POST',\n headers: {\n ...autHeaders,\n 'Content-Type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n },\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 = withAutCookie(forwardedHost, account)\n return fetchAPI(\n `${base}/api/checkout/pub/orderForm/${orderFormId}`,\n {\n method: 'GET',\n headers: {\n ...autHeaders,\n 'Content-Type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\n },\n },\n {}\n )\n },\n },\n }\n}\n","import type { GraphqlContext } from '../../'\nimport type { IStoreSelectedFacet } from '../../../../__generated__/schema'\nimport { getWithCookie } from '../../utils/cookies'\nimport type {\n FuzzyFacet,\n OperatorFacet,\n SelectedFacet,\n} from '../../utils/facets'\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 ProductSearchResult,\n Suggestion,\n} from './types/ProductSearchResult'\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 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\nconst POLICY_KEY = 'trade-policy'\nconst REGION_KEY = 'region-id'\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'\n\nconst EXTRA_FACETS_KEYS = new Set([\n POLICY_KEY,\n REGION_KEY,\n FUZZY_KEY,\n OPERATOR_KEY,\n PICKUP_POINT_KEY,\n SHIPPING_KEY,\n DELIVERY_OPTIONS_KEY,\n IN_STOCK_KEY,\n])\n\nexport const isFacetBoolean = (\n facet: Facet\n): facet is Facet<FacetValueBoolean> => facet.type === 'TEXT'\n\nconst isFuzzyFacet = (facet: SelectedFacet): facet is FuzzyFacet => {\n return (\n facet.key === 'fuzzy' &&\n (facet.value === '0' || facet.value === '1' || facet.value === 'auto')\n )\n}\n\nconst isOperatorFacet = (facet: SelectedFacet): facet is OperatorFacet => {\n return (\n facet.key === 'operator' && (facet.value === 'and' || facet.value === 'or')\n )\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/api/io`\n const withCookie = getWithCookie(ctx)\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 getPolicyFacet = (): IStoreSelectedFacet | null => {\n const { salesChannel } = ctx.storage.channel\n\n if (!salesChannel) {\n return null\n }\n\n return {\n key: POLICY_KEY,\n value: salesChannel,\n }\n }\n\n const getRegionFacet = (): IStoreSelectedFacet | null => {\n const { regionId, seller } = ctx.storage.channel\n const sellerRegionId = seller\n ? Buffer.from(`SW#${seller}`).toString('base64')\n : null\n const facet = sellerRegionId ?? regionId\n\n if (!facet) {\n return null\n }\n\n return {\n key: REGION_KEY,\n value: facet,\n }\n }\n\n const addDefaultFacets = (facets: SelectedFacet[]) => {\n const withDefaultFacets = facets.filter(\n ({ key }) => !EXTRA_FACETS_KEYS.has(key)\n )\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 policyFacet =\n facets.find(({ key }) => key === POLICY_KEY) ?? getPolicyFacet()\n\n const regionFacet =\n facets.find(({ key }) => key === REGION_KEY) ?? getRegionFacet()\n\n if (shippingFacet !== null) {\n withDefaultFacets.push(shippingFacet)\n }\n\n if (deliveryOptionsFacet !== null) {\n withDefaultFacets.push(deliveryOptionsFacet)\n }\n\n if (policyFacet !== null) {\n withDefaultFacets.push(policyFacet)\n }\n\n if (regionFacet !== null) {\n withDefaultFacets.push(regionFacet)\n }\n\n return withDefaultFacets\n }\n\n const addSearchParamsFacets = (\n facets: SelectedFacet[],\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\n const search = <T>({\n query = '',\n page,\n count,\n sort = '',\n selectedFacets = [],\n type,\n showInvisibleItems,\n sponsoredCount,\n hideUnavailableItems: searchHideUnavailableItems,\n allowRedirect = false,\n }: SearchArgs): Promise<T> => {\n const params = new URLSearchParams({\n page: (page + 1).toString(),\n count: count !== 0 ? count.toString() : '1',\n query,\n sort,\n locale: ctx.storage.locale,\n })\n\n addSearchParamsFacets(selectedFacets, params)\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n if (hideUnavailableItems !== undefined) {\n const inStockFacet = selectedFacets.find(\n ({ key }) => key === IN_STOCK_KEY\n )\n const shouldHideUnavailableItems = inStockFacet\n ? inStockFacet.value\n : (searchHideUnavailableItems?.toString() ??\n hideUnavailableItems.toString())\n\n params.append('hideUnavailableItems', shouldHideUnavailableItems)\n }\n\n if (simulationBehavior !== undefined) {\n params.append('simulationBehavior', simulationBehavior.toString())\n }\n\n if (showSponsored !== undefined) {\n params.append('showSponsored', 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 pathname = addDefaultFacets(selectedFacets)\n .map(({ key, value }) => `${key}/${value}`)\n .join('/')\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/${type}/${pathname}?${params.toString()}`,\n { headers }\n )\n }\n\n const products = (args: Omit<SearchArgs, 'type'>) =>\n search<ProductSearchResult>({ ...args, type: 'product_search' })\n\n const suggestedTerms = (\n args: Omit<SearchArgs, 'type'>\n ): Promise<Suggestion> => {\n const params = new URLSearchParams({\n query: args.query?.toString() ?? '',\n locale: ctx.storage.locale,\n })\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/search_suggestions?${params.toString()}`,\n { headers }\n )\n }\n\n const topSearches = (): Promise<Suggestion> => {\n const params = new URLSearchParams({\n locale: ctx.storage.locale,\n })\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/top_searches?${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: Pick<SearchArgs, 'query'>\n ): Promise<ProductCountResult> => {\n const params = new URLSearchParams()\n\n if (args?.query) {\n params.append('query', args.query.toString())\n }\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/catalog_count?${params.toString()}`,\n { headers }\n )\n }\n\n return {\n facets,\n products,\n suggestedTerms,\n topSearches,\n productCount,\n }\n}\n","import type { GraphqlContext } from '..'\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\n return {\n search,\n commerce,\n }\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type { CollectionPageType } from '../clients/commerce/types/Portal'\n\n// Limits concurrent requests to 20 so that they don't timeout\nconst CONCURRENT_REQUESTS_MAX = 20\n\nconst collectionPageTypes = new Set([\n 'brand',\n 'category',\n 'department',\n 'subcategory',\n 'collection',\n 'cluster',\n] as const)\n\nexport const isCollectionPageType = (x: any): x is CollectionPageType =>\n typeof x.pageType === 'string' &&\n collectionPageTypes.has(x.pageType.toLowerCase())\n\nexport const getCollectionLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (\n slugs: readonly string[]\n ): Promise<CollectionPageType[]> => {\n return Promise.all(\n slugs.map((slug: string) =>\n limit(async () => {\n const page = await clients.commerce.catalog.portal.pagetype(slug)\n\n if (isCollectionPageType(page)) {\n return page\n }\n\n throw new NotFoundError(\n `Catalog returned ${page.pageType} for slug: ${slug}. This usually happens when there is more than one category with the same name in the same category tree level.`\n )\n })\n )\n )\n }\n\n return new DataLoader<string, CollectionPageType>(loader, {\n // DataLoader is being used to cache requests, not to batch them\n batch: false,\n })\n}\n","import DataLoader from 'dataloader'\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'\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'\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.products({\n query: `sku:${skuIds.join(';')}`,\n page: 0,\n count: skuIds.length,\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 { 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, { clients }: GraphqlContext) => {\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 { 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 { 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 { isCollectionPageType } from '../loaders/collection'\nimport { slugify } from '../utils/slugify'\n\nexport type Root =\n | Brand\n | (CategoryTree & { level: number })\n | CollectionPageType\n\nconst isBrand = (x: any): x is Brand | CollectionPageType =>\n x.type === 'brand' ||\n (isCollectionPageType(x) && x.pageType.toLowerCase() === 'brand')\n\nconst isCollection = (x: Root): x is CollectionPageType =>\n isCollectionPageType(x) && x.pageType.toLowerCase() === 'collection'\n\nconst slugifyRoot = (root: Root) => {\n if (isBrand(root) || isCollection(root)) {\n return slugify(root.name)\n }\n\n if (isCollectionPageType(root)) {\n return new URL(`https://${root.url}`).pathname.slice(1).toLowerCase()\n }\n\n return new URL(root.url).pathname.slice(1).toLowerCase()\n}\n\nexport const StoreCollection: Record<string, GraphqlResolver<Root>> = {\n id: ({ id }) => id.toString(),\n slug: (root) => slugifyRoot(root),\n seo: (root) =>\n isBrand(root) || isCollectionPageType(root)\n ? {\n title: root.title ?? root.name,\n description: root.metaTagDescription,\n }\n : {\n title: root.Title,\n description: root.MetaTagDescription,\n },\n type: (root) =>\n isBrand(root)\n ? 'Brand'\n : isCollectionPageType(root)\n ? root.pageType\n : root.level === 0\n ? 'Department'\n : 'Category',\n meta: (root) => {\n const slug = slugifyRoot(root)\n\n return isBrand(root)\n ? {\n selectedFacets: [{ key: 'brand', value: slug }],\n }\n : isCollection(root)\n ? {\n selectedFacets: [{ key: 'productclusterids', value: root.id }],\n }\n : {\n selectedFacets: slug.split('/').map((segment, index) => ({\n key: `category-${index + 1}`,\n value: segment,\n })),\n }\n },\n breadcrumbList: async (root, _, ctx) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n const slug = slugifyRoot(root)\n\n /**\n * Split slug into segments so we fetch all data for\n * the breadcrumb. For instance, if we get `/foo/bar`\n * we need all metadata for both `/foo` and `/bar` and\n * thus we need to fetch pageType for `/foo` and `/bar`\n */\n const segments = slug.split('/').filter((segment) => Boolean(segment))\n const slugs = segments.map((__, index) =>\n segments.slice(0, index + 1).join('/')\n )\n\n const collections: (CollectionPageType & {\n slug: string\n })[] = await Promise.all(\n slugs.map(async (s) => {\n const collection = await collectionLoader.load(s)\n return { slug: s, ...collection }\n })\n )\n\n return {\n itemListElement: collections.map((collection, index) => ({\n item: isCollection(collection)\n ? `/${collection.slug}`\n : new URL(\n `https://${(collection as CollectionPageType).url}`\n ).pathname.toLowerCase(),\n name: collection.name,\n position: index + 1,\n })),\n numberOfItems: collections.length,\n }\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 '..'\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 { 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 { 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})\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 const pick = (item: Indexed<IStoreOffer>, index: number) => ({\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) => {\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 },\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/**\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 const orderForm = await commerce.checkout.orderForm({\n id: orderFormIdFromCookie || undefined,\n channel: ctx.storage.channel,\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 const newOrderForm = await setOrderFormEtag(\n orderForm,\n commerce,\n sessionJwt\n ).then(joinItems)\n if (orderNumber) {\n return orderFormToCart(newOrderForm, skuLoader, shouldSplitItem)\n }\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 changes and no shipping data updates needed, return null\n if (changes.length === 0 && !updateShipping) {\n return null\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 null\n }\n\n // Step6: There were changes, convert orderForm to StoreCart\n return orderFormToCart(updatedOrderForm, skuLoader, shouldSplitItem)\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport type { GraphqlContext } from '..'\nimport type {\n MutationValidateSessionArgs,\n StoreMarketingData,\n StoreSession,\n} from '../../../__generated__/schema'\nimport ChannelMarshal from '../utils/channel'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\n\nasync 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 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 // Update location data if postal code and country are provided\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 = new URLSearchParams(search)\n\n // Remove facets parameter if it exists so that it does not interfere with session data and prioritize vtex_segment\n if (params.has('facets')) {\n params.delete('facets')\n }\n\n const salesChannel = params.get('sc') ?? channel.salesChannel\n params.set('sc', 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', oldSession.locale)\n\n const { marketingData: oldMarketingData } = oldSession\n\n const marketingData: StoreMarketingData = {\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 const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n\n // Validate JWT token if it exists\n let isValidJwt = false\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 // Only use JWT data if the token is valid\n const isRepresentative = isValidJwt ? jwt?.isRepresentative : false\n const customerId = isValidJwt ? jwt?.customerId : undefined\n const unitId = isValidJwt ? jwt?.unitId : undefined\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 ?? null\n const authentication = sessionData?.namespaces.authentication ?? null\n const checkout = sessionData?.namespaces.checkout ?? null\n const publicData = sessionData?.namespaces.public ?? null\n\n // Fetch contract data for B2B representatives\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 (err) {\n console.error(\n `Error while getting contract data for profile ID (${profile.id.value}).\\n`\n )\n }\n }\n\n // Set seller only if it's inside a region\n let seller\n if (!!channel.seller && (postalCode || geoCoordinates)) {\n const regionData = await clients.commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n seller = region?.sellers.find((seller) => channel.seller === seller.id)\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: ChannelMarshal.stringify({\n salesChannel: store?.channel?.value ?? channel.salesChannel,\n regionId: checkout?.regionId?.value ?? channel.regionId,\n seller: seller?.id,\n hasOnlyDefaultSalesChannel: !store?.channel?.value,\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: isRepresentative\n ? {\n isRepresentative: isRepresentative ?? false,\n customerId: authentication?.customerId?.value ?? customerId ?? '',\n unitName: authentication?.unitName?.value ?? '',\n unitId: authentication?.unitId?.value ?? unitId ?? '',\n firstName:\n typeof shopper?.firstName?.value === 'string'\n ? shopper.firstName.value\n : '',\n lastName:\n typeof shopper?.lastName?.value === 'string'\n ? shopper.lastName.value\n : '',\n userName:\n `${typeof shopper?.firstName?.value === 'string' ? shopper.firstName.value : ''} ${typeof shopper?.lastName?.value === 'string' ? shopper.lastName.value : ''}`.trim(),\n userEmail: authentication?.storeUserEmail.value ?? '',\n savedPostalCode: publicData?.postalCode?.value ?? '',\n contractName: contract?.corporateName ?? '',\n organizationManager: shopper?.organizationManager?.value ?? false,\n }\n : null,\n marketingData,\n person: profile?.id\n ? {\n id: profile.id?.value ?? '',\n email: profile.email?.value ?? '',\n givenName: profile.firstName?.value ?? '',\n familyName: profile.lastName?.value ?? '',\n }\n : null,\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 { 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}\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 { 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}\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","import type { GraphqlResolver } from '..'\nimport type { StoreImage, StoreProductImageArgs } from '../../..'\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 { bestOfferFirst } from '../utils/productStock'\nimport {\n attachmentToPropertyValue,\n attributeToPropertyValue,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\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 * 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: ({\n isVariantOf: {\n categories,\n productName,\n linkText,\n categoryId,\n categoriesIds,\n },\n itemId,\n }) => {\n const mainTreeIndex = findMainTreeIndex(categoriesIds, categoryId)\n const mainTree = categories[mainTreeIndex]\n const splittedCategories = removeTrailingSlashes(mainTree).split('/')\n\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 } }) => releaseDate ?? '',\n advertisement: ({ isVariantOf: { advertisement } }) => advertisement,\n deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges } }) =>\n deliveryPromisesBadges,\n}\n","import type { GraphqlResolver } from '..'\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 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 { 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","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 {\n ProcessOrderAuthorizationRule,\n QueryAllCollectionsArgs,\n QueryAllProductsArgs,\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 UserOrderFromList,\n} from '../../../__generated__/schema'\nimport { getOrderEntryOperation } from './getOrderEntryOperation'\nimport { getOrderFormItems } from './getOrderFormItems'\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 { GraphqlContext } from '../index'\nimport { extractRuleForAuthorization } from '../utils/commercialAuth'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport {\n findChannel,\n findCrossSelling,\n findLocale,\n findSkuId,\n findSlug,\n transformSelectedFacet,\n} from '../utils/facets'\nimport { isValidSkuId, pickBestSku } from '../utils/sku'\nimport { SORT_MAP } from '../utils/sort'\nimport { FACET_CROSS_SELLING_MAP } from './../utils/facets'\nimport { StoreCollection } from './collection'\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 clients: { commerce, search },\n } = ctx\n\n try {\n const skuId = id ?? slug?.split('-').pop() ?? ''\n\n if (!isValidSkuId(skuId)) {\n throw new Error('Invalid SkuId')\n }\n\n const sku = await skuLoader.load(skuId)\n\n /**\n * Here be dragons 🦄🦄🦄\n *\n * In some cases, the slug has a valid skuId for a different\n * product. This condition makes sure that the fetched sku\n * is the one we actually asked for\n * */\n if (\n slug &&\n sku.isVariantOf.linkText &&\n !slug.startsWith(sku.isVariantOf.linkText)\n ) {\n throw new Error(\n `Slug was set but the fetched sku does not satisfy the slug condition. slug: ${slug}, linkText: ${sku.isVariantOf.linkText}`\n )\n }\n\n return sku\n } catch (err) {\n if (slug == null) {\n throw new BadRequestError('Missing slug or id')\n }\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 {\n products: [product],\n } = await search.products({\n page: 0,\n count: 1,\n query: `product:${route.id}`,\n // Manually disabling this flag to prevent regionalization issues\n hideUnavailableItems: false,\n })\n\n if (!product) {\n throw new NotFoundError(`No product found for id ${route.id}`)\n }\n\n const sku = pickBestSku(product.items)\n\n return enhanceSku(sku, product)\n }\n },\n collection: (\n _: unknown,\n { slug }: QueryCollectionArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n return collectionLoader.load(slug)\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 let query = term\n\n /**\n * In case we are using crossSelling, we need to modify the search\n * we will be performing on our search engine. The idea in here\n * is to use the cross selling API for fetching the productIds our\n * search will return for us.\n * Doing this two request workflow makes it possible to have cross\n * selling with Search features, like pagination, internationalization\n * etc\n */\n if (crossSelling) {\n const products = await ctx.clients.commerce.catalog.products.crossselling(\n {\n type: FACET_CROSS_SELLING_MAP[crossSelling.key],\n productId: crossSelling.value,\n }\n )\n\n query = `product:${products\n .map((x) => x.productId)\n .slice(0, first)\n .join(';')}`\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: query ?? undefined,\n sort: SORT_MAP[sort ?? 'score_desc'],\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n sponsoredCount: sponsoredCount ?? undefined,\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 query = `id:${productIds.join(';')}`\n const products = await search.products({\n page: 0,\n count: productIds.length,\n query,\n })\n\n return products.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 const categories: Array<CategoryTree & { level: number }> = []\n const dfs = (node: CategoryTree, level: number) => {\n categories.push({ ...node, level })\n\n for (const child of node.children) {\n dfs(child, level + 1)\n }\n }\n\n for (const node of tree) {\n dfs(node, 0)\n }\n\n const collections = [\n ...brands\n .filter((brand) => brand.isActive)\n .map((x) => ({ ...x, type: 'brand' })),\n ...categories,\n ]\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 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 // 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 contract = await commerce.masterData.getContractById({\n contractId: profile?.id?.value ?? '',\n })\n\n const name =\n contract?.corporateName ??\n `${(profile?.firstName?.value ?? '').trim()} ${(profile?.lastName?.value ?? '').trim()}`.trim()\n\n return {\n name: name || '',\n email: profile?.email?.value || '',\n id: profile?.id?.value || '',\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 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}\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 { 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 { 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 {\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`, `Cluster`, `SubCategory` or `Collection`.\\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 SubCategory\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n Brand\\n \\\"\\\"\\\"\\n Product cluster.\\n \\\"\\\"\\\"\\n Cluster\\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\"","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\"","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\\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\"","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\\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\"","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\\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 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 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 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\\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 \"\\\"\\\"\\\"\\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 \"\\\"\\\"\\\"\\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 { OTELAPI } from '@faststore/diagnostics'\nimport { 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 { 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 headers: Record<string, string>\n account: string\n OTEL: Record<string, unknown>\n}\n\nexport const GraphqlVtexContextFactory = async (options: Options) => {\n return OTELAPI.context.with(\n OTELAPI.propagation.extract(OTELAPI.context.active(), options.OTEL),\n () =>\n (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.clients = getClients(options, ctx)\n ctx.loaders = getLoaders(options, ctx)\n ctx.account = options.account\n ctx.OTEL = options.OTEL\n ctx.discoveryConfig = options.discoveryConfig\n\n return ctx\n }\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":["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","ResolverTrace","fn","resolverName","source","vars","graphqlContext","trace","OTELAPI","name","version","activeContext","span","returnedValue","value","FastStoreError","extensions","message","BadRequestError","NotFoundError","isFastStoreError","isBadRequestError","isUnauthorizedError","isForbiddenError","isNotFoundError","USER_AGENT","packageJson","fetchAPI","init","options","response","fetch","text","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","account","normalizedCookies","parse","getWithAutCookie","withCookie","forwardedHost","VtexIdclientAutCookie","MATCH_COOKIE_KEY_VALUE","cookieParts","parseJwt","token","BASE_INIT","VtexCommerce","environment","incrementAddress","subDomainPrefix","base","storeCookies","withAutCookie","withAppKeyAndToken","host","selectedPrefix","prefix","sc","depth","slug","type","productId","groupByProduct","params","salesChannel","id","index","deliveryMode","selectedAddresses","setDeliveryWindow","deliveryWindow","mappedBody","_","itemIndex","marketingData","clientPreferencesData","refreshOutdatedData","channel","url","orderItems","allowOutdatedData","shouldSplitItem","appId","postalCode","geoCoordinates","country","orderId","customerEmail","reason","search","sessionCookie","data","userId","page","dateInitial","dateFinal","clientEmail","perPage","pendingMyApproval","dateInitialTimestamp","dateFinalTimestamp","orderAuthorizationId","dimensionId","ruleId","approved","body","orgUnitId","email","contractId","userIdNormalized","fileBuffer","fileName","mimeType","autHeaders","boundary","CRLF","safeMimeType","safeFileName","headerPart","footer","headerBytes","footerBytes","offset","objectKey","orderFormId","sessionToken","operationId","POLICY_KEY","REGION_KEY","FUZZY_KEY","OPERATOR_KEY","PICKUP_POINT_KEY","SHIPPING_KEY","DELIVERY_OPTIONS_KEY","IN_STOCK_KEY","EXTRA_FACETS_KEYS","isFuzzyFacet","facet","isOperatorFacet","IntelligentSearch","hideUnavailableItems","simulationBehavior","showSponsored","getPolicyFacet","getRegionFacet","regionId","seller","addDefaultFacets","facets","withDefaultFacets","shippingFacet","deliveryOptionsFacet","policyFacet","regionFacet","addSearchParamsFacets","fuzzyFacet","operatorFacet","pickupPointFacet","query","count","sort","selectedFacets","showInvisibleItems","sponsoredCount","searchHideUnavailableItems","allowRedirect","inStockFacet","shouldHideUnavailableItems","pathname","getClients","CONCURRENT_REQUESTS_MAX","collectionPageTypes","isCollectionPageType","x","getCollectionLoader","clients","limit","pLimit","loader","slugs","DataLoader","getSalesChannelLoader","channels","getSimulationLoader","simulationArgs","allItems","acc","items","simulation","simulated","item","itemsIndices","curr","__","limited","sanitizeHtml","dirty","sanitizeHtmlLib","sanitizeProduct","product","enhanceSku","getSkuLoader","flags","keys","skuIds","products","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","from","to","removeDiacritics","str","newStr","i","slugifySpecialCharacters","slugify","replaced","isBrand","isCollection","slugifyRoot","StoreCollection","segment","segments","collections","s","collection","FACET_CROSS_SELLING_MAP","transformSelectedFacet","parseRange","range","splitted","isCrossSelling","findCrossSelling","filtered","findSlug","findSkuId","findLocale","findChannel","array","cmp","best","StoreFacet","values","StoreFacetBoolean","StoreFacetRange","searchArgs","selectedRange","globalMin","globalMax","StoreFacetValueBoolean","selected","quantity","cancelOrder","extractRuleForAuthorization","commercialAuth","dimension","pendingRule","rule","isPendingForOtherAuthorizer","pendingRules","processOrderAuthorization","ruleForAuthorization","startOrderEntryOperation","subscribeToNewsletter","uploadFileToOrderEntry","fileContent","normalized","MAX_FILE_BYTES","ChannelMarshal","channelString","parsedChannel","mutateChannelContext","mutateLocaleContext","locale","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","getOrderFormEtag","sessionJwt","criticalItems","setOrderFormEtag","err","isOrderFormStale","oldEtag","app","clearOrderFormMessages","updateOrderFormShippingData","updateShipping","oldAddress","getCookieCheckoutOrderNumber","nameCookie","validateCart","order","orderFormIdFromCookie","orderNumber","acceptedOffer","newOrderForm","browserItemsById","originItemsById","originItems","browserItems","itemsToAdd","itemsToUpdate","maybeOriginItem","head","tail","totalQuantity","itemsToDelete","changes","updatedOrderForm","updatedMarketingData","equalMessages","getPreciseLocationData","validateSession","oldSession","city","preciseLocation","oldMarketingData","jwt","isValidJwt","isRepresentative","customerId","unitId","sessionData","profile","shopper","store","authentication","checkout","publicData","contract","newSession","Mutation","Kind","toObjectOrString","getValueAsObjectOrString","ObjectOrString","GraphQLScalarType","ast","isSearchItem","isOrderFormItem","StoreOffer","canonicalFromProduct","linkText","enhanceCommercialOffer","DEFAULT_IMAGE","getSlug","link","getPath","nonEmptyArray","removeTrailingSlashes","path","findMainTreeIndex","categoriesIds","categoryId","mainTreeIndex","idsTree","StoreProduct","isVariantOf","description","brand","categories","productName","mainTree","splittedCategories","images","resolvedImages","imageUrl","imageText","imageLabel","shouldFilter","filteredImages","imageKeywords","ean","referenceId","manufacturerCode","specifications","attachmentsValues","attributes","propertyValueSpecifications","propertyValueAttachments","propertyValueAttributes","skuSpecifications","specificationGroups","releaseDate","advertisement","deliveryPromisesBadges","BLOCKED_SPECIFICATIONS","StoreProductGroup","specificationGroup","StorePropertyValue","valueReference","getOrderEntryOperation","getOrderFormItems","pickBestSku","offersBySku","o1","o2","isValidSkuId","SORT_MAP","Query","locator","route","first","maybeAfter","term","crossSelling","after","productSearchPromise","productIds","brands","tree","dfs","node","level","child","validCollections","redirect","region","sellers","addresses","mapAddressesToList","addressesObj","stringifiedObj","errorMessage","result","parsed","filters","orders","_ctx","shopperResult","lmRoles","fullName","r","user","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","entry","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","modules","ParsedVtexGraphqlSchema","print","finalSchema","GraphqlVtexContextFactory","nativeGetResolvers","finalResolvers","resolverFunction","GraphqlVtexSchema","mergeSchema","platformSchema","cacheControlDirective","authDirective","isSchema","mergeSchemas"],"mappings":";;;;;;;;;;;;AAyUO,IAAWA,uBAAAA,OAEhBA,EAAA,WAAW,YAEXA,EAAA,SAAS,UAETA,EAAA,UAAU,WANMA,IAAAA,MAAA,CAAA,CAAA,GAm/BAC,uBAAAA,OAEhBA,EAAA,QAAQ,SAERA,EAAA,WAAW,YAEXA,EAAA,UAAU,WAEVA,EAAA,aAAa,cAEbA,EAAA,aAAa,cAEbA,EAAA,cAAc,eAZEA,IAAAA,MAAA,CAAA,CAAA,GAuEAC,uBAAAA,OAEhBA,EAAA,UAAU,WAEVA,EAAA,QAAQ,SAJQA,IAAAA,MAAA,CAAA,CAAA,GA6XAC,uBAAAA,OAEhBA,EAAA,eAAe,iBAEfA,EAAA,UAAU,YAEVA,EAAA,WAAW,aAEXA,EAA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AA,CACD,EAEuCjD,GAAA,GAAgBpoB,EAAQ;AAEhE,SAAIkrB,KAAeI,GAASJ,CAAW,IAC9BK,GAAa;AAAA,IAClB,SAAS,CAACJ,GAAgBD,CAAW;AAAA,EAAA,CACtC,IAGIC;AACT;","x_google_ignoreList":[45]}
|
|
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/utils/cookies.ts","../../src/platforms/vtex/clients/commerce/index.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/subscribeToNewsletter.ts","../../src/platforms/vtex/resolvers/uploadFileToOrderEntry.ts","../../src/platforms/vtex/utils/channel.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/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/resolvers/product.ts","../../src/platforms/vtex/resolvers/productGroup.ts","../../src/platforms/vtex/resolvers/propertyValue.ts","../../src/platforms/vtex/resolvers/getOrderEntryOperation.ts","../../src/platforms/vtex/resolvers/getOrderFormItems.ts","../../src/platforms/vtex/utils/sku.ts","../../src/platforms/vtex/utils/sort.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/review.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/** 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 /** 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 /** 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 /** Returns the details of a collection based on the collection slug. */\n collection: StoreCollection;\n /** Returns the list of Orders that the User can view. */\n listUserOrders?: Maybe<UserOrderListMinimalResult>;\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 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 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 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 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 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/** 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 /** Collection ID. */\n id: Scalars['ID']['output'];\n /** Collection meta information. Used for search. */\n meta: StoreCollectionMeta;\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/** 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/** Product collection type. Possible values are `Department`, `Category`, `Brand`, `Cluster`, `SubCategory` or `Collection`. */\nexport const enum StoreCollectionType {\n /** Product brand. */\n Brand = 'Brand',\n /** Second level of product categorization. */\n Category = 'Category',\n /** Product cluster. */\n Cluster = 'Cluster',\n /** Product collection. */\n Collection = 'Collection',\n /** First level of product categorization. */\n Department = 'Department',\n /** Third level of product categorization. */\n SubCategory = 'SubCategory'\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 /** 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 /** 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 /** 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 /** 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/** 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\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 { OTELAPI } from '@faststore/diagnostics'\nimport { name, version } from '../../package.json' with { type: 'json' }\n\nexport const ResolverTrace = <\n TContext extends {\n OTEL: Record<string, any>\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?: string\n) => {\n return (\n source: TSource,\n vars: TVars,\n graphqlContext: TContext,\n info: any\n ): TReturn => {\n if ((graphqlContext?.OTEL?.enabled ?? false) === false) {\n return fn(source, vars, graphqlContext, info)\n }\n\n const trace = OTELAPI.trace.getTracer(name, version)\n const activeContext = OTELAPI.propagation.extract(\n OTELAPI.context.active(),\n graphqlContext.OTEL\n )\n\n return OTELAPI.context.with(activeContext, () => {\n const span = trace.startSpan(resolverName ?? 'Unknown Graphql Resolver', {\n startTime: Date.now(),\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 },\n })\n\n if (!span) return fn(source, vars, graphqlContext, info)\n try {\n const returnedValue = fn(source, vars, graphqlContext, info)\n\n if (!(returnedValue instanceof Promise)) {\n span.end()\n return returnedValue\n }\n\n return returnedValue.then((value) => {\n span.end()\n return value\n }) as TReturn\n } catch (error) {\n span.end()\n console.error(`Error when executing resolver: ${resolverName}`, error)\n throw error\n }\n })\n }\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 { 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 return JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString())\n}\n","import { parse } from 'cookie'\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 StoreMarketingData,\n type UserOrder,\n type UserOrderCancel,\n type UserOrderListResult,\n} from '../../../..'\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 { 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 { ScopesByUnit, UnitResponse } from './types/Unit'\nimport type { VtexIdResponse } from './types/VtexId'\n\ntype ValueOf<T> = T extends Record<string, infer K> ? K : never\n\nconst BASE_INIT = {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\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 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 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 }: {\n id?: string\n refreshOutdatedData?: boolean\n channel?: Required<Channel>\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({ sc: salesChannel })\n if (id) {\n params.set('refreshOutdatedData', refreshOutdatedData.toString())\n }\n const url = `${base}/api/checkout/pub/orderForm${id ? `/${id}` : ''}?${params.toString()}`\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,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 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 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 = withAppKeyAndToken({\n Accept: 'application/json',\n 'content-type': 'application/json',\n 'X-FORWARDED-HOST': forwardedHost,\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 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}\n","import type { GraphqlContext } from '../../'\nimport type { IStoreSelectedFacet } from '../../../../__generated__/schema'\nimport { getWithCookie } from '../../utils/cookies'\nimport type {\n FuzzyFacet,\n OperatorFacet,\n SelectedFacet,\n} from '../../utils/facets'\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 ProductSearchResult,\n Suggestion,\n} from './types/ProductSearchResult'\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 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\nconst POLICY_KEY = 'trade-policy'\nconst REGION_KEY = 'region-id'\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'\n\nconst EXTRA_FACETS_KEYS = new Set([\n POLICY_KEY,\n REGION_KEY,\n FUZZY_KEY,\n OPERATOR_KEY,\n PICKUP_POINT_KEY,\n SHIPPING_KEY,\n DELIVERY_OPTIONS_KEY,\n IN_STOCK_KEY,\n])\n\nexport const isFacetBoolean = (\n facet: Facet\n): facet is Facet<FacetValueBoolean> => facet.type === 'TEXT'\n\nconst isFuzzyFacet = (facet: SelectedFacet): facet is FuzzyFacet => {\n return (\n facet.key === 'fuzzy' &&\n (facet.value === '0' || facet.value === '1' || facet.value === 'auto')\n )\n}\n\nconst isOperatorFacet = (facet: SelectedFacet): facet is OperatorFacet => {\n return (\n facet.key === 'operator' && (facet.value === 'and' || facet.value === 'or')\n )\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/api/io`\n const withCookie = getWithCookie(ctx)\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 getPolicyFacet = (): IStoreSelectedFacet | null => {\n const { salesChannel } = ctx.storage.channel\n\n if (!salesChannel) {\n return null\n }\n\n return {\n key: POLICY_KEY,\n value: salesChannel,\n }\n }\n\n const getRegionFacet = (): IStoreSelectedFacet | null => {\n const { regionId, seller } = ctx.storage.channel\n const sellerRegionId = seller\n ? Buffer.from(`SW#${seller}`).toString('base64')\n : null\n const facet = sellerRegionId ?? regionId\n\n if (!facet) {\n return null\n }\n\n return {\n key: REGION_KEY,\n value: facet,\n }\n }\n\n const addDefaultFacets = (facets: SelectedFacet[]) => {\n const withDefaultFacets = facets.filter(\n ({ key }) => !EXTRA_FACETS_KEYS.has(key)\n )\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 policyFacet =\n facets.find(({ key }) => key === POLICY_KEY) ?? getPolicyFacet()\n\n const regionFacet =\n facets.find(({ key }) => key === REGION_KEY) ?? getRegionFacet()\n\n if (shippingFacet !== null) {\n withDefaultFacets.push(shippingFacet)\n }\n\n if (deliveryOptionsFacet !== null) {\n withDefaultFacets.push(deliveryOptionsFacet)\n }\n\n if (policyFacet !== null) {\n withDefaultFacets.push(policyFacet)\n }\n\n if (regionFacet !== null) {\n withDefaultFacets.push(regionFacet)\n }\n\n return withDefaultFacets\n }\n\n const addSearchParamsFacets = (\n facets: SelectedFacet[],\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\n const search = <T>({\n query = '',\n page,\n count,\n sort = '',\n selectedFacets = [],\n type,\n showInvisibleItems,\n sponsoredCount,\n hideUnavailableItems: searchHideUnavailableItems,\n allowRedirect = false,\n }: SearchArgs): Promise<T> => {\n const params = new URLSearchParams({\n page: (page + 1).toString(),\n count: count !== 0 ? count.toString() : '1',\n query,\n sort,\n locale: ctx.storage.locale,\n })\n\n addSearchParamsFacets(selectedFacets, params)\n\n if (showInvisibleItems) {\n params.append('show-invisible-items', 'true')\n }\n\n if (hideUnavailableItems !== undefined) {\n const inStockFacet = selectedFacets.find(\n ({ key }) => key === IN_STOCK_KEY\n )\n const shouldHideUnavailableItems = inStockFacet\n ? inStockFacet.value\n : (searchHideUnavailableItems?.toString() ??\n hideUnavailableItems.toString())\n\n params.append('hideUnavailableItems', shouldHideUnavailableItems)\n }\n\n if (simulationBehavior !== undefined) {\n params.append('simulationBehavior', simulationBehavior.toString())\n }\n\n if (showSponsored !== undefined) {\n params.append('showSponsored', 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 pathname = addDefaultFacets(selectedFacets)\n .map(({ key, value }) => `${key}/${value}`)\n .join('/')\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/${type}/${pathname}?${params.toString()}`,\n { headers }\n )\n }\n\n const products = (args: Omit<SearchArgs, 'type'>) =>\n search<ProductSearchResult>({ ...args, type: 'product_search' })\n\n const suggestedTerms = (\n args: Omit<SearchArgs, 'type'>\n ): Promise<Suggestion> => {\n const params = new URLSearchParams({\n query: args.query?.toString() ?? '',\n locale: ctx.storage.locale,\n })\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/search_suggestions?${params.toString()}`,\n { headers }\n )\n }\n\n const topSearches = (): Promise<Suggestion> => {\n const params = new URLSearchParams({\n locale: ctx.storage.locale,\n })\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/top_searches?${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: Pick<SearchArgs, 'query'>\n ): Promise<ProductCountResult> => {\n const params = new URLSearchParams()\n\n if (args?.query) {\n params.append('query', args.query.toString())\n }\n\n return fetchAPI(\n `${base}/_v/api/intelligent-search/catalog_count?${params.toString()}`,\n { headers }\n )\n }\n\n return {\n facets,\n products,\n suggestedTerms,\n topSearches,\n productCount,\n }\n}\n","import type { GraphqlContext } from '..'\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\n return {\n search,\n commerce,\n }\n}\n","import DataLoader from 'dataloader'\nimport pLimit from 'p-limit'\n\nimport { NotFoundError } from '../../errors'\nimport type { Clients } from '../clients'\nimport type { CollectionPageType } from '../clients/commerce/types/Portal'\n\n// Limits concurrent requests to 20 so that they don't timeout\nconst CONCURRENT_REQUESTS_MAX = 20\n\nconst collectionPageTypes = new Set([\n 'brand',\n 'category',\n 'department',\n 'subcategory',\n 'collection',\n 'cluster',\n] as const)\n\nexport const isCollectionPageType = (x: any): x is CollectionPageType =>\n typeof x.pageType === 'string' &&\n collectionPageTypes.has(x.pageType.toLowerCase())\n\nexport const getCollectionLoader = (_: Options, clients: Clients) => {\n const limit = pLimit(CONCURRENT_REQUESTS_MAX)\n\n const loader = async (\n slugs: readonly string[]\n ): Promise<CollectionPageType[]> => {\n return Promise.all(\n slugs.map((slug: string) =>\n limit(async () => {\n const page = await clients.commerce.catalog.portal.pagetype(slug)\n\n if (isCollectionPageType(page)) {\n return page\n }\n\n throw new NotFoundError(\n `Catalog returned ${page.pageType} for slug: ${slug}. This usually happens when there is more than one category with the same name in the same category tree level.`\n )\n })\n )\n )\n }\n\n return new DataLoader<string, CollectionPageType>(loader, {\n // DataLoader is being used to cache requests, not to batch them\n batch: false,\n })\n}\n","import DataLoader from 'dataloader'\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'\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'\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.products({\n query: `sku:${skuIds.join(';')}`,\n page: 0,\n count: skuIds.length,\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 { 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, { clients }: GraphqlContext) => {\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 { 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 { 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 { isCollectionPageType } from '../loaders/collection'\nimport { slugify } from '../utils/slugify'\n\nexport type Root =\n | Brand\n | (CategoryTree & { level: number })\n | CollectionPageType\n\nconst isBrand = (x: any): x is Brand | CollectionPageType =>\n x.type === 'brand' ||\n (isCollectionPageType(x) && x.pageType.toLowerCase() === 'brand')\n\nconst isCollection = (x: Root): x is CollectionPageType =>\n isCollectionPageType(x) && x.pageType.toLowerCase() === 'collection'\n\nconst slugifyRoot = (root: Root) => {\n if (isBrand(root) || isCollection(root)) {\n return slugify(root.name)\n }\n\n if (isCollectionPageType(root)) {\n return new URL(`https://${root.url}`).pathname.slice(1).toLowerCase()\n }\n\n return new URL(root.url).pathname.slice(1).toLowerCase()\n}\n\nexport const StoreCollection: Record<string, GraphqlResolver<Root>> = {\n id: ({ id }) => id.toString(),\n slug: (root) => slugifyRoot(root),\n seo: (root) =>\n isBrand(root) || isCollectionPageType(root)\n ? {\n title: root.title ?? root.name,\n description: root.metaTagDescription,\n }\n : {\n title: root.Title,\n description: root.MetaTagDescription,\n },\n type: (root) =>\n isBrand(root)\n ? 'Brand'\n : isCollectionPageType(root)\n ? root.pageType\n : root.level === 0\n ? 'Department'\n : 'Category',\n meta: (root) => {\n const slug = slugifyRoot(root)\n\n return isBrand(root)\n ? {\n selectedFacets: [{ key: 'brand', value: slug }],\n }\n : isCollection(root)\n ? {\n selectedFacets: [{ key: 'productclusterids', value: root.id }],\n }\n : {\n selectedFacets: slug.split('/').map((segment, index) => ({\n key: `category-${index + 1}`,\n value: segment,\n })),\n }\n },\n breadcrumbList: async (root, _, ctx) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n const slug = slugifyRoot(root)\n\n /**\n * Split slug into segments so we fetch all data for\n * the breadcrumb. For instance, if we get `/foo/bar`\n * we need all metadata for both `/foo` and `/bar` and\n * thus we need to fetch pageType for `/foo` and `/bar`\n */\n const segments = slug.split('/').filter((segment) => Boolean(segment))\n const slugs = segments.map((__, index) =>\n segments.slice(0, index + 1).join('/')\n )\n\n const collections: (CollectionPageType & {\n slug: string\n })[] = await Promise.all(\n slugs.map(async (s) => {\n const collection = await collectionLoader.load(s)\n return { slug: s, ...collection }\n })\n )\n\n return {\n itemListElement: collections.map((collection, index) => ({\n item: isCollection(collection)\n ? `/${collection.slug}`\n : new URL(\n `https://${(collection as CollectionPageType).url}`\n ).pathname.toLowerCase(),\n name: collection.name,\n position: index + 1,\n })),\n numberOfItems: collections.length,\n }\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 '..'\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 { 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 { 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})\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 const pick = (item: Indexed<IStoreOffer>, index: number) => ({\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) => {\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 },\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/**\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 const orderForm = await commerce.checkout.orderForm({\n id: orderFormIdFromCookie || undefined,\n channel: ctx.storage.channel,\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 const newOrderForm = await setOrderFormEtag(\n orderForm,\n commerce,\n sessionJwt\n ).then(joinItems)\n if (orderNumber) {\n return orderFormToCart(newOrderForm, skuLoader, shouldSplitItem)\n }\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 changes and no shipping data updates needed, return null\n if (changes.length === 0 && !updateShipping) {\n return null\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 null\n }\n\n // Step6: There were changes, convert orderForm to StoreCart\n return orderFormToCart(updatedOrderForm, skuLoader, shouldSplitItem)\n}\n","import deepEquals from 'fast-deep-equal'\n\nimport type { GraphqlContext } from '..'\nimport type {\n MutationValidateSessionArgs,\n StoreMarketingData,\n StoreSession,\n} from '../../../__generated__/schema'\nimport ChannelMarshal from '../utils/channel'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\n\nasync 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 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 // Update location data if postal code and country are provided\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 = new URLSearchParams(search)\n\n // Remove facets parameter if it exists so that it does not interfere with session data and prioritize vtex_segment\n if (params.has('facets')) {\n params.delete('facets')\n }\n\n const salesChannel = params.get('sc') ?? channel.salesChannel\n params.set('sc', 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', oldSession.locale)\n\n const { marketingData: oldMarketingData } = oldSession\n\n const marketingData: StoreMarketingData = {\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 const jwt = parseJwt(getAuthCookie(headers?.cookie ?? '', account))\n\n // Validate JWT token if it exists\n let isValidJwt = false\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 // Only use JWT data if the token is valid\n const isRepresentative = isValidJwt ? jwt?.isRepresentative : false\n const customerId = isValidJwt ? jwt?.customerId : undefined\n const unitId = isValidJwt ? jwt?.unitId : undefined\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 ?? null\n const authentication = sessionData?.namespaces.authentication ?? null\n const checkout = sessionData?.namespaces.checkout ?? null\n const publicData = sessionData?.namespaces.public ?? null\n\n // Fetch contract data for B2B representatives\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 (err) {\n console.error(\n `Error while getting contract data for profile ID (${profile.id.value}).\\n`\n )\n }\n }\n\n // Set seller only if it's inside a region\n let seller\n if (!!channel.seller && (postalCode || geoCoordinates)) {\n const regionData = await clients.commerce.checkout.region({\n postalCode,\n geoCoordinates,\n country,\n salesChannel,\n })\n const region = regionData?.[0]\n seller = region?.sellers.find((seller) => channel.seller === seller.id)\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: ChannelMarshal.stringify({\n salesChannel: store?.channel?.value ?? channel.salesChannel,\n regionId: checkout?.regionId?.value ?? channel.regionId,\n seller: seller?.id,\n hasOnlyDefaultSalesChannel: !store?.channel?.value,\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: isRepresentative\n ? {\n isRepresentative: isRepresentative ?? false,\n customerId: authentication?.customerId?.value ?? customerId ?? '',\n unitName: authentication?.unitName?.value ?? '',\n unitId: authentication?.unitId?.value ?? unitId ?? '',\n firstName:\n typeof shopper?.firstName?.value === 'string'\n ? shopper.firstName.value\n : '',\n lastName:\n typeof shopper?.lastName?.value === 'string'\n ? shopper.lastName.value\n : '',\n userName:\n `${typeof shopper?.firstName?.value === 'string' ? shopper.firstName.value : ''} ${typeof shopper?.lastName?.value === 'string' ? shopper.lastName.value : ''}`.trim(),\n userEmail: authentication?.storeUserEmail.value ?? '',\n savedPostalCode: publicData?.postalCode?.value ?? '',\n contractName: contract?.corporateName ?? '',\n organizationManager: shopper?.organizationManager?.value ?? false,\n }\n : null,\n marketingData,\n person: profile?.id\n ? {\n id: profile.id?.value ?? '',\n email: profile.email?.value ?? '',\n givenName: profile.firstName?.value ?? '',\n familyName: profile.lastName?.value ?? '',\n }\n : null,\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 { 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}\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 { 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}\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","import type { GraphqlResolver } from '..'\nimport type { StoreImage, StoreProductImageArgs } from '../../..'\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 { bestOfferFirst } from '../utils/productStock'\nimport {\n attachmentToPropertyValue,\n attributeToPropertyValue,\n VALUE_REFERENCES,\n} from '../utils/propertyValue'\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 * 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: ({\n isVariantOf: {\n categories,\n productName,\n linkText,\n categoryId,\n categoriesIds,\n },\n itemId,\n }) => {\n const mainTreeIndex = findMainTreeIndex(categoriesIds, categoryId)\n const mainTree = categories[mainTreeIndex]\n const splittedCategories = removeTrailingSlashes(mainTree).split('/')\n\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 } }) => releaseDate ?? '',\n advertisement: ({ isVariantOf: { advertisement } }) => advertisement,\n deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges } }) =>\n deliveryPromisesBadges,\n}\n","import type { GraphqlResolver } from '..'\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 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 { 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","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 {\n ProcessOrderAuthorizationRule,\n QueryAllCollectionsArgs,\n QueryAllProductsArgs,\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 UserOrderFromList,\n} from '../../../__generated__/schema'\nimport { getOrderEntryOperation } from './getOrderEntryOperation'\nimport { getOrderFormItems } from './getOrderFormItems'\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 { GraphqlContext } from '../index'\nimport { extractRuleForAuthorization } from '../utils/commercialAuth'\nimport { mutateChannelContext, mutateLocaleContext } from '../utils/contex'\nimport { getAuthCookie, parseJwt } from '../utils/cookies'\nimport { enhanceSku } from '../utils/enhanceSku'\nimport {\n findChannel,\n findCrossSelling,\n findLocale,\n findSkuId,\n findSlug,\n transformSelectedFacet,\n} from '../utils/facets'\nimport { isValidSkuId, pickBestSku } from '../utils/sku'\nimport { SORT_MAP } from '../utils/sort'\nimport { FACET_CROSS_SELLING_MAP } from './../utils/facets'\nimport { StoreCollection } from './collection'\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 clients: { commerce, search },\n } = ctx\n\n try {\n const skuId = id ?? slug?.split('-').pop() ?? ''\n\n if (!isValidSkuId(skuId)) {\n throw new Error('Invalid SkuId')\n }\n\n const sku = await skuLoader.load(skuId)\n\n /**\n * Here be dragons 🦄🦄🦄\n *\n * In some cases, the slug has a valid skuId for a different\n * product. This condition makes sure that the fetched sku\n * is the one we actually asked for\n * */\n if (\n slug &&\n sku.isVariantOf.linkText &&\n !slug.startsWith(sku.isVariantOf.linkText)\n ) {\n throw new Error(\n `Slug was set but the fetched sku does not satisfy the slug condition. slug: ${slug}, linkText: ${sku.isVariantOf.linkText}`\n )\n }\n\n return sku\n } catch (err) {\n if (slug == null) {\n throw new BadRequestError('Missing slug or id')\n }\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 {\n products: [product],\n } = await search.products({\n page: 0,\n count: 1,\n query: `product:${route.id}`,\n // Manually disabling this flag to prevent regionalization issues\n hideUnavailableItems: false,\n })\n\n if (!product) {\n throw new NotFoundError(`No product found for id ${route.id}`)\n }\n\n const sku = pickBestSku(product.items)\n\n return enhanceSku(sku, product)\n }\n },\n collection: (\n _: unknown,\n { slug }: QueryCollectionArgs,\n ctx: GraphqlContext\n ) => {\n const {\n loaders: { collectionLoader },\n } = ctx\n\n return collectionLoader.load(slug)\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 let query = term\n\n /**\n * In case we are using crossSelling, we need to modify the search\n * we will be performing on our search engine. The idea in here\n * is to use the cross selling API for fetching the productIds our\n * search will return for us.\n * Doing this two request workflow makes it possible to have cross\n * selling with Search features, like pagination, internationalization\n * etc\n */\n if (crossSelling) {\n const products = await ctx.clients.commerce.catalog.products.crossselling(\n {\n type: FACET_CROSS_SELLING_MAP[crossSelling.key],\n productId: crossSelling.value,\n }\n )\n\n query = `product:${products\n .map((x) => x.productId)\n .slice(0, first)\n .join(';')}`\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: query ?? undefined,\n sort: SORT_MAP[sort ?? 'score_desc'],\n selectedFacets: selectedFacets?.flatMap(transformSelectedFacet) ?? [],\n sponsoredCount: sponsoredCount ?? undefined,\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 query = `id:${productIds.join(';')}`\n const products = await search.products({\n page: 0,\n count: productIds.length,\n query,\n })\n\n return products.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 const categories: Array<CategoryTree & { level: number }> = []\n const dfs = (node: CategoryTree, level: number) => {\n categories.push({ ...node, level })\n\n for (const child of node.children) {\n dfs(child, level + 1)\n }\n }\n\n for (const node of tree) {\n dfs(node, 0)\n }\n\n const collections = [\n ...brands\n .filter((brand) => brand.isActive)\n .map((x) => ({ ...x, type: 'brand' })),\n ...categories,\n ]\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 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 // 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 contract = await commerce.masterData.getContractById({\n contractId: profile?.id?.value ?? '',\n })\n\n const name =\n contract?.corporateName ??\n `${(profile?.firstName?.value ?? '').trim()} ${(profile?.lastName?.value ?? '').trim()}`.trim()\n\n return {\n name: name || '',\n email: profile?.email?.value || '',\n id: profile?.id?.value || '',\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 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}\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 { 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 { 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 {\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`, `Cluster`, `SubCategory` or `Collection`.\\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 SubCategory\\n \\\"\\\"\\\"\\n Product brand.\\n \\\"\\\"\\\"\\n Brand\\n \\\"\\\"\\\"\\n Product cluster.\\n \\\"\\\"\\\"\\n Cluster\\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\"","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\"","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\\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\"","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\\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\"","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\\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 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 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 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\\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 \"\\\"\\\"\\\"\\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 \"\\\"\\\"\\\"\\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 { OTELAPI } from '@faststore/diagnostics'\nimport { 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 { 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 headers: Record<string, string>\n account: string\n OTEL: Record<string, unknown>\n}\n\nexport const GraphqlVtexContextFactory = async (options: Options) => {\n return OTELAPI.context.with(\n OTELAPI.propagation.extract(OTELAPI.context.active(), options.OTEL),\n () =>\n (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.clients = getClients(options, ctx)\n ctx.loaders = getLoaders(options, ctx)\n ctx.account = options.account\n ctx.OTEL = options.OTEL\n ctx.discoveryConfig = options.discoveryConfig\n\n return ctx\n }\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":["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","ResolverTrace","fn","resolverName","source","vars","graphqlContext","trace","OTELAPI","name","version","activeContext","span","returnedValue","value","FastStoreError","extensions","message","BadRequestError","NotFoundError","isFastStoreError","isBadRequestError","isUnauthorizedError","isForbiddenError","isNotFoundError","USER_AGENT","packageJson","fetchAPI","init","options","response","fetch","text","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","account","normalizedCookies","parse","MATCH_COOKIE_KEY_VALUE","cookieParts","parseJwt","token","BASE_INIT","VtexCommerce","environment","incrementAddress","subDomainPrefix","base","storeCookies","withCookie","withAppKeyAndToken","host","selectedPrefix","prefix","forwardedHost","sc","depth","slug","type","productId","groupByProduct","params","salesChannel","id","index","deliveryMode","selectedAddresses","setDeliveryWindow","deliveryWindow","mappedBody","_","itemIndex","marketingData","clientPreferencesData","refreshOutdatedData","channel","url","orderItems","allowOutdatedData","shouldSplitItem","appId","postalCode","geoCoordinates","country","orderId","customerEmail","reason","search","sessionCookie","data","userId","page","dateInitial","dateFinal","clientEmail","perPage","pendingMyApproval","dateInitialTimestamp","dateFinalTimestamp","orderAuthorizationId","dimensionId","ruleId","approved","body","orgUnitId","email","contractId","userIdNormalized","fileBuffer","fileName","mimeType","autHeaders","boundary","CRLF","safeMimeType","safeFileName","headerPart","footer","headerBytes","footerBytes","offset","objectKey","orderFormId","sessionToken","operationId","POLICY_KEY","REGION_KEY","FUZZY_KEY","OPERATOR_KEY","PICKUP_POINT_KEY","SHIPPING_KEY","DELIVERY_OPTIONS_KEY","IN_STOCK_KEY","EXTRA_FACETS_KEYS","isFuzzyFacet","facet","isOperatorFacet","IntelligentSearch","hideUnavailableItems","simulationBehavior","showSponsored","getPolicyFacet","getRegionFacet","regionId","seller","addDefaultFacets","facets","withDefaultFacets","shippingFacet","deliveryOptionsFacet","policyFacet","regionFacet","addSearchParamsFacets","fuzzyFacet","operatorFacet","pickupPointFacet","query","count","sort","selectedFacets","showInvisibleItems","sponsoredCount","searchHideUnavailableItems","allowRedirect","inStockFacet","shouldHideUnavailableItems","pathname","getClients","CONCURRENT_REQUESTS_MAX","collectionPageTypes","isCollectionPageType","x","getCollectionLoader","clients","limit","pLimit","loader","slugs","DataLoader","getSalesChannelLoader","channels","getSimulationLoader","simulationArgs","allItems","acc","items","simulation","simulated","item","itemsIndices","curr","__","limited","sanitizeHtml","dirty","sanitizeHtmlLib","sanitizeProduct","product","enhanceSku","getSkuLoader","flags","keys","skuIds","products","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","from","to","removeDiacritics","str","newStr","i","slugifySpecialCharacters","slugify","replaced","isBrand","isCollection","slugifyRoot","StoreCollection","segment","segments","collections","s","collection","FACET_CROSS_SELLING_MAP","transformSelectedFacet","parseRange","range","splitted","isCrossSelling","findCrossSelling","filtered","findSlug","findSkuId","findLocale","findChannel","array","cmp","best","StoreFacet","values","StoreFacetBoolean","StoreFacetRange","searchArgs","selectedRange","globalMin","globalMax","StoreFacetValueBoolean","selected","quantity","cancelOrder","extractRuleForAuthorization","commercialAuth","dimension","pendingRule","rule","isPendingForOtherAuthorizer","pendingRules","processOrderAuthorization","ruleForAuthorization","startOrderEntryOperation","subscribeToNewsletter","uploadFileToOrderEntry","fileContent","normalized","MAX_FILE_BYTES","ChannelMarshal","channelString","parsedChannel","mutateChannelContext","mutateLocaleContext","locale","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","getOrderFormEtag","sessionJwt","criticalItems","setOrderFormEtag","err","isOrderFormStale","oldEtag","app","clearOrderFormMessages","updateOrderFormShippingData","updateShipping","oldAddress","getCookieCheckoutOrderNumber","nameCookie","validateCart","order","orderFormIdFromCookie","orderNumber","acceptedOffer","newOrderForm","browserItemsById","originItemsById","originItems","browserItems","itemsToAdd","itemsToUpdate","maybeOriginItem","head","tail","totalQuantity","itemsToDelete","changes","updatedOrderForm","updatedMarketingData","equalMessages","getPreciseLocationData","validateSession","oldSession","city","preciseLocation","oldMarketingData","jwt","isValidJwt","isRepresentative","customerId","unitId","sessionData","profile","shopper","store","authentication","checkout","publicData","contract","newSession","Mutation","Kind","toObjectOrString","getValueAsObjectOrString","ObjectOrString","GraphQLScalarType","ast","isSearchItem","isOrderFormItem","StoreOffer","canonicalFromProduct","linkText","enhanceCommercialOffer","DEFAULT_IMAGE","getSlug","link","getPath","nonEmptyArray","removeTrailingSlashes","path","findMainTreeIndex","categoriesIds","categoryId","mainTreeIndex","idsTree","StoreProduct","isVariantOf","description","brand","categories","productName","mainTree","splittedCategories","images","resolvedImages","imageUrl","imageText","imageLabel","shouldFilter","filteredImages","imageKeywords","ean","referenceId","manufacturerCode","specifications","attachmentsValues","attributes","propertyValueSpecifications","propertyValueAttachments","propertyValueAttributes","skuSpecifications","specificationGroups","releaseDate","advertisement","deliveryPromisesBadges","BLOCKED_SPECIFICATIONS","StoreProductGroup","specificationGroup","StorePropertyValue","valueReference","getOrderEntryOperation","getOrderFormItems","pickBestSku","offersBySku","o1","o2","isValidSkuId","SORT_MAP","Query","locator","route","first","maybeAfter","term","crossSelling","after","productSearchPromise","productIds","brands","tree","dfs","node","level","child","validCollections","redirect","region","sellers","addresses","mapAddressesToList","addressesObj","stringifiedObj","errorMessage","result","parsed","filters","orders","_ctx","shopperResult","lmRoles","fullName","r","user","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","entry","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","modules","ParsedVtexGraphqlSchema","print","finalSchema","GraphqlVtexContextFactory","nativeGetResolvers","finalResolvers","resolverFunction","GraphqlVtexSchema","mergeSchema","platformSchema","cacheControlDirective","authDirective","isSchema","mergeSchemas"],"mappings":";;;;;;;;;;;;AAyUO,IAAWA,uBAAAA,OAEhBA,EAAA,WAAW,YAEXA,EAAA,SAAS,UAETA,EAAA,UAAU,WANMA,IAAAA,MAAA,CAAA,CAAA,GAm/BAC,uBAAAA,OAEhBA,EAAA,QAAQ,SAERA,EAAA,WAAW,YAEXA,EAAA,UAAU,WAEVA,EAAA,aAAa,cAEbA,EAAA,aAAa,cAEbA,EAAA,cAAc,eAZEA,IAAAA,MAAA,CAAA,CAAA,GAuEAC,uBAAAA,OAEhBA,EAAA,UAAU,WAEVA,EAAA,QAAQ,SAJQA,IAAAA,MAAA,CAAA,CAAA,GA6XAC,uBAAAA,OAEhBA,EAAA,eAAe,iBAEfA,EAAA,UAAU,YAEVA,EAAA,WAAW,aAEXA,EAAA,aAAa,eAEbA,EAAA,WAAW,aAEXA,EAAA,YAAY,cAEZA,EAAA,cAAc,gBAEdA,EAAA,YAAY,cAhBIA,IAAAA,MAAA,CAAA,CAAA,GAoBAC,uBAAAA,OAChBA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,UAAU,WAHMA,IAAAA,MAAA,CAAA,CAAA,GAydAC,uBAAAA,OAChBA,EAAA,QAAQ,SACRA,EAAA,SAAS,UAFOA,IAAAA,MAAA,CAAA,CAAA;ACnuEX,MAAMC,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