@aws-amplify/graphql-api-construct 1.7.0-iam-auth-with-identityPool-provider-1.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (433) hide show
  1. package/.jsii +330 -331
  2. package/API.md +16 -17
  3. package/CHANGELOG.md +2 -2
  4. package/README.md +75 -17
  5. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  6. package/lib/amplify-graphql-api.js +2 -3
  7. package/lib/amplify-graphql-definition.js +1 -1
  8. package/lib/index.d.ts +1 -1
  9. package/lib/index.js +1 -1
  10. package/lib/internal/authorization-modes.d.ts +1 -2
  11. package/lib/internal/authorization-modes.js +7 -37
  12. package/lib/internal/data-source-config.js +37 -4
  13. package/lib/model-datasource-strategy-types.d.ts +25 -1
  14. package/lib/model-datasource-strategy-types.js +1 -1
  15. package/lib/sql-model-datasource-strategy.d.ts +13 -1
  16. package/lib/sql-model-datasource-strategy.js +26 -4
  17. package/lib/types.d.ts +5 -51
  18. package/lib/types.js +1 -1
  19. package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +2 -4
  20. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +2 -4
  21. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
  22. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +21 -33
  23. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
  24. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.d.ts.map +1 -1
  25. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js +0 -1
  26. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js.map +1 -1
  27. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +2 -3
  28. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts.map +1 -1
  29. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js +2 -39
  30. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js.map +1 -1
  31. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts +1 -2
  32. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts.map +1 -1
  33. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js +11 -22
  34. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js.map +1 -1
  35. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts.map +1 -1
  36. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +4 -11
  37. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js.map +1 -1
  38. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts +0 -1
  39. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts.map +1 -1
  40. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js +1 -10
  41. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js.map +1 -1
  42. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts +1 -1
  43. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts.map +1 -1
  44. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js +1 -1
  45. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js.map +1 -1
  46. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts +1 -1
  47. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts.map +1 -1
  48. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js +7 -14
  49. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js.map +1 -1
  50. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts +1 -2
  51. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts.map +1 -1
  52. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js +3 -14
  53. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js.map +1 -1
  54. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.d.ts.map +1 -1
  55. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +3 -3
  56. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js.map +1 -1
  57. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.d.ts.map +1 -1
  58. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js +3 -3
  59. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js.map +1 -1
  60. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.d.ts.map +1 -1
  61. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js +3 -3
  62. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js.map +1 -1
  63. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts.map +1 -1
  64. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js +2 -2
  65. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js.map +1 -1
  66. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.d.ts.map +1 -1
  67. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js +3 -3
  68. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js.map +1 -1
  69. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.d.ts.map +1 -1
  70. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js +1 -1
  71. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js.map +1 -1
  72. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts +1 -1
  73. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts.map +1 -1
  74. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js +2 -2
  75. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js.map +1 -1
  76. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts +2 -3
  77. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts.map +1 -1
  78. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js +14 -34
  79. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js.map +1 -1
  80. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.d.ts.map +1 -1
  81. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js +5 -5
  82. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js.map +1 -1
  83. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js +3 -3
  84. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js.map +1 -1
  85. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js +1 -1
  86. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js.map +1 -1
  87. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts +1 -1
  88. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts.map +1 -1
  89. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +14 -13
  90. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +1 -1
  91. package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.d.ts.map +1 -1
  92. package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js +2 -5
  93. package/node_modules/@aws-amplify/graphql-default-value-transformer/lib/graphql-default-value-transformer.js.map +1 -1
  94. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -8
  95. package/node_modules/@aws-amplify/graphql-directives/API.md +158 -0
  96. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +8 -0
  97. package/node_modules/@aws-amplify/graphql-directives/Readme.md +19 -0
  98. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts +3 -0
  99. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.d.ts.map +1 -0
  100. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js +14 -0
  101. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-api-key.js.map +1 -0
  102. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts +3 -0
  103. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.d.ts.map +1 -0
  104. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js +14 -0
  105. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-auth.js.map +1 -0
  106. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts +3 -0
  107. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.d.ts.map +1 -0
  108. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js +14 -0
  109. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-cognito-user-pools.js.map +1 -0
  110. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts +3 -0
  111. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.d.ts.map +1 -0
  112. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js +14 -0
  113. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-iam.js.map +1 -0
  114. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts +3 -0
  115. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.d.ts.map +1 -0
  116. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js +14 -0
  117. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-lambda.js.map +1 -0
  118. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts +3 -0
  119. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.d.ts.map +1 -0
  120. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js +14 -0
  121. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-oidc.js.map +1 -0
  122. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts +3 -0
  123. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.d.ts.map +1 -0
  124. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js +14 -0
  125. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/aws-subscribe.js.map +1 -0
  126. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts +8 -0
  127. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.d.ts.map +1 -0
  128. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js +18 -0
  129. package/node_modules/@aws-amplify/graphql-directives/lib/directives/appsync/index.js.map +1 -0
  130. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts +3 -0
  131. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -0
  132. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +49 -0
  133. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -0
  134. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts +3 -0
  135. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.d.ts.map +1 -0
  136. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js +14 -0
  137. package/node_modules/@aws-amplify/graphql-directives/lib/directives/belongs-to.js.map +1 -0
  138. package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts +3 -0
  139. package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.d.ts.map +1 -0
  140. package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js +14 -0
  141. package/node_modules/@aws-amplify/graphql-directives/lib/directives/default.js.map +1 -0
  142. package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts +3 -0
  143. package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.d.ts.map +1 -0
  144. package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js +14 -0
  145. package/node_modules/@aws-amplify/graphql-directives/lib/directives/deprecated.js.map +1 -0
  146. package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts +8 -0
  147. package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.d.ts.map +1 -0
  148. package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js +3 -0
  149. package/node_modules/@aws-amplify/graphql-directives/lib/directives/directive.js.map +1 -0
  150. package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts +3 -0
  151. package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.d.ts.map +1 -0
  152. package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js +14 -0
  153. package/node_modules/@aws-amplify/graphql-directives/lib/directives/function.js.map +1 -0
  154. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts +6 -0
  155. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.d.ts.map +1 -0
  156. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js +16 -0
  157. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-many.js.map +1 -0
  158. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts +3 -0
  159. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.d.ts.map +1 -0
  160. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js +14 -0
  161. package/node_modules/@aws-amplify/graphql-directives/lib/directives/has-one.js.map +1 -0
  162. package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts +7 -0
  163. package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.d.ts.map +1 -0
  164. package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js +28 -0
  165. package/node_modules/@aws-amplify/graphql-directives/lib/directives/http.js.map +1 -0
  166. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts +3 -0
  167. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.d.ts.map +1 -0
  168. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js +14 -0
  169. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index-directive.js.map +1 -0
  170. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts +21 -0
  171. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.d.ts.map +1 -0
  172. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js +54 -0
  173. package/node_modules/@aws-amplify/graphql-directives/lib/directives/index.js.map +1 -0
  174. package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts +6 -0
  175. package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.d.ts.map +1 -0
  176. package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js +16 -0
  177. package/node_modules/@aws-amplify/graphql-directives/lib/directives/many-to-many.js.map +1 -0
  178. package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts +3 -0
  179. package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.d.ts.map +1 -0
  180. package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js +14 -0
  181. package/node_modules/@aws-amplify/graphql-directives/lib/directives/maps-to.js.map +1 -0
  182. package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts +3 -0
  183. package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.d.ts.map +1 -0
  184. package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js +43 -0
  185. package/node_modules/@aws-amplify/graphql-directives/lib/directives/model.js.map +1 -0
  186. package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts +3 -0
  187. package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.d.ts.map +1 -0
  188. package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js +20 -0
  189. package/node_modules/@aws-amplify/graphql-directives/lib/directives/predictions.js.map +1 -0
  190. package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts +3 -0
  191. package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.d.ts.map +1 -0
  192. package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js +14 -0
  193. package/node_modules/@aws-amplify/graphql-directives/lib/directives/primary-key.js.map +1 -0
  194. package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts +3 -0
  195. package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.d.ts.map +1 -0
  196. package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js +14 -0
  197. package/node_modules/@aws-amplify/graphql-directives/lib/directives/refers-to.js.map +1 -0
  198. package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts +3 -0
  199. package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.d.ts.map +1 -0
  200. package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js +17 -0
  201. package/node_modules/@aws-amplify/graphql-directives/lib/directives/searchable.js.map +1 -0
  202. package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts +3 -0
  203. package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.d.ts.map +1 -0
  204. package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js +14 -0
  205. package/node_modules/@aws-amplify/graphql-directives/lib/directives/sql.js.map +1 -0
  206. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts +3 -0
  207. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.d.ts.map +1 -0
  208. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js +85 -0
  209. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/auth.js.map +1 -0
  210. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts +3 -0
  211. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.d.ts.map +1 -0
  212. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js +21 -0
  213. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/connection.js.map +1 -0
  214. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts +3 -0
  215. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.d.ts.map +1 -0
  216. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js +14 -0
  217. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/function.js.map +1 -0
  218. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts +7 -0
  219. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.d.ts.map +1 -0
  220. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js +28 -0
  221. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/http.js.map +1 -0
  222. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts +10 -0
  223. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.d.ts.map +1 -0
  224. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js +22 -0
  225. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/index.js.map +1 -0
  226. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts +3 -0
  227. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.d.ts.map +1 -0
  228. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js +14 -0
  229. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/key.js.map +1 -0
  230. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts +3 -0
  231. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.d.ts.map +1 -0
  232. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js +43 -0
  233. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/model.js.map +1 -0
  234. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts +3 -0
  235. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.d.ts.map +1 -0
  236. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js +20 -0
  237. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/predictions.js.map +1 -0
  238. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts +3 -0
  239. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.d.ts.map +1 -0
  240. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js +17 -0
  241. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/searchable.js.map +1 -0
  242. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts +7 -0
  243. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.d.ts.map +1 -0
  244. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js +17 -0
  245. package/node_modules/@aws-amplify/graphql-directives/lib/directives/v1/versioned.js.map +1 -0
  246. package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts +7 -0
  247. package/node_modules/@aws-amplify/graphql-directives/lib/index.d.ts.map +1 -0
  248. package/node_modules/@aws-amplify/graphql-directives/lib/index.js +60 -0
  249. package/node_modules/@aws-amplify/graphql-directives/lib/index.js.map +1 -0
  250. package/node_modules/@aws-amplify/graphql-directives/package.json +66 -0
  251. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +1 -1
  252. package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.d.ts.map +1 -1
  253. package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js +2 -4
  254. package/node_modules/@aws-amplify/graphql-function-transformer/lib/graphql-function-transformer.js.map +1 -1
  255. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +8 -7
  256. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +1 -1
  257. package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.d.ts.map +1 -1
  258. package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js +2 -15
  259. package/node_modules/@aws-amplify/graphql-http-transformer/lib/graphql-http-transformer.js.map +1 -1
  260. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +8 -7
  261. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +1 -1
  262. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.d.ts.map +1 -1
  263. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js +5 -8
  264. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-index-transformer.js.map +1 -1
  265. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.d.ts.map +1 -1
  266. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js +4 -7
  267. package/node_modules/@aws-amplify/graphql-index-transformer/lib/graphql-primary-key-transformer.js.map +1 -1
  268. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +9 -8
  269. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +1 -1
  270. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  271. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.d.ts.map +1 -1
  272. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js +6 -9
  273. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-maps-to-transformer.js.map +1 -1
  274. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.d.ts.map +1 -1
  275. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js +9 -12
  276. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/graphql-refers-to-transformer.js.map +1 -1
  277. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +12 -11
  278. package/node_modules/@aws-amplify/graphql-model-transformer/API.md +2 -2
  279. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -2
  280. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +0 -2
  281. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts.map +1 -1
  282. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js +1 -9
  283. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js.map +1 -1
  284. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts +0 -1
  285. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
  286. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +19 -73
  287. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
  288. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts +1 -1
  289. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts.map +1 -1
  290. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js +7 -11
  291. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js.map +1 -1
  292. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  293. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  294. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  295. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts +1 -1
  296. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts.map +1 -1
  297. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js +7 -15
  298. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js.map +1 -1
  299. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts +5 -1
  300. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.d.ts.map +1 -1
  301. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js +71 -26
  302. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/rds/resolver.js.map +1 -1
  303. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
  304. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +3 -3
  305. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
  306. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.d.ts.map +1 -1
  307. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js +21 -7
  308. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/rds-model-resource-generator.js.map +1 -1
  309. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +8 -7
  310. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +1 -1
  311. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.d.ts.map +1 -1
  312. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js +2 -1
  313. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/graphql-predictions-transformer.js.map +1 -1
  314. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  315. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts +0 -1
  316. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.d.ts.map +1 -1
  317. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js +1 -10
  318. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/utils/constants.js.map +1 -1
  319. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +8 -7
  320. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +1 -1
  321. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +12 -0
  322. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -0
  323. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +34 -0
  324. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -0
  325. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts +12 -0
  326. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -0
  327. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +27 -0
  328. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -0
  329. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +5 -0
  330. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -0
  331. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +16 -0
  332. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -0
  333. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts +11 -0
  334. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.d.ts.map +1 -0
  335. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js +3 -0
  336. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/data-source-based-directive-transformer.js.map +1 -0
  337. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
  338. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +15 -49
  339. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
  340. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
  341. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +18 -45
  342. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
  343. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.d.ts.map +1 -1
  344. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +13 -35
  345. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
  346. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
  347. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +13 -17
  348. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
  349. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts +12 -0
  350. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -0
  351. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +32 -0
  352. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -0
  353. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts +12 -0
  354. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -0
  355. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +27 -0
  356. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -0
  357. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +5 -0
  358. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -0
  359. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +16 -0
  360. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -0
  361. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +12 -0
  362. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -0
  363. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +31 -0
  364. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -0
  365. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts +12 -0
  366. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -0
  367. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +27 -0
  368. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -0
  369. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +5 -0
  370. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -0
  371. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +16 -0
  372. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -0
  373. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +10 -9
  374. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +1 -1
  375. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
  376. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +2 -6
  377. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
  378. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  379. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +9 -8
  380. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +1 -1
  381. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +1 -1
  382. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +2 -4
  383. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js.map +1 -1
  384. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +9 -8
  385. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +4 -2
  386. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
  387. package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
  388. package/node_modules/@aws-amplify/graphql-transformer/package.json +16 -16
  389. package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +1 -0
  390. package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -0
  391. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +1 -1
  392. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts +1 -1
  393. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.d.ts.map +1 -1
  394. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js +3 -2
  395. package/node_modules/@aws-amplify/graphql-transformer-core/lib/index.js.map +1 -1
  396. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.d.ts.map +1 -1
  397. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js +11 -12
  398. package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/validation.js.map +1 -1
  399. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts +1 -0
  400. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.d.ts.map +1 -1
  401. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js +8 -1
  402. package/node_modules/@aws-amplify/graphql-transformer-core/lib/utils/model-datasource-strategy-utils.js.map +1 -1
  403. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -4
  404. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +27 -2
  405. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -2
  406. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts +12 -1
  407. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.d.ts.map +1 -1
  408. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js +22 -0
  409. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/model-datasource/types.js.map +1 -1
  410. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +0 -1
  411. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
  412. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -2
  413. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/model-datasource/types.ts +76 -1
  414. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +0 -1
  415. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  416. package/node_modules/graphql-mapping-template/CHANGELOG.md +0 -4
  417. package/node_modules/graphql-mapping-template/package.json +2 -3
  418. package/node_modules/graphql-transformer-common/API.md +13 -0
  419. package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -2
  420. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +13 -0
  421. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
  422. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +13 -0
  423. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js.map +1 -1
  424. package/node_modules/graphql-transformer-common/package.json +3 -3
  425. package/package.json +21 -19
  426. package/src/amplify-graphql-api.ts +0 -2
  427. package/src/index.ts +0 -1
  428. package/src/internal/authorization-modes.ts +8 -47
  429. package/src/internal/data-source-config.ts +42 -9
  430. package/src/model-datasource-strategy-types.ts +33 -1
  431. package/src/sql-model-datasource-strategy.ts +32 -1
  432. package/src/types.ts +5 -56
  433. /package/node_modules/{graphql-mapping-template → @aws-amplify/graphql-directives}/LICENSE +0 -0
