@kensio/yulin 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +2 -2
  2. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
  3. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +10 -6
  4. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  5. package/dist/service/aws/factory/sim-aws-account-service-cache.d.ts.map +1 -1
  6. package/dist/service/aws/factory/sim-aws-account-service-cache.js +2 -0
  7. package/dist/service/aws/factory/sim-aws-account-service-cache.js.map +1 -1
  8. package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts +2 -0
  9. package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.d.ts.map +1 -1
  10. package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js +15 -1
  11. package/dist/service/cloudformation/cdk/s3/bucket-notifications/configuration/sim-cdk-bucket-notification-configuration.js.map +1 -1
  12. package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.d.ts +27 -0
  13. package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.d.ts.map +1 -0
  14. package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.js +44 -0
  15. package/dist/service/cloudformation/template/condition/sim-cfn-condition-comparison.js.map +1 -0
  16. package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.d.ts +36 -0
  17. package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.d.ts.map +1 -0
  18. package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.js +68 -0
  19. package/dist/service/cloudformation/template/condition/sim-cfn-condition-evaluator.js.map +1 -0
  20. package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.d.ts +45 -0
  21. package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.d.ts.map +1 -0
  22. package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.js +80 -0
  23. package/dist/service/cloudformation/template/condition/sim-cfn-condition-expression.js.map +1 -0
  24. package/dist/service/cloudformation/template/condition/sim-cfn-conditions.d.ts +28 -0
  25. package/dist/service/cloudformation/template/condition/sim-cfn-conditions.d.ts.map +1 -0
  26. package/dist/service/cloudformation/template/condition/sim-cfn-conditions.js +29 -0
  27. package/dist/service/cloudformation/template/condition/sim-cfn-conditions.js.map +1 -0
  28. package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.d.ts +46 -0
  29. package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.d.ts.map +1 -0
  30. package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.js +94 -0
  31. package/dist/service/cloudformation/template/condition/sim-cfn-resource-conditions.js.map +1 -0
  32. package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts +0 -1
  33. package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.d.ts.map +1 -1
  34. package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js +2 -14
  35. package/dist/service/cloudformation/template/node/fn/find-in-map/sim-cfn-fn-find-in-map.js.map +1 -1
  36. package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.d.ts +31 -0
  37. package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.d.ts.map +1 -0
  38. package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js +52 -0
  39. package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js.map +1 -0
  40. package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.d.ts +39 -0
  41. package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.d.ts.map +1 -0
  42. package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.js +82 -0
  43. package/dist/service/cloudformation/template/node/fn/select/sim-cfn-fn-select.js.map +1 -0
  44. package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.d.ts +31 -0
  45. package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.d.ts.map +1 -0
  46. package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.js +45 -0
  47. package/dist/service/cloudformation/template/node/fn/split/sim-cfn-fn-split.js.map +1 -0
  48. package/dist/service/cloudformation/template/node/sim-cfn-list.d.ts +1 -1
  49. package/dist/service/cloudformation/template/node/sim-cfn-list.d.ts.map +1 -1
  50. package/dist/service/cloudformation/template/node/sim-cfn-list.js +3 -2
  51. package/dist/service/cloudformation/template/node/sim-cfn-list.js.map +1 -1
  52. package/dist/service/cloudformation/template/node/sim-cfn-object.d.ts.map +1 -1
  53. package/dist/service/cloudformation/template/node/sim-cfn-object.js +5 -1
  54. package/dist/service/cloudformation/template/node/sim-cfn-object.js.map +1 -1
  55. package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.d.ts +19 -0
  56. package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.d.ts.map +1 -0
  57. package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.js +33 -0
  58. package/dist/service/cloudformation/template/parse/fn/if/sim-cfn-fn-if-parser.js.map +1 -0
  59. package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.d.ts +26 -0
  60. package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.d.ts.map +1 -0
  61. package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.js +35 -0
  62. package/dist/service/cloudformation/template/parse/fn/select/sim-cfn-fn-select-parser.js.map +1 -0
  63. package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.d.ts +3 -0
  64. package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.d.ts.map +1 -1
  65. package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.js +18 -0
  66. package/dist/service/cloudformation/template/parse/fn/sim-cfn-function-parser.js.map +1 -1
  67. package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.d.ts +25 -0
  68. package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.d.ts.map +1 -0
  69. package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.js +36 -0
  70. package/dist/service/cloudformation/template/parse/fn/split/sim-cfn-fn-split-parser.js.map +1 -0
  71. package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.d.ts +14 -4
  72. package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.d.ts.map +1 -1
  73. package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.js +7 -5
  74. package/dist/service/cloudformation/template/resolve/sim-cfn-resolve-context.js.map +1 -1
  75. package/dist/service/cloudformation/template/sim-cfn-template-body-validator.d.ts.map +1 -1
  76. package/dist/service/cloudformation/template/sim-cfn-template-body-validator.js +4 -0
  77. package/dist/service/cloudformation/template/sim-cfn-template-body-validator.js.map +1 -1
  78. package/dist/service/cloudformation/template/sim-cfn-template.d.ts +14 -0
  79. package/dist/service/cloudformation/template/sim-cfn-template.d.ts.map +1 -1
  80. package/dist/service/cloudformation/template/sim-cfn-template.js +44 -12
  81. package/dist/service/cloudformation/template/sim-cfn-template.js.map +1 -1
  82. package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.d.ts +20 -0
  83. package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.d.ts.map +1 -1
  84. package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.js +32 -2
  85. package/dist/service/cloudformation/template/value/sim-cfn-template-value-resolver.js.map +1 -1
  86. package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.d.ts +11 -0
  87. package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.d.ts.map +1 -0
  88. package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.js +21 -0
  89. package/dist/service/cloudformation/template/value/sim-cfn-unresolved-expression.js.map +1 -0
  90. package/dist/service/cloudformation/template/value/sim-cfn-value-path.d.ts +22 -0
  91. package/dist/service/cloudformation/template/value/sim-cfn-value-path.d.ts.map +1 -0
  92. package/dist/service/cloudformation/template/value/sim-cfn-value-path.js +92 -0
  93. package/dist/service/cloudformation/template/value/sim-cfn-value-path.js.map +1 -0
  94. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts +7 -0
  95. package/dist/service/cloudfront/command/create-distribution/create-distribution.command.d.ts.map +1 -1
  96. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts +2 -0
  97. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.d.ts.map +1 -1
  98. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.js +1 -1
  99. package/dist/service/cloudfront/command/create-distribution/create-distribution.handler.js.map +1 -1
  100. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts +10 -1
  101. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.d.ts.map +1 -1
  102. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js +21 -1
  103. package/dist/service/cloudfront/distribution/configurator/sim-cloud-front-origin-configurator.js.map +1 -1
  104. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.d.ts +24 -0
  105. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.d.ts.map +1 -0
  106. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.d.ts +7 -0
  107. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.d.ts.map +1 -0
  108. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.js +38 -0
  109. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.factory.js.map +1 -0
  110. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.js +2 -0
  111. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-dispatcher.js.map +1 -0
  112. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +17 -0
  113. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts.map +1 -0
  114. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js +37 -0
  115. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js.map +1 -0
  116. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts +38 -0
  117. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.d.ts.map +1 -0
  118. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js +45 -0
  119. package/dist/service/cloudfront/origin/custom/sim-cloudfront-custom-origin.js.map +1 -0
  120. package/dist/service/cloudfront/sim-cloudfront.d.ts +3 -0
  121. package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
  122. package/dist/service/cloudfront/sim-cloudfront.js +4 -1
  123. package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
  124. package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.d.ts +4 -0
  125. package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.d.ts.map +1 -1
  126. package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.js +2 -0
  127. package/dist/service/dynamodb/command/sim-dynamodb-command-handlers.js.map +1 -1
  128. package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.d.ts +6 -0
  129. package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.d.ts.map +1 -1
  130. package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.js +11 -0
  131. package/dist/service/dynamodb/command/table/sim-dynamodb-create-table.js.map +1 -1
  132. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.d.ts +6 -5
  133. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.d.ts.map +1 -1
  134. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.js +6 -16
  135. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-table-input.js.map +1 -1
  136. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.d.ts +4 -4
  137. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.d.ts.map +1 -1
  138. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.js +4 -9
  139. package/dist/service/dynamodb/command/table/sim-dynamodb-unsimulated-update-input.js.map +1 -1
  140. package/dist/service/dynamodb/command/table/table.command.d.ts +2 -1
  141. package/dist/service/dynamodb/command/table/table.command.d.ts.map +1 -1
  142. package/dist/service/dynamodb/command/table/table.types.d.ts +4 -7
  143. package/dist/service/dynamodb/command/table/table.types.d.ts.map +1 -1
  144. package/dist/service/dynamodb/sim-dynamodb.d.ts +42 -60
  145. package/dist/service/dynamodb/sim-dynamodb.d.ts.map +1 -1
  146. package/dist/service/dynamodb/sim-dynamodb.js +48 -60
  147. package/dist/service/dynamodb/sim-dynamodb.js.map +1 -1
  148. package/dist/service/dynamodb/stream/sim-dynamodb-item-change.d.ts +34 -0
  149. package/dist/service/dynamodb/stream/sim-dynamodb-item-change.d.ts.map +1 -0
  150. package/dist/service/dynamodb/stream/sim-dynamodb-item-change.js +2 -0
  151. package/dist/service/dynamodb/stream/sim-dynamodb-item-change.js.map +1 -0
  152. package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.d.ts +42 -0
  153. package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.d.ts.map +1 -0
  154. package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.js +35 -0
  155. package/dist/service/dynamodb/stream/sim-dynamodb-stream-activity.js.map +1 -0
  156. package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.d.ts +22 -0
  157. package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.d.ts.map +1 -0
  158. package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.js +30 -0
  159. package/dist/service/dynamodb/stream/sim-dynamodb-stream-arn.js.map +1 -0
  160. package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.d.ts +22 -0
  161. package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.d.ts.map +1 -0
  162. package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.js +27 -0
  163. package/dist/service/dynamodb/stream/sim-dynamodb-stream-images.js.map +1 -0
  164. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.d.ts +15 -0
  165. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.d.ts.map +1 -0
  166. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.js +25 -0
  167. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-keys.js.map +1 -0
  168. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.d.ts +11 -0
  169. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.d.ts.map +1 -0
  170. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.js +74 -0
  171. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record-size.js.map +1 -0
  172. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.d.ts +49 -0
  173. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.d.ts.map +1 -0
  174. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.js +60 -0
  175. package/dist/service/dynamodb/stream/sim-dynamodb-stream-record.js.map +1 -0
  176. package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.d.ts +18 -0
  177. package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.d.ts.map +1 -0
  178. package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.js +31 -0
  179. package/dist/service/dynamodb/stream/sim-dynamodb-stream-sequence-numbers.js.map +1 -0
  180. package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.d.ts +39 -0
  181. package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.d.ts.map +1 -0
  182. package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.js +64 -0
  183. package/dist/service/dynamodb/stream/sim-dynamodb-stream-shard.js.map +1 -0
  184. package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.d.ts +28 -0
  185. package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.d.ts.map +1 -0
  186. package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.js +30 -0
  187. package/dist/service/dynamodb/stream/sim-dynamodb-stream-specification.js.map +1 -0
  188. package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.d.ts +26 -0
  189. package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.d.ts.map +1 -0
  190. package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.js +29 -0
  191. package/dist/service/dynamodb/stream/sim-dynamodb-stream-store.js.map +1 -0
  192. package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.d.ts +13 -0
  193. package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.d.ts.map +1 -0
  194. package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.js +48 -0
  195. package/dist/service/dynamodb/stream/sim-dynamodb-stream-update.js.map +1 -0
  196. package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.d.ts +10 -0
  197. package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.d.ts.map +1 -0
  198. package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.js +38 -0
  199. package/dist/service/dynamodb/stream/sim-dynamodb-stream-view-type.js.map +1 -0
  200. package/dist/service/dynamodb/stream/sim-dynamodb-stream.d.ts +74 -0
  201. package/dist/service/dynamodb/stream/sim-dynamodb-stream.d.ts.map +1 -0
  202. package/dist/service/dynamodb/stream/sim-dynamodb-stream.js +82 -0
  203. package/dist/service/dynamodb/stream/sim-dynamodb-stream.js.map +1 -0
  204. package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.d.ts +24 -0
  205. package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.d.ts.map +1 -0
  206. package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.js +2 -0
  207. package/dist/service/dynamodb/stream/sim-dynamodb-stream.types.js.map +1 -0
  208. package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.d.ts +31 -0
  209. package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.d.ts.map +1 -0
  210. package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.js +45 -0
  211. package/dist/service/dynamodb/stream/sim-dynamodb-streamed-table.factory.js.map +1 -0
  212. package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.d.ts +97 -0
  213. package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.d.ts.map +1 -0
  214. package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.js +135 -0
  215. package/dist/service/dynamodb/stream/sim-dynamodb-table-stream.js.map +1 -0
  216. package/dist/service/dynamodb/table/sim-dynamodb-table-description.d.ts.map +1 -1
  217. package/dist/service/dynamodb/table/sim-dynamodb-table-description.js +6 -0
  218. package/dist/service/dynamodb/table/sim-dynamodb-table-description.js.map +1 -1
  219. package/dist/service/dynamodb/table/sim-dynamodb-table-items.d.ts +33 -1
  220. package/dist/service/dynamodb/table/sim-dynamodb-table-items.d.ts.map +1 -1
  221. package/dist/service/dynamodb/table/sim-dynamodb-table-items.js +46 -1
  222. package/dist/service/dynamodb/table/sim-dynamodb-table-items.js.map +1 -1
  223. package/dist/service/dynamodb/table/sim-dynamodb-table-storage.d.ts +95 -0
  224. package/dist/service/dynamodb/table/sim-dynamodb-table-storage.d.ts.map +1 -0
  225. package/dist/service/dynamodb/table/sim-dynamodb-table-storage.js +120 -0
  226. package/dist/service/dynamodb/table/sim-dynamodb-table-storage.js.map +1 -0
  227. package/dist/service/dynamodb/table/sim-dynamodb-table-update.d.ts +2 -0
  228. package/dist/service/dynamodb/table/sim-dynamodb-table-update.d.ts.map +1 -1
  229. package/dist/service/dynamodb/table/sim-dynamodb-table-update.js +11 -6
  230. package/dist/service/dynamodb/table/sim-dynamodb-table-update.js.map +1 -1
  231. package/dist/service/dynamodb/table/sim-dynamodb-table.d.ts +33 -70
  232. package/dist/service/dynamodb/table/sim-dynamodb-table.d.ts.map +1 -1
  233. package/dist/service/dynamodb/table/sim-dynamodb-table.js +50 -93
  234. package/dist/service/dynamodb/table/sim-dynamodb-table.js.map +1 -1
  235. package/dist/service/dynamodb/table/sim-dynamodb-updatable-table.d.ts +6 -3
  236. package/dist/service/dynamodb/table/sim-dynamodb-updatable-table.d.ts.map +1 -1
  237. package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.d.ts.map +1 -1
  238. package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.js +5 -1
  239. package/dist/service/dynamodb/time-to-live/sim-dynamodb-table-time-to-live.js.map +1 -1
  240. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +5 -2
  241. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -1
  242. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +13 -8
  243. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -1
  244. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts +4 -0
  245. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts.map +1 -1
  246. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +32 -21
  247. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js.map +1 -1
  248. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts +1 -6
  249. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts.map +1 -1
  250. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js +1 -22
  251. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js.map +1 -1
  252. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts +2 -1
  253. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -1
  254. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +3 -2
  255. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -1
  256. package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.d.ts +17 -0
  257. package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.d.ts.map +1 -0
  258. package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.js +46 -0
  259. package/dist/service/lambda/event-source/poll/sim-lambda-batch-item-failures.js.map +1 -0
  260. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.d.ts +39 -0
  261. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.d.ts.map +1 -0
  262. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.js +28 -0
  263. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.js.map +1 -0
  264. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts +33 -7
  265. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts.map +1 -1
  266. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js +7 -6
  267. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js.map +1 -1
  268. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.d.ts +25 -0
  269. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.d.ts.map +1 -0
  270. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.js +16 -0
  271. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.js.map +1 -0
  272. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts +9 -69
  273. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts.map +1 -1
  274. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js +1 -135
  275. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js.map +1 -1
  276. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts +6 -30
  277. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts.map +1 -1
  278. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js +9 -66
  279. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js.map +1 -1
  280. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.d.ts +17 -0
  281. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.d.ts.map +1 -0
  282. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.js +17 -0
  283. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-delivery.js.map +1 -0
  284. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.d.ts +88 -0
  285. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.d.ts.map +1 -0
  286. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.js +132 -0
  287. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-poller.js.map +1 -0
  288. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.d.ts +41 -0
  289. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.d.ts.map +1 -0
  290. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.js +60 -0
  291. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.js.map +1 -0
  292. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +23 -5
  293. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts.map +1 -1
  294. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +65 -12
  295. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js.map +1 -1
  296. package/dist/service/lambda/event-source/sim-lambda-event-source-arn.d.ts +23 -0
  297. package/dist/service/lambda/event-source/sim-lambda-event-source-arn.d.ts.map +1 -0
  298. package/dist/service/lambda/event-source/sim-lambda-event-source-arn.js +30 -0
  299. package/dist/service/lambda/event-source/sim-lambda-event-source-arn.js.map +1 -0
  300. package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.d.ts +26 -0
  301. package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.d.ts.map +1 -0
  302. package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.js +35 -0
  303. package/dist/service/lambda/event-source/sim-lambda-event-source-batch-rules.js.map +1 -0
  304. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +6 -8
  305. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -1
  306. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +6 -9
  307. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -1
  308. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts +5 -5
  309. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts.map +1 -1
  310. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js +5 -5
  311. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js.map +1 -1
  312. package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.d.ts +18 -0
  313. package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.d.ts.map +1 -0
  314. package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.js +23 -0
  315. package/dist/service/lambda/event-source/sim-lambda-event-source-polling-permission.js.map +1 -0
  316. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts +7 -3
  317. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts.map +1 -1
  318. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js +13 -21
  319. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js.map +1 -1
  320. package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.d.ts +7 -25
  321. package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.d.ts.map +1 -1
  322. package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.js +10 -31
  323. package/dist/service/s3/bucket/notification/sim-s3-lambda-notification.js.map +1 -1
  324. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.d.ts +6 -10
  325. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.d.ts.map +1 -1
  326. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js +16 -68
  327. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration-reader.js.map +1 -1
  328. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts +17 -4
  329. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.d.ts.map +1 -1
  330. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js +19 -10
  331. package/dist/service/s3/bucket/notification/sim-s3-notification-configuration.js.map +1 -1
  332. package/dist/service/s3/bucket/notification/sim-s3-notification-ids.d.ts +9 -0
  333. package/dist/service/s3/bucket/notification/sim-s3-notification-ids.d.ts.map +1 -0
  334. package/dist/service/s3/bucket/notification/sim-s3-notification-ids.js +18 -0
  335. package/dist/service/s3/bucket/notification/sim-s3-notification-ids.js.map +1 -0
  336. package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.d.ts +5 -3
  337. package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.d.ts.map +1 -1
  338. package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.js +3 -1
  339. package/dist/service/s3/bucket/notification/sim-s3-notification-overlap.js.map +1 -1
  340. package/dist/service/s3/bucket/notification/sim-s3-notification-properties.d.ts +19 -0
  341. package/dist/service/s3/bucket/notification/sim-s3-notification-properties.d.ts.map +1 -0
  342. package/dist/service/s3/bucket/notification/sim-s3-notification-properties.js +27 -0
  343. package/dist/service/s3/bucket/notification/sim-s3-notification-properties.js.map +1 -0
  344. package/dist/service/s3/bucket/notification/sim-s3-notification.d.ts +61 -0
  345. package/dist/service/s3/bucket/notification/sim-s3-notification.d.ts.map +1 -0
  346. package/dist/service/s3/bucket/notification/sim-s3-notification.js +50 -0
  347. package/dist/service/s3/bucket/notification/sim-s3-notification.js.map +1 -0
  348. package/dist/service/s3/bucket/notification/sim-s3-queue-notification.d.ts +21 -0
  349. package/dist/service/s3/bucket/notification/sim-s3-queue-notification.d.ts.map +1 -0
  350. package/dist/service/s3/bucket/notification/sim-s3-queue-notification.js +24 -0
  351. package/dist/service/s3/bucket/notification/sim-s3-queue-notification.js.map +1 -0
  352. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts +10 -0
  353. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.d.ts.map +1 -0
  354. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js +31 -0
  355. package/dist/service/s3/bucket/notification/sim-s3-unsimulated-notification-destinations.js.map +1 -0
  356. package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts +3 -0
  357. package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.d.ts.map +1 -1
  358. package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js +30 -1
  359. package/dist/service/s3/cfn/bucket/notification/sim-cfn-s3-bucket-notification-configuration.js.map +1 -1
  360. package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts +2 -1
  361. package/dist/service/s3/command/get-bucket-notification-configuration/get-bucket-notification-configuration.command.d.ts.map +1 -1
  362. package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts +10 -1
  363. package/dist/service/s3/command/put-bucket-notification-configuration/put-bucket-notification-configuration.command.d.ts.map +1 -1
  364. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts +0 -4
  365. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts.map +1 -1
  366. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +1 -4
  367. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js.map +1 -1
  368. package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.d.ts.map +1 -1
  369. package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.js +6 -4
  370. package/dist/service/s3/notification/destination/sim-s3-notification-destination-check.js.map +1 -1
  371. package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts +20 -2
  372. package/dist/service/s3/notification/destination/sim-s3-notification-destination.d.ts.map +1 -1
  373. package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts +12 -10
  374. package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.d.ts.map +1 -1
  375. package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js +19 -17
  376. package/dist/service/s3/notification/destination/sim-s3-service-notification-destinations.js.map +1 -1
  377. package/dist/service/s3/notification/destination/sim-s3-service-principal.d.ts +8 -0
  378. package/dist/service/s3/notification/destination/sim-s3-service-principal.d.ts.map +1 -0
  379. package/dist/service/s3/notification/destination/sim-s3-service-principal.js +8 -0
  380. package/dist/service/s3/notification/destination/sim-s3-service-principal.js.map +1 -0
  381. package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.d.ts +40 -0
  382. package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.d.ts.map +1 -0
  383. package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.js +52 -0
  384. package/dist/service/s3/notification/destination/sqs/sim-aws-s3-notification-queues.js.map +1 -0
  385. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.d.ts +33 -0
  386. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.d.ts.map +1 -0
  387. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.js +64 -0
  388. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue-arn.js.map +1 -0
  389. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.d.ts +33 -0
  390. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.d.ts.map +1 -0
  391. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.js +55 -0
  392. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queue.js.map +1 -0
  393. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.d.ts +23 -0
  394. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.d.ts.map +1 -0
  395. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.js +2 -0
  396. package/dist/service/s3/notification/destination/sqs/sim-s3-notification-queues.js.map +1 -0
  397. package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.d.ts +40 -0
  398. package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.d.ts.map +1 -0
  399. package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.js +51 -0
  400. package/dist/service/s3/notification/destination/sqs/sim-s3-sqs-notification-destination.js.map +1 -0
  401. package/dist/service/s3/notification/sim-s3-notification-dispatcher.d.ts +2 -2
  402. package/dist/service/s3/notification/sim-s3-notification-dispatcher.d.ts.map +1 -1
  403. package/dist/service/s3/notification/sim-s3-notification-dispatcher.js +6 -3
  404. package/dist/service/s3/notification/sim-s3-notification-dispatcher.js.map +1 -1
  405. package/dist/service/sqs/command/authorize/sim-sqs-condition-context.d.ts.map +1 -1
  406. package/dist/service/sqs/command/authorize/sim-sqs-condition-context.js +9 -5
  407. package/dist/service/sqs/command/authorize/sim-sqs-condition-context.js.map +1 -1
  408. package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.d.ts +40 -0
  409. package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.d.ts.map +1 -0
  410. package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.js +40 -0
  411. package/dist/service/sqs/command/authorize/sim-sqs-service-send-authorizer.js.map +1 -0
  412. package/dist/service/sqs/command/sim-sqs-request-options.d.ts +16 -0
  413. package/dist/service/sqs/command/sim-sqs-request-options.d.ts.map +1 -1
  414. package/dist/service/sqs/command/sim-sqs-request-options.js +9 -0
  415. package/dist/service/sqs/command/sim-sqs-request-options.js.map +1 -1
  416. package/dist/service/sqs/index.d.ts +2 -2
  417. package/dist/service/sqs/index.d.ts.map +1 -1
  418. package/dist/service/sqs/index.js +2 -2
  419. package/dist/service/sqs/index.js.map +1 -1
  420. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +17 -2
  421. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -1
  422. package/dist/service/sqs/queue/sim-sqs-queue-arn.js +9 -5
  423. package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -1
  424. package/package.json +4 -4
@@ -1,6 +1,8 @@
1
+ import { simulatedEventSourcesDescription } from "../../event-source/sim-lambda-event-source-arn.js";
1
2
  import { SimLambdaInvalidParameterValueException } from "../../error/sim-lambda.error.js";
2
3
  /**
3
- * The inputs a mapping cannot be created with here, and why each is refused.
4
+ * The inputs no simulated event source has behaviour for, and why each is
5
+ * refused.
4
6
  *
5
7
  * Every one of them changes what a function sees or when it sees it, so
6
8
  * accepting and ignoring one would let a test pass on behaviour the deployment
@@ -16,26 +18,6 @@ const unsimulatedInputs = new Map([
16
18
  ["BisectBatchOnFunctionError", "batch bisection is not simulated"],
17
19
  ["ParallelizationFactor", "polling concurrency is not simulated"],
18
20
  ["TumblingWindowInSeconds", "tumbling windows are not simulated"],
19
- ["StartingPosition", "SQS queues are the only simulated event source"],
20
- [
21
- "StartingPositionTimestamp",
22
- "SQS queues are the only simulated event source",
23
- ],
24
- ["Topics", "SQS queues are the only simulated event source"],
25
- ["Queues", "SQS queues are the only simulated event source"],
26
- ["SelfManagedEventSource", "SQS queues are the only simulated event source"],
27
- [
28
- "SelfManagedKafkaEventSourceConfig",
29
- "SQS queues are the only simulated event source",
30
- ],
31
- [
32
- "AmazonManagedKafkaEventSourceConfig",
33
- "SQS queues are the only simulated event source",
34
- ],
35
- [
36
- "DocumentDBEventSourceConfig",
37
- "SQS queues are the only simulated event source",
38
- ],
39
21
  [
40
22
  "SourceAccessConfigurations",
41
23
  "event source authentication is not simulated",
@@ -44,6 +26,24 @@ const unsimulatedInputs = new Map([
44
26
  ["KMSKeyArn", "filter criteria encryption is not simulated"],
45
27
  ["Tags", "tags are not simulated"],
46
28
  ]);
29
+ /**
30
+ * The inputs that only mean something for an event source this simulation does
31
+ * not have.
32
+ *
33
+ * None of them is a thing that is missing from the sources here. Each one
34
+ * configures a source the ARN dispatcher refuses outright, so naming one is a
35
+ * request for a different kind of mapping rather than for a feature.
36
+ */
37
+ const unsupportedEventSourceInputs = new Set([
38
+ "StartingPosition",
39
+ "StartingPositionTimestamp",
40
+ "Topics",
41
+ "Queues",
42
+ "SelfManagedEventSource",
43
+ "SelfManagedKafkaEventSourceConfig",
44
+ "AmazonManagedKafkaEventSourceConfig",
45
+ "DocumentDBEventSourceConfig",
46
+ ]);
47
47
  /**
48
48
  * Refuse an input this simulation has no behaviour for.
49
49
  */
@@ -61,4 +61,15 @@ export function refuseUnsimulatedInput(input) {
61
61
  "on the queue, so a batching window would have nothing to wait for");
62
62
  }
63
63
  }
64
+ /**
65
+ * Refuse an input belonging to an event source this simulation does not have.
66
+ */
67
+ export function refuseUnsupportedEventSourceInput(input) {
68
+ for (const [name, value] of Object.entries(input)) {
69
+ if (value !== undefined && unsupportedEventSourceInputs.has(name)) {
70
+ throw new SimLambdaInvalidParameterValueException(`${name} on an event source mapping is for an event source this ` +
71
+ `simulation does not have: ${simulatedEventSourcesDescription}`);
72
+ }
73
+ }
74
+ }
64
75
  //# sourceMappingURL=create-event-source-mapping-refusals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-event-source-mapping-refusals.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAG1F;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAgC,IAAI,GAAG,CAAC;IAC7D,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;IACtD,CAAC,eAAe,EAAE,sCAAsC,CAAC;IACzD,CAAC,yBAAyB,EAAE,sCAAsC,CAAC;IACnE,CAAC,mBAAmB,EAAE,wCAAwC,CAAC;IAC/D,CAAC,sBAAsB,EAAE,gCAAgC,CAAC;IAC1D,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;IAC9D,CAAC,4BAA4B,EAAE,kCAAkC,CAAC;IAClE,CAAC,uBAAuB,EAAE,sCAAsC,CAAC;IACjE,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;IACjE,CAAC,kBAAkB,EAAE,gDAAgD,CAAC;IACtE;QACE,2BAA2B;QAC3B,gDAAgD;KACjD;IACD,CAAC,QAAQ,EAAE,gDAAgD,CAAC;IAC5D,CAAC,QAAQ,EAAE,gDAAgD,CAAC;IAC5D,CAAC,wBAAwB,EAAE,gDAAgD,CAAC;IAC5E;QACE,mCAAmC;QACnC,gDAAgD;KACjD;IACD;QACE,qCAAqC;QACrC,gDAAgD;KACjD;IACD;QACE,6BAA6B;QAC7B,gDAAgD;KACjD;IACD;QACE,4BAA4B;QAC5B,8CAA8C;KAC/C;IACD,CAAC,eAAe,EAAE,wCAAwC,CAAC;IAC3D,CAAC,WAAW,EAAE,6CAA6C,CAAC;IAC5D,CAAC,MAAM,EAAE,wBAAwB,CAAC;CACnC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA8C;IAE9C,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAChD,MAAM,IAAI,uCAAuC,CAC/C,GAAG,IAAI,iDAAiD,MAAM,EAAE,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IACE,KAAK,CAAC,8BAA8B,KAAK,SAAS;QAClD,KAAK,CAAC,8BAA8B,KAAK,CAAC,EAC1C,CAAC;QACD,MAAM,IAAI,uCAAuC,CAC/C,oEAAoE;YAClE,sEAAsE;YACtE,mEAAmE,CACtE,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"create-event-source-mapping-refusals.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AACrG,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAG1F;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAgC,IAAI,GAAG,CAAC;IAC7D,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;IACtD,CAAC,eAAe,EAAE,sCAAsC,CAAC;IACzD,CAAC,yBAAyB,EAAE,sCAAsC,CAAC;IACnE,CAAC,mBAAmB,EAAE,wCAAwC,CAAC;IAC/D,CAAC,sBAAsB,EAAE,gCAAgC,CAAC;IAC1D,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;IAC9D,CAAC,4BAA4B,EAAE,kCAAkC,CAAC;IAClE,CAAC,uBAAuB,EAAE,sCAAsC,CAAC;IACjE,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;IACjE;QACE,4BAA4B;QAC5B,8CAA8C;KAC/C;IACD,CAAC,eAAe,EAAE,wCAAwC,CAAC;IAC3D,CAAC,WAAW,EAAE,6CAA6C,CAAC;IAC5D,CAAC,MAAM,EAAE,wBAAwB,CAAC;CACnC,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,4BAA4B,GAAwB,IAAI,GAAG,CAAC;IAChE,kBAAkB;IAClB,2BAA2B;IAC3B,QAAQ;IACR,QAAQ;IACR,wBAAwB;IACxB,mCAAmC;IACnC,qCAAqC;IACrC,6BAA6B;CAC9B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA8C;IAE9C,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAChD,MAAM,IAAI,uCAAuC,CAC/C,GAAG,IAAI,iDAAiD,MAAM,EAAE,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IACE,KAAK,CAAC,8BAA8B,KAAK,SAAS;QAClD,KAAK,CAAC,8BAA8B,KAAK,CAAC,EAC1C,CAAC;QACD,MAAM,IAAI,uCAAuC,CAC/C,oEAAoE;YAClE,sEAAsE;YACtE,mEAAmE,CACtE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAC/C,KAA8C;IAE9C,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,IAAI,KAAK,KAAK,SAAS,IAAI,4BAA4B,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAClE,MAAM,IAAI,uCAAuC,CAC/C,GAAG,IAAI,0DAA0D;gBAC/D,6BAA6B,gCAAgC,EAAE,CAClE,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,10 +1,5 @@
1
- import { type SimLambdaFunctionResponseType } from "../../event-source/sim-lambda-event-source-mapping.js";
1
+ import type { SimLambdaFunctionResponseType } from "../../event-source/sim-lambda-event-source-mapping.js";
2
2
  import type { SimCreateEventSourceMappingCommandInput } from "./event-source-mapping.command.js";
3
- /**
4
- * The batch size a mapping delivers with, refusing one a queue with no
5
- * batching window would never fill.
6
- */
7
- export declare function batchSizeIn(input: SimCreateEventSourceMappingCommandInput): number;
8
3
  /**
9
4
  * The response types the function reports, refusing one Lambda does not have.
10
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-event-source-mapping-values.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,uDAAuD,CAAC;AAK/D,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,mCAAmC,CAAC;AAQjG;;;GAGG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,uCAAuC,GAC7C,MAAM,CAiBR;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,uCAAuC,GAC7C,SAAS,6BAA6B,EAAE,CAa1C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,EAAE,MAAM,GACZ,MAAM,CASR"}
1
+ {"version":3,"file":"create-event-source-mapping-values.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uDAAuD,CAAC;AAE3G,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,mCAAmC,CAAC;AAEjG;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,uCAAuC,GAC7C,SAAS,6BAA6B,EAAE,CAa1C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,KAAK,EAAE,MAAM,GACZ,MAAM,CASR"}
@@ -1,25 +1,4 @@
1
- import { DEFAULT_SIM_LAMBDA_EVENT_SOURCE_BATCH_SIZE, } from "../../event-source/sim-lambda-event-source-mapping.js";
2
- import { SimLambdaInvalidParameterValueException, SimLambdaValidationException, } from "../../error/sim-lambda.error.js";
3
- /**
4
- * The largest batch real Lambda delivers from a standard queue without a
5
- * batching window to fill it.
6
- */
7
- const maximumBatchSize = 10;
8
- /**
9
- * The batch size a mapping delivers with, refusing one a queue with no
10
- * batching window would never fill.
11
- */
12
- export function batchSizeIn(input) {
13
- const batchSize = input.BatchSize ?? DEFAULT_SIM_LAMBDA_EVENT_SOURCE_BATCH_SIZE;
14
- if (!Number.isSafeInteger(batchSize) ||
15
- batchSize < 1 ||
16
- batchSize > maximumBatchSize) {
17
- throw new SimLambdaInvalidParameterValueException(`BatchSize ${String(batchSize)} is out of range: a queue with no ` +
18
- `batching window delivers a whole number of messages between 1 and ` +
19
- `${String(maximumBatchSize)} at a time`);
20
- }
21
- return batchSize;
22
- }
1
+ import { SimLambdaValidationException } from "../../error/sim-lambda.error.js";
23
2
  /**
24
3
  * The response types the function reports, refusing one Lambda does not have.
25
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-event-source-mapping-values.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-values.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,GAE3C,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,uCAAuC,EACvC,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAGzC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,KAA8C;IAE9C,MAAM,SAAS,GACb,KAAK,CAAC,SAAS,IAAI,0CAA0C,CAAC;IAEhE,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;QAChC,SAAS,GAAG,CAAC;QACb,SAAS,GAAG,gBAAgB,EAC5B,CAAC;QACD,MAAM,IAAI,uCAAuC,CAC/C,aAAa,MAAM,CAAC,SAAS,CAAC,oCAAoC;YAChE,oEAAoE;YACpE,GAAG,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAC1C,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAA8C;IAE9C,MAAM,aAAa,GAAG,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC;IAExD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,YAAY,KAAK,yBAAyB,EAAE,CAAC;YAC/C,MAAM,IAAI,4BAA4B,CACpC,+BAA+B,YAAY,mBAAmB;gBAC5D,iEAAiE,CACpE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,aAAyD,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAyB,EACzB,KAAa;IAEb,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,4BAA4B,CACpC,+CAA+C,KAAK,cAAc;YAChE,6CAA6C,CAChD,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"create-event-source-mapping-values.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping-values.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAG/E;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAA8C;IAE9C,MAAM,aAAa,GAAG,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC;IAExD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,YAAY,KAAK,yBAAyB,EAAE,CAAC;YAC/C,MAAM,IAAI,4BAA4B,CACpC,+BAA+B,YAAY,mBAAmB;gBAC5D,iEAAiE,CACpE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,aAAyD,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAyB,EACzB,KAAa;IAEb,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,4BAA4B,CACpC,+CAA+C,KAAK,cAAc;YAChE,6CAA6C,CAChD,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -40,7 +40,8 @@ export declare class CreateEventSourceMappingCommandHandler implements CommandHa
40
40
  */
41
41
  handle(command: SimCreateEventSourceMappingCommand, options?: CreateEventSourceMappingCommandHandlerOptions): Promise<SimCreateEventSourceMappingCommandOutput>;
42
42
  /**
43
- * Refuse a mapping whose queue cannot be polled as the execution role.
43
+ * Refuse a mapping whose event source cannot be polled as the execution
44
+ * role.
44
45
  *
45
46
  * The role's permission is checked before the queue is read, so a role with
46
47
  * no access is told what it is missing rather than being told the queue does
@@ -1 +1 @@
1
- {"version":3,"file":"create-event-source-mapping.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AAG7G,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AACpH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAGzG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAGhG,OAAO,KAAK,EACV,kCAAkC,EAClC,wCAAwC,EACzC,MAAM,mCAAmC,CAAC;AAE3C,UAAU,gDAAgD;IACxD,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,gCAAgC,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED,UAAU,6CAA6C;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,qBAAa,sCAAuC,YAAW,cAAc,CAC3E,kCAAkC,EAClC,wCAAwC,CACzC;IACC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmD;IAC9E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;IAEtE,YAAY,UAAU,EAAE,gDAAgD,EASvE;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,6CAA6C,GACtD,OAAO,CAAC,wCAAwC,CAAC,CAwBnD;IAED;;;;;;OAMG;YACW,cAAc;IAiB5B,OAAO,CAAC,OAAO;CAoBhB"}
1
+ {"version":3,"file":"create-event-source-mapping.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AAG7G,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AACpH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAGzG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAGhG,OAAO,KAAK,EACV,kCAAkC,EAClC,wCAAwC,EACzC,MAAM,mCAAmC,CAAC;AAE3C,UAAU,gDAAgD;IACxD,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,gCAAgC,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED,UAAU,6CAA6C;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,qBAAa,sCAAuC,YAAW,cAAc,CAC3E,kCAAkC,EAClC,wCAAwC,CACzC;IACC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmD;IAC9E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;IAEtE,YAAY,UAAU,EAAE,gDAAgD,EASvE;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,6CAA6C,GACtD,OAAO,CAAC,wCAAwC,CAAC,CAwBnD;IAED;;;;;;;OAOG;YACW,cAAc;IAc5B,OAAO,CAAC,OAAO;CAoBhB"}
@@ -43,14 +43,15 @@ export class CreateEventSourceMappingCommandHandler {
43
43
  };
44
44
  }
45
45
  /**
46
- * Refuse a mapping whose queue cannot be polled as the execution role.
46
+ * Refuse a mapping whose event source cannot be polled as the execution
47
+ * role.
47
48
  *
48
49
  * The role's permission is checked before the queue is read, so a role with
49
50
  * no access is told what it is missing rather than being told the queue does
50
51
  * not exist.
51
52
  */
52
53
  async assertPollable(simFunction, eventSourceArn) {
53
- this.rolePermissions.assertMayPoll(simFunction.roleArn, eventSourceArn.value);
54
+ this.rolePermissions.assertMayPoll(simFunction.roleArn, eventSourceArn);
54
55
  // Reading the queue's attributes as the role is how the mapping finds out
55
56
  // the queue is there at all, exactly as the poller will.
56
57
  await this.properties.queues.visibilityTimeoutSeconds({
@@ -1 +1 @@
1
- {"version":3,"file":"create-event-source-mapping.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAGpG,OAAO,EAAE,mCAAmC,EAAE,MAAM,gEAAgE,CAAC;AAGrH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAoB1F;;;;;;;;;GASG;AACH,MAAM,OAAO,sCAAsC;IAIhC,UAAU,CAAmD;IAC7D,UAAU,CAAwB;IAClC,eAAe,CAAsC;IAEtE,YAAY,UAA4D;QACtE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,qBAAqB,CAAC;YAC1C,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,MAAM,EAAE,iCAAiC;SAC1C,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,GAAG,IAAI,mCAAmC,CAAC;YAC7D,GAAG,EAAE,UAAU,CAAC,GAAG;SACpB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAA2C,EAC3C,OAAuD;QAEvD,MAAM,KAAK,GAAG,gCAAgC,CAAC,EAAE,CAC/C,OAAO,CAAC,KAAK,EACb,IAAI,CAAC,UAAU,CAAC,kBAAkB,CACnC,CAAC;QAEF,oEAAoE;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAE5C,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAEtC,IAAI,CAAC,UAAU,CAAC,SAAS,CACvB,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,EACzC,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAE1D,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAE7D,OAAO;YACL,SAAS,EAAE,EAAE;YACb,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE;SACpD,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,KAAK,CAAC,cAAc,CAC1B,WAA8B,EAC9B,cAA0C;QAE1C,IAAI,CAAC,eAAe,CAAC,aAAa,CAChC,WAAW,CAAC,OAAO,EACnB,cAAc,CAAC,KAAK,CACrB,CAAC;QAEF,0EAA0E;QAC1E,yDAAyD;QACzD,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,wBAAwB,CAAC;YACpD,QAAQ,EAAE,cAAc,CAAC,KAAK;YAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,CAAC,OAAO,EAAE;SAClD,CAAC,CAAC;IACL,CAAC;IAEO,OAAO,CACb,KAAuC,EACvC,WAA8B;QAE9B,MAAM,OAAO,GAAG,IAAI,2BAA2B,CAAC;YAC9C,kBAAkB,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB;YACtD,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK;YAC1C,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,WAAW,EAAE,WAAW,CAAC,GAAG;YAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;YAClD,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE;SAC5C,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAE7D,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
1
+ {"version":3,"file":"create-event-source-mapping.handler.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The batch item failure report a function may send back.
3
+ *
4
+ * Reading the report is the same for every event source that accepts one: the
5
+ * mapping has to have been told to expect it, and the entries have to name
6
+ * something. What is done with the ids it names belongs to the source, so that
7
+ * stays with the source's own batch response.
8
+ */
9
+ export declare class SimLambdaBatchItemFailures {
10
+ private readonly reportsBatchItemFailures;
11
+ constructor(reportsBatchItemFailures: boolean);
12
+ /**
13
+ * The item ids a report names, or undefined when the function reported none.
14
+ */
15
+ idsIn(result: unknown): readonly string[] | undefined;
16
+ }
17
+ //# sourceMappingURL=sim-lambda-batch-item-failures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-batch-item-failures.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-batch-item-failures.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAU;IAEnD,YAAY,wBAAwB,EAAE,OAAO,EAE5C;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAYpD;CACF"}
@@ -0,0 +1,46 @@
1
+ import { isRecord } from "../../../../util/type-guard/record.js";
2
+ /**
3
+ * The batch item failure report a function may send back.
4
+ *
5
+ * Reading the report is the same for every event source that accepts one: the
6
+ * mapping has to have been told to expect it, and the entries have to name
7
+ * something. What is done with the ids it names belongs to the source, so that
8
+ * stays with the source's own batch response.
9
+ */
10
+ export class SimLambdaBatchItemFailures {
11
+ reportsBatchItemFailures;
12
+ constructor(reportsBatchItemFailures) {
13
+ this.reportsBatchItemFailures = reportsBatchItemFailures;
14
+ }
15
+ /**
16
+ * The item ids a report names, or undefined when the function reported none.
17
+ */
18
+ idsIn(result) {
19
+ if (!this.reportsBatchItemFailures || !isRecord(result)) {
20
+ return undefined;
21
+ }
22
+ const reported = result["batchItemFailures"];
23
+ if (!Array.isArray(reported) || reported.length === 0) {
24
+ return undefined;
25
+ }
26
+ return reported.map((failure) => itemIdentifier(failure));
27
+ }
28
+ }
29
+ /**
30
+ * The item id one reported failure names.
31
+ *
32
+ * An entry naming nothing is reported as an empty id, which no item has, so the
33
+ * whole batch goes back. That is what real Lambda does with a malformed report
34
+ * rather than dropping the entry.
35
+ */
36
+ function itemIdentifier(failure) {
37
+ if (!isRecord(failure)) {
38
+ return "";
39
+ }
40
+ const identifier = failure["itemIdentifier"];
41
+ if (typeof identifier !== "string") {
42
+ return "";
43
+ }
44
+ return identifier;
45
+ }
46
+ //# sourceMappingURL=sim-lambda-batch-item-failures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-batch-item-failures.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-batch-item-failures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAEjE;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IACpB,wBAAwB,CAAU;IAEnD,YAAY,wBAAiC;QAC3C,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAe;QACnB,IAAI,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACxD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAE7C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,CAAC;CACF;AAED;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAAgB;IACtC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7C,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { SimLambdaEventSourceMessage } from "../queue/sim-lambda-event-source-queues.js";
2
+ /**
3
+ * What became of one batch handed to a function.
4
+ *
5
+ * A batch is either deleted from the source or left on it to be delivered
6
+ * again. Partial batch responses split it, which is the only reason this is a
7
+ * pair of lists rather than a yes or no.
8
+ */
9
+ export declare class SimLambdaEventSourceBatchOutcome {
10
+ readonly handled: readonly SimLambdaEventSourceMessage[];
11
+ readonly returned: readonly SimLambdaEventSourceMessage[];
12
+ constructor(handled: readonly SimLambdaEventSourceMessage[], returned: readonly SimLambdaEventSourceMessage[]);
13
+ /**
14
+ * The receipt handles of the messages to delete from the source.
15
+ */
16
+ get handledReceiptHandles(): readonly string[];
17
+ /**
18
+ * Whether anything was left behind to be delivered again.
19
+ */
20
+ get hasReturnedMessages(): boolean;
21
+ }
22
+ /**
23
+ * Reads what a function said about the batch it was given.
24
+ *
25
+ * One per kind of event source, because what a function may say about a batch,
26
+ * and what becomes of the part it did not handle, are the source's rules rather
27
+ * than the delivery's.
28
+ */
29
+ export interface SimLambdaEventSourceBatchResponse {
30
+ /**
31
+ * What became of a batch the function returned from.
32
+ */
33
+ handled(messages: readonly SimLambdaEventSourceMessage[], result: unknown): SimLambdaEventSourceBatchOutcome;
34
+ /**
35
+ * What becomes of a batch the function threw on.
36
+ */
37
+ failed(messages: readonly SimLambdaEventSourceMessage[]): SimLambdaEventSourceBatchOutcome;
38
+ }
39
+ //# sourceMappingURL=sim-lambda-event-source-batch-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-batch-response.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAE9F;;;;;;GAMG;AACH,qBAAa,gCAAgC;IAC3C,SAAgB,OAAO,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAChE,SAAgB,QAAQ,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAEjE,YACE,OAAO,EAAE,SAAS,2BAA2B,EAAE,EAC/C,QAAQ,EAAE,SAAS,2BAA2B,EAAE,EAIjD;IAED;;OAEG;IACH,IAAI,qBAAqB,IAAI,SAAS,MAAM,EAAE,CAE7C;IAED;;OAEG;IACH,IAAI,mBAAmB,IAAI,OAAO,CAEjC;CACF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,OAAO,CACL,QAAQ,EAAE,SAAS,2BAA2B,EAAE,EAChD,MAAM,EAAE,OAAO,GACd,gCAAgC,CAAC;IAEpC;;OAEG;IACH,MAAM,CACJ,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,gCAAgC,CAAC;CACrC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * What became of one batch handed to a function.
3
+ *
4
+ * A batch is either deleted from the source or left on it to be delivered
5
+ * again. Partial batch responses split it, which is the only reason this is a
6
+ * pair of lists rather than a yes or no.
7
+ */
8
+ export class SimLambdaEventSourceBatchOutcome {
9
+ handled;
10
+ returned;
11
+ constructor(handled, returned) {
12
+ this.handled = handled;
13
+ this.returned = returned;
14
+ }
15
+ /**
16
+ * The receipt handles of the messages to delete from the source.
17
+ */
18
+ get handledReceiptHandles() {
19
+ return this.handled.map((message) => message.ReceiptHandle);
20
+ }
21
+ /**
22
+ * Whether anything was left behind to be delivered again.
23
+ */
24
+ get hasReturnedMessages() {
25
+ return this.returned.length > 0;
26
+ }
27
+ }
28
+ //# sourceMappingURL=sim-lambda-event-source-batch-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-batch-response.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-batch-response.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,OAAO,gCAAgC;IAC3B,OAAO,CAAyC;IAChD,QAAQ,CAAyC;IAEjE,YACE,OAA+C,EAC/C,QAAgD;QAEhD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAI,qBAAqB;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAClC,CAAC;CACF"}
@@ -1,18 +1,44 @@
1
1
  import type { SimLambdaFunction } from "../../function/sim-lambda-function.js";
2
2
  import type { SimLambdaEventSourceMessage } from "../queue/sim-lambda-event-source-queues.js";
3
- import type { SimLambdaSqsEventSourceArn } from "../queue/sim-lambda-sqs-event-source-arn.js";
4
- import type { SimLambdaEventSourceMapping } from "../sim-lambda-event-source-mapping.js";
5
- import { type SimLambdaSqsBatchOutcome } from "./sim-lambda-sqs-batch-response.js";
3
+ import type { SimLambdaEventSourceBatchOutcome, SimLambdaEventSourceBatchResponse } from "./sim-lambda-event-source-batch-response.js";
4
+ /**
5
+ * One record of an event source event.
6
+ *
7
+ * Every source's records name where they came from, whatever else they carry,
8
+ * which is as much as delivery needs to know about the shape.
9
+ */
10
+ export interface SimLambdaEventSourceEventRecord {
11
+ readonly eventSource: string;
12
+ readonly eventSourceARN: string;
13
+ }
14
+ /**
15
+ * The event one batch is delivered as.
16
+ */
17
+ export interface SimLambdaEventSourceEvent {
18
+ readonly Records: readonly SimLambdaEventSourceEventRecord[];
19
+ }
20
+ /**
21
+ * Builds the event a batch is handed to the function as.
22
+ *
23
+ * The shape is the event source's own, so the poller that made the delivery
24
+ * decides which builder it gets.
25
+ */
26
+ export interface SimLambdaEventSourceEventBuilder {
27
+ of(messages: readonly SimLambdaEventSourceMessage[]): SimLambdaEventSourceEvent;
28
+ }
6
29
  interface SimLambdaEventSourceDeliveryProperties {
7
- readonly mapping: SimLambdaEventSourceMapping;
8
- readonly eventSourceArn: SimLambdaSqsEventSourceArn;
30
+ readonly eventBuilder: SimLambdaEventSourceEventBuilder;
31
+ readonly batchResponse: SimLambdaEventSourceBatchResponse;
9
32
  }
10
33
  /**
11
34
  * Hands one batch to a function and reads what became of it.
12
35
  *
13
36
  * The batch is invoked directly rather than through the Invoke command because
14
37
  * the handler's error has to be seen: an asynchronous invocation drops it, and
15
- * this is what decides whether the messages go back on the queue.
38
+ * this is what decides whether the messages go back on the source.
39
+ *
40
+ * What the event looks like and what a return value means are the source's
41
+ * business, so both are handed in rather than built here.
16
42
  */
17
43
  export declare class SimLambdaEventSourceDelivery {
18
44
  private readonly eventBuilder;
@@ -21,7 +47,7 @@ export declare class SimLambdaEventSourceDelivery {
21
47
  /**
22
48
  * Deliver a batch, answering with what to delete and what to leave.
23
49
  */
24
- to(simFunction: SimLambdaFunction, messages: readonly SimLambdaEventSourceMessage[]): Promise<SimLambdaSqsBatchOutcome>;
50
+ to(simFunction: SimLambdaFunction, messages: readonly SimLambdaEventSourceMessage[]): Promise<SimLambdaEventSourceBatchOutcome>;
25
51
  }
26
52
  export {};
27
53
  //# sourceMappingURL=sim-lambda-event-source-delivery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-delivery.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,oCAAoC,CAAC;AAG5C,UAAU,sCAAsC;IAC9C,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC;CACrD;AAED;;;;;;GAMG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA2B;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAE1D,YAAY,UAAU,EAAE,sCAAsC,EAK7D;IAED;;OAEG;IACG,EAAE,CACN,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,OAAO,CAAC,wBAAwB,CAAC,CAYnC;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-delivery.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,6CAA6C,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,+BAA+B,EAAE,CAAC;CAC9D;AAED;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAC/C,EAAE,CACA,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,yBAAyB,CAAC;CAC9B;AAED,UAAU,sCAAsC;IAC9C,QAAQ,CAAC,YAAY,EAAE,gCAAgC,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,iCAAiC,CAAC;CAC3D;AAED;;;;;;;;;GASG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmC;IAChE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoC;IAElE,YAAY,UAAU,EAAE,sCAAsC,EAG7D;IAED;;OAEG;IACG,EAAE,CACN,WAAW,EAAE,iBAAiB,EAC9B,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,OAAO,CAAC,gCAAgC,CAAC,CAY3C;CACF"}
@@ -1,18 +1,19 @@
1
- import { SimLambdaSqsBatchResponse, } from "./sim-lambda-sqs-batch-response.js";
2
- import { SimLambdaSqsEventBuilder } from "./sim-lambda-sqs-event.js";
3
1
  /**
4
2
  * Hands one batch to a function and reads what became of it.
5
3
  *
6
4
  * The batch is invoked directly rather than through the Invoke command because
7
5
  * the handler's error has to be seen: an asynchronous invocation drops it, and
8
- * this is what decides whether the messages go back on the queue.
6
+ * this is what decides whether the messages go back on the source.
7
+ *
8
+ * What the event looks like and what a return value means are the source's
9
+ * business, so both are handed in rather than built here.
9
10
  */
10
11
  export class SimLambdaEventSourceDelivery {
11
12
  eventBuilder;
12
13
  batchResponse;
13
14
  constructor(properties) {
14
- this.eventBuilder = new SimLambdaSqsEventBuilder(properties.eventSourceArn);
15
- this.batchResponse = new SimLambdaSqsBatchResponse(properties.mapping.reportsBatchItemFailures);
15
+ this.eventBuilder = properties.eventBuilder;
16
+ this.batchResponse = properties.batchResponse;
16
17
  }
17
18
  /**
18
19
  * Deliver a batch, answering with what to delete and what to leave.
@@ -24,7 +25,7 @@ export class SimLambdaEventSourceDelivery {
24
25
  catch {
25
26
  // As on real Lambda, the handler error goes to the function's logs and
26
27
  // not to whoever sent the message. What the sender sees is the batch
27
- // coming back to the queue.
28
+ // coming back to the source.
28
29
  return this.batchResponse.failed(messages);
29
30
  }
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-delivery.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-delivery.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAOrE;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IACtB,YAAY,CAA2B;IACvC,aAAa,CAA4B;IAE1D,YAAY,UAAkD;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,wBAAwB,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAC5E,IAAI,CAAC,aAAa,GAAG,IAAI,yBAAyB,CAChD,UAAU,CAAC,OAAO,CAAC,wBAAwB,CAC5C,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAE,CACN,WAA8B,EAC9B,QAAgD;QAEhD,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAC/B,QAAQ,EACR,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CACzD,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;YACvE,qEAAqE;YACrE,4BAA4B;YAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-delivery.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-delivery.ts"],"names":[],"mappings":"AA0CA;;;;;;;;;GASG;AACH,MAAM,OAAO,4BAA4B;IACtB,YAAY,CAAmC;IAC/C,aAAa,CAAoC;IAElE,YAAY,UAAkD;QAC5D,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAE,CACN,WAA8B,EAC9B,QAAgD;QAEhD,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAC/B,QAAQ,EACR,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CACzD,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;YACvE,qEAAqE;YACrE,6BAA6B;YAC7B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { BackgroundScheduler } from "../../../../util/background/background.js";
2
+ import type { SimLambdaFunctionLookup } from "../../function/url/sim-lambda-function-lookup.js";
3
+ import type { SimLambdaEventSourceQueues } from "../queue/sim-lambda-event-source-queues.js";
4
+ import type { SimLambdaEventSourceArn } from "../sim-lambda-event-source-arn.js";
5
+ import type { SimLambdaEventSourceMapping } from "../sim-lambda-event-source-mapping.js";
6
+ import type { SimLambdaEventSourcePoller } from "./sim-lambda-event-source-poller.js";
7
+ export interface SimLambdaEventSourcePollerProperties {
8
+ readonly mapping: SimLambdaEventSourceMapping;
9
+ readonly eventSourceArn: SimLambdaEventSourceArn;
10
+ readonly functions: SimLambdaFunctionLookup;
11
+ readonly queues: SimLambdaEventSourceQueues;
12
+ readonly background: BackgroundScheduler;
13
+ }
14
+ /**
15
+ * The poller for the kind of event source a mapping names.
16
+ *
17
+ * Which poller a mapping gets is decided here rather than by whoever starts
18
+ * one, so adding a kind of source is a change here rather than a change to
19
+ * everything a poller touches. There is one kind so far, so this hands the ARN
20
+ * straight to the queue poller: the queue poller only accepts a queue ARN, so a
21
+ * second kind of source fails to compile here rather than being polled as a
22
+ * queue.
23
+ */
24
+ export declare function makeSimLambdaEventSourcePoller(properties: SimLambdaEventSourcePollerProperties): SimLambdaEventSourcePoller;
25
+ //# sourceMappingURL=sim-lambda-event-source-poller-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-poller-factory.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAGtF,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,oCAAoC,GAC/C,0BAA0B,CAI5B"}
@@ -0,0 +1,16 @@
1
+ import { SimLambdaSqsEventSourcePoller } from "./sim-lambda-sqs-event-source-poller.js";
2
+ /**
3
+ * The poller for the kind of event source a mapping names.
4
+ *
5
+ * Which poller a mapping gets is decided here rather than by whoever starts
6
+ * one, so adding a kind of source is a change here rather than a change to
7
+ * everything a poller touches. There is one kind so far, so this hands the ARN
8
+ * straight to the queue poller: the queue poller only accepts a queue ARN, so a
9
+ * second kind of source fails to compile here rather than being polled as a
10
+ * queue.
11
+ */
12
+ export function makeSimLambdaEventSourcePoller(properties) {
13
+ const { eventSourceArn } = properties;
14
+ return new SimLambdaSqsEventSourcePoller({ ...properties, eventSourceArn });
15
+ }
16
+ //# sourceMappingURL=sim-lambda-event-source-poller-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-poller-factory.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poller-factory.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAUxF;;;;;;;;;GASG;AACH,MAAM,UAAU,8BAA8B,CAC5C,UAAgD;IAEhD,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;IAEtC,OAAO,IAAI,6BAA6B,CAAC,EAAE,GAAG,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,85 +1,25 @@
1
- import type { BackgroundScheduler } from "../../../../util/background/background.js";
2
- import type { SimLambdaFunctionLookup } from "../../function/url/sim-lambda-function-lookup.js";
3
- import type { SimLambdaEventSourceQueues, SimLambdaEventSourceQueueWatcher } from "../queue/sim-lambda-event-source-queues.js";
4
- import type { SimLambdaSqsEventSourceArn } from "../queue/sim-lambda-sqs-event-source-arn.js";
5
- import type { SimLambdaEventSourceMapping } from "../sim-lambda-event-source-mapping.js";
6
- interface SimLambdaEventSourcePollerProperties {
7
- readonly mapping: SimLambdaEventSourceMapping;
8
- readonly eventSourceArn: SimLambdaSqsEventSourceArn;
9
- readonly functions: SimLambdaFunctionLookup;
10
- readonly queues: SimLambdaEventSourceQueues;
11
- readonly background: BackgroundScheduler;
12
- }
13
1
  /**
14
- * Polls one event source mapping's queue and invokes its function.
15
- *
16
- * Real Lambda polls a queue continuously. Nothing in this simulation runs
17
- * continuously, so the queue says when a message has arrived and a poll is
18
- * scheduled in response. A test that awaits the simulation settling has
19
- * therefore watched the whole delivery happen, rather than having waited a
20
- * while and hoped.
2
+ * The running side of one event source mapping.
21
3
  *
22
- * A batch the function returns from is deleted from the queue. A batch it
23
- * throws on is left there, which hides it for the visibility timeout and hands
24
- * it back afterwards, so a redrive policy eventually gives up on it exactly as
25
- * it would for any other failing consumer. That is why the poller invokes the
26
- * function directly rather than through the Invoke command: an asynchronous
27
- * invocation drops its handler error, and this one has to be seen.
4
+ * A mapping is state a request can read; a poller is the thing behind it that
5
+ * actually delivers. Each kind of event source has its own poller, and this is
6
+ * all `SimLambdaEventSourcePollers` needs from any of them: start watching,
7
+ * poll now, stop.
28
8
  */
29
- export declare class SimLambdaEventSourcePoller implements SimLambdaEventSourceQueueWatcher {
30
- private readonly properties;
31
- private readonly delivery;
32
- private readonly schedule;
33
- private stopped;
34
- constructor(properties: SimLambdaEventSourcePollerProperties);
9
+ export interface SimLambdaEventSourcePoller {
35
10
  /**
36
- * Watch the queue this mapping polls.
37
- *
38
- * Watching starts as soon as the mapping is created, before it has finished
39
- * creating, so a message sent in between is not missed. The poll it wakes
40
- * finds a mapping that is not polling yet and does nothing, and the poll that
41
- * follows activation picks the message up.
11
+ * Watch the event source this mapping polls, so something arriving on it
12
+ * wakes a poll.
42
13
  */
43
14
  watch(): void;
44
15
  /**
45
16
  * Poll as soon as the simulation gets to it, which is what a newly enabled
46
- * mapping does with whatever is already on its queue.
17
+ * mapping does with whatever is already waiting.
47
18
  */
48
19
  pollNow(): void;
49
20
  /**
50
21
  * Stop polling, as deleting the mapping does.
51
22
  */
52
23
  stop(): void;
53
- /**
54
- * Take a message arriving on the queue as something to poll for.
55
- */
56
- messageAvailable(availableFrom: Date): void;
57
- /**
58
- * Poll once: one batch, delivered and then deleted or left behind.
59
- */
60
- private run;
61
- /**
62
- * The function this mapping delivers to, while it should be delivering.
63
- *
64
- * A mapping still being created is not polling yet, and a disabled one never
65
- * is. A function that is not there is not an error here: the mapping simply
66
- * has nothing to deliver to.
67
- */
68
- private pollingFunction;
69
- /**
70
- * Look again when a message the queue could not hand out becomes
71
- * receivable.
72
- *
73
- * A mapping created while every message on its queue is in flight, or one
74
- * whose queue holds only delayed messages, has nothing to wake it otherwise.
75
- */
76
- private pollWhenSomethingComesBack;
77
- /**
78
- * Decide when this mapping polls again: when a returned batch becomes
79
- * visible again, or straight away when a batch filled the request and there
80
- * may be more waiting.
81
- */
82
- private pollAgainAfter;
83
24
  }
84
- export {};
85
25
  //# sourceMappingURL=sim-lambda-event-source-poller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-poller.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,KAAK,EAEV,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAKzF,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC;IACpD,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,0BAA2B,YAAW,gCAAgC;IACjF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuC;IAClE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAE5D,OAAO,CAAC,OAAO,CAAS;IAExB,YAAY,UAAU,EAAE,oCAAoC,EAS3D;IAED;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI,CAEZ;IAED;;;OAGG;IACH,OAAO,IAAI,IAAI,CAEd;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,CAGX;IAED;;OAEG;IACH,gBAAgB,CAAC,aAAa,EAAE,IAAI,GAAG,IAAI,CAE1C;IAED;;OAEG;YACW,GAAG;IAoCjB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAQvB;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;OAIG;IACH,OAAO,CAAC,cAAc;CAevB"}
1
+ {"version":3,"file":"sim-lambda-event-source-poller.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poller.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;CACd"}