import { EndpointDefinitions, EndpointBuilder, EndpointDefinition, ReplaceTagTypes } from './endpointDefinitions'; import { UnionToIntersection, Id, NoInfer } from './tsHelpers'; import { CoreModule } from './core/module'; import { CreateApiOptions } from './createApi'; import { BaseQueryFn } from './baseQueryTypes'; export interface ApiModules { } export declare type ModuleName = keyof ApiModules; export declare type Module = { name: Name; init(api: Api, options: Required>, context: ApiContext): { injectEndpoint(endpointName: string, definition: EndpointDefinition): void; }; }; export interface ApiContext { endpointDefinitions: Definitions; batch(cb: () => void): void; } export declare type Api = Id[Enhancers]>> & { /** * A function to inject the endpoints into the original API, but also give you that same API with correct types for these endpoints back. Useful with code-splitting. */ injectEndpoints(_: { endpoints: (build: EndpointBuilder) => NewDefinitions; overrideExisting?: boolean; }): Api; /** *A function to enhance a generated API with additional information. Useful with code-generation. */ enhanceEndpoints(_: { /** @deprecated */ addEntityTypes?: readonly NewTagTypes[]; addTagTypes?: readonly NewTagTypes[]; endpoints?: ReplaceTagTypes> extends infer NewDefinitions ? { [K in keyof NewDefinitions]?: Partial | ((definition: NewDefinitions[K]) => void); } : never; }): Api, ReducerPath, TagTypes | NewTagTypes, Enhancers>; }>; export declare type ApiWithInjectedEndpoints, Injections extends ApiDefinition extends Api ? [Api, ...Api[]] : never> = Omit & Omit & { endpoints: ApiDefinition['endpoints'] & Partial>; }; //# sourceMappingURL=apiTypes.d.ts.map