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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (399) hide show
  1. package/.jsii +496 -215
  2. package/API.md +3 -11
  3. package/CHANGELOG.md +39 -3
  4. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  5. package/lib/amplify-graphql-api.js +9 -10
  6. package/lib/amplify-graphql-definition.js +1 -1
  7. package/lib/model-datasource-strategy-types.d.ts +1 -19
  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 +11 -2
  11. package/lib/types.js +1 -1
  12. package/node_modules/@aws-amplify/ai-constructs/README.md +66 -0
  13. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.d.ts +28 -0
  14. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/conversation_handler_construct.js +74 -0
  15. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.d.ts +3 -0
  16. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/index.js +6 -0
  17. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.d.ts +30 -0
  18. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/bedrock_converse_adapter.js +191 -0
  19. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.d.ts +30 -0
  20. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_executor.js +47 -0
  21. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.d.ts +18 -0
  22. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/conversation_turn_response_sender.js +66 -0
  23. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.d.ts +8 -0
  24. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/default_handler.js +10 -0
  25. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.d.ts +15 -0
  26. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/event_tools_provider.js +32 -0
  27. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.d.ts +9 -0
  28. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_query_factory.js +44 -0
  29. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.d.ts +22 -0
  30. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/graphql_tool.js +48 -0
  31. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.d.ts +3 -0
  32. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/index.js +6 -0
  33. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.d.ts +3 -0
  34. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/event-tools-provider/types.js +3 -0
  35. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.d.ts +4 -0
  36. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/index.js +6 -0
  37. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.d.ts +61 -0
  38. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/runtime/types.js +3 -0
  39. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.d.ts +5 -0
  40. package/node_modules/@aws-amplify/ai-constructs/lib/conversation/test-assets/custom_handler.js +11 -0
  41. package/node_modules/@aws-amplify/ai-constructs/lib/index.d.ts +3 -0
  42. package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.d.ts +4 -0
  43. package/node_modules/@aws-amplify/ai-constructs/lib/index.internal.js +34 -0
  44. package/node_modules/@aws-amplify/ai-constructs/lib/index.js +29 -0
  45. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/README.md +9 -0
  46. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.d.ts +4 -0
  47. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/amplify_function.js +3 -0
  48. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.d.ts +66 -0
  49. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/auth_resources.js +3 -0
  50. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.d.ts +5 -0
  51. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/aws_client_provider.js +3 -0
  52. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.d.ts +56 -0
  53. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_identifier.js +3 -0
  54. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.d.ts +6 -0
  55. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_output.js +3 -0
  56. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.d.ts +22 -0
  57. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_secret_resolver.js +3 -0
  58. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.d.ts +8 -0
  59. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_creator.js +3 -0
  60. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.d.ts +7 -0
  61. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/backend_stack_resolver.js +3 -0
  62. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.d.ts +35 -0
  63. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_container.js +3 -0
  64. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.d.ts +24 -0
  65. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/construct_factory.js +3 -0
  66. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.d.ts +17 -0
  67. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deep_partial.js +3 -0
  68. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.d.ts +8 -0
  69. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/deployment_type.js +3 -0
  70. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.d.ts +8 -0
  71. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/function_resources.js +3 -0
  72. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.d.ts +14 -0
  73. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/import_path_verifier.js +3 -0
  74. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.d.ts +23 -0
  75. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/index.js +39 -0
  76. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.d.ts +11 -0
  77. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_retrieval_strategy.js +3 -0
  78. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.d.ts +10 -0
  79. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/output_storage_strategy.js +3 -0
  80. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.d.ts +16 -0
  81. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/package_manager_controller.js +3 -0
  82. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.d.ts +27 -0
  83. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_access_acceptor.js +3 -0
  84. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.d.ts +10 -0
  85. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_name_validator.js +3 -0
  86. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.d.ts +10 -0
  87. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/resource_provider.js +3 -0
  88. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.d.ts +5 -0
  89. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/ssm_environment_entries_generator.js +3 -0
  90. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.d.ts +4 -0
  91. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/lib/stable_backend_identifiers.js +3 -0
  92. package/node_modules/@aws-amplify/ai-constructs/node_modules/@aws-amplify/plugin-types/package.json +24 -0
  93. package/node_modules/@aws-amplify/ai-constructs/package.json +37 -0
  94. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +27 -1
  95. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
  96. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +6 -1
  97. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
  98. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +27 -21
  99. package/node_modules/@aws-amplify/graphql-conversation-transformer/API.md +33 -0
  100. package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +10 -0
  101. package/node_modules/@aws-amplify/graphql-conversation-transformer/LICENSE +201 -0
  102. package/node_modules/@aws-amplify/graphql-conversation-transformer/README.md +145 -0
  103. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts +13 -0
  104. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.d.ts.map +1 -0
  105. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js +111 -0
  106. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/message-model.js.map +1 -0
  107. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts +10 -0
  108. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.d.ts.map +1 -0
  109. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js +81 -0
  110. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/graphql-types/session-model.js.map +1 -0
  111. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts +39 -0
  112. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.d.ts.map +1 -0
  113. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js +35 -0
  114. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/grapqhl-conversation-transformer.js.map +1 -0
  115. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts +2 -0
  116. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.d.ts.map +1 -0
  117. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js +6 -0
  118. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/index.js.map +1 -0
  119. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts +3 -0
  120. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.d.ts.map +1 -0
  121. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js +62 -0
  122. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-messages-subscription-resolver.js.map +1 -0
  123. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts +3 -0
  124. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.d.ts.map +1 -0
  125. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js +77 -0
  126. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/assistant-mutation-resolver.js.map +1 -0
  127. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts +3 -0
  128. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.d.ts.map +1 -0
  129. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js +57 -0
  130. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/auth-resolver.js.map +1 -0
  131. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts +3 -0
  132. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.d.ts.map +1 -0
  133. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js +34 -0
  134. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/init-resolver.js.map +1 -0
  135. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts +5 -0
  136. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.d.ts.map +1 -0
  137. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js +104 -0
  138. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/invoke-lambda-resolver.js.map +1 -0
  139. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts +6 -0
  140. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.d.ts.map +1 -0
  141. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js +3 -0
  142. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/js-resolver-function-provider.js.map +1 -0
  143. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts +3 -0
  144. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.d.ts.map +1 -0
  145. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js +59 -0
  146. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/message-history-resolver.js.map +1 -0
  147. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts +3 -0
  148. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.d.ts.map +1 -0
  149. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js +50 -0
  150. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/verify-session-owner-resolver.js.map +1 -0
  151. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts +3 -0
  152. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.d.ts.map +1 -0
  153. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js +45 -0
  154. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/resolvers/write-message-to-table-resolver.js.map +1 -0
  155. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts +12 -0
  156. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.d.ts.map +1 -0
  157. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js +68 -0
  158. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-field-handler.js.map +1 -0
  159. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts +15 -0
  160. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.d.ts.map +1 -0
  161. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js +44 -0
  162. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-prepare-handler.js.map +1 -0
  163. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts +20 -0
  164. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.d.ts.map +1 -0
  165. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js +184 -0
  166. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/transformer-steps/conversation-resolver-generator.js.map +1 -0
  167. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
  168. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
  169. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js +81 -0
  170. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
  171. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts +25 -0
  172. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.d.ts.map +1 -0
  173. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js +116 -0
  174. package/node_modules/@aws-amplify/graphql-conversation-transformer/lib/utils/tools.js.map +1 -0
  175. package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +82 -0
  176. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +25 -1
  177. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +19 -13
  178. package/node_modules/@aws-amplify/graphql-directives/API.md +6 -0
  179. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +14 -0
  180. package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
  181. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts +3 -0
  182. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.d.ts.map +1 -0
  183. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js +31 -0
  184. package/node_modules/@aws-amplify/graphql-directives/lib/directives/conversation.js.map +1 -0
  185. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts +3 -0
  186. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.d.ts.map +1 -0
  187. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js +24 -0
  188. package/node_modules/@aws-amplify/graphql-directives/lib/directives/generation.js.map +1 -0
  189. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +2 -0
  190. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -1
  191. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +5 -1
  192. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -1
  193. package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -1
  194. package/node_modules/@aws-amplify/graphql-directives/lib/index.js +2 -0
  195. package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -1
  196. package/node_modules/@aws-amplify/graphql-directives/package.json +13 -6
  197. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +17 -1
  198. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +17 -13
  199. package/node_modules/@aws-amplify/graphql-generation-transformer/API.md +26 -0
  200. package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +11 -0
  201. package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
  202. package/node_modules/@aws-amplify/graphql-generation-transformer/README.md +85 -0
  203. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts +32 -0
  204. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.d.ts.map +1 -0
  205. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js +119 -0
  206. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/grapqhl-generation-transformer.js.map +1 -0
  207. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts +2 -0
  208. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.d.ts.map +1 -0
  209. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js +6 -0
  210. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/index.js.map +1 -0
  211. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts +7 -0
  212. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.d.ts.map +1 -0
  213. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js +72 -0
  214. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/resolvers/invoke-bedrock.js.map +1 -0
  215. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts +5 -0
  216. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.d.ts.map +1 -0
  217. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js +78 -0
  218. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/graphql-json-schema-type.js.map +1 -0
  219. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts +27 -0
  220. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.d.ts.map +1 -0
  221. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js +31 -0
  222. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/utils/tools.js.map +1 -0
  223. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts +4 -0
  224. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.d.ts.map +1 -0
  225. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js +29 -0
  226. package/node_modules/@aws-amplify/graphql-generation-transformer/lib/validation.js.map +1 -0
  227. package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +78 -0
  228. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +17 -1
  229. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +17 -13
  230. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +25 -1
  231. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +18 -14
  232. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +27 -1
  233. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  234. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +21 -17
  235. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +27 -4
  236. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
  237. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +2 -47
  238. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
  239. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  240. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  241. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  242. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +2 -2
  243. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
  244. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +22 -4
  245. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js.map +1 -1
  246. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.d.ts.map +1 -1
  247. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js +11 -11
  248. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamo-model-resource-generator.js.map +1 -1
  249. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts +0 -2
  250. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.d.ts.map +1 -1
  251. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js +2 -4
  252. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-dynamodb-table-construct/index.js.map +1 -1
  253. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts +10 -4
  254. 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
  255. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +91 -37
  256. 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
  257. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.d.ts +1 -1
  258. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.d.ts.map +1 -1
  259. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.js +2 -2
  260. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/cfn-response.js.map +1 -1
  261. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.d.ts.map +1 -1
  262. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js +1 -3
  263. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/dynamo-model-resource-generator.js.map +1 -1
  264. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts +0 -1
  265. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
  266. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +0 -3
  267. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
  268. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +2 -2
  269. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
  270. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +21 -16
  271. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +23 -1
  272. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
  273. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +3 -0
  274. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
  275. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  276. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +17 -13
  277. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +34 -1
  278. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
  279. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +13 -0
  280. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
  281. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
  282. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +13 -0
  283. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
  284. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.d.ts.map +1 -1
  285. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +13 -0
  286. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
  287. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
  288. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +7 -0
  289. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
  290. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +1 -1
  291. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +7 -8
  292. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +1 -1
  293. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
  294. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +7 -1
  295. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
  296. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +19 -15
  297. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +31 -1
  298. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
  299. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +3 -0
  300. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
  301. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  302. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +22 -16
  303. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +25 -1
  304. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +18 -14
  305. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +33 -2
  306. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
  307. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +8 -2
  308. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
  309. package/node_modules/@aws-amplify/graphql-transformer/package.json +32 -23
  310. package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +8 -2
  311. package/node_modules/@aws-amplify/graphql-transformer-core/API.md +54 -7
  312. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +20 -3
  313. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts +2 -1
  314. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.d.ts.map +1 -1
  315. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js +3 -9
  316. package/node_modules/@aws-amplify/graphql-transformer-core/lib/appsync-function.js.map +1 -1
  317. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +5 -11
  318. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
  319. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +6 -31
  320. package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
  321. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +2 -1
  322. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
  323. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +8 -3
  324. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
  325. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts +3 -3
  326. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.d.ts.map +1 -1
  327. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js +12 -16
  328. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transform-host.js.map +1 -1
  329. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts +6 -2
  330. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.d.ts.map +1 -1
  331. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js +71 -23
  332. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/resolver.js.map +1 -1
  333. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.d.ts.map +1 -1
  334. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js +1 -1
  335. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/transform-parameters.js.map +1 -1
  336. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts +20 -0
  337. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.d.ts.map +1 -0
  338. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js +89 -0
  339. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/graphql-scalar-json-schema-definitions.js.map +1 -0
  340. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts +4 -0
  341. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.d.ts.map +1 -0
  342. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js +10 -0
  343. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/index.js.map +1 -0
  344. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts +21 -0
  345. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.d.ts.map +1 -0
  346. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js +3 -0
  347. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/json-schema.js.map +1 -0
  348. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts +4 -0
  349. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.d.ts.map +1 -0
  350. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js +44 -0
  351. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/ai/named-type-conversion.js.map +1 -0
  352. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts +21 -0
  353. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.d.ts.map +1 -0
  354. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js +27 -0
  355. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/function-runtime.js.map +1 -0
  356. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -2
  357. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
  358. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +1 -9
  359. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
  360. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +19 -13
  361. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +13 -23
  362. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +20 -3
  363. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts +3 -4
  364. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.d.ts.map +1 -1
  365. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/graphql-api-provider.js.map +1 -1
  366. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts +1 -1
  367. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.d.ts.map +1 -1
  368. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/index.js.map +1 -1
  369. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +1 -6
  370. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
  371. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
  372. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts +4 -4
  373. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transform-host-provider.d.ts.map +1 -1
  374. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
  375. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
  376. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts +1 -1
  377. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transform-parameters.d.ts.map +1 -1
  378. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +14 -7
  379. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/graphql-api-provider.ts +3 -10
  380. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/index.ts +0 -1
  381. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +0 -10
  382. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transform-host-provider.ts +5 -1
  383. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +1 -0
  384. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transform-parameters.ts +1 -3
  385. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  386. package/node_modules/graphql-mapping-template/CHANGELOG.md +12 -0
  387. package/node_modules/graphql-mapping-template/LICENSE +201 -0
  388. package/node_modules/graphql-mapping-template/package.json +13 -5
  389. package/node_modules/graphql-transformer-common/API.md +0 -1
  390. package/node_modules/graphql-transformer-common/CHANGELOG.md +9 -3
  391. package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts +0 -1
  392. package/node_modules/graphql-transformer-common/lib/ResourceConstants.d.ts.map +1 -1
  393. package/node_modules/graphql-transformer-common/lib/ResourceConstants.js +0 -1
  394. package/node_modules/graphql-transformer-common/lib/ResourceConstants.js.map +1 -1
  395. package/node_modules/graphql-transformer-common/package.json +13 -6
  396. package/package.json +42 -31
  397. package/src/amplify-graphql-api.ts +7 -8
  398. package/src/model-datasource-strategy-types.ts +0 -21
  399. package/src/types.ts +12 -2
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createInvokeBedrockResolverFunction = void 0;
4
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
+ const ts_dedent_1 = require("ts-dedent");
6
+ const createInvokeBedrockResolverFunction = (config) => {
7
+ const req = createInvokeBedrockRequestFunction(config);
8
+ const res = createInvokeBedrockResponseFunction();
9
+ return { req, res };
10
+ };
11
+ exports.createInvokeBedrockResolverFunction = createInvokeBedrockResolverFunction;
12
+ const createInvokeBedrockRequestFunction = (config) => {
13
+ const { aiModel, toolConfig, inferenceConfiguration } = config;
14
+ const stringifiedToolConfig = JSON.stringify(toolConfig);
15
+ const stringifiedSystemPrompt = JSON.stringify(config.systemPrompt);
16
+ const inferenceConfig = getInferenceConfigResolverDefinition(inferenceConfiguration);
17
+ const requestFunctionString = `
18
+ export function request(ctx) {
19
+ const toolConfig = ${stringifiedToolConfig};
20
+ const prompt = ${stringifiedSystemPrompt};
21
+ const args = JSON.stringify(ctx.args);
22
+
23
+ return {
24
+ resourcePath: '/model/${aiModel}/converse',
25
+ method: 'POST',
26
+ params: {
27
+ headers: { 'Content-Type': 'application/json' },
28
+ body: {
29
+ messages: [{
30
+ role: 'user',
31
+ content: [{ text: args }],
32
+ }],
33
+ system: [{ text: prompt }],
34
+ toolConfig,
35
+ ${inferenceConfig}
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;
41
+ return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(requestFunctionString));
42
+ };
43
+ const createInvokeBedrockResponseFunction = () => {
44
+ const responseFunctionString = `
45
+ export function response(ctx) {
46
+ if (ctx.error) {
47
+ util.error(ctx.error.message, ctx.error.type);
48
+ }
49
+ const body = JSON.parse(ctx.result.body);
50
+ const { content } = body.output.message;
51
+
52
+ if (content.length < 1) {
53
+ util.error('No content block in assistant response.', 'error');
54
+ }
55
+
56
+ const toolUse = content[0].toolUse;
57
+ if (!toolUse) {
58
+ util.error('Missing tool use block in assistant response.', 'error');
59
+ }
60
+
61
+ const response = toolUse.input.value;
62
+ return response;
63
+ }
64
+ `;
65
+ return graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString((0, ts_dedent_1.dedent)(responseFunctionString));
66
+ };
67
+ const getInferenceConfigResolverDefinition = (inferenceConfiguration) => {
68
+ return inferenceConfiguration && Object.keys(inferenceConfiguration).length > 0
69
+ ? `inferenceConfig: ${JSON.stringify(inferenceConfiguration)},`
70
+ : '// default inference config';
71
+ };
72
+ //# sourceMappingURL=invoke-bedrock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoke-bedrock.js","sourceRoot":"","sources":["../../src/resolvers/invoke-bedrock.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AAExE,yCAAmC;AAU5B,MAAM,mCAAmC,GAAG,CACjD,MAA6C,EACmB,EAAE;IAClE,MAAM,GAAG,GAAG,kCAAkC,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,GAAG,GAAG,mCAAmC,EAAE,CAAC;IAClD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC,CAAC;AANW,QAAA,mCAAmC,uCAM9C;AAQF,MAAM,kCAAkC,GAAG,CAAC,MAA6C,EAA2B,EAAE;IACpH,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAAC;IAC/D,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACzD,MAAM,uBAAuB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAEpE,MAAM,eAAe,GAAG,oCAAoC,CAAC,sBAAsB,CAAC,CAAC;IACrF,MAAM,qBAAqB,GAAG;;yBAEP,qBAAqB;qBACzB,uBAAuB;;;;8BAId,OAAO;;;;;;;;;;;YAWzB,eAAe;;;;;CAK1B,CAAC;IAEA,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,qBAAqB,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAOF,MAAM,mCAAmC,GAAG,GAA4B,EAAE;IAExE,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBhC,CAAC;IAEA,OAAO,0CAAe,CAAC,wBAAwB,CAAC,IAAA,kBAAM,EAAC,sBAAsB,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAQF,MAAM,oCAAoC,GAAG,CAAC,sBAA+C,EAAU,EAAE;IACvG,OAAO,sBAAsB,IAAI,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,GAAG,CAAC;QAC7E,CAAC,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG;QAC/D,CAAC,CAAC,6BAA6B,CAAC;AACpC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { TypeNode } from 'graphql';
3
+ import { type JSONSchema } from '@aws-amplify/graphql-transformer-core';
4
+ export declare const 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,KAAK,UAAU,EAIhB,MAAM,uCAAuC,CAAC;AAS/C,eAAO,MAAM,8BAA8B,aAC/B,QAAQ,OACb,0BAA0B,WACvB,UAAU,KACjB,UASF,CAAC"}
@@ -0,0 +1,78 @@
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
+ const 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);
15
+ }
16
+ };
17
+ exports.generateJSONSchemaFromTypeNode = generateJSONSchemaFromTypeNode;
18
+ const 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 = generateJSONSchemaForDef(typeDef, ctx, schema);
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} without a default value.
37
+ Use one of the supported scalar types for generation routes: [${graphql_transformer_core_1.supportedScalarTypes.join(', ')}]
38
+ `);
39
+ }
40
+ return (0, exports.generateJSONSchemaFromTypeNode)(typeNode.type, ctx, schema);
41
+ };
42
+ const handleListType = (typeNode, ctx) => {
43
+ return {
44
+ type: 'array',
45
+ items: (0, exports.generateJSONSchemaFromTypeNode)(typeNode.type, ctx),
46
+ };
47
+ };
48
+ const generateJSONSchemaForDef = (def, ctx, schema) => {
49
+ switch (def.kind) {
50
+ case 'ObjectTypeDefinition':
51
+ return handleObjectTypeDefinition(def, ctx, schema);
52
+ case 'EnumTypeDefinition':
53
+ return handleEnumTypeDefinition(def);
54
+ default:
55
+ throw new Error(`Unsupported type definition: ${def.kind}`);
56
+ }
57
+ };
58
+ const handleObjectTypeDefinition = (def, ctx, schema) => {
59
+ var _a;
60
+ const properties = ((_a = def.fields) !== null && _a !== void 0 ? _a : []).reduce((acc, field) => {
61
+ acc[field.name.value] = (0, exports.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
+ return properties;
68
+ };
69
+ const handleEnumTypeDefinition = (def) => {
70
+ var _a;
71
+ return {
72
+ [def.name.value]: {
73
+ type: 'string',
74
+ enum: (_a = def.values) === null || _a === void 0 ? void 0 : _a.map((value) => value.name.value),
75
+ },
76
+ };
77
+ };
78
+ //# 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":[],"mappings":";;;AACA,qCASiB;AACjB,2EAAmE;AACnE,oFAK+C;AASxC,MAAM,8BAA8B,GAAG,CAC5C,QAAkB,EAClB,GAA+B,EAC/B,SAAqB,EAAE,IAAI,EAAE,EAAE,EAAE,EACrB,EAAE;IACd,QAAQ,QAAQ,CAAC,IAAI,EAAE;QACrB,KAAK,cAAI,CAAC,UAAU;YAClB,OAAO,eAAe,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAChD,KAAK,cAAI,CAAC,aAAa;YACrB,OAAO,iBAAiB,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAClD,KAAK,cAAI,CAAC,SAAS;YACjB,OAAO,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;KACxC;AACH,CAAC,CAAC;AAbW,QAAA,8BAA8B,kCAazC;AASF,MAAM,eAAe,GAAG,CAAC,QAAuB,EAAE,GAA+B,EAAE,MAAkB,EAAc,EAAE;IACnH,MAAM,eAAe,GAAG,IAAA,uDAA4B,EAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEvC,IAAI,IAAA,qCAAQ,EAAC,QAAQ,CAAC,EAAE;QACtB,OAAO,MAAM,CAAC;KACf;IAED,MAAM,YAAY,GAAG,IAAA,wCAAW,EAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,QAAQ,YAAY,YAAY,CAAC,CAAC;KACnD;IAED,MAAM,CAAC,UAAU,GAAG,wBAAwB,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAUF,MAAM,iBAAiB,GAAG,CAAC,QAAyB,EAAE,GAA+B,EAAE,MAAkB,EAAc,EAAE;IACvH,MAAM,QAAQ,GAAG,IAAA,wCAAW,EAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,IAAA,iDAAsB,EAAC,QAAQ,CAAC,EAAE;QACpC,MAAM,IAAI,KAAK,CAAC;uCACmB,QAAQ;sEACuB,+CAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;KAChG,CAAC,CAAC;KACJ;IACD,OAAO,IAAA,sCAA8B,EAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACpE,CAAC,CAAC;AAQF,MAAM,cAAc,GAAG,CAAC,QAAsB,EAAE,GAA+B,EAAc,EAAE;IAC7F,OAAO;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAA,sCAA8B,EAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;KAC1D,CAAC;AACJ,CAAC,CAAC;AAUF,MAAM,wBAAwB,GAAG,CAC/B,GAA6B,EAC7B,GAA+B,EAC/B,MAAkB,EACU,EAAE;IAC9B,QAAQ,GAAG,CAAC,IAAI,EAAE;QAChB,KAAK,sBAAsB;YACzB,OAAO,0BAA0B,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACtD,KAAK,oBAAoB;YACvB,OAAO,wBAAwB,CAAC,GAAG,CAAC,CAAC;QACvC;YACE,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC;AAUF,MAAM,0BAA0B,GAAG,CACjC,GAA6B,EAC7B,GAA+B,EAC/B,MAAkB,EACU,EAAE;;IAC9B,MAAM,UAAU,GAAG,CAAC,MAAA,GAAG,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAA+B,EAAE,KAAK,EAAE,EAAE;QACtF,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAA,sCAA8B,EAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAGtF,IAAI,KAAK,CAAC,IAAI,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;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAOF,MAAM,wBAAwB,GAAG,CAAC,GAA2B,EAA8B,EAAE;;IAC3F,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,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { FieldDefinitionNode } from 'graphql';
3
+ import { JSONSchema } from '@aws-amplify/graphql-transformer-core';
4
+ export type Tool = {
5
+ toolSpec: ToolSpec;
6
+ };
7
+ export type Tools = {
8
+ tools: Tool[];
9
+ };
10
+ export type ToolConfig = {
11
+ tools: Tool[];
12
+ toolChoice: {
13
+ tool: {
14
+ name: string;
15
+ };
16
+ };
17
+ };
18
+ type ToolSpec = {
19
+ name: string;
20
+ description: string;
21
+ inputSchema: {
22
+ json: JSONSchema;
23
+ };
24
+ };
25
+ export declare const createResponseTypeTool: (field: FieldDefinitionNode, ctx: TransformerContextProvider) => ToolConfig;
26
+ export {};
27
+ //# 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,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,MAAM,MAAM,IAAI,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,CAAC;CACH,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,UAAU,CAAC;KAClB,CAAC;CACH,CAAC;AAiBF,eAAO,MAAM,sBAAsB,UAAW,mBAAmB,OAAO,0BAA0B,KAAG,UA4BpG,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createResponseTypeTool = void 0;
4
+ const graphql_json_schema_type_1 = require("./graphql-json-schema-type");
5
+ const createResponseTypeTool = (field, ctx) => {
6
+ const { type } = field;
7
+ const schema = (0, graphql_json_schema_type_1.generateJSONSchemaFromTypeNode)(type, ctx);
8
+ const boxedSchema = {
9
+ type: 'object',
10
+ properties: {
11
+ value: schema,
12
+ },
13
+ required: ['value'],
14
+ };
15
+ const tools = [
16
+ {
17
+ toolSpec: {
18
+ name: 'responseType',
19
+ description: 'Generate a response type for the given field',
20
+ inputSchema: {
21
+ json: boxedSchema,
22
+ },
23
+ },
24
+ },
25
+ ];
26
+ const toolChoice = { tool: { name: 'responseType' } };
27
+ const toolConfig = { tools, toolChoice };
28
+ return toolConfig;
29
+ };
30
+ exports.createResponseTypeTool = createResponseTypeTool;
31
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":";;;AAEA,yEAA4E;AA2CrE,MAAM,sBAAsB,GAAG,CAAC,KAA0B,EAAE,GAA+B,EAAc,EAAE;IAChH,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,MAAM,GAAG,IAAA,yDAA8B,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAIzD,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE,MAAM;SACd;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB,CAAC;IACF,MAAM,KAAK,GAAW;QACpB;YACE,QAAQ,EAAE;gBACR,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,8CAA8C;gBAC3D,WAAW,EAAE;oBACX,IAAI,EAAE,WAAW;iBAClB;aACF;SACF;KACF,CAAC;IACF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,CAAC;IACtD,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAEzC,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AA5BW,QAAA,sBAAsB,0BA4BjC"}
@@ -0,0 +1,4 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { GenerationDirectiveConfiguration } from './grapqhl-generation-transformer';
3
+ export declare const validate: (config: GenerationDirectiveConfiguration, ctx: TransformerContextProvider) => void;
4
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAcpF,eAAO,MAAM,QAAQ,WAAY,gCAAgC,OAAO,0BAA0B,KAAG,IAGpG,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validate = void 0;
4
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
+ const graphql_transformer_core_2 = require("@aws-amplify/graphql-transformer-core");
6
+ const validate = (config, ctx) => {
7
+ validateFieldType(config);
8
+ validateInferenceConfig(config);
9
+ };
10
+ exports.validate = validate;
11
+ const validateFieldType = (config) => {
12
+ const { parent } = config;
13
+ if (!(0, graphql_transformer_core_2.isQueryType)(parent.name.value)) {
14
+ throw new graphql_transformer_core_1.InvalidDirectiveError('@generation directive must be used on Query field.');
15
+ }
16
+ };
17
+ const validateInferenceConfig = (config) => {
18
+ const { maxTokens, temperature, topP } = config.inferenceConfiguration;
19
+ if (maxTokens !== undefined && maxTokens < 1) {
20
+ throw new graphql_transformer_core_1.InvalidDirectiveError(`@generation directive maxTokens valid range: Minimum value of 1. Provided: ${maxTokens}`);
21
+ }
22
+ if (temperature !== undefined && (temperature < 0 || temperature > 1)) {
23
+ throw new graphql_transformer_core_1.InvalidDirectiveError(`@generation directive temperature valid range: Minimum value of 0. Maximum value of 1. Provided: ${temperature}`);
24
+ }
25
+ if (topP !== undefined && (topP < 0 || topP > 1)) {
26
+ throw new graphql_transformer_core_1.InvalidDirectiveError(`@generation directive topP valid range: Minimum value of 0. Maximum value of 1. Provided: ${topP}`);
27
+ }
28
+ };
29
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":";;;AAAA,oFAA8E;AAG9E,oFAAoE;AAa7D,MAAM,QAAQ,GAAG,CAAC,MAAwC,EAAE,GAA+B,EAAQ,EAAE;IAC1G,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,uBAAuB,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC,CAAC;AAHW,QAAA,QAAQ,YAGnB;AAWF,MAAM,iBAAiB,GAAG,CAAC,MAAwC,EAAQ,EAAE;IAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,IAAA,sCAAW,EAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QACnC,MAAM,IAAI,gDAAqB,CAAC,oDAAoD,CAAC,CAAC;KACvF;AACH,CAAC,CAAC;AAOF,MAAM,uBAAuB,GAAG,CAAC,MAAwC,EAAQ,EAAE;IACjF,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAGvE,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,GAAG,CAAC,EAAE;QAC5C,MAAM,IAAI,gDAAqB,CAAC,8EAA8E,SAAS,EAAE,CAAC,CAAC;KAC5H;IAED,IAAI,WAAW,KAAK,SAAS,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,EAAE;QACrE,MAAM,IAAI,gDAAqB,CAC7B,oGAAoG,WAAW,EAAE,CAClH,CAAC;KACH;IAED,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,EAAE;QAChD,MAAM,IAAI,gDAAqB,CAAC,6FAA6F,IAAI,EAAE,CAAC,CAAC;KACtI;AACH,CAAC,CAAC"}
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@aws-amplify/graphql-generation-transformer",
3
+ "version": "0.2.0",
4
+ "description": "Amplify GraphQL @generation transformer",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/aws-amplify/amplify-category-api.git",
8
+ "directory": "packages/amplify-graphql-generation-transformer"
9
+ },
10
+ "author": "Amazon Web Services",
11
+ "license": "Apache-2.0",
12
+ "main": "lib/index.js",
13
+ "types": "lib/index.d.ts",
14
+ "keywords": [],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "watch": "tsc -w",
21
+ "clean": "rimraf ./lib",
22
+ "test": "jest",
23
+ "extract-api": "ts-node ../../scripts/extract-api.ts"
24
+ },
25
+ "dependencies": {
26
+ "@aws-amplify/graphql-directives": "2.1.0",
27
+ "@aws-amplify/graphql-transformer-core": "3.1.0",
28
+ "@aws-amplify/graphql-transformer-interfaces": "4.1.0",
29
+ "graphql": "^15.5.0",
30
+ "graphql-mapping-template": "5.0.1",
31
+ "graphql-transformer-common": "5.0.1",
32
+ "immer": "^9.0.12"
33
+ },
34
+ "devDependencies": {
35
+ "@aws-amplify/graphql-transformer-test-utils": "1.0.1"
36
+ },
37
+ "peerDependencies": {
38
+ "aws-cdk-lib": "^2.152.0",
39
+ "constructs": "^10.3.0"
40
+ },
41
+ "jest": {
42
+ "transform": {
43
+ "^.+\\.(ts|tsx)?$": "ts-jest"
44
+ },
45
+ "testRegex": "(src/__tests__/.*.test.ts)$",
46
+ "moduleFileExtensions": [
47
+ "ts",
48
+ "tsx",
49
+ "js",
50
+ "jsx",
51
+ "json",
52
+ "node"
53
+ ],
54
+ "collectCoverage": true,
55
+ "coverageProvider": "v8",
56
+ "coverageThreshold": {
57
+ "global": {
58
+ "branches": 89,
59
+ "functions": 100,
60
+ "lines": 99
61
+ }
62
+ },
63
+ "coverageReporters": [
64
+ "clover",
65
+ "text"
66
+ ],
67
+ "modulePathIgnorePatterns": [
68
+ "overrides"
69
+ ],
70
+ "collectCoverageFrom": [
71
+ "src/**/*.ts"
72
+ ],
73
+ "coveragePathIgnorePatterns": [
74
+ "/__tests__/"
75
+ ]
76
+ },
77
+ "gitHead": "47cbcc39b5c28486ff5759d29efee07725bb8b55"
78
+ }
@@ -3,7 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.1.26-gen2-migration.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@2.1.25...@aws-amplify/graphql-http-transformer@2.1.26-gen2-migration.0) (2024-07-15)
6
+ ## [3.0.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@3.0.1...@aws-amplify/graphql-http-transformer@3.0.2) (2024-09-06)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/graphql-http-transformer
9
+
10
+ ## [3.0.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@3.0.0...@aws-amplify/graphql-http-transformer@3.0.1) (2024-08-28)
11
+
12
+ **Note:** Version bump only for package @aws-amplify/graphql-http-transformer
13
+
14
+ # [3.0.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@2.1.26...@aws-amplify/graphql-http-transformer@3.0.0) (2024-08-20)
15
+
16
+ - feat!: bump version for v2 transformer packages ([7dac35c](https://github.com/aws-amplify/amplify-category-api/commit/7dac35cceb971b256b5688b0745ef82afc78b641))
17
+
18
+ ### BREAKING CHANGES
19
+
20
+ - distinguish from LTS version
21
+
22
+ ## [2.1.26](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@2.1.25...@aws-amplify/graphql-http-transformer@2.1.26) (2024-07-15)
7
23
 
8
24
  **Note:** Version bump only for package @aws-amplify/graphql-http-transformer
9
25
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/graphql-http-transformer",
3
- "version": "2.1.26-gen2-migration.0",
3
+ "version": "3.0.2",
4
4
  "description": "Amplify GraphQL @http transformer",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,8 @@
15
15
  "graphql",
16
16
  "cloudformation",
17
17
  "aws",
18
- "amplify"
18
+ "amplify",
19
+ "transformer"
19
20
  ],
20
21
  "publishConfig": {
21
22
  "access": "public"
@@ -28,19 +29,19 @@
28
29
  "extract-api": "ts-node ../../scripts/extract-api.ts"
29
30
  },
30
31
  "dependencies": {
31
- "@aws-amplify/graphql-directives": "1.1.0",
32
- "@aws-amplify/graphql-transformer-core": "2.10.0-gen2-migration.0",
33
- "@aws-amplify/graphql-transformer-interfaces": "3.11.0-gen2-migration.0",
32
+ "@aws-amplify/graphql-directives": "2.1.0",
33
+ "@aws-amplify/graphql-transformer-core": "3.1.0",
34
+ "@aws-amplify/graphql-transformer-interfaces": "4.1.0",
34
35
  "graphql": "^15.5.0",
35
- "graphql-mapping-template": "4.20.16",
36
- "graphql-transformer-common": "4.32.0-gen2-migration.0"
36
+ "graphql-mapping-template": "5.0.1",
37
+ "graphql-transformer-common": "5.0.1"
37
38
  },
38
39
  "devDependencies": {
39
- "@aws-amplify/graphql-transformer-test-utils": "0.5.6-gen2-migration.0"
40
+ "@aws-amplify/graphql-transformer-test-utils": "1.0.1"
40
41
  },
41
42
  "peerDependencies": {
42
- "aws-cdk-lib": "^2.80.0",
43
- "constructs": "^10.0.5"
43
+ "aws-cdk-lib": "^2.152.0",
44
+ "constructs": "^10.3.0"
44
45
  },
45
46
  "jest": {
46
47
  "transform": {
@@ -71,13 +72,16 @@
71
72
  "modulePathIgnorePatterns": [
72
73
  "overrides"
73
74
  ],
74
- "testEnvironment": "../../FixJestEnvironment.js",
75
75
  "collectCoverageFrom": [
76
76
  "src/**/*.ts"
77
77
  ],
78
78
  "coveragePathIgnorePatterns": [
79
79
  "/__tests__/"
80
- ]
80
+ ],
81
+ "snapshotFormat": {
82
+ "escapeString": true,
83
+ "printBasicPrototype": true
84
+ }
81
85
  },
82
- "gitHead": "95431091fe3a13ae97a1f57a0bffb23f49c7e569"
86
+ "gitHead": "47cbcc39b5c28486ff5759d29efee07725bb8b55"
83
87
  }
