@paljs/types
Advanced tools
Comparing version 6.0.5 to 6.0.6
import { GeneratorOptions } from './generator'; | ||
export interface AdminPagesOptions { | ||
models?: string[]; | ||
export interface AdminPagesOptions<ModelName extends string = string> { | ||
models?: ModelName[]; | ||
pageContent?: string; | ||
@@ -8,5 +8,5 @@ outPut?: string; | ||
} | ||
export type PartialOptions = Omit<Partial<GeneratorOptions>, 'backAsText'>; | ||
export type PartialOptions<ModelName extends string = string, ModelsObject extends Record<string, Record<string, any>> = Record<string, Record<string, any>>> = Omit<Partial<GeneratorOptions<ModelName, ModelsObject>>, 'backAsText'>; | ||
export type GeneratorsType = 'nexus' | 'sdl' | 'graphql-modules'; | ||
export interface Config { | ||
export interface Config<ModelName extends string = string, ModelsObject extends Record<string, Record<string, any>> = Record<string, Record<string, any>>> { | ||
schema?: string; | ||
@@ -16,8 +16,8 @@ backend?: { | ||
adminSettingsPath?: string; | ||
} & PartialOptions; | ||
} & PartialOptions<ModelName, ModelsObject>; | ||
frontend?: { | ||
admin?: AdminPagesOptions | boolean; | ||
graphql?: PartialOptions | boolean; | ||
admin?: AdminPagesOptions<ModelName> | boolean; | ||
graphql?: PartialOptions<ModelName, ModelsObject> | boolean; | ||
}; | ||
} | ||
export type MultiSchemaConfig = Record<string, Config>; | ||
export type MultiSchemaConfig<ModelName extends string = string, ModelsObject extends Record<string, Record<string, any>> = Record<string, Record<string, any>>> = Record<string, Config<ModelName, ModelsObject>>; |
@@ -5,6 +5,6 @@ import { DMMF } from './dmmf'; | ||
export type QueriesAndMutations = Query | Mutation; | ||
export interface GeneratorOptions { | ||
export interface GeneratorOptions<ModelName extends string = string, ModelsObject extends Record<string, Record<string, any>> = Record<string, Record<string, any>>> { | ||
backAsText?: boolean; | ||
prismaName: string; | ||
models?: string[]; | ||
models?: ModelName[]; | ||
output: string; | ||
@@ -14,3 +14,3 @@ javaScript?: boolean; | ||
excludeModels: { | ||
name: string; | ||
name: ModelName; | ||
queries?: boolean; | ||
@@ -22,6 +22,6 @@ mutations?: boolean; | ||
excludeFieldsByModel: { | ||
[modelName: string]: string[]; | ||
[modelName in ModelName]: (keyof ModelsObject[modelName])[]; | ||
}; | ||
excludeQueriesAndMutationsByModel: { | ||
[modelName: string]: QueriesAndMutations[]; | ||
[modelName in ModelName]: QueriesAndMutations[]; | ||
}; | ||
@@ -28,0 +28,0 @@ excludeQueriesAndMutations: QueriesAndMutations[]; |
{ | ||
"name": "@paljs/types", | ||
"version": "6.0.5", | ||
"version": "6.0.6", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
8531