@aws-amplify/graphql-api-construct 1.15.1-ai-streaming.0 → 1.16.0-gen2-migration-1015.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +142 -69
- package/API.md +11 -1
- package/CHANGELOG.md +9 -2
- 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/model-datasource-strategy-types.d.ts +19 -1
- package/lib/model-datasource-strategy-types.js +1 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +1 -12
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +2 -19
- 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 +1 -11
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +42 -176
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_message_history_retriever.js +2 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +5 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +7 -10
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +1 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +7 -6
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +2 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +7 -7
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +2 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.d.ts +1 -2
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.js +2 -4
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +2 -3
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +2 -4
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +10 -11
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +1 -1
- package/node_modules/@aws-amplify/ai-constructs/package.json +2 -9
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +15 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +0 -2
- 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 +3 -34
- 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/resolvers/invoke-lambda-resolver-fn.template.js +1 -14
- 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 +0 -6
- 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/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 +2 -3
- 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 +0 -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 +0 -16
- 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 -12
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +3 -2
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +201 -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 +13 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +17 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +201 -0
- 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 +7 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +12 -3
- 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 +2 -0
- 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 +4 -2
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +6 -1
- 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/import-table.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js +205 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/.package-lock.json +13 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/LICENSE +47 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/README.md +18 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/index.js +1848 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/package.json +16 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package-lock.json +21 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package.json +11 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +14 -10
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +9 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +3 -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/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +7 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +1 -0
- 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 +9 -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 +11 -10
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +201 -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 +10 -9
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +18 -18
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +11 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +201 -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 +3 -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/model-datasource-strategy-utils.d.ts +2 -1
- 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 +9 -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 +7 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +11 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +11 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +6 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +3 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +10 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
- package/node_modules/graphql-mapping-template/LICENSE +201 -0
- package/node_modules/graphql-mapping-template/package.json +3 -2
- package/node_modules/graphql-transformer-common/CHANGELOG.md +10 -0
- package/node_modules/graphql-transformer-common/LICENSE +201 -0
- package/node_modules/graphql-transformer-common/package.json +4 -3
- package/package.json +23 -23
- package/src/model-datasource-strategy-types.ts +21 -0
- package/src/types.ts +1 -1
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.d.ts +0 -33
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.js +0 -38
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.d.ts +0 -7
- package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.js +0 -16
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/README.md +0 -4
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.d.ts +0 -113
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.d.ts +0 -112
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.js +0 -30
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.d.ts +0 -23
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.d.ts +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.js +0 -11
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.d.ts +0 -59
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.js +0 -12
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.d.ts +0 -59
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.js +0 -25
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.d.ts +0 -508
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.js +0 -112
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.d.ts +0 -2
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.js +0 -18
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.d.ts +0 -42
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.js +0 -22
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.d.ts +0 -28
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.d.ts +0 -27
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.js +0 -12
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.d.ts +0 -33
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.js +0 -10
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.d.ts +0 -32
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.js +0 -33
- package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/package.json +0 -27
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver-fn.template.js +0 -101
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver-fn.template.js +0 -121
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js.map +0 -1
@@ -1,121 +0,0 @@
|
|
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
|
-
}
|
@@ -1,4 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.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
|
@@ -1 +0,0 @@
|
|
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"}
|