@aws-amplify/graphql-api-construct 1.16.0-gen2-migration-1015.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +78 -151
- package/API.md +1 -11
- package/CHANGELOG.md +17 -1
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +9 -12
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/internal/metadata.d.ts +4 -0
- package/lib/internal/metadata.js +42 -0
- 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 +1 -1
- package/lib/types.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +14 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +14 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.d.ts +44 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.js +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/conversation-directive-configuration.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.d.ts +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/{session-model.js → conversation-model.js} +18 -24
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/conversation-model.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +10 -10
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +46 -51
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.d.ts +14 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js +30 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts +1 -24
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js +1 -7
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.js +53 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.js +21 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-response-subscription-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.js +41 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/generate-resolver.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts +7 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.js +15 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.js +11 -13
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/list-messages-init-resolver.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.d.ts +23 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.js +18 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/resolver-function-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.d.ts +3 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.js +85 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/send-message-pipeline-definition.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{assistant-messages-subscription-resolver-fn.template.js → templates/assistant-messages-subscription-resolver-fn.template.js} +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{invoke-lambda-resolver-fn.template.js → templates/invoke-lambda-resolver-fn.template.js} +8 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{list-messages-init-resolver-fn.template.js → templates/list-messages-init-resolver-fn.template.js} +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/graphql-json-schema-type.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.js +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils → tools}/graphql-json-schema-type.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils/tools.d.ts → tools/process-tools.d.ts} +8 -14
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/{utils/tools.js → tools/process-tools.js} +21 -21
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/tools/process-tools.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts +3 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js +65 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts +2 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +18 -19
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +2 -7
- 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 +48 -98
- 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 +14 -13
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +2 -2
- 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/lib/directives/conversation.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js +6 -0
- package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-directives/package.json +2 -3
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +5 -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 +12 -12
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -13
- 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 -7
- 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 +3 -12
- 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.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 +1 -6
- 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/package.json +10 -13
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +8 -8
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +5 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +0 -3
- 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 +1 -7
- 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 +1 -7
- 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 +0 -1
- 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 +0 -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 +1 -9
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +10 -10
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +5 -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 +9 -9
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +9 -9
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +18 -18
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +0 -4
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +2 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/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 +6 -6
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +1 -11
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +0 -11
- 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/package.json +2 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +0 -10
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +0 -4
- package/node_modules/graphql-mapping-template/package.json +2 -3
- package/node_modules/graphql-transformer-common/API.md +1 -0
- package/node_modules/graphql-transformer-common/CHANGELOG.md +7 -3
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +1 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +1 -0
- package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js.map +1 -1
- package/node_modules/graphql-transformer-common/package.json +3 -3
- package/package.json +22 -22
- package/src/amplify-graphql-api.ts +12 -12
- package/src/internal/metadata.ts +40 -0
- package/src/model-datasource-strategy-types.ts +0 -21
- package/src/types.ts +1 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts +0 -10
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js +0 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js +0 -16
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +0 -3
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +0 -22
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +0 -77
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +0 -5
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +0 -34
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +0 -4
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +0 -25
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-directives/LICENSE +0 -201
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts +0 -7
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts.map +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js +0 -205
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js.map +0 -1
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/.package-lock.json +0 -13
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/LICENSE +0 -47
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/README.md +0 -18
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/index.js +0 -1848
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/package.json +0 -16
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package-lock.json +0 -21
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package.json +0 -11
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +0 -201
- package/node_modules/graphql-mapping-template/LICENSE +0 -201
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{assistant-mutation-resolver-fn.template.js → templates/assistant-mutation-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{auth-resolver-fn.template.js → templates/auth-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{init-resolver-fn.template.js → templates/init-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{verify-session-owner-resolver-fn.template.js → templates/verify-session-owner-resolver-fn.template.js} +0 -0
- /package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/{write-message-to-table-resolver-fn.template.js → templates/write-message-to-table-resolver-fn.template.js} +0 -0
@@ -1,32 +1,55 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createMessageModel = void 0;
|
3
|
+
exports.createAssistantResponseMutationInput = exports.createAssistantMutationField = exports.createMessageSubscription = exports.createMessageModel = void 0;
|
4
4
|
const graphql_directives_1 = require("@aws-amplify/graphql-directives");
|
5
5
|
const graphql_1 = require("graphql");
|
6
6
|
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
7
|
-
const createMessageModel = (
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const messageConversationField = constructMessageSessionField(messageBelongsToConversationDirective, conversationModelName);
|
14
|
-
const messageModel = constructConversationMessageModel(messageModelName, messageConversationField, referenceFieldName, [messageModelDirective, messageAuthDirective], conversationMessageInterface);
|
15
|
-
const messageSubscription = constructMessageSubscription(messageSubscriptionFieldName, messageModelName, assistantMutationFieldName);
|
16
|
-
const assistantMutationInput = constructAssistantResponseMutationInput(messageModelName);
|
17
|
-
const assistantMutationField = constructAssistantMutationField(assistantMutationFieldName, messageModelName, assistantMutationInput.name.value);
|
7
|
+
const createMessageModel = (conversationName, messageName, referenceFieldName, conversationMessageInterface) => {
|
8
|
+
const authDirective = constructMessageAuthDirective();
|
9
|
+
const modelDirective = constructMessageModelDirective();
|
10
|
+
const belongsToConversationDirective = constructMessageSessionFieldBelongsToDirective(referenceFieldName);
|
11
|
+
const conversationField = constructMessageConversationField(belongsToConversationDirective, conversationName);
|
12
|
+
const model = constructConversationMessageModel(messageName, conversationField, referenceFieldName, [modelDirective, authDirective], conversationMessageInterface);
|
18
13
|
return {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
messageSubscription,
|
25
|
-
assistantMutationInput,
|
26
|
-
assistantMutationField,
|
14
|
+
authDirective,
|
15
|
+
modelDirective,
|
16
|
+
belongsToConversationDirective,
|
17
|
+
conversationField,
|
18
|
+
model,
|
27
19
|
};
|
28
20
|
};
|
29
21
|
exports.createMessageModel = createMessageModel;
|
22
|
+
const createMessageSubscription = (subscriptionName, conversationMessageTypeName, onMutationName) => {
|
23
|
+
const awsSubscribeDirective = (0, graphql_transformer_common_1.makeDirective)('aws_subscribe', [(0, graphql_transformer_common_1.makeArgument)('mutations', (0, graphql_transformer_common_1.makeValueNode)([onMutationName]))]);
|
24
|
+
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
25
|
+
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID'))];
|
26
|
+
const subscriptionField = (0, graphql_transformer_common_1.makeField)(subscriptionName, args, (0, graphql_transformer_common_1.makeNamedType)(conversationMessageTypeName), [
|
27
|
+
awsSubscribeDirective,
|
28
|
+
cognitoAuthDirective,
|
29
|
+
]);
|
30
|
+
return subscriptionField;
|
31
|
+
};
|
32
|
+
exports.createMessageSubscription = createMessageSubscription;
|
33
|
+
const createAssistantMutationField = (fieldName, messageName, inputTypeName) => {
|
34
|
+
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('input', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)(inputTypeName)))];
|
35
|
+
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
36
|
+
const createAssistantResponseMutation = (0, graphql_transformer_common_1.makeField)(fieldName, args, (0, graphql_transformer_common_1.makeNamedType)(messageName), [cognitoAuthDirective]);
|
37
|
+
return createAssistantResponseMutation;
|
38
|
+
};
|
39
|
+
exports.createAssistantMutationField = createAssistantMutationField;
|
40
|
+
const createAssistantResponseMutationInput = (messageName) => {
|
41
|
+
const inputName = `Create${messageName}AssistantInput`;
|
42
|
+
return {
|
43
|
+
kind: 'InputObjectTypeDefinition',
|
44
|
+
name: { kind: 'Name', value: inputName },
|
45
|
+
fields: [
|
46
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
47
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('content', (0, graphql_transformer_common_1.makeListType)((0, graphql_transformer_common_1.makeNamedType)('ContentBlockInput'))),
|
48
|
+
(0, graphql_transformer_common_1.makeInputValueDefinition)('associatedUserMessageId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
49
|
+
],
|
50
|
+
};
|
51
|
+
};
|
52
|
+
exports.createAssistantResponseMutationInput = createAssistantResponseMutationInput;
|
30
53
|
const constructMessageModelDirective = () => {
|
31
54
|
return (0, graphql_transformer_common_1.makeDirective)('model', [
|
32
55
|
(0, graphql_transformer_common_1.makeArgument)('subscriptions', (0, graphql_transformer_common_1.makeValueNode)({ onUpdate: null, onDelete: null })),
|
@@ -61,10 +84,10 @@ const constructMessageSessionFieldBelongsToDirective = (referenceFieldName) => {
|
|
61
84
|
const referencesArg = (0, graphql_transformer_common_1.makeArgument)('references', (0, graphql_transformer_common_1.makeValueNode)(referenceFieldName));
|
62
85
|
return (0, graphql_transformer_common_1.makeDirective)(graphql_directives_1.BelongsToDirective.name, [referencesArg]);
|
63
86
|
};
|
64
|
-
const
|
87
|
+
const constructMessageConversationField = (belongsToDirective, typeName) => {
|
65
88
|
return (0, graphql_transformer_common_1.makeField)('conversation', [], (0, graphql_transformer_common_1.makeNamedType)(typeName), [belongsToDirective]);
|
66
89
|
};
|
67
|
-
const constructConversationMessageModel = (modelName,
|
90
|
+
const constructConversationMessageModel = (modelName, conversationField, referenceFieldName, typeDirectives, conversationMessageInterface) => {
|
68
91
|
const id = (0, graphql_transformer_common_1.makeField)('id', [], (0, graphql_transformer_common_1.wrapNonNull)((0, graphql_transformer_common_1.makeNamedType)('ID')));
|
69
92
|
const conversationId = (0, graphql_transformer_common_1.makeField)(referenceFieldName, [], (0, graphql_transformer_common_1.wrapNonNull)((0, graphql_transformer_common_1.makeNamedType)('ID')));
|
70
93
|
const role = (0, graphql_transformer_common_1.makeField)('role', [], (0, graphql_transformer_common_1.makeNamedType)('ConversationParticipantRole'));
|
@@ -75,37 +98,9 @@ const constructConversationMessageModel = (modelName, sessionField, referenceFie
|
|
75
98
|
const object = {
|
76
99
|
...(0, graphql_transformer_common_1.blankObject)(modelName),
|
77
100
|
interfaces: [conversationMessageInterface],
|
78
|
-
fields: [id, conversationId,
|
101
|
+
fields: [id, conversationId, conversationField, role, content, context, uiComponents, associatedUserMessageId],
|
79
102
|
directives: typeDirectives,
|
80
103
|
};
|
81
104
|
return object;
|
82
105
|
};
|
83
|
-
const constructMessageSubscription = (subscriptionName, conversationMessageTypeName, onMutationName) => {
|
84
|
-
const awsSubscribeDirective = (0, graphql_transformer_common_1.makeDirective)('aws_subscribe', [(0, graphql_transformer_common_1.makeArgument)('mutations', (0, graphql_transformer_common_1.makeValueNode)([onMutationName]))]);
|
85
|
-
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
86
|
-
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID'))];
|
87
|
-
const subscriptionField = (0, graphql_transformer_common_1.makeField)(subscriptionName, args, (0, graphql_transformer_common_1.makeNamedType)(conversationMessageTypeName), [
|
88
|
-
awsSubscribeDirective,
|
89
|
-
cognitoAuthDirective,
|
90
|
-
]);
|
91
|
-
return subscriptionField;
|
92
|
-
};
|
93
|
-
const constructAssistantMutationField = (fieldName, messageModelName, inputTypeName) => {
|
94
|
-
const args = [(0, graphql_transformer_common_1.makeInputValueDefinition)('input', (0, graphql_transformer_common_1.makeNonNullType)((0, graphql_transformer_common_1.makeNamedType)(inputTypeName)))];
|
95
|
-
const cognitoAuthDirective = (0, graphql_transformer_common_1.makeDirective)('aws_cognito_user_pools', []);
|
96
|
-
const createAssistantResponseMutation = (0, graphql_transformer_common_1.makeField)(fieldName, args, (0, graphql_transformer_common_1.makeNamedType)(messageModelName), [cognitoAuthDirective]);
|
97
|
-
return createAssistantResponseMutation;
|
98
|
-
};
|
99
|
-
const constructAssistantResponseMutationInput = (messageModelName) => {
|
100
|
-
const inputName = `Create${messageModelName}AssistantInput`;
|
101
|
-
return {
|
102
|
-
kind: 'InputObjectTypeDefinition',
|
103
|
-
name: { kind: 'Name', value: inputName },
|
104
|
-
fields: [
|
105
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('conversationId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
106
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('content', (0, graphql_transformer_common_1.makeListType)((0, graphql_transformer_common_1.makeNamedType)('ContentBlockInput'))),
|
107
|
-
(0, graphql_transformer_common_1.makeInputValueDefinition)('associatedUserMessageId', (0, graphql_transformer_common_1.makeNamedType)('ID')),
|
108
|
-
],
|
109
|
-
};
|
110
|
-
};
|
111
106
|
//# sourceMappingURL=message-model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"message-model.js","sourceRoot":"","sources":["../../src/graphql-types/message-model.ts"],"names":[],"mappings":";;;AAAA,wEAAqE;AACrE,qCAQiB;AACjB,2EAWoC;
|
1
|
+
{"version":3,"file":"message-model.js","sourceRoot":"","sources":["../../src/graphql-types/message-model.ts"],"names":[],"mappings":";;;AAAA,wEAAqE;AACrE,qCAQiB;AACjB,2EAWoC;AA6C7B,MAAM,kBAAkB,GAAG,CAChC,gBAAwB,EACxB,WAAmB,EACnB,kBAA0B,EAC1B,4BAA2C,EAC7B,EAAE;IAChB,MAAM,aAAa,GAAG,6BAA6B,EAAE,CAAC;IACtD,MAAM,cAAc,GAAG,8BAA8B,EAAE,CAAC;IACxD,MAAM,8BAA8B,GAAG,8CAA8C,CAAC,kBAAkB,CAAC,CAAC;IAC1G,MAAM,iBAAiB,GAAG,iCAAiC,CAAC,8BAA8B,EAAE,gBAAgB,CAAC,CAAC;IAC9G,MAAM,KAAK,GAAG,iCAAiC,CAC7C,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,CAAC,cAAc,EAAE,aAAa,CAAC,EAC/B,4BAA4B,CAC7B,CAAC;IAEF,OAAO;QACL,aAAa;QACb,cAAc;QACd,8BAA8B;QAC9B,iBAAiB;QACjB,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,kBAAkB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MAAM,IAAI,GAAG,IAAA,sCAAS,EAAC,MAAM,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,6BAA6B,CAAC,CAAC,CAAC;IACjF,MAAM,OAAO,GAAG,IAAA,sCAAS,EAAC,SAAS,EAAE,EAAE,EAAE,IAAA,yCAAY,EAAC,IAAA,0CAAa,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,IAAA,sCAAS,EAAC,WAAW,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,SAAS,CAAC,CAAC,CAAC;IACrE,MAAM,YAAY,GAAG,IAAA,sCAAS,EAAC,mBAAmB,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,mBAAmB,CAAC,CAAC,CAAC;IAC5F,MAAM,uBAAuB,GAAG,IAAA,sCAAS,EAAC,yBAAyB,EAAE,EAAE,EAAE,IAAA,0CAAa,EAAC,IAAI,CAAC,CAAC,CAAC;IAE9F,MAAM,MAAM,GAAG;QACb,GAAG,IAAA,wCAAW,EAAC,SAAS,CAAC;QACzB,UAAU,EAAE,CAAC,4BAA4B,CAAC;QAC1C,MAAM,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,uBAAuB,CAAC;QAC9G,UAAU,EAAE,cAAc;KAC3B,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
2
|
+
export declare const CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = "conversationId";
|
3
|
+
export declare const LIST_MESSAGES_INDEX_NAME = "gsi-ConversationMessage.conversationId.createdAt";
|
4
|
+
export declare const CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = "ID";
|
5
|
+
export declare const getConversationTypeName: (config: ConversationDirectiveConfiguration) => string;
|
6
|
+
export declare const getConversationMessageTypeName: (config: ConversationDirectiveConfiguration) => string;
|
7
|
+
export declare const getMessageSubscriptionFieldName: (config: ConversationDirectiveConfiguration) => string;
|
8
|
+
export declare const getAssistantMutationFieldName: (config: ConversationDirectiveConfiguration) => string;
|
9
|
+
export declare const getFunctionStackName: (config: ConversationDirectiveConfiguration) => string;
|
10
|
+
export declare const getConversationMessageGetQueryName: (config: ConversationDirectiveConfiguration) => string;
|
11
|
+
export declare const getConversationMessageListQueryName: (config: ConversationDirectiveConfiguration) => string;
|
12
|
+
export declare const getConversationMessageListQueryInputTypeName: (config: ConversationDirectiveConfiguration) => string;
|
13
|
+
export declare const upperCaseConversationFieldName: (config: ConversationDirectiveConfiguration) => string;
|
14
|
+
//# sourceMappingURL=name-values.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name-values.d.ts","sourceRoot":"","sources":["../../src/graphql-types/name-values.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAE7F,eAAO,MAAM,0CAA0C,mBAAmB,CAAC;AAC3E,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAC3F,eAAO,MAAM,8CAA8C,OAAO,CAAC;AAEnE,eAAO,MAAM,uBAAuB,WAAY,kCAAkC,WACzB,CAAC;AAE1D,eAAO,MAAM,8BAA8B,WAAY,kCAAkC,WACzB,CAAC;AAEjE,eAAO,MAAM,+BAA+B,WAAY,kCAAkC,WACpB,CAAC;AAEvE,eAAO,MAAM,6BAA6B,WAAY,kCAAkC,WACpB,CAAC;AAErE,eAAO,MAAM,oBAAoB,WAAY,kCAAkC,WACF,CAAC;AAE9E,eAAO,MAAM,kCAAkC,WAAY,kCAAkC,WAC1B,CAAC;AAEpE,eAAO,MAAM,mCAAmC,WAAY,kCAAkC,WACf,CAAC;AAEhF,eAAO,MAAM,4CAA4C,WAAY,kCAAkC,WACvB,CAAC;AAEjF,eAAO,MAAM,8BAA8B,WAAY,kCAAkC,WAAqC,CAAC"}
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/name-values.js
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.upperCaseConversationFieldName = exports.getConversationMessageListQueryInputTypeName = exports.getConversationMessageListQueryName = exports.getConversationMessageGetQueryName = exports.getFunctionStackName = exports.getAssistantMutationFieldName = exports.getMessageSubscriptionFieldName = exports.getConversationMessageTypeName = exports.getConversationTypeName = exports.CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = exports.LIST_MESSAGES_INDEX_NAME = exports.CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = void 0;
|
7
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
8
|
+
const pluralize_1 = __importDefault(require("pluralize"));
|
9
|
+
exports.CONVERSATION_MESSAGES_REFERENCE_FIELD_NAME = 'conversationId';
|
10
|
+
exports.LIST_MESSAGES_INDEX_NAME = 'gsi-ConversationMessage.conversationId.createdAt';
|
11
|
+
exports.CONVERSATION_MESSAGE_GET_QUERY_INPUT_TYPE_NAME = 'ID';
|
12
|
+
const getConversationTypeName = (config) => `Conversation${(0, exports.upperCaseConversationFieldName)(config)}`;
|
13
|
+
exports.getConversationTypeName = getConversationTypeName;
|
14
|
+
const getConversationMessageTypeName = (config) => `ConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}`;
|
15
|
+
exports.getConversationMessageTypeName = getConversationMessageTypeName;
|
16
|
+
const getMessageSubscriptionFieldName = (config) => `onCreateAssistantResponse${(0, exports.upperCaseConversationFieldName)(config)}`;
|
17
|
+
exports.getMessageSubscriptionFieldName = getMessageSubscriptionFieldName;
|
18
|
+
const getAssistantMutationFieldName = (config) => `createAssistantResponse${(0, exports.upperCaseConversationFieldName)(config)}`;
|
19
|
+
exports.getAssistantMutationFieldName = getAssistantMutationFieldName;
|
20
|
+
const getFunctionStackName = (config) => `${(0, exports.upperCaseConversationFieldName)(config)}ConversationDirectiveLambdaStack`;
|
21
|
+
exports.getFunctionStackName = getFunctionStackName;
|
22
|
+
const getConversationMessageGetQueryName = (config) => `getConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}`;
|
23
|
+
exports.getConversationMessageGetQueryName = getConversationMessageGetQueryName;
|
24
|
+
const getConversationMessageListQueryName = (config) => `listConversationMessage${(0, pluralize_1.default)((0, exports.upperCaseConversationFieldName)(config))}`;
|
25
|
+
exports.getConversationMessageListQueryName = getConversationMessageListQueryName;
|
26
|
+
const getConversationMessageListQueryInputTypeName = (config) => `ModelConversationMessage${(0, exports.upperCaseConversationFieldName)(config)}FilterInput`;
|
27
|
+
exports.getConversationMessageListQueryInputTypeName = getConversationMessageListQueryInputTypeName;
|
28
|
+
const upperCaseConversationFieldName = (config) => (0, graphql_transformer_common_1.toUpper)(config.field.name.value);
|
29
|
+
exports.upperCaseConversationFieldName = upperCaseConversationFieldName;
|
30
|
+
//# sourceMappingURL=name-values.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name-values.js","sourceRoot":"","sources":["../../src/graphql-types/name-values.ts"],"names":[],"mappings":";;;;;;AAAA,2EAAqD;AACrD,0DAAkC;AAGrB,QAAA,0CAA0C,GAAG,gBAAgB,CAAC;AAC9D,QAAA,wBAAwB,GAAG,kDAAkD,CAAC;AAC9E,QAAA,8CAA8C,GAAG,IAAI,CAAC;AAE5D,MAAM,uBAAuB,GAAG,CAAC,MAA0C,EAAE,EAAE,CACpF,eAAe,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AAD7C,QAAA,uBAAuB,2BACsB;AAEnD,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC3F,sBAAsB,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADpD,QAAA,8BAA8B,kCACsB;AAE1D,MAAM,+BAA+B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC5F,4BAA4B,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AAD1D,QAAA,+BAA+B,mCAC2B;AAEhE,MAAM,6BAA6B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC1F,0BAA0B,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADxD,QAAA,6BAA6B,iCAC2B;AAE9D,MAAM,oBAAoB,GAAG,CAAC,MAA0C,EAAE,EAAE,CACjF,GAAG,IAAA,sCAA8B,EAAC,MAAM,CAAC,kCAAkC,CAAC;AADjE,QAAA,oBAAoB,wBAC6C;AAEvE,MAAM,kCAAkC,GAAG,CAAC,MAA0C,EAAE,EAAE,CAC/F,yBAAyB,IAAA,sCAA8B,EAAC,MAAM,CAAC,EAAE,CAAC;AADvD,QAAA,kCAAkC,sCACqB;AAE7D,MAAM,mCAAmC,GAAG,CAAC,MAA0C,EAAE,EAAE,CAChG,0BAA0B,IAAA,mBAAS,EAAC,IAAA,sCAA8B,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AADnE,QAAA,mCAAmC,uCACgC;AAEzE,MAAM,4CAA4C,GAAG,CAAC,MAA0C,EAAE,EAAE,CACzG,2BAA2B,IAAA,sCAA8B,EAAC,MAAM,CAAC,aAAa,CAAC;AADpE,QAAA,4CAA4C,gDACwB;AAE1E,MAAM,8BAA8B,GAAG,CAAC,MAA0C,EAAE,EAAE,CAAC,IAAA,oCAAO,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAAlH,QAAA,8BAA8B,kCAAoF"}
|
@@ -2,31 +2,8 @@ import { ModelTransformer } from '@aws-amplify/graphql-model-transformer';
|
|
2
2
|
import { BelongsToTransformer, HasManyTransformer } from '@aws-amplify/graphql-relational-transformer';
|
3
3
|
import { TransformerPluginBase } from '@aws-amplify/graphql-transformer-core';
|
4
4
|
import { TransformerAuthProvider, TransformerContextProvider, TransformerPrepareStepContextProvider, TransformerSchemaVisitStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
5
|
-
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
6
|
-
import { ConversationModel } from './graphql-types/session-model';
|
7
|
-
import { MessageModel } from './graphql-types/message-model';
|
8
|
-
import { type ToolDefinition, type Tools } from './utils/tools';
|
9
5
|
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
10
|
-
|
11
|
-
parent: ObjectTypeDefinitionNode;
|
12
|
-
directive: DirectiveNode;
|
13
|
-
aiModel: string;
|
14
|
-
functionName: string | undefined;
|
15
|
-
field: FieldDefinitionNode;
|
16
|
-
responseMutationInputTypeName: string;
|
17
|
-
responseMutationName: string;
|
18
|
-
systemPrompt: string;
|
19
|
-
tools: ToolDefinition[];
|
20
|
-
toolSpec: Tools;
|
21
|
-
conversationModel: ConversationModel;
|
22
|
-
messageModel: MessageModel;
|
23
|
-
inferenceConfiguration: ConversationInferenceConfiguration;
|
24
|
-
};
|
25
|
-
export type ConversationInferenceConfiguration = {
|
26
|
-
maxTokens?: number;
|
27
|
-
temperature?: number;
|
28
|
-
topP?: number;
|
29
|
-
};
|
6
|
+
import { DirectiveNode, FieldDefinitionNode, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
30
7
|
export declare class ConversationTransformer extends TransformerPluginBase {
|
31
8
|
private directives;
|
32
9
|
private fieldHandler;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grapqhl-conversation-transformer.d.ts","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAyB,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EAC1C,MAAM,6CAA6C,CAAC;AACrD,OAAO,
|
1
|
+
{"version":3,"file":"grapqhl-conversation-transformer.d.ts","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAyB,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EAC1C,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAQpH,qBAAa,uBAAwB,SAAQ,qBAAqB;IAChE,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,iBAAiB,CAAgC;gBAGvD,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,YAAY,EAAE,uBAAuB,EACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC;IAepD,KAAK,WACK,wBAAwB,GAAG,2BAA2B,cAClD,mBAAmB,aACpB,aAAa,WACf,yCAAyC,KACjD,IAAI,CAGL;IAMF,iBAAiB,QAAS,0BAA0B,KAAG,IAAI,CAEzD;IAMF,OAAO,QAAS,qCAAqC,KAAG,IAAI,CAE1D;CACH"}
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConversationTransformer = void 0;
|
4
4
|
const graphql_directives_1 = require("@aws-amplify/graphql-directives");
|
5
5
|
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
6
|
+
const conversation_field_handler_1 = require("./transformer-steps/conversation-field-handler");
|
6
7
|
const conversation_prepare_handler_1 = require("./transformer-steps/conversation-prepare-handler");
|
7
8
|
const conversation_resolver_generator_1 = require("./transformer-steps/conversation-resolver-generator");
|
8
|
-
const conversation_field_handler_1 = require("./transformer-steps/conversation-field-handler");
|
9
9
|
class ConversationTransformer extends graphql_transformer_core_1.TransformerPluginBase {
|
10
10
|
constructor(modelTransformer, hasManyTransformer, belongsToTransformer, authProvider, functionNameMap) {
|
11
11
|
super('amplify-conversation-transformer', graphql_directives_1.ConversationDirective.definition);
|
@@ -26,10 +26,4 @@ class ConversationTransformer extends graphql_transformer_core_1.TransformerPlug
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
exports.ConversationTransformer = ConversationTransformer;
|
29
|
-
const validate = (config, ctx) => {
|
30
|
-
const { field } = config;
|
31
|
-
if (field.type.kind !== 'NamedType' || field.type.name.value !== 'ConversationMessage') {
|
32
|
-
throw new graphql_transformer_core_1.InvalidDirectiveError('@conversation return type must be ConversationMessage');
|
33
|
-
}
|
34
|
-
};
|
35
29
|
//# sourceMappingURL=grapqhl-conversation-transformer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grapqhl-conversation-transformer.js","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AAGxE,oFAAqG;
|
1
|
+
{"version":3,"file":"grapqhl-conversation-transformer.js","sourceRoot":"","sources":["../src/grapqhl-conversation-transformer.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AAGxE,oFAAqG;AAUrG,+FAA0F;AAC1F,mGAA8F;AAC9F,yGAAoG;AAIpG,MAAa,uBAAwB,SAAQ,gDAAqB;IAMhE,YACE,gBAAkC,EAClC,kBAAsC,EACtC,oBAA0C,EAC1C,YAAqC,EACrC,eAAkD;QAElD,KAAK,CAAC,kCAAkC,EAAE,0CAAqB,CAAC,UAAU,CAAC,CAAC;QAZtE,eAAU,GAAyC,EAAE,CAAC;QAyB9D,UAAK,GAAG,CACN,MAA8D,EAC9D,UAA+B,EAC/B,SAAwB,EACxB,OAAkD,EAC5C,EAAE;YACR,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YACpG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACvC,CAAC,CAAC;QAMF,sBAAiB,GAAG,CAAC,GAA+B,EAAQ,EAAE;YAC5D,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACjE,CAAC,CAAC;QAMF,YAAO,GAAG,CAAC,GAA0C,EAAQ,EAAE;YAC7D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,CAAC,CAAC;QApCA,IAAI,CAAC,YAAY,GAAG,IAAI,qDAAwB,EAAE,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,IAAI,yDAA0B,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAC/H,IAAI,CAAC,iBAAiB,GAAG,IAAI,+DAA6B,CAAC,eAAe,CAAC,CAAC;IAC9E,CAAC;CAkCF;AAnDD,0DAmDC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-pipeline-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-response-pipeline-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,mCAAmC,EAAE,kBAKjD,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assistantResponsePipelineDefinition = void 0;
|
4
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
5
|
+
exports.assistantResponsePipelineDefinition = {
|
6
|
+
requestSlots: [init(), auth(), verifySessionOwner()],
|
7
|
+
dataSlot: data(),
|
8
|
+
responseSlots: [],
|
9
|
+
field: (config) => ({ typeName: 'Mutation', fieldName: fieldName(config) }),
|
10
|
+
};
|
11
|
+
function init() {
|
12
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
13
|
+
slotName: 'init',
|
14
|
+
fileName: 'init-resolver-fn.template.js',
|
15
|
+
generateTemplate: templateGenerator('init'),
|
16
|
+
});
|
17
|
+
}
|
18
|
+
function auth() {
|
19
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
20
|
+
slotName: 'auth',
|
21
|
+
fileName: 'auth-resolver-fn.template.js',
|
22
|
+
generateTemplate: templateGenerator('auth'),
|
23
|
+
});
|
24
|
+
}
|
25
|
+
function verifySessionOwner() {
|
26
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
27
|
+
slotName: 'verifySessionOwner',
|
28
|
+
fileName: 'verify-session-owner-resolver-fn.template.js',
|
29
|
+
generateTemplate: templateGenerator('verify-session-owner'),
|
30
|
+
dataSource: (config) => config.dataSources.conversationTableDataSource,
|
31
|
+
substitutions: () => ({
|
32
|
+
CONVERSATION_ID_PARENT: 'ctx.args.input',
|
33
|
+
}),
|
34
|
+
});
|
35
|
+
}
|
36
|
+
function data() {
|
37
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
38
|
+
slotName: 'data',
|
39
|
+
fileName: 'assistant-mutation-resolver-fn.template.js',
|
40
|
+
generateTemplate: templateGenerator('assistant-response'),
|
41
|
+
dataSource: (config) => config.dataSources.messageTableDataSource,
|
42
|
+
substitutions: (config) => ({
|
43
|
+
CONVERSATION_MESSAGE_TYPE_NAME: config.message.model.name.value,
|
44
|
+
}),
|
45
|
+
});
|
46
|
+
}
|
47
|
+
function fieldName(config) {
|
48
|
+
return config.assistantResponseMutation.field.name.value;
|
49
|
+
}
|
50
|
+
function templateGenerator(slotName) {
|
51
|
+
return (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Mutation', slotName, fieldName);
|
52
|
+
}
|
53
|
+
//# sourceMappingURL=assistant-response-pipeline-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-pipeline-definition.js","sourceRoot":"","sources":["../../src/resolvers/assistant-response-pipeline-definition.ts"],"names":[],"mappings":";;;AACA,iFAKwC;AAK3B,QAAA,mCAAmC,GAAuB;IACrE,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,kBAAkB,EAAE,CAAC;IACpD,QAAQ,EAAE,IAAI,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;CAC5E,CAAC;AAKF,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,8BAA8B;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,8BAA8B;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,kBAAkB;IACzB,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,oBAAoB;QAC9B,QAAQ,EAAE,8CAA8C;QACxD,gBAAgB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC;QAC3D,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,2BAA2B;QACtE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;YACpB,sBAAsB,EAAE,gBAAgB;SACzC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,4CAA4C;QACtD,gBAAgB,EAAE,iBAAiB,CAAC,oBAAoB,CAAC;QACzD,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,sBAAsB;QACjE,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC1B,8BAA8B,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK;SAChE,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,SAAS,CAAC,MAA0C;IAC3D,OAAO,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC3D,CAAC;AAKD,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,IAAA,oEAAqC,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAChF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-subscription-pipeline-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/assistant-response-subscription-pipeline-definition.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,+CAA+C,EAAE,kBAK7D,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assistantResponseSubscriptionPipelineDefinition = void 0;
|
4
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
5
|
+
exports.assistantResponseSubscriptionPipelineDefinition = {
|
6
|
+
requestSlots: [],
|
7
|
+
dataSlot: data(),
|
8
|
+
responseSlots: [],
|
9
|
+
field: (config) => ({ typeName: 'Subscription', fieldName: fieldName(config) }),
|
10
|
+
};
|
11
|
+
function data() {
|
12
|
+
return (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
13
|
+
slotName: 'data',
|
14
|
+
fileName: 'assistant-messages-subscription-resolver-fn.template.js',
|
15
|
+
generateTemplate: (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Subscription', 'assistant-message', fieldName),
|
16
|
+
});
|
17
|
+
}
|
18
|
+
function fieldName(config) {
|
19
|
+
return config.assistantResponseSubscriptionField.name.value;
|
20
|
+
}
|
21
|
+
//# sourceMappingURL=assistant-response-subscription-pipeline-definition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assistant-response-subscription-pipeline-definition.js","sourceRoot":"","sources":["../../src/resolvers/assistant-response-subscription-pipeline-definition.ts"],"names":[],"mappings":";;;AACA,iFAKwC;AAK3B,QAAA,+CAA+C,GAAuB;IACjF,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,IAAI,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;CAChF,CAAC;AAKF,SAAS,IAAI;IACX,OAAO,IAAA,+DAAgC,EAAC;QACtC,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,yDAAyD;QACnE,gBAAgB,EAAE,IAAA,oEAAqC,EAAC,cAAc,EAAE,mBAAmB,EAAE,SAAS,CAAC;KACxG,CAAC,CAAC;AACL,CAAC;AAKD,SAAS,SAAS,CAAC,MAA0C;IAC3D,OAAO,MAAM,CAAC,kCAAkC,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9D,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TransformerResolver } from '@aws-amplify/graphql-transformer-core';
|
2
|
+
import { MappingTemplateProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
4
|
+
import { PipelineDefinition, ResolverFunctionDefinition } from './resolver-function-definition';
|
5
|
+
export declare const generateResolverPipeline: (pipelineDefinition: PipelineDefinition, directiveConfig: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => TransformerResolver;
|
6
|
+
export declare const generateResolverFunction: (definition: ResolverFunctionDefinition, config: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => MappingTemplateProvider;
|
7
|
+
//# sourceMappingURL=generate-resolver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/generate-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAIlH,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAQhG,eAAO,MAAM,wBAAwB,uBACf,kBAAkB,mBACrB,kCAAkC,OAC9C,0BAA0B,KAC9B,mBA0BF,CAAC;AAQF,eAAO,MAAM,wBAAwB,eACvB,0BAA0B,UAC9B,kCAAkC,OACrC,0BAA0B,KAC9B,uBAKF,CAAC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.generateResolverFunction = exports.generateResolverPipeline = void 0;
|
7
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
9
|
+
const graphql_transformer_common_1 = require("graphql-transformer-common");
|
10
|
+
const path_1 = __importDefault(require("path"));
|
11
|
+
const generateResolverPipeline = (pipelineDefinition, directiveConfig, ctx) => {
|
12
|
+
const { typeName, fieldName } = pipelineDefinition.field(directiveConfig);
|
13
|
+
const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(typeName, fieldName);
|
14
|
+
const codeMappingTemplate = (0, exports.generateResolverFunction)(pipelineDefinition.dataSlot, directiveConfig, ctx);
|
15
|
+
const dataSourceProvider = pipelineDefinition.dataSlot.dataSource(directiveConfig);
|
16
|
+
const requestSlots = pipelineDefinition.requestSlots.map((slot) => slot.slotName);
|
17
|
+
const responseSlots = pipelineDefinition.responseSlots.map((slot) => slot.slotName);
|
18
|
+
const pipelineResolver = new graphql_transformer_core_1.TransformerResolver(typeName, fieldName, resolverResourceId, { codeMappingTemplate }, requestSlots, responseSlots, dataSourceProvider, graphql_transformer_core_1.APPSYNC_JS_RUNTIME);
|
19
|
+
const resolverSlots = [...pipelineDefinition.requestSlots, ...pipelineDefinition.responseSlots];
|
20
|
+
for (const slot of resolverSlots) {
|
21
|
+
const mappingTemplate = (0, exports.generateResolverFunction)(slot, directiveConfig, ctx);
|
22
|
+
pipelineResolver.addJsFunctionToSlot(slot.slotName, mappingTemplate, slot.dataSource(directiveConfig));
|
23
|
+
}
|
24
|
+
return pipelineResolver;
|
25
|
+
};
|
26
|
+
exports.generateResolverPipeline = generateResolverPipeline;
|
27
|
+
const generateResolverFunction = (definition, config, ctx) => {
|
28
|
+
const template = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, 'templates', definition.fileName), 'utf8');
|
29
|
+
const substitutions = definition.substitutions(config, ctx);
|
30
|
+
const resolver = substituteResolverTemplateValues(template, substitutions);
|
31
|
+
return definition.generateTemplate(config, resolver);
|
32
|
+
};
|
33
|
+
exports.generateResolverFunction = generateResolverFunction;
|
34
|
+
const substituteResolverTemplateValues = (resolver, substitutions) => {
|
35
|
+
Object.entries(substitutions).forEach(([key, value]) => {
|
36
|
+
const replaced = resolver.replace(new RegExp(`\\[\\[${key}\\]\\]`, 'g'), value);
|
37
|
+
resolver = replaced;
|
38
|
+
});
|
39
|
+
return resolver;
|
40
|
+
};
|
41
|
+
//# sourceMappingURL=generate-resolver.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-resolver.js","sourceRoot":"","sources":["../../src/resolvers/generate-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,oFAAiH;AAEjH,wDAA0B;AAC1B,2EAAiE;AACjE,gDAAwB;AAUjB,MAAM,wBAAwB,GAAG,CACtC,kBAAsC,EACtC,eAAmD,EACnD,GAA+B,EACV,EAAE;IACvB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC1E,MAAM,kBAAkB,GAAG,gDAAmB,CAAC,kBAAkB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvF,MAAM,mBAAmB,GAAG,IAAA,gCAAwB,EAAC,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,CAAC,CAAC;IACxG,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IACnF,MAAM,YAAY,GAAG,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClF,MAAM,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAA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,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QAChF,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { assistantResponsePipelineDefinition } from './assistant-response-pipeline-definition';
|
2
|
+
import { assistantResponseSubscriptionPipelineDefinition } from './assistant-response-subscription-pipeline-definition';
|
3
|
+
import { generateResolverFunction, generateResolverPipeline } from './generate-resolver';
|
4
|
+
import { listMessagesInitFunctionDefinition } from './list-messages-init-resolver';
|
5
|
+
import { sendMessagePipelineDefinition } from './send-message-pipeline-definition';
|
6
|
+
export { assistantResponsePipelineDefinition, assistantResponseSubscriptionPipelineDefinition, generateResolverFunction, generateResolverPipeline, listMessagesInitFunctionDefinition, sendMessagePipelineDefinition, };
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/index.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,+CAA+C,EAAE,MAAM,uDAAuD,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EACL,mCAAmC,EACnC,+CAA+C,EAC/C,wBAAwB,EACxB,wBAAwB,EACxB,kCAAkC,EAClC,6BAA6B,GAC9B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.sendMessagePipelineDefinition = exports.listMessagesInitFunctionDefinition = exports.generateResolverPipeline = exports.generateResolverFunction = exports.assistantResponseSubscriptionPipelineDefinition = exports.assistantResponsePipelineDefinition = void 0;
|
4
|
+
const assistant_response_pipeline_definition_1 = require("./assistant-response-pipeline-definition");
|
5
|
+
Object.defineProperty(exports, "assistantResponsePipelineDefinition", { enumerable: true, get: function () { return assistant_response_pipeline_definition_1.assistantResponsePipelineDefinition; } });
|
6
|
+
const assistant_response_subscription_pipeline_definition_1 = require("./assistant-response-subscription-pipeline-definition");
|
7
|
+
Object.defineProperty(exports, "assistantResponseSubscriptionPipelineDefinition", { enumerable: true, get: function () { return assistant_response_subscription_pipeline_definition_1.assistantResponseSubscriptionPipelineDefinition; } });
|
8
|
+
const generate_resolver_1 = require("./generate-resolver");
|
9
|
+
Object.defineProperty(exports, "generateResolverFunction", { enumerable: true, get: function () { return generate_resolver_1.generateResolverFunction; } });
|
10
|
+
Object.defineProperty(exports, "generateResolverPipeline", { enumerable: true, get: function () { return generate_resolver_1.generateResolverPipeline; } });
|
11
|
+
const list_messages_init_resolver_1 = require("./list-messages-init-resolver");
|
12
|
+
Object.defineProperty(exports, "listMessagesInitFunctionDefinition", { enumerable: true, get: function () { return list_messages_init_resolver_1.listMessagesInitFunctionDefinition; } });
|
13
|
+
const send_message_pipeline_definition_1 = require("./send-message-pipeline-definition");
|
14
|
+
Object.defineProperty(exports, "sendMessagePipelineDefinition", { enumerable: true, get: function () { return send_message_pipeline_definition_1.sendMessagePipelineDefinition; } });
|
15
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":";;;AAAA,qGAA+F;AAO7F,oHAPO,4EAAmC,OAOP;AANrC,+HAAwH;AAOtH,gIAPO,qGAA+C,OAOP;AANjD,2DAAyF;AAOvF,yGAPO,4CAAwB,OAOP;AACxB,yGARiC,4CAAwB,OAQjC;AAP1B,+EAAmF;AAQjF,mHARO,gEAAkC,OAQP;AAPpC,yFAAmF;AAQjF,8GARO,gEAA6B,OAQP"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export declare const listMessageInitMappingTemplate: (config: ConversationDirectiveConfiguration) => MappingTemplateProvider;
|
1
|
+
import { ResolverFunctionDefinition } from './resolver-function-definition';
|
2
|
+
export declare const listMessagesInitFunctionDefinition: ResolverFunctionDefinition;
|
4
3
|
//# sourceMappingURL=list-messages-init-resolver.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-messages-init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"list-messages-init-resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AAMxC,eAAO,MAAM,kCAAkC,EAAE,0BAO/C,CAAC"}
|
@@ -1,16 +1,14 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
exports.listMessagesInitFunctionDefinition = void 0;
|
4
|
+
const name_values_1 = require("../graphql-types/name-values");
|
5
|
+
const resolver_function_definition_1 = require("./resolver-function-definition");
|
6
|
+
exports.listMessagesInitFunctionDefinition = (0, resolver_function_definition_1.createResolverFunctionDefinition)({
|
7
|
+
slotName: 'init',
|
8
|
+
fileName: 'list-messages-init-resolver-fn.template.js',
|
9
|
+
generateTemplate: (0, resolver_function_definition_1.createS3AssetMappingTemplateGenerator)('Query', 'list-messages-init', (config) => config.field.name.value),
|
10
|
+
substitutions: () => ({
|
11
|
+
INDEX_NAME: name_values_1.LIST_MESSAGES_INDEX_NAME,
|
12
|
+
}),
|
13
|
+
});
|
16
14
|
//# sourceMappingURL=list-messages-init-resolver.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"list-messages-init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"list-messages-init-resolver.js","sourceRoot":"","sources":["../../src/resolvers/list-messages-init-resolver.ts"],"names":[],"mappings":";;;AAAA,8DAAwE;AACxE,iFAIwC;AAM3B,QAAA,kCAAkC,GAA+B,IAAA,+DAAgC,EAAC;IAC7G,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,4CAA4C;IACtD,gBAAgB,EAAE,IAAA,oEAAqC,EAAC,OAAO,EAAE,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3H,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;QACpB,UAAU,EAAE,sCAAwB;KACrC,CAAC;CACH,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { DataSourceProvider, MappingTemplateProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ConversationDirectiveConfiguration } from '../conversation-directive-configuration';
|
3
|
+
export declare const createResolverFunctionDefinition: (definition: Optional<ResolverFunctionDefinition, 'dataSource' | 'substitutions'>) => ResolverFunctionDefinition;
|
4
|
+
export type ResolverFunctionDefinition = {
|
5
|
+
slotName: string;
|
6
|
+
fileName: string;
|
7
|
+
generateTemplate: (config: ConversationDirectiveConfiguration, code: string) => MappingTemplateProvider;
|
8
|
+
dataSource: (config: ConversationDirectiveConfiguration) => DataSourceProvider | undefined;
|
9
|
+
substitutions: (config: ConversationDirectiveConfiguration, ctx: TransformerContextProvider) => Record<string, string>;
|
10
|
+
};
|
11
|
+
export type PipelineDefinition = {
|
12
|
+
requestSlots: ResolverFunctionDefinition[];
|
13
|
+
dataSlot: ResolverFunctionDefinition;
|
14
|
+
responseSlots: ResolverFunctionDefinition[];
|
15
|
+
field: (config: ConversationDirectiveConfiguration) => {
|
16
|
+
typeName: string;
|
17
|
+
fieldName: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export declare const createS3AssetMappingTemplateGenerator: (parentName: string, slotName: string, fieldName: (config: ConversationDirectiveConfiguration) => string) => (config: ConversationDirectiveConfiguration, code: string) => import("@aws-amplify/graphql-transformer-core/lib/cdk-compat/template-asset").S3MappingJSResolverFunctionCode;
|
21
|
+
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=resolver-function-definition.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resolver-function-definition.d.ts","sourceRoot":"","sources":["../../src/resolvers/resolver-function-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACtI,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAQ7F,eAAO,MAAM,gCAAgC,eAC/B,SAAS,0BAA0B,EAAE,YAAY,GAAG,eAAe,CAAC,KAC/E,0BAMF,CAAC;AAKF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,MAAM,EAAE,kCAAkC,EAAE,IAAI,EAA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