1 | import { ASTNode, FragmentDefinitionNode } from 'graphql';
|
2 | import { ParsedMapper } from './mappers';
|
3 |
|
4 |
|
5 |
|
6 | export declare type ScalarsMap = string | {
|
7 | [name: string]: string;
|
8 | };
|
9 |
|
10 |
|
11 |
|
12 | export declare type NormalizedScalarsMap = {
|
13 | [name: string]: string;
|
14 | };
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare type ParsedScalarsMap = {
|
20 | [name: string]: ParsedMapper;
|
21 | };
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export declare type EnumValuesMap<AdditionalProps = {}> = string | {
|
27 | [enumName: string]: string | ({
|
28 | [key: string]: string | number;
|
29 | } & AdditionalProps);
|
30 | };
|
31 | export declare type ParsedEnumValuesMap = {
|
32 | [enumName: string]: {
|
33 | mappedValues?: {
|
34 | [valueName: string]: string | number;
|
35 | };
|
36 | typeIdentifier: string;
|
37 | sourceIdentifier?: string;
|
38 | sourceFile?: string;
|
39 | importIdentifier?: string;
|
40 | isDefault?: boolean;
|
41 | };
|
42 | };
|
43 | export declare type ConvertNameFn<T = {}> = ConvertFn<T>;
|
44 | export declare type GetFragmentSuffixFn = (node: FragmentDefinitionNode | string) => string;
|
45 | export interface ConvertOptions {
|
46 | prefix?: string;
|
47 | suffix?: string;
|
48 | transformUnderscore?: boolean;
|
49 | }
|
50 | export declare type ConvertFn<T = {}> = (node: ASTNode | string, options?: ConvertOptions & T) => string;
|
51 | export declare type NamingConventionFn = (str: string) => string;
|
52 | export declare type NamingConventionResolvePath = string;
|
53 | export declare type NamingConvention = string | NamingConventionFn | NamingConventionMap;
|
54 |
|
55 |
|
56 |
|
57 | export interface NamingConventionMap {
|
58 | enumValues?: 'keep' | NamingConventionResolvePath | NamingConventionFn;
|
59 | typeNames?: 'keep' | NamingConventionResolvePath | NamingConventionFn;
|
60 | transformUnderscore?: boolean;
|
61 | }
|
62 | export declare type LoadedFragment<AdditionalFields = {}> = {
|
63 | name: string;
|
64 | onType: string;
|
65 | node: FragmentDefinitionNode;
|
66 | isExternal: boolean;
|
67 | importFrom?: string | null;
|
68 | } & AdditionalFields;
|
69 | export declare type DeclarationKind = 'type' | 'interface' | 'class' | 'abstract class';
|
70 | export interface DeclarationKindConfig {
|
71 | scalar?: DeclarationKind;
|
72 | input?: DeclarationKind;
|
73 | type?: DeclarationKind;
|
74 | interface?: DeclarationKind;
|
75 | arguments?: DeclarationKind;
|
76 | }
|
77 | export interface AvoidOptionalsConfig {
|
78 | field?: boolean;
|
79 | object?: boolean;
|
80 | inputValue?: boolean;
|
81 | }
|
82 | export interface ParsedImport {
|
83 | moduleName: string | null;
|
84 | propName: string;
|
85 | }
|