@kensio/yulin 0.43.0 → 0.44.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 (408) hide show
  1. package/README.md +1 -0
  2. package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
  3. package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
  4. package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
  5. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +11 -0
  6. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
  7. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +19 -0
  8. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  9. package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
  10. package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
  11. package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
  12. package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
  13. package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -0
  14. package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
  15. package/dist/service/aws/sim-aws-account-region-scope.js +6 -0
  16. package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
  17. package/dist/service/aws/sim-aws.d.ts +3 -0
  18. package/dist/service/aws/sim-aws.d.ts.map +1 -1
  19. package/dist/service/aws/sim-aws.js +4 -0
  20. package/dist/service/aws/sim-aws.js.map +1 -1
  21. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.d.ts.map +1 -1
  22. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js +8 -0
  23. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js.map +1 -1
  24. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts +28 -0
  25. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts.map +1 -0
  26. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js +33 -0
  27. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js.map +1 -0
  28. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.d.ts.map +1 -1
  29. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js +2 -0
  30. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js.map +1 -1
  31. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts +6 -0
  32. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts.map +1 -0
  33. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js +13 -0
  34. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js.map +1 -0
  35. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts +28 -0
  36. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts.map +1 -0
  37. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js +40 -0
  38. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js.map +1 -0
  39. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.d.ts.map +1 -1
  40. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js +3 -0
  41. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js.map +1 -1
  42. package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts +3 -0
  43. package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts.map +1 -1
  44. package/dist/service/cloudformation/resource/sim-cfn-resource.js +4 -1
  45. package/dist/service/cloudformation/resource/sim-cfn-resource.js.map +1 -1
  46. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.d.ts.map +1 -1
  47. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js +1 -0
  48. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js.map +1 -1
  49. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts +26 -0
  50. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts.map +1 -0
  51. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js +33 -0
  52. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js.map +1 -0
  53. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts +28 -0
  54. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts.map +1 -0
  55. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js +38 -0
  56. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js.map +1 -0
  57. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts +17 -0
  58. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts.map +1 -0
  59. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js +71 -0
  60. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js.map +1 -0
  61. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts +4 -0
  62. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts.map +1 -1
  63. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js +12 -0
  64. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js.map +1 -1
  65. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts +5 -6
  66. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts.map +1 -1
  67. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js +7 -13
  68. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js.map +1 -1
  69. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +1 -0
  70. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts.map +1 -1
  71. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +8 -0
  72. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js.map +1 -1
  73. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +25 -0
  74. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -0
  75. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +55 -0
  76. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -0
  77. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts +6 -0
  78. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts.map +1 -0
  79. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +64 -0
  80. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js.map +1 -0
  81. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts +17 -0
  82. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts.map +1 -0
  83. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js +47 -0
  84. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js.map +1 -0
  85. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts +53 -0
  86. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -0
  87. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +77 -0
  88. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -0
  89. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts +41 -0
  90. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts.map +1 -0
  91. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js +51 -0
  92. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js.map +1 -0
  93. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts +91 -0
  94. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts.map +1 -0
  95. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js +8 -0
  96. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js.map +1 -0
  97. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts +60 -0
  98. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts.map +1 -0
  99. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js +89 -0
  100. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js.map +1 -0
  101. package/dist/service/lambda/command/sim-lambda-command.types.d.ts +1 -0
  102. package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
  103. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts +27 -0
  104. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts.map +1 -0
  105. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js +32 -0
  106. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js.map +1 -0
  107. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts +40 -0
  108. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts.map +1 -0
  109. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js +55 -0
  110. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js.map +1 -0
  111. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts +85 -0
  112. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts.map +1 -0
  113. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js +136 -0
  114. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js.map +1 -0
  115. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts +49 -0
  116. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts.map +1 -0
  117. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js +97 -0
  118. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js.map +1 -0
  119. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts +56 -0
  120. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts.map +1 -0
  121. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js +55 -0
  122. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js.map +1 -0
  123. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts +49 -0
  124. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts.map +1 -0
  125. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js +2 -0
  126. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js.map +1 -0
  127. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts +118 -0
  128. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts.map +1 -0
  129. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js +49 -0
  130. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js.map +1 -0
  131. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +32 -0
  132. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts.map +1 -0
  133. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +52 -0
  134. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js.map +1 -0
  135. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts +29 -0
  136. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts.map +1 -0
  137. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js +49 -0
  138. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js.map +1 -0
  139. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts +57 -0
  140. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts.map +1 -0
  141. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js +89 -0
  142. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js.map +1 -0
  143. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts +46 -0
  144. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts.map +1 -0
  145. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js +57 -0
  146. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js.map +1 -0
  147. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +101 -0
  148. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -0
  149. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +93 -0
  150. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -0
  151. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts +37 -0
  152. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts.map +1 -0
  153. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js +44 -0
  154. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js.map +1 -0
  155. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts +23 -0
  156. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts.map +1 -0
  157. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js +46 -0
  158. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js.map +1 -0
  159. package/dist/service/lambda/function/sim-lambda-function-name.d.ts +10 -0
  160. package/dist/service/lambda/function/sim-lambda-function-name.d.ts.map +1 -0
  161. package/dist/service/lambda/function/sim-lambda-function-name.js +18 -0
  162. package/dist/service/lambda/function/sim-lambda-function-name.js.map +1 -0
  163. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts +4 -0
  164. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts.map +1 -1
  165. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js +6 -0
  166. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js.map +1 -1
  167. package/dist/service/lambda/index.d.ts +1 -0
  168. package/dist/service/lambda/index.d.ts.map +1 -1
  169. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
  170. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +16 -0
  171. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
  172. package/dist/service/lambda/sim-lambda-commands.d.ts +51 -0
  173. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -0
  174. package/dist/service/lambda/sim-lambda-commands.js +84 -0
  175. package/dist/service/lambda/sim-lambda-commands.js.map +1 -0
  176. package/dist/service/lambda/sim-lambda.d.ts +35 -39
  177. package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
  178. package/dist/service/lambda/sim-lambda.js +47 -65
  179. package/dist/service/lambda/sim-lambda.js.map +1 -1
  180. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts +25 -0
  181. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts.map +1 -0
  182. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js +33 -0
  183. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js.map +1 -0
  184. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts +45 -0
  185. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts.map +1 -0
  186. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js +67 -0
  187. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js.map +1 -0
  188. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts +44 -0
  189. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts.map +1 -0
  190. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js +72 -0
  191. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js.map +1 -0
  192. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts +47 -0
  193. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts.map +1 -0
  194. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js +122 -0
  195. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js.map +1 -0
  196. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts +24 -0
  197. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts.map +1 -0
  198. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js +29 -0
  199. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js.map +1 -0
  200. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts +41 -0
  201. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts.map +1 -0
  202. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js +51 -0
  203. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js.map +1 -0
  204. package/dist/service/sqs/command/message/consume.command.d.ts +61 -0
  205. package/dist/service/sqs/command/message/consume.command.d.ts.map +1 -0
  206. package/dist/service/sqs/command/message/consume.command.js +2 -0
  207. package/dist/service/sqs/command/message/consume.command.js.map +1 -0
  208. package/dist/service/sqs/command/message/receive.command.d.ts +40 -0
  209. package/dist/service/sqs/command/message/receive.command.d.ts.map +1 -0
  210. package/dist/service/sqs/command/message/receive.command.js +2 -0
  211. package/dist/service/sqs/command/message/receive.command.js.map +1 -0
  212. package/dist/service/sqs/command/message/send.command.d.ts +80 -0
  213. package/dist/service/sqs/command/message/send.command.d.ts.map +1 -0
  214. package/dist/service/sqs/command/message/send.command.js +2 -0
  215. package/dist/service/sqs/command/message/send.command.js.map +1 -0
  216. package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts +39 -0
  217. package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts.map +1 -0
  218. package/dist/service/sqs/command/message/sim-sqs-batch-entries.js +67 -0
  219. package/dist/service/sqs/command/message/sim-sqs-batch-entries.js.map +1 -0
  220. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts +31 -0
  221. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts.map +1 -0
  222. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js +51 -0
  223. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js.map +1 -0
  224. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts +38 -0
  225. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts.map +1 -0
  226. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js +58 -0
  227. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js.map +1 -0
  228. package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts +28 -0
  229. package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts.map +1 -0
  230. package/dist/service/sqs/command/message/sim-sqs-message-handles.js +36 -0
  231. package/dist/service/sqs/command/message/sim-sqs-message-handles.js.map +1 -0
  232. package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts +27 -0
  233. package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts.map +1 -0
  234. package/dist/service/sqs/command/message/sim-sqs-receive-limits.js +70 -0
  235. package/dist/service/sqs/command/message/sim-sqs-receive-limits.js.map +1 -0
  236. package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts +32 -0
  237. package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts.map +1 -0
  238. package/dist/service/sqs/command/message/sim-sqs-receive-message.js +33 -0
  239. package/dist/service/sqs/command/message/sim-sqs-receive-message.js.map +1 -0
  240. package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts +33 -0
  241. package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts.map +1 -0
  242. package/dist/service/sqs/command/message/sim-sqs-receive-request.js +55 -0
  243. package/dist/service/sqs/command/message/sim-sqs-receive-request.js.map +1 -0
  244. package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts +25 -0
  245. package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts.map +1 -0
  246. package/dist/service/sqs/command/message/sim-sqs-received-message-view.js +38 -0
  247. package/dist/service/sqs/command/message/sim-sqs-received-message-view.js.map +1 -0
  248. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts +32 -0
  249. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts.map +1 -0
  250. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js +56 -0
  251. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js.map +1 -0
  252. package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts +18 -0
  253. package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts.map +1 -0
  254. package/dist/service/sqs/command/message/sim-sqs-sent-message.js +37 -0
  255. package/dist/service/sqs/command/message/sim-sqs-sent-message.js.map +1 -0
  256. package/dist/service/sqs/command/queue/queue.command.d.ts +114 -0
  257. package/dist/service/sqs/command/queue/queue.command.d.ts.map +1 -0
  258. package/dist/service/sqs/command/queue/queue.command.js +2 -0
  259. package/dist/service/sqs/command/queue/queue.command.js.map +1 -0
  260. package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts +51 -0
  261. package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts.map +1 -0
  262. package/dist/service/sqs/command/queue/sim-sqs-create-queue.js +70 -0
  263. package/dist/service/sqs/command/queue/sim-sqs-create-queue.js.map +1 -0
  264. package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts +63 -0
  265. package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts.map +1 -0
  266. package/dist/service/sqs/command/queue/sim-sqs-queue-access.js +98 -0
  267. package/dist/service/sqs/command/queue/sim-sqs-queue-access.js.map +1 -0
  268. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts +45 -0
  269. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts.map +1 -0
  270. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js +74 -0
  271. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js.map +1 -0
  272. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts +47 -0
  273. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts.map +1 -0
  274. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js +55 -0
  275. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js.map +1 -0
  276. package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts +27 -0
  277. package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts.map +1 -0
  278. package/dist/service/sqs/command/queue/sim-sqs-queue-page.js +54 -0
  279. package/dist/service/sqs/command/queue/sim-sqs-queue-page.js.map +1 -0
  280. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts +18 -0
  281. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts.map +1 -0
  282. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js +27 -0
  283. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js.map +1 -0
  284. package/dist/service/sqs/command/sim-sqs-command.types.d.ts +8 -0
  285. package/dist/service/sqs/command/sim-sqs-command.types.d.ts.map +1 -0
  286. package/dist/service/sqs/command/sim-sqs-command.types.js +2 -0
  287. package/dist/service/sqs/command/sim-sqs-command.types.js.map +1 -0
  288. package/dist/service/sqs/error/sim-sqs.error.d.ts +162 -0
  289. package/dist/service/sqs/error/sim-sqs.error.d.ts.map +1 -0
  290. package/dist/service/sqs/error/sim-sqs.error.js +191 -0
  291. package/dist/service/sqs/error/sim-sqs.error.js.map +1 -0
  292. package/dist/service/sqs/index.d.ts +14 -0
  293. package/dist/service/sqs/index.d.ts.map +1 -0
  294. package/dist/service/sqs/index.js +13 -0
  295. package/dist/service/sqs/index.js.map +1 -0
  296. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts +56 -0
  297. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts.map +1 -0
  298. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js +42 -0
  299. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js.map +1 -0
  300. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts +23 -0
  301. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts.map +1 -0
  302. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js +68 -0
  303. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js.map +1 -0
  304. package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts +17 -0
  305. package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts.map +1 -0
  306. package/dist/service/sqs/message/sim-sqs-message-attribute-value.js +2 -0
  307. package/dist/service/sqs/message/sim-sqs-message-attribute-value.js.map +1 -0
  308. package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts +29 -0
  309. package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts.map +1 -0
  310. package/dist/service/sqs/message/sim-sqs-message-attribute.js +56 -0
  311. package/dist/service/sqs/message/sim-sqs-message-attribute.js.map +1 -0
  312. package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts +44 -0
  313. package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts.map +1 -0
  314. package/dist/service/sqs/message/sim-sqs-message-attributes.js +93 -0
  315. package/dist/service/sqs/message/sim-sqs-message-attributes.js.map +1 -0
  316. package/dist/service/sqs/message/sim-sqs-message-body.d.ts +18 -0
  317. package/dist/service/sqs/message/sim-sqs-message-body.d.ts.map +1 -0
  318. package/dist/service/sqs/message/sim-sqs-message-body.js +66 -0
  319. package/dist/service/sqs/message/sim-sqs-message-body.js.map +1 -0
  320. package/dist/service/sqs/message/sim-sqs-message-store.d.ts +74 -0
  321. package/dist/service/sqs/message/sim-sqs-message-store.d.ts.map +1 -0
  322. package/dist/service/sqs/message/sim-sqs-message-store.js +99 -0
  323. package/dist/service/sqs/message/sim-sqs-message-store.js.map +1 -0
  324. package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts +28 -0
  325. package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts.map +1 -0
  326. package/dist/service/sqs/message/sim-sqs-message-system-attributes.js +75 -0
  327. package/dist/service/sqs/message/sim-sqs-message-system-attributes.js.map +1 -0
  328. package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts +56 -0
  329. package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts.map +1 -0
  330. package/dist/service/sqs/message/sim-sqs-message-visibility.js +79 -0
  331. package/dist/service/sqs/message/sim-sqs-message-visibility.js.map +1 -0
  332. package/dist/service/sqs/message/sim-sqs-message-writer.d.ts +41 -0
  333. package/dist/service/sqs/message/sim-sqs-message-writer.d.ts.map +1 -0
  334. package/dist/service/sqs/message/sim-sqs-message-writer.js +56 -0
  335. package/dist/service/sqs/message/sim-sqs-message-writer.js.map +1 -0
  336. package/dist/service/sqs/message/sim-sqs-message.d.ts +96 -0
  337. package/dist/service/sqs/message/sim-sqs-message.d.ts.map +1 -0
  338. package/dist/service/sqs/message/sim-sqs-message.js +136 -0
  339. package/dist/service/sqs/message/sim-sqs-message.js.map +1 -0
  340. package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts +10 -0
  341. package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts.map +1 -0
  342. package/dist/service/sqs/message/sim-sqs-receipt-handle.js +14 -0
  343. package/dist/service/sqs/message/sim-sqs-receipt-handle.js.map +1 -0
  344. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts +51 -0
  345. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts.map +1 -0
  346. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js +62 -0
  347. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js.map +1 -0
  348. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts +20 -0
  349. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts.map +1 -0
  350. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js +42 -0
  351. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js.map +1 -0
  352. package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts +65 -0
  353. package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts.map +1 -0
  354. package/dist/service/sqs/queue/sim-sqs-queue-activity.js +57 -0
  355. package/dist/service/sqs/queue/sim-sqs-queue-activity.js.map +1 -0
  356. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +41 -0
  357. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -0
  358. package/dist/service/sqs/queue/sim-sqs-queue-arn.js +47 -0
  359. package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -0
  360. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts +27 -0
  361. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts.map +1 -0
  362. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js +83 -0
  363. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js.map +1 -0
  364. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts +34 -0
  365. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts.map +1 -0
  366. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js +93 -0
  367. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js.map +1 -0
  368. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts +20 -0
  369. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts.map +1 -0
  370. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js +37 -0
  371. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js.map +1 -0
  372. package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts +60 -0
  373. package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts.map +1 -0
  374. package/dist/service/sqs/queue/sim-sqs-queue-attributes.js +96 -0
  375. package/dist/service/sqs/queue/sim-sqs-queue-attributes.js.map +1 -0
  376. package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts +21 -0
  377. package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts.map +1 -0
  378. package/dist/service/sqs/queue/sim-sqs-queue-name.js +47 -0
  379. package/dist/service/sqs/queue/sim-sqs-queue-name.js.map +1 -0
  380. package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts +22 -0
  381. package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts.map +1 -0
  382. package/dist/service/sqs/queue/sim-sqs-queue-report.js +29 -0
  383. package/dist/service/sqs/queue/sim-sqs-queue-report.js.map +1 -0
  384. package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts +60 -0
  385. package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts.map +1 -0
  386. package/dist/service/sqs/queue/sim-sqs-queue-store.js +87 -0
  387. package/dist/service/sqs/queue/sim-sqs-queue-store.js.map +1 -0
  388. package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts +24 -0
  389. package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts.map +1 -0
  390. package/dist/service/sqs/queue/sim-sqs-queue-url.js +36 -0
  391. package/dist/service/sqs/queue/sim-sqs-queue-url.js.map +1 -0
  392. package/dist/service/sqs/queue/sim-sqs-queue.d.ts +130 -0
  393. package/dist/service/sqs/queue/sim-sqs-queue.d.ts.map +1 -0
  394. package/dist/service/sqs/queue/sim-sqs-queue.js +188 -0
  395. package/dist/service/sqs/queue/sim-sqs-queue.js.map +1 -0
  396. package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts +30 -0
  397. package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts.map +1 -0
  398. package/dist/service/sqs/queue/sim-sqs-redrive-policy.js +118 -0
  399. package/dist/service/sqs/queue/sim-sqs-redrive-policy.js.map +1 -0
  400. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts +18 -0
  401. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts.map +1 -0
  402. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js +76 -0
  403. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js.map +1 -0
  404. package/dist/service/sqs/sim-sqs.d.ts +119 -0
  405. package/dist/service/sqs/sim-sqs.d.ts.map +1 -0
  406. package/dist/service/sqs/sim-sqs.js +213 -0
  407. package/dist/service/sqs/sim-sqs.js.map +1 -0
  408. package/package.json +6 -1
