UNPKG

@techsio/storefront-data

Version:

Medusa-first storefront data layer built on TanStack Query.

19 lines • 1.38 kB
import type { CacheConfig, CacheStrategy } from "../shared/cache-config"; import type { QueryFactoryOptions, ReadQueryOptions } from "../shared/hook-types"; import type { QueryNamespace } from "../shared/query-keys"; import type { ProductAttributeQueryKeys, ProductAttributeService, ProductAttributesInputBase } from "./types"; export type CreateProductAttributeQueryOptionsFactoryConfig<TAttribute, TInput extends ProductAttributesInputBase, TParams> = { service: ProductAttributeService<TAttribute, TParams>; buildDetailParams?: (input: TInput) => TParams; queryKeys?: ProductAttributeQueryKeys<TParams>; queryKeyNamespace?: QueryNamespace; cacheConfig?: CacheConfig; }; export type ProductAttributeQueryOptionsFactory<TAttribute, TInput extends ProductAttributesInputBase> = { getDetailQueryOptions: (input: TInput, options?: { queryOptions?: ReadQueryOptions<TAttribute[]>; cacheStrategy?: CacheStrategy; }) => QueryFactoryOptions<TAttribute[]>; }; export declare function createProductAttributeQueryOptionsFactory<TAttribute, TInput extends ProductAttributesInputBase, TParams>({ service, buildDetailParams, queryKeys, queryKeyNamespace, cacheConfig, }: CreateProductAttributeQueryOptionsFactoryConfig<TAttribute, TInput, TParams>): ProductAttributeQueryOptionsFactory<TAttribute, TInput>; //# sourceMappingURL=query-options.d.ts.map