@@ -3,7 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.4.7-gen2-migration.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.4.6...@aws-amplify/graphql-index-transformer@2.4.7-gen2-migration.0) (2024-07-15)
6
+ ## [3.0.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@3.0.1...@aws-amplify/graphql-index-transformer@3.0.2) (2024-09-06)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/graphql-index-transformer
9
+
10
+ ## [3.0.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@3.0.0...@aws-amplify/graphql-index-transformer@3.0.1) (2024-08-28)
11
+
12
+ **Note:** Version bump only for package @aws-amplify/graphql-index-transformer
13
+
14
+ # [3.0.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.4.9...@aws-amplify/graphql-index-transformer@3.0.0) (2024-08-20)
15
+
16
+ - feat!: bump version for v2 transformer packages ([7dac35c](https://github.com/aws-amplify/amplify-category-api/commit/7dac35cceb971b256b5688b0745ef82afc78b641))
17
+
18
+ ### BREAKING CHANGES
19
+
20
+ - distinguish from LTS version
21
+
22
+ ## [2.4.9](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.4.8...@aws-amplify/graphql-index-transformer@2.4.9) (2024-08-12)
23
+
24
+ **Note:** Version bump only for package @aws-amplify/graphql-index-transformer
25
+
26
+ ## [2.4.8](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.4.7...@aws-amplify/graphql-index-transformer@2.4.8) (2024-07-25)
27
+
28
+ **Note:** Version bump only for package @aws-amplify/graphql-index-transformer
29
+
30
+ ## [2.4.7](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.4.6...@aws-amplify/graphql-index-transformer@2.4.7) (2024-07-15)
7
31
 
8
32
  **Note:** Version bump only for package @aws-amplify/graphql-index-transformer
9
33
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/graphql-index-transformer",
3
- "version": "2.4.7-gen2-migration.0",
3
+ "version": "3.0.2",
4
4
  "description": "Amplify GraphQL index and key transformers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,8 @@
15
15
  "graphql",
16
16
  "cloudformation",
17
17
  "aws",
18
- "amplify"
18
+ "amplify",
19
+ "transformer"
19
20
  ],
20
21
  "publishConfig": {
21
22
  "access": "public"
@@ -28,20 +29,20 @@
28
29
  "extract-api": "ts-node ../../scripts/extract-api.ts"
29
30
  },
30
31
  "dependencies": {
31
- "@aws-amplify/graphql-directives": "1.1.0",
32
- "@aws-amplify/graphql-model-transformer": "2.12.0-gen2-migration.0",
33
- "@aws-amplify/graphql-transformer-core": "2.10.0-gen2-migration.0",
34
- "@aws-amplify/graphql-transformer-interfaces": "3.11.0-gen2-migration.0",
32
+ "@aws-amplify/graphql-directives": "2.1.0",
33
+ "@aws-amplify/graphql-model-transformer": "3.0.2",
34
+ "@aws-amplify/graphql-transformer-core": "3.1.0",
35
+ "@aws-amplify/graphql-transformer-interfaces": "4.1.0",
35
36
  "graphql": "^15.5.0",
36
- "graphql-mapping-template": "4.20.16",
37
- "graphql-transformer-common": "4.32.0-gen2-migration.0"
37
+ "graphql-mapping-template": "5.0.1",
38
+ "graphql-transformer-common": "5.0.1"
38
39
  },
39
40
  "devDependencies": {
40
- "@aws-amplify/graphql-transformer-test-utils": "0.5.6-gen2-migration.0"
41
+ "@aws-amplify/graphql-transformer-test-utils": "1.0.1"
41
42
  },
42
43
  "peerDependencies": {
43
- "aws-cdk-lib": "^2.80.0",
44
- "constructs": "^10.0.5"
44
+ "aws-cdk-lib": "^2.152.0",
45
+ "constructs": "^10.3.0"
45
46
  },
46
47
  "jest": {
47
48
  "transform": {
@@ -69,13 +70,16 @@
69
70
  "clover",
70
71
  "text"
71
72
  ],
72
- "testEnvironment": "../../FixJestEnvironment.js",
73
73
  "collectCoverageFrom": [
74
74
  "src/**/*.ts"
75
75
  ],
76
76
  "coveragePathIgnorePatterns": [
77
77
  "/__tests__/"
78
- ]
78
+ ],
79
+ "snapshotFormat": {
80
+ "escapeString": true,
81
+ "printBasicPrototype": true
82
+ }
79
83
  },
