@aws-amplify/graphql-transformer-interfaces 2.1.0-cdkv2.2 → 2.1.1-alpha.5
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/API.md +732 -0
- package/CHANGELOG.md +50 -0
- package/lib/deployment-resources.d.ts +34 -0
- package/lib/deployment-resources.d.ts.map +1 -0
- package/lib/deployment-resources.js +3 -0
- package/lib/deployment-resources.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/deployment-resources.ts +49 -0
- package/src/graphql-api-provider.ts +1 -1
- package/src/index.ts +8 -0
- package/tsconfig.tsbuildinfo +1 -1
package/API.md
ADDED
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
## API Report File for "@aws-amplify/graphql-transformer-interfaces"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { BackedDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
8
|
+
import { BaseDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
9
|
+
import { CfnDomain } from 'aws-cdk-lib/aws-elasticsearch';
|
|
10
|
+
import { CfnParameter } from 'aws-cdk-lib';
|
|
11
|
+
import { CfnParameterProps } from 'aws-cdk-lib';
|
|
12
|
+
import { CfnResolver } from 'aws-cdk-lib/aws-appsync';
|
|
13
|
+
import { CfnResource } from 'aws-cdk-lib';
|
|
14
|
+
import { Construct } from 'constructs';
|
|
15
|
+
import { DirectiveDefinitionNode } from 'graphql';
|
|
16
|
+
import { DirectiveNode } from 'graphql';
|
|
17
|
+
import { DocumentNode } from 'graphql';
|
|
18
|
+
import { Duration } from 'aws-cdk-lib';
|
|
19
|
+
import { DynamoDbDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
20
|
+
import { EnumTypeDefinitionNode } from 'graphql';
|
|
21
|
+
import { EnumTypeExtensionNode } from 'graphql';
|
|
22
|
+
import { EnumValueDefinitionNode } from 'graphql';
|
|
23
|
+
import { FieldDefinitionNode } from 'graphql';
|
|
24
|
+
import { FieldNode } from 'graphql';
|
|
25
|
+
import { Grant } from 'aws-cdk-lib/aws-iam';
|
|
26
|
+
import { GraphqlApiBase } from '@aws-cdk/aws-appsync-alpha';
|
|
27
|
+
import { HttpDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
28
|
+
import { IAsset } from 'aws-cdk-lib';
|
|
29
|
+
import { IConstruct } from 'constructs';
|
|
30
|
+
import { IFunction } from 'aws-cdk-lib/aws-lambda';
|
|
31
|
+
import { IGrantable } from 'aws-cdk-lib/aws-iam';
|
|
32
|
+
import { ILayerVersion } from 'aws-cdk-lib/aws-lambda';
|
|
33
|
+
import { InputObjectTypeDefinitionNode } from 'graphql';
|
|
34
|
+
import { InputObjectTypeExtensionNode } from 'graphql';
|
|
35
|
+
import { InputValueDefinitionNode } from 'graphql';
|
|
36
|
+
import { InterfaceTypeDefinitionNode } from 'graphql';
|
|
37
|
+
import { InterfaceTypeExtensionNode } from 'graphql';
|
|
38
|
+
import { IRole } from 'aws-cdk-lib/aws-iam';
|
|
39
|
+
import { ITable } from 'aws-cdk-lib/aws-dynamodb';
|
|
40
|
+
import { LambdaDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
41
|
+
import { NoneDataSource } from '@aws-cdk/aws-appsync-alpha';
|
|
42
|
+
import { ObjectTypeDefinitionNode } from 'graphql';
|
|
43
|
+
import { ObjectTypeExtensionNode } from 'graphql';
|
|
44
|
+
import { Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
45
|
+
import { ScalarTypeDefinitionNode } from 'graphql';
|
|
46
|
+
import { SchemaDefinitionNode } from 'graphql';
|
|
47
|
+
import { Stack } from 'aws-cdk-lib';
|
|
48
|
+
import { TypeDefinitionNode } from 'graphql';
|
|
49
|
+
import { TypeSystemDefinitionNode } from 'graphql';
|
|
50
|
+
import { UnionTypeDefinitionNode } from 'graphql';
|
|
51
|
+
import { UnionTypeExtensionNode } from 'graphql';
|
|
52
|
+
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
export interface APIIAMResourceProvider {
|
|
55
|
+
// (undocumented)
|
|
56
|
+
resourceArns: (api: GraphQLAPIProvider) => string[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
export interface ApiKeyConfig {
|
|
61
|
+
// (undocumented)
|
|
62
|
+
apiKeyExpirationDate?: Date;
|
|
63
|
+
// (undocumented)
|
|
64
|
+
apiKeyExpirationDays: number;
|
|
65
|
+
// (undocumented)
|
|
66
|
+
description?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export type AppSyncAuthConfiguration = {
|
|
71
|
+
defaultAuthentication: AppSyncAuthConfigurationEntry;
|
|
72
|
+
additionalAuthenticationProviders: Array<AppSyncAuthConfigurationEntry>;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// @public (undocumented)
|
|
76
|
+
export type AppSyncAuthConfigurationAPIKeyEntry = {
|
|
77
|
+
authenticationType: 'API_KEY';
|
|
78
|
+
apiKeyConfig?: ApiKeyConfig;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// Warning: (ae-forgotten-export) The symbol "AppSyncAuthConfigurationLambdaEntry" needs to be exported by the entry point index.d.ts
|
|
82
|
+
//
|
|
83
|
+
// @public (undocumented)
|
|
84
|
+
export type AppSyncAuthConfigurationEntry = AppSyncAuthConfigurationUserPoolEntry | AppSyncAuthConfigurationAPIKeyEntry | AppSyncAuthConfigurationIAMEntry | AppSyncAuthConfigurationOIDCEntry | AppSyncAuthConfigurationLambdaEntry;
|
|
85
|
+
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
export type AppSyncAuthConfigurationIAMEntry = {
|
|
88
|
+
authenticationType: 'AWS_IAM';
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// @public (undocumented)
|
|
92
|
+
export type AppSyncAuthConfigurationOIDCEntry = {
|
|
93
|
+
authenticationType: 'OPENID_CONNECT';
|
|
94
|
+
openIDConnectConfig?: OpenIDConnectConfig;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// @public (undocumented)
|
|
98
|
+
export type AppSyncAuthConfigurationUserPoolEntry = {
|
|
99
|
+
authenticationType: 'AMAZON_COGNITO_USER_POOLS';
|
|
100
|
+
userPoolConfig?: UserPoolConfig;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// @public (undocumented)
|
|
104
|
+
export type AppSyncAuthMode = 'API_KEY' | 'AMAZON_COGNITO_USER_POOLS' | 'AWS_IAM' | 'OPENID_CONNECT' | 'AWS_LAMBDA';
|
|
105
|
+
|
|
106
|
+
// @public (undocumented)
|
|
107
|
+
export enum AppSyncDataSourceType {
|
|
108
|
+
// (undocumented)
|
|
109
|
+
AMAZON_DYNAMODB = "AMAZON_DYNAMODB",
|
|
110
|
+
// (undocumented)
|
|
111
|
+
AMAZON_ELASTICSEARCH = "AMAZON_ELASTICSEARCH",
|
|
112
|
+
// (undocumented)
|
|
113
|
+
AWS_LAMBDA = "AWS_LAMBDA",
|
|
114
|
+
// (undocumented)
|
|
115
|
+
HTTP = "HTTP",
|
|
116
|
+
// (undocumented)
|
|
117
|
+
NONE = "NONE",
|
|
118
|
+
// (undocumented)
|
|
119
|
+
RELATIONAL_DATABASE = "RELATIONAL_DATABASE"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// @public (undocumented)
|
|
123
|
+
export interface AppSyncFunctionConfigurationProvider extends IConstruct {
|
|
124
|
+
// (undocumented)
|
|
125
|
+
readonly arn: string;
|
|
126
|
+
// (undocumented)
|
|
127
|
+
readonly functionId: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Warning: (ae-forgotten-export) The symbol "NoneDataSourceProvider" needs to be exported by the entry point index.d.ts
|
|
131
|
+
//
|
|
132
|
+
// @public (undocumented)
|
|
133
|
+
export type DataSourceInstance = ITable | CfnDomain | HttpDataSource | IFunction | NoneDataSourceProvider;
|
|
134
|
+
|
|
135
|
+
// @public (undocumented)
|
|
136
|
+
export interface DataSourceOptions {
|
|
137
|
+
// (undocumented)
|
|
138
|
+
readonly description?: string;
|
|
139
|
+
// (undocumented)
|
|
140
|
+
readonly name?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// @public (undocumented)
|
|
144
|
+
export interface DataSourceProvider extends BackedDataSource {
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// @public (undocumented)
|
|
148
|
+
export interface DeploymentResources extends ResolversFunctionsAndSchema, NestedStacks {
|
|
149
|
+
// (undocumented)
|
|
150
|
+
stackMapping: StackMapping;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// @public (undocumented)
|
|
154
|
+
export interface DynamoDbDataSourceOptions extends DataSourceOptions {
|
|
155
|
+
// (undocumented)
|
|
156
|
+
readonly serviceRole: IRole;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// @public (undocumented)
|
|
160
|
+
export interface FeatureFlagProvider {
|
|
161
|
+
// (undocumented)
|
|
162
|
+
getBoolean(featureName: string, defaultValue?: boolean): boolean;
|
|
163
|
+
// (undocumented)
|
|
164
|
+
getNumber(featureName: string, defaultValue?: number): number;
|
|
165
|
+
// (undocumented)
|
|
166
|
+
getObject(featureName: string, defaultValue?: object): object;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// @public (undocumented)
|
|
170
|
+
export type FieldMapEntry = {
|
|
171
|
+
originalFieldName: string;
|
|
172
|
+
currentFieldName: string;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// @public (undocumented)
|
|
176
|
+
export interface GraphQLAPIProvider extends IConstruct {
|
|
177
|
+
// (undocumented)
|
|
178
|
+
addSchemaDependency: (construct: CfnResource) => boolean;
|
|
179
|
+
// (undocumented)
|
|
180
|
+
addToSchema: (addition: string) => void;
|
|
181
|
+
// (undocumented)
|
|
182
|
+
readonly apiId: string;
|
|
183
|
+
// (undocumented)
|
|
184
|
+
grant: (grantee: IGrantable, resources: APIIAMResourceProvider, ...actions: string[]) => Grant;
|
|
185
|
+
// (undocumented)
|
|
186
|
+
grantMutation: (grantee: IGrantable, ...fields: string[]) => Grant;
|
|
187
|
+
// (undocumented)
|
|
188
|
+
grantQuery: (grantee: IGrantable, ...fields: string[]) => Grant;
|
|
189
|
+
// (undocumented)
|
|
190
|
+
grantSubscription: (grantee: IGrantable, ...fields: string[]) => Grant;
|
|
191
|
+
// (undocumented)
|
|
192
|
+
readonly host: TransformHostProvider;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// @public (undocumented)
|
|
196
|
+
export interface InlineMappingTemplateProvider {
|
|
197
|
+
// (undocumented)
|
|
198
|
+
bind: (scope: Construct) => string;
|
|
199
|
+
// (undocumented)
|
|
200
|
+
getTemplateHash: () => string;
|
|
201
|
+
// (undocumented)
|
|
202
|
+
type: MappingTemplateType.INLINE;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// @public (undocumented)
|
|
206
|
+
export type MappingTemplateProvider = InlineMappingTemplateProvider | S3MappingTemplateProvider;
|
|
207
|
+
|
|
208
|
+
// @public (undocumented)
|
|
209
|
+
export enum MappingTemplateType {
|
|
210
|
+
// (undocumented)
|
|
211
|
+
INLINE = "INLINE",
|
|
212
|
+
// (undocumented)
|
|
213
|
+
S3_LOCATION = "S3_LOCATION"
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// @public (undocumented)
|
|
217
|
+
export type ModelFieldMap = {
|
|
218
|
+
addMappedField: (entry: FieldMapEntry) => ModelFieldMap;
|
|
219
|
+
addResolverReference: (entry: ResolverReferenceEntry) => ModelFieldMap;
|
|
220
|
+
getMappedFields: () => ReadonlyArray_2<FieldMapEntry>;
|
|
221
|
+
getResolverReferences: () => ReadonlyArray_2<ResolverReferenceEntry>;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// @public (undocumented)
|
|
225
|
+
export enum MutationFieldType {
|
|
226
|
+
// (undocumented)
|
|
227
|
+
CREATE = "CREATE",
|
|
228
|
+
// (undocumented)
|
|
229
|
+
DELETE = "DELETE",
|
|
230
|
+
// (undocumented)
|
|
231
|
+
UPDATE = "UPDATE"
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// @public (undocumented)
|
|
235
|
+
export interface NestedStacks {
|
|
236
|
+
// (undocumented)
|
|
237
|
+
rootStack: Template;
|
|
238
|
+
// (undocumented)
|
|
239
|
+
stackMapping: Record<string, string>;
|
|
240
|
+
// (undocumented)
|
|
241
|
+
stacks: Record<string, Template>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// @public (undocumented)
|
|
245
|
+
export enum QueryFieldType {
|
|
246
|
+
// (undocumented)
|
|
247
|
+
GET = "GET",
|
|
248
|
+
// (undocumented)
|
|
249
|
+
LIST = "LIST",
|
|
250
|
+
// (undocumented)
|
|
251
|
+
SYNC = "SYNC"
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// @public (undocumented)
|
|
255
|
+
type ReadonlyArray_2<T> = Readonly<Array<Readonly<T>>>;
|
|
256
|
+
export { ReadonlyArray_2 as ReadonlyArray }
|
|
257
|
+
|
|
258
|
+
// @public (undocumented)
|
|
259
|
+
export type ResolverReferenceEntry = {
|
|
260
|
+
typeName: string;
|
|
261
|
+
fieldName: string;
|
|
262
|
+
isList: boolean;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
// @public (undocumented)
|
|
266
|
+
export interface ResolversFunctionsAndSchema {
|
|
267
|
+
// (undocumented)
|
|
268
|
+
functions: Record<string, string>;
|
|
269
|
+
// (undocumented)
|
|
270
|
+
pipelineFunctions: Record<string, string>;
|
|
271
|
+
// (undocumented)
|
|
272
|
+
resolvers: Record<string, string>;
|
|
273
|
+
// (undocumented)
|
|
274
|
+
schema: string;
|
|
275
|
+
// (undocumented)
|
|
276
|
+
userOverriddenSlots: string[];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// @public (undocumented)
|
|
280
|
+
export interface S3MappingFunctionCodeProvider {
|
|
281
|
+
// (undocumented)
|
|
282
|
+
bind: (scope: Construct) => IAsset;
|
|
283
|
+
// (undocumented)
|
|
284
|
+
type: MappingTemplateType.S3_LOCATION;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// @public (undocumented)
|
|
288
|
+
export interface S3MappingTemplateProvider {
|
|
289
|
+
// (undocumented)
|
|
290
|
+
bind: (scope: Construct) => string;
|
|
291
|
+
// (undocumented)
|
|
292
|
+
getTemplateHash: () => string;
|
|
293
|
+
// (undocumented)
|
|
294
|
+
type: MappingTemplateType.S3_LOCATION;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// @public (undocumented)
|
|
298
|
+
export interface SearchableDataSourceOptions extends DataSourceOptions {
|
|
299
|
+
// (undocumented)
|
|
300
|
+
readonly serviceRole: IRole;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// @public (undocumented)
|
|
304
|
+
export interface StackManagerProvider {
|
|
305
|
+
// (undocumented)
|
|
306
|
+
addParameter: (name: string, props: CfnParameterProps) => CfnParameter;
|
|
307
|
+
// (undocumented)
|
|
308
|
+
createStack: (stackName: string) => Stack;
|
|
309
|
+
// (undocumented)
|
|
310
|
+
getParameter: (name: string) => CfnParameter | void;
|
|
311
|
+
// (undocumented)
|
|
312
|
+
getStack: (stackName: string) => Stack;
|
|
313
|
+
// (undocumented)
|
|
314
|
+
getStackFor: (resourceId: string, defaultStackName?: string) => Stack;
|
|
315
|
+
// (undocumented)
|
|
316
|
+
hasStack: (stackName: string) => boolean;
|
|
317
|
+
// (undocumented)
|
|
318
|
+
readonly rootStack: Stack;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// @public (undocumented)
|
|
322
|
+
export interface StackMapping {
|
|
323
|
+
// (undocumented)
|
|
324
|
+
[resourceId: string]: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// @public (undocumented)
|
|
328
|
+
export enum SubscriptionFieldType {
|
|
329
|
+
// (undocumented)
|
|
330
|
+
ON_CREATE = "ON_CREATE",
|
|
331
|
+
// (undocumented)
|
|
332
|
+
ON_DELETE = "ON_DELETE",
|
|
333
|
+
// (undocumented)
|
|
334
|
+
ON_UPDATE = "ON_UPDATE"
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// @public (undocumented)
|
|
338
|
+
export interface Template {
|
|
339
|
+
// (undocumented)
|
|
340
|
+
AWSTemplateFormatVersion?: string;
|
|
341
|
+
// (undocumented)
|
|
342
|
+
Conditions?: Record<string, any>;
|
|
343
|
+
// (undocumented)
|
|
344
|
+
Description?: string;
|
|
345
|
+
// (undocumented)
|
|
346
|
+
Mappings?: {
|
|
347
|
+
[key: string]: {
|
|
348
|
+
[key: string]: Record<string, string | number | string[]>;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
// (undocumented)
|
|
352
|
+
Metadata?: Record<string, any>;
|
|
353
|
+
// (undocumented)
|
|
354
|
+
Outputs?: Record<string, any>;
|
|
355
|
+
// (undocumented)
|
|
356
|
+
Parameters?: Record<string, any>;
|
|
357
|
+
// (undocumented)
|
|
358
|
+
Resources?: Record<string, any>;
|
|
359
|
+
// (undocumented)
|
|
360
|
+
Transform?: any;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// @public (undocumented)
|
|
364
|
+
export type TransformerAuthProvider = TransformerPluginProvider;
|
|
365
|
+
|
|
366
|
+
// @public (undocumented)
|
|
367
|
+
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'featureFlags' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'sandboxModeEnabled'>;
|
|
368
|
+
|
|
369
|
+
// @public (undocumented)
|
|
370
|
+
export interface TransformerContextOutputProvider {
|
|
371
|
+
// (undocumented)
|
|
372
|
+
addEnum(en: EnumTypeDefinitionNode): void;
|
|
373
|
+
// (undocumented)
|
|
374
|
+
addEnumExtension(obj: EnumTypeExtensionNode): void;
|
|
375
|
+
// (undocumented)
|
|
376
|
+
addInput(inp: InputObjectTypeDefinitionNode): void;
|
|
377
|
+
// (undocumented)
|
|
378
|
+
addInputExtension(obj: InputObjectTypeExtensionNode): void;
|
|
379
|
+
// (undocumented)
|
|
380
|
+
addInterfaceExtension(obj: InterfaceTypeExtensionNode): void;
|
|
381
|
+
// (undocumented)
|
|
382
|
+
addMutationFields(fields: FieldDefinitionNode[]): void;
|
|
383
|
+
// (undocumented)
|
|
384
|
+
addObject(obj: ObjectTypeDefinitionNode): void;
|
|
385
|
+
// (undocumented)
|
|
386
|
+
addObjectExtension(obj: ObjectTypeExtensionNode): void;
|
|
387
|
+
// (undocumented)
|
|
388
|
+
addQueryFields(fields: FieldDefinitionNode[]): void;
|
|
389
|
+
// (undocumented)
|
|
390
|
+
addSubscriptionFields(fields: FieldDefinitionNode[]): void;
|
|
391
|
+
// (undocumented)
|
|
392
|
+
addType(obj: TypeDefinitionNode): void;
|
|
393
|
+
// (undocumented)
|
|
394
|
+
addUnion(obj: UnionTypeDefinitionNode): void;
|
|
395
|
+
// (undocumented)
|
|
396
|
+
addUnionExtension(obj: UnionTypeExtensionNode): void;
|
|
397
|
+
// (undocumented)
|
|
398
|
+
getMutation(): ObjectTypeDefinitionNode | undefined;
|
|
399
|
+
// (undocumented)
|
|
400
|
+
getMutationTypeName(): string | undefined;
|
|
401
|
+
// (undocumented)
|
|
402
|
+
getObject(name: string): ObjectTypeDefinitionNode | undefined;
|
|
403
|
+
// (undocumented)
|
|
404
|
+
getQuery(): ObjectTypeDefinitionNode | undefined;
|
|
405
|
+
// (undocumented)
|
|
406
|
+
getQueryTypeName: () => string | undefined;
|
|
407
|
+
// (undocumented)
|
|
408
|
+
getSchema: () => SchemaDefinitionNode;
|
|
409
|
+
// (undocumented)
|
|
410
|
+
getSubscription(): ObjectTypeDefinitionNode | undefined;
|
|
411
|
+
// (undocumented)
|
|
412
|
+
getSubscriptionTypeName(): string | undefined;
|
|
413
|
+
// (undocumented)
|
|
414
|
+
getType(name: string): TypeSystemDefinitionNode | undefined;
|
|
415
|
+
// (undocumented)
|
|
416
|
+
getTypeDefinitionsOfKind: (kind: string) => TypeDefinitionNode[];
|
|
417
|
+
// (undocumented)
|
|
418
|
+
hasType(name: string): boolean;
|
|
419
|
+
// (undocumented)
|
|
420
|
+
putSchema: (obj: SchemaDefinitionNode) => void;
|
|
421
|
+
// (undocumented)
|
|
422
|
+
putType(obj: TypeDefinitionNode): void;
|
|
423
|
+
// (undocumented)
|
|
424
|
+
updateObject(obj: ObjectTypeDefinitionNode): void;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// @public (undocumented)
|
|
428
|
+
export interface TransformerContextProvider {
|
|
429
|
+
// (undocumented)
|
|
430
|
+
api: GraphQLAPIProvider;
|
|
431
|
+
// (undocumented)
|
|
432
|
+
authConfig: AppSyncAuthConfiguration;
|
|
433
|
+
// (undocumented)
|
|
434
|
+
dataSources: TransformerDataSourceManagerProvider;
|
|
435
|
+
// (undocumented)
|
|
436
|
+
featureFlags: FeatureFlagProvider;
|
|
437
|
+
// (undocumented)
|
|
438
|
+
getResolverConfig<ResolverConfig>(): ResolverConfig | undefined;
|
|
439
|
+
// (undocumented)
|
|
440
|
+
inputDocument: DocumentNode;
|
|
441
|
+
// (undocumented)
|
|
442
|
+
isProjectUsingDataStore(): boolean;
|
|
443
|
+
// Warning: (ae-forgotten-export) The symbol "TransformerContextMetadataProvider" needs to be exported by the entry point index.d.ts
|
|
444
|
+
//
|
|
445
|
+
// (undocumented)
|
|
446
|
+
metadata: TransformerContextMetadataProvider;
|
|
447
|
+
// (undocumented)
|
|
448
|
+
output: TransformerContextOutputProvider;
|
|
449
|
+
// (undocumented)
|
|
450
|
+
providerRegistry: TransformerProviderRegistry;
|
|
451
|
+
// (undocumented)
|
|
452
|
+
resolvers: TransformerResolversManagerProvider;
|
|
453
|
+
// (undocumented)
|
|
454
|
+
resourceHelper: TransformerResourceHelperProvider;
|
|
455
|
+
// (undocumented)
|
|
456
|
+
sandboxModeEnabled: boolean;
|
|
457
|
+
// (undocumented)
|
|
458
|
+
stackManager: StackManagerProvider;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// @public (undocumented)
|
|
462
|
+
export interface TransformerDataSourceManagerProvider {
|
|
463
|
+
// (undocumented)
|
|
464
|
+
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance): void;
|
|
465
|
+
// (undocumented)
|
|
466
|
+
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): DataSourceInstance;
|
|
467
|
+
// (undocumented)
|
|
468
|
+
has(name: string): boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// @public (undocumented)
|
|
472
|
+
export type TransformerModelEnhancementProvider = Partial<TransformerModelProvider>;
|
|
473
|
+
|
|
474
|
+
// @public (undocumented)
|
|
475
|
+
export interface TransformerModelProvider extends TransformerPluginProvider {
|
|
476
|
+
// (undocumented)
|
|
477
|
+
generateCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
478
|
+
// (undocumented)
|
|
479
|
+
generateDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
480
|
+
// (undocumented)
|
|
481
|
+
generateGetResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
482
|
+
// (undocumented)
|
|
483
|
+
generateListResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
484
|
+
// (undocumented)
|
|
485
|
+
generateOnCreateResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
486
|
+
// (undocumented)
|
|
487
|
+
generateOnDeleteResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
488
|
+
// (undocumented)
|
|
489
|
+
generateOnUpdateResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
490
|
+
// (undocumented)
|
|
491
|
+
generateSyncResolver?: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
492
|
+
// (undocumented)
|
|
493
|
+
generateUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
|
|
494
|
+
// (undocumented)
|
|
495
|
+
getDataSourceResource: (type: ObjectTypeDefinitionNode) => DataSourceInstance;
|
|
496
|
+
// (undocumented)
|
|
497
|
+
getDataSourceType: () => AppSyncDataSourceType;
|
|
498
|
+
// (undocumented)
|
|
499
|
+
getInputs: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, operation: {
|
|
500
|
+
fieldName: string;
|
|
501
|
+
typeName: string;
|
|
502
|
+
type: QueryFieldType | MutationFieldType | SubscriptionFieldType;
|
|
503
|
+
}) => InputValueDefinitionNode[];
|
|
504
|
+
// (undocumented)
|
|
505
|
+
getMutationFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
|
|
506
|
+
fieldName: string;
|
|
507
|
+
typeName: string;
|
|
508
|
+
type: MutationFieldType;
|
|
509
|
+
}>;
|
|
510
|
+
// (undocumented)
|
|
511
|
+
getOutputType: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, operation: {
|
|
512
|
+
fieldName: string;
|
|
513
|
+
typeName: string;
|
|
514
|
+
type: QueryFieldType | MutationFieldType | SubscriptionFieldType;
|
|
515
|
+
}) => ObjectTypeDefinitionNode;
|
|
516
|
+
// (undocumented)
|
|
517
|
+
getQueryFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
|
|
518
|
+
fieldName: string;
|
|
519
|
+
typeName: string;
|
|
520
|
+
type: QueryFieldType;
|
|
521
|
+
}>;
|
|
522
|
+
// (undocumented)
|
|
523
|
+
getSubscriptionFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
|
|
524
|
+
fieldName: string;
|
|
525
|
+
typeName: string;
|
|
526
|
+
type: SubscriptionFieldType;
|
|
527
|
+
}>;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// @public (undocumented)
|
|
531
|
+
export interface TransformerPluginProvider {
|
|
532
|
+
// (undocumented)
|
|
533
|
+
after?: (context: TransformerContextProvider) => void;
|
|
534
|
+
// (undocumented)
|
|
535
|
+
argument?: (definition: InputValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
536
|
+
// (undocumented)
|
|
537
|
+
before?: (context: TransformerBeforeStepContextProvider) => void;
|
|
538
|
+
// (undocumented)
|
|
539
|
+
readonly directive: DirectiveDefinitionNode;
|
|
540
|
+
// (undocumented)
|
|
541
|
+
enum?: (definition: EnumTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
542
|
+
// (undocumented)
|
|
543
|
+
enumValue?: (definition: EnumValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
544
|
+
// (undocumented)
|
|
545
|
+
field?: (parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definition: FieldDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
|
|
546
|
+
// (undocumented)
|
|
547
|
+
generateResolvers?: (context: TransformerContextProvider) => void;
|
|
548
|
+
// (undocumented)
|
|
549
|
+
input?: (definition: InputObjectTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
550
|
+
// (undocumented)
|
|
551
|
+
inputValue?: (definition: InputValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
552
|
+
// (undocumented)
|
|
553
|
+
interface?: (definition: InterfaceTypeDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
|
|
554
|
+
// (undocumented)
|
|
555
|
+
mutateSchema?: (context: TransformerPreProcessContextProvider) => DocumentNode;
|
|
556
|
+
// (undocumented)
|
|
557
|
+
name: string;
|
|
558
|
+
// (undocumented)
|
|
559
|
+
object?: (definition: ObjectTypeDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
|
|
560
|
+
// (undocumented)
|
|
561
|
+
pluginType: TransformerPluginType;
|
|
562
|
+
// (undocumented)
|
|
563
|
+
preMutateSchema?: (context: TransformerPreProcessContextProvider) => void;
|
|
564
|
+
// (undocumented)
|
|
565
|
+
prepare?: (context: TransformerPrepareStepContextProvider) => void;
|
|
566
|
+
// (undocumented)
|
|
567
|
+
scalar?: (definition: ScalarTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
568
|
+
// (undocumented)
|
|
569
|
+
transformSchema?: (context: TransformerTransformSchemaStepContextProvider) => void;
|
|
570
|
+
// (undocumented)
|
|
571
|
+
typeDefinitions: TypeDefinitionNode[];
|
|
572
|
+
// (undocumented)
|
|
573
|
+
union?: (definition: UnionTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
574
|
+
// (undocumented)
|
|
575
|
+
validate?: (context: TransformerValidationStepContextProvider) => void;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// @public (undocumented)
|
|
579
|
+
export enum TransformerPluginType {
|
|
580
|
+
// (undocumented)
|
|
581
|
+
AUTH = "AUTH",
|
|
582
|
+
// (undocumented)
|
|
583
|
+
DATA_SOURCE_ENHANCER = "DATA_SOURCE_ENHANCER",
|
|
584
|
+
// (undocumented)
|
|
585
|
+
DATA_SOURCE_PROVIDER = "DATA_SOURCE_PROVIDER",
|
|
586
|
+
// (undocumented)
|
|
587
|
+
GENERIC = "GENERIC"
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// @public (undocumented)
|
|
591
|
+
export type TransformerPrepareStepContextProvider = TransformerValidationStepContextProvider;
|
|
592
|
+
|
|
593
|
+
// @public (undocumented)
|
|
594
|
+
export interface TransformerPreProcessContextProvider {
|
|
595
|
+
// (undocumented)
|
|
596
|
+
featureFlags: FeatureFlagProvider;
|
|
597
|
+
// (undocumented)
|
|
598
|
+
inputDocument: DocumentNode;
|
|
599
|
+
// (undocumented)
|
|
600
|
+
schemaHelper: TransformerSchemaHelperProvider;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// @public (undocumented)
|
|
604
|
+
export interface TransformerProviderRegistry {
|
|
605
|
+
// (undocumented)
|
|
606
|
+
addDataSourceEnhancer: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, provider: TransformerModelEnhancementProvider) => void;
|
|
607
|
+
// (undocumented)
|
|
608
|
+
getDataSourceEnhancers: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => TransformerModelEnhancementProvider[];
|
|
609
|
+
// (undocumented)
|
|
610
|
+
getDataSourceProvider(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): TransformerModelProvider;
|
|
611
|
+
// (undocumented)
|
|
612
|
+
hasDataSourceProvider(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): boolean;
|
|
613
|
+
// (undocumented)
|
|
614
|
+
registerDataSourceProvider: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, provider: TransformerModelProvider) => void;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// @public (undocumented)
|
|
618
|
+
export interface TransformerResolverProvider {
|
|
619
|
+
// (undocumented)
|
|
620
|
+
addToSlot: (slotName: string, requestMappingTemplate?: MappingTemplateProvider, responseMappingTemplate?: MappingTemplateProvider, dataSource?: DataSourceProvider) => void;
|
|
621
|
+
// (undocumented)
|
|
622
|
+
mapToStack: (stack: Stack) => void;
|
|
623
|
+
// (undocumented)
|
|
624
|
+
synthesize: (context: TransformerContextProvider, api: GraphQLAPIProvider) => void;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// @public (undocumented)
|
|
628
|
+
export interface TransformerResolversManagerProvider {
|
|
629
|
+
// (undocumented)
|
|
630
|
+
addResolver: (typeName: string, fieldName: string, resolver: TransformerResolverProvider) => TransformerResolverProvider;
|
|
631
|
+
// (undocumented)
|
|
632
|
+
collectResolvers: () => Map<string, TransformerResolverProvider>;
|
|
633
|
+
// (undocumented)
|
|
634
|
+
generateMutationResolver: (typeName: string, fieldName: string, resolverLogicalId: string, dataSource: DataSourceProvider, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
|
|
635
|
+
// (undocumented)
|
|
636
|
+
generateQueryResolver: (typeName: string, fieldName: string, resolverLogicalId: string, dataSource: DataSourceProvider, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
|
|
637
|
+
// (undocumented)
|
|
638
|
+
generateSubscriptionResolver: (typeName: string, fieldName: string, resolverLogicalId: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
|
|
639
|
+
// (undocumented)
|
|
640
|
+
getResolver: (typeName: string, fieldName: string) => TransformerResolverProvider | void;
|
|
641
|
+
// (undocumented)
|
|
642
|
+
hasResolver: (typeName: string, fieldName: string) => boolean;
|
|
643
|
+
// (undocumented)
|
|
644
|
+
removeResolver: (typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// @public (undocumented)
|
|
648
|
+
export interface TransformerResourceHelperProvider {
|
|
649
|
+
// (undocumented)
|
|
650
|
+
addDirectiveConfigExclusion(object: ObjectTypeDefinitionNode | ObjectTypeExtensionNode, field: FieldNode, directive: DirectiveNode): void;
|
|
651
|
+
// (undocumented)
|
|
652
|
+
generateIAMRoleName(name: string): string;
|
|
653
|
+
// (undocumented)
|
|
654
|
+
generateTableName(modelName: string): string;
|
|
655
|
+
// (undocumented)
|
|
656
|
+
getFieldNameMapping(modelName: string, fieldName: string): string;
|
|
657
|
+
// (undocumented)
|
|
658
|
+
getModelFieldMap(modelName: string): ModelFieldMap;
|
|
659
|
+
// (undocumented)
|
|
660
|
+
getModelFieldMapKeys(): string[];
|
|
661
|
+
// (undocumented)
|
|
662
|
+
getModelNameMapping(modelName: string): string;
|
|
663
|
+
// (undocumented)
|
|
664
|
+
isDirectiveConfigExcluded(object: ObjectTypeExtensionNode | ObjectTypeExtensionNode, field: FieldNode, directive: DirectiveNode): boolean;
|
|
665
|
+
// (undocumented)
|
|
666
|
+
isModelRenamed(modelName: string): boolean;
|
|
667
|
+
// (undocumented)
|
|
668
|
+
setModelNameMapping(modelName: string, mappedName: string): void;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// @public (undocumented)
|
|
672
|
+
export interface TransformerSchemaHelperProvider {
|
|
673
|
+
// (undocumented)
|
|
674
|
+
getTypeMapping: (newTypeName: string) => string;
|
|
675
|
+
// (undocumented)
|
|
676
|
+
setTypeMapping: (newTypeName: string, originalTypeName: string) => void;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// @public (undocumented)
|
|
680
|
+
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'output' | 'providerRegistry' | 'featureFlags' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'sandboxModeEnabled'>;
|
|
681
|
+
|
|
682
|
+
// @public (undocumented)
|
|
683
|
+
export type TransformerTransformSchemaStepContextProvider = TransformerValidationStepContextProvider;
|
|
684
|
+
|
|
685
|
+
// @public (undocumented)
|
|
686
|
+
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'output' | 'providerRegistry' | 'dataSources' | 'featureFlags' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'sandboxModeEnabled' | 'resourceHelper' | 'resolvers' | 'stackManager'>;
|
|
687
|
+
|
|
688
|
+
// @public (undocumented)
|
|
689
|
+
export interface TransformHostProvider {
|
|
690
|
+
// (undocumented)
|
|
691
|
+
addAppSyncFunction: (name: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider, dataSourceName: string, stack?: Stack) => AppSyncFunctionConfigurationProvider;
|
|
692
|
+
// (undocumented)
|
|
693
|
+
addDynamoDbDataSource(name: string, table: ITable, options?: DynamoDbDataSourceOptions, stack?: Stack): DynamoDbDataSource;
|
|
694
|
+
// (undocumented)
|
|
695
|
+
addHttpDataSource(name: string, endpoint: string, options?: DataSourceOptions, stack?: Stack): HttpDataSource;
|
|
696
|
+
// (undocumented)
|
|
697
|
+
addLambdaDataSource(name: string, lambdaFunction: IFunction, options?: DataSourceOptions, stack?: Stack): LambdaDataSource;
|
|
698
|
+
// (undocumented)
|
|
699
|
+
addLambdaFunction: (functionName: string, functionKey: string, handlerName: string, filePath: string, runtime: Runtime, layers?: ILayerVersion[], role?: IRole, environment?: {
|
|
700
|
+
[key: string]: string;
|
|
701
|
+
}, timeout?: Duration, stack?: Stack) => IFunction;
|
|
702
|
+
// (undocumented)
|
|
703
|
+
addNoneDataSource(name: string, options?: DataSourceOptions, stack?: Stack): NoneDataSource;
|
|
704
|
+
// (undocumented)
|
|
705
|
+
addResolver: (typeName: string, fieldName: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider, resolverLogicalId?: string, dataSourceName?: string, pipelineConfig?: string[], stack?: Stack) => CfnResolver;
|
|
706
|
+
// (undocumented)
|
|
707
|
+
addSearchableDataSource(name: string, endpoint: string, region: string, options?: SearchableDataSourceOptions, stack?: Stack): BaseDataSource;
|
|
708
|
+
// (undocumented)
|
|
709
|
+
getDataSource: (name: string) => BaseDataSource | void;
|
|
710
|
+
// (undocumented)
|
|
711
|
+
getResolver: (typeName: string, fieldName: string) => CfnResolver | void;
|
|
712
|
+
// (undocumented)
|
|
713
|
+
hasDataSource: (name: string) => boolean;
|
|
714
|
+
// (undocumented)
|
|
715
|
+
hasResolver: (typeName: string, fieldName: string) => boolean;
|
|
716
|
+
// (undocumented)
|
|
717
|
+
setAPI(api: GraphqlApiBase): void;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// @public (undocumented)
|
|
721
|
+
export interface UserPoolConfig {
|
|
722
|
+
// (undocumented)
|
|
723
|
+
userPoolId: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// Warnings were encountered during analysis:
|
|
727
|
+
//
|
|
728
|
+
// src/graphql-api-provider.ts:38:3 - (ae-forgotten-export) The symbol "OpenIDConnectConfig" needs to be exported by the entry point index.d.ts
|
|
729
|
+
|
|
730
|
+
// (No @packageDocumentation comment for this package)
|
|
731
|
+
|
|
732
|
+
```
|