@aws-amplify/graphql-api-construct 1.7.0-iam-auth-with-identityPool-provider-1.0 → 1.7.0
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/.jsii +330 -331
- package/API.md +16 -17
- package/CHANGELOG.md +2 -2
- package/README.md +75 -17
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +2 -3
- 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 +1 -2
- package/lib/internal/authorization-modes.js +7 -37
- package/lib/internal/data-source-config.js +37 -4
- package/lib/model-datasource-strategy-types.d.ts +25 -1
- package/lib/model-datasource-strategy-types.js +1 -1
- package/lib/sql-model-datasource-strategy.d.ts +13 -1
- package/lib/sql-model-datasource-strategy.js +26 -4
- package/lib/types.d.ts +5 -51
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +2 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +2 -4
- 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 +21 -33
- 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 +0 -1
- 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 -3
- 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 +2 -39
- 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 +1 -2
- 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 +11 -22
- 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 +4 -11
- 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 +0 -1
- 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 +1 -10
- 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/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 +7 -14
- 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 +1 -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 +3 -14
- 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/mutation.create.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +1 -1
- 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 +2 -3
- 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 +14 -34
- 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 +14 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js +2 -5
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-directives/API.md +158 -0
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-directives/Readme.md +19 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js +18 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +49 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js +16 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js +28 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +21 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +54 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js +16 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js +43 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js +20 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js +85 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js +21 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js +28 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts +10 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js +22 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js +14 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js +43 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js +20 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js +17 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js +60 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/package.json +66 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js +2 -4
- package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js +2 -15
- package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js +5 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js +4 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +1 -1
- 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/lib/graphql-maps-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js +6 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js +9 -12
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +12 -11
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +0 -2
- 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 +1 -9
- 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 +0 -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 +19 -73
- 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 +7 -11
- 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 +7 -15
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +5 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +71 -26
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.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/lib/resources/rds-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +21 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +2 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js +1 -10
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +34 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +27 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +16 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts +11 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js +3 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js.map +1 -0
- 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 +15 -49
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +18 -45
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +13 -35
- 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.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +13 -17
- 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 +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +32 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +27 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +16 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +31 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +27 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +16 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +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 +2 -6
- 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 +9 -8
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +1 -1
- 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 +2 -4
- 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 +9 -8
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -2
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +16 -16
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +3 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js +11 -12
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +8 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +27 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +12 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js +22 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +0 -1
- 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/package.json +2 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +76 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +0 -4
- package/node_modules/graphql-mapping-template/package.json +2 -3
- package/node_modules/graphql-transformer-common/API.md +13 -0
- package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -2
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +13 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +13 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +3 -3
- package/package.json +21 -19
- package/src/amplify-graphql-api.ts +0 -2
- package/src/index.ts +0 -1
- package/src/internal/authorization-modes.ts +8 -47
- package/src/internal/data-source-config.ts +42 -9
- package/src/model-datasource-strategy-types.ts +33 -1
- package/src/sql-model-datasource-strategy.ts +32 -1
- package/src/types.ts +5 -56
- /package/node_modules/{graphql-mapping-template → @aws-amplify/graphql-directives}/LICENSE +0 -0
|
@@ -3,10 +3,6 @@
|
|
|
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.20.16-iam-auth-with-identityPool-provider-1.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.15...graphql-mapping-template@4.20.16-iam-auth-with-identityPool-provider-1.0) (2024-03-15)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package graphql-mapping-template
|
|
9
|
-
|
|
10
6
|
## [4.20.15](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.14...graphql-mapping-template@4.20.15) (2024-02-28)
|
|
11
7
|
|
|
12
8
|
**Note:** Version bump only for package graphql-mapping-template
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-mapping-template",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.15",
|
|
4
4
|
"description": "An AST wrapper around AWS AppSync resolvers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,6 +57,5 @@
|
|
|
57
57
|
"coveragePathIgnorePatterns": [
|
|
58
58
|
"/__tests__/"
|
|
59
59
|
]
|
|
60
|
-
}
|
|
61
|
-
"gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a"
|
|
60
|
+
}
|
|
62
61
|
}
|
|
@@ -503,6 +503,8 @@ export const transformedArgsRef: ReferenceNode;
|
|
|
503
503
|
// @public (undocumented)
|
|
504
504
|
export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
505
505
|
SCHEMA_PACKAGE: string;
|
|
506
|
+
SCHEMA_PACKAGE_INTERNALS: string;
|
|
507
|
+
BACKEND_PACKAGE: string;
|
|
506
508
|
MODEL_METHOD: string;
|
|
507
509
|
SCHEMA_METHOD: string;
|
|
508
510
|
IDENTIFIER_METHOD: string;
|
|
@@ -512,6 +514,17 @@ export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
|
512
514
|
ENUM_METHOD: string;
|
|
513
515
|
REFERENCE_A: string;
|
|
514
516
|
EXPORT_VARIABLE_NAME: string;
|
|
517
|
+
INTERNALS_CONFIGURE_METHOD: string;
|
|
518
|
+
BACKEND_SECRET_METHOD: string;
|
|
519
|
+
PROPERTY_VPC: string;
|
|
520
|
+
PROPERTY_VPC_ID: string;
|
|
521
|
+
PROPERTY_SECURITY_GROUP_IDS: string;
|
|
522
|
+
PROPERTY_AZ_CONFIG: string;
|
|
523
|
+
PROPERTY_SUBNET_ID: string;
|
|
524
|
+
PROPERTY_AZ: string;
|
|
525
|
+
PROPERTY_DATABASE: string;
|
|
526
|
+
PROPERTY_CONNECTION_URI: string;
|
|
527
|
+
PROPERTY_ENGINE: string;
|
|
515
528
|
};
|
|
516
529
|
|
|
517
530
|
// @public (undocumented)
|
|
@@ -3,9 +3,11 @@
|
|
|
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
|
-
|
|
6
|
+
# [4.29.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.1...graphql-transformer-common@4.29.0) (2024-03-28)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **api:** auto detect vpc configuration on generate typescript database schema ([#2376](https://github.com/aws-amplify/amplify-category-api/issues/2376)) ([ef6f53c](https://github.com/aws-amplify/amplify-category-api/commit/ef6f53c04bbcc50921bf20a937d1332d4597a3fa))
|
|
9
11
|
|
|
10
12
|
## [4.28.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.0...graphql-transformer-common@4.28.1) (2024-02-28)
|
|
11
13
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
2
2
|
SCHEMA_PACKAGE: string;
|
|
3
|
+
SCHEMA_PACKAGE_INTERNALS: string;
|
|
4
|
+
BACKEND_PACKAGE: string;
|
|
3
5
|
MODEL_METHOD: string;
|
|
4
6
|
SCHEMA_METHOD: string;
|
|
5
7
|
IDENTIFIER_METHOD: string;
|
|
@@ -9,5 +11,16 @@ export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
|
|
|
9
11
|
ENUM_METHOD: string;
|
|
10
12
|
REFERENCE_A: string;
|
|
11
13
|
EXPORT_VARIABLE_NAME: string;
|
|
14
|
+
INTERNALS_CONFIGURE_METHOD: string;
|
|
15
|
+
BACKEND_SECRET_METHOD: string;
|
|
16
|
+
PROPERTY_VPC: string;
|
|
17
|
+
PROPERTY_VPC_ID: string;
|
|
18
|
+
PROPERTY_SECURITY_GROUP_IDS: string;
|
|
19
|
+
PROPERTY_AZ_CONFIG: string;
|
|
20
|
+
PROPERTY_SUBNET_ID: string;
|
|
21
|
+
PROPERTY_AZ: string;
|
|
22
|
+
PROPERTY_DATABASE: string;
|
|
23
|
+
PROPERTY_CONNECTION_URI: string;
|
|
24
|
+
PROPERTY_ENGINE: string;
|
|
12
25
|
};
|
|
13
26
|
//# sourceMappingURL=TypescriptSchemaConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;CAwB5C,CAAC"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = void 0;
|
|
4
4
|
exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
|
|
5
5
|
SCHEMA_PACKAGE: '@aws-amplify/data-schema',
|
|
6
|
+
SCHEMA_PACKAGE_INTERNALS: '@aws-amplify/data-schema/internals',
|
|
7
|
+
BACKEND_PACKAGE: '@aws-amplify/backend',
|
|
6
8
|
MODEL_METHOD: 'model',
|
|
7
9
|
SCHEMA_METHOD: 'schema',
|
|
8
10
|
IDENTIFIER_METHOD: 'identifier',
|
|
@@ -12,5 +14,16 @@ exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
|
|
|
12
14
|
ENUM_METHOD: 'enum',
|
|
13
15
|
REFERENCE_A: 'a',
|
|
14
16
|
EXPORT_VARIABLE_NAME: 'schema',
|
|
17
|
+
INTERNALS_CONFIGURE_METHOD: 'configure',
|
|
18
|
+
BACKEND_SECRET_METHOD: 'secret',
|
|
19
|
+
PROPERTY_VPC: 'vpcConfig',
|
|
20
|
+
PROPERTY_VPC_ID: 'vpcId',
|
|
21
|
+
PROPERTY_SECURITY_GROUP_IDS: 'securityGroupIds',
|
|
22
|
+
PROPERTY_AZ_CONFIG: 'subnetAvailabilityZones',
|
|
23
|
+
PROPERTY_SUBNET_ID: 'subnetId',
|
|
24
|
+
PROPERTY_AZ: 'availabilityZone',
|
|
25
|
+
PROPERTY_DATABASE: 'database',
|
|
26
|
+
PROPERTY_CONNECTION_URI: 'connectionUri',
|
|
27
|
+
PROPERTY_ENGINE: 'engine',
|
|
15
28
|
};
|
|
16
29
|
//# sourceMappingURL=TypescriptSchemaConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,wBAAwB,EAAE,oCAAoC;IAC9D,eAAe,EAAE,sBAAsB;IACvC,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;IAC9B,0BAA0B,EAAE,WAAW;IACvC,qBAAqB,EAAE,QAAQ;IAC/B,YAAY,EAAE,WAAW;IACzB,eAAe,EAAE,OAAO;IACxB,2BAA2B,EAAE,kBAAkB;IAC/C,kBAAkB,EAAE,yBAAyB;IAC7C,kBAAkB,EAAE,UAAU;IAC9B,WAAW,EAAE,kBAAkB;IAC/B,iBAAiB,EAAE,UAAU;IAC7B,uBAAuB,EAAE,eAAe;IACxC,eAAe,EAAE,QAAQ;CAC1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-transformer-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.0",
|
|
4
4
|
"description": "Common code and constants for AppSync Transformers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"graphql": "^15.5.0",
|
|
28
|
-
"graphql-mapping-template": "4.20.
|
|
28
|
+
"graphql-mapping-template": "4.20.15",
|
|
29
29
|
"md5": "^2.2.1",
|
|
30
30
|
"pluralize": "8.0.0"
|
|
31
31
|
},
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"/__tests__/"
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "ac8990dd06d7b6a29c079e84a7c1e23ec5708fc1"
|
|
70
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/graphql-api-construct",
|
|
3
|
-
"version": "1.7.0
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@aws-amplify/backend-output-storage",
|
|
39
39
|
"@aws-amplify/graphql-auth-transformer",
|
|
40
40
|
"@aws-amplify/graphql-default-value-transformer",
|
|
41
|
+
"@aws-amplify/graphql-directives",
|
|
41
42
|
"@aws-amplify/graphql-function-transformer",
|
|
42
43
|
"@aws-amplify/graphql-http-transformer",
|
|
43
44
|
"@aws-amplify/graphql-index-transformer",
|
|
@@ -75,20 +76,21 @@
|
|
|
75
76
|
"dependencies": {
|
|
76
77
|
"@aws-amplify/backend-output-schemas": "^0.4.0",
|
|
77
78
|
"@aws-amplify/backend-output-storage": "^0.2.2",
|
|
78
|
-
"@aws-amplify/graphql-auth-transformer": "3.
|
|
79
|
-
"@aws-amplify/graphql-default-value-transformer": "2.3.2
|
|
80
|
-
"@aws-amplify/graphql-
|
|
81
|
-
"@aws-amplify/graphql-
|
|
82
|
-
"@aws-amplify/graphql-
|
|
83
|
-
"@aws-amplify/graphql-
|
|
84
|
-
"@aws-amplify/graphql-
|
|
85
|
-
"@aws-amplify/graphql-
|
|
86
|
-
"@aws-amplify/graphql-
|
|
87
|
-
"@aws-amplify/graphql-
|
|
88
|
-
"@aws-amplify/graphql-
|
|
89
|
-
"@aws-amplify/graphql-transformer": "
|
|
90
|
-
"@aws-amplify/graphql-transformer
|
|
91
|
-
"@aws-amplify/graphql-transformer-
|
|
79
|
+
"@aws-amplify/graphql-auth-transformer": "3.4.2",
|
|
80
|
+
"@aws-amplify/graphql-default-value-transformer": "2.3.2",
|
|
81
|
+
"@aws-amplify/graphql-directives": "1.0.1",
|
|
82
|
+
"@aws-amplify/graphql-function-transformer": "2.1.19",
|
|
83
|
+
"@aws-amplify/graphql-http-transformer": "2.1.19",
|
|
84
|
+
"@aws-amplify/graphql-index-transformer": "2.3.8",
|
|
85
|
+
"@aws-amplify/graphql-maps-to-transformer": "3.4.9",
|
|
86
|
+
"@aws-amplify/graphql-model-transformer": "2.7.0",
|
|
87
|
+
"@aws-amplify/graphql-predictions-transformer": "2.1.19",
|
|
88
|
+
"@aws-amplify/graphql-relational-transformer": "2.4.2",
|
|
89
|
+
"@aws-amplify/graphql-searchable-transformer": "2.6.2",
|
|
90
|
+
"@aws-amplify/graphql-sql-transformer": "0.2.8",
|
|
91
|
+
"@aws-amplify/graphql-transformer": "1.4.0",
|
|
92
|
+
"@aws-amplify/graphql-transformer-core": "2.5.1",
|
|
93
|
+
"@aws-amplify/graphql-transformer-interfaces": "3.5.0",
|
|
92
94
|
"@aws-amplify/platform-core": "^0.2.0",
|
|
93
95
|
"@aws-amplify/plugin-types": "^0.4.1",
|
|
94
96
|
"charenc": "^0.0.2",
|
|
@@ -96,8 +98,8 @@
|
|
|
96
98
|
"fs-extra": "^8.1.0",
|
|
97
99
|
"graceful-fs": "^4.2.11",
|
|
98
100
|
"graphql": "^15.5.0",
|
|
99
|
-
"graphql-mapping-template": "4.20.
|
|
100
|
-
"graphql-transformer-common": "4.
|
|
101
|
+
"graphql-mapping-template": "4.20.15",
|
|
102
|
+
"graphql-transformer-common": "4.29.0",
|
|
101
103
|
"hjson": "^3.2.2",
|
|
102
104
|
"immer": "^9.0.12",
|
|
103
105
|
"is-buffer": "^2.0.5",
|
|
@@ -112,7 +114,7 @@
|
|
|
112
114
|
"zod": "^3.22.3"
|
|
113
115
|
},
|
|
114
116
|
"devDependencies": {
|
|
115
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.7
|
|
117
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.7",
|
|
116
118
|
"@types/fs-extra": "^8.0.1",
|
|
117
119
|
"@types/node": "^12.12.6",
|
|
118
120
|
"aws-cdk-lib": "2.80.0",
|
|
@@ -177,5 +179,5 @@
|
|
|
177
179
|
"/__tests__/"
|
|
178
180
|
]
|
|
179
181
|
},
|
|
180
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "ac8990dd06d7b6a29c079e84a7c1e23ec5708fc1"
|
|
181
183
|
}
|
|
@@ -48,7 +48,6 @@ import {
|
|
|
48
48
|
getGeneratedFunctionSlots,
|
|
49
49
|
CodegenAssets,
|
|
50
50
|
getAdditionalAuthenticationTypes,
|
|
51
|
-
validateAuthorizationModes,
|
|
52
51
|
} from './internal';
|
|
53
52
|
import { getStackForScope, walkAndProcessNodes } from './internal/construct-tree';
|
|
54
53
|
import { getDataSourceStrategiesProvider } from './internal/data-source-config';
|
|
@@ -170,7 +169,6 @@ export class AmplifyGraphqlApi extends Construct {
|
|
|
170
169
|
dataSources,
|
|
171
170
|
});
|
|
172
171
|
|
|
173
|
-
validateAuthorizationModes(authorizationModes);
|
|
174
172
|
const { authConfig, authSynthParameters } = convertAuthorizationModesToTransformerAuthConfig(authorizationModes);
|
|
175
173
|
|
|
176
174
|
validateFunctionSlots(functionSlots ?? []);
|
package/src/index.ts
CHANGED
|
@@ -5,51 +5,19 @@ import { IRole, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
|
|
|
5
5
|
import {
|
|
6
6
|
AuthorizationModes,
|
|
7
7
|
ApiKeyAuthorizationConfig,
|
|
8
|
+
IAMAuthorizationConfig,
|
|
8
9
|
LambdaAuthorizationConfig,
|
|
9
10
|
OIDCAuthorizationConfig,
|
|
10
11
|
UserPoolAuthorizationConfig,
|
|
11
12
|
} from '../types';
|
|
12
13
|
|
|
13
14
|
type AuthorizationConfigMode =
|
|
14
|
-
| { type: 'AWS_IAM' }
|
|
15
|
+
| (IAMAuthorizationConfig & { type: 'AWS_IAM' })
|
|
15
16
|
| (UserPoolAuthorizationConfig & { type: 'AMAZON_COGNITO_USER_POOLS' })
|
|
16
17
|
| (OIDCAuthorizationConfig & { type: 'OPENID_CONNECT' })
|
|
17
18
|
| (ApiKeyAuthorizationConfig & { type: 'API_KEY' })
|
|
18
19
|
| (LambdaAuthorizationConfig & { type: 'AWS_LAMBDA' });
|
|
19
20
|
|
|
20
|
-
export const validateAuthorizationModes = (authorizationModes: AuthorizationModes) => {
|
|
21
|
-
const hasDeprecatedIdentityPoolSettings =
|
|
22
|
-
authorizationModes.iamConfig?.authenticatedUserRole ||
|
|
23
|
-
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
|
24
|
-
authorizationModes.iamConfig?.identityPoolId;
|
|
25
|
-
const hasAllDeprecatedIdentityPoolSettings =
|
|
26
|
-
authorizationModes.iamConfig?.authenticatedUserRole &&
|
|
27
|
-
authorizationModes.iamConfig?.unauthenticatedUserRole &&
|
|
28
|
-
authorizationModes.iamConfig?.identityPoolId;
|
|
29
|
-
const hasDeprecatedSettings =
|
|
30
|
-
authorizationModes.iamConfig?.authenticatedUserRole ||
|
|
31
|
-
authorizationModes.iamConfig?.unauthenticatedUserRole ||
|
|
32
|
-
authorizationModes.iamConfig?.identityPoolId ||
|
|
33
|
-
authorizationModes.iamConfig?.allowListedRoles ||
|
|
34
|
-
authorizationModes.adminRoles;
|
|
35
|
-
const hasUnDeprecatedSettings =
|
|
36
|
-
typeof authorizationModes.iamConfig?.enableIamAuthorizationMode !== 'undefined' || authorizationModes.identityPoolConfig;
|
|
37
|
-
|
|
38
|
-
if (hasDeprecatedSettings && hasUnDeprecatedSettings) {
|
|
39
|
-
throw new Error(
|
|
40
|
-
"Cannot use deprecated 'authorizationModes.iamConfig' options with 'authorizationModes.identityPoolConfig'" +
|
|
41
|
-
" or 'authorizationModes.iamConfig.enableIamAuthorizationMode'",
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (hasDeprecatedIdentityPoolSettings && !hasAllDeprecatedIdentityPoolSettings) {
|
|
46
|
-
throw new Error(
|
|
47
|
-
"'authorizationModes.iamConfig.authenticatedUserRole', 'authorizationModes.iamConfig.unauthenticatedUserRole' and" +
|
|
48
|
-
" 'authorizationModes.iamConfig.identityPoolId' must be provided.",
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
21
|
/**
|
|
54
22
|
* Converts a single auth mode config into the amplify-internal representation.
|
|
55
23
|
* @param authMode the auth mode to convert into the Appsync CDK representation.
|
|
@@ -111,7 +79,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
|
|
|
111
79
|
authModes.lambdaConfig ? { type: 'AWS_LAMBDA', ...authModes.lambdaConfig } : null,
|
|
112
80
|
authModes.oidcConfig ? { type: 'OPENID_CONNECT', ...authModes.oidcConfig } : null,
|
|
113
81
|
authModes.userPoolConfig ? { type: 'AMAZON_COGNITO_USER_POOLS', ...authModes.userPoolConfig } : null,
|
|
114
|
-
authModes.iamConfig
|
|
82
|
+
authModes.iamConfig ? { type: 'AWS_IAM', ...authModes.iamConfig } : null,
|
|
115
83
|
].filter((mode) => mode) as AuthorizationConfigMode[];
|
|
116
84
|
const authProviders = authConfig.map(convertAuthModeToAuthProvider);
|
|
117
85
|
|
|
@@ -148,7 +116,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
|
|
|
148
116
|
|
|
149
117
|
type AuthSynthParameters = Pick<
|
|
150
118
|
SynthParameters,
|
|
151
|
-
'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles'
|
|
119
|
+
'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles'
|
|
152
120
|
>;
|
|
153
121
|
|
|
154
122
|
interface AuthConfig {
|
|
@@ -209,19 +177,12 @@ const getAllowListedRoles = (authModes: AuthorizationModes): string[] =>
|
|
|
209
177
|
*/
|
|
210
178
|
const getSynthParameters = (authModes: AuthorizationModes): AuthSynthParameters => ({
|
|
211
179
|
adminRoles: getAllowListedRoles(authModes),
|
|
212
|
-
identityPoolId: authModes.
|
|
213
|
-
enableIamAccess: authModes.iamConfig?.enableIamAuthorizationMode,
|
|
180
|
+
identityPoolId: authModes.iamConfig?.identityPoolId,
|
|
214
181
|
...(authModes.userPoolConfig ? { userPoolId: authModes.userPoolConfig.userPool.userPoolId } : {}),
|
|
215
|
-
...(authModes?.
|
|
216
|
-
? {
|
|
217
|
-
authenticatedUserRoleName: authModes.identityPoolConfig.authenticatedUserRole.roleName,
|
|
218
|
-
unauthenticatedUserRoleName: authModes.identityPoolConfig.unauthenticatedUserRole.roleName,
|
|
219
|
-
}
|
|
220
|
-
: {}),
|
|
221
|
-
...(authModes?.iamConfig && authModes?.iamConfig.authenticatedUserRole && authModes?.iamConfig.unauthenticatedUserRole
|
|
182
|
+
...(authModes?.iamConfig
|
|
222
183
|
? {
|
|
223
|
-
authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole
|
|
224
|
-
unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole
|
|
184
|
+
authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole.roleName,
|
|
185
|
+
unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole.roleName,
|
|
225
186
|
}
|
|
226
187
|
: {}),
|
|
227
188
|
});
|
|
@@ -6,7 +6,12 @@ import {
|
|
|
6
6
|
isMutationNode,
|
|
7
7
|
fieldsWithSqlDirective,
|
|
8
8
|
} from '@aws-amplify/graphql-transformer-core';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
DataSourceStrategiesProvider,
|
|
11
|
+
isSqlModelDataSourceSsmDbConnectionConfig,
|
|
12
|
+
isSqlModelDataSourceSecretsManagerDbConnectionConfig,
|
|
13
|
+
} from '@aws-amplify/graphql-transformer-interfaces';
|
|
14
|
+
import { Token, Arn, ArnFormat } from 'aws-cdk-lib';
|
|
10
15
|
import {
|
|
11
16
|
CustomSqlDataSourceStrategy as ConstructCustomSqlDataSourceStrategy,
|
|
12
17
|
ModelDataSourceStrategy as ConstructModelDataSourceStrategy,
|
|
@@ -184,19 +189,47 @@ export const schemaByMergingDefinitions = (definitions: IAmplifyGraphqlDefinitio
|
|
|
184
189
|
* @param strategy user provided model data source strategy
|
|
185
190
|
* @returns validates and throws an error if the strategy is invalid
|
|
186
191
|
*/
|
|
187
|
-
export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy) => {
|
|
192
|
+
export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy): void => {
|
|
188
193
|
if (!isSqlStrategy(strategy)) {
|
|
189
194
|
return;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
const dbConnectionConfig = strategy.dbConnectionConfig;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
strategy
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
if (isSqlModelDataSourceSsmDbConnectionConfig(dbConnectionConfig)) {
|
|
199
|
+
const invalidSSMPaths = Object.values(dbConnectionConfig).filter((value) => typeof value === 'string' && !isValidSSMPath(value));
|
|
200
|
+
if (invalidSSMPaths.length > 0) {
|
|
201
|
+
throw new Error(
|
|
202
|
+
`Invalid data source strategy "${
|
|
203
|
+
strategy.name
|
|
204
|
+
}". Following SSM paths must start with '/' in dbConnectionConfig: ${invalidSSMPaths.join(', ')}.`,
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
} else if (isSqlModelDataSourceSecretsManagerDbConnectionConfig(dbConnectionConfig)) {
|
|
208
|
+
if (!Token.isUnresolved(dbConnectionConfig.secretArn)) {
|
|
209
|
+
try {
|
|
210
|
+
const arnComponents = Arn.split(dbConnectionConfig.secretArn, ArnFormat.COLON_RESOURCE_NAME);
|
|
211
|
+
if (arnComponents.service !== 'secretsmanager' || arnComponents.resource !== 'secret') {
|
|
212
|
+
// error message does not matter because it inside try/catch
|
|
213
|
+
throw new Error();
|
|
214
|
+
}
|
|
215
|
+
} catch {
|
|
216
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". The value of secretArn is not a valid Secrets Manager ARN.`);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (dbConnectionConfig.keyArn && !Token.isUnresolved(dbConnectionConfig.keyArn)) {
|
|
221
|
+
try {
|
|
222
|
+
const arnComponents = Arn.split(dbConnectionConfig.keyArn, ArnFormat.SLASH_RESOURCE_NAME);
|
|
223
|
+
if (arnComponents.service !== 'kms' || arnComponents.resource !== 'key') {
|
|
224
|
+
// error message does not matter because it inside try/catch
|
|
225
|
+
throw new Error();
|
|
226
|
+
}
|
|
227
|
+
} catch {
|
|
228
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". The value of keyArn is not a valid KMS ARN.`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
} else {
|
|
232
|
+
throw new Error(`Invalid data source strategy "${strategy.name}". dbConnectionConfig does not include SSM paths or Secret ARN.`);
|
|
200
233
|
}
|
|
201
234
|
};
|
|
202
235
|
|
|
@@ -116,12 +116,44 @@ export interface SubnetAvailabilityZone {
|
|
|
116
116
|
readonly availabilityZone: string;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The credentials the lambda data source will use to connect to the database.
|
|
121
|
+
*
|
|
122
|
+
* @experimental
|
|
123
|
+
*/
|
|
124
|
+
export type SqlModelDataSourceDbConnectionConfig =
|
|
125
|
+
| SqlModelDataSourceSecretsManagerDbConnectionConfig
|
|
126
|
+
| SqlModelDataSourceSsmDbConnectionConfig;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The credentials stored in Secrets Manager that the lambda data source will use to connect to the database.
|
|
130
|
+
*
|
|
131
|
+
* The managed secret should be in the same region as the lambda.
|
|
132
|
+
* @experimental
|
|
133
|
+
*/
|
|
134
|
+
export interface SqlModelDataSourceSecretsManagerDbConnectionConfig {
|
|
135
|
+
/** The ARN of the managed secret with username, password, and hostname to use when connecting to the database. **/
|
|
136
|
+
readonly secretArn: string;
|
|
137
|
+
|
|
138
|
+
/** The ARN of the customer managed encryption key for the secret. If not supplied, the secret is expected to be encrypted with the default AWS-managed key. **/
|
|
139
|
+
readonly keyArn?: string;
|
|
140
|
+
|
|
141
|
+
/** The port number of the database proxy, cluster, or instance. */
|
|
142
|
+
readonly port: number;
|
|
143
|
+
|
|
144
|
+
/** The database name. */
|
|
145
|
+
readonly databaseName: string;
|
|
146
|
+
|
|
147
|
+
/** The hostame of the database. */
|
|
148
|
+
readonly hostname: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
119
151
|
/**
|
|
120
152
|
* The Secure Systems Manager parameter paths the Lambda data source will use to connect to the database.
|
|
121
153
|
*
|
|
122
154
|
* These parameters are retrieved from Secure Systems Manager in the same region as the Lambda.
|
|
123
155
|
*/
|
|
124
|
-
export interface
|
|
156
|
+
export interface SqlModelDataSourceSsmDbConnectionConfig {
|
|
125
157
|
/** The Secure Systems Manager parameter containing the hostname of the database. For RDS-based SQL data sources, this can be the hostname
|
|
126
158
|
* of a database proxy, cluster, or instance.
|
|
127
159
|
*/
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { isSqlDbType } from '@aws-amplify/graphql-transformer-core';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
SQLLambdaModelDataSourceStrategy,
|
|
6
|
+
SqlModelDataSourceDbConnectionConfig,
|
|
7
|
+
SqlModelDataSourceSsmDbConnectionConfig,
|
|
8
|
+
SqlModelDataSourceSecretsManagerDbConnectionConfig,
|
|
9
|
+
} from './model-datasource-strategy-types';
|
|
5
10
|
|
|
6
11
|
/**
|
|
7
12
|
* Type predicate that returns true if the object is a SQLLambdaModelDataSourceStrategy.
|
|
@@ -24,6 +29,15 @@ export const isSQLLambdaModelDataSourceStrategy = (obj: any): obj is SQLLambdaMo
|
|
|
24
29
|
* @returns true if the object is shaped like a SqlModelDataSourceDbConnectionConfig
|
|
25
30
|
*/
|
|
26
31
|
export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlModelDataSourceDbConnectionConfig => {
|
|
32
|
+
return isSqlModelDataSourceSsmDbConnectionConfig(obj) || isSqlModelDataSourceSecretsManagerDbConnectionConfig(obj);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Type predicate that returns true if the object is a SqlModelDataSourceSsmDbConnectionConfig.
|
|
37
|
+
* @param obj the object to inspect
|
|
38
|
+
* @returns true if the object is shaped like a SqlModelDataSourceSsmDbConnectionConfig
|
|
39
|
+
*/
|
|
40
|
+
export const isSqlModelDataSourceSsmDbConnectionConfig = (obj: any): obj is SqlModelDataSourceSsmDbConnectionConfig => {
|
|
27
41
|
return (
|
|
28
42
|
(typeof obj === 'object' || typeof obj === 'function') &&
|
|
29
43
|
typeof obj.hostnameSsmPath === 'string' &&
|
|
@@ -34,6 +48,23 @@ export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlMode
|
|
|
34
48
|
);
|
|
35
49
|
};
|
|
36
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Type predicate that returns true if the object is a SqlModelDataSourceSecretsManagerDbConnectionConfig.
|
|
53
|
+
* @param obj the object to inspect
|
|
54
|
+
* @returns true if the object is shaped like a SqlModelDataSourceSecretsManagerDbConnectionConfig
|
|
55
|
+
*/
|
|
56
|
+
export const isSqlModelDataSourceSecretsManagerDbConnectionConfig = (
|
|
57
|
+
obj: any,
|
|
58
|
+
): obj is SqlModelDataSourceSecretsManagerDbConnectionConfig => {
|
|
59
|
+
return (
|
|
60
|
+
(typeof obj === 'object' || typeof obj === 'function') &&
|
|
61
|
+
typeof obj.secretArn === 'string' &&
|
|
62
|
+
typeof obj.port === 'number' &&
|
|
63
|
+
typeof obj.databaseName === 'string' &&
|
|
64
|
+
typeof obj.hostname == 'string'
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
37
68
|
/**
|
|
38
69
|
* Class exposing utilities to produce SQLLambdaModelDataSourceStrategy objects given various inputs.
|
|
39
70
|
*/
|
package/src/types.ts
CHANGED
|
@@ -28,68 +28,25 @@ 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.
|
|
34
31
|
*/
|
|
35
|
-
readonly identityPoolId
|
|
32
|
+
readonly identityPoolId: string;
|
|
36
33
|
|
|
37
34
|
/**
|
|
38
35
|
* 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.
|
|
42
36
|
*/
|
|
43
|
-
readonly authenticatedUserRole
|
|
37
|
+
readonly authenticatedUserRole: IRole;
|
|
44
38
|
|
|
45
39
|
/**
|
|
46
40
|
* 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.
|
|
50
41
|
*/
|
|
51
|
-
readonly unauthenticatedUserRole
|
|
42
|
+
readonly unauthenticatedUserRole: IRole;
|
|
52
43
|
|
|
53
44
|
/**
|
|
54
45
|
* A list of IAM roles which will be granted full read/write access to the generated model if IAM auth is enabled.
|
|
55
46
|
* If an IRole is provided, the role `name` will be used for matching.
|
|
56
47
|
* 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.
|
|
60
48
|
*/
|
|
61
49
|
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;
|
|
93
50
|
}
|
|
94
51
|
|
|
95
52
|
/**
|
|
@@ -177,18 +134,10 @@ export interface AuthorizationModes {
|
|
|
177
134
|
readonly defaultAuthorizationMode?: 'AWS_IAM' | 'AMAZON_COGNITO_USER_POOLS' | 'OPENID_CONNECT' | 'API_KEY' | 'AWS_LAMBDA';
|
|
178
135
|
|
|
179
136
|
/**
|
|
180
|
-
* IAM Auth config, required
|
|
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.
|
|
184
|
-
*/
|
|
185
|
-
readonly iamConfig?: IAMAuthorizationConfig;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Cognito Identity Pool config, required if an 'identityPool' auth provider is specified in the Api.
|
|
137
|
+
* IAM Auth config, required if an 'iam' auth provider is specified in the Api.
|
|
189
138
|
* Applies to 'public' and 'private' auth strategies.
|
|
190
139
|
*/
|
|
191
|
-
readonly
|
|
140
|
+
readonly iamConfig?: IAMAuthorizationConfig;
|
|
192
141
|
|
|
193
142
|
/**
|
|
194
143
|
* Cognito UserPool config, required if a 'userPools' auth provider is specified in the Api.
|
|
File without changes
|