80
- "gitHead": "95431091fe3a13ae97a1f57a0bffb23f49c7e569"
84
+ "gitHead": "47cbcc39b5c28486ff5759d29efee07725bb8b55"
81
85
  }
@@ -3,10 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.4.21-gen2-migration.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.20...@aws-amplify/graphql-maps-to-transformer@3.4.21-gen2-migration.0) (2024-07-15)
6
+ ## [4.0.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@4.0.1...@aws-amplify/graphql-maps-to-transformer@4.0.2) (2024-09-06)
7
7
 
8
8
  **Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
9
9
 
10
+ ## [4.0.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@4.0.0...@aws-amplify/graphql-maps-to-transformer@4.0.1) (2024-08-28)
11
+
12
+ **Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
13
+
14
+ # [4.0.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.23...@aws-amplify/graphql-maps-to-transformer@4.0.0) (2024-08-20)
15
+
16
+ - feat!: bump version for v2 transformer packages ([7dac35c](https://github.com/aws-amplify/amplify-category-api/commit/7dac35cceb971b256b5688b0745ef82afc78b641))
17
+
18
+ ### BREAKING CHANGES
19
+
20
+ - distinguish from LTS version
21
+
22
+ ## [3.4.23](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.22...@aws-amplify/graphql-maps-to-transformer@3.4.23) (2024-08-12)
23
+
24
+ **Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
25
+
26
+ ## [3.4.22](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.21...@aws-amplify/graphql-maps-to-transformer@3.4.22) (2024-07-25)
27
+
28
+ **Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
29
+
30
+ ## [3.4.21](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.20...@aws-amplify/graphql-maps-to-transformer@3.4.21) (2024-07-15)
31
+
32
+ ### Bug Fixes
33
+
34
+ - add nonScalarFields and arrayFields to schemas with mapped names ([#2689](https://github.com/aws-amplify/amplify-category-api/issues/2689)) ([4feb898](https://github.com/aws-amplify/amplify-category-api/commit/4feb898ae21710bb86dd900faef082c24bc08960)), closes [#2581](https://github.com/aws-amplify/amplify-category-api/issues/2581)
35
+
10
36
  ## [3.4.20](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.19...@aws-amplify/graphql-maps-to-transformer@3.4.20) (2024-07-02)
11
37
 
12
38
  **Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer