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