@aws-amplify/graphql-api-construct 1.14.0 → 1.15.1-ai-streaming.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +91 -34
- package/CHANGELOG.md +15 -0
- 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/internal/authorization-modes.js +3 -3
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +12 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +19 -2
- 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 +13 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +182 -45
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_message_history_retriever.d.ts +44 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_message_history_retriever.js +173 -0
- 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 +10 -7
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +11 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +9 -23
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.d.ts +33 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.js +38 -0
- 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 +11 -11
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +10 -24
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.d.ts +7 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.js +16 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.js +47 -0
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +3 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +4 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +22 -11
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/README.md +4 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.d.ts +23 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.js +11 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.d.ts +113 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.d.ts +112 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.js +30 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.d.ts +23 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.js +11 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.d.ts +23 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.d.ts +22 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.js +11 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.d.ts +59 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.js +12 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.d.ts +59 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.js +25 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.d.ts +508 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.js +112 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.d.ts +2 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.js +18 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.d.ts +42 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.js +22 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.d.ts +28 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.d.ts +27 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.js +12 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.d.ts +33 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.js +10 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.d.ts +32 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.js +33 -0
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/package.json +27 -0
- package/node_modules/@aws-amplify/ai-constructs/package.json +9 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +2 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts +1 -0
- 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 +18 -0
- 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 +13 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/API.md +2 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +15 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +2 -0
- 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 +36 -5
- 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/grapqhl-conversation-transformer.d.ts +2 -1
- 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 +2 -2
- 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-mutation-resolver-fn.template.js +16 -33
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +10 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver-fn.template.js +101 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js +25 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver-fn.template.js +121 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js +25 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver-fn.template.js +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +10 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver-fn.template.js +28 -5
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +2 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +21 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver-fn.template.js +8 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts +4 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{message-history-resolver.js → list-messages-init-resolver.js} +6 -6
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver-fn.template.js +2 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +23 -5
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +4 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +1 -1
- 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 +3 -2
- 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 +5 -1
- 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 +66 -30
- 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 +12 -11
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js +19 -7
- package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +1 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -8
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +7 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock-resolver-fn.template.js +24 -9
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js +11 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js +2 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +7 -8
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +8 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -0
- 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 +11 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -0
- 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/dynamodb/query.js +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/dynamodb/query.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +7 -8
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +7 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +9 -10
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +8 -9
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +8 -9
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +19 -19
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +13 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +10 -0
- 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 +4 -2
- 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 +9 -9
- 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.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +2 -0
- 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 +13 -1
- 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 +5 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +3 -4
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -23
- package/src/internal/authorization-modes.ts +2 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver-fn.template.js +0 -40
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +0 -201
@@ -1,4 +1,5 @@
|
|
1
1
|
import { util } from '@aws-appsync/utils';
|
2
|
+
import * as ddb from '@aws-appsync/utils/dynamodb';
|
2
3
|
|
3
4
|
/**
|
4
5
|
* Sends a request to the attached data source
|
@@ -6,30 +7,23 @@ import { util } from '@aws-appsync/utils';
|
|
6
7
|
* @returns {*} the request
|
7
8
|
*/
|
8
9
|
export function request(ctx) {
|
9
|
-
const owner = ctx.identity['claims']['sub'];
|
10
|
-
ctx.stash.owner = owner;
|
11
10
|
const { conversationId, content, associatedUserMessageId } = ctx.args.input;
|
12
|
-
const
|
11
|
+
const { owner } = ctx.args;
|
12
|
+
const defaultValues = ctx.stash.defaultValues ?? {};
|
13
|
+
const id = defaultValues.id;
|
13
14
|
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
return {
|
24
|
-
operation: 'UpdateItem',
|
25
|
-
key: util.dynamodb.toMapValues({ id: associatedUserMessageId }),
|
26
|
-
condition,
|
27
|
-
update: {
|
28
|
-
expression,
|
29
|
-
expressionNames,
|
30
|
-
expressionValues: util.dynamodb.toMapValues(expressionValues),
|
31
|
-
},
|
15
|
+
const message = {
|
16
|
+
__typename: '[[CONVERSATION_MESSAGE_TYPE_NAME]]',
|
17
|
+
id,
|
18
|
+
role: 'assistant',
|
19
|
+
content,
|
20
|
+
conversationId,
|
21
|
+
associatedUserMessageId,
|
22
|
+
owner,
|
23
|
+
...defaultValues,
|
32
24
|
};
|
25
|
+
|
26
|
+
return ddb.put({ key: { id }, item: message });
|
33
27
|
}
|
34
28
|
|
35
29
|
/**
|
@@ -43,16 +37,5 @@ export function response(ctx) {
|
|
43
37
|
util.error(ctx.error.message, ctx.error.type);
|
44
38
|
}
|
45
39
|
|
46
|
-
|
47
|
-
const { createdAt, updatedAt } = ctx.result;
|
48
|
-
|
49
|
-
return {
|
50
|
-
id: associatedUserMessageId,
|
51
|
-
content,
|
52
|
-
conversationId,
|
53
|
-
role: 'assistant',
|
54
|
-
owner: ctx.stash.owner,
|
55
|
-
createdAt,
|
56
|
-
updatedAt,
|
57
|
-
};
|
40
|
+
return ctx.result;
|
58
41
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"assistant-mutation-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;
|
1
|
+
{"version":3,"file":"assistant-mutation-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AASzF,eAAO,MAAM,yBAAyB,WAAY,kCAAkC,KAAG,uBAYtF,CAAC"}
|
@@ -7,8 +7,17 @@ exports.assistantMutationResolver = void 0;
|
|
7
7
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
9
9
|
const path_1 = __importDefault(require("path"));
|
10
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
10
11
|
const assistantMutationResolver = (config) => {
|
11
|
-
|
12
|
+
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'assistant-mutation-resolver-fn.template.js'), 'utf8');
|
13
|
+
const fieldName = (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
14
|
+
const substitutions = {
|
15
|
+
CONVERSATION_MESSAGE_TYPE_NAME: `ConversationMessage${fieldName}`,
|
16
|
+
};
|
17
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
18
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
19
|
+
resolver = replaced;
|
20
|
+
});
|
12
21
|
const templateName = `Mutation.${config.field.name.value}.assistant-response.js`;
|
13
22
|
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
14
23
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"assistant-mutation-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;
|
1
|
+
{"version":3,"file":"assistant-mutation-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-mutation-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAExB,2EAAqD;AAQ9C,MAAM,yBAAyB,GAAG,CAAC,MAA0C,EAA2B,EAAE;IAC/G,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,4CAA4C,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3G,MAAM,SAAS,GAAG,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG;QACpB,8BAA8B,EAAE,sBAAsB,SAAS,EAAE;KAClE,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,wBAAwB,CAAC;IACjF,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC"}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { util } from '@aws-appsync/utils';
|
2
|
+
import * as ddb from '@aws-appsync/utils/dynamodb';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Sends a request to the attached data source
|
6
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
7
|
+
* @returns {*} the request
|
8
|
+
*/
|
9
|
+
export function request(ctx) {
|
10
|
+
if (!ctx.args.input.stopReason) {
|
11
|
+
runtime.earlyReturn(ctx.prev.result);
|
12
|
+
}
|
13
|
+
const { id, createdAt, updatedAt } = ctx.stash.defaultValues;
|
14
|
+
const { events } = ctx.prev.result;
|
15
|
+
|
16
|
+
const content = reduceChunks(events);
|
17
|
+
const assistantMessage = {
|
18
|
+
__typename: 'ConversationMessageCustomChat',
|
19
|
+
role: 'assistant',
|
20
|
+
createdAt,
|
21
|
+
updatedAt,
|
22
|
+
conversationId: ctx.args.input.conversationId,
|
23
|
+
associatedUserMessageId: ctx.args.input.associatedUserMessageId,
|
24
|
+
owner: ctx.args.owner,
|
25
|
+
content
|
26
|
+
}
|
27
|
+
// TODO: check if `stopReason` really means end of turn.
|
28
|
+
// `put` if it does
|
29
|
+
// `update` if it doesn't
|
30
|
+
return ddb.put({ key: { id }, item: assistantMessage })
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Returns the resolver result
|
36
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
37
|
+
* @returns {*} the result
|
38
|
+
*/
|
39
|
+
export function response(ctx) {
|
40
|
+
// this makes us return a message to the client. Maybe that's ok if / when we're streaming the text back as true
|
41
|
+
// chunk representations (with index, etc).
|
42
|
+
if (ctx.args.input.stopReason) {
|
43
|
+
return {
|
44
|
+
// differentiating with `<id>#response` for now. But this is no bueno.
|
45
|
+
// either the sentinel value needs to be included in the last chunk with content
|
46
|
+
// --- or ---
|
47
|
+
// we need to represent it in the client message type
|
48
|
+
// --- or ---
|
49
|
+
// we could potentially just throw an error here, but that's bad.
|
50
|
+
id: `${ctx.args.input.associatedUserMessageId}#response`,
|
51
|
+
createdAt: ctx.stash.defaultValues.createdAt,
|
52
|
+
updatedAt: ctx.stash.defaultValues.updatedAt,
|
53
|
+
conversationId: ctx.args.input.conversationId
|
54
|
+
};
|
55
|
+
}
|
56
|
+
return ctx.prev.result;
|
57
|
+
}
|
58
|
+
|
59
|
+
// TODO: handle toolUse blocks
|
60
|
+
function reduceChunks(events) {
|
61
|
+
// we're limited by the AppSync JS runtime as to what we can do here.
|
62
|
+
// so the code is uhh... a little creative.
|
63
|
+
function sortEvents(a, b) {
|
64
|
+
if (a.contentBlockIndex !== b.contentBlockIndex) {
|
65
|
+
return a.contentBlockIndex - b.contentBlockIndex;
|
66
|
+
}
|
67
|
+
return a.contentBlockDeltaIndex - b.contentBlockDeltaIndex;
|
68
|
+
}
|
69
|
+
|
70
|
+
// arrow functions and inline `function` declarations are not supported for sort.
|
71
|
+
events.sort(sortEvents);
|
72
|
+
|
73
|
+
// Group events by contentBlockIndex
|
74
|
+
const groupedEvents = events.reduce(function(acc, event) {
|
75
|
+
if (!acc[event.contentBlockIndex]) {
|
76
|
+
acc[event.contentBlockIndex] = [];
|
77
|
+
}
|
78
|
+
|
79
|
+
if (event.contentBlockText) {
|
80
|
+
acc[event.contentBlockIndex].push(event.contentBlockText);
|
81
|
+
}
|
82
|
+
|
83
|
+
if (event.contentBlockToolUse) {
|
84
|
+
acc[event.contentBlockIndex].push(event.contentBlockToolUse);
|
85
|
+
}
|
86
|
+
return acc;
|
87
|
+
}, {});
|
88
|
+
|
89
|
+
// Concatenate text for each content block
|
90
|
+
const content = Object.keys(groupedEvents).map((index) => {
|
91
|
+
const contentBlock = groupedEvents[index];
|
92
|
+
// toolUse blocks are sent as a single event.
|
93
|
+
if (contentBlock.length === 1 && contentBlock[0].toolUseId) {
|
94
|
+
return { toolUse: contentBlock[0] };
|
95
|
+
}
|
96
|
+
// text blocks are chunked so we join them.
|
97
|
+
return { text: contentBlock.join('') };
|
98
|
+
});
|
99
|
+
|
100
|
+
return content;
|
101
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
+
export declare const assistantStreamingMutationReduceChunksResolver: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
+
//# sourceMappingURL=assistant-streaming-mutation-reduce-chunks-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-streaming-mutation-reduce-chunks-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AASzF,eAAO,MAAM,8CAA8C,WAAY,kCAAkC,KAAG,uBAY3G,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
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.assistantStreamingMutationReduceChunksResolver = void 0;
|
7
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
9
|
+
const path_1 = __importDefault(require("path"));
|
10
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
11
|
+
const assistantStreamingMutationReduceChunksResolver = (config) => {
|
12
|
+
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'assistant-streaming-mutation-reduce-chunks-resolver-fn.template.js'), 'utf8');
|
13
|
+
const fieldName = (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
14
|
+
const substitutions = {
|
15
|
+
CONVERSATION_MESSAGE_TYPE_NAME: `ConversationMessage${fieldName}`,
|
16
|
+
};
|
17
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
18
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
19
|
+
resolver = replaced;
|
20
|
+
});
|
21
|
+
const templateName = `Mutation.${config.field.name.value}.assistant-response-stream.js`;
|
22
|
+
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
23
|
+
};
|
24
|
+
exports.assistantStreamingMutationReduceChunksResolver = assistantStreamingMutationReduceChunksResolver;
|
25
|
+
//# sourceMappingURL=assistant-streaming-mutation-reduce-chunks-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-streaming-mutation-reduce-chunks-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAExB,2EAAqD;AAQ9C,MAAM,8CAA8C,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACpI,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oEAAoE,CAAC,EAAE,MAAM,CAAC,CAAC;IACnI,MAAM,SAAS,GAAG,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG;QACpB,8BAA8B,EAAE,sBAAsB,SAAS,EAAE;KAClE,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,+BAA+B,CAAC;IACxF,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAZW,QAAA,8CAA8C,kDAYzD"}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import { util } from '@aws-appsync/utils';
|
2
|
+
import * as ddb from '@aws-appsync/utils/dynamodb';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Sends a request to the attached data source
|
6
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
7
|
+
* @returns {*} the request
|
8
|
+
*/
|
9
|
+
export function request(ctx) {
|
10
|
+
const {
|
11
|
+
// required
|
12
|
+
conversationId,
|
13
|
+
associatedUserMessageId,
|
14
|
+
contentBlockIndex,
|
15
|
+
// text chunk
|
16
|
+
contentBlockText,
|
17
|
+
contentBlockDeltaIndex,
|
18
|
+
// tool use
|
19
|
+
contentBlockToolUse,
|
20
|
+
// block complete
|
21
|
+
contentBlockDoneAtIndex,
|
22
|
+
// turn complete
|
23
|
+
stopReason,
|
24
|
+
} = ctx.args.input;
|
25
|
+
|
26
|
+
const { owner } = ctx.args;
|
27
|
+
const streamId = `${associatedUserMessageId}#stream`;
|
28
|
+
|
29
|
+
if (stopReason) {
|
30
|
+
// should we be writing the turn complete chunk here?
|
31
|
+
// probably not. It's just the marker for us to reconcile the chunks.
|
32
|
+
return ddb.get({ key: { id: streamId } });
|
33
|
+
}
|
34
|
+
|
35
|
+
// not using this yet. we'll need to enable ttl on the table first.
|
36
|
+
const now = util.time.nowEpochSeconds()
|
37
|
+
const ttl = now + 60 * 60 * 24; // 1 day
|
38
|
+
|
39
|
+
const event = {
|
40
|
+
contentBlockIndex,
|
41
|
+
contentBlockDeltaIndex,
|
42
|
+
contentBlockText,
|
43
|
+
contentBlockToolUse,
|
44
|
+
contentBlockDoneAtIndex,
|
45
|
+
};
|
46
|
+
|
47
|
+
// AppSync JS runtime doesn't support Object.fromEntries
|
48
|
+
const chunk = Object.keys(event)
|
49
|
+
.filter((k) => event[k] != null)
|
50
|
+
.reduce((a, k) => ({ ...a, [k]: event[k] }), {});
|
51
|
+
|
52
|
+
// TODO: Use expression names for all attributes.
|
53
|
+
// reference: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html
|
54
|
+
const setExpression = 'SET events = list_append(if_not_exists(events, :empty_list), :events), conversationId = :conversationId, #owner = :owner'
|
55
|
+
const id = streamId
|
56
|
+
return {
|
57
|
+
operation: 'UpdateItem',
|
58
|
+
key: util.dynamodb.toMapValues({ id }),
|
59
|
+
update: {
|
60
|
+
expression: setExpression,
|
61
|
+
expressionValues: util.dynamodb.toMapValues({
|
62
|
+
':events': [chunk],
|
63
|
+
':empty_list': [],
|
64
|
+
':conversationId': conversationId,
|
65
|
+
':owner': owner,
|
66
|
+
}),
|
67
|
+
expressionNames: {
|
68
|
+
'#owner': 'owner',
|
69
|
+
},
|
70
|
+
},
|
71
|
+
};
|
72
|
+
}
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Returns the resolver result
|
76
|
+
* @param {import('@aws-appsync/utils').Context} ctx the context
|
77
|
+
* @returns {*} the result
|
78
|
+
*/
|
79
|
+
export function response(ctx) {
|
80
|
+
console.log('>>> response function ctx <<<', ctx);
|
81
|
+
if (ctx.error) {
|
82
|
+
util.error(ctx.error.message, ctx.error.type);
|
83
|
+
}
|
84
|
+
|
85
|
+
if (ctx.args.input.contentBlockToolUse || ctx.args.input.contentBlockText) {
|
86
|
+
console.log('>>> contentBlockToolUse <<<', ctx.args.input.contentBlockToolUse);
|
87
|
+
console.log('>>> contentBlockText <<<', ctx.args.input.contentBlockText);
|
88
|
+
|
89
|
+
const { conversationId } = ctx.result;
|
90
|
+
const { owner } = ctx.args;
|
91
|
+
const { contentBlockToolUse: toolUse, contentBlockText: text } = ctx.args.input;
|
92
|
+
const { createdAt, updatedAt } = ctx.stash.defaultValues;
|
93
|
+
|
94
|
+
const content = ctx.args.input.contentBlockToolUse ? [{ toolUse }] : [{ text }];
|
95
|
+
|
96
|
+
return {
|
97
|
+
__typename: 'ConversationMessageCustomChat',
|
98
|
+
id: `${ctx.args.input.associatedUserMessageId}#response`,
|
99
|
+
conversationId: conversationId,
|
100
|
+
owner: owner,
|
101
|
+
role: 'assistant',
|
102
|
+
createdAt,
|
103
|
+
updatedAt,
|
104
|
+
content,
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
if (ctx.args.input.contentBlockDoneAtIndex) {
|
109
|
+
console.log('>>> contentBlockDoneAtIndex <<<', ctx.args.input.contentBlockDoneAtIndex);
|
110
|
+
// Do we actually need this event? It's forcing us to return a value to the client here, which is awkward... maybe.
|
111
|
+
return {
|
112
|
+
id: `${ctx.args.input.associatedUserMessageId}#response`,
|
113
|
+
createdAt: ctx.stash.defaultValues.createdAt,
|
114
|
+
updatedAt: ctx.stash.defaultValues.updatedAt,
|
115
|
+
conversationId: ctx.args.input.conversationId,
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
console.log('>>> stopReason <<<', ctx.args.input.stopReason);
|
120
|
+
return ctx.result;
|
121
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
+
export declare const assistantStreamingMutationResolver: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
+
//# sourceMappingURL=assistant-streaming-mutation-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-streaming-mutation-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-streaming-mutation-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AASzF,eAAO,MAAM,kCAAkC,WAAY,kCAAkC,KAAG,uBAY/F,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
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.assistantStreamingMutationResolver = void 0;
|
7
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
9
|
+
const path_1 = __importDefault(require("path"));
|
10
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
11
|
+
const assistantStreamingMutationResolver = (config) => {
|
12
|
+
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'assistant-streaming-mutation-resolver-fn.template.js'), 'utf8');
|
13
|
+
const fieldName = (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
14
|
+
const substitutions = {
|
15
|
+
CONVERSATION_MESSAGE_TYPE_NAME: `ConversationMessage${fieldName}`,
|
16
|
+
};
|
17
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
18
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
19
|
+
resolver = replaced;
|
20
|
+
});
|
21
|
+
const templateName = `Mutation.${config.field.name.value}.assistant-response-stream.js`;
|
22
|
+
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
23
|
+
};
|
24
|
+
exports.assistantStreamingMutationResolver = assistantStreamingMutationResolver;
|
25
|
+
//# sourceMappingURL=assistant-streaming-mutation-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-streaming-mutation-resolver.js","sourceRoot":"","sources":["../../src/resolvers/assistant-streaming-mutation-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAExB,2EAAqD;AAQ9C,MAAM,kCAAkC,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACxH,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sDAAsD,CAAC,EAAE,MAAM,CAAC,CAAC;IACrH,MAAM,SAAS,GAAG,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG;QACpB,8BAA8B,EAAE,sBAAsB,SAAS,EAAE;KAClE,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,+BAA+B,CAAC;IACxF,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AAZW,QAAA,kCAAkC,sCAY7C"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
|
3
|
-
export declare const initMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
1
|
+
import { MappingTemplateProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
export declare const initMappingTemplate: (ctx: TransformerContextProvider) => MappingTemplateProvider;
|
4
3
|
//# sourceMappingURL=init-resolver.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,
|
1
|
+
{"version":3,"file":"init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAUlH,eAAO,MAAM,mBAAmB,QAAS,0BAA0B,KAAG,uBAYrE,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js
CHANGED
@@ -7,10 +7,16 @@ exports.initMappingTemplate = void 0;
|
|
7
7
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
9
9
|
const path_1 = __importDefault(require("path"));
|
10
|
-
const initMappingTemplate = (
|
11
|
-
const
|
12
|
-
|
13
|
-
|
10
|
+
const initMappingTemplate = (ctx) => {
|
11
|
+
const substitutions = {
|
12
|
+
GRAPHQL_API_ENDPOINT: ctx.api.graphqlUrl,
|
13
|
+
};
|
14
|
+
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'init-resolver-fn.template.js'), 'utf8');
|
15
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
16
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
17
|
+
resolver = replaced;
|
18
|
+
});
|
19
|
+
return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString(resolver);
|
14
20
|
};
|
15
21
|
exports.initMappingTemplate = initMappingTemplate;
|
16
22
|
//# sourceMappingURL=init-resolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;
|
1
|
+
{"version":3,"file":"init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/init-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AAQjB,MAAM,mBAAmB,GAAG,CAAC,GAA+B,EAA2B,EAAE;IAC9F,MAAM,aAAa,GAAG;QACpB,oBAAoB,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU;KACzC,CAAC;IAEF,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC,CAAC;IAC7F,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,0CAAe,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAC5D,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B"}
|
@@ -1,17 +1,24 @@
|
|
1
1
|
import { util } from '@aws-appsync/utils';
|
2
2
|
|
3
3
|
export function request(ctx) {
|
4
|
-
const { args, request
|
4
|
+
const { args, request } = ctx;
|
5
|
+
const { graphqlApiEndpoint } = ctx.stash;
|
6
|
+
|
5
7
|
[[TOOL_DEFINITIONS_LINE]]
|
6
8
|
const selectionSet = '[[SELECTION_SET]]';
|
7
|
-
const graphqlApiEndpoint = '[[GRAPHQL_API_ENDPOINT]]';
|
8
9
|
|
9
|
-
const
|
10
|
-
const responseMutation = {
|
10
|
+
const singleShotResponseMutation = {
|
11
11
|
name: '[[RESPONSE_MUTATION_NAME]]',
|
12
12
|
inputTypeName: '[[RESPONSE_MUTATION_INPUT_TYPE_NAME]]',
|
13
13
|
selectionSet,
|
14
14
|
};
|
15
|
+
|
16
|
+
const streamingResponseMutation = {
|
17
|
+
name: '[[STREAMING_RESPONSE_MUTATION_NAME]]',
|
18
|
+
inputTypeName: '[[STREAMING_RESPONSE_MUTATION_INPUT_TYPE_NAME]]',
|
19
|
+
selectionSet,
|
20
|
+
};
|
21
|
+
|
15
22
|
const currentMessageId = ctx.stash.defaultValues.id;
|
16
23
|
[[MODEL_CONFIGURATION_LINE]]
|
17
24
|
|
@@ -20,6 +27,19 @@ export function request(ctx) {
|
|
20
27
|
});
|
21
28
|
[[TOOLS_CONFIGURATION_LINE]]
|
22
29
|
|
30
|
+
const messageHistoryQuery = {
|
31
|
+
getQueryName: '[[GET_QUERY_NAME]]',
|
32
|
+
getQueryInputTypeName: '[[GET_QUERY_INPUT_TYPE_NAME]]',
|
33
|
+
listQueryName: '[[LIST_QUERY_NAME]]',
|
34
|
+
listQueryInputTypeName: '[[LIST_QUERY_INPUT_TYPE_NAME]]',
|
35
|
+
listQueryLimit: [[LIST_QUERY_LIMIT]],
|
36
|
+
};
|
37
|
+
|
38
|
+
const disableStreaming = ctx.env['[[DISABLE_STREAMING_ENV_VAR]]'];
|
39
|
+
const responseMutation = disableStreaming === false
|
40
|
+
? singleShotResponseMutation
|
41
|
+
: streamingResponseMutation;
|
42
|
+
|
23
43
|
const authHeader = request.headers['authorization'];
|
24
44
|
const payload = {
|
25
45
|
conversationId: args.conversationId,
|
@@ -28,8 +48,9 @@ export function request(ctx) {
|
|
28
48
|
graphqlApiEndpoint,
|
29
49
|
modelConfiguration,
|
30
50
|
request: { headers: { authorization: authHeader } },
|
31
|
-
|
51
|
+
messageHistoryQuery,
|
32
52
|
toolsConfiguration,
|
53
|
+
streamResponse: !disableStreaming,
|
33
54
|
};
|
34
55
|
|
35
56
|
return {
|
@@ -49,6 +70,8 @@ export function response(ctx) {
|
|
49
70
|
conversationId: ctx.args.conversationId,
|
50
71
|
role: 'user',
|
51
72
|
content: ctx.args.content,
|
73
|
+
aiContext: ctx.args.aiContext,
|
74
|
+
toolConfiguration: ctx.args.toolConfiguration,
|
52
75
|
createdAt: ctx.stash.defaultValues.createdAt,
|
53
76
|
updatedAt: ctx.stash.defaultValues.updatedAt,
|
54
77
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
2
|
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
-
export declare const invokeLambdaMappingTemplate: (config: ConversationDirectiveConfiguration
|
3
|
+
export declare const invokeLambdaMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
4
|
//# sourceMappingURL=invoke-lambda-resolver.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"invoke-lambda-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"invoke-lambda-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAElH,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAczF,eAAO,MAAM,2BAA2B,WAAY,kCAAkC,KAAG,uBA8CxF,CAAC"}
|
@@ -8,30 +8,47 @@ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-cor
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
9
9
|
const path_1 = __importDefault(require("path"));
|
10
10
|
const ts_dedent_1 = __importDefault(require("ts-dedent"));
|
11
|
-
const
|
11
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
12
|
+
const pluralize_1 = __importDefault(require("pluralize"));
|
13
|
+
const invokeLambdaMappingTemplate = (config) => {
|
12
14
|
const { TOOL_DEFINITIONS_LINE, TOOLS_CONFIGURATION_LINE } = generateToolLines(config);
|
13
15
|
const SELECTION_SET = selectionSet;
|
14
|
-
const GRAPHQL_API_ENDPOINT = ctx.api.graphqlUrl;
|
15
16
|
const MODEL_CONFIGURATION_LINE = generateModelConfigurationLine(config);
|
16
17
|
const RESPONSE_MUTATION_NAME = config.responseMutationName;
|
17
18
|
const RESPONSE_MUTATION_INPUT_TYPE_NAME = config.responseMutationInputTypeName;
|
18
19
|
const MESSAGE_MODEL_NAME = config.messageModel.messageModel.name.value;
|
20
|
+
const GET_QUERY_NAME = `getConversationMessage${(0, graphql_transformer_common_1.toUpper)(config.field.name.value)}`;
|
21
|
+
const GET_QUERY_INPUT_TYPE_NAME = 'ID';
|
22
|
+
const LIST_QUERY_NAME = `listConversationMessage${(0, graphql_transformer_common_1.toUpper)((0, pluralize_1.default)(config.field.name.value))}`;
|
23
|
+
const LIST_QUERY_INPUT_TYPE_NAME = `ModelConversationMessage${(0, graphql_transformer_common_1.toUpper)(config.field.name.value)}FilterInput`;
|
24
|
+
const LIST_QUERY_LIMIT = 'undefined';
|
25
|
+
const STREAMING_RESPONSE_MUTATION_NAME = config.messageModel.assistantStreamingMutationField.name.value;
|
26
|
+
const STREAMING_RESPONSE_MUTATION_INPUT_TYPE_NAME = config.messageModel.assistantStreamingMutationInput.name.value;
|
27
|
+
const DISABLE_STREAMING_ENV_VAR = `${config.field.name.value}_DISABLE_STREAMING`;
|
19
28
|
const substitutions = {
|
20
29
|
TOOL_DEFINITIONS_LINE,
|
21
30
|
TOOLS_CONFIGURATION_LINE,
|
22
31
|
SELECTION_SET,
|
23
|
-
GRAPHQL_API_ENDPOINT,
|
24
32
|
MODEL_CONFIGURATION_LINE,
|
25
33
|
RESPONSE_MUTATION_NAME,
|
26
34
|
RESPONSE_MUTATION_INPUT_TYPE_NAME,
|
27
35
|
MESSAGE_MODEL_NAME,
|
36
|
+
GET_QUERY_NAME,
|
37
|
+
GET_QUERY_INPUT_TYPE_NAME,
|
38
|
+
LIST_QUERY_NAME,
|
39
|
+
LIST_QUERY_INPUT_TYPE_NAME,
|
40
|
+
LIST_QUERY_LIMIT,
|
41
|
+
STREAMING_RESPONSE_MUTATION_NAME,
|
42
|
+
STREAMING_RESPONSE_MUTATION_INPUT_TYPE_NAME,
|
43
|
+
DISABLE_STREAMING_ENV_VAR,
|
28
44
|
};
|
29
45
|
let resolver = fs_1.default.readFileSync(path_1.default.join(__dirname, 'invoke-lambda-resolver-fn.template.js'), 'utf8');
|
30
46
|
Object.entries(substitutions).forEach(([key, value]) => {
|
31
47
|
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
32
48
|
resolver = replaced;
|
33
49
|
});
|
34
|
-
|
50
|
+
const templateName = `Mutation.${config.field.name.value}.invoke-lambda.js`;
|
51
|
+
return graphql_transformer_core_1.MappingTemplate.s3MappingFunctionCodeFromString(resolver, templateName);
|
35
52
|
};
|
36
53
|
exports.invokeLambdaMappingTemplate = invokeLambdaMappingTemplate;
|
37
54
|
const generateToolLines = (config) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"invoke-lambda-resolver.js","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":";;;;;;AACA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AACxB,0DAA+B;
|
1
|
+
{"version":3,"file":"invoke-lambda-resolver.js","sourceRoot":"","sources":["../../src/resolvers/invoke-lambda-resolver.ts"],"names":[],"mappings":";;;;;;AACA,oFAAwE;AAExE,4CAAoB;AACpB,gDAAwB;AACxB,0DAA+B;AAC/B,2EAAqD;AACrD,0DAAkC;AAS3B,MAAM,2BAA2B,GAAG,CAAC,MAA0C,EAA2B,EAAE;IACjH,MAAM,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,YAAY,CAAC;IACnC,MAAM,wBAAwB,GAAG,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,sBAAsB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC3D,MAAM,iCAAiC,GAAG,MAAM,CAAC,6BAA6B,CAAC;IAC/E,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;IAIvE,MAAM,cAAc,GAAG,yBAAyB,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACnF,MAAM,yBAAyB,GAAG,IAAI,CAAC;IACvC,MAAM,eAAe,GAAG,0BAA0B,IAAA,oCAAO,EAAC,IAAA,mBAAS,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;IAChG,MAAM,0BAA0B,GAAG,2BAA2B,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IAC5G,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAErC,MAAM,gCAAgC,GAAG,MAAM,CAAC,YAAY,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC;IACxG,MAAM,2CAA2C,GAAG,MAAM,CAAC,YAAY,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC;IACnH,MAAM,yBAAyB,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,oBAAoB,CAAC;IAEjF,MAAM,aAAa,GAAG;QACpB,qBAAqB;QACrB,wBAAwB;QACxB,aAAa;QACb,wBAAwB;QACxB,sBAAsB;QACtB,iCAAiC;QACjC,kBAAkB;QAClB,cAAc;QACd,yBAAyB;QACzB,eAAe;QACf,0BAA0B;QAC1B,gBAAgB;QAChB,gCAAgC;QAChC,2CAA2C;QAC3C,yBAAyB;KAC1B,CAAC;IAEF,IAAI,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uCAAuC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,YAAY,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,mBAAmB,CAAC;IAE5E,OAAO,0CAAe,CAAC,+BAA+B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACjF,CAAC,CAAC;AA9CW,QAAA,2BAA2B,+BA8CtC;AAEF,MAAM,iBAAiB,GAAG,CAAC,MAA0C,EAAE,EAAE;IACvE,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,qBAAqB,GAAG,eAAe,CAAC,CAAC,CAAC,2BAA2B,eAAe,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEnG,MAAM,wBAAwB,GAAG,eAAe;QAC9C,CAAC,CAAC,IAAA,mBAAM,EAAA;;;;OAIL;QACH,CAAC,CAAC,IAAA,mBAAM,EAAA;;OAEL,CAAC;IAEN,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AAC7D,CAAC,CAAC;AAQF,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE;IACpF,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAEzC,OAAO,IAAA,mBAAM,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,mBAAM,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,4 @@
|
|
1
|
+
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
|
3
|
+
export declare const listMessageInitMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
4
|
+
//# sourceMappingURL=list-messages-init-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"list-messages-init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAOzF,eAAO,MAAM,8BAA8B,WAAY,kCAAkC,KAAG,uBAI3F,CAAC"}
|