import type { Clients } from './clients'; import type { SearchArgs } from './clients/search'; import type { Loaders } from './loaders'; import type { Channel } from './utils/channel'; export interface Options { platform: 'vtex'; account: string; environment: 'vtexcommercestable' | 'vtexcommercebeta'; subDomainPrefix: string[]; channel: string; locale: string; hideUnavailableItems: boolean; simulationBehavior?: 'default' | 'skip' | 'only1P'; showSponsored: boolean; incrementAddress: boolean; flags?: FeatureFlags; } interface FeatureFlags { enableOrderFormSync?: boolean; } export interface Context { clients: Clients; loaders: Loaders; /** * @description Storage updated at each request. * * Use this datastructure to store and share small values in the context. * Use it with caution since dependecy injection leads to a more complex code * */ storage: { channel: Required; locale: string; flags: FeatureFlags; searchArgs?: Omit; cookies: Map>; }; headers: Record; } export type Resolver = (root: R, args: A, ctx: Context, info: any) => Return; export declare const getContextFactory: (options: Options) => (ctx: any) => Context; export declare const getResolvers: (_: Options) => { StoreCollection: Record>; StoreAggregateOffer: Record[]>> & { offers: Resolver[], any, import("./utils/enhanceCommercialOffer").EnhancedCommercialOffer[]>; }; StoreProduct: Record> & { offers: Resolver[]>; isVariantOf: Resolver; image: Resolver; }; StoreSeo: Record>; StoreFacet: Record>; StoreFacetBoolean: Record>>; StoreFacetRange: Record>>; StoreFacetValueBoolean: Record>; StoreOffer: Record>; StoreAggregateRating: Record; StoreReview: Record; StoreProductGroup: Record>; StoreSearchResult: Record>; StorePropertyValue: Record>; SkuVariants: Record>; ShippingSLA: Record>; ObjectOrString: import("graphql").GraphQLScalarType; Query: { product: (_: unknown, { locator }: import("../..").QueryProductArgs, ctx: Context) => Promise; collection: (_: unknown, { slug }: import("../..").QueryCollectionArgs, ctx: Context) => Promise; search: (_: unknown, { first, after: maybeAfter, sort, term, selectedFacets }: import("../..").QuerySearchArgs, ctx: Context) => Promise<{ searchArgs: Omit; productSearchPromise: Promise; }>; allProducts: (_: unknown, { first, after: maybeAfter }: import("../..").QueryAllProductsArgs, ctx: Context) => Promise<{ pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string; endCursor: string; totalCount: number; }; edges: { node: import("./utils/enhanceSku").EnhancedSku; cursor: string; }[]; }>; allCollections: (_: unknown, { first, after: maybeAfter }: import("../..").QueryAllCollectionsArgs, ctx: Context) => Promise<{ pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string; endCursor: string; totalCount: number; }; edges: { node: { type: string; id: number; name: string; isActive: boolean; title: string; metaTagDescription: string; imageURL: string | null; } | (import("./clients/commerce/types/CategoryTree").CategoryTree & { level: number; }); cursor: string; }[]; }>; shipping: (_: unknown, { country, items, postalCode }: import("../..").QueryShippingArgs, ctx: Context) => Promise<{ address: import("./clients/commerce/types/Address").Address; items: import("./clients/commerce/types/Simulation").Item[]; ratesAndBenefitsData: import("./clients/commerce/types/Simulation").RatesAndBenefitsData; paymentData: import("./clients/commerce/types/Simulation").PaymentData; selectableGifts: any[]; marketingData: import("./clients/commerce/types/Simulation").MarketingData; postalCode: null; country: null; logisticsInfo: import("./clients/commerce/types/Simulation").LogisticsInfo[]; messages: any[]; purchaseConditions: import("./clients/commerce/types/Simulation").PurchaseConditions; pickupPoints: any[]; subscriptionData: null; totals: import("./clients/commerce/types/Simulation").Total[]; itemMetadata: null; }>; redirect: (_: unknown, { term, selectedFacets }: import("../..").QueryRedirectArgs, ctx: Context) => Promise<{ url: string | undefined; } | null>; sellers: (_: unknown, { postalCode, geoCoordinates, country, salesChannel }: import("../..").QuerySellersArgs, ctx: Context) => Promise<{ id: string; sellers: import("./clients/commerce/types/Region").Seller[]; }>; }; Mutation: { validateCart: (_: unknown, { cart: { order }, session }: import("../..").MutationValidateCartArgs, ctx: Context) => Promise<{ order: { orderNumber: string; acceptedOffer: Promise<{ product: import("./utils/enhanceSku").EnhancedSku; id: string; name: string; detailUrl: string; imageUrl: string; skuName: string; quantity: number; uniqueId: string; productId: string; refId: string; ean: string; priceValidUntil: string; price: number; tax: number; listPrice: number; sellingPrice: number; rewardValue: number; isGift: boolean; parentItemIndex: number | null; parentAssemblyBinding: string | null; productCategoryIds: string; priceTags: string[]; manualPrice: number | null; measurementUnit: string; additionalInfo: { brandName: string; brandId: string; offeringInfo: any; offeringType: any; offeringTypeId: any; }; productCategories: Record; productRefId: string; seller: string; sellerChain: string[]; availability: string; unitMultiplier: number; skuSpecifications?: import("./clients/commerce/types/OrderForm").SKUSpecification[] | null | undefined; priceDefinition: { calculatedSellingPrice: number; sellingPrices: import("./clients/commerce/types/OrderForm").SellingPrice[]; total: number; }; attachments: import("./clients/commerce/types/OrderForm").Attachment[]; }>[]; }; messages: { text: any; status: any; }[]; } | null>; validateSession: (_: any, { session: oldSession, search }: import("../..").MutationValidateSessionArgs, { clients }: Context) => Promise; subscribeToNewsletter: (_: any, { data }: import("../..").MutationSubscribeToNewsletterArgs, { clients: { commerce } }: Context) => Promise; }; }; export {};