import type { DynamicModule, Type } from '@nestjs/common'; import type { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface'; import type { GraphQLSchema } from 'graphql'; import type { Middleware } from '../common'; import type { SchemaConfig } from '../schema/types'; import { PickerContext } from '../schema/types'; import type { PickerLogger } from './logger/picker-logger'; import type { AssetNamingStrategy } from './asset-naming-strategy/asset-naming-strategy'; import type { AssetPreviewStrategy } from './asset-preview-strategy/asset-preview-strategy'; import type { AssetStorageStrategy } from './asset-storage-strategy/asset-storage-strategy'; import { ApolloServerPlugin } from '@apollo/server'; export interface ApiOptions { hostname?: string; port: number; appApiPath?: string; appApiPlayground?: boolean | any; appApiDebug?: boolean; cors?: boolean | CorsOptions; middleware?: Middleware[]; apolloServerPlugins?: ApolloServerPlugin[]; introspection?: boolean; } export interface AssetOptions { assetNamingStrategy?: AssetNamingStrategy; assetStorageStrategy?: AssetStorageStrategy; assetPreviewStrategy?: AssetPreviewStrategy; offPreview?: boolean; permittedFileTypes?: string[]; uploadMaxFileSize?: number; } export interface PickerConfig { shouldDropDatabase: boolean; schemaConfig: SchemaConfig; context?: PickerContext; graphqlSchema?: GraphQLSchema; apiOptions: ApiOptions; assetOptions?: AssetOptions; plugins?: Array>; logger?: PickerLogger; } export interface RuntimePickerConfig extends Required { context: PickerContext; apiOptions: Required; } declare type DeepPartialSimple = { [P in keyof T]?: null | (T[P] extends Array ? Array> : T[P] extends ReadonlyArray ? ReadonlyArray> : T[P] extends Type ? T[P] : DeepPartialSimple); }; export declare type PartialPickerConfig = DeepPartialSimple; export {};