@aws-amplify/graphql-api-construct 1.12.0-gen2-migration-0809.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (414) hide show
  1. package/.jsii +311 -227
  2. package/API.md +3 -15
  3. package/CHANGELOG.md +25 -3
  4. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  5. package/lib/amplify-graphql-api.js +5 -12
  6. package/lib/amplify-graphql-definition.js +1 -1
  7. package/lib/internal/default-parameters.js +1 -2
  8. package/lib/model-datasource-strategy-types.d.ts +1 -19
  9. package/lib/model-datasource-strategy-types.js +1 -1
  10. package/lib/sql-model-datasource-strategy.js +1 -1
  11. package/lib/types.d.ts +5 -28
  12. package/lib/types.js +1 -1
  13. package/node_modules/@aws-amplify/ai-constructs/README.md +66 -0
  14. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +28 -0
  15. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +74 -0
  16. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.d.ts +3 -0
  17. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.js +6 -0
  18. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.d.ts +30 -0
  19. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +191 -0
  20. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +30 -0
  21. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +47 -0
  22. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +18 -0
  23. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +66 -0
  24. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +8 -0
  25. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.js +10 -0
  26. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.d.ts +15 -0
  27. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +32 -0
  28. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.d.ts +9 -0
  29. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.js +44 -0
  30. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +22 -0
  31. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +48 -0
  32. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.d.ts +3 -0
  33. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.js +6 -0
  34. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.d.ts +3 -0
  35. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.js +3 -0
  36. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +4 -0
  37. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +6 -0
  38. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +61 -0
  39. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +3 -0
  40. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.d.ts +5 -0
  41. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.js +11 -0
  42. package/node_modules/@aws-amplify/ai-constructs/lib/index.d.ts +3 -0
  43. package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.d.ts +4 -0
  44. package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.js +34 -0
  45. package/node_modules/@aws-amplify/ai-constructs/lib/index.js +29 -0
  46. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/README.md +9 -0
  47. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.d.ts +4 -0
  48. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.js +3 -0
  49. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.d.ts +66 -0
  50. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.js +3 -0
  51. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.d.ts +5 -0
  52. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.js +3 -0
  53. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.d.ts +56 -0
  54. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.js +3 -0
  55. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.d.ts +6 -0
  56. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.js +3 -0
  57. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.d.ts +22 -0
  58. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.js +3 -0
  59. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.d.ts +8 -0
  60. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.js +3 -0
  61. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.d.ts +7 -0
  62. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.js +3 -0
  63. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.d.ts +35 -0
  64. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.js +3 -0
  65. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.d.ts +24 -0
  66. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.js +3 -0
  67. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.d.ts +17 -0
  68. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.js +3 -0
  69. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.d.ts +8 -0
  70. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.js +3 -0
  71. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.d.ts +8 -0
  72. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.js +3 -0
  73. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.d.ts +14 -0
  74. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.js +3 -0
  75. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.d.ts +23 -0
  76. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.js +39 -0
  77. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.d.ts +11 -0
  78. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.js +3 -0
  79. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.d.ts +10 -0
  80. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.js +3 -0
  81. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.d.ts +16 -0
  82. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.js +3 -0
  83. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.d.ts +27 -0
  84. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.js +3 -0
  85. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.d.ts +10 -0
  86. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.js +3 -0
  87. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.d.ts +10 -0
  88. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.js +3 -0
  89. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.d.ts +5 -0
  90. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.js +3 -0
  91. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.d.ts +4 -0
  92. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.js +3 -0
  93. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/package.json +24 -0
  94. package/node_modules/@aws-amplify/ai-constructs/package.json +37 -0
  95. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +19 -1
  96. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
  97. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +6 -1
  98. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
  99. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +26 -20
  100. package/node_modules/@aws-amplify/graphql-conversation-transformer/API.md +33 -0
  101. package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +10 -0
  102. package/node_modules/@aws-amplify/graphql-conversation-transformer/LICENSE +201 -0
  103. package/node_modules/@aws-amplify/graphql-conversation-transformer/README.md +145 -0
  104. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +13 -0
  105. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -0
  106. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +111 -0
  107. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -0
  108. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts +10 -0
  109. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts.map +1 -0
  110. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js +81 -0
  111. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js.map +1 -0
  112. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts +39 -0
  113. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts.map +1 -0
  114. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js +35 -0
  115. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js.map +1 -0
  116. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts +2 -0
  117. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts.map +1 -0
  118. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js +6 -0
  119. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js.map +1 -0
  120. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts +3 -0
  121. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts.map +1 -0
  122. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js +62 -0
  123. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js.map +1 -0
  124. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts +3 -0
  125. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +1 -0
  126. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +77 -0
  127. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +1 -0
  128. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts +3 -0
  129. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts.map +1 -0
  130. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js +57 -0
  131. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js.map +1 -0
  132. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +3 -0
  133. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +1 -0
  134. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +34 -0
  135. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +1 -0
  136. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +5 -0
  137. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +1 -0
  138. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +104 -0
  139. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +1 -0
  140. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts +6 -0
  141. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts.map +1 -0
  142. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js +3 -0
  143. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js.map +1 -0
  144. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts +3 -0
  145. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts.map +1 -0
  146. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js +59 -0
  147. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js.map +1 -0
  148. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +3 -0
  149. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +1 -0
  150. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +50 -0
  151. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +1 -0
  152. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +3 -0
  153. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +1 -0
  154. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +45 -0
  155. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +1 -0
  156. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts +12 -0
  157. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts.map +1 -0
  158. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js +68 -0
  159. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js.map +1 -0
  160. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts +15 -0
  161. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -0
  162. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +44 -0
  163. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -0
  164. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +20 -0
  165. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts.map +1 -0
  166. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js +184 -0
  167. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js.map +1 -0
  168. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
  169. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
  170. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js +81 -0
  171. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
  172. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts +25 -0
  173. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts.map +1 -0
  174. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js +116 -0
  175. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js.map +1 -0
  176. package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +82 -0
  177. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +17 -1
  178. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +19 -13
  179. package/node_modules/@aws-amplify/graphql-directives/API.md +6 -0
  180. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +10 -2
  181. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -1
  182. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +1 -1
  183. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -1
  184. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts +3 -0
  185. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts.map +1 -0
  186. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js +31 -0
  187. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js.map +1 -0
  188. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts +3 -0
  189. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts.map +1 -0
  190. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js +24 -0
  191. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js.map +1 -0
  192. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +2 -0
  193. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -1
  194. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +5 -1
  195. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -1
  196. package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -1
  197. package/node_modules/@aws-amplify/graphql-directives/lib/index.js +2 -0
  198. package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -1
  199. package/node_modules/@aws-amplify/graphql-directives/package.json +12 -6
  200. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +13 -1
  201. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +16 -12
  202. package/node_modules/@aws-amplify/graphql-generation-transformer/API.md +26 -0
  203. package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +11 -0
  204. package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
  205. package/node_modules/@aws-amplify/graphql-generation-transformer/README.md +85 -0
  206. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts +32 -0
  207. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts.map +1 -0
  208. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js +119 -0
  209. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js.map +1 -0
  210. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts +2 -0
  211. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts.map +1 -0
  212. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js +6 -0
  213. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js.map +1 -0
  214. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts +7 -0
  215. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts.map +1 -0
  216. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js +72 -0
  217. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js.map +1 -0
  218. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
  219. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
  220. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js +78 -0
  221. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
  222. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts +27 -0
  223. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts.map +1 -0
  224. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js +31 -0
  225. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js.map +1 -0
  226. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts +4 -0
  227. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts.map +1 -0
  228. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js +29 -0
  229. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js.map +1 -0
  230. package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +78 -0
  231. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +13 -1
  232. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +16 -12
  233. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +17 -1
  234. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +17 -13
  235. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +17 -1
  236. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  237. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +20 -16
  238. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +15 -7
  239. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
  240. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +2 -47
  241. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
  242. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  243. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  244. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  245. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +2 -2
  246. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
  247. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +22 -4
  248. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js.map +1 -1
  249. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
  250. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +3 -12
  251. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js.map +1 -1
  252. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts +0 -2
  253. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts.map +1 -1
  254. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js +2 -4
  255. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
  256. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts +0 -3
  257. 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
  258. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +1 -111
  259. 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
  260. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.d.ts.map +1 -1
  261. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js +1 -3
  262. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js.map +1 -1
  263. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts +0 -1
  264. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
  265. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +0 -3
  266. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
  267. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +2 -2
  268. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
  269. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +18 -16
  270. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +19 -1
  271. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
  272. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +3 -0
  273. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
  274. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  275. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +16 -12
  276. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +23 -3
  277. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
  278. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +12 -13
  279. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
  280. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
  281. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +13 -11
  282. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
  283. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.d.ts.map +1 -1
  284. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +13 -11
  285. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
  286. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
  287. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +7 -0
  288. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
  289. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -1
  290. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +1 -7
  291. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -1
  292. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -1
  293. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +1 -7
  294. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -1
  295. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +0 -1
  296. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
  297. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +0 -1
  298. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
  299. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +8 -10
  300. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
  301. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +18 -14
  302. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +23 -1
  303. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
  304. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +3 -0
  305. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
  306. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  307. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +21 -15
  308. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +17 -1
  309. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +17 -13
  310. package/node_modules/@aws-amplify/graphql-transformer/API.md +0 -1
  311. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +23 -2
  312. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +0 -1
  313. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
  314. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +11 -6
  315. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
  316. package/node_modules/@aws-amplify/graphql-transformer/package.json +31 -22
  317. package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +11 -8
  318. package/node_modules/@aws-amplify/graphql-transformer-core/API.md +54 -7
  319. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +14 -3
  320. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts +2 -1
  321. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts.map +1 -1
  322. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js +3 -9
  323. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js.map +1 -1
  324. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +5 -11
  325. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
  326. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +6 -31
  327. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
  328. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +2 -1
  329. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
  330. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +8 -3
  331. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
  332. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts +3 -3
  333. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts.map +1 -1
  334. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js +12 -16
  335. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js.map +1 -1
  336. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts +6 -2
  337. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts.map +1 -1
  338. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js +71 -23
  339. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js.map +1 -1
  340. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.d.ts.map +1 -1
  341. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js +0 -1
  342. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js.map +1 -1
  343. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts +20 -0
  344. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts.map +1 -0
  345. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js +89 -0
  346. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js.map +1 -0
  347. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts +4 -0
  348. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts.map +1 -0
  349. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js +10 -0
  350. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js.map +1 -0
  351. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts +21 -0
  352. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts.map +1 -0
  353. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js +3 -0
  354. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js.map +1 -0
  355. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts +4 -0
  356. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts.map +1 -0
  357. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js +44 -0
  358. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js.map +1 -0
  359. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts +21 -0
  360. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts.map +1 -0
  361. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js +27 -0
  362. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js.map +1 -0
  363. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -2
  364. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
  365. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +1 -9
  366. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
  367. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +18 -12
  368. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +12 -23
  369. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +14 -3
  370. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts +3 -4
  371. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts.map +1 -1
  372. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.js.map +1 -1
  373. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts +1 -1
  374. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts.map +1 -1
  375. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js.map +1 -1
  376. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +1 -6
  377. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
  378. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
  379. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts +4 -4
  380. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts.map +1 -1
  381. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
  382. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
  383. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts +0 -1
  384. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts.map +1 -1
  385. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +13 -6
  386. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/graphql-api-provider.ts +3 -10
  387. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts +0 -1
  388. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +0 -10
  389. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transform-host-provider.ts +5 -1
  390. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +1 -0
  391. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transform-parameters.ts +0 -3
  392. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  393. package/node_modules/graphql-mapping-template/CHANGELOG.md +12 -0
  394. package/node_modules/graphql-mapping-template/LICENSE +201 -0
  395. package/node_modules/graphql-mapping-template/package.json +13 -5
  396. package/node_modules/graphql-transformer-common/API.md +0 -1
  397. package/node_modules/graphql-transformer-common/CHANGELOG.md +9 -3
  398. package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts +0 -1
  399. package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts.map +1 -1
  400. package/node_modules/graphql-transformer-common/lib/ResourceConstants.js +0 -1
  401. package/node_modules/graphql-transformer-common/lib/ResourceConstants.js.map +1 -1
  402. package/node_modules/graphql-transformer-common/package.json +13 -6
  403. package/package.json +40 -29
  404. package/src/amplify-graphql-api.ts +3 -11
  405. package/src/internal/default-parameters.ts +0 -1
  406. package/src/model-datasource-strategy-types.ts +0 -21
  407. package/src/types.ts +5 -29
  408. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/.package-lock.json +0 -13
  409. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/node_modules/lodash.isequal/LICENSE +0 -47
  410. 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
  411. 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
  412. 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
  413. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package-lock.json +0 -21
  414. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/package.json +0 -11
