import type { DataSourceFn } from '../../../libs/integration-data-source'; import type * as Models from '../models'; declare global { export namespace ProductDomain { interface Category extends Models.Category { rawResponse?: unknown; } interface Product extends Models.Product { /** the raw response from a product's API call */ rawResponse?: unknown; } } } /** * Special values that our implementations use to get specific nodes of a category tree */ export declare enum STATIC_CATEGORY_ID { /** * Root node of the category tree */ 'root' = "root" } export interface CategoryQuery { /** * The maximum number of categories to return for a query. * * @example 10 */ limit?: number; /** * The page number of category results to return when querying paginated data. * * @example 2 */ page?: number; /** * Specifies how many levels of nested subcategories you want the server to return. * The default value is 2. * * @example 3 */ levels?: number; } export interface FetchCategoryInput { /** * A category identifier * * STATIC_CATEGORY_ID values may or may not line up with actual ids used to fetch data, so denormalizers should handle any special logic */ id: STATIC_CATEGORY_ID | string; query?: CategoryQuery; } export declare type ProductDataSource = { fetchProduct: DataSourceFn; fetchAllProducts: DataSourceFn; fetchCategory: DataSourceFn; };