@aws-amplify/graphql-api-construct 1.12.0-gen2-migration.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +496 -215
- package/API.md +3 -11
- package/CHANGELOG.md +39 -3
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +9 -10
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/model-datasource-strategy-types.d.ts +1 -19
- package/lib/model-datasource-strategy-types.js +1 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +11 -2
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/README.md +66 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +28 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +74 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.d.ts +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.js +6 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.d.ts +30 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +191 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +30 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +47 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +18 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +66 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +8 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.d.ts +15 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +32 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.d.ts +9 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.js +44 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +48 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.d.ts +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.js +6 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.d.ts +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +4 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +6 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +61 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.d.ts +5 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.js +11 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/index.d.ts +3 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.d.ts +4 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.js +34 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/index.js +29 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/README.md +9 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.d.ts +4 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.d.ts +66 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.d.ts +5 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.d.ts +56 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.d.ts +6 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.d.ts +8 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.d.ts +7 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.d.ts +35 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.d.ts +24 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.d.ts +17 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.d.ts +8 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.d.ts +8 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.d.ts +14 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.d.ts +23 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.js +39 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.d.ts +11 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.d.ts +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.d.ts +16 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.d.ts +27 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.d.ts +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.d.ts +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.d.ts +5 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.d.ts +4 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.js +3 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/package.json +24 -0
- package/node_modules/@aws-amplify/ai-constructs/package.json +37 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +27 -1
- 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 +6 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +27 -21
- package/node_modules/@aws-amplify/graphql-conversation-transformer/API.md +33 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/README.md +145 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +13 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +111 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js +81 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts +39 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js +35 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts +2 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js +6 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js +62 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +77 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js +57 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +34 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +104 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts +6 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js +59 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +50 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +45 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts +12 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js +68 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts +15 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +44 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +20 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js +184 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js +81 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts +25 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js +116 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +82 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +25 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +19 -13
- package/node_modules/@aws-amplify/graphql-directives/API.md +6 -0
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +14 -0
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js +31 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js +24 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +2 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +5 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js +2 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +13 -6
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +17 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +17 -13
- package/node_modules/@aws-amplify/graphql-generation-transformer/API.md +26 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +11 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/README.md +85 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts +32 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js +119 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts +2 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js +6 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js +72 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js +78 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts +27 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js +31 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js +29 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +78 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +17 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +17 -13
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +25 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +18 -14
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +27 -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 +21 -17
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +27 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +2 -47
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +22 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +11 -11
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts +0 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js +2 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts +10 -4
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +91 -37
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.js +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js +1 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +0 -3
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +2 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +21 -16
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +23 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +3 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +17 -13
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +34 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +13 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +13 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +13 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +7 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +7 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +19 -15
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +31 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +3 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +22 -16
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +25 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +18 -14
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +33 -2
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +8 -2
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +32 -23
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +8 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +54 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +20 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js +3 -9
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +5 -11
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +6 -31
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +2 -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 +8 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts +3 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js +12 -16
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts +6 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js +71 -23
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts +20 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js +89 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js +10 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts +21 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js +44 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts +21 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js +27 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -2
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +1 -9
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +19 -13
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +13 -23
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +20 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts +3 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +1 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts +4 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +14 -7
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/graphql-api-provider.ts +3 -10
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts +0 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +0 -10
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transform-host-provider.ts +5 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transform-parameters.ts +1 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +12 -0
- package/node_modules/graphql-mapping-template/LICENSE +201 -0
- package/node_modules/graphql-mapping-template/package.json +13 -5
- package/node_modules/graphql-transformer-common/API.md +0 -1
- package/node_modules/graphql-transformer-common/CHANGELOG.md +9 -3
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts +0 -1
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.js +0 -1
- package/node_modules/graphql-transformer-common/lib/ResourceConstants.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +13 -6
- package/package.json +42 -31
- package/src/amplify-graphql-api.ts +7 -8
- package/src/model-datasource-strategy-types.ts +0 -21
- package/src/types.ts +12 -2
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assistantMutationResolver = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const assistantMutationResolver = () => {
|
7
|
+
const req = createAssistantMutationRequestFunction();
|
8
|
+
const res = createAssistantMutationResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.assistantMutationResolver = assistantMutationResolver;
|
12
|
+
const createAssistantMutationRequestFunction = () => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
import { util } from '@aws-appsync/utils';
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Sends a request to the attached data source
|
18
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
19
|
+
* @returns {*} the request
|
20
|
+
*/
|
21
|
+
export function request(ctx) {
|
22
|
+
const owner = ctx.identity['claims']['sub'];
|
23
|
+
ctx.stash.owner = owner;
|
24
|
+
const { conversationId, content, associatedUserMessageId } = ctx.args.input;
|
25
|
+
const updatedAt = util.time.nowISO8601();
|
26
|
+
|
27
|
+
const expression = 'SET #assistantContent = :assistantContent, #updatedAt = :updatedAt';
|
28
|
+
const expressionNames = { '#assistantContent': 'assistantContent', '#updatedAt': 'updatedAt' };
|
29
|
+
const expressionValues = { ':assistantContent': content, ':updatedAt': updatedAt };
|
30
|
+
const condition = JSON.parse(
|
31
|
+
util.transform.toDynamoDBConditionExpression({
|
32
|
+
owner: { eq: owner },
|
33
|
+
conversationId: { eq: conversationId }
|
34
|
+
})
|
35
|
+
);
|
36
|
+
return {
|
37
|
+
operation: 'UpdateItem',
|
38
|
+
key: util.dynamodb.toMapValues({ id: associatedUserMessageId }),
|
39
|
+
condition,
|
40
|
+
update: {
|
41
|
+
expression,
|
42
|
+
expressionNames,
|
43
|
+
expressionValues: util.dynamodb.toMapValues(expressionValues),
|
44
|
+
}
|
45
|
+
};
|
46
|
+
}`;
|
47
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
48
|
+
};
|
49
|
+
const createAssistantMutationResponseFunction = () => {
|
50
|
+
const responseFunctionString = `
|
51
|
+
/**
|
52
|
+
* Returns the resolver result
|
53
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
54
|
+
* @returns {*} the result
|
55
|
+
*/
|
56
|
+
export function response(ctx) {
|
57
|
+
// Update with response logic
|
58
|
+
if (ctx.error) {
|
59
|
+
util.error(ctx.error.message, ctx.error.type);
|
60
|
+
}
|
61
|
+
|
62
|
+
const { conversationId, content, associatedUserMessageId } = ctx.args.input;
|
63
|
+
const { createdAt, updatedAt } = ctx.result;
|
64
|
+
|
65
|
+
return {
|
66
|
+
id: associatedUserMessageId,
|
67
|
+
content,
|
68
|
+
conversationId,
|
69
|
+
role: 'assistant',
|
70
|
+
owner: ctx.stash.owner,
|
71
|
+
createdAt,
|
72
|
+
updatedAt,
|
73
|
+
};
|
74
|
+
}`;
|
75
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
76
|
+
};
|
77
|
+
//# sourceMappingURL=assistant-mutation-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-mutation-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAU5B,MAAM,yBAAyB,GAAG,GAA+B,EAAE;IACxE,MAAM,GAAG,GAAG,sCAAsC,EAAE,CAAC;IACrD,MAAM,GAAG,GAAG,uCAAuC,EAAE,CAAC;IACtD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAJW,QAAA,yBAAyB,6BAIpC;AAQF,MAAM,sCAAsC,GAAG,GAA4B,EAAE;IAC3E,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiC1B,CAAC;IAEL,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAQF,MAAM,uCAAuC,GAAG,GAA4B,EAAE;IAC5E,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;MAwB3B,CAAC;IAEL,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"auth-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/auth-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAQ7E,eAAO,MAAM,mBAAmB,QAAO,0BAItC,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.authMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const authMappingTemplate = () => {
|
7
|
+
const req = createAuthRequestFunction();
|
8
|
+
const res = createAuthResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.authMappingTemplate = authMappingTemplate;
|
12
|
+
const createAuthRequestFunction = () => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
export function request(ctx) {
|
15
|
+
ctx.stash.hasAuth = true;
|
16
|
+
const isAuthorized = false;
|
17
|
+
|
18
|
+
if (util.authType() === 'User Pool Authorization') {
|
19
|
+
if (!isAuthorized) {
|
20
|
+
const authFilter = [];
|
21
|
+
let ownerClaim0 = ctx.identity['claims']['sub'];
|
22
|
+
ctx.args.owner = ownerClaim0;
|
23
|
+
const currentClaim1 = ctx.identity['claims']['username'] ?? ctx.identity['claims']['cognito:username'];
|
24
|
+
if (ownerClaim0 && currentClaim1) {
|
25
|
+
ownerClaim0 = ownerClaim0 + '::' + currentClaim1;
|
26
|
+
authFilter.push({ owner: { eq: ownerClaim0 } })
|
27
|
+
}
|
28
|
+
const role0_0 = ctx.identity['claims']['sub'];
|
29
|
+
if (role0_0) {
|
30
|
+
authFilter.push({ owner: { eq: role0_0 } });
|
31
|
+
}
|
32
|
+
// we can just reuse currentClaim1 here, but doing this (for now) to mirror the existing
|
33
|
+
// vtl auth resolver.
|
34
|
+
const role0_1 = ctx.identity['claims']['username'] ?? ctx.identity['claims']['cognito:username'];
|
35
|
+
if (role0_1) {
|
36
|
+
authFilter.push({ owner: { eq: role0_1 }});
|
37
|
+
}
|
38
|
+
if (authFilter.length !== 0) {
|
39
|
+
ctx.stash.authFilter = { or: authFilter };
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
if (!isAuthorized && ctx.stash.authFilter.length === 0) {
|
44
|
+
util.unauthorized();
|
45
|
+
}
|
46
|
+
return { version: '2018-05-29', payload: {} };
|
47
|
+
}`;
|
48
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
49
|
+
};
|
50
|
+
const createAuthResponseFunction = () => {
|
51
|
+
const responseFunctionString = `
|
52
|
+
export function response(ctx) {
|
53
|
+
return {};
|
54
|
+
}`;
|
55
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
56
|
+
};
|
57
|
+
//# sourceMappingURL=auth-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"auth-resolver.js","sourceRoot":"","sources":["../../src/resolvers/auth-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAS5B,MAAM,mBAAmB,GAAG,GAA+B,EAAE;IAClE,MAAM,GAAG,GAAG,yBAAyB,EAAE,CAAC;IACxC,MAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;IACzC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AAQF,MAAM,yBAAyB,GAAG,GAA4B,EAAE;IAC9D,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkCxB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AASF,MAAM,0BAA0B,GAAG,GAA4B,EAAE;IAC/D,MAAM,sBAAsB,GAAG;;;QAGzB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAQ7E,eAAO,MAAM,mBAAmB,QAAO,0BAItC,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.initMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const initMappingTemplate = () => {
|
7
|
+
const req = createInitRequestFunction();
|
8
|
+
const res = createInitResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.initMappingTemplate = initMappingTemplate;
|
12
|
+
const createInitRequestFunction = () => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
export function request(ctx) {
|
15
|
+
ctx.stash.defaultValues = ctx.stash.defaultValues ?? {};
|
16
|
+
ctx.stash.defaultValues.id = util.autoId();
|
17
|
+
const createdAt = util.time.nowISO8601();
|
18
|
+
ctx.stash.defaultValues.createdAt = createdAt;
|
19
|
+
ctx.stash.defaultValues.updatedAt = createdAt;
|
20
|
+
return {
|
21
|
+
version: '2018-05-09',
|
22
|
+
payload: {}
|
23
|
+
};
|
24
|
+
}`;
|
25
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
26
|
+
};
|
27
|
+
const createInitResponseFunction = () => {
|
28
|
+
const responseFunctionString = `
|
29
|
+
export function response(ctx) {
|
30
|
+
return {};
|
31
|
+
}`;
|
32
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=init-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAS5B,MAAM,mBAAmB,GAAG,GAA+B,EAAE;IAClE,MAAM,GAAG,GAAG,yBAAyB,EAAE,CAAC;IACxC,MAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;IACzC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AASF,MAAM,yBAAyB,GAAG,GAA4B,EAAE;IAC9D,MAAM,qBAAqB,GAAG;;;;;;;;;;;QAWxB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAQF,MAAM,0BAA0B,GAAG,GAA4B,EAAE;IAC/D,MAAM,sBAAsB,GAAG;;;QAGzB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
+
import { JSResolverFunctionProvider } from './js-resolver-function-provider';
|
4
|
+
export declare const invokeLambdaMappingTemplate: (config: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => JSResolverFunctionProvider;
|
5
|
+
//# sourceMappingURL=invoke-lambda-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"invoke-lambda-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAA2B,MAAM,6CAA6C,CAAC;AAElH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAEzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAS7E,eAAO,MAAM,2BAA2B,WAC9B,kCAAkC,OACrC,0BAA0B,KAC9B,0BAIF,CAAC"}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.invokeLambdaMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const invokeLambdaMappingTemplate = (config, ctx) => {
|
7
|
+
const req = createInvokeLambdaRequestFunction(config, ctx);
|
8
|
+
const res = createInvokeLambdaResponseFunction(config);
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.invokeLambdaMappingTemplate = invokeLambdaMappingTemplate;
|
12
|
+
const createInvokeLambdaRequestFunction = (config, ctx) => {
|
13
|
+
const { responseMutationInputTypeName, responseMutationName } = config;
|
14
|
+
const toolDefinitions = JSON.stringify(config.toolSpec);
|
15
|
+
const toolDefinitionsLine = toolDefinitions ? `const toolDefinitions = ${toolDefinitions};` : '';
|
16
|
+
const modelConfigurationLine = generateModelConfigurationLine(config);
|
17
|
+
const graphqlEndpoint = ctx.api.graphqlUrl;
|
18
|
+
const toolsConfigurationLine = toolDefinitions
|
19
|
+
? (0, ts_dedent_1.dedent) `const dataTools = toolDefinitions.tools;
|
20
|
+
const toolsConfiguration = {
|
21
|
+
dataTools,
|
22
|
+
clientTools,
|
23
|
+
};`
|
24
|
+
: (0, ts_dedent_1.dedent) `const toolsConfiguration = {
|
25
|
+
clientTools
|
26
|
+
};`;
|
27
|
+
const requestFunctionString = `
|
28
|
+
import { util } from '@aws-appsync/utils';
|
29
|
+
|
30
|
+
export function request(ctx) {
|
31
|
+
const { args, identity, request, prev } = ctx;
|
32
|
+
${toolDefinitionsLine}
|
33
|
+
const selectionSet = '${selectionSet}';
|
34
|
+
const graphqlApiEndpoint = '${graphqlEndpoint}';
|
35
|
+
|
36
|
+
const messages = prev.result.items;
|
37
|
+
const responseMutation = {
|
38
|
+
name: '${responseMutationName}',
|
39
|
+
inputTypeName: '${responseMutationInputTypeName}',
|
40
|
+
selectionSet,
|
41
|
+
};
|
42
|
+
const currentMessageId = ctx.stash.defaultValues.id;
|
43
|
+
${modelConfigurationLine}
|
44
|
+
|
45
|
+
const clientTools = args.toolConfiguration?.tools?.map((tool) => { return { ...tool.toolSpec }});
|
46
|
+
${toolsConfigurationLine}
|
47
|
+
|
48
|
+
const authHeader = request.headers['authorization'];
|
49
|
+
const payload = {
|
50
|
+
conversationId: args.conversationId,
|
51
|
+
currentMessageId,
|
52
|
+
responseMutation,
|
53
|
+
graphqlApiEndpoint,
|
54
|
+
modelConfiguration,
|
55
|
+
request: { headers: { authorization: authHeader }},
|
56
|
+
messages,
|
57
|
+
toolsConfiguration,
|
58
|
+
};
|
59
|
+
|
60
|
+
return {
|
61
|
+
operation: 'Invoke',
|
62
|
+
payload,
|
63
|
+
invocationType: 'Event'
|
64
|
+
};
|
65
|
+
}`;
|
66
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
67
|
+
};
|
68
|
+
const createInvokeLambdaResponseFunction = (config) => {
|
69
|
+
const responseFunctionString = `
|
70
|
+
export function response(ctx) {
|
71
|
+
let success = true;
|
72
|
+
if (ctx.error) {
|
73
|
+
util.appendError(ctx.error.message, ctx.error.type);
|
74
|
+
success = false;
|
75
|
+
}
|
76
|
+
const response = {
|
77
|
+
__typename: '${config.messageModel.messageModel.name.value}',
|
78
|
+
id: ctx.stash.defaultValues.id,
|
79
|
+
conversationId: ctx.args.conversationId,
|
80
|
+
role: 'user',
|
81
|
+
content: ctx.args.content,
|
82
|
+
createdAt: ctx.stash.defaultValues.createdAt,
|
83
|
+
updatedAt: ctx.stash.defaultValues.updatedAt,
|
84
|
+
};
|
85
|
+
return response;
|
86
|
+
}`;
|
87
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
88
|
+
};
|
89
|
+
const generateModelConfigurationLine = (config) => {
|
90
|
+
const { aiModel, systemPrompt } = config;
|
91
|
+
return (0, ts_dedent_1.dedent) `const modelConfiguration = {
|
92
|
+
modelId: '${aiModel}',
|
93
|
+
systemPrompt: ${JSON.stringify(systemPrompt)},
|
94
|
+
${generateModelInferenceConfigurationLine(config)}
|
95
|
+
};`;
|
96
|
+
};
|
97
|
+
const generateModelInferenceConfigurationLine = (config) => {
|
98
|
+
const { inferenceConfiguration } = config;
|
99
|
+
return inferenceConfiguration && Object.keys(inferenceConfiguration).length > 0
|
100
|
+
? (0, ts_dedent_1.dedent) `inferenceConfiguration: ${JSON.stringify(config.inferenceConfiguration)},`
|
101
|
+
: '';
|
102
|
+
};
|
103
|
+
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`;
|
104
|
+
//# sourceMappingURL=invoke-lambda-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"invoke-lambda-resolver.js","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":";;;AACA,oFAAwE;AAExE,yCAAmC;AAU5B,MAAM,2BAA2B,GAAG,CACzC,MAA0C,EAC1C,GAA+B,EACH,EAAE;IAC9B,MAAM,GAAG,GAAG,iCAAiC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,GAAG,GAAG,kCAAkC,CAAC,MAAM,CAAC,CAAC;IACvD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAPW,QAAA,2BAA2B,+BAOtC;AAUF,MAAM,iCAAiC,GAAG,CACxC,MAA0C,EAC1C,GAA+B,EACN,EAAE;IAC3B,MAAM,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC;IACvE,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,eAAe,CAAC,CAAC,CAAC,2BAA2B,eAAe,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACjG,MAAM,sBAAsB,GAAG,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACtE,MAAM,eAAe,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC;IAE3C,MAAM,sBAAsB,GAAG,eAAe;QAC5C,CAAC,CAAC,IAAA,kBAAM,EAAA;;;;OAIL;QACH,CAAC,CAAC,IAAA,kBAAM,EAAA;;OAEL,CAAC;IAEN,MAAM,qBAAqB,GAAG;;;;;MAK1B,mBAAmB;4BACG,YAAY;kCACN,eAAe;;;;eAIlC,oBAAoB;wBACX,6BAA6B;;;;MAI/C,sBAAsB;;;MAGtB,sBAAsB;;;;;;;;;;;;;;;;;;;IAmBxB,CAAC;IAEH,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACjH,MAAM,sBAAsB,GAAG;;;;;;;;uBAQV,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK;;;;;;;;;IAS9D,CAAC;IAEH,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAQF,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE;IACpF,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAEzC,OAAO,IAAA,kBAAM,EAAA;gBACC,OAAO;oBACH,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;MAC1C,uCAAuC,CAAC,MAAM,CAAC;KAChD,CAAC;AACN,CAAC,CAAC;AAQF,MAAM,uCAAuC,GAAG,CAAC,MAA0C,EAAE,EAAE;IAC7F,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAAC;IAC1C,OAAO,sBAAsB,IAAI,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,GAAG,CAAC;QAC7E,CAAC,CAAC,IAAA,kBAAM,EAAA,2BAA2B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,sBAAsB,CAAC,GAAG;QACnF,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC;AAKF,MAAM,YAAY,GAAG,mQAAmQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"js-resolver-function-provider.d.ts","sourceRoot":"","sources":["../../src/resolvers/js-resolver-function-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAQtF,MAAM,MAAM,0BAA0B,GAAG;IAAE,GAAG,EAAE,uBAAuB,CAAC;IAAC,GAAG,EAAE,uBAAuB,CAAA;CAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"js-resolver-function-provider.js","sourceRoot":"","sources":["../../src/resolvers/js-resolver-function-provider.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"message-history-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/message-history-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAO7E,eAAO,MAAM,0BAA0B,QAAO,0BAM7C,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.readHistoryMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const readHistoryMappingTemplate = () => {
|
7
|
+
const req = createMessageHistoryRequestFunction();
|
8
|
+
const res = createMessageHistoryResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.readHistoryMappingTemplate = readHistoryMappingTemplate;
|
12
|
+
const createMessageHistoryRequestFunction = () => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
export function request(ctx) {
|
15
|
+
const { conversationId } = ctx.args;
|
16
|
+
const { authFilter } = ctx.stash;
|
17
|
+
|
18
|
+
const limit = 100;
|
19
|
+
const query = {
|
20
|
+
expression: 'conversationId = :conversationId',
|
21
|
+
expressionValues: util.dynamodb.toMapValues({
|
22
|
+
':conversationId': ctx.args.conversationId
|
23
|
+
})
|
24
|
+
};
|
25
|
+
|
26
|
+
const filter = JSON.parse(util.transform.toDynamoDBFilterExpression(authFilter));
|
27
|
+
const index = 'gsi-ConversationMessage.conversationId.createdAt';
|
28
|
+
|
29
|
+
return {
|
30
|
+
operation: 'Query',
|
31
|
+
query,
|
32
|
+
filter,
|
33
|
+
index,
|
34
|
+
scanIndexForward: false,
|
35
|
+
}
|
36
|
+
}`;
|
37
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
38
|
+
};
|
39
|
+
const createMessageHistoryResponseFunction = () => {
|
40
|
+
const responseFunctionString = `
|
41
|
+
export function response(ctx) {
|
42
|
+
if (ctx.error) {
|
43
|
+
util.error(ctx.error.message, ctx.error.type);
|
44
|
+
}
|
45
|
+
const messagesWithAssistantResponse = ctx.result.items
|
46
|
+
.filter((message) => message.assistantContent !== undefined)
|
47
|
+
.reduce((acc, current) => {
|
48
|
+
acc.push({ role: 'user', content: current.content });
|
49
|
+
acc.push({ role: 'assistant', content: current.assistantContent });
|
50
|
+
return acc;
|
51
|
+
}, [])
|
52
|
+
|
53
|
+
const currentMessage = { role: 'user', content: ctx.prev.result.content };
|
54
|
+
const items = [...messagesWithAssistantResponse, currentMessage];
|
55
|
+
return { items };
|
56
|
+
}`;
|
57
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
58
|
+
};
|
59
|
+
//# sourceMappingURL=message-history-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"message-history-resolver.js","sourceRoot":"","sources":["../../src/resolvers/message-history-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAQ5B,MAAM,0BAA0B,GAAG,GAA+B,EAAE;IAEzE,MAAM,GAAG,GAAG,mCAAmC,EAAE,CAAC;IAClD,MAAM,GAAG,GAAG,oCAAoC,EAAE,CAAC;IAEnD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AANW,QAAA,0BAA0B,8BAMrC;AAOF,MAAM,mCAAmC,GAAG,GAA4B,EAAE;IACxE,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;QAuBxB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAOF,MAAM,oCAAoC,GAAG,GAA4B,EAAE;IACzE,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;QAgBzB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verify-session-owner-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/verify-session-owner-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAO7E,eAAO,MAAM,iCAAiC,QAAO,0BAIpD,CAAC"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.verifySessionOwnerMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const verifySessionOwnerMappingTemplate = () => {
|
7
|
+
const req = createVerifySessionOwnerRequestFunction();
|
8
|
+
const res = createVerifySessionOwnerResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.verifySessionOwnerMappingTemplate = verifySessionOwnerMappingTemplate;
|
12
|
+
const createVerifySessionOwnerRequestFunction = () => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
export function request(ctx) {
|
15
|
+
const { authFilter } = ctx.stash;
|
16
|
+
|
17
|
+
const query = {
|
18
|
+
expression: 'id = :id',
|
19
|
+
expressionValues: util.dynamodb.toMapValues({
|
20
|
+
':id': ctx.args.conversationId
|
21
|
+
})
|
22
|
+
};
|
23
|
+
|
24
|
+
const filter = JSON.parse(util.transform.toDynamoDBFilterExpression(authFilter));
|
25
|
+
|
26
|
+
return {
|
27
|
+
operation: 'Query',
|
28
|
+
query,
|
29
|
+
filter
|
30
|
+
};
|
31
|
+
}
|
32
|
+
`;
|
33
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
34
|
+
};
|
35
|
+
const createVerifySessionOwnerResponseFunction = () => {
|
36
|
+
const responseFunctionString = `
|
37
|
+
export function response(ctx) {
|
38
|
+
if (ctx.error) {
|
39
|
+
util.error(ctx.error.message, ctx.error.type);
|
40
|
+
}
|
41
|
+
|
42
|
+
if (ctx.result.items.length !== 0) {
|
43
|
+
return ctx.result.items[0];
|
44
|
+
}
|
45
|
+
|
46
|
+
util.error('Conversation not found', 'ResourceNotFound');
|
47
|
+
}`;
|
48
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
49
|
+
};
|
50
|
+
//# sourceMappingURL=verify-session-owner-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verify-session-owner-resolver.js","sourceRoot":"","sources":["../../src/resolvers/verify-session-owner-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAQ5B,MAAM,iCAAiC,GAAG,GAA+B,EAAE;IAChF,MAAM,GAAG,GAAG,uCAAuC,EAAE,CAAC;IACtD,MAAM,GAAG,GAAG,wCAAwC,EAAE,CAAC;IACvD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAJW,QAAA,iCAAiC,qCAI5C;AAOF,MAAM,uCAAuC,GAAG,GAA4B,EAAE;IAC5E,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;OAmBzB,CAAC;IAEN,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAOF,MAAM,wCAAwC,GAAG,GAA4B,EAAE;IAC7E,MAAM,sBAAsB,GAAG;;;;;;;;;;;QAWzB,CAAC;IAEP,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"write-message-to-table-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/write-message-to-table-resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAQ7E,eAAO,MAAM,kCAAkC,cAAe,MAAM,KAAG,0BAItE,CAAC"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.writeMessageToTableMappingTemplate = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const ts_dedent_1 = require("ts-dedent");
|
6
|
+
const writeMessageToTableMappingTemplate = (fieldName) => {
|
7
|
+
const req = createWriteMessageToTableRequestFunction(fieldName);
|
8
|
+
const res = createWriteMessageToTableResponseFunction();
|
9
|
+
return { req, res };
|
10
|
+
};
|
11
|
+
exports.writeMessageToTableMappingTemplate = writeMessageToTableMappingTemplate;
|
12
|
+
const createWriteMessageToTableRequestFunction = (fieldName) => {
|
13
|
+
const requestFunctionString = `
|
14
|
+
import { util } from '@aws-appsync/utils'
|
15
|
+
import * as ddb from '@aws-appsync/utils/dynamodb'
|
16
|
+
|
17
|
+
export function request(ctx) {
|
18
|
+
const args = ctx.stash.transformedArgs ?? ctx.args;
|
19
|
+
const defaultValues = ctx.stash.defaultValues ?? {};
|
20
|
+
const message = {
|
21
|
+
__typename: 'ConversationMessage${fieldName}',
|
22
|
+
role: 'user',
|
23
|
+
...args,
|
24
|
+
...defaultValues,
|
25
|
+
};
|
26
|
+
const id = ctx.stash.defaultValues.id;
|
27
|
+
|
28
|
+
return ddb.put({ key: { id }, item: message });
|
29
|
+
}
|
30
|
+
`;
|
31
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
|
32
|
+
};
|
33
|
+
const createWriteMessageToTableResponseFunction = () => {
|
34
|
+
const responseFunctionString = `
|
35
|
+
export function response(ctx) {
|
36
|
+
if (ctx.error) {
|
37
|
+
util.error(ctx.error.message, ctx.error.type);
|
38
|
+
} else {
|
39
|
+
return ctx.result;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
`;
|
43
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
|
44
|
+
};
|
45
|
+
//# sourceMappingURL=write-message-to-table-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"write-message-to-table-resolver.js","sourceRoot":"","sources":["../../src/resolvers/write-message-to-table-resolver.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAS5B,MAAM,kCAAkC,GAAG,CAAC,SAAiB,EAA8B,EAAE;IAClG,MAAM,GAAG,GAAG,wCAAwC,CAAC,SAAS,CAAC,CAAC;IAChE,MAAM,GAAG,GAAG,yCAAyC,EAAE,CAAC;IACxD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AAJW,QAAA,kCAAkC,sCAI7C;AAQF,MAAM,wCAAwC,GAAG,CAAC,SAAiB,EAA2B,EAAE;IAC9F,MAAM,qBAAqB,GAAG;;;;;;;;4CAQY,SAAS;;;;;;;;;KAShD,CAAC;IAEJ,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAOF,MAAM,yCAAyC,GAAG,GAA4B,EAAE;IAC9E,MAAM,sBAAsB,GAAG;;;;;;;;KAQ5B,CAAC;IAEJ,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TransformerSchemaVisitStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
3
|
+
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
4
|
+
export declare class ConversationFieldHandler {
|
5
|
+
getDirectiveConfig(parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definition: FieldDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider): ConversationDirectiveConfiguration;
|
6
|
+
private getConversationConfig;
|
7
|
+
private createModels;
|
8
|
+
private validate;
|
9
|
+
private validateReturnType;
|
10
|
+
private validateInferenceConfig;
|
11
|
+
}
|
12
|
+
//# sourceMappingURL=conversation-field-handler.d.ts.map
|
@@ -0,0 +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,EAAE,aAAa,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEpH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AASzF,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;IAwBrC,OAAO,CAAC,qBAAqB;IA6B7B,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,uBAAuB;CAoBhC"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ConversationFieldHandler = void 0;
|
4
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
5
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
6
|
+
const session_model_1 = require("../graphql-types/session-model");
|
7
|
+
const message_model_1 = require("../graphql-types/message-model");
|
8
|
+
class ConversationFieldHandler {
|
9
|
+
getDirectiveConfig(parent, definition, directive, context) {
|
10
|
+
if (parent.name.value !== 'Mutation') {
|
11
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError('@conversation directive must be used on Mutation field.');
|
12
|
+
}
|
13
|
+
const config = this.getConversationConfig(directive, parent, definition, context);
|
14
|
+
const { messageModel, conversationModel } = this.createModels(config, definition);
|
15
|
+
config.messageModel = messageModel;
|
16
|
+
config.conversationModel = conversationModel;
|
17
|
+
config.responseMutationInputTypeName = messageModel.assistantMutationInput.name.value;
|
18
|
+
config.responseMutationName = messageModel.assistantMutationField.name.value;
|
19
|
+
this.validate(config);
|
20
|
+
return config;
|
21
|
+
}
|
22
|
+
getConversationConfig(directive, parent, definition, context) {
|
23
|
+
const directiveWrapped = new graphql_transformer_core_1.DirectiveWrapper(directive);
|
24
|
+
const config = directiveWrapped.getArguments({
|
25
|
+
parent,
|
26
|
+
directive,
|
27
|
+
field: definition,
|
28
|
+
inferenceConfiguration: {},
|
29
|
+
}, (0, graphql_transformer_core_1.generateGetArgumentsInput)(context.transformParameters));
|
30
|
+
return config;
|
31
|
+
}
|
32
|
+
createModels(config, definition) {
|
33
|
+
if (definition.type.kind !== 'NamedType' || definition.type.name.value !== 'ConversationMessage') {
|
34
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError('@conversation return type must be ConversationMessage');
|
35
|
+
}
|
36
|
+
const capitalizedFieldName = (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
37
|
+
const messageModelName = `ConversationMessage${capitalizedFieldName}`;
|
38
|
+
const conversationModelName = `Conversation${capitalizedFieldName}`;
|
39
|
+
const referenceFieldName = 'conversationId';
|
40
|
+
const messageModel = (0, message_model_1.createMessageModel)(conversationModelName, messageModelName, referenceFieldName, capitalizedFieldName, definition.type);
|
41
|
+
const conversationModel = (0, session_model_1.createConversationModel)(conversationModelName, messageModelName, referenceFieldName);
|
42
|
+
return { messageModel, conversationModel };
|
43
|
+
}
|
44
|
+
validate(config) {
|
45
|
+
this.validateReturnType(config);
|
46
|
+
this.validateInferenceConfig(config);
|
47
|
+
}
|
48
|
+
validateReturnType(config) {
|
49
|
+
const { field } = config;
|
50
|
+
if (field.type.kind !== 'NamedType' || field.type.name.value !== 'ConversationMessage') {
|
51
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError('@conversation return type must be ConversationMessage');
|
52
|
+
}
|
53
|
+
}
|
54
|
+
validateInferenceConfig(config) {
|
55
|
+
const { maxTokens, temperature, topP } = config.inferenceConfiguration;
|
56
|
+
if (maxTokens !== undefined && maxTokens < 1) {
|
57
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@conversation directive maxTokens valid range: Minimum value of 1. Provided: ${maxTokens}`);
|
58
|
+
}
|
59
|
+
if (temperature !== undefined && (temperature < 0 || temperature > 1)) {
|
60
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@conversation directive temperature valid range: Minimum value of 0. Maximum value of 1. Provided: ${temperature}`);
|
61
|
+
}
|
62
|
+
if (topP !== undefined && (topP < 0 || topP > 1)) {
|
63
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@conversation directive topP valid range: Minimum value of 0. Maximum value of 1. Provided: ${topP}`);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
exports.ConversationFieldHandler = ConversationFieldHandler;
|
68
|
+
//# sourceMappingURL=conversation-field-handler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-field-handler.js","sourceRoot":"","sources":["../../src/transformer-steps/conversation-field-handler.ts"],"names":[],"mappings":";;;AAAA,oFAA2H;AAG3H,2EAAqD;AAErD,kEAAyE;AACzE,kEAAoE;AAOpE,MAAa,wBAAwB;IAWnC,kBAAkB,CAChB,MAA8D,EAC9D,UAA+B,EAC/B,SAAwB,EACxB,OAAkD;QAElD,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;YACpC,MAAM,IAAI,gDAAqB,CAAC,yDAAyD,CAAC,CAAC;SAC5F;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAClF,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClF,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC7C,MAAM,CAAC,6BAA6B,GAAG,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;QACtF,MAAM,CAAC,oBAAoB,GAAG,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7E,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAYO,qBAAqB,CAC3B,SAAwB,EACxB,MAA8D,EAC9D,UAA+B,EAC/B,OAAkD;QAElD,MAAM,gBAAgB,GAAG,IAAI,2CAAgB,CAAC,SAAS,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,gBAAgB,CAAC,YAAY,CAC1C;YACE,MAAM;YACN,SAAS;YACT,KAAK,EAAE,UAAU;YACjB,sBAAsB,EAAE,EAAE;SACW,EACvC,IAAA,oDAAyB,EAAC,OAAO,CAAC,mBAAmB,CAAC,CACvD,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;IAWO,YAAY,CAClB,MAA0C,EAC1C,UAA+B;QAE/B,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,qBAAqB,EAAE;YAChG,MAAM,IAAI,gDAAqB,CAAC,uDAAuD,CAAC,CAAC;SAC1F;QAED,MAAM,oBAAoB,GAAG,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,gBAAgB,GAAG,sBAAsB,oBAAoB,EAAE,CAAC;QACtE,MAAM,qBAAqB,GAAG,eAAe,oBAAoB,EAAE,CAAC;QACpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;QAE5C,MAAM,YAAY,GAAG,IAAA,kCAAkB,EACrC,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,CAAC,IAAI,CAChB,CAAC;QACF,MAAM,iBAAiB,GAAG,IAAA,uCAAuB,EAAC,qBAAqB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;QAC/G,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAC7C,CAAC;IAOO,QAAQ,CAAC,MAA0C;QACzD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAOO,kBAAkB,CAAC,MAA0C;QAEnE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACzB,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,qBAAqB,EAAE;YACtF,MAAM,IAAI,gDAAqB,CAAC,uDAAuD,CAAC,CAAC;SAC1F;IACH,CAAC;IAOO,uBAAuB,CAAC,MAA0C;QACxE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAGvE,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,GAAG,CAAC,EAAE;YAC5C,MAAM,IAAI,gDAAqB,CAAC,gFAAgF,SAAS,EAAE,CAAC,CAAC;SAC9H;QAED,IAAI,WAAW,KAAK,SAAS,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,EAAE;YACrE,MAAM,IAAI,gDAAqB,CAC7B,sGAAsG,WAAW,EAAE,CACpH,CAAC;SACH;QAED,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,EAAE;YAChD,MAAM,IAAI,gDAAqB,CAC7B,+FAA+F,IAAI,EAAE,CACtG,CAAC;SACH;IACH,CAAC;CACF;AA7ID,4DA6IC"}
|