@@ -3,10 +3,6 @@
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
- ## [4.20.16-iam-auth-with-identityPool-provider-1.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.15...graphql-mapping-template@4.20.16-iam-auth-with-identityPool-provider-1.0) (2024-03-15)
7
-
8
- **Note:** Version bump only for package graphql-mapping-template
9
-
10
6
  ## [4.20.15](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@4.20.14...graphql-mapping-template@4.20.15) (2024-02-28)
11
7
 
12
8
  **Note:** Version bump only for package graphql-mapping-template
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-mapping-template",
3
- "version": "4.20.16-iam-auth-with-identityPool-provider-1.0",
3
+ "version": "4.20.15",
4
4
  "description": "An AST wrapper around AWS AppSync resolvers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,6 +57,5 @@
57
57
  "coveragePathIgnorePatterns": [
58
58
  "/__tests__/"
59
59
  ]
60
- },
61
- "gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a"
60
+ }
62
61
  }
@@ -503,6 +503,8 @@ export const transformedArgsRef: ReferenceNode;
503
503
  // @public (undocumented)
504
504
  export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
505
505
  SCHEMA_PACKAGE: string;
506
+ SCHEMA_PACKAGE_INTERNALS: string;
507
+ BACKEND_PACKAGE: string;
506
508
  MODEL_METHOD: string;
507
509
  SCHEMA_METHOD: string;
508
510
  IDENTIFIER_METHOD: string;
@@ -512,6 +514,17 @@ export const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
512
514
  ENUM_METHOD: string;
513
515
  REFERENCE_A: string;
514
516
  EXPORT_VARIABLE_NAME: string;
517
+ INTERNALS_CONFIGURE_METHOD: string;
518
+ BACKEND_SECRET_METHOD: string;
519
+ PROPERTY_VPC: string;
520
+ PROPERTY_VPC_ID: string;
521
+ PROPERTY_SECURITY_GROUP_IDS: string;
522
+ PROPERTY_AZ_CONFIG: string;
523
+ PROPERTY_SUBNET_ID: string;
524
+ PROPERTY_AZ: string;
525
+ PROPERTY_DATABASE: string;
526
+ PROPERTY_CONNECTION_URI: string;
527
+ PROPERTY_ENGINE: string;
515
528
  };
516
529
 
517
530
  // @public (undocumented)
@@ -3,9 +3,11 @@
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
- ## [4.28.2-iam-auth-with-identityPool-provider-1.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.1...graphql-transformer-common@4.28.2-iam-auth-with-identityPool-provider-1.0) (2024-03-15)
6
+ # [4.29.0](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.1...graphql-transformer-common@4.29.0) (2024-03-28)
7
7
 
8
- **Note:** Version bump only for package graphql-transformer-common
8
+ ### Features
9
+
10
+ - **api:** auto detect vpc configuration on generate typescript database schema ([#2376](https://github.com/aws-amplify/amplify-category-api/issues/2376)) ([ef6f53c](https://github.com/aws-amplify/amplify-category-api/commit/ef6f53c04bbcc50921bf20a937d1332d4597a3fa))
9
11
 
10
12
  ## [4.28.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@4.28.0...graphql-transformer-common@4.28.1) (2024-02-28)
11
13
 
@@ -1,5 +1,7 @@
1
1
  export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
2
2
  SCHEMA_PACKAGE: string;
3
+ SCHEMA_PACKAGE_INTERNALS: string;
4
+ BACKEND_PACKAGE: string;
3
5
  MODEL_METHOD: string;
4
6
  SCHEMA_METHOD: string;
5
7
  IDENTIFIER_METHOD: string;
@@ -9,5 +11,16 @@ export declare const TYPESCRIPT_DATA_SCHEMA_CONSTANTS: {
9
11
  ENUM_METHOD: string;
10
12
  REFERENCE_A: string;
11
13
  EXPORT_VARIABLE_NAME: string;
14
+ INTERNALS_CONFIGURE_METHOD: string;
15
+ BACKEND_SECRET_METHOD: string;
16
+ PROPERTY_VPC: string;
17
+ PROPERTY_VPC_ID: string;
18
+ PROPERTY_SECURITY_GROUP_IDS: string;
19
+ PROPERTY_AZ_CONFIG: string;
20
+ PROPERTY_SUBNET_ID: string;
21
+ PROPERTY_AZ: string;
22
+ PROPERTY_DATABASE: string;
23
+ PROPERTY_CONNECTION_URI: string;
24
+ PROPERTY_ENGINE: string;
12
25
  };
13
26
  //# sourceMappingURL=TypescriptSchemaConstants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;;;;;;;;CAW5C,CAAC"}
1
+ {"version":3,"file":"TypescriptSchemaConstants.d.ts","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;CAwB5C,CAAC"}
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = void 0;
4
4
  exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
5
5
  SCHEMA_PACKAGE: '@aws-amplify/data-schema',
6
+ SCHEMA_PACKAGE_INTERNALS: '@aws-amplify/data-schema/internals',
7
+ BACKEND_PACKAGE: '@aws-amplify/backend',
6
8
  MODEL_METHOD: 'model',
7
9
  SCHEMA_METHOD: 'schema',
8
10
  IDENTIFIER_METHOD: 'identifier',
@@ -12,5 +14,16 @@ exports.TYPESCRIPT_DATA_SCHEMA_CONSTANTS = {
12
14
  ENUM_METHOD: 'enum',
13
15
  REFERENCE_A: 'a',
14
16
  EXPORT_VARIABLE_NAME: 'schema',
17
+ INTERNALS_CONFIGURE_METHOD: 'configure',
18
+ BACKEND_SECRET_METHOD: 'secret',
19
+ PROPERTY_VPC: 'vpcConfig',
20
+ PROPERTY_VPC_ID: 'vpcId',
21
+ PROPERTY_SECURITY_GROUP_IDS: 'securityGroupIds',
22
+ PROPERTY_AZ_CONFIG: 'subnetAvailabilityZones',
23
+ PROPERTY_SUBNET_ID: 'subnetId',
24
+ PROPERTY_AZ: 'availabilityZone',
25
+ PROPERTY_DATABASE: 'database',
26
+ PROPERTY_CONNECTION_URI: 'connectionUri',
27
+ PROPERTY_ENGINE: 'engine',
15
28
  };
16
29
  //# sourceMappingURL=TypescriptSchemaConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;CAC/B,CAAC"}
1
+ {"version":3,"file":"TypescriptSchemaConstants.js","sourceRoot":"","sources":["../src/TypescriptSchemaConstants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG;IAC9C,cAAc,EAAE,0BAA0B;IAC1C,wBAAwB,EAAE,oCAAoC;IAC9D,eAAe,EAAE,sBAAsB;IACvC,YAAY,EAAE,OAAO;IACrB,aAAa,EAAE,QAAQ;IACvB,iBAAiB,EAAE,YAAY;IAC/B,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,UAAU;IAC3B,aAAa,EAAE,QAAQ;IACvB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,GAAG;IAChB,oBAAoB,EAAE,QAAQ;IAC9B,0BAA0B,EAAE,WAAW;IACvC,qBAAqB,EAAE,QAAQ;IAC/B,YAAY,EAAE,WAAW;IACzB,eAAe,EAAE,OAAO;IACxB,2BAA2B,EAAE,kBAAkB;IAC/C,kBAAkB,EAAE,yBAAyB;IAC7C,kBAAkB,EAAE,UAAU;IAC9B,WAAW,EAAE,kBAAkB;IAC/B,iBAAiB,EAAE,UAAU;IAC7B,uBAAuB,EAAE,eAAe;IACxC,eAAe,EAAE,QAAQ;CAC1B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-transformer-common",
3
- "version": "4.28.2-iam-auth-with-identityPool-provider-1.0",
3
+ "version": "4.29.0",
4
4
  "description": "Common code and constants for AppSync Transformers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "graphql": "^15.5.0",
28
- "graphql-mapping-template": "4.20.16-iam-auth-with-identityPool-provider-1.0",
28
+ "graphql-mapping-template": "4.20.15",
29
29
  "md5": "^2.2.1",
30
30
  "pluralize": "8.0.0"
31
31
  },
@@ -66,5 +66,5 @@
66
66
  "/__tests__/"
67
67
  ]
68
68
  },
69
- "gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a"
69
+ "gitHead": "ac8990dd06d7b6a29c079e84a7c1e23ec5708fc1"
70
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/graphql-api-construct",
3
- "version": "1.7.0-iam-auth-with-identityPool-provider-1.0",
3
+ "version": "1.7.0",
4
4
  "description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,6 +38,7 @@
38
38
  "@aws-amplify/backend-output-storage",
39
39
  "@aws-amplify/graphql-auth-transformer",
40
40
  "@aws-amplify/graphql-default-value-transformer",
41
+ "@aws-amplify/graphql-directives",
41
42
  "@aws-amplify/graphql-function-transformer",
42
43
  "@aws-amplify/graphql-http-transformer",
43
44
  "@aws-amplify/graphql-index-transformer",
@@ -75,20 +76,21 @@
75
76
  "dependencies": {
76
77
  "@aws-amplify/backend-output-schemas": "^0.4.0",
77
78
  "@aws-amplify/backend-output-storage": "^0.2.2",
78
- "@aws-amplify/graphql-auth-transformer": "3.5.0-iam-auth-with-identityPool-provider-1.0",
79
- "@aws-amplify/graphql-default-value-transformer": "2.3.2-iam-auth-with-identityPool-provider-1.0",
80
- "@aws-amplify/graphql-function-transformer": "2.1.19-iam-auth-with-identityPool-provider-1.0",
81
- "@aws-amplify/graphql-http-transformer": "2.1.19-iam-auth-with-identityPool-provider-1.0",
82
- "@aws-amplify/graphql-index-transformer": "2.3.8-iam-auth-with-identityPool-provider-1.0",
83
- "@aws-amplify/graphql-maps-to-transformer": "3.4.9-iam-auth-with-identityPool-provider-1.0",
84
- "@aws-amplify/graphql-model-transformer": "2.6.1-iam-auth-with-identityPool-provider-1.0",
85
- "@aws-amplify/graphql-predictions-transformer": "2.1.19-iam-auth-with-identityPool-provider-1.0",
86
- "@aws-amplify/graphql-relational-transformer": "2.4.2-iam-auth-with-identityPool-provider-1.0",
87
- "@aws-amplify/graphql-searchable-transformer": "2.6.2-iam-auth-with-identityPool-provider-1.0",
88
- "@aws-amplify/graphql-sql-transformer": "0.2.8-iam-auth-with-identityPool-provider-1.0",
89
- "@aws-amplify/graphql-transformer": "1.3.13-iam-auth-with-identityPool-provider-1.0",
90
- "@aws-amplify/graphql-transformer-core": "2.5.1-iam-auth-with-identityPool-provider-1.0",
91
- "@aws-amplify/graphql-transformer-interfaces": "3.4.1-iam-auth-with-identityPool-provider-1.0",
79
+ "@aws-amplify/graphql-auth-transformer": "3.4.2",
80
+ "@aws-amplify/graphql-default-value-transformer": "2.3.2",
81
+ "@aws-amplify/graphql-directives": "1.0.1",
82
+ "@aws-amplify/graphql-function-transformer": "2.1.19",
83
+ "@aws-amplify/graphql-http-transformer": "2.1.19",
84
+ "@aws-amplify/graphql-index-transformer": "2.3.8",
85
+ "@aws-amplify/graphql-maps-to-transformer": "3.4.9",
86
+ "@aws-amplify/graphql-model-transformer": "2.7.0",
87
+ "@aws-amplify/graphql-predictions-transformer": "2.1.19",
88
+ "@aws-amplify/graphql-relational-transformer": "2.4.2",
89
+ "@aws-amplify/graphql-searchable-transformer": "2.6.2",
90
+ "@aws-amplify/graphql-sql-transformer": "0.2.8",
91
+ "@aws-amplify/graphql-transformer": "1.4.0",
92
+ "@aws-amplify/graphql-transformer-core": "2.5.1",
93
+ "@aws-amplify/graphql-transformer-interfaces": "3.5.0",
92
94
  "@aws-amplify/platform-core": "^0.2.0",
93
95
  "@aws-amplify/plugin-types": "^0.4.1",
94
96
  "charenc": "^0.0.2",
@@ -96,8 +98,8 @@
96
98
  "fs-extra": "^8.1.0",
97
99
  "graceful-fs": "^4.2.11",
98
100
  "graphql": "^15.5.0",
99
- "graphql-mapping-template": "4.20.16-iam-auth-with-identityPool-provider-1.0",
100
- "graphql-transformer-common": "4.28.2-iam-auth-with-identityPool-provider-1.0",
101
+ "graphql-mapping-template": "4.20.15",
102
+ "graphql-transformer-common": "4.29.0",
101
103
  "hjson": "^3.2.2",
102
104
  "immer": "^9.0.12",
103
105
  "is-buffer": "^2.0.5",
@@ -112,7 +114,7 @@
112
114
  "zod": "^3.22.3"
113
115
  },
114
116
  "devDependencies": {
115
- "@aws-amplify/graphql-transformer-test-utils": "0.4.7-iam-auth-with-identityPool-provider-1.0",
117
+ "@aws-amplify/graphql-transformer-test-utils": "0.4.7",
116
118
  "@types/fs-extra": "^8.0.1",
117
119
  "@types/node": "^12.12.6",
118
120
  "aws-cdk-lib": "2.80.0",
@@ -177,5 +179,5 @@
177
179
  "/__tests__/"
178
180
  ]
179
181
  },
180
- "gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a"
182
+ "gitHead": "ac8990dd06d7b6a29c079e84a7c1e23ec5708fc1"
181
183
  }
@@ -48,7 +48,6 @@ import {
48
48
  getGeneratedFunctionSlots,
49
49
  CodegenAssets,
50
50
  getAdditionalAuthenticationTypes,
51
- validateAuthorizationModes,
52
51
  } from './internal';
53
52
  import { getStackForScope, walkAndProcessNodes } from './internal/construct-tree';
54
53
  import { getDataSourceStrategiesProvider } from './internal/data-source-config';
@@ -170,7 +169,6 @@ export class AmplifyGraphqlApi extends Construct {
170
169
  dataSources,
171
170
  });
172
171
 
173
- validateAuthorizationModes(authorizationModes);
174
172
  const { authConfig, authSynthParameters } = convertAuthorizationModesToTransformerAuthConfig(authorizationModes);
175
173
 
176
174
  validateFunctionSlots(functionSlots ?? []);
package/src/index.ts CHANGED
@@ -4,7 +4,6 @@
4
4
  */
5
5
  export type {
6
6
  IAMAuthorizationConfig,
7
- IdentityPoolAuthorizationConfig,
8
7
  UserPoolAuthorizationConfig,
9
8
  OIDCAuthorizationConfig,
10
9
  ApiKeyAuthorizationConfig,
@@ -5,51 +5,19 @@ import { IRole, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
5
5
  import {
6
6
  AuthorizationModes,
7
7
  ApiKeyAuthorizationConfig,
8
+ IAMAuthorizationConfig,
8
9
  LambdaAuthorizationConfig,
9
10
  OIDCAuthorizationConfig,
10
11
  UserPoolAuthorizationConfig,
11
12
  } from '../types';
12
13
 
13
14
  type AuthorizationConfigMode =
14
- | { type: 'AWS_IAM' }
15
+ | (IAMAuthorizationConfig & { type: 'AWS_IAM' })
15
16
  | (UserPoolAuthorizationConfig & { type: 'AMAZON_COGNITO_USER_POOLS' })
16
17
  | (OIDCAuthorizationConfig & { type: 'OPENID_CONNECT' })
17
18
  | (ApiKeyAuthorizationConfig & { type: 'API_KEY' })
18
19
  | (LambdaAuthorizationConfig & { type: 'AWS_LAMBDA' });
19
20
 
20
- export const validateAuthorizationModes = (authorizationModes: AuthorizationModes) => {
21
- const hasDeprecatedIdentityPoolSettings =
22
- authorizationModes.iamConfig?.authenticatedUserRole ||
23
- authorizationModes.iamConfig?.unauthenticatedUserRole ||
24
- authorizationModes.iamConfig?.identityPoolId;
25
- const hasAllDeprecatedIdentityPoolSettings =
26
- authorizationModes.iamConfig?.authenticatedUserRole &&
27
- authorizationModes.iamConfig?.unauthenticatedUserRole &&
28
- authorizationModes.iamConfig?.identityPoolId;
29
- const hasDeprecatedSettings =
30
- authorizationModes.iamConfig?.authenticatedUserRole ||
31
- authorizationModes.iamConfig?.unauthenticatedUserRole ||
32
- authorizationModes.iamConfig?.identityPoolId ||
33
- authorizationModes.iamConfig?.allowListedRoles ||
34
- authorizationModes.adminRoles;
35
- const hasUnDeprecatedSettings =
36
- typeof authorizationModes.iamConfig?.enableIamAuthorizationMode !== 'undefined' || authorizationModes.identityPoolConfig;
37
-
38
- if (hasDeprecatedSettings && hasUnDeprecatedSettings) {
39
- throw new Error(
40
- "Cannot use deprecated 'authorizationModes.iamConfig' options with 'authorizationModes.identityPoolConfig'" +
41
- " or 'authorizationModes.iamConfig.enableIamAuthorizationMode'",
42
- );
43
- }
44
-
45
- if (hasDeprecatedIdentityPoolSettings && !hasAllDeprecatedIdentityPoolSettings) {
46
- throw new Error(
47
- "'authorizationModes.iamConfig.authenticatedUserRole', 'authorizationModes.iamConfig.unauthenticatedUserRole' and" +
48
- " 'authorizationModes.iamConfig.identityPoolId' must be provided.",
49
- );
50
- }
51
- };
52
-
53
21
  /**
54
22
  * Converts a single auth mode config into the amplify-internal representation.
55
23
  * @param authMode the auth mode to convert into the Appsync CDK representation.
@@ -111,7 +79,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
111
79
  authModes.lambdaConfig ? { type: 'AWS_LAMBDA', ...authModes.lambdaConfig } : null,
112
80
  authModes.oidcConfig ? { type: 'OPENID_CONNECT', ...authModes.oidcConfig } : null,
113
81
  authModes.userPoolConfig ? { type: 'AMAZON_COGNITO_USER_POOLS', ...authModes.userPoolConfig } : null,
114
- authModes.iamConfig || authModes.identityPoolConfig ? { type: 'AWS_IAM' } : null,
82
+ authModes.iamConfig ? { type: 'AWS_IAM', ...authModes.iamConfig } : null,
115
83
  ].filter((mode) => mode) as AuthorizationConfigMode[];
116
84
  const authProviders = authConfig.map(convertAuthModeToAuthProvider);
117
85
 
@@ -148,7 +116,7 @@ const convertAuthConfigToAppSyncAuth = (authModes: AuthorizationModes): AppSyncA
148
116
 
149
117
  type AuthSynthParameters = Pick<
150
118
  SynthParameters,
151
- 'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles' | 'enableIamAccess'
119
+ 'userPoolId' | 'authenticatedUserRoleName' | 'unauthenticatedUserRoleName' | 'identityPoolId' | 'adminRoles'
152
120
  >;
153
121
 
154
122
  interface AuthConfig {
@@ -209,19 +177,12 @@ const getAllowListedRoles = (authModes: AuthorizationModes): string[] =>
209
177
  */
210
178
  const getSynthParameters = (authModes: AuthorizationModes): AuthSynthParameters => ({
211
179
  adminRoles: getAllowListedRoles(authModes),
212
- identityPoolId: authModes.identityPoolConfig?.identityPoolId ?? authModes.iamConfig?.identityPoolId,
213
- enableIamAccess: authModes.iamConfig?.enableIamAuthorizationMode,
180
+ identityPoolId: authModes.iamConfig?.identityPoolId,
214
181
  ...(authModes.userPoolConfig ? { userPoolId: authModes.userPoolConfig.userPool.userPoolId } : {}),
215
- ...(authModes?.identityPoolConfig
216
- ? {
217
- authenticatedUserRoleName: authModes.identityPoolConfig.authenticatedUserRole.roleName,
218
- unauthenticatedUserRoleName: authModes.identityPoolConfig.unauthenticatedUserRole.roleName,
219
- }
220
- : {}),
221
- ...(authModes?.iamConfig && authModes?.iamConfig.authenticatedUserRole && authModes?.iamConfig.unauthenticatedUserRole
182
+ ...(authModes?.iamConfig
222
183
  ? {
223
- authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole?.roleName,
224
- unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole?.roleName,
184
+ authenticatedUserRoleName: authModes.iamConfig.authenticatedUserRole.roleName,
185
+ unauthenticatedUserRoleName: authModes.iamConfig.unauthenticatedUserRole.roleName,
225
186
  }
226
187
  : {}),
227
188
  });
@@ -6,7 +6,12 @@ import {
6
6
  isMutationNode,
7
7
  fieldsWithSqlDirective,
8
8
  } from '@aws-amplify/graphql-transformer-core';
9
- import { DataSourceStrategiesProvider } from '@aws-amplify/graphql-transformer-interfaces';
9
+ import {
10
+ DataSourceStrategiesProvider,
11
+ isSqlModelDataSourceSsmDbConnectionConfig,
12
+ isSqlModelDataSourceSecretsManagerDbConnectionConfig,
13
+ } from '@aws-amplify/graphql-transformer-interfaces';
14
+ import { Token, Arn, ArnFormat } from 'aws-cdk-lib';
10
15
  import {
11
16
  CustomSqlDataSourceStrategy as ConstructCustomSqlDataSourceStrategy,
12
17
  ModelDataSourceStrategy as ConstructModelDataSourceStrategy,
@@ -184,19 +189,47 @@ export const schemaByMergingDefinitions = (definitions: IAmplifyGraphqlDefinitio
184
189
  * @param strategy user provided model data source strategy
185
190
  * @returns validates and throws an error if the strategy is invalid
186
191
  */
187
- export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy) => {
192
+ export const validateDataSourceStrategy = (strategy: ConstructModelDataSourceStrategy): void => {
188
193
  if (!isSqlStrategy(strategy)) {
189
194
  return;
190
195
  }
191
196
 
192
197
  const dbConnectionConfig = strategy.dbConnectionConfig;
193
- const invalidSSMPaths = Object.values(dbConnectionConfig).filter((value) => typeof value === 'string' && !isValidSSMPath(value));
194
- if (invalidSSMPaths.length > 0) {
195
- throw new Error(
196
- `Invalid data source strategy "${
197
- strategy.name
198
- }". Following SSM paths must start with '/' in dbConnectionConfig: ${invalidSSMPaths.join(', ')}.`,
199
- );
198
+ if (isSqlModelDataSourceSsmDbConnectionConfig(dbConnectionConfig)) {
199
+ const invalidSSMPaths = Object.values(dbConnectionConfig).filter((value) => typeof value === 'string' && !isValidSSMPath(value));
200
+ if (invalidSSMPaths.length > 0) {
201
+ throw new Error(
202
+ `Invalid data source strategy "${
203
+ strategy.name
204
+ }". Following SSM paths must start with '/' in dbConnectionConfig: ${invalidSSMPaths.join(', ')}.`,
205
+ );
206
+ }
207
+ } else if (isSqlModelDataSourceSecretsManagerDbConnectionConfig(dbConnectionConfig)) {
208
+ if (!Token.isUnresolved(dbConnectionConfig.secretArn)) {
209
+ try {
210
+ const arnComponents = Arn.split(dbConnectionConfig.secretArn, ArnFormat.COLON_RESOURCE_NAME);
211
+ if (arnComponents.service !== 'secretsmanager' || arnComponents.resource !== 'secret') {
212
+ // error message does not matter because it inside try/catch
213
+ throw new Error();
214
+ }
215
+ } catch {
216
+ throw new Error(`Invalid data source strategy "${strategy.name}". The value of secretArn is not a valid Secrets Manager ARN.`);
217
+ }
218
+ }
219
+
220
+ if (dbConnectionConfig.keyArn && !Token.isUnresolved(dbConnectionConfig.keyArn)) {
221
+ try {
222
+ const arnComponents = Arn.split(dbConnectionConfig.keyArn, ArnFormat.SLASH_RESOURCE_NAME);
223
+ if (arnComponents.service !== 'kms' || arnComponents.resource !== 'key') {
224
+ // error message does not matter because it inside try/catch
225
+ throw new Error();
226
+ }
227
+ } catch {
228
+ throw new Error(`Invalid data source strategy "${strategy.name}". The value of keyArn is not a valid KMS ARN.`);
229
+ }
230
+ }
231
+ } else {
232
+ throw new Error(`Invalid data source strategy "${strategy.name}". dbConnectionConfig does not include SSM paths or Secret ARN.`);
200
233
  }
201
234
  };
202
235
 
@@ -116,12 +116,44 @@ export interface SubnetAvailabilityZone {
116
116
  readonly availabilityZone: string;
117
117
  }
118
118
 
119
+ /**
120
+ * The credentials the lambda data source will use to connect to the database.
121
+ *
122
+ * @experimental
123
+ */
124
+ export type SqlModelDataSourceDbConnectionConfig =
125
+ | SqlModelDataSourceSecretsManagerDbConnectionConfig
126
+ | SqlModelDataSourceSsmDbConnectionConfig;
127
+
128
+ /**
129
+ * The credentials stored in Secrets Manager that the lambda data source will use to connect to the database.
130
+ *
131
+ * The managed secret should be in the same region as the lambda.
132
+ * @experimental
133
+ */
134
+ export interface SqlModelDataSourceSecretsManagerDbConnectionConfig {
135
+ /** The ARN of the managed secret with username, password, and hostname to use when connecting to the database. **/
136
+ readonly secretArn: string;
137
+
138
+ /** The ARN of the customer managed encryption key for the secret. If not supplied, the secret is expected to be encrypted with the default AWS-managed key. **/
139
+ readonly keyArn?: string;
140
+
141
+ /** The port number of the database proxy, cluster, or instance. */
142
+ readonly port: number;
143
+
144
+ /** The database name. */
145
+ readonly databaseName: string;
146
+
147
+ /** The hostame of the database. */
148
+ readonly hostname: string;
149
+ }
150
+
119
151
  /**
120
152
  * The Secure Systems Manager parameter paths the Lambda data source will use to connect to the database.
121
153
  *
122
154
  * These parameters are retrieved from Secure Systems Manager in the same region as the Lambda.
123
155
  */
124
- export interface SqlModelDataSourceDbConnectionConfig {
156
+ export interface SqlModelDataSourceSsmDbConnectionConfig {
125
157
  /** The Secure Systems Manager parameter containing the hostname of the database. For RDS-based SQL data sources, this can be the hostname
126
158
  * of a database proxy, cluster, or instance.
127
159
  */
@@ -1,7 +1,12 @@
1
1
  import * as fs from 'fs';
2
2
  import * as path from 'path';
3
3
  import { isSqlDbType } from '@aws-amplify/graphql-transformer-core';
4
- import { SQLLambdaModelDataSourceStrategy, SqlModelDataSourceDbConnectionConfig } from './model-datasource-strategy-types';
4
+ import {
5
+ SQLLambdaModelDataSourceStrategy,
6
+ SqlModelDataSourceDbConnectionConfig,
7
+ SqlModelDataSourceSsmDbConnectionConfig,
8
+ SqlModelDataSourceSecretsManagerDbConnectionConfig,
9
+ } from './model-datasource-strategy-types';
5
10
 
6
11
  /**
7
12
  * Type predicate that returns true if the object is a SQLLambdaModelDataSourceStrategy.
@@ -24,6 +29,15 @@ export const isSQLLambdaModelDataSourceStrategy = (obj: any): obj is SQLLambdaMo
24
29
  * @returns true if the object is shaped like a SqlModelDataSourceDbConnectionConfig
25
30
  */
26
31
  export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlModelDataSourceDbConnectionConfig => {
32
+ return isSqlModelDataSourceSsmDbConnectionConfig(obj) || isSqlModelDataSourceSecretsManagerDbConnectionConfig(obj);
33
+ };
34
+
35
+ /**
36
+ * Type predicate that returns true if the object is a SqlModelDataSourceSsmDbConnectionConfig.
37
+ * @param obj the object to inspect
38
+ * @returns true if the object is shaped like a SqlModelDataSourceSsmDbConnectionConfig
39
+ */
40
+ export const isSqlModelDataSourceSsmDbConnectionConfig = (obj: any): obj is SqlModelDataSourceSsmDbConnectionConfig => {
27
41
  return (
28
42
  (typeof obj === 'object' || typeof obj === 'function') &&
29
43
  typeof obj.hostnameSsmPath === 'string' &&
@@ -34,6 +48,23 @@ export const isSqlModelDataSourceDbConnectionConfig = (obj: any): obj is SqlMode
34
48
  );
35
49
  };
36
50
 
51
+ /**
52
+ * Type predicate that returns true if the object is a SqlModelDataSourceSecretsManagerDbConnectionConfig.
53
+ * @param obj the object to inspect
54
+ * @returns true if the object is shaped like a SqlModelDataSourceSecretsManagerDbConnectionConfig
55
+ */
56
+ export const isSqlModelDataSourceSecretsManagerDbConnectionConfig = (
57
+ obj: any,
58
+ ): obj is SqlModelDataSourceSecretsManagerDbConnectionConfig => {
59
+ return (
60
+ (typeof obj === 'object' || typeof obj === 'function') &&
61
+ typeof obj.secretArn === 'string' &&
62
+ typeof obj.port === 'number' &&
63
+ typeof obj.databaseName === 'string' &&
64
+ typeof obj.hostname == 'string'
65
+ );
66
+ };
67
+
37
68
  /**
38
69
  * Class exposing utilities to produce SQLLambdaModelDataSourceStrategy objects given various inputs.
39
70
  */
package/src/types.ts CHANGED
@@ -28,68 +28,25 @@ export interface IAMAuthorizationConfig {
28
28
  /**
29
29
  * ID for the Cognito Identity Pool vending auth and unauth roles.
30
30
  * Format: `<region>:<id string>`
31
- *
32
- * @deprecated Use 'IdentityPoolAuthorizationConfig.identityPoolId' instead.
33
- * See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
34
31
  */
35
- readonly identityPoolId?: string;
32
+ readonly identityPoolId: string;
36
33
 
37
34
  /**
38
35
  * Authenticated user role, applies to { provider: iam, allow: private } access.
39
- *
40
- * @deprecated Use 'IdentityPoolAuthorizationConfig.authenticatedUserRole' instead.
41
- * See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
42
36
  */
43
- readonly authenticatedUserRole?: IRole;
37
+ readonly authenticatedUserRole: IRole;
44
38
 
45
39
  /**
46
40
  * Unauthenticated user role, applies to { provider: iam, allow: public } access.
47
- *
48
- * @deprecated Use 'IdentityPoolAuthorizationConfig.unauthenticatedUserRole' instead.
49
- * See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
50
41
  */
51
- readonly unauthenticatedUserRole?: IRole;
42
+ readonly unauthenticatedUserRole: IRole;
52
43
 
53
44
  /**
54
45
  * A list of IAM roles which will be granted full read/write access to the generated model if IAM auth is enabled.
55
46
  * If an IRole is provided, the role `name` will be used for matching.
56
47
  * If a string is provided, the raw value will be used for matching.
57
- *
58
- * @deprecated Use 'enableIamAuthorizationMode' and IAM Policy to control access for IAM principals.
59
- * See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
60
48
  */
61
49
  readonly allowListedRoles?: (IRole | string)[];
62
-
63
- /**
64
- * Enables access for IAM principals. If enabled @auth directive rules are not applied.
65
- * Instead, access should be defined by IAM Policy, see https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsappsync.html.
66
- *
67
- * Does not apply to authenticated and unauthenticated IAM Roles attached to Cognito Identity Pool.
68
- * Use IdentityPoolAuthorizationConfig to configure their access.
69
- */
70
- readonly enableIamAuthorizationMode?: boolean;
71
- }
72
-
73
- /**
74
- * Configuration for Cognito Identity Pool Authorization on the Graphql Api.
75
- * @struct - required since this interface begins with an 'I'
76
- */
77
- export interface IdentityPoolAuthorizationConfig {
78
- /**
79
- * ID for the Cognito Identity Pool vending auth and unauth roles.
80
- * Format: `<region>:<id string>`
81
- */
82
- readonly identityPoolId: string;
83
-
84
- /**
85
- * Authenticated user role, applies to { provider: iam, allow: private } access.
86
- */
87
- readonly authenticatedUserRole: IRole;
88
-
89
- /**
90
- * Unauthenticated user role, applies to { provider: iam, allow: public } access.
91
- */
92
- readonly unauthenticatedUserRole: IRole;
93
50
  }
94
51
 
95
52
  /**
@@ -177,18 +134,10 @@ export interface AuthorizationModes {
177
134
  readonly defaultAuthorizationMode?: 'AWS_IAM' | 'AMAZON_COGNITO_USER_POOLS' | 'OPENID_CONNECT' | 'API_KEY' | 'AWS_LAMBDA';
178
135
 
179
136
  /**
180
- * IAM Auth config, required to allow IAM-based access to this API.
181
- * This applies to any IAM principal except Amazon Cognito identity pool's authenticated and unauthenticated roles.
182
- * This behavior was has recently been improved.
183
- * See https://docs.amplify.aws/cli/react/tools/cli/migration/iam-auth-updates-for-cdk-construct for details.
184
- */
185
- readonly iamConfig?: IAMAuthorizationConfig;
186
-
187
- /**
188
- * Cognito Identity Pool config, required if an 'identityPool' auth provider is specified in the Api.
137
+ * IAM Auth config, required if an 'iam' auth provider is specified in the Api.
189
138
  * Applies to 'public' and 'private' auth strategies.
190
139
  */
191
- readonly identityPoolConfig?: IdentityPoolAuthorizationConfig;
140
+ readonly iamConfig?: IAMAuthorizationConfig;
192
141
 
193
142
  /**
194
143
  * Cognito UserPool config, required if a 'userPools' auth provider is specified in the Api.