@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
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The one queue a mapping polls.
3
+ *
4
+ * Every call names the same queue, and the ones a poll makes are all made as
5
+ * the function's execution role, so both are fixed here rather than written out
6
+ * at each call. Simulated IAM still decides each one, exactly as real IAM does.
7
+ */
8
+ export class SimLambdaSqsPolledQueue {
9
+ queues;
10
+ queueArn;
11
+ constructor(queues, queueArn) {
12
+ this.queues = queues;
13
+ this.queueArn = queueArn;
14
+ }
15
+ /**
16
+ * Watch for messages arriving on the queue.
17
+ */
18
+ watch(watcher) {
19
+ this.queues.watch(this.queueArn, watcher);
20
+ }
21
+ /**
22
+ * Stop watching the queue.
23
+ */
24
+ unwatch(watcher) {
25
+ this.queues.unwatch(this.queueArn, watcher);
26
+ }
27
+ /**
28
+ * When the earliest message the queue cannot hand out yet becomes
29
+ * receivable.
30
+ */
31
+ nextAvailability() {
32
+ return this.queues.nextAvailability(this.queueArn);
33
+ }
34
+ /**
35
+ * How long a received message stays hidden, and by asking, whether the queue
36
+ * is there to be polled at all.
37
+ */
38
+ async visibilityTimeoutSeconds(roleArn) {
39
+ return await this.queues.visibilityTimeoutSeconds(this.requestAs(roleArn));
40
+ }
41
+ /**
42
+ * Take up to a batch of messages off the queue.
43
+ */
44
+ async receive(roleArn, batchSize) {
45
+ return await this.queues.receive({ ...this.requestAs(roleArn), batchSize });
46
+ }
47
+ /**
48
+ * Delete the messages the function handled.
49
+ */
50
+ async deleteMessages(roleArn, receiptHandles) {
51
+ await this.queues.deleteMessages({
52
+ ...this.requestAs(roleArn),
53
+ receiptHandles,
54
+ });
55
+ }
56
+ requestAs(roleArn) {
57
+ return { queueArn: this.queueArn, caller: { kind: "arn", arn: roleArn } };
58
+ }
59
+ }
60
+ //# sourceMappingURL=sim-lambda-sqs-polled-queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-sqs-polled-queue.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-sqs-polled-queue.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IACjB,MAAM,CAA6B;IACnC,QAAQ,CAAS;IAElC,YAAY,MAAkC,EAAE,QAAgB;QAC9D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAyC;QAC7C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,OAAyC;QAC/C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,wBAAwB,CAAC,OAAe;QAC5C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CACX,OAAe,EACf,SAAiB;QAEjB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAClB,OAAe,EACf,cAAiC;QAEjC,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;YAC/B,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC1B,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,OAAe;QAC/B,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC;IAC5E,CAAC;CACF"}
@@ -1,3 +1,5 @@
1
+ import { SimLambdaEventSourceBatchRules } from "../sim-lambda-event-source-batch-rules.js";
2
+ import { SimLambdaEventSourcePollingPermission } from "../sim-lambda-event-source-polling-permission.js";
1
3
  /**
2
4
  * The queue ARN an event source mapping is created for.
3
5
  *
@@ -7,19 +9,35 @@
7
9
  * report.
8
10
  */
9
11
  export declare class SimLambdaSqsEventSourceArn {
12
+ /**
13
+ * How an ARN naming this kind of event source is written, for a refusal to
14
+ * say what it wanted instead.
15
+ */
16
+ static readonly arnShape = "An SQS queue ARN is arn:aws:sqs:<region>:<account-id>:<queue-name>";
17
+ readonly kind: "sqs";
18
+ readonly serviceLabel = "SQS";
10
19
  readonly value: string;
11
20
  readonly regionName: string;
12
21
  readonly accountId: string;
13
22
  readonly queueName: string;
23
+ readonly pollingPermissions: readonly SimLambdaEventSourcePollingPermission[];
14
24
  private constructor();
15
25
  /**
16
- * Read an event source ARN, refusing one that names no simulated event
17
- * source.
26
+ * Read a queue ARN, answering with nothing when the ARN names something
27
+ * else.
18
28
  *
19
- * SQS queues are the only event source this simulation polls, so an ARN for
20
- * any other one is refused rather than accepted and never delivered from.
29
+ * This is what the event source ARN dispatcher asks, so that deciding what a
30
+ * mapping may name stays in one place rather than in each parser.
31
+ */
32
+ static parse(queueArn: string): SimLambdaSqsEventSourceArn | undefined;
33
+ /**
34
+ * Read a queue ARN, refusing one that is not a queue ARN at all.
35
+ */
36
+ static of(queueArn: string): SimLambdaSqsEventSourceArn;
37
+ /**
38
+ * The batch sizes a mapping on this queue may deliver with.
21
39
  */
22
- static of(eventSourceArn: string): SimLambdaSqsEventSourceArn;
40
+ get batchRules(): SimLambdaEventSourceBatchRules;
23
41
  /**
24
42
  * The URL SQS requests name this queue by.
25
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-sqs-event-source-arn.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,qBAAa,0BAA0B;IACrC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAElC,OAAO,eAKN;IAED;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,GAAG,0BAA0B,CAY5D;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAKrB;IAED;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEnD;CACF"}
1
+ {"version":3,"file":"sim-lambda-sqs-event-source-arn.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,qCAAqC,EAAE,MAAM,kDAAkD,CAAC;AA+BzG;;;;;;;GAOG;AACH,qBAAa,0BAA0B;IACrC;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,wEAC+C;IAEvE,SAAgB,IAAI,EAAG,KAAK,CAAU;IACtC,SAAgB,YAAY,SAAS;IACrC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,kBAAkB,EAAE,SAAS,qCAAqC,EAAE,CAAC;IAErF,OAAO,eASN;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,CAQrE;IAED;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,CAUtD;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,8BAA8B,CAE/C;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAED;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAEnD;CACF"}
@@ -1,5 +1,32 @@
1
1
  import { SimLambdaInvalidParameterValueException } from "../../error/sim-lambda.error.js";
2
+ import { sqsQueueUrl } from "../../../sqs/queue/sim-sqs-queue-arn.js";
3
+ import { SimLambdaEventSourceBatchRules } from "../sim-lambda-event-source-batch-rules.js";
4
+ import { SimLambdaEventSourcePollingPermission } from "../sim-lambda-event-source-polling-permission.js";
2
5
  const queueArnPattern = /^arn:aws:sqs:(?<region>[a-z0-9-]+):(?<account>\d{12}):(?<name>[\w-]{1,80})$/u;
6
+ /**
7
+ * What a function's execution role has to be allowed to do on a queue for
8
+ * Lambda to poll it.
9
+ *
10
+ * These are the three operations real Lambda checks when an SQS event source
11
+ * mapping is created, and the three its poller performs afterwards.
12
+ */
13
+ const queuePollingOperations = [
14
+ "ReceiveMessage",
15
+ "DeleteMessage",
16
+ "GetQueueAttributes",
17
+ ];
18
+ /**
19
+ * The batch sizes an SQS event source delivers with.
20
+ *
21
+ * Ten is both the batch real Lambda uses when the mapping names none, and the
22
+ * largest batch it delivers from a standard queue without a batching window to
23
+ * fill a bigger one.
24
+ */
25
+ const queueBatchRules = new SimLambdaEventSourceBatchRules({
26
+ defaultSize: 10,
27
+ maximumSize: 10,
28
+ sourceDescription: "a queue with no batching window",
29
+ });
3
30
  /**
4
31
  * The queue ARN an event source mapping is created for.
5
32
  *
@@ -9,38 +36,64 @@ const queueArnPattern = /^arn:aws:sqs:(?<region>[a-z0-9-]+):(?<account>\d{12}):(
9
36
  * report.
10
37
  */
11
38
  export class SimLambdaSqsEventSourceArn {
39
+ /**
40
+ * How an ARN naming this kind of event source is written, for a refusal to
41
+ * say what it wanted instead.
42
+ */
43
+ static arnShape = "An SQS queue ARN is arn:aws:sqs:<region>:<account-id>:<queue-name>";
44
+ kind = "sqs";
45
+ serviceLabel = "SQS";
12
46
  value;
13
47
  regionName;
14
48
  accountId;
15
49
  queueName;
50
+ pollingPermissions;
16
51
  constructor(value, parts) {
17
52
  this.value = value;
18
53
  this.regionName = parts["region"] ?? "";
19
54
  this.accountId = parts["account"] ?? "";
20
55
  this.queueName = parts["name"] ?? "";
56
+ this.pollingPermissions = queuePollingOperations.map((operation) => new SimLambdaEventSourcePollingPermission(`sqs:${operation}`, value));
21
57
  }
22
58
  /**
23
- * Read an event source ARN, refusing one that names no simulated event
24
- * source.
59
+ * Read a queue ARN, answering with nothing when the ARN names something
60
+ * else.
25
61
  *
26
- * SQS queues are the only event source this simulation polls, so an ARN for
27
- * any other one is refused rather than accepted and never delivered from.
62
+ * This is what the event source ARN dispatcher asks, so that deciding what a
63
+ * mapping may name stays in one place rather than in each parser.
28
64
  */
29
- static of(eventSourceArn) {
30
- const parts = queueArnPattern.exec(eventSourceArn)?.groups;
65
+ static parse(queueArn) {
66
+ const parts = queueArnPattern.exec(queueArn)?.groups;
31
67
  if (parts === undefined) {
32
- throw new SimLambdaInvalidParameterValueException(`EventSourceArn ${eventSourceArn} is not an SQS queue ARN. SQS queues ` +
33
- "are the only simulated Lambda event source, and a queue ARN is " +
34
- "arn:aws:sqs:<region>:<account-id>:<queue-name>");
68
+ return undefined;
35
69
  }
36
- return new this(eventSourceArn, parts);
70
+ return new this(queueArn, parts);
71
+ }
72
+ /**
73
+ * Read a queue ARN, refusing one that is not a queue ARN at all.
74
+ */
75
+ static of(queueArn) {
76
+ const parsed = this.parse(queueArn);
77
+ if (parsed === undefined) {
78
+ throw new SimLambdaInvalidParameterValueException(`${queueArn} is not an SQS queue ARN. ${this.arnShape}`);
79
+ }
80
+ return parsed;
81
+ }
82
+ /**
83
+ * The batch sizes a mapping on this queue may deliver with.
84
+ */
85
+ get batchRules() {
86
+ return queueBatchRules;
37
87
  }
38
88
  /**
39
89
  * The URL SQS requests name this queue by.
40
90
  */
41
91
  get queueUrl() {
42
- return (`https://sqs.${this.regionName}.amazonaws.com/` +
43
- `${this.accountId}/${this.queueName}`);
92
+ return sqsQueueUrl({
93
+ regionName: this.regionName,
94
+ accountId: this.accountId,
95
+ name: this.queueName,
96
+ });
44
97
  }
45
98
  /**
46
99
  * Whether this queue is in an Account and Region.
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-sqs-event-source-arn.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAE1F,MAAM,eAAe,GACnB,8EAA8E,CAAC;AAEjF;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IACrB,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,SAAS,CAAS;IAClB,SAAS,CAAS;IAElC,YAAoB,KAAa,EAAE,KAA6B;QAC9D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,cAAsB;QAC9B,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAE3D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,uCAAuC,CAC/C,kBAAkB,cAAc,uCAAuC;gBACrE,iEAAiE;gBACjE,gDAAgD,CACnD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,CACL,eAAe,IAAI,CAAC,UAAU,iBAAiB;YAC/C,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,CACtC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,SAAiB,EAAE,UAAkB;QACxC,OAAO,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC;IACxE,CAAC;CACF"}
1
+ {"version":3,"file":"sim-lambda-sqs-event-source-arn.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,qCAAqC,EAAE,MAAM,kD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AC;QAED,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,QAAgB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEpC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,uCAAuC,CAC/C,GAAG,QAAQ,6BAA6B,IAAI,CAAC,QAAQ,EAAE,CACxD,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACZ,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,WAAW,CAAC;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,SAAS;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,SAAiB,EAAE,UAAkB;QACxC,OAAO,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import { SimLambdaSqsEventSourceArn } from "./queue/sim-lambda-sqs-event-source-arn.js";
2
+ /**
3
+ * The ARN of an event source a mapping can name.
4
+ *
5
+ * A union discriminated by `kind`, so the poller a mapping gets, the
6
+ * permissions its execution role is checked for and the batch sizes it may ask
7
+ * for all come from the source the mapping names rather than being assumed.
8
+ */
9
+ export type SimLambdaEventSourceArn = SimLambdaSqsEventSourceArn;
10
+ /**
11
+ * What this simulation polls, said in one place so every refusal that mentions
12
+ * it says the same thing.
13
+ */
14
+ export declare const simulatedEventSourcesDescription = "SQS queues are the only simulated event source";
15
+ /**
16
+ * Read an event source ARN, refusing one that names no simulated event source.
17
+ *
18
+ * This is the one place that decides which sources a mapping may name. A source
19
+ * this simulation cannot poll is refused rather than accepted and never
20
+ * delivered from.
21
+ */
22
+ export declare function simLambdaEventSourceArnOf(eventSourceArn: string): SimLambdaEventSourceArn;
23
+ //# sourceMappingURL=sim-lambda-event-source-arn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-arn.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-arn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gCAAgC,mDACK,CAAC;AASnD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,MAAM,GACrB,uBAAuB,CAazB"}
@@ -0,0 +1,30 @@
1
+ import { SimLambdaInvalidParameterValueException } from "../error/sim-lambda.error.js";
2
+ import { SimLambdaSqsEventSourceArn } from "./queue/sim-lambda-sqs-event-source-arn.js";
3
+ /**
4
+ * What this simulation polls, said in one place so every refusal that mentions
5
+ * it says the same thing.
6
+ */
7
+ export const simulatedEventSourcesDescription = "SQS queues are the only simulated event source";
8
+ /**
9
+ * The ARN shapes those event sources are named by.
10
+ */
11
+ const simulatedEventSourceArnShapes = [
12
+ SimLambdaSqsEventSourceArn.arnShape,
13
+ ];
14
+ /**
15
+ * Read an event source ARN, refusing one that names no simulated event source.
16
+ *
17
+ * This is the one place that decides which sources a mapping may name. A source
18
+ * this simulation cannot poll is refused rather than accepted and never
19
+ * delivered from.
20
+ */
21
+ export function simLambdaEventSourceArnOf(eventSourceArn) {
22
+ const queueArn = SimLambdaSqsEventSourceArn.parse(eventSourceArn);
23
+ if (queueArn === undefined) {
24
+ const arnShapes = simulatedEventSourceArnShapes.join(" ");
25
+ throw new SimLambdaInvalidParameterValueException(`EventSourceArn ${eventSourceArn} names no simulated Lambda event ` +
26
+ `source. ${simulatedEventSourcesDescription}. ${arnShapes}`);
27
+ }
28
+ return queueArn;
29
+ }
30
+ //# sourceMappingURL=sim-lambda-event-source-arn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-arn.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-arn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAWxF;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,gDAAgD,CAAC;AAEnD;;GAEG;AACH,MAAM,6BAA6B,GAAsB;IACvD,0BAA0B,CAAC,QAAQ;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,cAAsB;IAEtB,MAAM,QAAQ,GAAG,0BAA0B,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAElE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE1D,MAAM,IAAI,uCAAuC,CAC/C,kBAAkB,cAAc,mCAAmC;YACjE,WAAW,gCAAgC,KAAK,SAAS,EAAE,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,26 @@
1
+ interface SimLambdaEventSourceBatchRulesProperties {
2
+ readonly defaultSize: number;
3
+ readonly maximumSize: number;
4
+ readonly sourceDescription: string;
5
+ }
6
+ /**
7
+ * The batch sizes one kind of event source delivers with.
8
+ *
9
+ * The default and the maximum belong to the source rather than to the mapping:
10
+ * how much a queue hands out in one receive is not how much another kind of
11
+ * source would, and neither is what makes a larger request pointless. The
12
+ * source description is the clause a refusal explains the range with.
13
+ */
14
+ export declare class SimLambdaEventSourceBatchRules {
15
+ readonly defaultSize: number;
16
+ readonly maximumSize: number;
17
+ private readonly sourceDescription;
18
+ constructor(properties: SimLambdaEventSourceBatchRulesProperties);
19
+ /**
20
+ * The batch size a mapping delivers with, refusing one this source would
21
+ * never fill.
22
+ */
23
+ sizeIn(requested: number | undefined): number;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=sim-lambda-event-source-batch-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-batch-rules.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-batch-rules.ts"],"names":[],"mappings":"AAEA,UAAU,wCAAwC;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,qBAAa,8BAA8B;IACzC,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAE3C,YAAY,UAAU,EAAE,wCAAwC,EAI/D;IAED;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAgB5C;CACF"}
@@ -0,0 +1,35 @@
1
+ import { SimLambdaInvalidParameterValueException } from "../error/sim-lambda.error.js";
2
+ /**
3
+ * The batch sizes one kind of event source delivers with.
4
+ *
5
+ * The default and the maximum belong to the source rather than to the mapping:
6
+ * how much a queue hands out in one receive is not how much another kind of
7
+ * source would, and neither is what makes a larger request pointless. The
8
+ * source description is the clause a refusal explains the range with.
9
+ */
10
+ export class SimLambdaEventSourceBatchRules {
11
+ defaultSize;
12
+ maximumSize;
13
+ sourceDescription;
14
+ constructor(properties) {
15
+ this.defaultSize = properties.defaultSize;
16
+ this.maximumSize = properties.maximumSize;
17
+ this.sourceDescription = properties.sourceDescription;
18
+ }
19
+ /**
20
+ * The batch size a mapping delivers with, refusing one this source would
21
+ * never fill.
22
+ */
23
+ sizeIn(requested) {
24
+ const batchSize = requested ?? this.defaultSize;
25
+ if (!Number.isSafeInteger(batchSize) ||
26
+ batchSize < 1 ||
27
+ batchSize > this.maximumSize) {
28
+ throw new SimLambdaInvalidParameterValueException(`BatchSize ${String(batchSize)} is out of range: ` +
29
+ `${this.sourceDescription} delivers a whole number of messages ` +
30
+ `between 1 and ${String(this.maximumSize)} at a time`);
31
+ }
32
+ return batchSize;
33
+ }
34
+ }
35
+ //# sourceMappingURL=sim-lambda-event-source-batch-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-batch-rules.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-batch-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAQvF;;;;;;;GAOG;AACH,MAAM,OAAO,8BAA8B;IACzB,WAAW,CAAS;IACpB,WAAW,CAAS;IAEnB,iBAAiB,CAAS;IAE3C,YAAY,UAAoD;QAC9D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAA6B;QAClC,MAAM,SAAS,GAAG,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC;QAEhD,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;YAChC,SAAS,GAAG,CAAC;YACb,SAAS,GAAG,IAAI,CAAC,WAAW,EAC5B,CAAC;YACD,MAAM,IAAI,uCAAuC,CAC/C,aAAa,MAAM,CAAC,SAAS,CAAC,oBAAoB;gBAChD,GAAG,IAAI,CAAC,iBAAiB,uCAAuC;gBAChE,iBAAiB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CACxD,CAAC;QACJ,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -4,11 +4,6 @@ import type { SimLambdaFunctionArn } from "../function/sim-lambda-function.js";
4
4
  * Event source mapping ARNs address the mapping by its UUID.
5
5
  */
6
6
  export type SimLambdaEventSourceMappingArn = `arn:aws:lambda:${string}:${string}:event-source-mapping:${string}`;
7
- /**
8
- * The batch size real Lambda uses for an SQS event source when the mapping
9
- * does not name one.
10
- */
11
- export declare const DEFAULT_SIM_LAMBDA_EVENT_SOURCE_BATCH_SIZE = 10;
12
7
  /**
13
8
  * The response types a mapping can be told the function reports.
14
9
  *
@@ -28,7 +23,7 @@ interface SimLambdaEventSourceMappingProperties {
28
23
  readonly eventSourceArn: string;
29
24
  readonly functionName: string;
30
25
  readonly functionArn: SimLambdaFunctionArn;
31
- readonly batchSize?: number | undefined;
26
+ readonly batchSize: number;
32
27
  readonly enabled?: boolean | undefined;
33
28
  readonly functionResponseTypes?: readonly SimLambdaFunctionResponseType[] | undefined;
34
29
  readonly createdAt: Date;
@@ -51,11 +46,14 @@ export interface SimLambdaEventSourceMappingConfiguration {
51
46
  readonly LastModified: Date;
52
47
  }
53
48
  /**
54
- * One simulated Lambda event source mapping, from an SQS queue to a function.
49
+ * One simulated Lambda event source mapping, from an event source to a
50
+ * function.
55
51
  *
56
52
  * The mapping holds what polling is done with rather than doing the polling: a
57
53
  * poller reads the batch size and the response types from here, and the mapping
58
- * stays the piece of state a Get or List reports.
54
+ * stays the piece of state a Get or List reports. What a batch size may be is
55
+ * the event source's rule, so the mapping is given one rather than defaulting
56
+ * it.
59
57
  */
60
58
  export declare class SimLambdaEventSourceMapping {
61
59
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-mapping.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-mapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB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,CAAC,KAAK,EAAE,gCAAgC,CAAC;IACjD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,qBAAa,2BAA2B;;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAgB;IAC5C,SAAgB,cAAc,EAAE,MAAM,CAAC;IACvC,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,WAAW,EAAE,oBAAoB,CAAC;IAClD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,qBAAqB,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAEhF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAO;IAGpC,YAAY,UAAU,EAAE,qCAAqC,EAY5D;IAED;;OAEG;IACH,IAAI,GAAG,IAAI,8BAA8B,CAIxC;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,gCAAgC,CAE5C;IAED;;;;;OAKG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,wBAAwB,IAAI,OAAO,CAEtC;IAED;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAIxB;IAED;;OAEG;IACH,aAAa,IAAI,wCAAwC,CAexD;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-mapping.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-mapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACxC,kBAAkB,MAAM,IAAI,MAAM,yBAAyB,MAAM,EAAE,C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vC,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,WAAW,EAAE,oBAAoB,CAAC;IAClD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,qBAAqB,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAEhF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAO;IAGpC,YAAY,UAAU,EAAE,qCAAqC,EAW5D;IAED;;OAEG;IACH,IAAI,GAAG,IAAI,8BAA8B,CAIxC;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,gCAAgC,CAE5C;IAED;;;;;OAKG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;OAEG;IACH,IAAI,wBAAwB,IAAI,OAAO,CAEtC;IAED;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAIxB;IAED;;OAEG;IACH,aAAa,IAAI,wCAAwC,CAexD;CACF"}
@@ -1,15 +1,13 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  /**
3
- * The batch size real Lambda uses for an SQS event source when the mapping
4
- * does not name one.
5
- */
6
- export const DEFAULT_SIM_LAMBDA_EVENT_SOURCE_BATCH_SIZE = 10;
7
- /**
8
- * One simulated Lambda event source mapping, from an SQS queue to a function.
3
+ * One simulated Lambda event source mapping, from an event source to a
4
+ * function.
9
5
  *
10
6
  * The mapping holds what polling is done with rather than doing the polling: a
11
7
  * poller reads the batch size and the response types from here, and the mapping
12
- * stays the piece of state a Get or List reports.
8
+ * stays the piece of state a Get or List reports. What a batch size may be is
9
+ * the event source's rule, so the mapping is given one rather than defaulting
10
+ * it.
13
11
  */
14
12
  export class SimLambdaEventSourceMapping {
15
13
  uuid = randomUUID();
@@ -27,8 +25,7 @@ export class SimLambdaEventSourceMapping {
27
25
  this.eventSourceArn = properties.eventSourceArn;
28
26
  this.functionName = properties.functionName;
29
27
  this.functionArn = properties.functionArn;
30
- this.batchSize =
31
- properties.batchSize ?? DEFAULT_SIM_LAMBDA_EVENT_SOURCE_BATCH_SIZE;
28
+ this.batchSize = properties.batchSize;
32
29
  // Copied rather than held, so a caller keeping the list it passed in
33
30
  // cannot change what this mapping does with a batch afterwards.
34
31
  this.functionResponseTypes = [...(properties.functionResponseTypes ?? [])];
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-mapping.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWzC;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,EAAE,CAAC;AAiD7D;;;;;;GAMG;AACH,MAAM,OAAO,2BAA2B;IACtB,IAAI,GAAW,UAAU,EAAE,CAAC;IAC5B,cAAc,CAAS;IACvB,YAAY,CAAS;IACrB,WAAW,CAAuB;IAClC,SAAS,CAAS;IAClB,qBAAqB,CAA2C;IAE/D,kBAAkB,CAA2B;IAC7C,OAAO,CAAU;IACjB,YAAY,CAAO;IACpC,MAAM,GAAqC,UAAU,CAAC;IAEtD,YAAY,UAAiD;QAC3D,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;QACxD,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,SAAS;YACZ,UAAU,CAAC,SAAS,IAAI,0CAA0C,CAAC;QACrE,qEAAqE;QACrE,gEAAgE;QAChE,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,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;;;OAKG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAI,wBAAwB;QAC1B,OAAO,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;QAEpD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,aAAa;QACX,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,qBAAqB,EAAE,IAAI,CAAC,GAAG;YAC/B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,yEAAyE;YACzE,wEAAwE;YACxE,8BAA8B,EAAE,CAAC;YACjC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,qBAAqB,EAAE,gBAAgB;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;IACJ,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { BackgroundScheduler } from "../../../util/background/background.js";
2
2
  import type { SimLambdaFunctionLookup } from "../function/url/sim-lambda-function-lookup.js";
3
3
  import type { SimLambdaEventSourceQueues } from "./queue/sim-lambda-event-source-queues.js";
4
- import type { SimLambdaSqsEventSourceArn } from "./queue/sim-lambda-sqs-event-source-arn.js";
4
+ import type { SimLambdaEventSourceArn } from "./sim-lambda-event-source-arn.js";
5
5
  import type { SimLambdaEventSourceMapping } from "./sim-lambda-event-source-mapping.js";
6
6
  interface SimLambdaEventSourcePollersProperties {
7
7
  readonly functions: SimLambdaFunctionLookup;
@@ -23,11 +23,11 @@ export declare class SimLambdaEventSourcePollers {
23
23
  * Start polling for a newly created mapping.
24
24
  *
25
25
  * The mapping finishes creating in the background, as it does on real Lambda,
26
- * and starts polling once it does. Whatever is already on the queue is polled
27
- * for then, because real Lambda does not only deliver what arrives after the
28
- * mapping was made.
26
+ * and starts polling once it does. Whatever is already waiting on the event
27
+ * source is polled for then, because real Lambda does not only deliver what
28
+ * arrives after the mapping was made.
29
29
  */
30
- start(mapping: SimLambdaEventSourceMapping, eventSourceArn: SimLambdaSqsEventSourceArn): void;
30
+ start(mapping: SimLambdaEventSourceMapping, eventSourceArn: SimLambdaEventSourceArn): void;
31
31
  /**
32
32
  * Stop polling for a deleted mapping.
33
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-pollers.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-pollers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAExF,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiD;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwC;IAEnE,YAAY,UAAU,EAAE,qCAAqC,EAE5D;IAED;;;;;;;OAOG;IACH,KAAK,CACH,OAAO,EAAE,2BAA2B,EACpC,cAAc,EAAE,0BAA0B,GACzC,IAAI,CAcN;IAED;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAG/C;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-pollers.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-pollers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAG7F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAExF,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiD;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwC;IAEnE,YAAY,UAAU,EAAE,qCAAqC,EAE5D;IAED;;;;;;;OAOG;IACH,KAAK,CACH,OAAO,EAAE,2BAA2B,EACpC,cAAc,EAAE,uBAAuB,GACtC,IAAI,CAcN;IAED;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAG/C;CACF"}
@@ -1,4 +1,4 @@
1
- import { SimLambdaEventSourcePoller } from "./poll/sim-lambda-event-source-poller.js";
1
+ import { makeSimLambdaEventSourcePoller } from "./poll/sim-lambda-event-source-poller-factory.js";
2
2
  /**
3
3
  * The pollers of one simulated Lambda scope, one for each event source mapping.
4
4
  *
@@ -16,12 +16,12 @@ export class SimLambdaEventSourcePollers {
16
16
  * Start polling for a newly created mapping.
17
17
  *
18
18
  * The mapping finishes creating in the background, as it does on real Lambda,
19
- * and starts polling once it does. Whatever is already on the queue is polled
20
- * for then, because real Lambda does not only deliver what arrives after the
21
- * mapping was made.
19
+ * and starts polling once it does. Whatever is already waiting on the event
20
+ * source is polled for then, because real Lambda does not only deliver what
21
+ * arrives after the mapping was made.
22
22
  */
23
23
  start(mapping, eventSourceArn) {
24
- const poller = new SimLambdaEventSourcePoller({
24
+ const poller = makeSimLambdaEventSourcePoller({
25
25
  ...this.properties,
26
26
  mapping,
27
27
  eventSourceArn,
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-pollers.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-pollers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAWtF;;;;;;GAMG;AACH,MAAM,OAAO,2BAA2B;IACrB,OAAO,GAAG,IAAI,GAAG,EAAsC,CAAC;IACxD,UAAU,CAAwC;IAEnE,YAAY,UAAiD;QAC3D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CACH,OAAoC,EACpC,cAA0C;QAE1C,MAAM,MAAM,GAAG,IAAI,0BAA0B,CAAC;YAC5C,GAAG,IAAI,CAAC,UAAU;YAClB,OAAO;YACP,cAAc;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7C,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAAoC;QACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-pollers.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-pollers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAYlG;;;;;;GAMG;AACH,MAAM,OAAO,2BAA2B;IACrB,OAAO,GAAG,IAAI,GAAG,EAAsC,CAAC;IACxD,UAAU,CAAwC;IAEnE,YAAY,UAAiD;QAC3D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CACH,OAAoC,EACpC,cAAuC;QAEvC,MAAM,MAAM,GAAG,8BAA8B,CAAC;YAC5C,GAAG,IAAI,CAAC,UAAU;YAClB,OAAO;YACP,cAAc;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAC7C,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAAoC;QACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * One thing a function's execution role has to be allowed to do for Lambda to
3
+ * poll an event source.
4
+ *
5
+ * The action carries its service prefix, because that is what simulated IAM is
6
+ * asked. The operation name is read back out of it for a refusal, which names
7
+ * the operation the way AWS names it.
8
+ */
9
+ export declare class SimLambdaEventSourcePollingPermission {
10
+ readonly action: string;
11
+ readonly resource: string;
12
+ constructor(action: string, resource: string);
13
+ /**
14
+ * The operation this permission names, without its service prefix.
15
+ */
16
+ get operationName(): string;
17
+ }
18
+ //# sourceMappingURL=sim-lambda-event-source-polling-permission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-polling-permission.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-polling-permission.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,qCAAqC;IAChD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,YAAY,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAG3C;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;CACF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * One thing a function's execution role has to be allowed to do for Lambda to
3
+ * poll an event source.
4
+ *
5
+ * The action carries its service prefix, because that is what simulated IAM is
6
+ * asked. The operation name is read back out of it for a refusal, which names
7
+ * the operation the way AWS names it.
8
+ */
9
+ export class SimLambdaEventSourcePollingPermission {
10
+ action;
11
+ resource;
12
+ constructor(action, resource) {
13
+ this.action = action;
14
+ this.resource = resource;
15
+ }
16
+ /**
17
+ * The operation this permission names, without its service prefix.
18
+ */
19
+ get operationName() {
20
+ return this.action.slice(this.action.indexOf(":") + 1);
21
+ }
22
+ }
23
+ //# sourceMappingURL=sim-lambda-event-source-polling-permission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-polling-permission.js","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-polling-permission.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,OAAO,qCAAqC;IAChC,MAAM,CAAS;IACf,QAAQ,CAAS;IAEjC,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,CAAC;CACF"}
@@ -1,23 +1,27 @@
1
1
  import type { SimIamInterServiceAuthZ } from "../../iam/authorize/sim-iam-inter-service-auth-z.js";
2
+ import type { SimLambdaEventSourceArn } from "./sim-lambda-event-source-arn.js";
2
3
  interface SimLambdaEventSourceRolePermissionsProperties {
3
4
  readonly iam: SimIamInterServiceAuthZ;
4
5
  }
5
6
  /**
6
- * Checks that a function's execution role may poll the queue a mapping names.
7
+ * Checks that a function's execution role may poll the source a mapping names.
7
8
  *
8
9
  * Real Lambda refuses to create the mapping at all when the role cannot poll,
9
10
  * rather than creating one that silently delivers nothing, so this is checked
10
11
  * up front here too. The poller's own calls go through simulated IAM again
11
12
  * afterwards, as they do on AWS: this check is about failing early, not about
12
13
  * standing in for authorization.
14
+ *
15
+ * What has to be allowed comes from the event source, since the operations a
16
+ * poller performs are the source's own.
13
17
  */
14
18
  export declare class SimLambdaEventSourceRolePermissions {
15
19
  private readonly iam;
16
20
  constructor(properties: SimLambdaEventSourceRolePermissionsProperties);
17
21
  /**
18
- * Refuse a mapping whose execution role cannot poll the queue.
22
+ * Refuse a mapping whose execution role cannot poll the event source.
19
23
  */
20
- assertMayPoll(roleArn: string, queueArn: string): void;
24
+ assertMayPoll(roleArn: string, eventSourceArn: SimLambdaEventSourceArn): void;
21
25
  }
22
26
  export {};
23
27
  //# sourceMappingURL=sim-lambda-event-source-role-permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-event-source-role-permissions.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-role-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAgBnG,UAAU,6CAA6C;IACrD,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,qBAAa,mCAAmC;IAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,6CAA6C,EAEpE;IAED;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgBrD;CACF"}
1
+ {"version":3,"file":"sim-lambda-event-source-role-permissions.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/event-source/sim-lambda-event-source-role-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAEnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,UAAU,6CAA6C;IACrD,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,mCAAmC;IAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,6CAA6C,EAEpE;IAED;;OAEG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,uBAAuB,GACtC,IAAI,CAiBN;CACF"}