@aws-amplify/graphql-api-construct 1.15.1-ai-streaming.1 → 1.16.0-gen2-migration-1015.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. package/.jsii +142 -69
  2. package/API.md +11 -1
  3. package/CHANGELOG.md +7 -4
  4. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  5. package/lib/amplify-graphql-api.js +1 -1
  6. package/lib/amplify-graphql-definition.js +1 -1
  7. package/lib/model-datasource-strategy-types.d.ts +19 -1
  8. package/lib/model-datasource-strategy-types.js +1 -1
  9. package/lib/sql-model-datasource-strategy.js +1 -1
  10. package/lib/types.d.ts +1 -1
  11. package/lib/types.js +1 -1
  12. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +1 -12
  13. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +2 -22
  14. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.d.ts +2 -2
  15. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.js +1 -1
  16. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.d.ts +2 -8
  17. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +34 -195
  18. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_message_history_retriever.js +3 -19
  19. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +3 -5
  20. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +5 -20
  21. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +1 -3
  22. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +7 -6
  23. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +1 -1
  24. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +2 -2
  25. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +7 -7
  26. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +2 -3
  27. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.d.ts +1 -2
  28. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/graphql_request_executor.js +2 -4
  29. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +2 -3
  30. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +2 -4
  31. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +10 -32
  32. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +1 -1
  33. package/node_modules/@aws-amplify/ai-constructs/package.json +2 -9
  34. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +4 -0
  35. package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +201 -0
  36. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +15 -14
  37. package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +1 -7
  38. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +0 -2
  39. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -1
  40. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +3 -34
  41. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -1
  42. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver-fn.template.js +1 -14
  43. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +1 -1
  44. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +0 -6
  45. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +1 -1
  46. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -1
  47. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +2 -3
  48. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -1
  49. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +0 -1
  50. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts.map +1 -1
  51. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js +0 -16
  52. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js.map +1 -1
  53. package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +12 -12
  54. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
  55. package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +201 -0
  56. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +10 -9
  57. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
  58. package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
  59. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -1
  60. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +1 -1
  61. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -1
  62. package/node_modules/@aws-amplify/graphql-directives/package.json +3 -2
  63. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
  64. package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +201 -0
  65. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +9 -8
  66. package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +4 -0
  67. package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
  68. package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +9 -8
  69. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
  70. package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +201 -0
  71. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +9 -8
  72. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -0
  73. package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +201 -0
  74. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +10 -9
  75. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +4 -0
  76. package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +201 -0
  77. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  78. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +13 -12
  79. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +17 -0
  80. package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +201 -0
  81. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
  82. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +7 -2
  83. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
  84. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  85. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  86. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  87. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
  88. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +12 -3
  89. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js.map +1 -1
  90. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts +2 -0
  91. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts.map +1 -1
  92. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js +4 -2
  93. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
  94. 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
  95. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +6 -1
  96. 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
  97. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts +7 -0
  98. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.d.ts.map +1 -0
  99. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js +205 -0
  100. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/import-table.js.map +1 -0
  101. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/.package-lock.json +13 -0
  102. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/LICENSE +47 -0
  103. 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
  104. 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
  105. 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
  106. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package-lock.json +21 -0
  107. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package.json +11 -0
  108. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +14 -10
  109. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
  110. package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +201 -0
  111. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  112. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +9 -8
  113. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +6 -0
  114. package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +201 -0
  115. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +3 -0
  116. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
  117. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -1
  118. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +7 -1
  119. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -1
  120. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -1
  121. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +7 -1
  122. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -1
  123. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +1 -0
  124. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
  125. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +1 -0
  126. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
  127. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +9 -1
  128. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
  129. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +11 -10
  130. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +4 -0
  131. package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +201 -0
  132. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  133. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +10 -9
  134. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +4 -0
  135. package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +201 -0
  136. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +10 -9
  137. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +1 -5
  138. package/node_modules/@aws-amplify/graphql-transformer/package.json +18 -18
  139. package/node_modules/@aws-amplify/graphql-transformer-core/API.md +4 -0
  140. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +11 -0
  141. package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +201 -0
  142. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +1 -1
  143. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
  144. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +3 -2
  145. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
  146. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +2 -1
  147. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
  148. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +9 -1
  149. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
  150. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +7 -6
  151. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +11 -1
  152. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +11 -0
  153. package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +201 -0
  154. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +6 -1
  155. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
  156. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
  157. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +3 -2
  158. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +10 -0
  159. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  160. package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
  161. package/node_modules/graphql-mapping-template/LICENSE +201 -0
  162. package/node_modules/graphql-mapping-template/package.json +3 -2
  163. package/node_modules/graphql-transformer-common/CHANGELOG.md +10 -0
  164. package/node_modules/graphql-transformer-common/LICENSE +201 -0
  165. package/node_modules/graphql-transformer-common/package.json +4 -3
  166. package/package.json +23 -23
  167. package/src/model-datasource-strategy-types.ts +21 -0
  168. package/src/types.ts +1 -1
  169. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.d.ts +0 -19
  170. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_streaming_response_sender.js +0 -38
  171. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.d.ts +0 -7
  172. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/executable_tool_factory.js +0 -16
  173. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/README.md +0 -4
  174. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.d.ts +0 -23
  175. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/index.js +0 -10
  176. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.d.ts +0 -22
  177. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/ai/conversation/v1.js +0 -11
  178. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.d.ts +0 -113
  179. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/index.js +0 -10
  180. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.d.ts +0 -112
  181. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/auth/v1.js +0 -30
  182. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.d.ts +0 -23
  183. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/index.js +0 -10
  184. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.d.ts +0 -22
  185. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/custom/v1.js +0 -11
  186. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.d.ts +0 -23
  187. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/index.js +0 -10
  188. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.d.ts +0 -22
  189. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/function/v1.js +0 -11
  190. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.d.ts +0 -59
  191. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/index.js +0 -12
  192. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.d.ts +0 -59
  193. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/graphql/v1.js +0 -25
  194. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.d.ts +0 -508
  195. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/index.js +0 -112
  196. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.d.ts +0 -2
  197. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/index.js +0 -18
  198. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.d.ts +0 -42
  199. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/platform/stack_metadata_schemas.js +0 -22
  200. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.d.ts +0 -28
  201. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/index.js +0 -10
  202. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.d.ts +0 -27
  203. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/stack/v1.js +0 -12
  204. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.d.ts +0 -33
  205. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/index.js +0 -10
  206. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.d.ts +0 -32
  207. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/lib/storage/v1.js +0 -33
  208. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/backend-output-schemas/package.json +0 -27
  209. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver-fn.template.js +0 -101
  210. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts +0 -4
  211. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.d.ts.map +0 -1
  212. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js +0 -25
  213. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-reduce-chunks-resolver.js.map +0 -1
  214. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver-fn.template.js +0 -121
  215. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts +0 -4
  216. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.d.ts.map +0 -1
  217. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-streaming-mutation-resolver.js +0 -25
  218. 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"}