@aws-amplify/graphql-api-construct 1.18.3-ai-next.0 → 1.18.4
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +548 -176
- package/API.md +17 -0
- package/CHANGELOG.md +5 -1
- package/jest.config.js +5 -0
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +4 -3
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +27 -2
- package/lib/log-config-types.d.ts +78 -0
- package/lib/log-config-types.js +8 -0
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +5 -0
- package/lib/types.js +11 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +15 -54
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +6 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/jest.config.js +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +12 -48
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -49
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-directives/jest.config.js +6 -0
- package/node_modules/@aws-amplify/graphql-directives/package.json +1 -42
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/jest.config.js +9 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +9 -44
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +10 -46
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +13 -49
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +9 -49
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/jest.config.js +5 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +11 -47
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +10 -52
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +10 -49
- package/node_modules/@aws-amplify/graphql-transformer/API.md +2 -0
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +2 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +20 -61
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +27 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js +5 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts +3 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +7 -46
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +12 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -35
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/logConfig.ts +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
- package/node_modules/graphql-mapping-template/jest.config.js +12 -0
- package/node_modules/graphql-mapping-template/package.json +1 -41
- package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -0
- package/node_modules/graphql-transformer-common/jest.config.js +12 -0
- package/node_modules/graphql-transformer-common/package.json +2 -42
- package/package.json +82 -123
- package/src/amplify-graphql-api.ts +2 -0
- package/src/index.ts +35 -0
- package/src/log-config-types.ts +84 -0
- package/src/types.ts +105 -0
package/src/types.ts
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
+
// ############################################################################
|
2
|
+
// Note that sections of this file are excluded from test coverage metrics with
|
3
|
+
// 'c8 ignore' comments. If you add code to this file, suppress non-executable
|
4
|
+
// code from coverage metrics by using a `c8 ignore`. If the code is
|
5
|
+
// executable, you MUST NOT suppress it from coverage metrics.
|
6
|
+
//
|
7
|
+
// `ignore` statements must only span a single block of code. Do not apply an
|
8
|
+
// `ignore` statement to multiple blocks, or the entire file.
|
9
|
+
// ############################################################################
|
10
|
+
|
11
|
+
/* c8 ignore start */
|
1
12
|
import { Duration, CfnResource, NestedStack } from 'aws-cdk-lib';
|
13
|
+
/* c8 ignore stop */
|
14
|
+
|
15
|
+
/* c8 ignore start */
|
2
16
|
import {
|
3
17
|
CfnGraphQLApi,
|
4
18
|
CfnGraphQLSchema,
|
@@ -12,18 +26,45 @@ import {
|
|
12
26
|
Code,
|
13
27
|
FunctionRuntime,
|
14
28
|
} from 'aws-cdk-lib/aws-appsync';
|
29
|
+
/* c8 ignore stop */
|
30
|
+
|
31
|
+
/* c8 ignore start */
|
15
32
|
import { CfnTable, ITable } from 'aws-cdk-lib/aws-dynamodb';
|
33
|
+
/* c8 ignore stop */
|
34
|
+
|
35
|
+
/* c8 ignore start */
|
16
36
|
import { IRole, CfnRole } from 'aws-cdk-lib/aws-iam';
|
37
|
+
/* c8 ignore stop */
|
38
|
+
|
39
|
+
/* c8 ignore start */
|
17
40
|
import { IUserPool } from 'aws-cdk-lib/aws-cognito';
|
41
|
+
/* c8 ignore stop */
|
42
|
+
|
43
|
+
/* c8 ignore start */
|
18
44
|
import { IFunction, CfnFunction } from 'aws-cdk-lib/aws-lambda';
|
45
|
+
/* c8 ignore stop */
|
46
|
+
|
47
|
+
/* c8 ignore start */
|
19
48
|
import { IBucket } from 'aws-cdk-lib/aws-s3';
|
49
|
+
/* c8 ignore stop */
|
50
|
+
|
51
|
+
/* c8 ignore start */
|
20
52
|
import { AmplifyDynamoDbTableWrapper } from './amplify-dynamodb-table-wrapper';
|
53
|
+
/* c8 ignore stop */
|
54
|
+
|
55
|
+
/* c8 ignore start */
|
21
56
|
import { CustomSqlDataSourceStrategy, ModelDataSourceStrategy } from './model-datasource-strategy-types';
|
57
|
+
/* c8 ignore stop */
|
58
|
+
|
59
|
+
/* c8 ignore start */
|
60
|
+
import { Logging } from './log-config-types';
|
61
|
+
/* c8 ignore stop */
|
22
62
|
|
23
63
|
/**
|
24
64
|
* Configuration for IAM Authorization on the Graphql Api.
|
25
65
|
* @struct - required since this interface begins with an 'I'
|
26
66
|
*/
|
67
|
+
/* c8 ignore start */
|
27
68
|
export interface IAMAuthorizationConfig {
|
28
69
|
/**
|
29
70
|
* ID for the Cognito Identity Pool vending auth and unauth roles.
|
@@ -69,11 +110,13 @@ export interface IAMAuthorizationConfig {
|
|
69
110
|
*/
|
70
111
|
readonly enableIamAuthorizationMode?: boolean;
|
71
112
|
}
|
113
|
+
/* c8 ignore stop */
|
72
114
|
|
73
115
|
/**
|
74
116
|
* Configuration for Cognito Identity Pool Authorization on the Graphql Api.
|
75
117
|
* @struct - required since this interface begins with an 'I'
|
76
118
|
*/
|
119
|
+
/* c8 ignore start */
|
77
120
|
export interface IdentityPoolAuthorizationConfig {
|
78
121
|
/**
|
79
122
|
* ID for the Cognito Identity Pool vending auth and unauth roles.
|
@@ -91,20 +134,24 @@ export interface IdentityPoolAuthorizationConfig {
|
|
91
134
|
*/
|
92
135
|
readonly unauthenticatedUserRole: IRole;
|
93
136
|
}
|
137
|
+
/* c8 ignore stop */
|
94
138
|
|
95
139
|
/**
|
96
140
|
* Configuration for Cognito UserPool Authorization on the Graphql Api.
|
97
141
|
*/
|
142
|
+
/* c8 ignore start */
|
98
143
|
export interface UserPoolAuthorizationConfig {
|
99
144
|
/**
|
100
145
|
* The Cognito User Pool which is used to authenticated JWT tokens, and vends group and user information.
|
101
146
|
*/
|
102
147
|
readonly userPool: IUserPool;
|
103
148
|
}
|
149
|
+
/* c8 ignore stop */
|
104
150
|
|
105
151
|
/**
|
106
152
|
* Configuration for OpenId Connect Authorization on the Graphql Api.
|
107
153
|
*/
|
154
|
+
/* c8 ignore start */
|
108
155
|
export interface OIDCAuthorizationConfig {
|
109
156
|
/**
|
110
157
|
* The issuer for the OIDC configuration.
|
@@ -134,10 +181,12 @@ export interface OIDCAuthorizationConfig {
|
|
134
181
|
*/
|
135
182
|
readonly tokenExpiryFromIssue: Duration;
|
136
183
|
}
|
184
|
+
/* c8 ignore stop */
|
137
185
|
|
138
186
|
/**
|
139
187
|
* Configuration for Api Keys on the Graphql Api.
|
140
188
|
*/
|
189
|
+
/* c8 ignore start */
|
141
190
|
export interface ApiKeyAuthorizationConfig {
|
142
191
|
/**
|
143
192
|
* Optional description for the Api Key to attach to the Api.
|
@@ -149,10 +198,12 @@ export interface ApiKeyAuthorizationConfig {
|
|
149
198
|
*/
|
150
199
|
readonly expires: Duration;
|
151
200
|
}
|
201
|
+
/* c8 ignore stop */
|
152
202
|
|
153
203
|
/**
|
154
204
|
* Configuration for Custom Lambda authorization on the Graphql Api.
|
155
205
|
*/
|
206
|
+
/* c8 ignore start */
|
156
207
|
export interface LambdaAuthorizationConfig {
|
157
208
|
/**
|
158
209
|
* The authorizer lambda function.
|
@@ -164,12 +215,14 @@ export interface LambdaAuthorizationConfig {
|
|
164
215
|
*/
|
165
216
|
readonly ttl: Duration;
|
166
217
|
}
|
218
|
+
/* c8 ignore stop */
|
167
219
|
|
168
220
|
/**
|
169
221
|
* Authorization Modes to apply to the Api.
|
170
222
|
* At least one modes must be provided, and if more than one are provided a defaultAuthorizationMode must be specified.
|
171
223
|
* For more information on Amplify Api auth, refer to https://docs.amplify.aws/cli/graphql/authorization-rules/#authorization-strategies
|
172
224
|
*/
|
225
|
+
/* c8 ignore start */
|
173
226
|
export interface AuthorizationModes {
|
174
227
|
/**
|
175
228
|
* Default auth mode to provide to the Api, required if more than one config type is specified.
|
@@ -220,25 +273,31 @@ export interface AuthorizationModes {
|
|
220
273
|
*/
|
221
274
|
readonly adminRoles?: IRole[];
|
222
275
|
}
|
276
|
+
/* c8 ignore stop */
|
223
277
|
|
224
278
|
/**
|
225
279
|
* Whether or not to use a version field to track conflict detection.
|
226
280
|
*/
|
281
|
+
/* c8 ignore start */
|
227
282
|
export type ConflictDetectionType = 'VERSION' | 'NONE';
|
283
|
+
/* c8 ignore stop */
|
228
284
|
|
229
285
|
/**
|
230
286
|
* Common parameters for conflict resolution.
|
231
287
|
*/
|
288
|
+
/* c8 ignore start */
|
232
289
|
export interface ConflictResolutionStrategyBase {
|
233
290
|
/**
|
234
291
|
* The conflict detection type used for resolution.
|
235
292
|
*/
|
236
293
|
readonly detectionType: ConflictDetectionType;
|
237
294
|
}
|
295
|
+
/* c8 ignore stop */
|
238
296
|
|
239
297
|
/**
|
240
298
|
* Enable optimistic concurrency on the project.
|
241
299
|
*/
|
300
|
+
/* c8 ignore start */
|
242
301
|
export interface AutomergeConflictResolutionStrategy extends ConflictResolutionStrategyBase {
|
243
302
|
/**
|
244
303
|
* This conflict resolution strategy executes an auto-merge.
|
@@ -246,10 +305,12 @@ export interface AutomergeConflictResolutionStrategy extends ConflictResolutionS
|
|
246
305
|
*/
|
247
306
|
readonly handlerType: 'AUTOMERGE';
|
248
307
|
}
|
308
|
+
/* c8 ignore stop */
|
249
309
|
|
250
310
|
/**
|
251
311
|
* Enable automerge on the project.
|
252
312
|
*/
|
313
|
+
/* c8 ignore start */
|
253
314
|
export interface OptimisticConflictResolutionStrategy extends ConflictResolutionStrategyBase {
|
254
315
|
/**
|
255
316
|
* This conflict resolution strategy the _version to perform optimistic concurrency.
|
@@ -257,10 +318,12 @@ export interface OptimisticConflictResolutionStrategy extends ConflictResolution
|
|
257
318
|
*/
|
258
319
|
readonly handlerType: 'OPTIMISTIC_CONCURRENCY';
|
259
320
|
}
|
321
|
+
/* c8 ignore stop */
|
260
322
|
|
261
323
|
/**
|
262
324
|
* Enable custom sync on the project, powered by a lambda.
|
263
325
|
*/
|
326
|
+
/* c8 ignore start */
|
264
327
|
export interface CustomConflictResolutionStrategy extends ConflictResolutionStrategyBase {
|
265
328
|
/**
|
266
329
|
* This conflict resolution strategy uses a lambda handler type.
|
@@ -278,20 +341,26 @@ export interface CustomConflictResolutionStrategy extends ConflictResolutionStra
|
|
278
341
|
/**
|
279
342
|
* Conflict Resolution Strategy to apply to the project or a particular model.
|
280
343
|
*/
|
344
|
+
/* c8 ignore start */
|
281
345
|
export type ConflictResolutionStrategy =
|
282
346
|
| AutomergeConflictResolutionStrategy
|
283
347
|
| OptimisticConflictResolutionStrategy
|
284
348
|
| CustomConflictResolutionStrategy;
|
349
|
+
/* c8 ignore stop */
|
285
350
|
|
286
351
|
/**
|
287
352
|
* Project level configuration for conflict resolution.
|
288
353
|
* @deprecated use DataStoreConfiguration instead.
|
289
354
|
*/
|
355
|
+
/* c8 ignore start */
|
356
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
290
357
|
export interface ConflictResolution extends DataStoreConfiguration {}
|
358
|
+
/* c8 ignore stop */
|
291
359
|
|
292
360
|
/**
|
293
361
|
* Project level configuration for DataStore
|
294
362
|
*/
|
363
|
+
/* c8 ignore start */
|
295
364
|
export interface DataStoreConfiguration {
|
296
365
|
/**
|
297
366
|
* Project-wide config for conflict resolution. Applies to all non-overridden models.
|
@@ -303,11 +372,13 @@ export interface DataStoreConfiguration {
|
|
303
372
|
*/
|
304
373
|
readonly models?: Record<string, ConflictResolutionStrategy>;
|
305
374
|
}
|
375
|
+
/* c8 ignore stop */
|
306
376
|
|
307
377
|
/**
|
308
378
|
* Params exposed to support configuring and overriding pipelined slots. This allows configuration of the underlying function,
|
309
379
|
* including the request and response mapping templates.
|
310
380
|
*/
|
381
|
+
/* c8 ignore start */
|
311
382
|
export interface FunctionSlotOverride {
|
312
383
|
/**
|
313
384
|
* Override request mapping template for the function slot. Executed before the datasource is invoked.
|
@@ -319,10 +390,12 @@ export interface FunctionSlotOverride {
|
|
319
390
|
*/
|
320
391
|
readonly responseMappingTemplate?: MappingTemplate;
|
321
392
|
}
|
393
|
+
/* c8 ignore stop */
|
322
394
|
|
323
395
|
/**
|
324
396
|
* Common slot parameters.
|
325
397
|
*/
|
398
|
+
/* c8 ignore start */
|
326
399
|
export interface FunctionSlotBase {
|
327
400
|
/**
|
328
401
|
* The field to attach this function to on the Api definition.
|
@@ -340,10 +413,12 @@ export interface FunctionSlotBase {
|
|
340
413
|
*/
|
341
414
|
readonly function: FunctionSlotOverride;
|
342
415
|
}
|
416
|
+
/* c8 ignore stop */
|
343
417
|
|
344
418
|
/**
|
345
419
|
* Slot types for Mutation Resolvers.
|
346
420
|
*/
|
421
|
+
/* c8 ignore start */
|
347
422
|
export interface MutationFunctionSlot extends FunctionSlotBase {
|
348
423
|
/**
|
349
424
|
* This slot type applies to the Mutation type on the Api definition.
|
@@ -356,10 +431,12 @@ export interface MutationFunctionSlot extends FunctionSlotBase {
|
|
356
431
|
*/
|
357
432
|
readonly slotName: 'init' | 'preAuth' | 'auth' | 'postAuth' | 'preUpdate' | 'postUpdate' | 'finish';
|
358
433
|
}
|
434
|
+
/* c8 ignore stop */
|
359
435
|
|
360
436
|
/**
|
361
437
|
* Slot types for Query Resolvers.
|
362
438
|
*/
|
439
|
+
/* c8 ignore start */
|
363
440
|
export interface QueryFunctionSlot extends FunctionSlotBase {
|
364
441
|
/**
|
365
442
|
* This slot type applies to the Query type on the Api definition.
|
@@ -372,10 +449,12 @@ export interface QueryFunctionSlot extends FunctionSlotBase {
|
|
372
449
|
*/
|
373
450
|
readonly slotName: 'init' | 'preAuth' | 'auth' | 'postAuth' | 'preDataLoad' | 'postDataLoad' | 'finish';
|
374
451
|
}
|
452
|
+
/* c8 ignore stop */
|
375
453
|
|
376
454
|
/**
|
377
455
|
* Slot types for Subscription Resolvers.
|
378
456
|
*/
|
457
|
+
/* c8 ignore start */
|
379
458
|
export interface SubscriptionFunctionSlot extends FunctionSlotBase {
|
380
459
|
/**
|
381
460
|
* This slot type applies to the Subscription type on the Api definition.
|
@@ -388,11 +467,14 @@ export interface SubscriptionFunctionSlot extends FunctionSlotBase {
|
|
388
467
|
*/
|
389
468
|
readonly slotName: 'init' | 'preAuth' | 'auth' | 'postAuth' | 'preSubscribe';
|
390
469
|
}
|
470
|
+
/* c8 ignore stop */
|
391
471
|
|
392
472
|
/**
|
393
473
|
* Input params to uniquely identify the slot which is being overridden.
|
394
474
|
*/
|
475
|
+
/* c8 ignore start */
|
395
476
|
export type FunctionSlot = MutationFunctionSlot | QueryFunctionSlot | SubscriptionFunctionSlot;
|
477
|
+
/* c8 ignore stop */
|
396
478
|
|
397
479
|
/**
|
398
480
|
* Strongly typed set of shared parameters for all transformers, and core layer.
|
@@ -400,6 +482,7 @@ export type FunctionSlot = MutationFunctionSlot | QueryFunctionSlot | Subscripti
|
|
400
482
|
* a single location, and isn't spread around the transformers, where they can
|
401
483
|
* have different default behaviors.
|
402
484
|
*/
|
485
|
+
/* c8 ignore start */
|
403
486
|
export interface TranslationBehavior {
|
404
487
|
/**
|
405
488
|
* Restore parity w/ GQLv1 @model parameter behavior, where setting a single field doesn't implicitly set the other fields to null.
|
@@ -497,10 +580,12 @@ export interface TranslationBehavior {
|
|
497
580
|
*/
|
498
581
|
readonly replaceTableUponGsiUpdate: boolean;
|
499
582
|
}
|
583
|
+
/* c8 ignore stop */
|
500
584
|
|
501
585
|
/**
|
502
586
|
* A utility interface equivalent to Partial<TranslationBehavior>.
|
503
587
|
*/
|
588
|
+
/* c8 ignore start */
|
504
589
|
export interface PartialTranslationBehavior {
|
505
590
|
/**
|
506
591
|
* Restore parity w/ GQLv1 @model parameter behavior, where setting a single field doesn't implicitly set the other fields to null.
|
@@ -615,10 +700,12 @@ export interface PartialTranslationBehavior {
|
|
615
700
|
*/
|
616
701
|
readonly _provisionHotswapFriendlyResources?: boolean;
|
617
702
|
}
|
703
|
+
/* c8 ignore stop */
|
618
704
|
|
619
705
|
/**
|
620
706
|
* Graphql Api definition, which can be implemented in multiple ways.
|
621
707
|
*/
|
708
|
+
/* c8 ignore start */
|
622
709
|
export interface IAmplifyGraphqlDefinition {
|
623
710
|
/**
|
624
711
|
* Return the schema definition as a graphql string, with amplify directives allowed.
|
@@ -652,10 +739,12 @@ export interface IAmplifyGraphqlDefinition {
|
|
652
739
|
*/
|
653
740
|
readonly customSqlDataSourceStrategies?: CustomSqlDataSourceStrategy[];
|
654
741
|
}
|
742
|
+
/* c8 ignore stop */
|
655
743
|
|
656
744
|
/**
|
657
745
|
* Entry representing the required output from the backend for codegen generate commands to work.
|
658
746
|
*/
|
747
|
+
/* c8 ignore start */
|
659
748
|
export interface IBackendOutputEntry {
|
660
749
|
/**
|
661
750
|
* The protocol version for this backend output.
|
@@ -667,10 +756,12 @@ export interface IBackendOutputEntry {
|
|
667
756
|
*/
|
668
757
|
readonly payload: Record<string, string>;
|
669
758
|
}
|
759
|
+
/* c8 ignore stop */
|
670
760
|
|
671
761
|
/**
|
672
762
|
* Backend output strategy used to write config required for codegen tasks.
|
673
763
|
*/
|
764
|
+
/* c8 ignore start */
|
674
765
|
export interface IBackendOutputStorageStrategy {
|
675
766
|
/**
|
676
767
|
* Add an entry to backend output.
|
@@ -680,11 +771,13 @@ export interface IBackendOutputStorageStrategy {
|
|
680
771
|
// eslint-disable-next-line @typescript-eslint/method-signature-style
|
681
772
|
addBackendOutputEntry(keyName: string, backendOutputEntry: IBackendOutputEntry): void;
|
682
773
|
}
|
774
|
+
/* c8 ignore stop */
|
683
775
|
|
684
776
|
/**
|
685
777
|
* Input props for the AmplifyGraphqlApi construct. Specifies what the input to transform into an Api, and configurations for
|
686
778
|
* the transformation process.
|
687
779
|
*/
|
780
|
+
/* c8 ignore start */
|
688
781
|
export interface AmplifyGraphqlApiProps {
|
689
782
|
/**
|
690
783
|
* The definition to transform in a full Api.
|
@@ -762,12 +855,19 @@ export interface AmplifyGraphqlApiProps {
|
|
762
855
|
* For more information, refer to https://docs.amplify.aws/lib/datastore/getting-started/q/platform/js/
|
763
856
|
*/
|
764
857
|
readonly dataStoreConfiguration?: DataStoreConfiguration;
|
858
|
+
|
859
|
+
/**
|
860
|
+
* Specifies the logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.
|
861
|
+
*/
|
862
|
+
readonly logging?: Logging;
|
765
863
|
}
|
864
|
+
/* c8 ignore stop */
|
766
865
|
|
767
866
|
/**
|
768
867
|
* L1 CDK resources from the Api which were generated as part of the transform.
|
769
868
|
* These are potentially stored under nested stacks, but presented organized by type instead.
|
770
869
|
*/
|
870
|
+
/* c8 ignore start */
|
771
871
|
export interface AmplifyGraphqlApiCfnResources {
|
772
872
|
/**
|
773
873
|
* The Generated AppSync Api L1 Resource
|
@@ -824,11 +924,13 @@ export interface AmplifyGraphqlApiCfnResources {
|
|
824
924
|
*/
|
825
925
|
readonly additionalCfnResources: Record<string, CfnResource>;
|
826
926
|
}
|
927
|
+
/* c8 ignore stop */
|
827
928
|
|
828
929
|
/**
|
829
930
|
* Accessible resources from the Api which were generated as part of the transform.
|
830
931
|
* These are potentially stored under nested stacks, but presented organized by type instead.
|
831
932
|
*/
|
933
|
+
/* c8 ignore start */
|
832
934
|
export interface AmplifyGraphqlApiResources {
|
833
935
|
/**
|
834
936
|
* The Generated AppSync Api L2 Resource, includes the Schema.
|
@@ -860,11 +962,13 @@ export interface AmplifyGraphqlApiResources {
|
|
860
962
|
*/
|
861
963
|
readonly nestedStacks: Record<string, NestedStack>;
|
862
964
|
}
|
965
|
+
/* c8 ignore stop */
|
863
966
|
|
864
967
|
/**
|
865
968
|
* Input type properties when adding a new appsync.AppsyncFunction to the generated API.
|
866
969
|
* This is equivalent to the Omit<appsync.AppsyncFunctionProps, 'api'>.
|
867
970
|
*/
|
971
|
+
/* c8 ignore start */
|
868
972
|
export interface AddFunctionProps {
|
869
973
|
/**
|
870
974
|
* the data source linked to this AppSync Function
|
@@ -911,3 +1015,4 @@ export interface AddFunctionProps {
|
|
911
1015
|
*/
|
912
1016
|
readonly code?: Code;
|
913
1017
|
}
|
1018
|
+
/* c8 ignore stop */
|