@aws-amplify/graphql-api-construct 1.8.0 → 1.9.0-0411-gen2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +313 -200
- package/API.md +16 -3
- package/CHANGELOG.md +7 -0
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +3 -2
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/internal/authorization-modes.d.ts +12 -1
- package/lib/internal/authorization-modes.js +47 -7
- package/lib/internal/codegen-assets.js +10 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +51 -5
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +3 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +34 -22
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js +22 -11
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +11 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js +10 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js +12 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js +20 -10
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts +9 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js +16 -9
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +5 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js +5 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js +5 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js +15 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js +5 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js +8 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts +3 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js +27 -16
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js +5 -5
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js +3 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +13 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +3 -2
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js +19 -10
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js +13 -2
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -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 +11 -11
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +3 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js +2 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +29 -16
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js +11 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js.map +1 -1
- 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/lib/resolvers/common.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js +18 -9
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +3 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js +35 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +8 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +19 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +6 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +6 -9
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +5 -6
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +6 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +44 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +18 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +44 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts +4 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +18 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts +3 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js +7 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js +213 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts +3 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js +142 -17
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js +20 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +14 -3
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +17 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer/package.json +15 -15
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -5
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -0
- package/node_modules/graphql-transformer-common/package.json +2 -2
- package/package.json +19 -19
- package/src/amplify-graphql-api.ts +2 -0
- package/src/index.ts +1 -0
- package/src/internal/authorization-modes.ts +57 -8
- package/src/internal/codegen-assets.ts +11 -2
- package/src/types.ts +56 -5
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [4.30.1-0411-gen2.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.30.0...graphql-transformer-common@4.30.1-0411-gen2.0) (2024-04-11)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package graphql-transformer-common
|
9
|
+
|
6
10
|
# [4.30.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.29.0...graphql-transformer-common@4.30.0) (2024-04-11)
|
7
11
|
|
8
12
|
### Bug Fixes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "graphql-transformer-common",
|
3
|
-
"version": "4.30.0",
|
3
|
+
"version": "4.30.1-0411-gen2.0",
|
4
4
|
"description": "Common code and constants for AppSync Transformers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -66,5 +66,5 @@
|
|
66
66
|
"/__tests__/"
|
67
67
|
]
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "b0c2902888a00f94d789a3b42619f5f9f4bb5a39"
|
70
70
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-api-construct",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.9.0-0411-gen2.0",
|
4
4
|
"description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -76,21 +76,21 @@
|
|
76
76
|
"dependencies": {
|
77
77
|
"@aws-amplify/backend-output-schemas": "^0.4.0",
|
78
78
|
"@aws-amplify/backend-output-storage": "^0.2.2",
|
79
|
-
"@aws-amplify/graphql-auth-transformer": "3.
|
80
|
-
"@aws-amplify/graphql-default-value-transformer": "2.3.
|
81
|
-
"@aws-amplify/graphql-directives": "1.0.
|
82
|
-
"@aws-amplify/graphql-function-transformer": "2.1.
|
83
|
-
"@aws-amplify/graphql-http-transformer": "2.1.
|
84
|
-
"@aws-amplify/graphql-index-transformer": "2.
|
85
|
-
"@aws-amplify/graphql-maps-to-transformer": "3.4.
|
86
|
-
"@aws-amplify/graphql-model-transformer": "2.
|
87
|
-
"@aws-amplify/graphql-predictions-transformer": "2.1.
|
88
|
-
"@aws-amplify/graphql-relational-transformer": "2.
|
89
|
-
"@aws-amplify/graphql-searchable-transformer": "2.
|
90
|
-
"@aws-amplify/graphql-sql-transformer": "0.
|
91
|
-
"@aws-amplify/graphql-transformer": "1.5.0",
|
92
|
-
"@aws-amplify/graphql-transformer-core": "2.6.0",
|
93
|
-
"@aws-amplify/graphql-transformer-interfaces": "3.
|
79
|
+
"@aws-amplify/graphql-auth-transformer": "3.5.0-0411-gen2.0",
|
80
|
+
"@aws-amplify/graphql-default-value-transformer": "2.3.4-0411-gen2.0",
|
81
|
+
"@aws-amplify/graphql-directives": "1.1.0-0411-gen2.0",
|
82
|
+
"@aws-amplify/graphql-function-transformer": "2.1.21-0411-gen2.0",
|
83
|
+
"@aws-amplify/graphql-http-transformer": "2.1.21-0411-gen2.0",
|
84
|
+
"@aws-amplify/graphql-index-transformer": "2.4.0-0411-gen2.0",
|
85
|
+
"@aws-amplify/graphql-maps-to-transformer": "3.4.11-0411-gen2.0",
|
86
|
+
"@aws-amplify/graphql-model-transformer": "2.9.0-0411-gen2.0",
|
87
|
+
"@aws-amplify/graphql-predictions-transformer": "2.1.21-0411-gen2.0",
|
88
|
+
"@aws-amplify/graphql-relational-transformer": "2.5.0-0411-gen2.0",
|
89
|
+
"@aws-amplify/graphql-searchable-transformer": "2.7.0-0411-gen2.0",
|
90
|
+
"@aws-amplify/graphql-sql-transformer": "0.3.0-0411-gen2.0",
|
91
|
+
"@aws-amplify/graphql-transformer": "1.5.1-0411-gen2.0",
|
92
|
+
"@aws-amplify/graphql-transformer-core": "2.6.1-0411-gen2.0",
|
93
|
+
"@aws-amplify/graphql-transformer-interfaces": "3.7.0-0411-gen2.0",
|
94
94
|
"@aws-amplify/platform-core": "^0.2.0",
|
95
95
|
"@aws-amplify/plugin-types": "^0.4.1",
|
96
96
|
"charenc": "^0.0.2",
|
@@ -99,7 +99,7 @@
|
|
99
99
|
"graceful-fs": "^4.2.11",
|
100
100
|
"graphql": "^15.5.0",
|
101
101
|
"graphql-mapping-template": "4.20.15",
|
102
|
-
"graphql-transformer-common": "4.30.0",
|
102
|
+
"graphql-transformer-common": "4.30.1-0411-gen2.0",
|
103
103
|
"hjson": "^3.2.2",
|
104
104
|
"immer": "^9.0.12",
|
105
105
|
"is-buffer": "^2.0.5",
|
@@ -114,7 +114,7 @@
|
|
114
114
|
"zod": "^3.22.3"
|
115
115
|
},
|
116
116
|
"devDependencies": {
|
117
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.5.0",
|
117
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.5.1-0411-gen2.0",
|
118
118
|
"@types/fs-extra": "^8.0.1",
|
119
119
|
"@types/node": "^12.12.6",
|
120
120
|
"aws-cdk-lib": "2.80.0",
|
@@ -179,5 +179,5 @@
|
|
179
179
|
"/__tests__/"
|
180
180
|
]
|
181
181
|
},
|
182
|
-
"gitHead": "
|
182
|
+
"gitHead": "b0c2902888a00f94d789a3b42619f5f9f4bb5a39"
|
183
183
|
}
|
@@ -48,6 +48,7 @@ import {
|
|
48
48
|
getGeneratedFunctionSlots,
|
49
49
|
CodegenAssets,
|
50
50
|
getAdditionalAuthenticationTypes,
|
51
|
+
validateAuthorizationModes,
|
51
52
|
} from './internal';
|
52
53
|
import { getStackForScope, walkAndProcessNodes } from './internal/construct-tree';
|
53
54
|
import { getDataSourceStrategiesProvider } from './internal/data-source-config';
|
@@ -169,6 +170,7 @@ export class AmplifyGraphqlApi extends Construct {
|
|
169
170
|
dataSources,
|
170
171
|
});
|
171
172
|
|
173
|
+
validateAuthorizationModes(authorizationModes);
|
172
174
|
const { authConfig, authSynthParameters } = convertAuthorizationModesToTransformerAuthConfig(authorizationModes);
|
173
175
|
|
174
176
|
validateFunctionSlots(functionSlots ?? []);
|
package/src/index.ts
CHANGED
@@ -5,19 +5,61 @@ import { IRole, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
|
|
5
5
|
import {
|
6
6
|
AuthorizationModes,
|
7
7
|
ApiKeyAuthorizationConfig,
|
8
|
-
IAMAuthorizationConfig,
|
9
8
|
LambdaAuthorizationConfig,
|
10
9
|
OIDCAuthorizationConfig,
|
11
10
|
UserPoolAuthorizationConfig,
|
12
11
|
} from '../types';
|
13
12
|
|
14
13
|
type AuthorizationConfigMode =
|
15
|
-
|
|
14
|
+
| { type: 'AWS_IAM' }
|
16
15
|
| (UserPoolAuthorizationConfig & { type: 'AMAZON_COGNITO_USER_POOLS' })
|
17
16
|
| (OIDCAuthorizationConfig & { type: 'OPENID_CONNECT' })
|
18
17
|
| (ApiKeyAuthorizationConfig & { type: 'API_KEY' })
|
19
18
|
| (LambdaAuthorizationConfig & { type: 'AWS_LAMBDA' });
|
20
19
|
|
20
|
+
/**
|
21
|
+
* Validates authorization modes.
|
22
|
+
*
|
23
|
+
* Rules:
|
24
|
+
* 1. Validates that deprecated settings ('iamConfig.authenticatedUserRole', 'iamConfig.unauthenticatedUserRole',
|
25
|
+
* 'iamConfig.identityPoolId', 'iamConfig.allowListedRoles' and 'adminRoles') are mutually exclusive with new settings that
|
26
|
+
* replaced them ('iamConfig.enableIamAuthorizationMode' and any of 'authorizationModes.identityPoolConfig')
|
27
|
+
* 2. If deprecated identity pool settings are used ('iamConfig.authenticatedUserRole', 'iamConfig.unauthenticatedUserRole',
|
28
|
+
* and 'iamConfig.identityPoolId') validate that all are provided.
|
29
|
+
*/
|
30
|
+
export const validateAuthorizationModes = (authorizationModes: AuthorizationModes): void => {
|
31
|
+
const hasAnyDeprecatedIdentityPoolSetting =
|
32
|
+
authorizationModes.iamConfig?.authenticatedUserRole ||
|
33
|
+
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
34
|
+
authorizationModes.iamConfig?.identityPoolId;
|
35
|
+
const hasAllDeprecatedIdentityPoolSettings =
|
36
|
+
authorizationModes.iamConfig?.authenticatedUserRole &&
|
37
|
+
authorizationModes.iamConfig?.unauthenticatedUserRole &&
|
38
|
+
authorizationModes.iamConfig?.identityPoolId;
|
39
|
+
const hasDeprecatedIamSettings =
|
40
|
+
authorizationModes.iamConfig?.authenticatedUserRole ||
|
41
|
+
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
42
|
+
authorizationModes.iamConfig?.identityPoolId ||
|
43
|
+
authorizationModes.iamConfig?.allowListedRoles ||
|
44
|
+
authorizationModes.adminRoles;
|
45
|
+
const hasUnDeprecatedIamSettings =
|
46
|
+
typeof authorizationModes.iamConfig?.enableIamAuthorizationMode !== 'undefined' || authorizationModes.identityPoolConfig;
|
47
|
+
|
48
|
+
if (hasDeprecatedIamSettings && hasUnDeprecatedIamSettings) {
|
49
|
+
throw new Error(
|
50
|
+
'Invalid authorization modes configuration provided. ' +
|
51
|
+
"Deprecated IAM configuration cannot be used with identity pool configuration or when 'enableIamAuthorizationMode' is specified.",
|
52
|
+
);
|
53
|
+
}
|
54
|
+
|
55
|
+
if (hasAnyDeprecatedIdentityPoolSetting && !hasAllDeprecatedIdentityPoolSettings) {
|
56
|
+
throw new Error(
|
57
|
+
"'authorizationModes.iamConfig.authenticatedUserRole', 'authorizationModes.iamConfig.unauthenticatedUserRole' and" +
|
58
|
+
" 'authorizationModes.iamConfig.identityPoolId' must be provided.",
|
59
|
+
);
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
21
63
|
/**
|
22
64
|
* Converts a single auth mode config into the amplify-internal representation.
|
23
65
|
* @param authMode the auth mode to convert into the Appsync CDK representation.
|
@@ -79,7 +121,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
|
|
79
121
|
authModes.lambdaConfig ? { type: 'AWS_LAMBDA', ...authModes.lambdaConfig } : null,
|
80
122
|
authModes.oidcConfig ? { type: 'OPENID_CONNECT', ...authModes.oidcConfig } : null,
|
81
123
|
authModes.userPoolConfig ? { type: 'AMAZON_COGNITO_USER_POOLS', ...authModes.userPoolConfig } : null,
|
82
|
-
authModes.iamConfig ? { type: 'AWS_IAM'
|
124
|
+
authModes.iamConfig || authModes.identityPoolConfig ? { type: 'AWS_IAM' } : null,
|
83
125
|
].filter((mode) => mode) as AuthorizationConfigMode[];
|
84
126
|
const authProviders = authConfig.map(convertAuthModeToAuthProvider);
|
85
127
|
|
@@ -116,7 +158,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
|
|
116
158
|
|
117
159
|
type AuthSynthParameters = Pick<
|
118
160
|
SynthParameters,
|
119
|
-
'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles'
|
161
|
+
'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles' | 'enableIamAccess'
|
120
162
|
>;
|
121
163
|
|
122
164
|
interface AuthConfig {
|
@@ -177,12 +219,19 @@ const getAllowListedRoles = (authModes: AuthorizationModes): string[] =>
|
|
177
219
|
*/
|
178
220
|
const getSynthParameters = (authModes: AuthorizationModes): AuthSynthParameters => ({
|
179
221
|
adminRoles: getAllowListedRoles(authModes),
|
180
|
-
identityPoolId: authModes.iamConfig?.identityPoolId,
|
222
|
+
identityPoolId: authModes.identityPoolConfig?.identityPoolId ?? authModes.iamConfig?.identityPoolId,
|
223
|
+
enableIamAccess: authModes.iamConfig?.enableIamAuthorizationMode,
|
181
224
|
...(authModes.userPoolConfig ? { userPoolId: authModes.userPoolConfig.userPool.userPoolId } : {}),
|
182
|
-
...(authModes?.
|
225
|
+
...(authModes?.identityPoolConfig
|
226
|
+
? {
|
227
|
+
authenticatedUserRoleName: authModes.identityPoolConfig.authenticatedUserRole.roleName,
|
228
|
+
unauthenticatedUserRoleName: authModes.identityPoolConfig.unauthenticatedUserRole.roleName,
|
229
|
+
}
|
230
|
+
: {}),
|
231
|
+
...(authModes?.iamConfig && authModes?.iamConfig.authenticatedUserRole && authModes?.iamConfig.unauthenticatedUserRole
|
183
232
|
? {
|
184
|
-
authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole
|
185
|
-
unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole
|
233
|
+
authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole?.roleName,
|
234
|
+
unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole?.roleName,
|
186
235
|
}
|
187
236
|
: {}),
|
188
237
|
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { RemovalPolicy } from 'aws-cdk-lib';
|
2
|
-
import { Bucket, IBucket } from 'aws-cdk-lib/aws-s3';
|
1
|
+
import { RemovalPolicy, Fn } from 'aws-cdk-lib';
|
2
|
+
import { Bucket, HttpMethods, IBucket } from 'aws-cdk-lib/aws-s3';
|
3
3
|
import { BucketDeployment, Source } from 'aws-cdk-lib/aws-s3-deployment';
|
4
4
|
import { Construct } from 'constructs';
|
5
5
|
|
@@ -8,6 +8,7 @@ export type CodegenAssetsProps = {
|
|
8
8
|
};
|
9
9
|
|
10
10
|
const MODEL_SCHEMA_KEY = 'model-schema.graphql';
|
11
|
+
const CONSOLE_SERVICE_ENDPOINT = Fn.join('', ['https://', Fn.ref('AWS::Region'), '.console.aws.amazon.com/amplify']);
|
11
12
|
|
12
13
|
/**
|
13
14
|
* Construct an S3 URI string for a given bucket and key.
|
@@ -30,6 +31,14 @@ export class CodegenAssets extends Construct {
|
|
30
31
|
const bucket = new Bucket(this, `${id}Bucket`, {
|
31
32
|
removalPolicy: RemovalPolicy.DESTROY,
|
32
33
|
autoDeleteObjects: true,
|
34
|
+
// Enabling CORS to allow console to access the codegen assets.
|
35
|
+
cors: [
|
36
|
+
{
|
37
|
+
allowedMethods: [HttpMethods.GET, HttpMethods.HEAD],
|
38
|
+
allowedHeaders: ['*'],
|
39
|
+
allowedOrigins: [CONSOLE_SERVICE_ENDPOINT],
|
40
|
+
},
|
41
|
+
],
|
33
42
|
});
|
34
43
|
|
35
44
|
const deployment = new BucketDeployment(this, `${id}Deployment`, {
|
package/src/types.ts
CHANGED
@@ -28,25 +28,68 @@ export interface IAMAuthorizationConfig {
|
|
28
28
|
/**
|
29
29
|
* ID for the Cognito Identity Pool vending auth and unauth roles.
|
30
30
|
* Format: `<region>:<id string>`
|
31
|
+
*
|
32
|
+
* @deprecated Use 'IdentityPoolAuthorizationConfig.identityPoolId' instead.
|
33
|
+
* See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
|
31
34
|
*/
|
32
|
-
readonly identityPoolId
|
35
|
+
readonly identityPoolId?: string;
|
33
36
|
|
34
37
|
/**
|
35
38
|
* Authenticated user role, applies to { provider: iam, allow: private } access.
|
39
|
+
*
|
40
|
+
* @deprecated Use 'IdentityPoolAuthorizationConfig.authenticatedUserRole' instead.
|
41
|
+
* See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
|
36
42
|
*/
|
37
|
-
readonly authenticatedUserRole
|
43
|
+
readonly authenticatedUserRole?: IRole;
|
38
44
|
|
39
45
|
/**
|
40
46
|
* Unauthenticated user role, applies to { provider: iam, allow: public } access.
|
47
|
+
*
|
48
|
+
* @deprecated Use 'IdentityPoolAuthorizationConfig.unauthenticatedUserRole' instead.
|
49
|
+
* See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
|
41
50
|
*/
|
42
|
-
readonly unauthenticatedUserRole
|
51
|
+
readonly unauthenticatedUserRole?: IRole;
|
43
52
|
|
44
53
|
/**
|
45
54
|
* A list of IAM roles which will be granted full read/write access to the generated model if IAM auth is enabled.
|
46
55
|
* If an IRole is provided, the role `name` will be used for matching.
|
47
56
|
* If a string is provided, the raw value will be used for matching.
|
57
|
+
*
|
58
|
+
* @deprecated Use 'enableIamAuthorizationMode' and IAM Policy to control access for IAM principals.
|
59
|
+
* See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
|
48
60
|
*/
|
49
61
|
readonly allowListedRoles?: (IRole | string)[];
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Enables access for IAM principals. If enabled @auth directive rules are not applied.
|
65
|
+
* Instead, access should be defined by IAM Policy, see https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappsync.html.
|
66
|
+
*
|
67
|
+
* Does not apply to authenticated and unauthenticated IAM Roles attached to Cognito Identity Pool.
|
68
|
+
* Use IdentityPoolAuthorizationConfig to configure their access.
|
69
|
+
*/
|
70
|
+
readonly enableIamAuthorizationMode?: boolean;
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Configuration for Cognito Identity Pool Authorization on the Graphql Api.
|
75
|
+
* @struct - required since this interface begins with an 'I'
|
76
|
+
*/
|
77
|
+
export interface IdentityPoolAuthorizationConfig {
|
78
|
+
/**
|
79
|
+
* ID for the Cognito Identity Pool vending auth and unauth roles.
|
80
|
+
* Format: `<region>:<id string>`
|
81
|
+
*/
|
82
|
+
readonly identityPoolId: string;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Authenticated user role, applies to { provider: iam, allow: private } access.
|
86
|
+
*/
|
87
|
+
readonly authenticatedUserRole: IRole;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Unauthenticated user role, applies to { provider: iam, allow: public } access.
|
91
|
+
*/
|
92
|
+
readonly unauthenticatedUserRole: IRole;
|
50
93
|
}
|
51
94
|
|
52
95
|
/**
|
@@ -134,11 +177,19 @@ export interface AuthorizationModes {
|
|
134
177
|
readonly defaultAuthorizationMode?: 'AWS_IAM' | 'AMAZON_COGNITO_USER_POOLS' | 'OPENID_CONNECT' | 'API_KEY' | 'AWS_LAMBDA';
|
135
178
|
|
136
179
|
/**
|
137
|
-
* IAM Auth config, required
|
138
|
-
*
|
180
|
+
* IAM Auth config, required to allow IAM-based access to this API.
|
181
|
+
* This applies to any IAM principal except Amazon Cognito identity pool's authenticated and unauthenticated roles.
|
182
|
+
* This behavior was has recently been improved.
|
183
|
+
* See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
|
139
184
|
*/
|
140
185
|
readonly iamConfig?: IAMAuthorizationConfig;
|
141
186
|
|
187
|
+
/**
|
188
|
+
* Cognito Identity Pool config, required if an 'identityPool' auth provider is specified in the Api.
|
189
|
+
* Applies to 'public' and 'private' auth strategies.
|
190
|
+
*/
|
191
|
+
readonly identityPoolConfig?: IdentityPoolAuthorizationConfig;
|
192
|
+
|
142
193
|
/**
|
143
194
|
* Cognito UserPool config, required if a 'userPools' auth provider is specified in the Api.
|
144
195
|
* Applies to 'owner', 'private', and 'group' auth strategies.
|