@aws-amplify/graphql-api-construct 1.1.2-rds-3.0 → 1.1.3
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 +162 -162
- package/CHANGELOG.md +7 -1
- package/README.md +2 -0
- package/lib/amplify-graphql-api.d.ts +4 -0
- package/lib/amplify-graphql-api.js +10 -2
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/internal/authorization-modes.d.ts +5 -0
- package/lib/internal/authorization-modes.js +15 -2
- package/lib/types.d.ts +1 -0
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.d.ts +10 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.d.ts +10 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.js +2 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/index.d.ts +50 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/index.js +6 -2
- package/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.d.ts +23 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.js +12 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.d.ts +22 -0
- package/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.js +14 -0
- package/node_modules/@aws-amplify/backend-output-schemas/package.json +3 -2
- package/node_modules/@aws-amplify/backend-output-storage/lib/stack_metadata_output_storage_strategy.d.ts +0 -4
- package/node_modules/@aws-amplify/backend-output-storage/lib/stack_metadata_output_storage_strategy.js +1 -13
- package/node_modules/@aws-amplify/backend-output-storage/package.json +3 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +3 -9
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +9 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts +1 -3
- 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 +46 -36
- 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/{vtl-generator/ddb/resolvers → resolvers}/field.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/field.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/field.js +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/field.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/helpers.d.ts +4 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/helpers.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/helpers.js +9 -10
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/helpers.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.create.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.create.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.create.js +6 -6
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.create.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.delete.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.delete.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.delete.js +5 -5
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.delete.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.update.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.update.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/mutation.update.js +6 -6
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/mutation.update.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/query.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/query.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/query.js +5 -30
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/query.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/search.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/search.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/search.js +5 -5
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/search.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/subscriptions.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/subscriptions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/subscriptions.js +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/resolvers/subscriptions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +1 -2
- 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/iam.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/iam.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/iam.js +3 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/iam.js.map +1 -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 +1 -2
- 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/schema.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/schema.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +11 -11
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +2 -4
- 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 +1 -13
- 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 +8 -8
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +2 -5
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/generators/rds-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/generators/rds-vtl-generator.js +1 -4
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/generators/rds-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts +1 -2
- 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 +2 -11
- package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.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/API.md +0 -15
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +2 -9
- 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/field-mapping-resolvers.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/field-mapping-resolvers.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/field-mapping-resolvers.js +1 -14
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/field-mapping-resolvers.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.d.ts +1 -2
- 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 +33 -16
- 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/index.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/index.js +1 -3
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +14 -14
- package/node_modules/@aws-amplify/graphql-model-transformer/API.md +15 -15
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +2 -13
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.js +2 -9
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.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/generators/dynamodb-vtl-generator.d.ts +5 -6
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/dynamodb-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/dynamodb-vtl-generator.js +5 -5
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/dynamodb-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/rds-vtl-generator.d.ts +5 -6
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/rds-vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/rds-vtl-generator.js +10 -10
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/rds-vtl-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/vtl-generator.d.ts +5 -6
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/generators/vtl-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/mutation.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/mutation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/mutation.js +55 -71
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/mutation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/query.d.ts +1 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/query.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/query.js +2 -6
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +3 -8
- 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 +42 -111
- 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.js +5 -5
- 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 +0 -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 +0 -24
- 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 +9 -9
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +1 -1
- 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 +2 -6
- 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 +9 -41
- 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 +8 -35
- 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 +8 -30
- 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 +2 -3
- 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/resolvers.d.ts +4 -4
- 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 +161 -14
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.js +8 -14
- 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 +0 -4
- 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 +0 -5
- 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 +1 -85
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +10 -10
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +3 -3
- 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 +0 -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-transformer/API.md +3 -4
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -6
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +3 -4
- 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 +10 -9
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +14 -15
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +13 -12
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +2 -11
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +2 -10
- 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 +1 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js +3 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/types.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts +4 -5
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js +1 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js +19 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/import-appsync-api-types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/types/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.js +3 -9
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-secret-utils.d.ts +2 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-secret-utils.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/{rds-util.js → rds-secret-utils.js} +2 -16
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-secret-utils.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.d.ts +1 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.js +1 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/schema-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/wrappers/object-definition-wrapper.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/wrappers/object-definition-wrapper.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +4 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +3 -15
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +3 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts +0 -8
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +2 -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 +2 -3
- 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/graphql-api-provider.ts +0 -10
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts +0 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +2 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +2 -3
- 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 +0 -21
- package/node_modules/graphql-transformer-common/CHANGELOG.md +0 -11
- package/node_modules/graphql-transformer-common/lib/definition.d.ts +2 -9
- package/node_modules/graphql-transformer-common/lib/definition.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/definition.js +1 -52
- package/node_modules/graphql-transformer-common/lib/definition.js.map +1 -1
- package/node_modules/graphql-transformer-common/lib/util.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/util.js +1 -3
- package/node_modules/graphql-transformer-common/lib/util.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +6 -7
- package/node_modules/zod/README.md +83 -191
- package/node_modules/zod/lib/helpers/parseUtil.js +1 -2
- package/node_modules/zod/lib/index.mjs +29 -82
- package/node_modules/zod/lib/index.umd.js +28 -82
- package/node_modules/zod/lib/types.d.ts +5 -22
- package/node_modules/zod/lib/types.js +29 -65
- package/node_modules/zod/package.json +15 -29
- package/package.json +19 -21
- package/src/amplify-graphql-api.ts +17 -0
- package/src/internal/authorization-modes.ts +18 -0
- package/src/types.ts +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts +0 -20
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js +0 -24
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts +0 -6
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts +0 -20
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js +0 -23
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts +0 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js +0 -10
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/index.d.ts +0 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/index.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/index.js +0 -18
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/index.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts +0 -19
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.js +0 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-name-mapping.d.ts +0 -10
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-name-mapping.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-name-mapping.js +0 -102
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-name-mapping.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.d.ts +0 -13
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js +0 -82
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts +0 -13
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js +0 -171
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.js +0 -16
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator-factory.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts +0 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js +0 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts +0 -14
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +0 -113
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/API.md +0 -26
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +0 -10
- package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-sql-transformer/README.md +0 -13
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts +0 -12
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +0 -122
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/index.d.ts +0 -2
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/index.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/index.js +0 -6
- package/node_modules/@aws-amplify/graphql-sql-transformer/lib/index.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +0 -71
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-util.d.ts +0 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-util.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-util.js +0 -19
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-util.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.d.ts +0 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/rds-util.js.map +0 -1
- package/node_modules/graphql-mapping-template/LICENSE +0 -201
- package/node_modules/graphql-transformer-common/LICENSE +0 -201
- /package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/index.d.ts +0 -0
- /package/node_modules/@aws-amplify/graphql-auth-transformer/lib/{vtl-generator/ddb/resolvers → resolvers}/index.js +0 -0
|
@@ -45,32 +45,20 @@
|
|
|
45
45
|
|
|
46
46
|
#### Go to [zod.js.org](https://zod.js.org) >> -->
|
|
47
47
|
|
|
48
|
-
- [Table of contents](#table-of-contents)
|
|
49
48
|
- [Introduction](#introduction)
|
|
50
49
|
- [Sponsors](#sponsors)
|
|
51
|
-
- [Gold](#gold)
|
|
52
|
-
- [Silver](#silver)
|
|
53
|
-
- [Bronze](#bronze)
|
|
54
50
|
- [Ecosystem](#ecosystem)
|
|
55
|
-
- [Resources](#resources)
|
|
56
|
-
- [API libraries](#api-libraries)
|
|
57
|
-
- [Form integrations](#form-integrations)
|
|
58
|
-
- [Zod to X](#zod-to-x)
|
|
59
|
-
- [X to Zod](#x-to-zod)
|
|
60
|
-
- [Mocking](#mocking)
|
|
61
|
-
- [Powered by Zod](#powered-by-zod)
|
|
62
|
-
- [Utilities for Zod](#utilities-for-zod)
|
|
63
51
|
- [Installation](#installation)
|
|
64
52
|
- [Requirements](#requirements)
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
53
|
+
- [Node/npm](#from-npm-nodebun)
|
|
54
|
+
- [Deno](#from-denolandx-deno)
|
|
67
55
|
- [Basic usage](#basic-usage)
|
|
68
56
|
- [Primitives](#primitives)
|
|
69
57
|
- [Coercion for primitives](#coercion-for-primitives)
|
|
70
58
|
- [Literals](#literals)
|
|
71
59
|
- [Strings](#strings)
|
|
72
|
-
- [
|
|
73
|
-
- [IP
|
|
60
|
+
- [Datetime](#datetime-validation)
|
|
61
|
+
- [IP](#ip-address-validation)
|
|
74
62
|
- [Numbers](#numbers)
|
|
75
63
|
- [BigInts](#bigints)
|
|
76
64
|
- [NaNs](#nans)
|
|
@@ -81,75 +69,59 @@
|
|
|
81
69
|
- [Optionals](#optionals)
|
|
82
70
|
- [Nullables](#nullables)
|
|
83
71
|
- [Objects](#objects)
|
|
84
|
-
- [
|
|
85
|
-
- [
|
|
86
|
-
- [
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
89
|
-
- [
|
|
90
|
-
- [
|
|
91
|
-
- [
|
|
92
|
-
- [
|
|
93
|
-
- [
|
|
94
|
-
- [
|
|
95
|
-
- [`.catchall`](#catchall)
|
|
72
|
+
- [.shape](#shape)
|
|
73
|
+
- [.keyof](#keyof)
|
|
74
|
+
- [.extend](#extend)
|
|
75
|
+
- [.merge](#merge)
|
|
76
|
+
- [.pick/.omit](#pickomit)
|
|
77
|
+
- [.partial](#partial)
|
|
78
|
+
- [.deepPartial](#deepPartial)
|
|
79
|
+
- [.passthrough](#passthrough)
|
|
80
|
+
- [.strict](#strict)
|
|
81
|
+
- [.strip](#strip)
|
|
82
|
+
- [.catchall](#catchall)
|
|
96
83
|
- [Arrays](#arrays)
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
99
|
-
- [
|
|
84
|
+
- [.element](#element)
|
|
85
|
+
- [.nonempty](#nonempty)
|
|
86
|
+
- [.min/.max/.length](#minmaxlength)
|
|
100
87
|
- [Tuples](#tuples)
|
|
101
88
|
- [Unions](#unions)
|
|
102
|
-
- [Discriminated
|
|
89
|
+
- [Discriminated Unions](#discriminated-unions)
|
|
103
90
|
- [Records](#records)
|
|
104
|
-
- [Record key type](#record-key-type)
|
|
105
91
|
- [Maps](#maps)
|
|
106
92
|
- [Sets](#sets)
|
|
107
93
|
- [Intersections](#intersections)
|
|
108
94
|
- [Recursive types](#recursive-types)
|
|
109
|
-
- [ZodType with ZodEffects](#zodtype-with-zodeffects)
|
|
110
95
|
- [JSON type](#json-type)
|
|
111
|
-
- [Cyclical
|
|
96
|
+
- [Cyclical data](#cyclical-objects)
|
|
112
97
|
- [Promises](#promises)
|
|
113
98
|
- [Instanceof](#instanceof)
|
|
114
99
|
- [Functions](#functions)
|
|
115
100
|
- [Preprocess](#preprocess)
|
|
116
|
-
- [Custom
|
|
101
|
+
- [Custom](#custom-schemas)
|
|
117
102
|
- [Schema methods](#schema-methods)
|
|
118
|
-
- [
|
|
119
|
-
- [
|
|
120
|
-
- [
|
|
121
|
-
- [
|
|
122
|
-
- [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
- [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- [
|
|
136
|
-
- [
|
|
137
|
-
- [`.catch`](#catch)
|
|
138
|
-
- [`.optional`](#optional)
|
|
139
|
-
- [`.nullable`](#nullable)
|
|
140
|
-
- [`.nullish`](#nullish)
|
|
141
|
-
- [`.array`](#array)
|
|
142
|
-
- [`.promise`](#promise)
|
|
143
|
-
- [`.or`](#or)
|
|
144
|
-
- [`.and`](#and)
|
|
145
|
-
- [`.brand`](#brand)
|
|
146
|
-
- [`.readonly`](#readonly)
|
|
147
|
-
- [`.pipe`](#pipe)
|
|
148
|
-
- [You can use `.pipe()` to fix common issues with `z.coerce`.](#you-can-use-pipe-to-fix-common-issues-with-zcoerce)
|
|
103
|
+
- [.parse](#parse)
|
|
104
|
+
- [.parseAsync](#parseasync)
|
|
105
|
+
- [.safeParse](#safeparse)
|
|
106
|
+
- [.safeParseAsync](#safeparseasync)
|
|
107
|
+
- [.refine](#refine)
|
|
108
|
+
- [.superRefine](#superRefine)
|
|
109
|
+
- [.transform](#transform)
|
|
110
|
+
- [.default](#default)
|
|
111
|
+
- [.describe](#describe)
|
|
112
|
+
- [.catch](#catch)
|
|
113
|
+
- [.optional](#optional)
|
|
114
|
+
- [.nullable](#nullable)
|
|
115
|
+
- [.nullish](#nullish)
|
|
116
|
+
- [.array](#array)
|
|
117
|
+
- [.promise](#promise)
|
|
118
|
+
- [.or](#or)
|
|
119
|
+
- [.and](#and)
|
|
120
|
+
- [.brand](#brand)
|
|
121
|
+
- [.pipe](#pipe)
|
|
149
122
|
- [Guides and concepts](#guides-and-concepts)
|
|
150
123
|
- [Type inference](#type-inference)
|
|
151
124
|
- [Writing generic functions](#writing-generic-functions)
|
|
152
|
-
- [Constraining allowable inputs](#constraining-allowable-inputs)
|
|
153
125
|
- [Error handling](#error-handling)
|
|
154
126
|
- [Error formatting](#error-formatting)
|
|
155
127
|
- [Comparison](#comparison)
|
|
@@ -157,9 +129,10 @@
|
|
|
157
129
|
- [Yup](#yup)
|
|
158
130
|
- [io-ts](#io-ts)
|
|
159
131
|
- [Runtypes](#runtypes)
|
|
160
|
-
- [Ow](#ow)
|
|
161
132
|
- [Changelog](#changelog)
|
|
162
133
|
|
|
134
|
+
<!-- **Zod 2 is coming! Follow [@colinhacks](https://twitter.com/colinhacks) to stay updated and discuss the future of Zod.** -->
|
|
135
|
+
|
|
163
136
|
## Introduction
|
|
164
137
|
|
|
165
138
|
Zod is a TypeScript-first schema declaration and validation library. I'm using the term "schema" to broadly refer to any data type, from a simple `string` to a complex nested object.
|
|
@@ -233,7 +206,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
|
|
|
233
206
|
<a href="https://proxy.com">proxy.com</a>
|
|
234
207
|
</td>
|
|
235
208
|
</tr>
|
|
236
|
-
|
|
209
|
+
<tr>
|
|
237
210
|
<td align="center">
|
|
238
211
|
<a href="https://trigger.dev/">
|
|
239
212
|
<img src="https://avatars.githubusercontent.com/u/95297378?s=200&v=4" width="200px;" alt="Trigger.dev logo" />
|
|
@@ -242,33 +215,16 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
|
|
|
242
215
|
<b>Trigger.dev</b>
|
|
243
216
|
<br />
|
|
244
217
|
<a href="https://trigger.dev">trigger.dev</a>
|
|
245
|
-
<br/>
|
|
246
|
-
<p>Effortless automation for developers.</p>
|
|
247
|
-
</td>
|
|
248
|
-
<td align="center">
|
|
249
|
-
<a href="https://transloadit.com/">
|
|
250
|
-
<img src="https://avatars.githubusercontent.com/u/125754?s=200&v=4" width="200px;" alt="Transloadit logo" />
|
|
251
|
-
</a>
|
|
252
|
-
<br />
|
|
253
|
-
<b>Transloadit</b>
|
|
254
|
-
<br />
|
|
255
|
-
<a href="https://transloadit.com">transloadit.com</a>
|
|
256
|
-
<br/>
|
|
257
|
-
<p>Simple file processing for developers.</p>
|
|
258
218
|
</td>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
<a href="https://infisical.com">
|
|
263
|
-
<img src="https://avatars.githubusercontent.com/u/107880645?s=200&v=4" width="200px;" alt="Infisical logo" />
|
|
219
|
+
<!-- <td align="center">
|
|
220
|
+
<a href="https://proxy.com/">
|
|
221
|
+
<img src="https://avatars.githubusercontent.com/u/14321439?s=200&v=4" width="200px;" alt="Proxy logo" />
|
|
264
222
|
</a>
|
|
265
223
|
<br />
|
|
266
|
-
<b>
|
|
224
|
+
<b>Proxy</b>
|
|
267
225
|
<br />
|
|
268
|
-
<a href="https://
|
|
269
|
-
|
|
270
|
-
<p>Open-source platform for secret<br/>management: sync secrets across your<br/>team/infrastructure and prevent secret leaks.</p>
|
|
271
|
-
</td>
|
|
226
|
+
<a href="https://proxy.com">proxy.com</a>
|
|
227
|
+
</td> -->
|
|
272
228
|
</tr>
|
|
273
229
|
</table>
|
|
274
230
|
|
|
@@ -406,7 +362,7 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
|
|
|
406
362
|
</td>
|
|
407
363
|
</tr>
|
|
408
364
|
<tr>
|
|
409
|
-
|
|
365
|
+
<td align="center">
|
|
410
366
|
<a href="https://learnwithjason.dev">
|
|
411
367
|
<img src="https://avatars.githubusercontent.com/u/66575486?s=200&v=4" width="100px;" alt="Learn with Jason logo"/>
|
|
412
368
|
</a>
|
|
@@ -426,16 +382,17 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
|
|
|
426
382
|
<a href="https://ill.inc/">ill.inc</a>
|
|
427
383
|
<br />
|
|
428
384
|
</td>
|
|
429
|
-
|
|
430
|
-
<a href="https://www.
|
|
431
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
385
|
+
<!-- <td align="center">
|
|
386
|
+
<a href="https://www.avanawallet.com/">
|
|
387
|
+
<img src="https://avatars.githubusercontent.com/u/105452197?s=200&v=4" width="100px;" alt="Avana Wallet logo"/>
|
|
432
388
|
</a>
|
|
433
389
|
<br />
|
|
434
|
-
<b>
|
|
390
|
+
<b>Avana Wallet</b>
|
|
435
391
|
<br/>
|
|
436
|
-
<a href="https://www.
|
|
392
|
+
<a href="https://www.avanawallet.com/">avanawallet.com</a><br/>
|
|
393
|
+
<span>Solana non-custodial wallet</span>
|
|
437
394
|
<br />
|
|
438
|
-
</td>
|
|
395
|
+
</td> -->
|
|
439
396
|
</tr>
|
|
440
397
|
</table>
|
|
441
398
|
|
|
@@ -456,12 +413,9 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
456
413
|
- [`domain-functions`](https://github.com/SeasonedSoftware/domain-functions/): Decouple your business logic from your framework using composable functions. With first-class type inference from end to end powered by Zod schemas.
|
|
457
414
|
- [`@zodios/core`](https://github.com/ecyrbe/zodios): A typescript API client with runtime and compile time validation backed by axios and zod.
|
|
458
415
|
- [`express-zod-api`](https://github.com/RobinTail/express-zod-api): Build Express-based APIs with I/O schema validation and custom middlewares.
|
|
459
|
-
- [`tapiduck`](https://github.com/sumukhbarve/monoduck/blob/main/src/tapiduck/README.md): End-to-end typesafe JSON APIs with Zod and Express; a bit like tRPC, but simpler.
|
|
460
|
-
- [`koa-zod-router`](https://github.com/JakeFenley/koa-zod-router): Create typesafe routes in Koa with I/O validation using Zod.
|
|
461
416
|
|
|
462
417
|
#### Form integrations
|
|
463
418
|
|
|
464
|
-
- [`conform`](https://conform.guide/api/zod): A progressive enhancement first form validation library for Remix and React Router
|
|
465
419
|
- [`react-hook-form`](https://github.com/react-hook-form/resolvers#zod): A first-party Zod resolver for React Hook Form.
|
|
466
420
|
- [`zod-validation-error`](https://github.com/causaly/zod-validation-error): Generate user-friendly error messages from `ZodError`s.
|
|
467
421
|
- [`zod-formik-adapter`](https://github.com/robertLichtnow/zod-formik-adapter): A community-maintained Formik adapter for Zod.
|
|
@@ -472,9 +426,6 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
472
426
|
- [`zod-i18n-map`](https://github.com/aiji42/zod-i18n): Useful for translating Zod error messages.
|
|
473
427
|
- [`@modular-forms/solid`](https://github.com/fabian-hiller/modular-forms): Modular form library for SolidJS that supports Zod for validation.
|
|
474
428
|
- [`houseform`](https://github.com/crutchcorn/houseform/): A React form library that uses Zod for validation.
|
|
475
|
-
- [`sveltekit-superforms`](https://github.com/ciscoheat/sveltekit-superforms): Supercharged form library for SvelteKit with Zod validation.
|
|
476
|
-
- [`mobx-zod-form`](https://github.com/MonoidDev/mobx-zod-form): Data-first form builder based on MobX & Zod.
|
|
477
|
-
- [`@vee-validate/zod`](https://github.com/logaretm/vee-validate/tree/main/packages/zod): Form library for Vue.js with Zod schema validation.
|
|
478
429
|
|
|
479
430
|
#### Zod to X
|
|
480
431
|
|
|
@@ -486,9 +437,6 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
486
437
|
- [`fastify-type-provider-zod`](https://github.com/turkerdev/fastify-type-provider-zod): Create Fastify type providers from Zod schemas.
|
|
487
438
|
- [`zod-to-openapi`](https://github.com/asteasolutions/zod-to-openapi): Generate full OpenAPI (Swagger) docs from Zod, including schemas, endpoints & parameters.
|
|
488
439
|
- [`nestjs-graphql-zod`](https://github.com/incetarik/nestjs-graphql-zod): Generates NestJS GraphQL model classes from Zod schemas. Provides GraphQL method decorators working with Zod schemas.
|
|
489
|
-
- [`zod-openapi`](https://github.com/samchungy/zod-openapi): Create full OpenAPI v3.x documentation from Zod schemas.
|
|
490
|
-
- [`fastify-zod-openapi`](https://github.com/samchungy/fastify-zod-openapi): Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas.
|
|
491
|
-
- [`typeschema`](https://typeschema.com/): Universal adapter for schema validation.
|
|
492
440
|
|
|
493
441
|
#### X to Zod
|
|
494
442
|
|
|
@@ -502,19 +450,14 @@ There are a growing number of tools that are built atop or support Zod natively!
|
|
|
502
450
|
- [`prisma-zod-generator`](https://github.com/omar-dulaimi/prisma-zod-generator): Emit Zod schemas from your Prisma schema.
|
|
503
451
|
- [`prisma-trpc-generator`](https://github.com/omar-dulaimi/prisma-trpc-generator): Emit fully implemented tRPC routers and their validation schemas using Zod.
|
|
504
452
|
- [`zod-prisma-types`](https://github.com/chrishoermann/zod-prisma-types) Create Zod types from your Prisma models.
|
|
505
|
-
- [`quicktype`](https://app.quicktype.io/): Convert JSON objects and JSON schemas into Zod schemas.
|
|
506
453
|
|
|
507
454
|
#### Mocking
|
|
508
455
|
|
|
509
456
|
- [`@anatine/zod-mock`](https://github.com/anatine/zod-plugins/tree/main/packages/zod-mock): Generate mock data from a Zod schema. Powered by [faker.js](https://github.com/faker-js/faker).
|
|
510
457
|
- [`zod-mocking`](https://github.com/dipasqualew/zod-mocking): Generate mock data from your Zod schemas.
|
|
511
|
-
- [`zod-fixture`](https://github.com/timdeschryver/zod-fixture): Use your zod schemas to automate the generation of non-relevant test fixtures in a deterministic way.
|
|
512
|
-
- [`zocker`](https://zocker.sigrist.dev): Generate plausible mock-data from your schemas.
|
|
513
|
-
- [`zodock`](https://github.com/ItMaga/zodock) Generate mock data based on Zod schemas.
|
|
514
458
|
|
|
515
459
|
#### Powered by Zod
|
|
516
460
|
|
|
517
|
-
- [`freerstore`](https://github.com/JacobWeisenburger/freerstore): Firestore cost optimizer.
|
|
518
461
|
- [`slonik`](https://github.com/gajus/slonik/tree/gajus/add-zod-validation-backwards-compatible#runtime-validation-and-static-type-inference): Node.js Postgres client with strong Zod integration.
|
|
519
462
|
- [`soly`](https://github.com/mdbetancourt/soly): Create CLI applications with zod.
|
|
520
463
|
- [`zod-xlsx`](https://github.com/sidwebworks/zod-xlsx): A xlsx based resource validator using Zod schemas.
|
|
@@ -551,15 +494,6 @@ bun add zod # bun
|
|
|
551
494
|
pnpm add zod # pnpm
|
|
552
495
|
```
|
|
553
496
|
|
|
554
|
-
Zod also publishes a canary version on every commit. To install the canary:
|
|
555
|
-
|
|
556
|
-
```sh
|
|
557
|
-
npm install zod@canary # npm
|
|
558
|
-
yarn add zod@canary # yarn
|
|
559
|
-
bun add zod@canary # bun
|
|
560
|
-
pnpm add zod@canary # pnpm
|
|
561
|
-
```
|
|
562
|
-
|
|
563
497
|
### From `deno.land/x` (Deno)
|
|
564
498
|
|
|
565
499
|
Unlike Node, Deno relies on direct URL imports instead of a package manager like NPM. Zod is available on [deno.land/x](https://deno.land/x). The latest version can be imported like so:
|
|
@@ -684,7 +618,7 @@ z.coerce.boolean().parse(null); // => false
|
|
|
684
618
|
|
|
685
619
|
## Literals
|
|
686
620
|
|
|
687
|
-
Literal schemas represent a [literal type](https://www.typescriptlang.org/docs/handbook/
|
|
621
|
+
Literal schemas represent a [literal type](https://www.typescriptlang.org/docs/handbook/literal-types.html), like `"hello world"` or `5`.
|
|
688
622
|
|
|
689
623
|
```ts
|
|
690
624
|
const tuna = z.literal("tuna");
|
|
@@ -1032,7 +966,7 @@ FruitEnum.parse("Cantaloupe"); // fails
|
|
|
1032
966
|
|
|
1033
967
|
**Const enums**
|
|
1034
968
|
|
|
1035
|
-
The `.nativeEnum()` function works for `as const` objects as well. ⚠️ `as const`
|
|
969
|
+
The `.nativeEnum()` function works for `as const` objects as well. ⚠️ `as const` required TypeScript 3.4+!
|
|
1036
970
|
|
|
1037
971
|
```ts
|
|
1038
972
|
const Fruits = {
|
|
@@ -1203,13 +1137,13 @@ type NoIDRecipe = z.infer<typeof NoIDRecipe>;
|
|
|
1203
1137
|
|
|
1204
1138
|
### `.partial`
|
|
1205
1139
|
|
|
1206
|
-
Inspired by the built-in TypeScript utility type [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#
|
|
1140
|
+
Inspired by the built-in TypeScript utility type [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialt), the `.partial` method makes all properties optional.
|
|
1207
1141
|
|
|
1208
1142
|
Starting from this object:
|
|
1209
1143
|
|
|
1210
1144
|
```ts
|
|
1211
1145
|
const user = z.object({
|
|
1212
|
-
email: z.string()
|
|
1146
|
+
email: z.string()
|
|
1213
1147
|
username: z.string(),
|
|
1214
1148
|
});
|
|
1215
1149
|
// { email: string; username: string }
|
|
@@ -1273,12 +1207,10 @@ Contrary to the `.partial` method, the `.required` method makes all properties r
|
|
|
1273
1207
|
Starting from this object:
|
|
1274
1208
|
|
|
1275
1209
|
```ts
|
|
1276
|
-
const user = z
|
|
1277
|
-
.
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
})
|
|
1281
|
-
.partial();
|
|
1210
|
+
const user = z.object({
|
|
1211
|
+
email: z.string()
|
|
1212
|
+
username: z.string(),
|
|
1213
|
+
}).partial();
|
|
1282
1214
|
// { email?: string | undefined; username?: string | undefined }
|
|
1283
1215
|
```
|
|
1284
1216
|
|
|
@@ -1532,12 +1464,6 @@ type NumberCache = z.infer<typeof NumberCache>;
|
|
|
1532
1464
|
This is particularly useful for storing or caching items by ID.
|
|
1533
1465
|
|
|
1534
1466
|
```ts
|
|
1535
|
-
const userSchema = z.object({ name: z.string() });
|
|
1536
|
-
const userStoreSchema = z.record(userSchema);
|
|
1537
|
-
|
|
1538
|
-
type UserStore = z.infer<typeof userStoreSchema>;
|
|
1539
|
-
// => type UserStore = { [ x: string ]: { name: string } }
|
|
1540
|
-
|
|
1541
1467
|
const userStore: UserStore = {};
|
|
1542
1468
|
|
|
1543
1469
|
userStore["77d2586b-9e8e-4ecf-8b21-ea7e0530eadd"] = {
|
|
@@ -2366,7 +2292,7 @@ A convenience method that returns a "nullish" version of a schema. Nullish schem
|
|
|
2366
2292
|
const nullishString = z.string().nullish(); // string | null | undefined
|
|
2367
2293
|
|
|
2368
2294
|
// equivalent to
|
|
2369
|
-
z.string().
|
|
2295
|
+
z.string().optional().nullable();
|
|
2370
2296
|
```
|
|
2371
2297
|
|
|
2372
2298
|
### `.array`
|
|
@@ -2456,38 +2382,7 @@ type Cat = z.infer<typeof Cat>;
|
|
|
2456
2382
|
|
|
2457
2383
|
Note that branded types do not affect the runtime result of `.parse`. It is a static-only construct.
|
|
2458
2384
|
|
|
2459
|
-
### `.
|
|
2460
|
-
|
|
2461
|
-
`.readonly() => ZodReadonly<this>`
|
|
2462
|
-
|
|
2463
|
-
This method returns a `ZodReadonly` schema instance that parses the input using the base schema, then calls `Object.freeze()` on the result. The inferred type is also marked as `readonly`.
|
|
2464
|
-
|
|
2465
|
-
```ts
|
|
2466
|
-
const schema = z.object({ name: string }).readonly();
|
|
2467
|
-
type schema = z.infer<typeof schema>;
|
|
2468
|
-
// Readonly<{name: string}>
|
|
2469
|
-
|
|
2470
|
-
const result = schema.parse({ name: "fido" });
|
|
2471
|
-
result.name = "simba"; // error
|
|
2472
|
-
```
|
|
2473
|
-
|
|
2474
|
-
The inferred type uses TypeScript's built-in readonly types when relevant.
|
|
2475
|
-
|
|
2476
|
-
```ts
|
|
2477
|
-
z.array(z.string()).readonly();
|
|
2478
|
-
// readonly string[]
|
|
2479
|
-
|
|
2480
|
-
z.tuple([z.string(), z.number()]).readonly();
|
|
2481
|
-
// readonly [string, number]
|
|
2482
|
-
|
|
2483
|
-
z.map(z.string(), z.date()).readonly();
|
|
2484
|
-
// ReadonlyMap<string, Date>
|
|
2485
|
-
|
|
2486
|
-
z.set(z.string()).readonly();
|
|
2487
|
-
// ReadonlySet<Promise<string>>
|
|
2488
|
-
```
|
|
2489
|
-
|
|
2490
|
-
### `.pipe`
|
|
2385
|
+
### `.pipe()`
|
|
2491
2386
|
|
|
2492
2387
|
Schemas can be chained into validation "pipelines". It's useful for easily validating the result after a `.transform()`:
|
|
2493
2388
|
|
|
@@ -2504,55 +2399,51 @@ The `.pipe()` method returns a `ZodPipeline` instance.
|
|
|
2504
2399
|
You can constrain the input to types that work well with your chosen coercion. Then use `.pipe()` to apply the coercion.
|
|
2505
2400
|
|
|
2506
2401
|
without constrained input:
|
|
2507
|
-
|
|
2508
2402
|
```ts
|
|
2509
|
-
const toDate = z.coerce.date()
|
|
2403
|
+
const toDate = z.coerce.date()
|
|
2510
2404
|
|
|
2511
2405
|
// works intuitively
|
|
2512
|
-
console.log(toDate.safeParse(
|
|
2406
|
+
console.log(toDate.safeParse('2023-01-01').success) // true
|
|
2513
2407
|
|
|
2514
2408
|
// might not be what you want
|
|
2515
|
-
console.log(toDate.safeParse(null).success)
|
|
2409
|
+
console.log(toDate.safeParse(null).success) // true
|
|
2516
2410
|
```
|
|
2517
2411
|
|
|
2518
2412
|
with constrained input:
|
|
2519
|
-
|
|
2520
2413
|
```ts
|
|
2521
|
-
const datelike = z.union([z.number(), z.string(), z.date()])
|
|
2522
|
-
const datelikeToDate = datelike.pipe(z.coerce.date())
|
|
2414
|
+
const datelike = z.union([z.number(), z.string(), z.date()])
|
|
2415
|
+
const datelikeToDate = datelike.pipe(z.coerce.date())
|
|
2523
2416
|
|
|
2524
2417
|
// still works intuitively
|
|
2525
|
-
console.log(datelikeToDate.safeParse(
|
|
2418
|
+
console.log(datelikeToDate.safeParse('2023-01-01').success) // true
|
|
2526
2419
|
|
|
2527
2420
|
// more likely what you want
|
|
2528
|
-
console.log(datelikeToDate.safeParse(null).success)
|
|
2421
|
+
console.log(datelikeToDate.safeParse(null).success) // false
|
|
2529
2422
|
```
|
|
2530
2423
|
|
|
2531
2424
|
You can also use this technique to avoid coercions that throw uncaught errors.
|
|
2532
2425
|
|
|
2533
2426
|
without constrained input:
|
|
2534
|
-
|
|
2535
2427
|
```ts
|
|
2536
|
-
const toBigInt = z.coerce.bigint()
|
|
2428
|
+
const toBigInt = z.coerce.bigint()
|
|
2537
2429
|
|
|
2538
2430
|
// works intuitively
|
|
2539
|
-
console.log(toBigInt.safeParse(
|
|
2431
|
+
console.log( toBigInt.safeParse( '42' ) ) // true
|
|
2540
2432
|
|
|
2541
2433
|
// probably not what you want
|
|
2542
|
-
console.log(toBigInt.safeParse(null))
|
|
2434
|
+
console.log( toBigInt.safeParse( null ) ) // throws uncaught error
|
|
2543
2435
|
```
|
|
2544
2436
|
|
|
2545
2437
|
with constrained input:
|
|
2546
|
-
|
|
2547
2438
|
```ts
|
|
2548
|
-
const toNumber = z.number().or(z.string()).pipe(z.coerce.number())
|
|
2549
|
-
const toBigInt = z.bigint().or(toNumber).pipe(z.coerce.bigint())
|
|
2439
|
+
const toNumber = z.number().or( z.string() ).pipe( z.coerce.number() )
|
|
2440
|
+
const toBigInt = z.bigint().or( toNumber ).pipe( z.coerce.bigint() )
|
|
2550
2441
|
|
|
2551
2442
|
// still works intuitively
|
|
2552
|
-
console.log(toBigInt.safeParse(
|
|
2443
|
+
console.log( toBigInt.safeParse( '42' ).success ) // true
|
|
2553
2444
|
|
|
2554
2445
|
// error handled by zod, more likely what you want
|
|
2555
|
-
console.log(toBigInt.safeParse(null).success)
|
|
2446
|
+
console.log( toBigInt.safeParse( null ).success ) // false
|
|
2556
2447
|
```
|
|
2557
2448
|
|
|
2558
2449
|
## Guides and concepts
|
|
@@ -2763,6 +2654,7 @@ Yup is a full-featured library that was implemented first in vanilla JS, and lat
|
|
|
2763
2654
|
|
|
2764
2655
|
- Supports casting and transforms
|
|
2765
2656
|
- All object fields are optional by default
|
|
2657
|
+
- Missing object methods: (partial, deepPartial)
|
|
2766
2658
|
<!-- - Missing nonempty arrays with proper typing (`[T, ...T[]]`) -->
|
|
2767
2659
|
- Missing promise schemas
|
|
2768
2660
|
- Missing function schemas
|
|
@@ -2825,7 +2717,7 @@ This more declarative API makes schema definitions vastly more concise.
|
|
|
2825
2717
|
|
|
2826
2718
|
[https://github.com/pelotom/runtypes](https://github.com/pelotom/runtypes)
|
|
2827
2719
|
|
|
2828
|
-
Good type inference support. They DO support readonly types, which Zod does not.
|
|
2720
|
+
Good type inference support, but limited options for object type masking (no `.pick` , `.omit` , `.extend` , etc.). No support for `Record` s (their `Record` is equivalent to Zod's `object` ). They DO support readonly types, which Zod does not.
|
|
2829
2721
|
|
|
2830
2722
|
- Supports "pattern matching": computed properties that distribute over unions
|
|
2831
2723
|
- Supports readonly types
|
|
@@ -89,8 +89,7 @@ class ParseStatus {
|
|
|
89
89
|
status.dirty();
|
|
90
90
|
if (value.status === "dirty")
|
|
91
91
|
status.dirty();
|
|
92
|
-
if (
|
|
93
|
-
(typeof value.value !== "undefined" || pair.alwaysSet)) {
|
|
92
|
+
if (typeof value.value !== "undefined" || pair.alwaysSet) {
|
|
94
93
|
finalObject[key.value] = value.value;
|
|
95
94
|
}
|
|
96
95
|
}
|