@@ -0,0 +1,60 @@
1
+ import type { BackgroundScheduler } from "../../../../util/background/background.js";
2
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
3
+ import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
4
+ import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
5
+ import type { SimLambdaEventSourceQueues } from "../../event-source/queue/sim-lambda-event-source-queues.js";
6
+ import type { SimLambdaEventSourceMapping } from "../../event-source/sim-lambda-event-source-mapping.js";
7
+ import type { SimLambdaEventSourcePollers } from "../../event-source/sim-lambda-event-source-pollers.js";
8
+ import type { SimLambdaFunctionLookup } from "../../function/url/sim-lambda-function-lookup.js";
9
+ import type { SimCreateEventSourceMappingCommand, SimCreateEventSourceMappingCommandOutput, SimDeleteEventSourceMappingCommand, SimDeleteEventSourceMappingCommandOutput, SimGetEventSourceMappingCommand, SimGetEventSourceMappingCommandOutput, SimListEventSourceMappingsCommand, SimListEventSourceMappingsCommandOutput } from "./event-source-mapping.command.js";
10
+ interface SimLambdaEventSourceMappingCommandsProperties {
11
+ readonly accountRegionScope: SimAwsAccountRegionScope;
12
+ readonly pollers: SimLambdaEventSourcePollers;
13
+ readonly queues: SimLambdaEventSourceQueues;
14
+ readonly functions: SimLambdaFunctionLookup;
15
+ readonly iam: SimIamInterServiceAuthZ;
16
+ readonly background: BackgroundScheduler;
17
+ }
18
+ interface SimLambdaEventSourceMappingCommandOptions {
19
+ readonly caller?: SimAwsCaller;
20
+ }
21
+ /**
22
+ * The event source mapping commands of one simulated Lambda scope.
23
+ *
24
+ * All four act on the same store and authorize against the function the mapping
25
+ * delivers to, so they share one class rather than repeating that wiring.
26
+ * Creating a mapping is the only one with anything else to do, so it is the
27
+ * only one with a handler of its own.
28
+ */
29
+ export declare class SimLambdaEventSourceMappingCommands {
30
+ private readonly mappings;
31
+ private readonly access;
32
+ private readonly properties;
33
+ constructor(properties: SimLambdaEventSourceMappingCommandsProperties);
34
+ /**
35
+ * Create an event source mapping from a queue to a function.
36
+ */
37
+ create(command: SimCreateEventSourceMappingCommand, options?: SimLambdaEventSourceMappingCommandOptions): Promise<SimCreateEventSourceMappingCommandOutput>;
38
+ /**
39
+ * Read one event source mapping.
40
+ */
41
+ get(command: SimGetEventSourceMappingCommand, options?: SimLambdaEventSourceMappingCommandOptions): Promise<SimGetEventSourceMappingCommandOutput>;
42
+ /**
43
+ * List the event source mappings, narrowed by queue or function.
44
+ *
45
+ * A listing naming no function authorizes against every function in the
46
+ * Account and Region, because that is what it can report on. A policy naming
47
+ * one function ARN therefore allows only the listing that names it.
48
+ */
49
+ list(command: SimListEventSourceMappingsCommand, options?: SimLambdaEventSourceMappingCommandOptions): Promise<SimListEventSourceMappingsCommandOutput>;
50
+ /**
51
+ * Delete an event source mapping, which stops it polling.
52
+ */
53
+ delete(command: SimDeleteEventSourceMappingCommand, options?: SimLambdaEventSourceMappingCommandOptions): Promise<SimDeleteEventSourceMappingCommandOutput>;
54
+ /**
55
+ * Find a mapping by UUID, for tests inspecting mapping state directly.
56
+ */
57
+ find(uuid: string): SimLambdaEventSourceMapping | undefined;
58
+ }
59
+ export {};
60
+ //# sourceMappingURL=sim-lambda-event-source-mapping-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-mapping-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.ts"],"names":[],"mappings":"AAAA,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;AAC7G,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAEzG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAEzG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAMhG,OAAO,KAAK,EACV,kCAAkC,EAClC,wCAAwC,EACxC,kCAAkC,EAClC,wCAAwC,EACxC,+BAA+B,EAC/B,qCAAqC,EACrC,iCAAiC,EACjC,uCAAuC,EACxC,MAAM,mCAAmC,CAAC;AAE3C,UAAU,6CAA6C;IACrD,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD,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,yCAAyC;IACjD,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,qBAAa,mCAAmC;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0C;IACnE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAC3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgD;IAE3E,YAAY,UAAU,EAAE,6CAA6C,EAOpE;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,wCAAwC,CAAC,CAKnD;IAED;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,qCAAqC,CAAC,CAUhD;IAED;;;;;;OAMG;IACG,IAAI,CACR,OAAO,EAAE,iCAAiC,EAC1C,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,uCAAuC,CAAC,CAoBlD;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,wCAAwC,CAAC,CAanD;IAED;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS,CAE1D;CACF"}
@@ -0,0 +1,89 @@
1
+ import { SimLambdaEventSourceMappingStore } from "../../event-source/sim-lambda-event-source-mapping-store.js";
2
+ import { simLambdaFunctionNameOf } from "../../function/sim-lambda-function-name.js";
3
+ import { CreateEventSourceMappingCommandHandler } from "./create-event-source-mapping.handler.js";
4
+ import { anyFunctionName, SimLambdaEventSourceMappingAccess, } from "./event-source-mapping-access.js";
5
+ /**
6
+ * The event source mapping commands of one simulated Lambda scope.
7
+ *
8
+ * All four act on the same store and authorize against the function the mapping
9
+ * delivers to, so they share one class rather than repeating that wiring.
10
+ * Creating a mapping is the only one with anything else to do, so it is the
11
+ * only one with a handler of its own.
12
+ */
13
+ export class SimLambdaEventSourceMappingCommands {
14
+ mappings = new SimLambdaEventSourceMappingStore();
15
+ access;
16
+ properties;
17
+ constructor(properties) {
18
+ this.properties = properties;
19
+ this.access = new SimLambdaEventSourceMappingAccess({
20
+ mappings: this.mappings,
21
+ functions: properties.functions,
22
+ iam: properties.iam,
23
+ });
24
+ }
25
+ /**
26
+ * Create an event source mapping from a queue to a function.
27
+ */
28
+ async create(command, options) {
29
+ return await new CreateEventSourceMappingCommandHandler({
30
+ ...this.properties,
31
+ mappings: this.mappings,
32
+ }).handle(command, options);
33
+ }
34
+ /**
35
+ * Read one event source mapping.
36
+ */
37
+ async get(command, options) {
38
+ await this.properties.background.sequence();
39
+ const mapping = this.access.require("lambda:GetEventSourceMapping", command.input.UUID, options?.caller);
40
+ return { $metadata: {}, ...mapping.configuration() };
41
+ }
42
+ /**
43
+ * List the event source mappings, narrowed by queue or function.
44
+ *
45
+ * A listing naming no function authorizes against every function in the
46
+ * Account and Region, because that is what it can report on. A policy naming
47
+ * one function ARN therefore allows only the listing that names it.
48
+ */
49
+ async list(command, options) {
50
+ await this.properties.background.sequence();
51
+ const functionName = listedFunctionName(command.input.FunctionName);
52
+ this.access.authorizeFunction("lambda:ListEventSourceMappings", functionName ?? anyFunctionName, options?.caller);
53
+ const matching = this.mappings.matching({
54
+ eventSourceArn: command.input.EventSourceArn,
55
+ functionName,
56
+ });
57
+ return {
58
+ $metadata: {},
59
+ EventSourceMappings: matching.map((mapping) => mapping.configuration()),
60
+ };
61
+ }
62
+ /**
63
+ * Delete an event source mapping, which stops it polling.
64
+ */
65
+ async delete(command, options) {
66
+ await this.properties.background.sequence();
67
+ const mapping = this.access.require("lambda:DeleteEventSourceMapping", command.input.UUID, options?.caller);
68
+ this.properties.pollers.stop(mapping);
69
+ this.mappings.remove(mapping);
70
+ return { $metadata: {}, ...mapping.configuration() };
71
+ }
72
+ /**
73
+ * Find a mapping by UUID, for tests inspecting mapping state directly.
74
+ */
75
+ find(uuid) {
76
+ return this.mappings.find(uuid);
77
+ }
78
+ }
79
+ /**
80
+ * The function name a listing is narrowed by, which is any of them when the
81
+ * request names none.
82
+ */
83
+ function listedFunctionName(requested) {
84
+ if (requested === undefined) {
85
+ return undefined;
86
+ }
87
+ return simLambdaFunctionNameOf(requested);
88
+ }
89
+ //# sourceMappingURL=sim-lambda-event-source-mapping-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-mapping-commands.js","sourceRoot":"","sources":["../../../../../src/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.ts"],"names":[],"mappings":"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"}
@@ -6,6 +6,7 @@
6
6
  * declare its methods, names one module rather than one per command.
