@aws-amplify/graphql-api-construct 1.16.0-gen2-migration-1015.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +78 -151
- package/API.md +1 -11
- package/CHANGELOG.md +17 -1
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +9 -12
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/internal/metadata.d.ts +4 -0
- package/lib/internal/metadata.js +42 -0
- package/lib/model-datasource-strategy-types.d.ts +1 -19
- package/lib/model-datasource-strategy-types.js +1 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +14 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +14 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.d.ts +44 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.js +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.d.ts +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/{session-model.js → conversation-model.js} +18 -24
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +10 -10
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +46 -51
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.d.ts +14 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js +30 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts +1 -24
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js +1 -7
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.js +53 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.js +21 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.js +41 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.js +15 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.js +11 -13
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.d.ts +23 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.js +18 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.js +85 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{assistant-messages-subscription-resolver-fn.template.js → templates/assistant-messages-subscription-resolver-fn.template.js} +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{invoke-lambda-resolver-fn.template.js → templates/invoke-lambda-resolver-fn.template.js} +8 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{list-messages-init-resolver-fn.template.js → templates/list-messages-init-resolver-fn.template.js} +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/graphql-json-schema-type.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.js +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils/tools.d.ts → tools/process-tools.d.ts} +8 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils/tools.js → tools/process-tools.js} +21 -21
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts +3 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js +65 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +18 -19
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +2 -7
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js +48 -98
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +14 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +2 -2
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +2 -3
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +5 -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/package.json +12 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -13
- 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 +2 -7
- 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/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/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +3 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts +0 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js +2 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +1 -6
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +10 -13
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +5 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +0 -3
- 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/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +1 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +1 -7
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +0 -1
- 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 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +1 -9
- 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 +5 -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 -9
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +18 -18
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +0 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -7
- 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 +2 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -2
- 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 +1 -9
- 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 +6 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +1 -11
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +0 -11
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +1 -6
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +0 -10
- 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 +1 -0
- package/node_modules/graphql-transformer-common/CHANGELOG.md +7 -3
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +1 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +1 -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 +22 -22
- package/src/amplify-graphql-api.ts +12 -12
- package/src/internal/metadata.ts +40 -0
- package/src/model-datasource-strategy-types.ts +0 -21
- package/src/types.ts +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts +0 -10
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js +0 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js +0 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +0 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +0 -22
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +0 -77
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +0 -5
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +0 -34
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts +0 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js +0 -205
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/.package-lock.json +0 -13
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/LICENSE +0 -47
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/README.md +0 -18
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/index.js +0 -1848
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/package.json +0 -16
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package-lock.json +0 -21
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package.json +0 -11
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +0 -201
- package/node_modules/graphql-mapping-template/LICENSE +0 -201
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{assistant-mutation-resolver-fn.template.js → templates/assistant-mutation-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{auth-resolver-fn.template.js → templates/auth-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{init-resolver-fn.template.js → templates/init-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{verify-session-owner-resolver-fn.template.js → templates/verify-session-owner-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{write-message-to-table-resolver-fn.template.js → templates/write-message-to-table-resolver-fn.template.js} +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
|
-
## [5.0.2-gen2-migration-1015.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@5.0.1...graphql-mapping-template@5.0.2-gen2-migration-1015.0) (2024-10-15)
|
7
|
-
|
8
|
-
**Note:** Version bump only for package graphql-mapping-template
|
9
|
-
|
10
6
|
## [5.0.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@5.0.0...graphql-mapping-template@5.0.1) (2024-09-06)
|
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": "5.0.
|
3
|
+
"version": "5.0.1",
|
4
4
|
"description": "An AST wrapper around AWS AppSync resolvers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -64,6 +64,5 @@
|
|
64
64
|
"escapeString": true,
|
65
65
|
"printBasicPrototype": true
|
66
66
|
}
|
67
|
-
}
|
68
|
-
"gitHead": "3be96e2f9b1458117e458514e28a9bb19a21cbe8"
|
67
|
+
}
|
69
68
|
}
|
@@ -3,15 +3,19 @@
|
|
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
|
-
# [5.1.0
|
6
|
+
# [5.1.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@5.0.1...graphql-transformer-common@5.1.0) (2024-10-28)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- enable IAM auth for custom types ([#2961](https://github.com/aws-amplify/amplify-category-api/issues/2961)) ([#2971](https://github.com/aws-amplify/amplify-category-api/issues/2971)) ([0e003d2](https://github.com/aws-amplify/amplify-category-api/commit/0e003d2656c46171c7fa2e947c92d701ede94f22))
|
7
11
|
|
8
12
|
### Features
|
9
13
|
|
10
|
-
-
|
14
|
+
- generate ts schema from pg serial field ([#2952](https://github.com/aws-amplify/amplify-category-api/issues/2952)) ([6b87331](https://github.com/aws-amplify/amplify-category-api/commit/6b873316c0af991d9f884f4006857a246eda5533))
|
11
15
|
|
12
16
|
### Reverts
|
13
17
|
|
14
|
-
- Revert "
|
18
|
+
- Revert "fix: enable IAM auth for custom types (#2961) (#2971)" (#2975) ([8da7802](https://github.com/aws-amplify/amplify-category-api/commit/8da7802b5a4e3518c1a2617269f31db8f5769c07)), closes [#2961](https://github.com/aws-amplify/amplify-category-api/issues/2961) [#2971](https://github.com/aws-amplify/amplify-category-api/issues/2971) [#2975](https://github.com/aws-amplify/amplify-category-api/issues/2975)
|
15
19
|
|
16
20
|
## [5.0.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@5.0.0...graphql-transformer-common@5.0.1) (2024-09-06)
|
17
21
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B5C,CAAC"}
|
@@ -1 +1 @@
|
|
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,wBAAwB,EAAE,SAAS;IACnC,eAAe,EAAE,QAAQ;IACzB,mBAAmB,EAAE,YAAY;CAClC,CAAC"}
|
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,cAAc,EAAE,SAAS;IACzB,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,wBAAwB,EAAE,SAAS;IACnC,eAAe,EAAE,QAAQ;IACzB,mBAAmB,EAAE,YAAY;CAClC,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "graphql-transformer-common",
|
3
|
-
"version": "5.1.0
|
3
|
+
"version": "5.1.0",
|
4
4
|
"description": "Common code and constants for AppSync Transformers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
28
|
"graphql": "^15.5.0",
|
29
|
-
"graphql-mapping-template": "5.0.
|
29
|
+
"graphql-mapping-template": "5.0.1",
|
30
30
|
"md5": "^2.2.1",
|
31
31
|
"pluralize": "8.0.0"
|
32
32
|
},
|
@@ -73,5 +73,5 @@
|
|
73
73
|
"printBasicPrototype": true
|
74
74
|
}
|
75
75
|
},
|
76
|
-
"gitHead": "
|
76
|
+
"gitHead": "b5f095c196b28065ff2c82b6e89894890f887bcc"
|
77
77
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-api-construct",
|
3
|
-
"version": "1.16.0
|
3
|
+
"version": "1.16.0",
|
4
4
|
"description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -161,23 +161,23 @@
|
|
161
161
|
"@aws-amplify/ai-constructs": "^0.2.0",
|
162
162
|
"@aws-amplify/backend-output-schemas": "^1.0.0",
|
163
163
|
"@aws-amplify/backend-output-storage": "^1.0.0",
|
164
|
-
"@aws-amplify/graphql-auth-transformer": "4.1.
|
165
|
-
"@aws-amplify/graphql-conversation-transformer": "0.
|
166
|
-
"@aws-amplify/graphql-default-value-transformer": "3.1.
|
167
|
-
"@aws-amplify/graphql-directives": "2.4.0
|
168
|
-
"@aws-amplify/graphql-function-transformer": "3.1.
|
169
|
-
"@aws-amplify/graphql-generation-transformer": "0.2.
|
170
|
-
"@aws-amplify/graphql-http-transformer": "3.0.
|
171
|
-
"@aws-amplify/graphql-index-transformer": "3.0.
|
172
|
-
"@aws-amplify/graphql-maps-to-transformer": "4.0.
|
173
|
-
"@aws-amplify/graphql-model-transformer": "3.
|
174
|
-
"@aws-amplify/graphql-predictions-transformer": "3.0.
|
175
|
-
"@aws-amplify/graphql-relational-transformer": "3.
|
176
|
-
"@aws-amplify/graphql-searchable-transformer": "3.0.
|
177
|
-
"@aws-amplify/graphql-sql-transformer": "0.4.
|
178
|
-
"@aws-amplify/graphql-transformer": "2.1.
|
179
|
-
"@aws-amplify/graphql-transformer-core": "3.
|
180
|
-
"@aws-amplify/graphql-transformer-interfaces": "4.2
|
164
|
+
"@aws-amplify/graphql-auth-transformer": "4.1.5",
|
165
|
+
"@aws-amplify/graphql-conversation-transformer": "0.5.0",
|
166
|
+
"@aws-amplify/graphql-default-value-transformer": "3.1.2",
|
167
|
+
"@aws-amplify/graphql-directives": "2.4.0",
|
168
|
+
"@aws-amplify/graphql-function-transformer": "3.1.4",
|
169
|
+
"@aws-amplify/graphql-generation-transformer": "0.2.5",
|
170
|
+
"@aws-amplify/graphql-http-transformer": "3.0.7",
|
171
|
+
"@aws-amplify/graphql-index-transformer": "3.0.7",
|
172
|
+
"@aws-amplify/graphql-maps-to-transformer": "4.0.7",
|
173
|
+
"@aws-amplify/graphql-model-transformer": "3.0.7",
|
174
|
+
"@aws-amplify/graphql-predictions-transformer": "3.0.7",
|
175
|
+
"@aws-amplify/graphql-relational-transformer": "3.0.7",
|
176
|
+
"@aws-amplify/graphql-searchable-transformer": "3.0.7",
|
177
|
+
"@aws-amplify/graphql-sql-transformer": "0.4.7",
|
178
|
+
"@aws-amplify/graphql-transformer": "2.1.5",
|
179
|
+
"@aws-amplify/graphql-transformer-core": "3.2.2",
|
180
|
+
"@aws-amplify/graphql-transformer-interfaces": "4.1.2",
|
181
181
|
"@aws-amplify/platform-core": "^1.0.0",
|
182
182
|
"@aws-amplify/plugin-types": "^1.0.0",
|
183
183
|
"@aws-crypto/crc32": "5.2.0",
|
@@ -260,8 +260,8 @@
|
|
260
260
|
"fs-extra": "^8.1.0",
|
261
261
|
"graceful-fs": "^4.2.0",
|
262
262
|
"graphql": "^15.5.0",
|
263
|
-
"graphql-mapping-template": "5.0.
|
264
|
-
"graphql-transformer-common": "5.1.0
|
263
|
+
"graphql-mapping-template": "5.0.1",
|
264
|
+
"graphql-transformer-common": "5.1.0",
|
265
265
|
"hjson": "^3.2.2",
|
266
266
|
"immer": "^9.0.12",
|
267
267
|
"is-buffer": "~1.1.6",
|
@@ -282,7 +282,7 @@
|
|
282
282
|
"zod": "^3.22.2"
|
283
283
|
},
|
284
284
|
"devDependencies": {
|
285
|
-
"@aws-amplify/graphql-transformer-test-utils": "1.0.
|
285
|
+
"@aws-amplify/graphql-transformer-test-utils": "1.0.6",
|
286
286
|
"@types/fs-extra": "^8.0.1",
|
287
287
|
"@types/node": "^18.0.0",
|
288
288
|
"aws-cdk-lib": "2.158.0",
|
@@ -353,5 +353,5 @@
|
|
353
353
|
"printBasicPrototype": true
|
354
354
|
}
|
355
355
|
},
|
356
|
-
"gitHead": "
|
356
|
+
"gitHead": "b5f095c196b28065ff2c82b6e89894890f887bcc"
|
357
357
|
}
|
@@ -35,7 +35,6 @@ import type {
|
|
35
35
|
IBackendOutputStorageStrategy,
|
36
36
|
AddFunctionProps,
|
37
37
|
DataStoreConfiguration,
|
38
|
-
IAmplifyGraphqlDefinition,
|
39
38
|
} from './types';
|
40
39
|
import {
|
41
40
|
convertAuthorizationModesToTransformerAuthConfig,
|
@@ -50,6 +49,7 @@ import {
|
|
50
49
|
} from './internal';
|
51
50
|
import { getStackForScope, walkAndProcessNodes } from './internal/construct-tree';
|
52
51
|
import { getDataSourceStrategiesProvider } from './internal/data-source-config';
|
52
|
+
import { getMetadataDataSources, getMetadataAuthorizationModes, getMetadataCustomOperations } from './internal/metadata';
|
53
53
|
|
54
54
|
/**
|
55
55
|
* L3 Construct which invokes the Amplify Transformer Pattern over an input Graphql Schema.
|
@@ -168,11 +168,18 @@ export class AmplifyGraphqlApi extends Construct {
|
|
168
168
|
|
169
169
|
this.dataStoreConfiguration = dataStoreConfiguration || conflictResolution;
|
170
170
|
|
171
|
-
const
|
171
|
+
const attributionMetadata = {
|
172
|
+
dataSources: getMetadataDataSources(definition),
|
173
|
+
authorizationModes: getMetadataAuthorizationModes(authorizationModes),
|
174
|
+
customOperations: getMetadataCustomOperations(definition),
|
175
|
+
};
|
172
176
|
|
173
|
-
new AttributionMetadataStorage().storeAttributionMetadata(
|
174
|
-
|
175
|
-
|
177
|
+
new AttributionMetadataStorage().storeAttributionMetadata(
|
178
|
+
Stack.of(scope),
|
179
|
+
this.stackType,
|
180
|
+
path.join(__dirname, '..', 'package.json'),
|
181
|
+
attributionMetadata,
|
182
|
+
);
|
176
183
|
|
177
184
|
validateAuthorizationModes(authorizationModes);
|
178
185
|
const { authConfig, authSynthParameters } = convertAuthorizationModesToTransformerAuthConfig(authorizationModes);
|
@@ -420,10 +427,3 @@ const validateNoOtherAmplifyGraphqlApiInStack = (scope: Construct): void => {
|
|
420
427
|
throw new Error('Only one AmplifyGraphqlApi is expected in a stack. Place the AmplifyGraphqlApis in separate nested stacks.');
|
421
428
|
}
|
422
429
|
};
|
423
|
-
|
424
|
-
const getMetadataDataSources = (definition: IAmplifyGraphqlDefinition): string => {
|
425
|
-
const dataSourceDbTypes = Object.values(definition.dataSourceStrategies).map((strategy) => strategy.dbType.toLocaleLowerCase());
|
426
|
-
const customSqlDbTypes = (definition.customSqlDataSourceStrategies ?? []).map((strategy) => strategy.strategy.dbType.toLocaleLowerCase());
|
427
|
-
const dataSources = [...new Set([...dataSourceDbTypes, ...customSqlDbTypes])].sort();
|
428
|
-
return dataSources.join(',');
|
429
|
-
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { AuthorizationModes, IAmplifyGraphqlDefinition } from '../types';
|
2
|
+
|
3
|
+
export const getMetadataDataSources = (definition: IAmplifyGraphqlDefinition): string => {
|
4
|
+
const dataSourceDbTypes = Object.values(definition.dataSourceStrategies).map((strategy) => strategy.dbType.toLocaleLowerCase());
|
5
|
+
const customSqlDbTypes = (definition.customSqlDataSourceStrategies ?? []).map((strategy) => strategy.strategy.dbType.toLocaleLowerCase());
|
6
|
+
const dataSources = [...new Set([...dataSourceDbTypes, ...customSqlDbTypes])].sort();
|
7
|
+
return dataSources.join(',');
|
8
|
+
};
|
9
|
+
|
10
|
+
export const getMetadataAuthorizationModes = (authorizationModes: AuthorizationModes): string => {
|
11
|
+
const configKeyToAuthMode: Record<string, string> = {
|
12
|
+
iamConfig: 'aws_iam',
|
13
|
+
oidcConfig: 'openid_connect',
|
14
|
+
identityPoolConfig: 'amazon_cognito_identity_pools',
|
15
|
+
userPoolConfig: 'amazon_cognito_user_pools',
|
16
|
+
apiKeyConfig: 'api_key',
|
17
|
+
lambdaConfig: 'aws_lambda',
|
18
|
+
};
|
19
|
+
const authModes = Object.keys(authorizationModes)
|
20
|
+
.map((mode) => configKeyToAuthMode[mode])
|
21
|
+
// remove values not found in mapping
|
22
|
+
.filter((mode) => !!mode)
|
23
|
+
.sort();
|
24
|
+
return authModes.join(',');
|
25
|
+
};
|
26
|
+
|
27
|
+
export const getMetadataCustomOperations = (definition: IAmplifyGraphqlDefinition): string => {
|
28
|
+
const customOperations: string[] = [];
|
29
|
+
if (definition.schema.includes('type Query')) {
|
30
|
+
customOperations.push('queries');
|
31
|
+
}
|
32
|
+
if (definition.schema.includes('type Mutation')) {
|
33
|
+
customOperations.push('mutations');
|
34
|
+
}
|
35
|
+
if (definition.schema.includes('type Subscription')) {
|
36
|
+
customOperations.push('subscriptions');
|
37
|
+
}
|
38
|
+
|
39
|
+
return customOperations.join(',');
|
40
|
+
};
|
@@ -12,7 +12,6 @@
|
|
12
12
|
export type ModelDataSourceStrategy =
|
13
13
|
| DefaultDynamoDbModelDataSourceStrategy
|
14
14
|
| AmplifyDynamoDbModelDataSourceStrategy
|
15
|
-
| ImportedAmplifyDynamoDbModelDataSourceStrategy
|
16
15
|
| SQLLambdaModelDataSourceStrategy;
|
17
16
|
|
18
17
|
/**
|
@@ -41,26 +40,6 @@ export interface AmplifyDynamoDbModelDataSourceStrategy {
|
|
41
40
|
readonly provisionStrategy: 'AMPLIFY_TABLE';
|
42
41
|
}
|
43
42
|
|
44
|
-
// TODO: decide final naming before merging to main
|
45
|
-
/**
|
46
|
-
* Use custom resource type 'Custom::ImportedAmplifyDynamoDBTable' to manage an imported table.
|
47
|
-
*
|
48
|
-
* Tables can be imported only if they meet the following criteria.
|
49
|
-
* 1. The imported table must have been created with through an Amplify Gen 1 project.
|
50
|
-
* 2. The imported table must be in the same account and region as this construct.
|
51
|
-
* 3. The imported table properties must match the corresponding table properties specified in this construct.
|
52
|
-
* (AttributeDefinitions, KeySchema, GlobalSecondaryIndexes, BillingModeSummary, ProvisionedThroughput, StreamSpecification, SSEDescription, DeletionProtectionEnabled)
|
53
|
-
*
|
54
|
-
* The imported tables will follow the auth rules defined in this construct.
|
55
|
-
* The auth rules of the source Gen 1 project will not apply to the API created by this construct.
|
56
|
-
* Ensure the correct auth rules have been set to prevent data exposure.
|
57
|
-
*/
|
58
|
-
export interface ImportedAmplifyDynamoDbModelDataSourceStrategy {
|
59
|
-
readonly dbType: 'DYNAMODB';
|
60
|
-
readonly provisionStrategy: 'IMPORTED_AMPLIFY_TABLE';
|
61
|
-
readonly tableName: string;
|
62
|
-
}
|
63
|
-
|
64
43
|
/**
|
65
44
|
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
|
66
45
|
*/
|
package/src/types.ts
CHANGED
@@ -753,7 +753,7 @@ export interface AmplifyGraphqlApiProps {
|
|
753
753
|
readonly translationBehavior?: PartialTranslationBehavior;
|
754
754
|
|
755
755
|
/**
|
756
|
-
* Strategy to store construct outputs. If no
|
756
|
+
* Strategy to store construct outputs. If no outputStorageStrategey is provided a default strategy will be used.
|
757
757
|
*/
|
758
758
|
readonly outputStorageStrategy?: IBackendOutputStorageStrategy;
|
759
759
|
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DirectiveNode, FieldDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
2
|
-
export type ConversationModel = {
|
3
|
-
conversationAuthDirective: DirectiveNode;
|
4
|
-
conversationModelDirective: DirectiveNode;
|
5
|
-
conversationHasManyMessagesDirective: DirectiveNode;
|
6
|
-
conversationMessagesField: FieldDefinitionNode;
|
7
|
-
conversationModel: ObjectTypeDefinitionNode;
|
8
|
-
};
|
9
|
-
export declare const createConversationModel: (conversationModelName: string, messageModelName: string, referenceFieldName: string) => ConversationModel;
|
10
|
-
//# sourceMappingURL=session-model.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"session-model.d.ts","sourceRoot":"","sources":["../../src/graphql-types/session-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAyB,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAoB9G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB,EAAE,aAAa,CAAC;IACzC,0BAA0B,EAAE,aAAa,CAAC;IAC1C,oCAAoC,EAAE,aAAa,CAAC;IACpD,yBAAyB,EAAE,mBAAmB,CAAC;IAC/C,iBAAiB,EAAE,wBAAwB,CAAC;CAC7C,CAAC;AAsBF,eAAO,MAAM,uBAAuB,0BACX,MAAM,oBACX,MAAM,sBACJ,MAAM,KACzB,iBAiBF,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"session-model.js","sourceRoot":"","sources":["../../src/graphql-types/session-model.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,qCAA8G;AAC9G,2EASoC;AAsC7B,MAAM,uBAAuB,GAAG,CACrC,qBAA6B,EAC7B,gBAAwB,EACxB,kBAA0B,EACP,EAAE;IACrB,MAAM,yBAAyB,GAAG,0BAA0B,EAAE,CAAC;IAC/D,MAAM,0BAA0B,GAAG,2BAA2B,EAAE,CAAC;IACjE,MAAM,oCAAoC,GAAG,+CAA+C,CAAC,kBAAkB,CAAC,CAAC;IACjH,MAAM,yBAAyB,GAAG,+BAA+B,CAAC,oCAAoC,EAAE,gBAAgB,CAAC,CAAC;IAC1H,MAAM,iBAAiB,GAAG,4BAA4B,CAAC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EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,SAAS,CAAC,CAAC,CAAC;IAErE,OAAO;QACL,GAAG,IAAA,wCAAW,EAAC,SAAS,CAAC;QACzB,MAAM,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,CAAC;QAC3C,UAAU,EAAE,mBAAmB;KAChC,CAAC;AACJ,CAAC,CAAC"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const conversationMessageSubscriptionMappingTamplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
-
//# sourceMappingURL=assistant-messages-subscription-resolver.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"assistant-messages-subscription-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-messages-subscription-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAQzF,eAAO,MAAM,8CAA8C,WAAY,kCAAkC,KAAG,uBAI3G,CAAC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.conversationMessageSubscriptionMappingTamplate = void 0;
|
7
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const path_1 = __importDefault(require("path"));
|
10
|
-
const conversationMessageSubscriptionMappingTamplate = (config) => {
|
11
|
-
const resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'assistant-messages-subscription-resolver-fn.template.js'), 'utf8');
|
12
|
-
const templateName = `Subscription.${config.field.name.value}.assistant-message.js`;
|
13
|
-
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
14
|
-
};
|
15
|
-
exports.conversationMessageSubscriptionMappingTamplate = conversationMessageSubscriptionMappingTamplate;
|
16
|
-
//# sourceMappingURL=assistant-messages-subscription-resolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"assistant-messages-subscription-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-messages-subscription-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AASjB,MAAM,8CAA8C,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACpI,MAAM,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,yDAAyD,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1H,MAAM,YAAY,GAAG,gBAAgB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,uBAAuB,CAAC;IACpF,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAJW,QAAA,8CAA8C,kDAIzD"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const assistantMutationResolver: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
-
//# sourceMappingURL=assistant-mutation-resolver.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"assistant-mutation-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AASzF,eAAO,MAAM,yBAAyB,WAAY,kCAAkC,KAAG,uBAYtF,CAAC"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.assistantMutationResolver = void 0;
|
7
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const path_1 = __importDefault(require("path"));
|
10
|
-
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
11
|
-
const assistantMutationResolver = (config) => {
|
12
|
-
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'assistant-mutation-resolver-fn.template.js'), 'utf8');
|
13
|
-
const fieldName = (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
14
|
-
const substitutions = {
|
15
|
-
CONVERSATION_MESSAGE_TYPE_NAME: `ConversationMessage${fieldName}`,
|
16
|
-
};
|
17
|
-
Object.entries(substitutions).forEach(([key, value]) => {
|
18
|
-
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
19
|
-
resolver = replaced;
|
20
|
-
});
|
21
|
-
const templateName = `Mutation.${config.field.name.value}.assistant-response.js`;
|
22
|
-
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
23
|
-
};
|
24
|
-
exports.assistantMutationResolver = assistantMutationResolver;
|
25
|
-
//# sourceMappingURL=assistant-mutation-resolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"assistant-mutation-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAExB,2EAAqD;AAQ9C,MAAM,yBAAyB,GAAG,CAAC,MAA0C,EAA2B,EAAE;IAC/G,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,4CAA4C,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3G,MAAM,SAAS,GAAG,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG;QACpB,8BAA8B,EAAE,sBAAsB,SAAS,EAAE;KAClE,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,wBAAwB,CAAC;IACjF,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const authMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
-
//# sourceMappingURL=auth-resolver.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auth-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/auth-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAQzF,eAAO,MAAM,mBAAmB,WAAY,kCAAkC,KAAG,uBAIhF,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.authMappingTemplate = void 0;
|
7
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const path_1 = __importDefault(require("path"));
|
10
|
-
const authMappingTemplate = (config) => {
|
11
|
-
const resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'auth-resolver-fn.template.js'), 'utf8');
|
12
|
-
const templateName = `Mutation.${config.field.name.value}.auth.js`;
|
13
|
-
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
14
|
-
};
|
15
|
-
exports.authMappingTemplate = authMappingTemplate;
|
16
|
-
//# sourceMappingURL=auth-resolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auth-resolver.js","sourceRoot":"","sources":["../../src/resolvers/auth-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AASjB,MAAM,mBAAmB,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACzG,MAAM,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/F,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC;IACnE,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAUlH,eAAO,MAAM,mBAAmB,QAAS,0BAA0B,KAAG,uBAYrE,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.initMappingTemplate = void 0;
|
7
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const path_1 = __importDefault(require("path"));
|
10
|
-
const initMappingTemplate = (ctx) => {
|
11
|
-
const substitutions = {
|
12
|
-
GRAPHQL_API_ENDPOINT: ctx.api.graphqlUrl,
|
13
|
-
};
|
14
|
-
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'init-resolver-fn.template.js'), 'utf8');
|
15
|
-
Object.entries(substitutions).forEach(([key, value]) => {
|
16
|
-
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
17
|
-
resolver = replaced;
|
18
|
-
});
|
19
|
-
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString(resolver);
|
20
|
-
};
|
21
|
-
exports.initMappingTemplate = initMappingTemplate;
|
22
|
-
//# sourceMappingURL=init-resolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAQjB,MAAM,mBAAmB,GAAG,CAAC,GAA+B,EAA2B,EAAE;IAC9F,MAAM,aAAa,GAAG;QACpB,oBAAoB,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU;KACzC,CAAC;IAEF,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC,CAAC;IAC7F,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,0CAAe,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const invokeLambdaMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
-
//# sourceMappingURL=invoke-lambda-resolver.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"invoke-lambda-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAElH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAczF,eAAO,MAAM,2BAA2B,WAAY,kCAAkC,KAAG,uBAuCxF,CAAC"}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.invokeLambdaMappingTemplate = void 0;
|
7
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
9
|
-
const path_1 = __importDefault(require("path"));
|
10
|
-
const ts_dedent_1 = __importDefault(require("ts-dedent"));
|
11
|
-
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
12
|
-
const pluralize_1 = __importDefault(require("pluralize"));
|
13
|
-
const invokeLambdaMappingTemplate = (config) => {
|
14
|
-
const { TOOL_DEFINITIONS_LINE, TOOLS_CONFIGURATION_LINE } = generateToolLines(config);
|
15
|
-
const SELECTION_SET = selectionSet;
|
16
|
-
const MODEL_CONFIGURATION_LINE = generateModelConfigurationLine(config);
|
17
|
-
const RESPONSE_MUTATION_NAME = config.responseMutationName;
|
18
|
-
const RESPONSE_MUTATION_INPUT_TYPE_NAME = config.responseMutationInputTypeName;
|
19
|
-
const MESSAGE_MODEL_NAME = config.messageModel.messageModel.name.value;
|
20
|
-
const GET_QUERY_NAME = `getConversationMessage${(0, graphql_transformer_common_1.toUpper)(config.field.name.value)}`;
|
21
|
-
const GET_QUERY_INPUT_TYPE_NAME = 'ID';
|
22
|
-
const LIST_QUERY_NAME = `listConversationMessage${(0, graphql_transformer_common_1.toUpper)((0, pluralize_1.default)(config.field.name.value))}`;
|
23
|
-
const LIST_QUERY_INPUT_TYPE_NAME = `ModelConversationMessage${(0, graphql_transformer_common_1.toUpper)(config.field.name.value)}FilterInput`;
|
24
|
-
const LIST_QUERY_LIMIT = 'undefined';
|
25
|
-
const substitutions = {
|
26
|
-
TOOL_DEFINITIONS_LINE,
|
27
|
-
TOOLS_CONFIGURATION_LINE,
|
28
|
-
SELECTION_SET,
|
29
|
-
MODEL_CONFIGURATION_LINE,
|
30
|
-
RESPONSE_MUTATION_NAME,
|
31
|
-
RESPONSE_MUTATION_INPUT_TYPE_NAME,
|
32
|
-
MESSAGE_MODEL_NAME,
|
33
|
-
GET_QUERY_NAME,
|
34
|
-
GET_QUERY_INPUT_TYPE_NAME,
|
35
|
-
LIST_QUERY_NAME,
|
36
|
-
LIST_QUERY_INPUT_TYPE_NAME,
|
37
|
-
LIST_QUERY_LIMIT,
|
38
|
-
};
|
39
|
-
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'invoke-lambda-resolver-fn.template.js'), 'utf8');
|
40
|
-
Object.entries(substitutions).forEach(([key, value]) => {
|
41
|
-
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
42
|
-
resolver = replaced;
|
43
|
-
});
|
44
|
-
const templateName = `Mutation.${config.field.name.value}.invoke-lambda.js`;
|
45
|
-
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
46
|
-
};
|
47
|
-
exports.invokeLambdaMappingTemplate = invokeLambdaMappingTemplate;
|
48
|
-
const generateToolLines = (config) => {
|
49
|
-
const toolDefinitions = JSON.stringify(config.toolSpec);
|
50
|
-
const TOOL_DEFINITIONS_LINE = toolDefinitions ? `const toolDefinitions = ${toolDefinitions};` : '';
|
51
|
-
const TOOLS_CONFIGURATION_LINE = toolDefinitions
|
52
|
-
? (0, ts_dedent_1.default) `const dataTools = toolDefinitions.tools;
|
53
|
-
const toolsConfiguration = {
|
54
|
-
dataTools,
|
55
|
-
clientTools,
|
56
|
-
};`
|
57
|
-
: (0, ts_dedent_1.default) `const toolsConfiguration = {
|
58
|
-
clientTools
|
59
|
-
};`;
|
60
|
-
return { TOOL_DEFINITIONS_LINE, TOOLS_CONFIGURATION_LINE };
|
61
|
-
};
|
62
|
-
const generateModelConfigurationLine = (config) => {
|
63
|
-
const { aiModel, systemPrompt } = config;
|
64
|
-
return (0, ts_dedent_1.default) `const modelConfiguration = {
|
65
|
-
modelId: '${aiModel}',
|
66
|
-
systemPrompt: ${JSON.stringify(systemPrompt)},
|
67
|
-
${generateModelInferenceConfigurationLine(config)}
|
68
|
-
};`;
|
69
|
-
};
|
70
|
-
const generateModelInferenceConfigurationLine = (config) => {
|
71
|
-
const { inferenceConfiguration } = config;
|
72
|
-
return inferenceConfiguration && Object.keys(inferenceConfiguration).length > 0
|
73
|
-
? (0, ts_dedent_1.default) `inferenceConfiguration: ${JSON.stringify(config.inferenceConfiguration)},`
|
74
|
-
: '';
|
75
|
-
};
|
76
|
-
const selectionSet = `id conversationId content { image { format source { bytes }} text toolUse { toolUseId name input } toolResult { status toolUseId content { json text image { format source { bytes }} document { format name source { bytes }} }}} role owner createdAt updatedAt`;
|
77
|
-
//# sourceMappingURL=invoke-lambda-resolver.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"invoke-lambda-resolver.js","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":";;;;;;AACA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AACxB,0DAA+B;AAC/B,2EAAqD;AACrD,0DAAkC;AAS3B,MAAM,2BAA2B,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACjH,MAAM,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,YAAY,CAAC;IACnC,MAAM,wBAAwB,GAAG,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,sBAAsB,GAAG,MAAM,CAAC,oBAAoB,CAAC;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AAY,GAAG,mQAAmQ,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const verifySessionOwnerSendMessageMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
-
export declare const verifySessionOwnerAssistantResponseMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
5
|
-
//# sourceMappingURL=verify-session-owner-resolver.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"verify-session-owner-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/verify-session-owner-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAOzF,eAAO,MAAM,4CAA4C,WAAY,kCAAkC,KAAG,uBAMzG,CAAC;AAOF,eAAO,MAAM,kDAAkD,WAAY,kCAAkC,KAAG,uBAM/G,CAAC"}
|