@@ -0,0 +1,15 @@
1
+ import { TransformerPrepareStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { ModelTransformer } from '@aws-amplify/graphql-model-transformer';
3
+ import { BelongsToTransformer, HasManyTransformer } from '@aws-amplify/graphql-relational-transformer';
4
+ import { TransformerAuthProvider } from '@aws-amplify/graphql-transformer-interfaces';
5
+ import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
6
+ export declare class ConversationPrepareHandler {
7
+ private modelTransformer;
8
+ private hasManyTransformer;
9
+ private belongsToTransformer;
10
+ private authProvider;
11
+ constructor(modelTransformer: ModelTransformer, hasManyTransformer: HasManyTransformer, belongsToTransformer: BelongsToTransformer, authProvider: TransformerAuthProvider);
12
+ prepare(ctx: TransformerPrepareStepContextProvider, directives: ConversationDirectiveConfiguration[]): void;
13
+ private prepareResourcesForDirective;
14
+ }
15
+ //# sourceMappingURL=conversation-prepare-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-prepare-handler.d.ts","sourceRoot":"","sources":["../../src/transformer-steps/conversation-prepare-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAOzF,qBAAa,0BAA0B;IACrC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,YAAY,CAA0B;gBAU5C,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,YAAY,EAAE,uBAAuB;IAmBvC,OAAO,CAAC,GAAG,EAAE,qCAAqC,EAAE,UAAU,EAAE,kCAAkC,EAAE,GAAG,IAAI;IAkB3G,OAAO,CAAC,4BAA4B;CA+DrC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationPrepareHandler = void 0;
4
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
+ class ConversationPrepareHandler {
6
+ constructor(modelTransformer, hasManyTransformer, belongsToTransformer, authProvider) {
7
+ this.modelTransformer = modelTransformer;
8
+ this.hasManyTransformer = hasManyTransformer;
9
+ this.belongsToTransformer = belongsToTransformer;
10
+ this.authProvider = authProvider;
11
+ }
12
+ prepare(ctx, directives) {
13
+ for (const directive of directives) {
14
+ this.prepareResourcesForDirective(directive, ctx);
15
+ }
16
+ }
17
+ prepareResourcesForDirective(directive, ctx) {
18
+ const { conversationAuthDirective, conversationModelDirective, conversationHasManyMessagesDirective, conversationMessagesField, conversationModel, } = directive.conversationModel;
19
+ const { messageAuthDirective, messageModelDirective, messageBelongsToConversationDirective, messageConversationField, messageModel, messageSubscription, assistantMutationField, assistantMutationInput, } = directive.messageModel;
20
+ const sessionModelName = conversationModel.name.value;
21
+ const messageModelName = messageModel.name.value;
22
+ ctx.output.addInput(assistantMutationInput);
23
+ ctx.output.addMutationFields([assistantMutationField]);
24
+ ctx.output.addSubscriptionFields([messageSubscription]);
25
+ ctx.output.addObject(conversationModel);
26
+ ctx.output.addObject(messageModel);
27
+ ctx.providerRegistry.registerDataSourceProvider(conversationModel, this.modelTransformer);
28
+ ctx.providerRegistry.registerDataSourceProvider(messageModel, this.modelTransformer);
29
+ ctx.dataSourceStrategies[sessionModelName] = graphql_transformer_core_1.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY;
30
+ ctx.dataSourceStrategies[messageModelName] = graphql_transformer_core_1.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY;
31
+ this.modelTransformer.object(conversationModel, conversationModelDirective, ctx);
32
+ this.modelTransformer.object(messageModel, messageModelDirective, ctx);
33
+ this.modelTransformer.before(ctx);
34
+ this.belongsToTransformer.field(messageModel, messageConversationField, messageBelongsToConversationDirective, ctx);
35
+ this.hasManyTransformer.field(conversationModel, conversationMessagesField, conversationHasManyMessagesDirective, ctx);
36
+ if (!this.authProvider.object) {
37
+ throw new graphql_transformer_core_1.InvalidTransformerError('No authentication provider found.');
38
+ }
39
+ this.authProvider.object(conversationModel, conversationAuthDirective, ctx);
40
+ this.authProvider.object(messageModel, messageAuthDirective, ctx);
41
+ }
42
+ }
43
+ exports.ConversationPrepareHandler = ConversationPrepareHandler;
44
+ //# sourceMappingURL=conversation-prepare-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-prepare-handler.js","sourceRoot":"","sources":["../../src/transformer-steps/conversation-prepare-handler.ts"],"names":[],"mappings":";;;AAIA,oFAAyH;AAQzH,MAAa,0BAA0B;IAarC,YACE,gBAAkC,EAClC,kBAAsC,EACtC,oBAA0C,EAC1C,YAAqC;QAErC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAaD,OAAO,CAAC,GAA0C,EAAE,UAAgD;QAClG,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,CAAC,4BAA4B,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;SACnD;IACH,CAAC;IAcO,4BAA4B,CAAC,SAA6C,EAAE,GAA0C;QAI5H,MAAM,EACJ,yBAAyB,EACzB,0BAA0B,EAC1B,oCAAoC,EACpC,yBAAyB,EACzB,iBAAiB,GAClB,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAGhC,MAAM,EACJ,oBAAoB,EACpB,qBAAqB,EACrB,qCAAqC,EACrC,wBAAwB,EACxB,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,GAAG,SAAS,CAAC,YAAY,CAAC;QAG3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G,CAAC,CAAC;QAGvH,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YAC7B,MAAM,IAAI,kDAAuB,CAAC,mCAAmC,CAAC,CAAC;SACxE;QACD,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAC;QAC5E,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACpE,CAAC;CACF;AArHD,gEAqHC"}
@@ -0,0 +1,20 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { ConversationDirectiveConfiguration } from '../grapqhl-conversation-transformer';
3
+ export declare class ConversationResolverGenerator {
4
+ generateResolvers(directives: ConversationDirectiveConfiguration[], ctx: TransformerContextProvider): void;
5
+ private processToolsForDirective;
6
+ private generateResolversForDirective;
7
+ private createFunctionStack;
8
+ private setupFunctionDataSource;
9
+ private setupExistingFunctionDataSource;
10
+ private lambdaArnResource;
11
+ private setupDefaultConversationHandler;
12
+ private createConversationPipelineResolver;
13
+ private addPipelineResolverFunctions;
14
+ private createAssistantResponseResolver;
15
+ private createAssistantResponseSubscriptionResolver;
16
+ private addLambdaDataSource;
17
+ private setupMessageTableIndex;
18
+ private addGlobalSecondaryIndex;
19
+ }
20
+ //# sourceMappingURL=conversation-resolver-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-resolver-generator.d.ts","sourceRoot":"","sources":["../../src/transformer-steps/conversation-resolver-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAyBzF,qBAAa,6BAA6B;IACxC,iBAAiB,CAAC,UAAU,EAAE,kCAAkC,EAAE,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IAO1G,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,6BAA6B;IA0BrC,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,+BAA+B;IAiBvC,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,+BAA+B;IAgCvC,OAAO,CAAC,kCAAkC;IAmC1C,OAAO,CAAC,4BAA4B;IAyDpC,OAAO,CAAC,+BAA+B;IA+BvC,OAAO,CAAC,2CAA2C;IAgCnD,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,sBAAsB;IAsB9B,OAAO,CAAC,uBAAuB;CAgChC"}
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ConversationResolverGenerator = void 0;
27
+ const tools_1 = require("../utils/tools");
28
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
29
+ const graphql_transformer_common_1 = require("graphql-transformer-common");
30
+ const cdk = __importStar(require("aws-cdk-lib"));
31
+ const ai_constructs_1 = require("@aws-amplify/ai-constructs");
32
+ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
33
+ const graphql_transformer_core_2 = require("@aws-amplify/graphql-transformer-core");
34
+ const init_resolver_1 = require("../resolvers/init-resolver");
35
+ const auth_resolver_1 = require("../resolvers/auth-resolver");
36
+ const verify_session_owner_resolver_1 = require("../resolvers/verify-session-owner-resolver");
37
+ const write_message_to_table_resolver_1 = require("../resolvers/write-message-to-table-resolver");
38
+ const message_history_resolver_1 = require("../resolvers/message-history-resolver");
39
+ const invoke_lambda_resolver_1 = require("../resolvers/invoke-lambda-resolver");
40
+ const assistant_mutation_resolver_1 = require("../resolvers/assistant-mutation-resolver");
41
+ const assistant_messages_subscription_resolver_1 = require("../resolvers/assistant-messages-subscription-resolver");
42
+ const graphql_index_transformer_1 = require("@aws-amplify/graphql-index-transformer");
43
+ class ConversationResolverGenerator {
44
+ generateResolvers(directives, ctx) {
45
+ for (const directive of directives) {
46
+ this.processToolsForDirective(directive, ctx);
47
+ this.generateResolversForDirective(directive, ctx);
48
+ }
49
+ }
50
+ processToolsForDirective(directive, ctx) {
51
+ const tools = (0, tools_1.processTools)(directive.tools, ctx);
52
+ if (tools) {
53
+ directive.toolSpec = tools;
54
+ }
55
+ }
56
+ generateResolversForDirective(directive, ctx) {
57
+ const { parent, field } = directive;
58
+ const parentName = parent.name.value;
59
+ const capitalizedFieldName = (0, graphql_transformer_common_1.toUpper)(field.name.value);
60
+ const fieldName = field.name.value;
61
+ const functionStack = this.createFunctionStack(ctx, capitalizedFieldName);
62
+ const { functionDataSourceId, referencedFunction } = this.setupFunctionDataSource(directive, functionStack, capitalizedFieldName);
63
+ this.createAssistantResponseResolver(ctx, directive, capitalizedFieldName);
64
+ this.createAssistantResponseSubscriptionResolver(ctx, capitalizedFieldName);
65
+ const functionDataSource = this.addLambdaDataSource(ctx, functionDataSourceId, referencedFunction, capitalizedFieldName);
66
+ const invokeLambdaFunction = (0, invoke_lambda_resolver_1.invokeLambdaMappingTemplate)(directive, ctx);
67
+ this.setupMessageTableIndex(ctx, directive);
68
+ this.createConversationPipelineResolver(ctx, parentName, fieldName, capitalizedFieldName, functionDataSource, invokeLambdaFunction);
69
+ }
70
+ createFunctionStack(ctx, capitalizedFieldName) {
71
+ return ctx.stackManager.createStack(`${capitalizedFieldName}ConversationDirectiveLambdaStack`);
72
+ }
73
+ setupFunctionDataSource(directive, functionStack, capitalizedFieldName) {
74
+ if (directive.functionName) {
75
+ return this.setupExistingFunctionDataSource(directive.functionName, functionStack);
76
+ }
77
+ else {
78
+ return this.setupDefaultConversationHandler(functionStack, capitalizedFieldName, directive.aiModel);
79
+ }
80
+ }
81
+ setupExistingFunctionDataSource(functionName, functionStack) {
82
+ const functionDataSourceId = graphql_transformer_common_1.FunctionResourceIDs.FunctionDataSourceID(functionName);
83
+ const referencedFunction = aws_lambda_1.Function.fromFunctionAttributes(functionStack, `${functionDataSourceId}Function`, {
84
+ functionArn: this.lambdaArnResource(functionName),
85
+ });
86
+ return { functionDataSourceId, referencedFunction };
87
+ }
88
+ lambdaArnResource(name) {
89
+ return cdk.Fn.sub('arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${name}', { name });
90
+ }
91
+ setupDefaultConversationHandler(functionStack, capitalizedFieldName, aiModel) {
92
+ const defaultConversationHandler = new ai_constructs_1.conversation.ConversationHandlerFunction(functionStack, `${capitalizedFieldName}DefaultConversationHandler`, {
93
+ models: [
94
+ {
95
+ modelId: aiModel,
96
+ },
97
+ ],
98
+ });
99
+ const functionDataSourceId = graphql_transformer_common_1.FunctionResourceIDs.FunctionDataSourceID(`${capitalizedFieldName}DefaultConversationHandler`);
100
+ const referencedFunction = defaultConversationHandler.resources.lambda;
101
+ return { functionDataSourceId, referencedFunction };
102
+ }
103
+ createConversationPipelineResolver(ctx, parentName, fieldName, capitalizedFieldName, functionDataSource, invokeLambdaFunction) {
104
+ const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(parentName, fieldName);
105
+ const runtime = { name: 'APPSYNC_JS', runtimeVersion: '1.0.0' };
106
+ const conversationPipelineResolver = new graphql_transformer_core_1.TransformerResolver(parentName, fieldName, resolverResourceId, invokeLambdaFunction.req, invokeLambdaFunction.res, ['init', 'auth', 'verifySessionOwner', 'writeMessageToTable', 'retrieveMessageHistory'], ['handleLambdaResponse', 'finish'], functionDataSource, runtime);
107
+ this.addPipelineResolverFunctions(ctx, conversationPipelineResolver, capitalizedFieldName, runtime);
108
+ ctx.resolvers.addResolver(parentName, fieldName, conversationPipelineResolver);
109
+ }
110
+ addPipelineResolverFunctions(ctx, resolver, capitalizedFieldName, runtime) {
111
+ const initFunction = (0, init_resolver_1.initMappingTemplate)();
112
+ resolver.addToSlot('init', initFunction.req, initFunction.res, undefined, runtime);
113
+ const authFunction = (0, auth_resolver_1.authMappingTemplate)();
114
+ resolver.addToSlot('auth', authFunction.req, authFunction.res, undefined, runtime);
115
+ const verifySessionOwnerFunction = (0, verify_session_owner_resolver_1.verifySessionOwnerMappingTemplate)();
116
+ const sessionModelName = `Conversation${capitalizedFieldName}`;
117
+ const sessionModelDDBDataSourceName = (0, graphql_transformer_core_2.getModelDataSourceNameForTypeName)(ctx, sessionModelName);
118
+ const conversationSessionDDBDataSource = ctx.api.host.getDataSource(sessionModelDDBDataSourceName);
119
+ resolver.addToSlot('verifySessionOwner', verifySessionOwnerFunction.req, verifySessionOwnerFunction.res, conversationSessionDDBDataSource, runtime);
120
+ const writeMessageToTableFunction = (0, write_message_to_table_resolver_1.writeMessageToTableMappingTemplate)(capitalizedFieldName);
121
+ const messageModelName = `ConversationMessage${capitalizedFieldName}`;
122
+ const messageModelDDBDataSourceName = (0, graphql_transformer_core_2.getModelDataSourceNameForTypeName)(ctx, messageModelName);
123
+ const messageDDBDataSource = ctx.api.host.getDataSource(messageModelDDBDataSourceName);
124
+ resolver.addToSlot('writeMessageToTable', writeMessageToTableFunction.req, writeMessageToTableFunction.res, messageDDBDataSource, runtime);
125
+ const retrieveMessageHistoryFunction = (0, message_history_resolver_1.readHistoryMappingTemplate)();
126
+ resolver.addToSlot('retrieveMessageHistory', retrieveMessageHistoryFunction.req, retrieveMessageHistoryFunction.res, messageDDBDataSource, runtime);
127
+ }
128
+ createAssistantResponseResolver(ctx, directive, capitalizedFieldName) {
129
+ const assistantResponseResolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID('Mutation', directive.responseMutationName);
130
+ const assistantResponseResolverFunction = (0, assistant_mutation_resolver_1.assistantMutationResolver)();
131
+ const conversationMessageDataSourceName = (0, graphql_transformer_core_2.getModelDataSourceNameForTypeName)(ctx, `ConversationMessage${capitalizedFieldName}`);
132
+ const conversationMessageDataSource = ctx.api.host.getDataSource(conversationMessageDataSourceName);
133
+ const runtime = { name: 'APPSYNC_JS', runtimeVersion: '1.0.0' };
134
+ const assistantResponseResolver = new graphql_transformer_core_1.TransformerResolver('Mutation', directive.responseMutationName, assistantResponseResolverResourceId, assistantResponseResolverFunction.req, assistantResponseResolverFunction.res, [], [], conversationMessageDataSource, runtime);
135
+ ctx.resolvers.addResolver('Mutation', directive.responseMutationName, assistantResponseResolver);
136
+ }
137
+ createAssistantResponseSubscriptionResolver(ctx, capitalizedFieldName) {
138
+ const onAssistantResponseSubscriptionFieldName = `onCreateAssistantResponse${capitalizedFieldName}`;
139
+ const onAssistantResponseSubscriptionResolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID('Subscription', onAssistantResponseSubscriptionFieldName);
140
+ const onAssistantResponseSubscriptionResolverFunction = (0, assistant_messages_subscription_resolver_1.conversationMessageSubscriptionMappingTamplate)();
141
+ const runtime = { name: 'APPSYNC_JS', runtimeVersion: '1.0.0' };
142
+ const onAssistantResponseSubscriptionResolver = new graphql_transformer_core_1.TransformerResolver('Subscription', onAssistantResponseSubscriptionFieldName, onAssistantResponseSubscriptionResolverResourceId, onAssistantResponseSubscriptionResolverFunction.req, onAssistantResponseSubscriptionResolverFunction.res, [], [], undefined, runtime);
143
+ ctx.resolvers.addResolver('Subscription', onAssistantResponseSubscriptionFieldName, onAssistantResponseSubscriptionResolver);
144
+ }
145
+ addLambdaDataSource(ctx, functionDataSourceId, referencedFunction, capitalizedFieldName) {
146
+ const functionDataSourceScope = ctx.stackManager.getScopeFor(functionDataSourceId, `${capitalizedFieldName}ConversationDirectiveLambdaStack`);
147
+ return ctx.api.host.addLambdaDataSource(functionDataSourceId, referencedFunction, {}, functionDataSourceScope);
148
+ }
149
+ setupMessageTableIndex(ctx, directive) {
150
+ const messageModelName = directive.messageModel.messageModel.name.value;
151
+ const referenceFieldName = 'conversationId';
152
+ const messageModel = directive.messageModel.messageModel;
153
+ const conversationMessagesTable = (0, graphql_transformer_core_2.getTable)(ctx, messageModel);
154
+ const gsiPartitionKeyName = referenceFieldName;
155
+ const gsiPartitionKeyType = 'S';
156
+ const gsiSortKeyName = 'createdAt';
157
+ const gsiSortKeyType = 'S';
158
+ const indexName = 'gsi-ConversationMessage.conversationId.createdAt';
159
+ this.addGlobalSecondaryIndex(conversationMessagesTable, indexName, { name: gsiPartitionKeyName, type: gsiPartitionKeyType }, { name: gsiSortKeyName, type: gsiSortKeyType }, ctx, messageModelName);
160
+ }
161
+ addGlobalSecondaryIndex(table, indexName, partitionKey, sortKey, ctx, typeName) {
162
+ table.addGlobalSecondaryIndex({
163
+ indexName,
164
+ projectionType: 'ALL',
165
+ partitionKey,
166
+ sortKey,
167
+ readCapacity: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableReadIOPS),
168
+ writeCapacity: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS),
169
+ });
170
+ const gsi = table.globalSecondaryIndexes.find((g) => g.indexName === indexName);
171
+ const newIndex = {
172
+ indexName,
173
+ keySchema: gsi.keySchema,
174
+ projection: { projectionType: 'ALL' },
175
+ provisionedThroughput: cdk.Fn.conditionIf(graphql_transformer_common_1.ResourceConstants.CONDITIONS.ShouldUsePayPerRequestBilling, cdk.Fn.ref('AWS::NoValue'), {
176
+ ReadCapacityUnits: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableReadIOPS),
177
+ WriteCapacityUnits: cdk.Fn.ref(graphql_transformer_common_1.ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS),
178
+ }),
179
+ };
180
+ (0, graphql_index_transformer_1.overrideIndexAtCfnLevel)(ctx, typeName, table, newIndex);
181
+ }
182
+ }
183
+ exports.ConversationResolverGenerator = ConversationResolverGenerator;
184
+ //# sourceMappingURL=conversation-resolver-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-resolver-generator.js","sourceRoot":"","sources":["../../src/transformer-steps/conversation-resolver-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,0CAA8C;AAE9C,oFAA4E;AAC5E,2EAAkH;AAClH,iDAAmC;AACnC,8DAA0D;AAC1D,uDAA6D;AAC7D,oFAAoG;AACpG,8DAAiE;AACjE,8DAAiE;AACjE,8FAA+F;AAC/F,kGAAkG;AAClG,oFAAmF;AACnF,gFAAkF;AAClF,0FAAqF;AACrF,oHAAuH;AACvH,sFAAiF;AAQjF,MAAa,6BAA6B;IACxC,iBAAiB,CAAC,UAAgD,EAAE,GAA+B;QACjG,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YAC9C,IAAI,CAAC,6BAA6B,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;SACpD;IACH,CAAC;IAEO,wBAAwB,CAAC,SAA6C,EAAE,GAA+B;QAC7G,MAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACjD,IAAI,KAAK,EAAE;YACT,SAAS,CAAC,QAAQ,GAAG,K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CAAC,UAAU,CAAC,0BAA0B,CAAC;YACjF,aAAa,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,8CAAiB,CAAC,UAAU,CAAC,2BAA2B,CAAC;SACpF,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAErF,MAAM,QAAQ,GAAG;YACf,SAAS;YACT,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,UAAU,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;YACrC,qBAAqB,EAAE,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,8CAAiB,CAAC,UAAU,CAAC,6BAA6B,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;gBAChI,iBAAiB,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,8CAAiB,CAAC,UAAU,CAAC,0BAA0B,CAAC;gBACtF,kBAAkB,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,8CAAiB,CAAC,UAAU,CAAC,2BAA2B,CAAC;aACzF,CAAC;SACH,CAAC;QAEF,IAAA,mDAAuB,EAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF;AAtWD,sEAsWC"}
@@ -0,0 +1,5 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { TypeNode } from 'graphql';
3
+ import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
4
+ export declare function generateJSONSchemaFromTypeNode(typeNode: TypeNode, ctx: TransformerContextProvider, schema?: JSONSchema): JSONSchema;
5
+ //# sourceMappingURL=graphql-json-schema-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-json-schema-type.d.ts","sourceRoot":"","sources":["../../src/utils/graphql-json-schema-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAOL,QAAQ,EAET,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,UAAU,EAIX,MAAM,uCAAuC,CAAC;AAS/C,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,0BAA0B,EAC/B,MAAM,GAAE,UAAyB,GAChC,UAAU,CASZ"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateJSONSchemaFromTypeNode = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const graphql_transformer_common_1 = require("graphql-transformer-common");
6
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
7
+ function generateJSONSchemaFromTypeNode(typeNode, ctx, schema = { type: '' }) {
8
+ switch (typeNode.kind) {
9
+ case graphql_1.Kind.NAMED_TYPE:
10
+ return handleNamedType(typeNode, ctx, schema);
11
+ case graphql_1.Kind.NON_NULL_TYPE:
12
+ return handleNonNullType(typeNode, ctx, schema);
13
+ case graphql_1.Kind.LIST_TYPE:
14
+ return handleListType(typeNode, ctx, schema);
15
+ }
16
+ }
17
+ exports.generateJSONSchemaFromTypeNode = generateJSONSchemaFromTypeNode;
18
+ function handleNamedType(typeNode, ctx, schema) {
19
+ const namedTypeSchema = (0, graphql_transformer_core_1.convertNamedTypeToJSONSchema)(typeNode);
20
+ Object.assign(schema, namedTypeSchema);
21
+ if ((0, graphql_transformer_common_1.isScalar)(typeNode)) {
22
+ return schema;
23
+ }
24
+ const baseTypeName = (0, graphql_transformer_common_1.getBaseType)(typeNode);
25
+ const typeDef = ctx.output.getType(baseTypeName);
26
+ if (!typeDef) {
27
+ throw new Error(`Type ${baseTypeName} not found`);
28
+ }
29
+ schema.properties = generateJSONSchemaForDefinitionNode(typeDef, schema, ctx);
30
+ return schema;
31
+ }
32
+ const handleNonNullType = (typeNode, ctx, schema) => {
33
+ const baseType = (0, graphql_transformer_common_1.getBaseType)(typeNode);
34
+ if ((0, graphql_transformer_core_1.isDisallowedScalarType)(baseType)) {
35
+ throw new Error(`
36
+ Disallowed required field type ${baseType}.
37
+ Use one of the supported scalar types for generation routes: [${graphql_transformer_core_1.supportedScalarTypes.join(', ')}]
38
+ `);
39
+ }
40
+ return generateJSONSchemaFromTypeNode(typeNode.type, ctx, schema);
41
+ };
42
+ const handleListType = (typeNode, ctx, schema) => {
43
+ return {
44
+ type: 'array',
45
+ items: generateJSONSchemaFromTypeNode(typeNode.type, ctx, schema),
46
+ };
47
+ };
48
+ function generateJSONSchemaForDefinitionNode(def, schema, ctx) {
49
+ switch (def.kind) {
50
+ case 'InputObjectTypeDefinition':
51
+ return handleInputObjectDefinition(def, schema, ctx);
52
+ case 'EnumTypeDefinition':
53
+ return handleEnumDefinition(def);
54
+ default:
55
+ throw new Error(`Unsupported type definition: ${def.kind}`);
56
+ }
57
+ }
58
+ function handleInputObjectDefinition(def, schema, ctx) {
59
+ var _a;
60
+ const properties = (_a = def.fields) === null || _a === void 0 ? void 0 : _a.reduce((acc, field) => {
61
+ acc[field.name.value] = generateJSONSchemaFromTypeNode(field.type, ctx, { type: '' });
62
+ if (field.type.kind === graphql_1.Kind.NON_NULL_TYPE) {
63
+ schema.required = [...(schema.required || []), field.name.value];
64
+ }
65
+ return acc;
66
+ }, {});
67
+ if (!properties) {
68
+ throw new Error(`Object type ${def.name.value} has no fields`);
69
+ }
70
+ return properties;
71
+ }
72
+ function handleEnumDefinition(def) {
73
+ var _a;
74
+ return {
75
+ [def.name.value]: {
76
+ type: 'string',
77
+ enum: (_a = def.values) === null || _a === void 0 ? void 0 : _a.map((value) => value.name.value),
78
+ },
79
+ };
80
+ }
81
+ //# sourceMappingURL=graphql-json-schema-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-json-schema-type.js","sourceRoot":"","sources":["../../src/utils/graphql-json-schema-type.ts"],"names":[],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CAAC,IAAI,KAAK,cAAI,CAAC,aAAa,EAAE;YAC1C,MAAM,CAAC,QAAQ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClE;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,gBAAgB,CAAC,CAAC;KAChE;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAOD,SAAS,oBAAoB,CAAC,GAA2B;;IACvD,OAAO;QACL,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAA,GAAG,CAAC,MAAM,0CAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SACnD;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
2
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
3
+ export type ToolDefinition = {
4
+ name: string;
5
+ description: string;
6
+ };
7
+ export type Tools = {
8
+ tools: Tool[];
9
+ };
10
+ type GraphQLRequestInputDescriptor = {
11
+ selectionSet: string;
12
+ propertyTypes: Record<string, string>;
13
+ queryName: string;
14
+ };
15
+ type Tool = {
16
+ name: string;
17
+ description: string;
18
+ inputSchema: {
19
+ json: JSONSchema;
20
+ };
21
+ graphqlRequestInputDescriptor?: GraphQLRequestInputDescriptor;
22
+ };
23
+ export declare const processTools: (toolDefinitions: ToolDefinition[], ctx: TransformerContextProvider) => Tools | undefined;
24
+ export {};
25
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAKzF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC;IACF,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;CAC/D,CAAC;AAiFF,eAAO,MAAM,YAAY,oBAAqB,cAAc,EAAE,OAAO,0BAA0B,KAAG,KAAK,GAAG,SAyBzG,CAAC"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.processTools = void 0;
4
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
+ const graphql_transformer_common_1 = require("graphql-transformer-common");
6
+ const graphql_json_schema_type_1 = require("./graphql-json-schema-type");
7
+ const generateSelectionSet = (currentType, ctx, seenTypes = new Set(), fieldName = '') => {
8
+ if ((0, graphql_transformer_common_1.isScalar)(currentType)) {
9
+ return fieldName;
10
+ }
11
+ const typeName = (0, graphql_transformer_common_1.getBaseType)(currentType);
12
+ if (seenTypes.has(typeName)) {
13
+ return '';
14
+ }
15
+ const type = getObjectTypeFromName(typeName, ctx);
16
+ seenTypes.add(type.name.value);
17
+ if (!type.fields || type.fields.length === 0) {
18
+ return '';
19
+ }
20
+ const fieldSelections = type.fields
21
+ .map((field) => {
22
+ if ((0, graphql_transformer_common_1.isScalar)(field.type)) {
23
+ return field.name.value;
24
+ }
25
+ else {
26
+ const nestedSelection = generateSelectionSet(field.type, ctx, new Set(seenTypes), field.name.value);
27
+ return nestedSelection ? `${field.name.value} { ${nestedSelection} }` : '';
28
+ }
29
+ })
30
+ .filter(Boolean);
31
+ return fieldSelections.join(' ');
32
+ };
33
+ const getObjectTypeFromName = (name, ctx) => {
34
+ const node = ctx.output.getObject(name);
35
+ if (!node) {
36
+ throw new Error(`Could not find type definition for ${name}`);
37
+ }
38
+ return node;
39
+ };
40
+ const processTools = (toolDefinitions, ctx) => {
41
+ if (!toolDefinitions || toolDefinitions.length === 0) {
42
+ return undefined;
43
+ }
44
+ const queryType = ctx.output.getType('Query');
45
+ if (!queryType.fields || queryType.fields.length === 0) {
46
+ throw new graphql_transformer_core_1.InvalidDirectiveError('Tools must be queries - no queries found in the schema');
47
+ }
48
+ const tools = toolDefinitions.map((toolDefinition) => {
49
+ var _a;
50
+ const { name: toolName, description } = toolDefinition;
51
+ const queryField = (_a = queryType.fields) === null || _a === void 0 ? void 0 : _a.find((field) => field.name.value === toolName);
52
+ if (!queryField) {
53
+ throw new graphql_transformer_core_1.InvalidDirectiveError(`Tool "${toolName}" defined in @conversation directive has no matching Query field definition`);
54
+ }
55
+ return createTool(toolName, description, queryField, ctx);
56
+ });
57
+ return { tools };
58
+ };
59
+ exports.processTools = processTools;
60
+ const createTool = (toolName, description, queryField, ctx) => {
61
+ const { type: returnType, arguments: fieldArguments } = queryField;
62
+ const { properties, required } = generateToolProperties(fieldArguments, ctx, toolName, returnType);
63
+ const selectionSet = generateSelectionSet(returnType, ctx).trim();
64
+ const propertyTypes = generatePropertyTypes(fieldArguments, toolName, returnType);
65
+ const graphqlRequestInputDescriptor = {
66
+ selectionSet,
67
+ propertyTypes,
68
+ queryName: toolName,
69
+ };
70
+ return {
71
+ name: toolName,
72
+ description,
73
+ inputSchema: {
74
+ json: {
75
+ type: 'object',
76
+ properties,
77
+ required,
78
+ },
79
+ },
80
+ graphqlRequestInputDescriptor,
81
+ };
82
+ };
83
+ const generateToolProperties = (fieldArguments, ctx, toolName, returnType) => {
84
+ if (!fieldArguments || fieldArguments.length === 0) {
85
+ return { properties: {}, required: [] };
86
+ }
87
+ if (isModelListOperation(toolName, returnType)) {
88
+ return { properties: {}, required: [] };
89
+ }
90
+ return fieldArguments.reduce((acc, fieldArgument) => {
91
+ const fieldArgumentSchema = (0, graphql_json_schema_type_1.generateJSONSchemaFromTypeNode)(fieldArgument.type, ctx);
92
+ acc.properties[fieldArgument.name.value] = fieldArgumentSchema;
93
+ if (fieldArgument.type.kind === 'NonNullType') {
94
+ acc.required.push(fieldArgument.name.value);
95
+ }
96
+ return acc;
97
+ }, { properties: {}, required: [] });
98
+ };
99
+ const generatePropertyTypes = (fieldArguments, toolName, returnType) => {
100
+ if (!fieldArguments || fieldArguments.length === 0) {
101
+ return {};
102
+ }
103
+ if (isModelListOperation(toolName, returnType)) {
104
+ return {};
105
+ }
106
+ return fieldArguments.reduce((acc, fieldArgument) => {
107
+ const name = fieldArgument.name.value;
108
+ const suffix = (0, graphql_transformer_common_1.isNonNullType)(fieldArgument.type) ? '!' : '';
109
+ acc[name] = (0, graphql_transformer_common_1.getBaseType)(fieldArgument.type) + suffix;
110
+ return acc;
111
+ }, {});
112
+ };
113
+ const isModelListOperation = (toolName, responseType) => {
114
+ return (0, graphql_transformer_common_1.getBaseType)(responseType).startsWith('Model') && toolName.startsWith('list');
115
+ };
116
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":";;;AAAA,oFAA0F;AAG1F,2EAAkF;AAClF,yEAA4E;AAqC5E,MAAM,oBAAoB,GAAG,CAC3B,WAAqB,EACrB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