@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 @@
|
|
1
|
+
{"version":3,"file":"conversation-model.js","sourceRoot":"","sources":["../../src/graphql-types/conversation-model.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,qCAA8G;AAC9G,2EASoC;AAsC7B,MAAM,uBAAuB,GAAG,CAAC,gBAAwB,EAAE,WAAmB,EAAE,kBAA0B,EAAqB,EAAE;IACtI,MAAM,aAAa,GAAG,+BAA+B,EAAE,CAAC;IACxD,MAAM,cAAc,GAAG,gCAAgC,EAAE,CAAC;IAC1D,MAAM,wBAAwB,GAAG,oDAAoD,CAAC,kBAAkB,CAAC,CAAC;IAC1G,MAAM,aAAa,GAAG,oCAAoC,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;IAClG,MAAM,KAAK,GAAG,qBAAqB,CAAC,gBAAgB,EAAE,aAAa,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;IAEtG,OAAO;QACL,aAAa;QACb,cAAc;QACd,wBAAwB;QACxB,aAAa;QACb,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,uBAAuB,2BAclC;AAUF,MAAM,+BAA+B,GAAG,GAAkB,EAAE;IAC1D,MAAM,KAAK,GAAG,IAAA,yCAAY,EAAC,OAAO,EAAE;QAClC,IAAI,EAAE,cAAI,CAAC,IAAI;QACf,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,cAAI,CAAC,MAAM;gBACjB,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,cAAI,CAAC,YAAY;wBACvB,IAAI,EAAE,EAAE,IAAI,EAAE,cAAI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AYF,MAAM,oCAAoC,GAAG,CAAC,gBAA+B,EAAE,QAAgB,EAAuB,EAAE;IACtH,OAAO,IAAA,sCAAS,EAAC,UAAU,EAAE,EAAE,EAAE,IAAA,yCAAY,EAAC,IAAA,0CAAa,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC;AAuBF,MAAM,qBAAqB,GAAG,CAC5B,SAAiB,EACjB,aAAkC,EAClC,mBAAoC,EACV,EAAE;IAC5B,MAAM,EAAE,GAAG,IAAA,sCAAS,EAAC,IAAI,EAAE,EAAE,EAAE,IAAA,wCAAW,EAAC,IAAA,0CAAa,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,IAAA,sCAAS,EAAC,MAAM,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAA,sCAAS,EAAC,UAAU,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,16 +1,13 @@
|
|
1
|
-
import { DirectiveNode, FieldDefinitionNode,
|
1
|
+
import { DirectiveNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, NamedTypeNode, ObjectTypeDefinitionNode } from 'graphql';
|
2
2
|
export type MessageModel = {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
messageSubscription: FieldDefinitionNode;
|
9
|
-
assistantMutationInput: InputObjectTypeDefinitionNode;
|
10
|
-
assistantMutationField: FieldDefinitionNode;
|
11
|
-
assistantStreamingMutationInput: InputObjectTypeDefinitionNode;
|
12
|
-
assistantStreamingMutationField: FieldDefinitionNode;
|
3
|
+
authDirective: DirectiveNode;
|
4
|
+
modelDirective: DirectiveNode;
|
5
|
+
belongsToConversationDirective: DirectiveNode;
|
6
|
+
conversationField: FieldDefinitionNode;
|
7
|
+
model: ObjectTypeDefinitionNode;
|
13
8
|
};
|
14
|
-
export declare const createMessageModel: (
|
15
|
-
export declare const
|
9
|
+
export declare const createMessageModel: (conversationName: string, messageName: string, referenceFieldName: string, conversationMessageInterface: NamedTypeNode) => MessageModel;
|
10
|
+
export declare const createMessageSubscription: (subscriptionName: string, conversationMessageTypeName: string, onMutationName: string) => FieldDefinitionNode;
|
11
|
+
export declare const createAssistantMutationField: (fieldName: string, messageName: string, inputTypeName: string) => FieldDefinitionNode;
|
12
|
+
export declare const createAssistantResponseMutationInput: (messageName: string) => InputObjectTypeDefinitionNode;
|
16
13
|
//# sourceMappingURL=message-model.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"message-model.d.ts","sourceRoot":"","sources":["../../src/graphql-types/message-model.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,
|
1
|
+
{"version":3,"file":"message-model.d.ts","sourceRoot":"","sources":["../../src/graphql-types/message-model.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAG7B,aAAa,EACb,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAsBjB,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,aAAa,CAAC;IAC9B,8BAA8B,EAAE,aAAa,CAAC;IAC9C,iBAAiB,EAAE,mBAAmB,CAAC;IACvC,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;AA6BF,eAAO,MAAM,kBAAkB,qBACX,MAAM,eACX,MAAM,sBACC,MAAM,gCACI,aAAa,KAC1C,YAoBF,CAAC;AAEF,eAAO,MAAM,yBAAyB,qBAClB,MAAM,+BACK,MAAM,kBACnB,MAAM,KACrB,mBAWF,CAAC;AAEF,eAAO,MAAM,4BAA4B,cAAe,MAAM,eAAe,MAAM,iBAAiB,MAAM,KAAG,mBAK5G,CAAC;AAEF,eAAO,MAAM,oCAAoC,gBAAiB,MAAM,KAAG,6BAW1E,CAAC"}
|
@@ -1,37 +1,55 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.createAssistantResponseMutationInput = exports.createAssistantMutationField = exports.createMessageSubscription = exports.createMessageModel = void 0;
|
4
4
|
const graphql_directives_1 = require("@aws-amplify/graphql-directives");
|
5
5
|
const graphql_1 = require("graphql");
|
6
6
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
7
|
-
const createMessageModel = (
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const messageBelongsToConversationDirective = constructMessageSessionFieldBelongsToDirective(referenceFieldName);
|
14
|
-
const messageConversationField = constructMessageSessionField(messageBelongsToConversationDirective, conversationModelName);
|
15
|
-
const messageModel = constructConversationMessageModel(messageModelName, messageConversationField, referenceFieldName, [messageModelDirective, messageAuthDirective], conversationMessageInterface);
|
16
|
-
const messageSubscription = constructMessageSubscription(messageSubscriptionFieldName, [assistantStreamingMutationFieldName]);
|
17
|
-
const assistantMutationInput = constructAssistantResponseMutationInput(messageModelName);
|
18
|
-
const assistantMutationField = constructAssistantMutationField(assistantMutationFieldName, messageModelName, assistantMutationInput.name.value);
|
19
|
-
const assistantStreamingMutationInput = constructAssistantResponseStreamingMutationInput(messageModelName);
|
20
|
-
const assistantStreamingMutationField = constructAssistantStreamingMutationField(assistantStreamingMutationFieldName, assistantStreamingMutationInput.name.value);
|
7
|
+
const createMessageModel = (conversationName, messageName, referenceFieldName, conversationMessageInterface) => {
|
8
|
+
const authDirective = constructMessageAuthDirective();
|
9
|
+
const modelDirective = constructMessageModelDirective();
|
10
|
+
const belongsToConversationDirective = constructMessageSessionFieldBelongsToDirective(referenceFieldName);
|
11
|
+
const conversationField = constructMessageConversationField(belongsToConversationDirective, conversationName);
|
12
|
+
const model = constructConversationMessageModel(messageName, conversationField, referenceFieldName, [modelDirective, authDirective], conversationMessageInterface);
|
21
13
|
return {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
messageSubscription,
|
28
|
-
assistantMutationInput,
|
29
|
-
assistantMutationField,
|
30
|
-
assistantStreamingMutationInput,
|
31
|
-
assistantStreamingMutationField,
|
14
|
+
authDirective,
|
15
|
+
modelDirective,
|
16
|
+
belongsToConversationDirective,
|
17
|
+
conversationField,
|
18
|
+
model,
|
32
19
|
};
|
33
20
|
};
|
34
21
|
exports.createMessageModel = createMessageModel;
|
22
|
+
const createMessageSubscription = (subscriptionName, conversationMessageTypeName, onMutationName) => {
|
23
|
+
const awsSubscribeDirective = (0, graphql_transformer_common_1.makeDirective)('aws_subscribe', [(0, graphql_transformer_common_1.makeArgument)('mutations', (0, graphql_transformer_common_1.makeValueNode)([onMutationName]))]);
|
24
|
+
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
25
|
+
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID'))];
|
26
|
+
const subscriptionField = (0, graphql_transformer_common_1.makeField)(subscriptionName, args, (0, graphql_transformer_common_1.makeNamedType)(conversationMessageTypeName), [
|
27
|
+
awsSubscribeDirective,
|
28
|
+
cognitoAuthDirective,
|
29
|
+
]);
|
30
|
+
return subscriptionField;
|
31
|
+
};
|
32
|
+
exports.createMessageSubscription = createMessageSubscription;
|
33
|
+
const createAssistantMutationField = (fieldName, messageName, inputTypeName) => {
|
34
|
+
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('input', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)(inputTypeName)))];
|
35
|
+
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
36
|
+
const createAssistantResponseMutation = (0, graphql_transformer_common_1.makeField)(fieldName, args, (0, graphql_transformer_common_1.makeNamedType)(messageName), [cognitoAuthDirective]);
|
37
|
+
return createAssistantResponseMutation;
|
38
|
+
};
|
39
|
+
exports.createAssistantMutationField = createAssistantMutationField;
|
40
|
+
const createAssistantResponseMutationInput = (messageName) => {
|
41
|
+
const inputName = `Create${messageName}AssistantInput`;
|
42
|
+
return {
|
43
|
+
kind: 'InputObjectTypeDefinition',
|
44
|
+
name: { kind: 'Name', value: inputName },
|
45
|
+
fields: [
|
46
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
47
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('content', (0, graphql_transformer_common_1.makeListType)((0, graphql_transformer_common_1.makeNamedType)('ContentBlockInput'))),
|
48
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('associatedUserMessageId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
49
|
+
],
|
50
|
+
};
|
51
|
+
};
|
52
|
+
exports.createAssistantResponseMutationInput = createAssistantResponseMutationInput;
|
35
53
|
const constructMessageModelDirective = () => {
|
36
54
|
return (0, graphql_transformer_common_1.makeDirective)('model', [
|
37
55
|
(0, graphql_transformer_common_1.makeArgument)('subscriptions', (0, graphql_transformer_common_1.makeValueNode)({ onUpdate: null, onDelete: null })),
|
@@ -66,10 +84,10 @@ const constructMessageSessionFieldBelongsToDirective = (referenceFieldName) => {
|
|
66
84
|
const referencesArg = (0, graphql_transformer_common_1.makeArgument)('references', (0, graphql_transformer_common_1.makeValueNode)(referenceFieldName));
|
67
85
|
return (0, graphql_transformer_common_1.makeDirective)(graphql_directives_1.BelongsToDirective.name, [referencesArg]);
|
68
86
|
};
|
69
|
-
const
|
87
|
+
const constructMessageConversationField = (belongsToDirective, typeName) => {
|
70
88
|
return (0, graphql_transformer_common_1.makeField)('conversation', [], (0, graphql_transformer_common_1.makeNamedType)(typeName), [belongsToDirective]);
|
71
89
|
};
|
72
|
-
const constructConversationMessageModel = (modelName,
|
90
|
+
const constructConversationMessageModel = (modelName, conversationField, referenceFieldName, typeDirectives, conversationMessageInterface) => {
|
73
91
|
const id = (0, graphql_transformer_common_1.makeField)('id', [], (0, graphql_transformer_common_1.wrapNonNull)((0, graphql_transformer_common_1.makeNamedType)('ID')));
|
74
92
|
const conversationId = (0, graphql_transformer_common_1.makeField)(referenceFieldName, [], (0, graphql_transformer_common_1.wrapNonNull)((0, graphql_transformer_common_1.makeNamedType)('ID')));
|
75
93
|
const role = (0, graphql_transformer_common_1.makeField)('role', [], (0, graphql_transformer_common_1.makeNamedType)('ConversationParticipantRole'));
|
@@ -80,80 +98,9 @@ const constructConversationMessageModel = (modelName, sessionField, referenceFie
|
|
80
98
|
const object = {
|
81
99
|
...(0, graphql_transformer_common_1.blankObject)(modelName),
|
82
100
|
interfaces: [conversationMessageInterface],
|
83
|
-
fields: [id, conversationId,
|
101
|
+
fields: [id, conversationId, conversationField, role, content, context, uiComponents, associatedUserMessageId],
|
84
102
|
directives: typeDirectives,
|
85
103
|
};
|
86
104
|
return object;
|
87
105
|
};
|
88
|
-
const constructMessageSubscription = (subscriptionName, onMutationNames) => {
|
89
|
-
const awsSubscribeDirective = (0, graphql_transformer_common_1.makeDirective)('aws_subscribe', [(0, graphql_transformer_common_1.makeArgument)('mutations', (0, graphql_transformer_common_1.makeValueNode)(onMutationNames))]);
|
90
|
-
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
91
|
-
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID'))];
|
92
|
-
const subscriptionField = (0, graphql_transformer_common_1.makeField)(subscriptionName, args, (0, graphql_transformer_common_1.makeNamedType)(STREAM_RESPONSE_TYPE_NAME), [
|
93
|
-
awsSubscribeDirective,
|
94
|
-
cognitoAuthDirective,
|
95
|
-
]);
|
96
|
-
return subscriptionField;
|
97
|
-
};
|
98
|
-
const constructAssistantMutationField = (fieldName, messageModelName, inputTypeName) => {
|
99
|
-
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('input', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)(inputTypeName)))];
|
100
|
-
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
101
|
-
const createAssistantResponseMutation = (0, graphql_transformer_common_1.makeField)(fieldName, args, (0, graphql_transformer_common_1.makeNamedType)(messageModelName), [cognitoAuthDirective]);
|
102
|
-
return createAssistantResponseMutation;
|
103
|
-
};
|
104
|
-
const constructAssistantResponseMutationInput = (messageModelName) => {
|
105
|
-
const inputName = `Create${messageModelName}AssistantInput`;
|
106
|
-
return {
|
107
|
-
kind: 'InputObjectTypeDefinition',
|
108
|
-
name: { kind: 'Name', value: inputName },
|
109
|
-
fields: [
|
110
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
111
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('content', (0, graphql_transformer_common_1.makeListType)((0, graphql_transformer_common_1.makeNamedType)('ContentBlockInput'))),
|
112
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('associatedUserMessageId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
113
|
-
],
|
114
|
-
};
|
115
|
-
};
|
116
|
-
const constructAssistantStreamingMutationField = (fieldName, inputTypeName) => {
|
117
|
-
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('input', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)(inputTypeName)))];
|
118
|
-
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
119
|
-
const createAssistantResponseMutation = (0, graphql_transformer_common_1.makeField)(fieldName, args, (0, graphql_transformer_common_1.makeNamedType)(STREAM_RESPONSE_TYPE_NAME), [cognitoAuthDirective]);
|
120
|
-
return createAssistantResponseMutation;
|
121
|
-
};
|
122
|
-
const constructAssistantResponseStreamingMutationInput = (messageModelName) => {
|
123
|
-
const inputName = `Create${messageModelName}AssistantStreamingInput`;
|
124
|
-
return {
|
125
|
-
kind: 'InputObjectTypeDefinition',
|
126
|
-
name: { kind: 'Name', value: inputName },
|
127
|
-
fields: [
|
128
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('ID'))),
|
129
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('associatedUserMessageId', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('ID'))),
|
130
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('contentBlockIndex', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('Int'))),
|
131
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('contentBlockText', (0, graphql_transformer_common_1.makeNamedType)('String')),
|
132
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('contentBlockDeltaIndex', (0, graphql_transformer_common_1.makeNamedType)('Int')),
|
133
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('contentBlockToolUse', (0, graphql_transformer_common_1.makeNamedType)('AWSJSON')),
|
134
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('contentBlockDoneAtIndex', (0, graphql_transformer_common_1.makeNamedType)('Int')),
|
135
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('stopReason', (0, graphql_transformer_common_1.makeNamedType)('String')),
|
136
|
-
],
|
137
|
-
};
|
138
|
-
};
|
139
|
-
const STREAM_RESPONSE_TYPE_NAME = 'ConversationMessageStreamPart';
|
140
|
-
const constructStreamResponseType = () => {
|
141
|
-
return {
|
142
|
-
kind: 'ObjectTypeDefinition',
|
143
|
-
name: { kind: 'Name', value: STREAM_RESPONSE_TYPE_NAME },
|
144
|
-
fields: [
|
145
|
-
(0, graphql_transformer_common_1.makeField)('id', [], (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('ID'))),
|
146
|
-
(0, graphql_transformer_common_1.makeField)('owner', [], (0, graphql_transformer_common_1.makeNamedType)('String')),
|
147
|
-
(0, graphql_transformer_common_1.makeField)('conversationId', [], (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('ID'))),
|
148
|
-
(0, graphql_transformer_common_1.makeField)('associatedUserMessageId', [], (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('ID'))),
|
149
|
-
(0, graphql_transformer_common_1.makeField)('contentBlockIndex', [], (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)('Int'))),
|
150
|
-
(0, graphql_transformer_common_1.makeField)('contentBlockText', [], (0, graphql_transformer_common_1.makeNamedType)('String')),
|
151
|
-
(0, graphql_transformer_common_1.makeField)('contentBlockDeltaIndex', [], (0, graphql_transformer_common_1.makeNamedType)('Int')),
|
152
|
-
(0, graphql_transformer_common_1.makeField)('contentBlockToolUse', [], (0, graphql_transformer_common_1.makeNamedType)('AWSJSON')),
|
153
|
-
(0, graphql_transformer_common_1.makeField)('contentBlockDoneAtIndex', [], (0, graphql_transformer_common_1.makeNamedType)('Int')),
|
154
|
-
(0, graphql_transformer_common_1.makeField)('stopReason', [], (0, graphql_transformer_common_1.makeNamedType)('String')),
|
155
|
-
],
|
156
|
-
};
|
157
|
-
};
|
158
|
-
exports.constructStreamResponseType = constructStreamResponseType;
|
159
106
|
//# sourceMappingURL=message-model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"message-model.js","sourceRoot":"","sources":["../../src/graphql-types/message-model.ts"],"names":[],"mappings":";;;AAAA,wEAAqE;AACr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,GAAG,IAAA,sCAAS,EAAC,yBAAyB,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,IAAI,CAAC,CAAC,CAAC;IAE9F,MAAM,MAAM,GAAG;QACb,GAAG,IAAA,wCAAW,EAAC,SAAS,CAAC;QACzB,UAAU,EAAE,CAAC,4BAA4B,CAAC;QAC1C,MAAM,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,uBAAuB,CAAC;QAC9G,UAAU,EAAE,cAAc;KAC3B,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
2
|
+
export declare const CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = "conversationId";
|
3
|
+
export declare const LIST_MESSAGES_INDEX_NAME = "gsi-ConversationMessage.conversationId.createdAt";
|
4
|
+
export declare const CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = "ID";
|
5
|
+
export declare const getConversationTypeName: (config: ConversationDirectiveConfiguration) => string;
|
6
|
+
export declare const getConversationMessageTypeName: (config: ConversationDirectiveConfiguration) => string;
|
7
|
+
export declare const getMessageSubscriptionFieldName: (config: ConversationDirectiveConfiguration) => string;
|
8
|
+
export declare const getAssistantMutationFieldName: (config: ConversationDirectiveConfiguration) => string;
|
9
|
+
export declare const getFunctionStackName: (config: ConversationDirectiveConfiguration) => string;
|
10
|
+
export declare const getConversationMessageGetQueryName: (config: ConversationDirectiveConfiguration) => string;
|
11
|
+
export declare const getConversationMessageListQueryName: (config: ConversationDirectiveConfiguration) => string;
|
12
|
+
export declare const getConversationMessageListQueryInputTypeName: (config: ConversationDirectiveConfiguration) => string;
|
13
|
+
export declare const upperCaseConversationFieldName: (config: ConversationDirectiveConfiguration) => string;
|
14
|
+
//# sourceMappingURL=name-values.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name-values.d.ts","sourceRoot":"","sources":["../../src/graphql-types/name-values.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAE7F,eAAO,MAAM,0CAA0C,mBAAmB,CAAC;AAC3E,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAC3F,eAAO,MAAM,8CAA8C,OAAO,CAAC;AAEnE,eAAO,MAAM,uBAAuB,WAAY,kCAAkC,WACzB,CAAC;AAE1D,eAAO,MAAM,8BAA8B,WAAY,kCAAkC,WACzB,CAAC;AAEjE,eAAO,MAAM,+BAA+B,WAAY,kCAAkC,WACpB,CAAC;AAEvE,eAAO,MAAM,6BAA6B,WAAY,kCAAkC,WACpB,CAAC;AAErE,eAAO,MAAM,oBAAoB,WAAY,kCAAkC,WACF,CAAC;AAE9E,eAAO,MAAM,kCAAkC,WAAY,kCAAkC,WAC1B,CAAC;AAEpE,eAAO,MAAM,mCAAmC,WAAY,kCAAkC,WACf,CAAC;AAEhF,eAAO,MAAM,4CAA4C,WAAY,kCAAkC,WACvB,CAAC;AAEjF,eAAO,MAAM,8BAA8B,WAAY,kCAAkC,WAAqC,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js
ADDED
@@ -0,0 +1,30 @@
|
|
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.upperCaseConversationFieldName = exports.getConversationMessageListQueryInputTypeName = exports.getConversationMessageListQueryName = exports.getConversationMessageGetQueryName = exports.getFunctionStackName = exports.getAssistantMutationFieldName = exports.getMessageSubscriptionFieldName = exports.getConversationMessageTypeName = exports.getConversationTypeName = exports.CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = exports.LIST_MESSAGES_INDEX_NAME = exports.CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = void 0;
|
7
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
8
|
+
const pluralize_1 = __importDefault(require("pluralize"));
|
9
|
+
exports.CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = 'conversationId';
|
10
|
+
exports.LIST_MESSAGES_INDEX_NAME = 'gsi-ConversationMessage.conversationId.createdAt';
|
11
|
+
exports.CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = 'ID';
|
12
|
+
const getConversationTypeName = (config) => `Conversation${(0, exports.upperCaseConversationFieldName)(config)}`;
|
13
|
+
exports.getConversationTypeName = getConversationTypeName;
|
14
|
+
const getConversationMessageTypeName = (config) => `ConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}`;
|
15
|
+
exports.getConversationMessageTypeName = getConversationMessageTypeName;
|
16
|
+
const getMessageSubscriptionFieldName = (config) => `onCreateAssistantResponse${(0, exports.upperCaseConversationFieldName)(config)}`;
|
17
|
+
exports.getMessageSubscriptionFieldName = getMessageSubscriptionFieldName;
|
18
|
+
const getAssistantMutationFieldName = (config) => `createAssistantResponse${(0, exports.upperCaseConversationFieldName)(config)}`;
|
19
|
+
exports.getAssistantMutationFieldName = getAssistantMutationFieldName;
|
20
|
+
const getFunctionStackName = (config) => `${(0, exports.upperCaseConversationFieldName)(config)}ConversationDirectiveLambdaStack`;
|
21
|
+
exports.getFunctionStackName = getFunctionStackName;
|
22
|
+
const getConversationMessageGetQueryName = (config) => `getConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}`;
|
23
|
+
exports.getConversationMessageGetQueryName = getConversationMessageGetQueryName;
|
24
|
+
const getConversationMessageListQueryName = (config) => `listConversationMessage${(0, pluralize_1.default)((0, exports.upperCaseConversationFieldName)(config))}`;
|
25
|
+
exports.getConversationMessageListQueryName = getConversationMessageListQueryName;
|
26
|
+
const getConversationMessageListQueryInputTypeName = (config) => `ModelConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}FilterInput`;
|
27
|
+
exports.getConversationMessageListQueryInputTypeName = getConversationMessageListQueryInputTypeName;
|
28
|
+
const upperCaseConversationFieldName = (config) => (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
29
|
+
exports.upperCaseConversationFieldName = upperCaseConversationFieldName;
|
30
|
+
//# sourceMappingURL=name-values.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name-values.js","sourceRoot":"","sources":["../../src/graphql-types/name-values.ts"],"names":[],"mappings":";;;;;;AAAA,2EAAqD;AACrD,0DAAkC;AAGrB,QAAA,0CAA0C,GAAG,gBAAgB,CAAC;AAC9D,QAAA,wBAAwB,GAAG,kDAAkD,CAAC;AAC9E,QAAA,8CAA8C,GAAG,IAAI,CAAC;AAE5D,MAAM,uBAAuB,GAAG,CAAC,MAA0C,EAAE,EAAE,CACpF,eAAe,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AAD7C,QAAA,uBAAuB,2BACsB;AAEnD,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC3F,sBAAsB,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADpD,QAAA,8BAA8B,kCACsB;AAE1D,MAAM,+BAA+B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC5F,4BAA4B,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AAD1D,QAAA,+BAA+B,mCAC2B;AAEhE,MAAM,6BAA6B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC1F,0BAA0B,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADxD,QAAA,6BAA6B,iCAC2B;AAE9D,MAAM,oBAAoB,GAAG,CAAC,MAA0C,EAAE,EAAE,CACjF,GAAG,IAAA,sCAA8B,EAAC,MAAM,CAAC,kCAAkC,CAAC;AADjE,QAAA,oBAAoB,wBAC6C;AAEvE,MAAM,kCAAkC,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC/F,yBAAyB,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADvD,QAAA,kCAAkC,sCACqB;AAE7D,MAAM,mCAAmC,GAAG,CAAC,MAA0C,EAAE,EAAE,CAChG,0BAA0B,IAAA,mBAAS,EAAC,IAAA,sCAA8B,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AADnE,QAAA,mCAAmC,uCACgC;AAEzE,MAAM,4CAA4C,GAAG,CAAC,MAA0C,EAAE,EAAE,CACzG,2BAA2B,IAAA,sCAA8B,EAAC,MAAM,CAAC,aAAa,CAAC;AADpE,QAAA,4CAA4C,gDACwB;AAE1E,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAAC,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAAlH,QAAA,8BAA8B,kCAAoF"}
|
@@ -2,36 +2,8 @@ import { ModelTransformer } from '@aws-amplify/graphql-model-transformer';
|
|
2
2
|
import { BelongsToTransformer, HasManyTransformer } from '@aws-amplify/graphql-relational-transformer';
|
3
3
|
import { TransformerPluginBase } from '@aws-amplify/graphql-transformer-core';
|
4
4
|
import { TransformerAuthProvider, TransformerContextProvider, TransformerPrepareStepContextProvider, TransformerSchemaVisitStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
5
|
-
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
6
|
-
import { ConversationModel } from './graphql-types/session-model';
|
7
|
-
import { MessageModel } from './graphql-types/message-model';
|
8
|
-
import { type ToolDefinition, type Tools } from './utils/tools';
|
9
5
|
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
10
|
-
|
11
|
-
parent: ObjectTypeDefinitionNode;
|
12
|
-
directive: DirectiveNode;
|
13
|
-
aiModel: string;
|
14
|
-
functionName: string | undefined;
|
15
|
-
handler: ConversationHandlerFunctionConfiguration | undefined;
|
16
|
-
field: FieldDefinitionNode;
|
17
|
-
responseMutationInputTypeName: string;
|
18
|
-
responseMutationName: string;
|
19
|
-
systemPrompt: string;
|
20
|
-
tools: ToolDefinition[];
|
21
|
-
toolSpec: Tools;
|
22
|
-
conversationModel: ConversationModel;
|
23
|
-
messageModel: MessageModel;
|
24
|
-
inferenceConfiguration: ConversationInferenceConfiguration;
|
25
|
-
};
|
26
|
-
export type ConversationHandlerFunctionConfiguration = {
|
27
|
-
functionName: string;
|
28
|
-
eventVersion: string;
|
29
|
-
};
|
30
|
-
export type ConversationInferenceConfiguration = {
|
31
|
-
maxTokens?: number;
|
32
|
-
temperature?: number;
|
33
|
-
topP?: number;
|
34
|
-
};
|
6
|
+
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
35
7
|
export declare class ConversationTransformer extends TransformerPluginBase {
|
36
8
|
private directives;
|
37
9
|
private fieldHandler;
|
@@ -41,6 +13,5 @@ export declare class ConversationTransformer extends TransformerPluginBase {
|
|
41
13
|
field: (parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definition: FieldDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
42
14
|
generateResolvers: (ctx: TransformerContextProvider) => void;
|
43
15
|
prepare: (ctx: TransformerPrepareStepContextProvider) => void;
|
44
|
-
validate: () => void;
|
45
16
|
}
|
46
17
|
//# sourceMappingURL=grapqhl-conversation-transformer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grapqhl-conversation-transformer.d.ts","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAyB,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EAC1C,MAAM,6CAA6C,CAAC;AACrD,OAAO,
|
1
|
+
{"version":3,"file":"grapqhl-conversation-transformer.d.ts","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAyB,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EAC1C,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAQpH,qBAAa,uBAAwB,SAAQ,qBAAqB;IAChE,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,iBAAiB,CAAgC;gBAGvD,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,YAAY,EAAE,uBAAuB,EACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC;IAepD,KAAK,WACK,wBAAwB,GAAG,2BAA2B,cAClD,mBAAmB,aACpB,aAAa,WACf,yCAAyC,KACjD,IAAI,CAGL;IAMF,iBAAiB,QAAS,0BAA0B,KAAG,IAAI,CAEzD;IAMF,OAAO,QAAS,qCAAqC,KAAG,IAAI,CAE1D;CACH"}
|
@@ -1,35 +1,11 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
3
|
exports.ConversationTransformer = void 0;
|
27
4
|
const graphql_directives_1 = require("@aws-amplify/graphql-directives");
|
28
5
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
6
|
+
const conversation_field_handler_1 = require("./transformer-steps/conversation-field-handler");
|
29
7
|
const conversation_prepare_handler_1 = require("./transformer-steps/conversation-prepare-handler");
|
30
8
|
const conversation_resolver_generator_1 = require("./transformer-steps/conversation-resolver-generator");
|
31
|
-
const conversation_field_handler_1 = require("./transformer-steps/conversation-field-handler");
|
32
|
-
const semver = __importStar(require("semver"));
|
33
9
|
class ConversationTransformer extends graphql_transformer_core_1.TransformerPluginBase {
|
34
10
|
constructor(modelTransformer, hasManyTransformer, belongsToTransformer, authProvider, functionNameMap) {
|
35
11
|
super('amplify-conversation-transformer', graphql_directives_1.ConversationDirective.definition);
|
@@ -44,22 +20,6 @@ class ConversationTransformer extends graphql_transformer_core_1.TransformerPlug
|
|
44
20
|
this.prepare = (ctx) => {
|
45
21
|
this.prepareHandler.prepare(ctx, this.directives);
|
46
22
|
};
|
47
|
-
this.validate = () => {
|
48
|
-
for (const directive of this.directives) {
|
49
|
-
if (directive.field.type.kind !== 'NamedType' || directive.field.type.name.value !== 'ConversationMessage') {
|
50
|
-
throw new graphql_transformer_core_1.InvalidDirectiveError('@conversation return type must be ConversationMessage');
|
51
|
-
}
|
52
|
-
if (directive.handler && directive.functionName) {
|
53
|
-
throw new graphql_transformer_core_1.InvalidDirectiveError("'functionName' and 'handler' are mutually exclusive");
|
54
|
-
}
|
55
|
-
if (directive.handler) {
|
56
|
-
const eventVersion = semver.coerce(directive.handler.eventVersion);
|
57
|
-
if ((eventVersion === null || eventVersion === void 0 ? void 0 : eventVersion.major) !== 1) {
|
58
|
-
throw new Error(`Unsupported custom conversation handler. Expected eventVersion to match 1.x, received ${directive.handler.eventVersion}`);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
};
|
63
23
|
this.fieldHandler = new conversation_field_handler_1.ConversationFieldHandler();
|
64
24
|
this.prepareHandler = new conversation_prepare_handler_1.ConversationPrepareHandler(modelTransformer, hasManyTransformer, belongsToTransformer, authProvider);
|
65
25
|
this.resolverGenerator = new conversation_resolver_generator_1.ConversationResolverGenerator(functionNameMap);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grapqhl-conversation-transformer.js","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"grapqhl-conversation-transformer.js","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AAGxE,oFAAqG;AAUrG,+FAA0F;AAC1F,mGAA8F;AAC9F,yGAAoG;AAIpG,MAAa,uBAAwB,SAAQ,gDAAqB;IAMhE,YACE,gBAAkC,EAClC,kBAAsC,EACtC,oBAA0C,EAC1C,YAAqC,EACrC,eAAkD;QAElD,KAAK,CAAC,kCAAkC,EAAE,0CAAqB,CAAC,UAAU,CAAC,CAAC;QAZtE,eAAU,GAAyC,EAAE,CAAC;QAyB9D,UAAK,GAAG,CACN,MAA8D,EAC9D,UAA+B,EAC/B,SAAwB,EACxB,OAAkD,EAC5C,EAAE;YACR,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YACpG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACvC,CAAC,CAAC;QAMF,sBAAiB,GAAG,CAAC,GAA+B,EAAQ,EAAE;YAC5D,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACjE,CAAC,CAAC;QAMF,YAAO,GAAG,CAAC,GAA0C,EAAQ,EAAE;YAC7D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,CAAC,CAAC;QApCA,IAAI,CAAC,YAAY,GAAG,IAAI,qDAAwB,EAAE,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,IAAI,yDAA0B,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAC/H,IAAI,CAAC,iBAAiB,GAAG,IAAI,+DAA6B,CAAC,eAAe,CAAC,CAAC;IAC9E,CAAC;CAkCF;AAnDD,0DAmDC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-pipeline-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-response-pipeline-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,mCAAmC,EAAE,kBAKjD,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assistantResponsePipelineDefinition = void 0;
|
4
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
5
|
+
exports.assistantResponsePipelineDefinition = {
|
6
|
+
requestSlots: [init(), auth(), verifySessionOwner()],
|
7
|
+
dataSlot: data(),
|
8
|
+
responseSlots: [],
|
9
|
+
field: (config) => ({ typeName: 'Mutation', fieldName: fieldName(config) }),
|
10
|
+
};
|
11
|
+
function init() {
|
12
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
13
|
+
slotName: 'init',
|
14
|
+
fileName: 'init-resolver-fn.template.js',
|
15
|
+
generateTemplate: templateGenerator('init'),
|
16
|
+
});
|
17
|
+
}
|
18
|
+
function auth() {
|
19
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
20
|
+
slotName: 'auth',
|
21
|
+
fileName: 'auth-resolver-fn.template.js',
|
22
|
+
generateTemplate: templateGenerator('auth'),
|
23
|
+
});
|
24
|
+
}
|
25
|
+
function verifySessionOwner() {
|
26
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
27
|
+
slotName: 'verifySessionOwner',
|
28
|
+
fileName: 'verify-session-owner-resolver-fn.template.js',
|
29
|
+
generateTemplate: templateGenerator('verify-session-owner'),
|
30
|
+
dataSource: (config) => config.dataSources.conversationTableDataSource,
|
31
|
+
substitutions: () => ({
|
32
|
+
CONVERSATION_ID_PARENT: 'ctx.args.input',
|
33
|
+
}),
|
34
|
+
});
|
35
|
+
}
|
36
|
+
function data() {
|
37
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
38
|
+
slotName: 'data',
|
39
|
+
fileName: 'assistant-mutation-resolver-fn.template.js',
|
40
|
+
generateTemplate: templateGenerator('assistant-response'),
|
41
|
+
dataSource: (config) => config.dataSources.messageTableDataSource,
|
42
|
+
substitutions: (config) => ({
|
43
|
+
CONVERSATION_MESSAGE_TYPE_NAME: config.message.model.name.value,
|
44
|
+
}),
|
45
|
+
});
|
46
|
+
}
|
47
|
+
function fieldName(config) {
|
48
|
+
return config.assistantResponseMutation.field.name.value;
|
49
|
+
}
|
50
|
+
function templateGenerator(slotName) {
|
51
|
+
return (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Mutation', slotName, fieldName);
|
52
|
+
}
|
53
|
+
//# sourceMappingURL=assistant-response-pipeline-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-pipeline-definition.js","sourceRoot":"","sources":["../../src/resolvers/assistant-response-pipeline-definition.ts"],"names":[],"mappings":";;;AACA,iFAKwC;AAK3B,QAAA,mCAAmC,GAAuB;IACrE,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,kBAAkB,EAAE,CAAC;IACpD,QAAQ,EAAE,IAAI,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;CAC5E,CAAC;AAKF,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,8BAA8B;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,8BAA8B;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,kBAAkB;IACzB,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,oBAAoB;QAC9B,QAAQ,EAAE,8CAA8C;QACxD,gBAAgB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC;QAC3D,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,2BAA2B;QACtE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;YACpB,sBAAsB,EAAE,gBAAgB;SACzC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,4CAA4C;QACtD,gBAAgB,EAAE,iBAAiB,CAAC,oBAAoB,CAAC;QACzD,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,sBAAsB;QACjE,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC1B,8BAA8B,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK;SAChE,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,SAAS,CAAC,MAA0C;IAC3D,OAAO,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC3D,CAAC;AAKD,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,IAAA,oEAAqC,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAChF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-subscription-pipeline-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-response-subscription-pipeline-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,+CAA+C,EAAE,kBAK7D,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assistantResponseSubscriptionPipelineDefinition = void 0;
|
4
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
5
|
+
exports.assistantResponseSubscriptionPipelineDefinition = {
|
6
|
+
requestSlots: [],
|
7
|
+
dataSlot: data(),
|
8
|
+
responseSlots: [],
|
9
|
+
field: (config) => ({ typeName: 'Subscription', fieldName: fieldName(config) }),
|
10
|
+
};
|
11
|
+
function data() {
|
12
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
13
|
+
slotName: 'data',
|
14
|
+
fileName: 'assistant-messages-subscription-resolver-fn.template.js',
|
15
|
+
generateTemplate: (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Subscription', 'assistant-message', fieldName),
|
16
|
+
});
|
17
|
+
}
|
18
|
+
function fieldName(config) {
|
19
|
+
return config.assistantResponseSubscriptionField.name.value;
|
20
|
+
}
|
21
|
+
//# sourceMappingURL=assistant-response-subscription-pipeline-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-subscription-pipeline-definition.js","sourceRoot":"","sources":["../../src/resolvers/assistant-response-subscription-pipeline-definition.ts"],"names":[],"mappings":";;;AACA,iFAKwC;AAK3B,QAAA,+CAA+C,GAAuB;IACjF,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,IAAI,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;CAChF,CAAC;AAKF,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,yDAAyD;QACnE,gBAAgB,EAAE,IAAA,oEAAqC,EAAC,cAAc,EAAE,mBAAmB,EAAE,SAAS,CAAC;KACxG,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,SAAS,CAAC,MAA0C;IAC3D,OAAO,MAAM,CAAC,kCAAkC,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9D,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TransformerResolver } from '@aws-amplify/graphql-transformer-core';
|
2
|
+
import { MappingTemplateProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
4
|
+
import { PipelineDefinition, ResolverFunctionDefinition } from './resolver-function-definition';
|
5
|
+
export declare const generateResolverPipeline: (pipelineDefinition: PipelineDefinition, directiveConfig: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => TransformerResolver;
|
6
|
+
export declare const generateResolverFunction: (definition: ResolverFunctionDefinition, config: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => MappingTemplateProvider;
|
7
|
+
//# sourceMappingURL=generate-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/generate-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAIlH,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAQhG,eAAO,MAAM,wBAAwB,uBACf,kBAAkB,mBACrB,kCAAkC,OAC9C,0BAA0B,KAC9B,mBA0BF,CAAC;AAQF,eAAO,MAAM,wBAAwB,eACvB,0BAA0B,UAC9B,kCAAkC,OACrC,0BAA0B,KAC9B,uBAKF,CAAC"}
|