7
7
  */
8
8
  export type { SimAddPermissionCommand, SimAddPermissionCommandOutput, } from "./add-permission/add-permission.command.js";
9
+ export type { SimCreateEventSourceMappingCommand, SimCreateEventSourceMappingCommandInput, SimCreateEventSourceMappingCommandOutput, SimDeleteEventSourceMappingCommand, SimDeleteEventSourceMappingCommandInput, SimDeleteEventSourceMappingCommandOutput, SimEventSourceMappingCommandOutput, SimGetEventSourceMappingCommand, SimGetEventSourceMappingCommandInput, SimGetEventSourceMappingCommandOutput, SimListEventSourceMappingsCommand, SimListEventSourceMappingsCommandInput, SimListEventSourceMappingsCommandOutput, } from "./event-source-mapping/event-source-mapping.command.js";
9
10
  export type { SimCreateFunctionCommand, SimCreateFunctionCommandOutput, } from "./create-function/create-function.command.js";
10
11
  export type { SimCreateFunctionUrlConfigCommand, SimCreateFunctionUrlConfigCommandOutput, } from "./create-function-url-config/create-function-url-config.command.js";
11
12
  export type { SimDeleteFunctionUrlConfigCommand, SimDeleteFunctionUrlConfigCommandOutput, } from "./delete-function-url-config/delete-function-url-config.command.js";
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/command/sim-lambda-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC"}
1
+ {"version":3,"file":"sim-lambda-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/command/sim-lambda-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,GACxC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,gCAAgC,EAChC,sCAAsC,GACvC,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { SimLambdaFunction } from "../../function/sim-lambda-function.js";
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";
6
+ interface SimLambdaEventSourceDeliveryProperties {
7
+ readonly mapping: SimLambdaEventSourceMapping;
8
+ readonly eventSourceArn: SimLambdaSqsEventSourceArn;
9
+ }
10
+ /**
11
+ * Hands one batch to a function and reads what became of it.
12
+ *
13
+ * The batch is invoked directly rather than through the Invoke command because
14
+ * 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.
16
+ */
17
+ export declare class SimLambdaEventSourceDelivery {
18
+ private readonly eventBuilder;
19
+ private readonly batchResponse;
20
+ constructor(properties: SimLambdaEventSourceDeliveryProperties);
21
+ /**
22
+ * Deliver a batch, answering with what to delete and what to leave.
23
+ */
24
+ to(simFunction: SimLambdaFunction, messages: readonly SimLambdaEventSourceMessage[]): Promise<SimLambdaSqsBatchOutcome>;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=sim-lambda-event-source-delivery.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,32 @@
1
+ import { SimLambdaSqsBatchResponse, } from "./sim-lambda-sqs-batch-response.js";
2
+ import { SimLambdaSqsEventBuilder } from "./sim-lambda-sqs-event.js";
3
+ /**
4
+ * Hands one batch to a function and reads what became of it.
5
+ *
6
+ * The batch is invoked directly rather than through the Invoke command because
7
+ * 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.
9
+ */
10
+ export class SimLambdaEventSourceDelivery {
11
+ eventBuilder;
12
+ batchResponse;
13
+ constructor(properties) {
14
+ this.eventBuilder = new SimLambdaSqsEventBuilder(properties.eventSourceArn);
15
+ this.batchResponse = new SimLambdaSqsBatchResponse(properties.mapping.reportsBatchItemFailures);
16
+ }
17
+ /**
18
+ * Deliver a batch, answering with what to delete and what to leave.
19
+ */
20
+ async to(simFunction, messages) {
21
+ try {
22
+ return this.batchResponse.handled(messages, await simFunction.invoke(this.eventBuilder.of(messages)));
23
+ }
24
+ catch {
25
+ // As on real Lambda, the handler error goes to the function's logs and
26
+ // not to whoever sent the message. What the sender sees is the batch
27
+ // coming back to the queue.
28
+ return this.batchResponse.failed(messages);
29
+ }
30
+ }
31
+ }
32
+ //# sourceMappingURL=sim-lambda-event-source-delivery.js.map
@@ -0,0 +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"}
@@ -0,0 +1,40 @@
1
+ import type { BackgroundScheduler, BackgroundTask } from "../../../../util/background/background.js";
2
+ interface SimLambdaEventSourcePollScheduleProperties {
3
+ readonly background: BackgroundScheduler;
4
+ readonly poll: BackgroundTask;
5
+ }
6
+ /**
7
+ * When one event source mapping polls next.
8
+ *
9
+ * Real Lambda polls its queue continuously, and nothing in this simulation runs
10
+ * continuously, so every poll is scheduled in response to something: a message
11
+ * arriving, a batch coming back, or a batch that filled the request suggesting
12
+ * there is more waiting.
13
+ */
14
+ export declare class SimLambdaEventSourcePollSchedule {
15
+ private readonly background;
16
+ private readonly poll;
17
+ private scheduled;
18
+ constructor(properties: SimLambdaEventSourcePollScheduleProperties);
19
+ /**
20
+ * Poll as soon as the simulation gets to it, unless a poll is already
21
+ * waiting to happen.
22
+ */
23
+ now(): void;
24
+ /**
25
+ * Poll when a message becomes receivable, which is now for an ordinary send
26
+ * and later for one sent with a delay.
27
+ */
28
+ at(instant: Date): void;
29
+ /**
30
+ * Poll again once a visibility timeout has run, which is an instant on the
31
+ * simulation's clock rather than something that fires.
32
+ *
33
+ * Advancing time is what brings a returned batch back, so this is scheduled
34
+ * on the clock even for a timeout of zero. A poll that ran straight back
35
+ * round would spin on a batch the function keeps failing.
36
+ */
37
+ afterSeconds(seconds: number): void;
38
+ }
39
+ export {};
40
+ //# sourceMappingURL=sim-lambda-event-source-poll-schedule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-poll-schedule.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2CAA2C,CAAC;AAInD,UAAU,0CAA0C;IAClD,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IAEtC,OAAO,CAAC,SAAS,CAAS;IAE1B,YAAY,UAAU,EAAE,0CAA0C,EAGjE;IAED;;;OAGG;IACH,GAAG,IAAI,IAAI,CAWV;IAED;;;OAGG;IACH,EAAE,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAQtB;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAOlC;CACF"}
@@ -0,0 +1,55 @@
1
+ const millisecondsPerSecond = 1000;
2
+ /**
3
+ * When one event source mapping polls next.
4
+ *
5
+ * Real Lambda polls its queue continuously, and nothing in this simulation runs
6
+ * continuously, so every poll is scheduled in response to something: a message
7
+ * arriving, a batch coming back, or a batch that filled the request suggesting
8
+ * there is more waiting.
9
+ */
10
+ export class SimLambdaEventSourcePollSchedule {
11
+ background;
12
+ poll;
13
+ scheduled = false;
14
+ constructor(properties) {
15
+ this.background = properties.background;
16
+ this.poll = properties.poll;
17
+ }
18
+ /**
19
+ * Poll as soon as the simulation gets to it, unless a poll is already
20
+ * waiting to happen.
21
+ */
22
+ now() {
23
+ if (this.scheduled) {
24
+ return;
25
+ }
26
+ this.scheduled = true;
27
+ this.background.schedule(async () => {
28
+ this.scheduled = false;
29
+ await this.poll();
30
+ });
31
+ }
32
+ /**
33
+ * Poll when a message becomes receivable, which is now for an ordinary send
34
+ * and later for one sent with a delay.
35
+ */
36
+ at(instant) {
37
+ if (instant.getTime() <= this.background.now().getTime()) {
38
+ this.now();
39
+ return;
40
+ }
41
+ this.background.scheduleAt(instant, this.poll);
42
+ }
43
+ /**
44
+ * Poll again once a visibility timeout has run, which is an instant on the
45
+ * simulation's clock rather than something that fires.
46
+ *
47
+ * Advancing time is what brings a returned batch back, so this is scheduled
48
+ * on the clock even for a timeout of zero. A poll that ran straight back
49
+ * round would spin on a batch the function keeps failing.
50
+ */
51
+ afterSeconds(seconds) {
52
+ this.background.scheduleAt(new Date(this.background.now().getTime() + seconds * millisecondsPerSecond), this.poll);
53
+ }
54
+ }
55
+ //# sourceMappingURL=sim-lambda-event-source-poll-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-poll-schedule.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.ts"],"names":[],"mappings":"AAKA,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAOnC;;;;;;;GAOG;AACH,MAAM,OAAO,gCAAgC;IAC1B,UAAU,CAAsB;IAChC,IAAI,CAAiB;IAE9B,SAAS,GAAG,KAAK,CAAC;IAE1B,YAAY,UAAsD;QAChE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,GAAG;QACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;YAClC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YAEvB,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,EAAE,CAAC,OAAa;QACd,IAAI,OAAO,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;YACzD,IAAI,CAAC,GAAG,EAAE,CAAC;YAEX,OAAO;QACT,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,OAAe;QAC1B,IAAI,CAAC,UAAU,CAAC,UAAU,CACxB,IAAI,IAAI,CACN,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,qBAAqB,CAClE,EACD,IAAI,CAAC,IAAI,CACV,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,85 @@
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
+ /**
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.
21
+ *
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.
28
+ */
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);
35
+ /**
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.
42
+ */
43
+ watch(): void;
44
+ /**
45
+ * 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.
47
+ */
48
+ pollNow(): void;
49
+ /**
50
+ * Stop polling, as deleting the mapping does.
51
+ */
52
+ 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
+ }
84
+ export {};
85
+ //# sourceMappingURL=sim-lambda-event-source-poller.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,136 @@
1
+ import { SimLambdaEventSourceDelivery } from "./sim-lambda-event-source-delivery.js";
2
+ import { SimLambdaEventSourcePollSchedule } from "./sim-lambda-event-source-poll-schedule.js";
3
+ /**
4
+ * Polls one event source mapping's queue and invokes its function.
5
+ *
6
+ * Real Lambda polls a queue continuously. Nothing in this simulation runs
7
+ * continuously, so the queue says when a message has arrived and a poll is
8
+ * scheduled in response. A test that awaits the simulation settling has
9
+ * therefore watched the whole delivery happen, rather than having waited a
10
+ * while and hoped.
11
+ *
12
+ * A batch the function returns from is deleted from the queue. A batch it
13
+ * throws on is left there, which hides it for the visibility timeout and hands
14
+ * it back afterwards, so a redrive policy eventually gives up on it exactly as
15
+ * it would for any other failing consumer. That is why the poller invokes the
16
+ * function directly rather than through the Invoke command: an asynchronous
17
+ * invocation drops its handler error, and this one has to be seen.
18
+ */
19
+ export class SimLambdaEventSourcePoller {
20
+ properties;
21
+ delivery;
22
+ schedule;
23
+ stopped = false;
24
+ constructor(properties) {
25
+ this.properties = properties;
26
+ this.delivery = new SimLambdaEventSourceDelivery(properties);
27
+ this.schedule = new SimLambdaEventSourcePollSchedule({
28
+ background: properties.background,
29
+ poll: async () => {
30
+ await this.run();
31
+ },
32
+ });
33
+ }
34
+ /**
35
+ * Watch the queue this mapping polls.
36
+ *
37
+ * Watching starts as soon as the mapping is created, before it has finished
38
+ * creating, so a message sent in between is not missed. The poll it wakes
39
+ * finds a mapping that is not polling yet and does nothing, and the poll that
40
+ * follows activation picks the message up.
41
+ */
42
+ watch() {
43
+ this.properties.queues.watch(this.properties.eventSourceArn.value, this);
44
+ }
45
+ /**
46
+ * Poll as soon as the simulation gets to it, which is what a newly enabled
47
+ * mapping does with whatever is already on its queue.
48
+ */
49
+ pollNow() {
50
+ this.schedule.now();
51
+ }
52
+ /**
53
+ * Stop polling, as deleting the mapping does.
54
+ */
55
+ stop() {
56
+ this.stopped = true;
57
+ this.properties.queues.unwatch(this.properties.eventSourceArn.value, this);
58
+ }
59
+ /**
60
+ * Take a message arriving on the queue as something to poll for.
61
+ */
62
+ messageAvailable(availableFrom) {
63
+ this.schedule.at(availableFrom);
64
+ }
65
+ /**
66
+ * Poll once: one batch, delivered and then deleted or left behind.
67
+ */
68
+ async run() {
69
+ const simFunction = this.pollingFunction();
70
+ if (simFunction === undefined) {
71
+ return;
72
+ }
73
+ // Polling is done as the function's execution role, as on real Lambda, so
74
+ // simulated IAM decides whether this mapping may read its queue.
75
+ const request = {
76
+ queueArn: this.properties.eventSourceArn.value,
77
+ caller: { kind: "arn", arn: simFunction.roleArn },
78
+ };
79
+ const visibilityTimeoutSeconds = await this.properties.queues.visibilityTimeoutSeconds(request);
80
+ const messages = await this.properties.queues.receive({
81
+ ...request,
82
+ batchSize: this.properties.mapping.batchSize,
83
+ });
84
+ if (messages.length === 0) {
85
+ this.pollWhenSomethingComesBack();
86
+ return;
87
+ }
88
+ const outcome = await this.delivery.to(simFunction, messages);
89
+ await this.properties.queues.deleteMessages({
90
+ ...request,
91
+ receiptHandles: outcome.handledReceiptHandles,
92
+ });
93
+ this.pollAgainAfter(outcome, messages.length, visibilityTimeoutSeconds);
94
+ }
95
+ /**
96
+ * The function this mapping delivers to, while it should be delivering.
97
+ *
98
+ * A mapping still being created is not polling yet, and a disabled one never
99
+ * is. A function that is not there is not an error here: the mapping simply
100
+ * has nothing to deliver to.
101
+ */
102
+ pollingFunction() {
103
+ if (this.stopped || !this.properties.mapping.isPolling) {
104
+ return undefined;
105
+ }
106
+ return this.properties.functions.find(this.properties.mapping.functionName);
107
+ }
108
+ /**
109
+ * Look again when a message the queue could not hand out becomes
110
+ * receivable.
111
+ *
112
+ * A mapping created while every message on its queue is in flight, or one
113
+ * whose queue holds only delayed messages, has nothing to wake it otherwise.
114
+ */
115
+ pollWhenSomethingComesBack() {
116
+ const availableFrom = this.properties.queues.nextAvailability(this.properties.eventSourceArn.value);
117
+ if (availableFrom !== undefined) {
118
+ this.schedule.at(availableFrom);
119
+ }
120
+ }
121
+ /**
122
+ * Decide when this mapping polls again: when a returned batch becomes
123
+ * visible again, or straight away when a batch filled the request and there
124
+ * may be more waiting.
125
+ */
126
+ pollAgainAfter(outcome, receivedCount, visibilityTimeoutSeconds) {
127
+ if (outcome.hasReturnedMessages) {
128
+ this.schedule.afterSeconds(visibilityTimeoutSeconds);
129
+ return;
130
+ }
131
+ if (receivedCount >= this.properties.mapping.batchSize) {
132
+ this.schedule.now();
133
+ }
134
+ }
135
+ }
136
+ //# sourceMappingURL=sim-lambda-event-source-poller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-event-source-poller.js","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-event-source-poller.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAW9F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,0BAA0B;IACpB,UAAU,CAAuC;IACjD,QAAQ,CAA+B;IACvC,QAAQ,CAAmC;IAEpD,OAAO,GAAG,KAAK,CAAC;IAExB,YAAY,UAAgD;QAC1D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAgC,CAAC;YACnD,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,IAAI,EAAE,KAAK,IAAmB,EAAE;gBAC9B,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACnB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,aAAmB;QAClC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,GAAG;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QAED,0EAA0E;QAC1E,iEAAiE;QACjE,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK;YAC9C,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,CAAC,OAAO,EAAE;SACE,CAAC;QACtD,MAAM,wBAAwB,GAC5B,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;YACpD,GAAG,OAAO;YACV,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS;SAC7C,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,0BAA0B,EAAE,CAAC;YAElC,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAE9D,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC;YAC1C,GAAG,OAAO;YACV,cAAc,EAAE,OAAO,CAAC,qBAAqB;SAC9C,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACK,eAAe;QACrB,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YACvD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACK,0BAA0B;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAC3D,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CACrC,CAAC;QAEF,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,cAAc,CACpB,OAAiC,EACjC,aAAqB,EACrB,wBAAgC;QAEhC,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;YAErD,OAAO;QACT,CAAC;QAED,IAAI,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,49 @@
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 queue or left on it to become visible
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 SimLambdaSqsBatchOutcome {
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 queue.
15
+ */
16
+ get handledReceiptHandles(): readonly string[];
17
+ /**
18
+ * Whether anything was left on the queue 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
+ * A function that returns normally has handled the whole batch, unless the
26
+ * mapping was told to expect a batch item failure report and the function sent
27
+ * one. A report naming an id that was not in the batch returns the whole batch,
28
+ * as on real Lambda: the alternative is to guess which messages the function
29
+ * meant, and guessing wrong loses a message.
30
+ */
31
+ export declare class SimLambdaSqsBatchResponse {
32
+ private readonly reportsBatchItemFailures;
33
+ constructor(reportsBatchItemFailures: boolean);
34
+ /**
35
+ * What became of a batch the function returned from.
36
+ */
37
+ handled(messages: readonly SimLambdaEventSourceMessage[], result: unknown): SimLambdaSqsBatchOutcome;
38
+ /**
39
+ * What becomes of a batch the function threw on: the whole of it goes back.
40
+ */
41
+ failed(messages: readonly SimLambdaEventSourceMessage[]): SimLambdaSqsBatchOutcome;
42
+ /**
43
+ * The message ids a batch item failure report names, or undefined when the
44
+ * function reported none.
45
+ */
46
+ private reportedFailureIds;
47
+ private namesBatchMessages;
48
+ }
49
+ //# sourceMappingURL=sim-lambda-sqs-batch-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-sqs-batch-response.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAE9F;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,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;;;;;;;;GAQG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAU;IAEnD,YAAY,wBAAwB,EAAE,OAAO,EAE5C;IAED;;OAEG;IACH,OAAO,CACL,QAAQ,EAAE,SAAS,2BAA2B,EAAE,EAChD,MAAM,EAAE,OAAO,GACd,wBAAwB,CAe1B;IAED;;OAEG;IACH,MAAM,CACJ,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,wBAAwB,CAE1B;IAED;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,kBAAkB;CAQ3B"}