@aws-amplify/graphql-api-construct 1.16.0-ai-streaming.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +20 -20
- package/CHANGELOG.md +5 -3
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +1 -1
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +1 -12
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +2 -22
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.d.ts +2 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.d.ts +2 -8
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +34 -196
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_message_history_retriever.js +8 -34
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +3 -5
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +5 -20
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +1 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +7 -6
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +2 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +7 -7
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +2 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.d.ts +1 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.js +2 -4
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +2 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +2 -4
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +14 -47
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/package.json +2 -9
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +2 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +2 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +9 -20
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/schema.d.ts +0 -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 +1 -8
- 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 +12 -12
- package/node_modules/@aws-amplify/graphql-conversation-transformer/API.md +0 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +3 -3
- 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 -13
- 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 -99
- 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 -30
- 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 -41
- 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 -16
- 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 -20
- 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 -8
- 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 +44 -116
- 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 +11 -11
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +0 -4
- package/node_modules/@aws-amplify/graphql-directives/package.json +2 -3
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +6 -6
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +6 -6
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +6 -6
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +10 -10
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +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/package.json +6 -6
- 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 +6 -6
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +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 +7 -7
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +7 -7
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +17 -17
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +0 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +2 -4
- 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/graphql-utils.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js +1 -6
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/graphql-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +4 -4
- package/node_modules/graphql-transformer-common/API.md +1 -3
- package/node_modules/graphql-transformer-common/CHANGELOG.md +9 -1
- 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/lib/definition.d.ts +0 -1
- package/node_modules/graphql-transformer-common/lib/definition.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/definition.js +1 -20
- package/node_modules/graphql-transformer-common/lib/definition.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +2 -2
- package/package.json +21 -21
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.js +0 -38
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.d.ts +0 -7
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.js +0 -16
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/README.md +0 -4
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.d.ts +0 -113
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.d.ts +0 -112
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.js +0 -30
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.d.ts +0 -59
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.js +0 -12
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.d.ts +0 -59
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.js +0 -25
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.d.ts +0 -508
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.js +0 -112
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.d.ts +0 -2
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.js +0 -18
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.d.ts +0 -42
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.js +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.d.ts +0 -28
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.d.ts +0 -27
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.js +0 -12
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.d.ts +0 -33
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.d.ts +0 -32
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.js +0 -33
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/package.json +0 -27
- 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/assistant-streaming-mutation-reduce-chunks-resolver-fn.template.js +0 -105
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver-fn.template.js +0 -125
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-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 -84
- 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-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
@@ -0,0 +1,41 @@
|
|
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.generateResolverFunction = exports.generateResolverPipeline = void 0;
|
7
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
9
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
10
|
+
const path_1 = __importDefault(require("path"));
|
11
|
+
const generateResolverPipeline = (pipelineDefinition, directiveConfig, ctx) => {
|
12
|
+
const { typeName, fieldName } = pipelineDefinition.field(directiveConfig);
|
13
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(typeName, fieldName);
|
14
|
+
const codeMappingTemplate = (0, exports.generateResolverFunction)(pipelineDefinition.dataSlot, directiveConfig, ctx);
|
15
|
+
const dataSourceProvider = pipelineDefinition.dataSlot.dataSource(directiveConfig);
|
16
|
+
const requestSlots = pipelineDefinition.requestSlots.map((slot) => slot.slotName);
|
17
|
+
const responseSlots = pipelineDefinition.responseSlots.map((slot) => slot.slotName);
|
18
|
+
const pipelineResolver = new graphql_transformer_core_1.TransformerResolver(typeName, fieldName, resolverResourceId, { codeMappingTemplate }, requestSlots, responseSlots, dataSourceProvider, graphql_transformer_core_1.APPSYNC_JS_RUNTIME);
|
19
|
+
const resolverSlots = [...pipelineDefinition.requestSlots, ...pipelineDefinition.responseSlots];
|
20
|
+
for (const slot of resolverSlots) {
|
21
|
+
const mappingTemplate = (0, exports.generateResolverFunction)(slot, directiveConfig, ctx);
|
22
|
+
pipelineResolver.addJsFunctionToSlot(slot.slotName, mappingTemplate, slot.dataSource(directiveConfig));
|
23
|
+
}
|
24
|
+
return pipelineResolver;
|
25
|
+
};
|
26
|
+
exports.generateResolverPipeline = generateResolverPipeline;
|
27
|
+
const generateResolverFunction = (definition, config, ctx) => {
|
28
|
+
const template = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, 'templates', definition.fileName), 'utf8');
|
29
|
+
const substitutions = definition.substitutions(config, ctx);
|
30
|
+
const resolver = substituteResolverTemplateValues(template, substitutions);
|
31
|
+
return definition.generateTemplate(config, resolver);
|
32
|
+
};
|
33
|
+
exports.generateResolverFunction = generateResolverFunction;
|
34
|
+
const substituteResolverTemplateValues = (resolver, substitutions) => {
|
35
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
36
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
37
|
+
resolver = replaced;
|
38
|
+
});
|
39
|
+
return resolver;
|
40
|
+
};
|
41
|
+
//# sourceMappingURL=generate-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-resolver.js","sourceRoot":"","sources":["../../src/resolvers/generate-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAiH;AAEjH,wDAA0B;AAC1B,2EAAiE;AACjE,gDAAwB;AAUjB,MAAM,wBAAwB,GAAG,CACtC,kBAAsC,EACtC,eAAmD,EACnD,GAA+B,EACV,EAAE;IACvB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC1E,MAAM,kBAAkB,GAAG,gDAAmB,CAAC,kBAAkB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvF,MAAM,mBAAmB,GAAG,IAAA,gCAAwB,EAAC,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,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,gCAAgC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC3E,OAAO,UAAU,CAAC,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC,CAAC;AATW,QAAA,wBAAwB,4BASnC;AAQF,MAAM,gCAAgC,GAAG,CAAC,QAAgB,EAAE,aAAqC,EAAU,EAAE;IAC3G,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,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { assistantResponsePipelineDefinition } from './assistant-response-pipeline-definition';
|
2
|
+
import { assistantResponseSubscriptionPipelineDefinition } from './assistant-response-subscription-pipeline-definition';
|
3
|
+
import { generateResolverFunction, generateResolverPipeline } from './generate-resolver';
|
4
|
+
import { listMessagesInitFunctionDefinition } from './list-messages-init-resolver';
|
5
|
+
import { sendMessagePipelineDefinition } from './send-message-pipeline-definition';
|
6
|
+
export { assistantResponsePipelineDefinition, assistantResponseSubscriptionPipelineDefinition, generateResolverFunction, generateResolverPipeline, listMessagesInitFunctionDefinition, sendMessagePipelineDefinition, };
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,+CAA+C,EAAE,MAAM,uDAAuD,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EACL,mCAAmC,EACnC,+CAA+C,EAC/C,wBAAwB,EACxB,wBAAwB,EACxB,kCAAkC,EAClC,6BAA6B,GAC9B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendMessagePipelineDefinition = exports.listMessagesInitFunctionDefinition = exports.generateResolverPipeline = exports.generateResolverFunction = exports.assistantResponseSubscriptionPipelineDefinition = exports.assistantResponsePipelineDefinition = void 0;
|
4
|
+
const assistant_response_pipeline_definition_1 = require("./assistant-response-pipeline-definition");
|
5
|
+
Object.defineProperty(exports, "assistantResponsePipelineDefinition", { enumerable: true, get: function () { return assistant_response_pipeline_definition_1.assistantResponsePipelineDefinition; } });
|
6
|
+
const assistant_response_subscription_pipeline_definition_1 = require("./assistant-response-subscription-pipeline-definition");
|
7
|
+
Object.defineProperty(exports, "assistantResponseSubscriptionPipelineDefinition", { enumerable: true, get: function () { return assistant_response_subscription_pipeline_definition_1.assistantResponseSubscriptionPipelineDefinition; } });
|
8
|
+
const generate_resolver_1 = require("./generate-resolver");
|
9
|
+
Object.defineProperty(exports, "generateResolverFunction", { enumerable: true, get: function () { return generate_resolver_1.generateResolverFunction; } });
|
10
|
+
Object.defineProperty(exports, "generateResolverPipeline", { enumerable: true, get: function () { return generate_resolver_1.generateResolverPipeline; } });
|
11
|
+
const list_messages_init_resolver_1 = require("./list-messages-init-resolver");
|
12
|
+
Object.defineProperty(exports, "listMessagesInitFunctionDefinition", { enumerable: true, get: function () { return list_messages_init_resolver_1.listMessagesInitFunctionDefinition; } });
|
13
|
+
const send_message_pipeline_definition_1 = require("./send-message-pipeline-definition");
|
14
|
+
Object.defineProperty(exports, "sendMessagePipelineDefinition", { enumerable: true, get: function () { return send_message_pipeline_definition_1.sendMessagePipelineDefinition; } });
|
15
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":";;;AAAA,qGAA+F;AAO7F,oHAPO,4EAAmC,OAOP;AANrC,+HAAwH;AAOtH,gIAPO,qGAA+C,OAOP;AANjD,2DAAyF;AAOvF,yGAPO,4CAAwB,OAOP;AACxB,yGARiC,4CAAwB,OAQjC;AAP1B,+EAAmF;AAQjF,mHARO,gEAAkC,OAQP;AAPpC,yFAAmF;AAQjF,8GARO,gEAA6B,OAQP"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export declare const listMessageInitMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
1
|
+
import { ResolverFunctionDefinition } from './resolver-function-definition';
|
2
|
+
export declare const listMessagesInitFunctionDefinition: ResolverFunctionDefinition;
|
4
3
|
//# sourceMappingURL=list-messages-init-resolver.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-messages-init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"list-messages-init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAMxC,eAAO,MAAM,kCAAkC,EAAE,0BAO/C,CAAC"}
|
@@ -1,16 +1,14 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
exports.listMessagesInitFunctionDefinition = void 0;
|
4
|
+
const name_values_1 = require("../graphql-types/name-values");
|
5
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
6
|
+
exports.listMessagesInitFunctionDefinition = (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
7
|
+
slotName: 'init',
|
8
|
+
fileName: 'list-messages-init-resolver-fn.template.js',
|
9
|
+
generateTemplate: (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Query', 'list-messages-init', (config) => config.field.name.value),
|
10
|
+
substitutions: () => ({
|
11
|
+
INDEX_NAME: name_values_1.LIST_MESSAGES_INDEX_NAME,
|
12
|
+
}),
|
13
|
+
});
|
16
14
|
//# sourceMappingURL=list-messages-init-resolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-messages-init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"list-messages-init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":";;;AAAA,8DAAwE;AACxE,iFAIwC;AAM3B,QAAA,kCAAkC,GAA+B,IAAA,+DAAgC,EAAC;IAC7G,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,4CAA4C;IACtD,gBAAgB,EAAE,IAAA,oEAAqC,EAAC,OAAO,EAAE,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3H,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;QACpB,UAAU,EAAE,sCAAwB;KACrC,CAAC;CACH,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { DataSourceProvider, MappingTemplateProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
3
|
+
export declare const createResolverFunctionDefinition: (definition: Optional<ResolverFunctionDefinition, 'dataSource' | 'substitutions'>) => ResolverFunctionDefinition;
|
4
|
+
export type ResolverFunctionDefinition = {
|
5
|
+
slotName: string;
|
6
|
+
fileName: string;
|
7
|
+
generateTemplate: (config: ConversationDirectiveConfiguration, code: string) => MappingTemplateProvider;
|
8
|
+
dataSource: (config: ConversationDirectiveConfiguration) => DataSourceProvider | undefined;
|
9
|
+
substitutions: (config: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => Record<string, string>;
|
10
|
+
};
|
11
|
+
export type PipelineDefinition = {
|
12
|
+
requestSlots: ResolverFunctionDefinition[];
|
13
|
+
dataSlot: ResolverFunctionDefinition;
|
14
|
+
responseSlots: ResolverFunctionDefinition[];
|
15
|
+
field: (config: ConversationDirectiveConfiguration) => {
|
16
|
+
typeName: string;
|
17
|
+
fieldName: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const createS3AssetMappingTemplateGenerator: (parentName: string, slotName: string, fieldName: (config: ConversationDirectiveConfiguration) => string) => (config: ConversationDirectiveConfiguration, code: string) => import("@aws-amplify/graphql-transformer-core/lib/cdk-compat/template-asset").S3MappingJSResolverFunctionCode;
|
21
|
+
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=resolver-function-definition.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resolver-function-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/resolver-function-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,uBAA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(exports, "__esModule", { value: true });
|
3
|
+
exports.createS3AssetMappingTemplateGenerator = exports.createResolverFunctionDefinition = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const createResolverFunctionDefinition = (definition) => {
|
6
|
+
var _a, _b;
|
7
|
+
return {
|
8
|
+
...definition,
|
9
|
+
dataSource: (_a = definition.dataSource) !== null && _a !== void 0 ? _a : NONE_DATA_SOURCE,
|
10
|
+
substitutions: (_b = definition.substitutions) !== null && _b !== void 0 ? _b : EMPTY_SUBSTITUTIONS,
|
11
|
+
};
|
12
|
+
};
|
13
|
+
exports.createResolverFunctionDefinition = createResolverFunctionDefinition;
|
14
|
+
const createS3AssetMappingTemplateGenerator = (parentName, slotName, fieldName) => (config, code) => graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(code, `${parentName}.${fieldName(config)}.${slotName}.js`);
|
15
|
+
exports.createS3AssetMappingTemplateGenerator = createS3AssetMappingTemplateGenerator;
|
16
|
+
const NONE_DATA_SOURCE = () => undefined;
|
17
|
+
const EMPTY_SUBSTITUTIONS = () => ({});
|
18
|
+
//# sourceMappingURL=resolver-function-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resolver-function-definition.js","sourceRoot":"","sources":["../../src/resolvers/resolver-function-definition.ts"],"names":[],"mappings":";;;AAEA,oFAAwE;AAOjE,MAAM,gCAAgC,GAAG,CAC9C,UAAgF,EACpD,EAAE;;IAC9B,OAAO;QACL,GAAG,UAAU;QACb,UAAU,EAAE,MAAA,UAAU,CAAC,UAAU,mCAAI,gBAAgB;QACrD,aAAa,EAAE,MAAA,UAAU,CAAC,aAAa,mCAAI,mBAAmB;KAC/D,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,gCAAgC,oCAQ3C;AA0BK,MAAM,qCAAqC,GAChD,CAAC,UAAkB,EAAE,QAAgB,EAAE,SAAiE,EAAE,EAAE,CAC5G,CAAC,MAA0C,EAAE,IAAY,EAAE,EAAE,CAC3D,0CAAe,CAAC,+BAA+B,CAAC,IAAI,EAAE,GAAG,UAAU,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,QAAQ,KAAK,CAAC,CAAC;AAHlG,QAAA,qCAAqC,yCAG6D;AAI/G,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AACzC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"send-message-pipeline-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/send-message-pipeline-definition.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,6BAA6B,EAAE,kBAK3C,CAAC"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendMessagePipelineDefinition = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const name_values_1 = require("../graphql-types/name-values");
|
6
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
7
|
+
exports.sendMessagePipelineDefinition = {
|
8
|
+
requestSlots: [init(), auth(), verifySessionOwner(), writeMessageToTable()],
|
9
|
+
dataSlot: invokeLambda(),
|
10
|
+
responseSlots: [],
|
11
|
+
field: (config) => ({ typeName: 'Mutation', fieldName: config.field.name.value }),
|
12
|
+
};
|
13
|
+
function init() {
|
14
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
15
|
+
slotName: 'init',
|
16
|
+
fileName: 'init-resolver-fn.template.js',
|
17
|
+
generateTemplate: (_, code) => graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString(code),
|
18
|
+
substitutions: (_, ctx) => ({
|
19
|
+
GRAPHQL_API_ENDPOINT: ctx.api.graphqlUrl,
|
20
|
+
}),
|
21
|
+
});
|
22
|
+
}
|
23
|
+
function auth() {
|
24
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
25
|
+
slotName: 'auth',
|
26
|
+
fileName: 'auth-resolver-fn.template.js',
|
27
|
+
generateTemplate: templateGenerator('auth'),
|
28
|
+
});
|
29
|
+
}
|
30
|
+
function verifySessionOwner() {
|
31
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
32
|
+
slotName: 'verifySessionOwner',
|
33
|
+
fileName: 'verify-session-owner-resolver-fn.template.js',
|
34
|
+
generateTemplate: templateGenerator('verify-session-owner'),
|
35
|
+
dataSource: (config) => config.dataSources.conversationTableDataSource,
|
36
|
+
substitutions: () => ({
|
37
|
+
CONVERSATION_ID_PARENT: 'ctx.args',
|
38
|
+
}),
|
39
|
+
});
|
40
|
+
}
|
41
|
+
function writeMessageToTable() {
|
42
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
43
|
+
slotName: 'writeMessageToTable',
|
44
|
+
fileName: 'write-message-to-table-resolver-fn.template.js',
|
45
|
+
generateTemplate: templateGenerator('write-message-to-table'),
|
46
|
+
dataSource: (config) => config.dataSources.messageTableDataSource,
|
47
|
+
substitutions: (config) => ({
|
48
|
+
CONVERSATION_MESSAGE_TYPE_NAME: config.message.model.name.value,
|
49
|
+
}),
|
50
|
+
});
|
51
|
+
}
|
52
|
+
function invokeLambda() {
|
53
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
54
|
+
slotName: 'data',
|
55
|
+
fileName: 'invoke-lambda-resolver-fn.template.js',
|
56
|
+
generateTemplate: templateGenerator('invoke-lambda'),
|
57
|
+
dataSource: (config) => config.dataSources.lambdaFunctionDataSource,
|
58
|
+
substitutions: invokeLambdaResolverSubstitutions,
|
59
|
+
});
|
60
|
+
}
|
61
|
+
function invokeLambdaResolverSubstitutions(config) {
|
62
|
+
return {
|
63
|
+
MODEL_ID: JSON.stringify(config.aiModel),
|
64
|
+
SYSTEM_PROMPT: JSON.stringify(config.systemPrompt),
|
65
|
+
DATA_TOOLS: JSON.stringify(config.toolSpec),
|
66
|
+
SELECTION_SET: selectionSet,
|
67
|
+
INFERENCE_CONFIGURATION: JSON.stringify(config.inferenceConfiguration),
|
68
|
+
RESPONSE_MUTATION_NAME: config.assistantResponseMutation.field.name.value,
|
69
|
+
RESPONSE_MUTATION_INPUT_TYPE_NAME: config.assistantResponseMutation.input.name.value,
|
70
|
+
MESSAGE_MODEL_NAME: config.message.model.name.value,
|
71
|
+
GET_QUERY_NAME: (0, name_values_1.getConversationMessageGetQueryName)(config),
|
72
|
+
GET_QUERY_INPUT_TYPE_NAME: name_values_1.CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME,
|
73
|
+
LIST_QUERY_NAME: (0, name_values_1.getConversationMessageListQueryName)(config),
|
74
|
+
LIST_QUERY_INPUT_TYPE_NAME: (0, name_values_1.getConversationMessageListQueryInputTypeName)(config),
|
75
|
+
LIST_QUERY_LIMIT: 'undefined',
|
76
|
+
};
|
77
|
+
}
|
78
|
+
function fieldName(config) {
|
79
|
+
return config.field.name.value;
|
80
|
+
}
|
81
|
+
function templateGenerator(slotName) {
|
82
|
+
return (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Mutation', slotName, fieldName);
|
83
|
+
}
|
84
|
+
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`;
|
85
|
+
//# sourceMappingURL=send-message-pipeline-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"send-message-pipeline-definition.js","sourceRoot":"","sources":["../../src/resolvers/send-message-pipeline-definition.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,8DAKsC;AACtC,iFAKwC;AAK3B,QAAA,6BAA6B,GAAuB;IAC/D,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE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AAM,CAAC;QAC1D,yBAAyB,EAAE,4DAA8C;QACzE,eAAe,EAAE,IAAA,iDAAmC,EAAC,MAAM,CAAC;QAC5D,0BAA0B,EAAE,IAAA,0DAA4C,EAAC,MAAM,CAAC;QAChF,gBAAgB,EAAE,WAAW;KAC9B,CAAC;AACJ,CAAC;AAKD,SAAS,SAAS,CAAC,MAA0C;IAC3D,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,CAAC;AAKD,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,IAAA,oEAAqC,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,YAAY,GAAG,mQAAmQ,CAAC"}
|
@@ -32,7 +32,7 @@ export function request(ctx) {
|
|
32
32
|
if (!isAuthorized && ctx.stash.authFilter.length === 0) {
|
33
33
|
util.unauthorized();
|
34
34
|
}
|
35
|
-
ctx.args.filter = { ...ctx.
|
35
|
+
ctx.args.filter = { ...ctx.stash.authFilter, and: [{ conversationId: { eq: ctx.args.conversationId } }] };
|
36
36
|
return { version: '2018-05-29', payload: {} };
|
37
37
|
}
|
38
38
|
|
@@ -4,28 +4,26 @@ export function request(ctx) {
|
|
4
4
|
const { args, request } = ctx;
|
5
5
|
const { graphqlApiEndpoint } = ctx.stash;
|
6
6
|
|
7
|
-
[[TOOL_DEFINITIONS_LINE]]
|
8
7
|
const selectionSet = '[[SELECTION_SET]]';
|
9
8
|
|
10
|
-
const
|
9
|
+
const responseMutation = {
|
11
10
|
name: '[[RESPONSE_MUTATION_NAME]]',
|
12
11
|
inputTypeName: '[[RESPONSE_MUTATION_INPUT_TYPE_NAME]]',
|
13
12
|
selectionSet,
|
14
13
|
};
|
14
|
+
const currentMessageId = ctx.stash.defaultValues.id;
|
15
15
|
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
const modelConfiguration = {
|
17
|
+
modelId: [[MODEL_ID]],
|
18
|
+
systemPrompt: [[SYSTEM_PROMPT]],
|
19
|
+
inferenceConfiguration: [[INFERENCE_CONFIGURATION]],
|
20
20
|
};
|
21
21
|
|
22
|
-
const currentMessageId = ctx.stash.defaultValues.id;
|
23
|
-
[[MODEL_CONFIGURATION_LINE]]
|
24
|
-
|
25
22
|
const clientTools = args.toolConfiguration?.tools?.map((tool) => {
|
26
23
|
return { ...tool.toolSpec };
|
27
24
|
});
|
28
|
-
[[
|
25
|
+
const dataTools = [[DATA_TOOLS]];
|
26
|
+
const toolsConfiguration = { dataTools, clientTools };
|
29
27
|
|
30
28
|
const messageHistoryQuery = {
|
31
29
|
getQueryName: '[[GET_QUERY_NAME]]',
|
@@ -35,11 +33,6 @@ export function request(ctx) {
|
|
35
33
|
listQueryLimit: [[LIST_QUERY_LIMIT]],
|
36
34
|
};
|
37
35
|
|
38
|
-
const disableStreaming = ctx.env['[[DISABLE_STREAMING_ENV_VAR]]'] === 'true';
|
39
|
-
const responseMutation = !!disableStreaming
|
40
|
-
? singleShotResponseMutation
|
41
|
-
: streamingResponseMutation;
|
42
|
-
|
43
36
|
const authHeader = request.headers['authorization'];
|
44
37
|
const payload = {
|
45
38
|
conversationId: args.conversationId,
|
@@ -50,7 +43,6 @@ export function request(ctx) {
|
|
50
43
|
request: { headers: { authorization: authHeader } },
|
51
44
|
messageHistoryQuery,
|
52
45
|
toolsConfiguration,
|
53
|
-
streamResponse: !disableStreaming,
|
54
46
|
};
|
55
47
|
|
56
48
|
return {
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
|
1
2
|
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
3
|
import { TypeNode } from 'graphql';
|
3
|
-
import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
|
4
4
|
export declare function generateJSONSchemaFromTypeNode(typeNode: TypeNode, ctx: TransformerContextProvider, schema?: JSONSchema): JSONSchema;
|
5
5
|
//# sourceMappingURL=graphql-json-schema-type.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"graphql-json-schema-type.d.ts","sourceRoot":"","sources":["../../src/tools/graphql-json-schema-type.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIX,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAOL,QAAQ,EAET,MAAM,SAAS,CAAC;AAUjB,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,0BAA0B,EAC/B,MAAM,GAAE,UAAyB,GAChC,UAAU,CASZ"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.generateJSONSchemaFromTypeNode = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
4
5
|
const graphql_1 = require("graphql");
|
5
6
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
6
|
-
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
7
7
|
function generateJSONSchemaFromTypeNode(typeNode, ctx, schema = { type: '' }) {
|
8
8
|
switch (typeNode.kind) {
|
9
9
|
case graphql_1.Kind.NAMED_TYPE:
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-json-schema-type.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"graphql-json-schema-type.js","sourceRoot":"","sources":["../../src/tools/graphql-json-schema-type.ts"],"names":[],"mappings":";;;AAAA,oFAK+C;AAE/C,qCASiB;AACjB,2EAAmE;AASnE,SAAgB,8BAA8B,CAC5C,QAAkB,EAClB,GAA+B,EAC/B,SAAqB,EAAE,IAAI,EAAE,EAAE,EAAE;IAEjC,QAAQ,QAAQ,CAAC,IAAI,EAAE;QACrB,KAAK,cAAI,CAAC,UAAU;YAClB,OAAO,eAAe,CAAC,QAAQ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P,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,gBAAgB,CAAC,CAAC;KAChE;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAOD,SAAS,oBAAoB,CAAC,GAA2B;;IACvD,OAAO;QACL,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAA,GAAG,CAAC,MAAM,0CAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SACnD;KACF,CAAC;AACJ,CAAC"}
|
@@ -1,25 +1,19 @@
|
|
1
1
|
import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
|
2
2
|
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
|
-
|
3
|
+
import { ToolDefinition } from '../conversation-directive-configuration';
|
4
|
+
export type Tool = {
|
4
5
|
name: string;
|
5
6
|
description: string;
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
inputSchema: {
|
8
|
+
json: JSONSchema;
|
9
|
+
};
|
10
|
+
graphqlRequestInputDescriptor?: GraphQLRequestInputDescriptor;
|
9
11
|
};
|
10
12
|
type GraphQLRequestInputDescriptor = {
|
11
13
|
selectionSet: string;
|
12
14
|
propertyTypes: Record<string, string>;
|
13
15
|
queryName: string;
|
14
16
|
};
|
15
|
-
|
16
|
-
name: string;
|
17
|
-
description: string;
|
18
|
-
inputSchema: {
|
19
|
-
json: JSONSchema;
|
20
|
-
};
|
21
|
-
graphqlRequestInputDescriptor?: GraphQLRequestInputDescriptor;
|
22
|
-
};
|
23
|
-
export declare const processTools: (toolDefinitions: ToolDefinition[], ctx: TransformerContextProvider) => Tools | undefined;
|
17
|
+
export declare const processTools: (toolDefinitions: ToolDefinition[], ctx: TransformerContextProvider) => Tool[] | undefined;
|
24
18
|
export {};
|
25
|
-
//# sourceMappingURL=tools.d.ts.map
|
19
|
+
//# sourceMappingURL=process-tools.d.ts.map
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"process-tools.d.ts","sourceRoot":"","sources":["../../src/tools/process-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAGzF,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGzE,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC;IACF,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;CAC/D,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAUF,eAAO,MAAM,YAAY,oBAAqB,cAAc,EAAE,OAAO,0BAA0B,KAAG,IAAI,EAAE,GAAG,SAyB1G,CAAC"}
|
@@ -4,6 +4,26 @@ exports.processTools = void 0;
|
|
4
4
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
5
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
6
6
|
const graphql_json_schema_type_1 = require("./graphql-json-schema-type");
|
7
|
+
const processTools = (toolDefinitions, ctx) => {
|
8
|
+
if (!toolDefinitions || toolDefinitions.length === 0) {
|
9
|
+
return undefined;
|
10
|
+
}
|
11
|
+
const queryType = ctx.output.getType('Query');
|
12
|
+
if (!queryType.fields || queryType.fields.length === 0) {
|
13
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError('Tools must be queries - no queries found in the schema');
|
14
|
+
}
|
15
|
+
const tools = toolDefinitions.map((toolDefinition) => {
|
16
|
+
var _a;
|
17
|
+
const { name: toolName, description } = toolDefinition;
|
18
|
+
const queryField = (_a = queryType.fields) === null || _a === void 0 ? void 0 : _a.find((field) => field.name.value === toolName);
|
19
|
+
if (!queryField) {
|
20
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`Tool "${toolName}" defined in @conversation directive has no matching Query field definition`);
|
21
|
+
}
|
22
|
+
return createTool(toolName, description, queryField, ctx);
|
23
|
+
});
|
24
|
+
return tools;
|
25
|
+
};
|
26
|
+
exports.processTools = processTools;
|
7
27
|
const generateSelectionSet = (currentType, ctx, seenTypes = new Set(), fieldName = '') => {
|
8
28
|
if ((0, graphql_transformer_common_1.isScalar)(currentType)) {
|
9
29
|
return fieldName;
|
@@ -37,26 +57,6 @@ const getObjectTypeFromName = (name, ctx) => {
|
|
37
57
|
}
|
38
58
|
return node;
|
39
59
|
};
|
40
|
-
const processTools = (toolDefinitions, ctx) => {
|
41
|
-
if (!toolDefinitions || toolDefinitions.length === 0) {
|
42
|
-
return undefined;
|
43
|
-
}
|
44
|
-
const queryType = ctx.output.getType('Query');
|
45
|
-
if (!queryType.fields || queryType.fields.length === 0) {
|
46
|
-
throw new graphql_transformer_core_1.InvalidDirectiveError('Tools must be queries - no queries found in the schema');
|
47
|
-
}
|
48
|
-
const tools = toolDefinitions.map((toolDefinition) => {
|
49
|
-
var _a;
|
50
|
-
const { name: toolName, description } = toolDefinition;
|
51
|
-
const queryField = (_a = queryType.fields) === null || _a === void 0 ? void 0 : _a.find((field) => field.name.value === toolName);
|
52
|
-
if (!queryField) {
|
53
|
-
throw new graphql_transformer_core_1.InvalidDirectiveError(`Tool "${toolName}" defined in @conversation directive has no matching Query field definition`);
|
54
|
-
}
|
55
|
-
return createTool(toolName, description, queryField, ctx);
|
56
|
-
});
|
57
|
-
return { tools };
|
58
|
-
};
|
59
|
-
exports.processTools = processTools;
|
60
60
|
const createTool = (toolName, description, queryField, ctx) => {
|
61
61
|
const { type: returnType, arguments: fieldArguments } = queryField;
|
62
62
|
const { properties, required } = generateToolProperties(fieldArguments, ctx, toolName, returnType);
|
@@ -113,4 +113,4 @@ const generatePropertyTypes = (fieldArguments, toolName, returnType) => {
|
|
113
113
|
const isModelListOperation = (toolName, responseType) => {
|
114
114
|
return (0, graphql_transformer_common_1.getBaseType)(responseType).startsWith('Model') && toolName.startsWith('list');
|
115
115
|
};
|
116
|
-
//# sourceMappingURL=tools.js.map
|
116
|
+
//# sourceMappingURL=process-tools.js.map
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"process-tools.js","sourceRoot":"","sources":["../../src/tools/process-tools.ts"],"names":[],"mappings":";;;AAAA,oFAA0F;AAG1F,2EAAkF;AAElF,yEAA4E;AAyBrE,MAAM,YAAY,GAAG,CAAC,eAAiC,EAAE,GAA+B,EAAsB,EAAE;IAErH,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;QACpD,OAAO,SAAS,CAAC;KAClB;IAGD,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAA6B,CAAC;IAC1E,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACtD,MAAM,IAAI,gDAAqB,CAAC,wDAAwD,CAAC,CAAC;KAC3F;IAGD,MAAM,KAAK,GAAW,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE;;QAC3D,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,cAAc,CAAC;QACvD,MAAM,UAAU,GAAG,MAAA,SAAS,CAAC,MAAM,0CAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,I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E;QAC9C,OAAO,EAAE,CAAC;KACX;IAED,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE;QAClD,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;QACtC,MAAM,MAAM,GAAG,IAAA,0CAAa,EAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,IAAI,CAAC,GAAG,IAAA,wCAAW,EAAC,aAAa,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;QACrD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAA4B,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,QAAgB,EAAE,YAAsB,EAAW,EAAE;IACjF,OAAO,IAAA,wCAAW,EAAC,YAAY,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
@@ -1,11 +1,13 @@
|
|
1
1
|
import { TransformerSchemaVisitStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
2
|
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
3
|
-
import { ConversationDirectiveConfiguration } from '../
|
3
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
4
4
|
export declare class ConversationFieldHandler {
|
5
5
|
getDirectiveConfig(parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definition: FieldDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider): ConversationDirectiveConfiguration;
|
6
6
|
private getConversationConfig;
|
7
7
|
private createModels;
|
8
|
+
private createSupportingFields;
|
8
9
|
private validate;
|
10
|
+
private validateHandler;
|
9
11
|
private validateReturnType;
|
10
12
|
private validateInferenceConfig;
|
11
13
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"conversation-field-handler.d.ts","sourceRoot":"","sources":["../../src/transformer-steps/conversation-field-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,
|
1
|
+
{"version":3,"file":"conversation-field-handler.d.ts","sourceRoot":"","sources":["../../src/transformer-steps/conversation-field-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EACL,aAAa,EACb,mBAAmB,EAEnB,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAsB7F,qBAAa,wBAAwB;IAWnC,kBAAkB,CAChB,MAAM,EAAE,wBAAwB,GAAG,2BAA2B,EAC9D,UAAU,EAAE,mBAAmB,EAC/B,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,yCAAyC,GACjD,kCAAkC;IA0BrC,OAAO,CAAC,qBAAqB;IA4B7B,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,sBAAsB;IAgC9B,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,uBAAuB;CAqBhC"}
|