@@ -111,6 +111,8 @@ export interface ModelIntrospectionSchema {
111
111
queries ?: CustomOperations ;
112
112
mutations ?: CustomOperations ;
113
113
subscriptions ?: CustomOperations ;
114
+ conversations ?: SchemaConversationRoutes ;
115
+ generations ?: SchemaGenerationRoutes ;
114
116
}
115
117
116
118
/**
@@ -120,6 +122,27 @@ export type SchemaModels = Record<string, SchemaModel>;
120
122
export type SchemaNonModels = Record < string , SchemaNonModel > ;
121
123
export type SchemaEnums = Record < string , SchemaEnum > ;
122
124
export type CustomOperations = Record < string , CustomOperation > ;
125
+ type SchemaConversationRoutes = Record < string , SchemaConversationRoute > ;
126
+ type SchemaGenerationRoutes = Record < string , CustomOperation > ;
127
+
128
+ interface SchemaConversationRoute {
129
+ name : string ;
130
+ models : SchemaModels ;
131
+ nonModels : SchemaNonModels ;
132
+ enums : SchemaEnums ;
133
+ conversation : SchemaConversation ;
134
+ message : SchemaConversationMessage ;
135
+ }
136
+
137
+ interface SchemaConversation {
138
+ modelName : string ;
139
+ }
140
+
141
+ interface SchemaConversationMessage {
142
+ modelName : string ;
143
+ subscribe : CustomOperation ;
144
+ send : CustomOperation ;
145
+ }
123
146
124
147
export interface SchemaModel {
125
148
name : string ;
@@ -164,7 +187,7 @@ export type CustomOperationArguments = Record<string, CustomOperationArgument>;
164
187
165
188
export interface CustomOperationArgument {
166
189
name : string ;
167
- type : FieldType ;
190
+ type : InputFieldType ;
168
191
isArray : boolean ;
169
192
isRequired : boolean ;
170
193
isArrayNullable ?: boolean ;
@@ -192,7 +215,15 @@ export interface NonModelFieldType {
192
215
nonModel : string ;
193
216
}
194
217
195
- export type FieldType =
218
+ interface EnumType {
219
+ enum : string ;
220
+ }
221
+
222
+ interface InputType {
223
+ input : string ;
224
+ }
225
+
226
+ type ScalarType =
196
227
| 'ID'
197
228
| 'String'
198
229
| 'Int'
@@ -206,10 +237,12 @@ export type FieldType =
206
237
| 'AWSIPAddress'
207
238
| 'Boolean'
208
239
| 'AWSJSON'
209
- | 'AWSPhone'
210
- | { enum : string }
211
- | ModelFieldType
212
- | NonModelFieldType ;
240
+ | 'AWSPhone' ;
241
+
242
+ type FieldType = ScalarType | EnumType | ModelFieldType | NonModelFieldType ;
243
+
244
+ type InputFieldType = ScalarType | EnumType | InputType ;
245
+
213
246
export type FieldAttribute = ModelAttribute ;
214
247
215
248
/**
0 commit comments