import { QueryContextType } from "../common"; import { IndexOrderBy } from "../index-data/query-config/query-input-config-order-by"; import { ObjectToRemoteQueryFields } from "./object-to-remote-query-fields"; import { RemoteQueryEntryPoints } from "./remote-query-entry-points"; import { RemoteQueryFilters } from "./to-remote-query"; export type RemoteQueryObjectConfig = { entryPoint: TEntry | keyof RemoteQueryEntryPoints; variables?: any; fields: ObjectToRemoteQueryFields extends never ? string[] : ObjectToRemoteQueryFields[] | string[]; }; export type RemoteQueryObjectFromStringResult> = { __TConfig: TConfig; __value: object; }; export type RemoteQueryInput = TEntry extends keyof RemoteQueryEntryPoints ? { /** * The name of the entity to retrieve. For example, `product`. */ entity: TEntry; /** * The fields and relations to retrieve in the entity. */ fields: ObjectToRemoteQueryFields extends never ? string[] : ObjectToRemoteQueryFields[] | string[]; /** * Pagination configurations for the returned list of items. */ pagination?: { /** * The number of items to skip before retrieving the returned items. */ skip?: number; /** * The maximum number of items to return. */ take?: number; /** * Sort by field names in ascending or descending order. */ order?: IndexOrderBy; }; /** * Filters to apply on the retrieved items. */ filters?: RemoteQueryFilters; /** * Apply a query context on the retrieved data. For example, to retrieve product prices for a certain context. */ context?: QueryContextType; /** * Apply a `withDeleted` flag on the retrieved data to retrieve soft deleted items. */ withDeleted?: boolean; /** * Strategy will be send to the entry module called method */ strategy?: "joined" | "select-in"; } : { /** * The name of the entity to retrieve. For example, `product`. */ entity: TEntry; /** * The fields and relations to retrieve in the entity. */ fields: ObjectToRemoteQueryFields extends never ? string[] : ObjectToRemoteQueryFields[] | string[]; /** * Pagination configurations for the returned list of items. */ pagination?: { /** * The number of items to skip before retrieving the returned items. */ skip?: number; /** * The maximum number of items to return. */ take?: number; /** * Sort by field names in ascending or descending order. */ order?: IndexOrderBy; }; /** * Filters to apply on the retrieved items. */ filters?: RemoteQueryFilters; /** * Apply a query context on the retrieved data. For example, to retrieve product prices for a certain context. */ context?: QueryContextType; /** * Apply a `withDeleted` flag on the retrieved data to retrieve soft deleted items. */ withDeleted?: boolean; /** * Strategy will be send to the entry module called method */ strategy?: "joined" | "select-in"; }; export type RemoteQueryGraph = { __TConfig: RemoteQueryObjectConfig; }; //# sourceMappingURL=remote-query-object-from-string.d.ts.map