@bairock/lenz 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -8
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +66 -79
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +22 -30
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/studio.js +15 -21
- package/dist/cli/commands/studio.js.map +1 -1
- package/dist/cli/index.js +11 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +4 -6
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +31 -15
- package/dist/config/index.js.map +1 -1
- package/dist/engine/CodeGenerator.d.ts +8 -28
- package/dist/engine/CodeGenerator.d.ts.map +1 -1
- package/dist/engine/CodeGenerator.js +26 -1935
- package/dist/engine/CodeGenerator.js.map +1 -1
- package/dist/engine/GraphQLParseHelpers.d.ts +25 -0
- package/dist/engine/GraphQLParseHelpers.d.ts.map +1 -0
- package/dist/engine/GraphQLParseHelpers.js +128 -0
- package/dist/engine/GraphQLParseHelpers.js.map +1 -0
- package/dist/engine/GraphQLParser.d.ts +23 -8
- package/dist/engine/GraphQLParser.d.ts.map +1 -1
- package/dist/engine/GraphQLParser.js +165 -248
- package/dist/engine/GraphQLParser.js.map +1 -1
- package/dist/engine/GraphQLRelationAnalyzer.d.ts +10 -0
- package/dist/engine/GraphQLRelationAnalyzer.d.ts.map +1 -0
- package/dist/engine/GraphQLRelationAnalyzer.js +117 -0
- package/dist/engine/GraphQLRelationAnalyzer.js.map +1 -0
- package/dist/engine/LenzEngine.d.ts +4 -4
- package/dist/engine/LenzEngine.d.ts.map +1 -1
- package/dist/engine/LenzEngine.js +59 -46
- package/dist/engine/LenzEngine.js.map +1 -1
- package/dist/engine/SchemaRelationValidator.d.ts +15 -0
- package/dist/engine/SchemaRelationValidator.d.ts.map +1 -0
- package/dist/engine/SchemaRelationValidator.js +133 -0
- package/dist/engine/SchemaRelationValidator.js.map +1 -0
- package/dist/engine/SchemaValidator.d.ts +12 -11
- package/dist/engine/SchemaValidator.d.ts.map +1 -1
- package/dist/engine/SchemaValidator.js +163 -169
- package/dist/engine/SchemaValidator.js.map +1 -1
- package/dist/engine/directives.d.ts +10 -0
- package/dist/engine/directives.d.ts.map +1 -1
- package/dist/engine/directives.js +192 -47
- package/dist/engine/directives.js.map +1 -1
- package/dist/engine/generators/ClientGenerator.d.ts +7 -0
- package/dist/engine/generators/ClientGenerator.d.ts.map +1 -0
- package/dist/engine/generators/ClientGenerator.js +386 -0
- package/dist/engine/generators/ClientGenerator.js.map +1 -0
- package/dist/engine/generators/DelegateGenerator.d.ts +9 -0
- package/dist/engine/generators/DelegateGenerator.d.ts.map +1 -0
- package/dist/engine/generators/DelegateGenerator.js +453 -0
- package/dist/engine/generators/DelegateGenerator.js.map +1 -0
- package/dist/engine/generators/DelegateHelpers.d.ts +7 -0
- package/dist/engine/generators/DelegateHelpers.d.ts.map +1 -0
- package/dist/engine/generators/DelegateHelpers.js +144 -0
- package/dist/engine/generators/DelegateHelpers.js.map +1 -0
- package/dist/engine/generators/DelegateRelations.d.ts +11 -0
- package/dist/engine/generators/DelegateRelations.d.ts.map +1 -0
- package/dist/engine/generators/DelegateRelations.js +794 -0
- package/dist/engine/generators/DelegateRelations.js.map +1 -0
- package/dist/engine/generators/DelegateTemplateBody.d.ts +8 -0
- package/dist/engine/generators/DelegateTemplateBody.d.ts.map +1 -0
- package/dist/engine/generators/DelegateTemplateBody.js +776 -0
- package/dist/engine/generators/DelegateTemplateBody.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimeErrors.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimeErrors.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimeErrors.js +140 -0
- package/dist/engine/generators/GenerateRuntimeErrors.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimeIndex.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimeIndex.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimeIndex.js +21 -0
- package/dist/engine/generators/GenerateRuntimeIndex.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimeLogger.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimeLogger.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimeLogger.js +125 -0
- package/dist/engine/generators/GenerateRuntimeLogger.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimePagination.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimePagination.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimePagination.js +159 -0
- package/dist/engine/generators/GenerateRuntimePagination.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimeQuery.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimeQuery.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimeQuery.js +427 -0
- package/dist/engine/generators/GenerateRuntimeQuery.js.map +1 -0
- package/dist/engine/generators/GenerateRuntimeRelations.d.ts +2 -0
- package/dist/engine/generators/GenerateRuntimeRelations.d.ts.map +1 -0
- package/dist/engine/generators/GenerateRuntimeRelations.js +130 -0
- package/dist/engine/generators/GenerateRuntimeRelations.js.map +1 -0
- package/dist/engine/generators/RuntimeGenerator.d.ts +16 -0
- package/dist/engine/generators/RuntimeGenerator.d.ts.map +1 -0
- package/dist/engine/generators/RuntimeGenerator.js +16 -0
- package/dist/engine/generators/RuntimeGenerator.js.map +1 -0
- package/dist/engine/generators/TypeFilterTypes.d.ts +2 -0
- package/dist/engine/generators/TypeFilterTypes.d.ts.map +1 -0
- package/dist/engine/generators/TypeFilterTypes.js +220 -0
- package/dist/engine/generators/TypeFilterTypes.js.map +1 -0
- package/dist/engine/generators/TypeGenerator.d.ts +16 -0
- package/dist/engine/generators/TypeGenerator.d.ts.map +1 -0
- package/dist/engine/generators/TypeGenerator.js +493 -0
- package/dist/engine/generators/TypeGenerator.js.map +1 -0
- package/dist/engine/generators/helpers.d.ts +13 -0
- package/dist/engine/generators/helpers.d.ts.map +1 -0
- package/dist/engine/generators/helpers.js +316 -0
- package/dist/engine/generators/helpers.js.map +1 -0
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +3 -9
- package/dist/engine/index.js.map +1 -1
- package/dist/errors/index.d.ts +3 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +25 -32
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -30
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
|
@@ -1,99 +1,244 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lenzDirectives = exports.hideDirective = exports.embeddedDirective = exports.updatedAtDirective = exports.createdAtDirective = exports.relationDirective = exports.defaultDirective = exports.indexDirective = exports.uniqueDirective = exports.idDirective = exports.modelDirective = void 0;
|
|
4
|
-
exports.isLenzDirective = isLenzDirective;
|
|
5
|
-
exports.getDirectiveDefinition = getDirectiveDefinition;
|
|
6
|
-
const graphql_1 = require("graphql");
|
|
1
|
+
import { GraphQLDirective, DirectiveLocation, GraphQLString, GraphQLNonNull, GraphQLBoolean, GraphQLList } from 'graphql';
|
|
7
2
|
// Определение всех директив Lenz ORM
|
|
8
|
-
|
|
3
|
+
export const modelDirective = new GraphQLDirective({
|
|
9
4
|
name: 'model',
|
|
10
|
-
locations: [
|
|
5
|
+
locations: [DirectiveLocation.OBJECT],
|
|
11
6
|
description: 'Marks a GraphQL type as a database model'
|
|
12
7
|
});
|
|
13
|
-
|
|
8
|
+
export const idDirective = new GraphQLDirective({
|
|
14
9
|
name: 'id',
|
|
15
|
-
locations: [
|
|
10
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
11
|
+
args: {
|
|
12
|
+
name: {
|
|
13
|
+
type: GraphQLString,
|
|
14
|
+
description: 'Name for the primary key constraint (Prisma @id map parameter)'
|
|
15
|
+
},
|
|
16
|
+
map: {
|
|
17
|
+
type: GraphQLString,
|
|
18
|
+
description: 'Custom name for the underlying index in the database'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
16
21
|
description: 'Marks a field as primary key (auto-generated ObjectId)'
|
|
17
22
|
});
|
|
18
|
-
|
|
23
|
+
export const uniqueDirective = new GraphQLDirective({
|
|
19
24
|
name: 'unique',
|
|
20
|
-
locations: [
|
|
25
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
26
|
+
args: {
|
|
27
|
+
name: {
|
|
28
|
+
type: GraphQLString,
|
|
29
|
+
description: 'Name for the unique constraint (Prisma @unique map parameter)'
|
|
30
|
+
},
|
|
31
|
+
map: {
|
|
32
|
+
type: GraphQLString,
|
|
33
|
+
description: 'Custom name for the underlying index in the database'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
21
36
|
description: 'Creates a unique index on the field'
|
|
22
37
|
});
|
|
23
|
-
|
|
38
|
+
export const indexDirective = new GraphQLDirective({
|
|
24
39
|
name: 'index',
|
|
25
|
-
locations: [
|
|
40
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
26
41
|
description: 'Creates a regular index on the field'
|
|
27
42
|
});
|
|
28
|
-
|
|
43
|
+
export const defaultDirective = new GraphQLDirective({
|
|
29
44
|
name: 'default',
|
|
30
|
-
locations: [
|
|
45
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
31
46
|
args: {
|
|
32
47
|
value: {
|
|
33
|
-
type:
|
|
34
|
-
description: 'Default value for the field'
|
|
48
|
+
type: GraphQLString,
|
|
49
|
+
description: 'Default value for the field (static value)'
|
|
50
|
+
},
|
|
51
|
+
generator: {
|
|
52
|
+
type: GraphQLString,
|
|
53
|
+
description: 'Default value generator: "uuid", "now", "cuid"'
|
|
35
54
|
}
|
|
36
55
|
},
|
|
37
|
-
description: 'Sets a default value for a field'
|
|
56
|
+
description: 'Sets a default value or generator for a field'
|
|
38
57
|
});
|
|
39
|
-
|
|
58
|
+
export const relationDirective = new GraphQLDirective({
|
|
40
59
|
name: 'relation',
|
|
41
|
-
locations: [
|
|
60
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
42
61
|
args: {
|
|
62
|
+
name: {
|
|
63
|
+
type: GraphQLString,
|
|
64
|
+
description: 'Name for the relation (required when a model has multiple relations to the same target model)'
|
|
65
|
+
},
|
|
43
66
|
field: {
|
|
44
|
-
type: new
|
|
67
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
45
68
|
description: 'The field that stores the foreign key'
|
|
46
69
|
},
|
|
47
70
|
strategy: {
|
|
48
|
-
type:
|
|
71
|
+
type: GraphQLString,
|
|
49
72
|
description: 'Strategy for loading related data: "populate" (default) or "lookup"'
|
|
50
73
|
},
|
|
51
74
|
index: {
|
|
52
|
-
type:
|
|
75
|
+
type: GraphQLBoolean,
|
|
53
76
|
description: 'Whether to create an index on the foreign key field (default: true)'
|
|
77
|
+
},
|
|
78
|
+
onDelete: {
|
|
79
|
+
type: GraphQLString,
|
|
80
|
+
description: 'Cascade delete behavior: "Cascade" (delete related), "SetNull" (nullify FK), "Restrict" (prevent delete), or "NoAction" (default, no cascade)'
|
|
81
|
+
},
|
|
82
|
+
onUpdate: {
|
|
83
|
+
type: GraphQLString,
|
|
84
|
+
description: 'Cascade update behavior: "SetNull" (nullify FK), "Cascade" (update related), "Restrict" (prevent update), or "NoAction" (default, no cascade)'
|
|
54
85
|
}
|
|
55
86
|
},
|
|
56
87
|
description: 'Defines a relationship between models'
|
|
57
88
|
});
|
|
58
|
-
|
|
89
|
+
export const createdAtDirective = new GraphQLDirective({
|
|
59
90
|
name: 'createdAt',
|
|
60
|
-
locations: [
|
|
91
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
61
92
|
description: 'Automatically sets timestamp on creation'
|
|
62
93
|
});
|
|
63
|
-
|
|
94
|
+
export const updatedAtDirective = new GraphQLDirective({
|
|
64
95
|
name: 'updatedAt',
|
|
65
|
-
locations: [
|
|
96
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
66
97
|
description: 'Automatically updates timestamp on modification'
|
|
67
98
|
});
|
|
68
|
-
|
|
99
|
+
export const embeddedDirective = new GraphQLDirective({
|
|
69
100
|
name: 'embedded',
|
|
70
|
-
locations: [
|
|
101
|
+
locations: [DirectiveLocation.OBJECT],
|
|
71
102
|
description: 'Marks a type as embedded document (not stored in separate collection)'
|
|
72
103
|
});
|
|
73
|
-
|
|
104
|
+
export const hideDirective = new GraphQLDirective({
|
|
74
105
|
name: 'hide',
|
|
75
|
-
locations: [
|
|
106
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
76
107
|
description: 'Excludes field from query results by default. Can be explicitly selected via select option.'
|
|
77
108
|
});
|
|
109
|
+
export const mapDirective = new GraphQLDirective({
|
|
110
|
+
name: 'map',
|
|
111
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
112
|
+
args: {
|
|
113
|
+
name: {
|
|
114
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
115
|
+
description: 'The database field name to map to'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
description: 'Maps a field to a different database column name (Prisma @map)'
|
|
119
|
+
});
|
|
120
|
+
export const modelMapDirective = new GraphQLDirective({
|
|
121
|
+
name: 'modelMap',
|
|
122
|
+
locations: [DirectiveLocation.OBJECT],
|
|
123
|
+
args: {
|
|
124
|
+
name: {
|
|
125
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
126
|
+
description: 'The database collection name to map to (Prisma @@map)'
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
description: 'Maps a model to a different database collection name (Prisma @@map)'
|
|
130
|
+
});
|
|
131
|
+
export const ignoreDirective = new GraphQLDirective({
|
|
132
|
+
name: 'ignore',
|
|
133
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
134
|
+
description: 'Excludes a field from database operations entirely (Prisma @ignore)'
|
|
135
|
+
});
|
|
136
|
+
export const compoundUniqueDirective = new GraphQLDirective({
|
|
137
|
+
name: 'compoundUnique',
|
|
138
|
+
locations: [DirectiveLocation.OBJECT],
|
|
139
|
+
args: {
|
|
140
|
+
fields: {
|
|
141
|
+
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
|
|
142
|
+
description: 'Field names to include in the compound unique index'
|
|
143
|
+
},
|
|
144
|
+
name: {
|
|
145
|
+
type: GraphQLString,
|
|
146
|
+
description: 'Optional name for the unique constraint (maps to Prisma @@unique map parameter)'
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
description: 'Creates a compound unique index on multiple fields (Prisma @@unique)'
|
|
150
|
+
});
|
|
151
|
+
export const compoundIndexDirective = new GraphQLDirective({
|
|
152
|
+
name: 'compoundIndex',
|
|
153
|
+
locations: [DirectiveLocation.OBJECT],
|
|
154
|
+
args: {
|
|
155
|
+
fields: {
|
|
156
|
+
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
|
|
157
|
+
description: 'Field names to include in the compound index'
|
|
158
|
+
},
|
|
159
|
+
name: {
|
|
160
|
+
type: GraphQLString,
|
|
161
|
+
description: 'Optional name for the index (maps to Prisma @@index map parameter)'
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
description: 'Creates a compound index on multiple fields (Prisma @@index)'
|
|
165
|
+
});
|
|
166
|
+
export const compoundIdDirective = new GraphQLDirective({
|
|
167
|
+
name: 'compoundId',
|
|
168
|
+
locations: [DirectiveLocation.OBJECT],
|
|
169
|
+
args: {
|
|
170
|
+
fields: {
|
|
171
|
+
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))),
|
|
172
|
+
description: 'Field names to include in the compound primary key'
|
|
173
|
+
},
|
|
174
|
+
name: {
|
|
175
|
+
type: GraphQLString,
|
|
176
|
+
description: 'Optional name for the primary key constraint'
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
description: 'Defines a compound primary key on multiple fields (Prisma @@id)'
|
|
180
|
+
});
|
|
181
|
+
export const fulltextDirective = new GraphQLDirective({
|
|
182
|
+
name: 'fulltext',
|
|
183
|
+
locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
|
|
184
|
+
args: {
|
|
185
|
+
fields: {
|
|
186
|
+
type: new GraphQLList(new GraphQLNonNull(GraphQLString)),
|
|
187
|
+
description: 'Field names to include in the full-text index (for object-level usage: @@fulltext(fields: ["title", "description"]))'
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
description: 'Creates a MongoDB text index on specified field(s) for full-text search'
|
|
191
|
+
});
|
|
192
|
+
export const emailDirective = new GraphQLDirective({
|
|
193
|
+
name: 'email',
|
|
194
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
195
|
+
description: 'Validates that the field value is a valid email address'
|
|
196
|
+
});
|
|
197
|
+
export const urlDirective = new GraphQLDirective({
|
|
198
|
+
name: 'url',
|
|
199
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
200
|
+
description: 'Validates that the field value is a valid URL'
|
|
201
|
+
});
|
|
202
|
+
export const regexDirective = new GraphQLDirective({
|
|
203
|
+
name: 'regex',
|
|
204
|
+
locations: [DirectiveLocation.FIELD_DEFINITION],
|
|
205
|
+
args: {
|
|
206
|
+
pattern: {
|
|
207
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
208
|
+
description: 'Regular expression pattern to validate the field value against'
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
description: 'Validates that the field value matches a regular expression pattern'
|
|
212
|
+
});
|
|
78
213
|
// Экспорт всех директив
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
214
|
+
export const lenzDirectives = [
|
|
215
|
+
modelDirective,
|
|
216
|
+
idDirective,
|
|
217
|
+
uniqueDirective,
|
|
218
|
+
indexDirective,
|
|
219
|
+
defaultDirective,
|
|
220
|
+
relationDirective,
|
|
221
|
+
createdAtDirective,
|
|
222
|
+
updatedAtDirective,
|
|
223
|
+
embeddedDirective,
|
|
224
|
+
hideDirective,
|
|
225
|
+
mapDirective,
|
|
226
|
+
modelMapDirective,
|
|
227
|
+
ignoreDirective,
|
|
228
|
+
compoundUniqueDirective,
|
|
229
|
+
compoundIndexDirective,
|
|
230
|
+
compoundIdDirective,
|
|
231
|
+
fulltextDirective,
|
|
232
|
+
emailDirective,
|
|
233
|
+
urlDirective,
|
|
234
|
+
regexDirective
|
|
90
235
|
];
|
|
91
236
|
// Утилита для проверки, является ли директива директивой Lenz
|
|
92
|
-
function isLenzDirective(directiveName) {
|
|
93
|
-
return
|
|
237
|
+
export function isLenzDirective(directiveName) {
|
|
238
|
+
return lenzDirectives.some(d => d.name === directiveName);
|
|
94
239
|
}
|
|
95
240
|
// Утилита для получения определения директивы по имени
|
|
96
|
-
function getDirectiveDefinition(directiveName) {
|
|
97
|
-
return
|
|
241
|
+
export function getDirectiveDefinition(directiveName) {
|
|
242
|
+
return lenzDirectives.find(d => d.name === directiveName);
|
|
98
243
|
}
|
|
99
244
|
//# sourceMappingURL=directives.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.js","sourceRoot":"","sources":["../../src/engine/directives.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"directives.js","sourceRoot":"","sources":["../../src/engine/directives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1H,qCAAqC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,gBAAgB,CAAC;IACjD,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,CAAC,iBAAiB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AAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;AAC5D,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,sBAAsB,CAAC,aAAqB;IAC1D,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphQLModel } from '../GraphQLParser.js';
|
|
2
|
+
export declare class ClientGenerator {
|
|
3
|
+
generateIndex(clientName: string): string;
|
|
4
|
+
generateClient(clientName: string, models: GraphQLModel[]): string;
|
|
5
|
+
getModelsForRuntime(models: GraphQLModel[]): any[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ClientGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientGenerator.d.ts","sourceRoot":"","sources":["../../../src/engine/generators/ClientGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,qBAAa,eAAe;IAC1B,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAkBzC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM;IA4VlE,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,EAAE;CAmBnD"}
|