@kensio/yulin 1.16.0 → 1.16.2

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 (396) hide show
  1. package/README.md +44 -46
  2. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
  3. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
  4. package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
  5. package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
  6. package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
  7. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +2 -2
  8. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  9. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
  10. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
  11. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
  12. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
  13. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts +3 -2
  14. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.d.ts.map +1 -1
  15. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-request.js.map +1 -1
  16. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.d.ts +5 -2
  17. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.d.ts.map +1 -1
  18. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js +38 -2
  19. package/dist/service/cloudfront/origin/custom/sim-cf-custom-origin-signer.js.map +1 -1
  20. package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.d.ts.map +1 -1
  21. package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.js +5 -2
  22. package/dist/service/cloudfront/origin/custom/sim-cf-function-url-origin-template.factory.js.map +1 -1
  23. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
  24. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
  25. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
  26. package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts +10 -0
  27. package/dist/service/cognito/command/hosted/hosted-auth.command.d.ts.map +1 -1
  28. package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts +14 -13
  29. package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.d.ts.map +1 -1
  30. package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js +14 -18
  31. package/dist/service/cognito/command/hosted/sim-cognito-authorize-endpoint.js.map +1 -1
  32. package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.d.ts +15 -6
  33. package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.d.ts.map +1 -1
  34. package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.js +26 -19
  35. package/dist/service/cognito/command/hosted/sim-cognito-authorize-request.js.map +1 -1
  36. package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.d.ts.map +1 -1
  37. package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js +5 -1
  38. package/dist/service/cognito/command/hosted/sim-cognito-hosted-commands.js.map +1 -1
  39. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts +41 -0
  40. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -0
  41. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +72 -0
  42. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -0
  43. package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts +32 -0
  44. package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.d.ts.map +1 -0
  45. package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js +36 -0
  46. package/dist/service/cognito/command/hosted/sim-cognito-hosted-sign-in.js.map +1 -0
  47. package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
  48. package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
  49. package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
  50. package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
  51. package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
  52. package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
  53. package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
  54. package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
  55. package/dist/service/cognito/command/user/password-reset.command.js +2 -0
  56. package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
  57. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
  58. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
  59. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
  60. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
  61. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
  62. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
  63. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
  64. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
  65. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
  66. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
  67. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
  68. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
  69. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
  70. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
  71. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
  72. package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts +22 -0
  73. package/dist/service/cognito/error/sim-cognito-managed-login.error.d.ts.map +1 -0
  74. package/dist/service/cognito/error/sim-cognito-managed-login.error.js +32 -0
  75. package/dist/service/cognito/error/sim-cognito-managed-login.error.js.map +1 -0
  76. package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
  77. package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
  78. package/dist/service/cognito/error/sim-cognito.error.js +27 -0
  79. package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
  80. package/dist/service/cognito/index.d.ts +2 -1
  81. package/dist/service/cognito/index.d.ts.map +1 -1
  82. package/dist/service/cognito/index.js +2 -1
  83. package/dist/service/cognito/index.js.map +1 -1
  84. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
  85. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
  86. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
  87. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
  88. package/dist/service/cognito/serve/page/sim-cognito-confirm-page.d.ts +29 -0
  89. package/dist/service/cognito/serve/page/sim-cognito-confirm-page.d.ts.map +1 -0
  90. package/dist/service/cognito/serve/page/sim-cognito-confirm-page.js +90 -0
  91. package/dist/service/cognito/serve/page/sim-cognito-confirm-page.js.map +1 -0
  92. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
  93. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
  94. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
  95. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
  96. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +41 -0
  97. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -0
  98. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +77 -0
  99. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -0
  100. package/dist/service/cognito/serve/page/sim-cognito-page-form.d.ts +47 -0
  101. package/dist/service/cognito/serve/page/sim-cognito-page-form.d.ts.map +1 -0
  102. package/dist/service/cognito/serve/page/sim-cognito-page-form.js +76 -0
  103. package/dist/service/cognito/serve/page/sim-cognito-page-form.js.map +1 -0
  104. package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts +69 -0
  105. package/dist/service/cognito/serve/page/sim-cognito-page-markup.d.ts.map +1 -0
  106. package/dist/service/cognito/serve/page/sim-cognito-page-markup.js +111 -0
  107. package/dist/service/cognito/serve/page/sim-cognito-page-markup.js.map +1 -0
  108. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +57 -0
  109. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -0
  110. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +82 -0
  111. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -0
  112. package/dist/service/cognito/serve/page/sim-cognito-page-request.d.ts +22 -0
  113. package/dist/service/cognito/serve/page/sim-cognito-page-request.d.ts.map +1 -0
  114. package/dist/service/cognito/serve/page/sim-cognito-page-request.js +30 -0
  115. package/dist/service/cognito/serve/page/sim-cognito-page-request.js.map +1 -0
  116. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
  117. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
  118. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
  119. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
  120. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
  121. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
  122. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
  123. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
  124. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +20 -0
  125. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -0
  126. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +40 -0
  127. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -0
  128. package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.d.ts +35 -0
  129. package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.d.ts.map +1 -0
  130. package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.js +85 -0
  131. package/dist/service/cognito/serve/page/sim-cognito-sign-up-page.js.map +1 -0
  132. package/dist/service/cognito/serve/sim-cognito-domain-endpoints.d.ts +20 -23
  133. package/dist/service/cognito/serve/sim-cognito-domain-endpoints.d.ts.map +1 -1
  134. package/dist/service/cognito/serve/sim-cognito-domain-endpoints.js +40 -19
  135. package/dist/service/cognito/serve/sim-cognito-domain-endpoints.js.map +1 -1
  136. package/dist/service/cognito/serve/sim-cognito-domain-request.d.ts +14 -0
  137. package/dist/service/cognito/serve/sim-cognito-domain-request.d.ts.map +1 -0
  138. package/dist/service/cognito/serve/sim-cognito-domain-request.js +2 -0
  139. package/dist/service/cognito/serve/sim-cognito-domain-request.js.map +1 -0
  140. package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
  141. package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
  142. package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
  143. package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
  144. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
  145. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
  146. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
  147. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
  148. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
  149. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
  150. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
  151. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
  152. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
  153. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
  154. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
  155. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
  156. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
  157. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
  158. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
  159. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
  160. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
  161. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
  162. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
  163. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
  164. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
  165. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
  166. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
  167. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
  168. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
  169. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
  170. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
  171. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
  172. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
  173. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
  174. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
  175. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
  176. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
  177. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
  178. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
  179. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
  180. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
  181. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
  182. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
  183. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
  184. package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
  185. package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
  186. package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.d.ts +8 -0
  187. package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.d.ts.map +1 -1
  188. package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.js +14 -6
  189. package/dist/service/iam/sigv4/canonical/sim-iam-sigv4-payload-hash.js.map +1 -1
  190. package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
  191. package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
  192. package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
  193. package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
  194. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
  195. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  196. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  197. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
  198. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
  199. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
  200. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
  201. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
  202. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
  203. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
  204. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
  205. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
  206. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
  207. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
  208. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
  209. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
  210. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
  211. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
  212. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
  213. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
  214. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
  215. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
  216. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
  217. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
  218. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
  219. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
  220. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
  221. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
  222. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
  223. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
  224. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
  225. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
  226. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
  227. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
  228. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
  229. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
  230. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
  231. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
  232. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
  233. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
  234. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
  235. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
  236. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
  237. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
  238. package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
  239. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
  240. package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
  241. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
  242. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
  243. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
  244. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
  245. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
  246. package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
  247. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
  248. package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
  249. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
  250. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
  251. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
  252. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
  253. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
  254. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
  255. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
  256. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
  257. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
  258. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
  259. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
  260. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
  261. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
  262. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
  263. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
  264. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
  265. package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
  266. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  267. package/dist/service/lambda/function/sim-lambda-function.js +9 -10
  268. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  269. package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.d.ts +28 -0
  270. package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.d.ts.map +1 -0
  271. package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.js +56 -0
  272. package/dist/service/lambda/serve/auth/sim-lambda-url-payload-hash.js.map +1 -0
  273. package/dist/service/lambda/serve/response/sim-lambda-url-error-response.d.ts +16 -0
  274. package/dist/service/lambda/serve/response/sim-lambda-url-error-response.d.ts.map +1 -1
  275. package/dist/service/lambda/serve/response/sim-lambda-url-error-response.js +24 -0
  276. package/dist/service/lambda/serve/response/sim-lambda-url-error-response.js.map +1 -1
  277. package/dist/service/lambda/serve/sim-lambda-controller.d.ts +6 -0
  278. package/dist/service/lambda/serve/sim-lambda-controller.d.ts.map +1 -1
  279. package/dist/service/lambda/serve/sim-lambda-controller.js +11 -0
  280. package/dist/service/lambda/serve/sim-lambda-controller.js.map +1 -1
  281. package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
  282. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  283. package/dist/service/lambda/sim-lambda-commands.js +2 -1
  284. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  285. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
  286. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
  287. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts +4 -3
  288. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.d.ts.map +1 -1
  289. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js +4 -3
  290. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-properties.js.map +1 -1
  291. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.d.ts +2 -2
  292. package/dist/service/sns/cfn/subscription/sim-cfn-sns-subscription-property-names.js +2 -2
  293. package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts +3 -0
  294. package/dist/service/sns/command/publish/sim-sns-publish-commands.d.ts.map +1 -1
  295. package/dist/service/sns/command/publish/sim-sns-publish-commands.js +4 -2
  296. package/dist/service/sns/command/publish/sim-sns-publish-commands.js.map +1 -1
  297. package/dist/service/sns/command/publish/sim-sns-publish-dispatch.d.ts +39 -0
  298. package/dist/service/sns/command/publish/sim-sns-publish-dispatch.d.ts.map +1 -0
  299. package/dist/service/sns/command/publish/sim-sns-publish-dispatch.js +42 -0
  300. package/dist/service/sns/command/publish/sim-sns-publish-dispatch.js.map +1 -0
  301. package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts +3 -3
  302. package/dist/service/sns/command/publish/sim-sns-publish-input.d.ts.map +1 -1
  303. package/dist/service/sns/command/publish/sim-sns-publish-input.js +8 -8
  304. package/dist/service/sns/command/publish/sim-sns-publish-input.js.map +1 -1
  305. package/dist/service/sns/command/publish/sim-sns-publish-sms.d.ts +38 -0
  306. package/dist/service/sns/command/publish/sim-sns-publish-sms.d.ts.map +1 -0
  307. package/dist/service/sns/command/publish/sim-sns-publish-sms.js +53 -0
  308. package/dist/service/sns/command/publish/sim-sns-publish-sms.js.map +1 -0
  309. package/dist/service/sns/command/sim-sns-command.types.d.ts +1 -0
  310. package/dist/service/sns/command/sim-sns-command.types.d.ts.map +1 -1
  311. package/dist/service/sns/command/sim-sns-commands.d.ts +12 -4
  312. package/dist/service/sns/command/sim-sns-commands.d.ts.map +1 -1
  313. package/dist/service/sns/command/sim-sns-commands.js +39 -4
  314. package/dist/service/sns/command/sim-sns-commands.js.map +1 -1
  315. package/dist/service/sns/command/sms/sim-sns-opt-out-commands.d.ts +41 -0
  316. package/dist/service/sns/command/sms/sim-sns-opt-out-commands.d.ts.map +1 -0
  317. package/dist/service/sns/command/sms/sim-sns-opt-out-commands.js +56 -0
  318. package/dist/service/sns/command/sms/sim-sns-opt-out-commands.js.map +1 -0
  319. package/dist/service/sns/command/sms/sms.command.d.ts +50 -0
  320. package/dist/service/sns/command/sms/sms.command.d.ts.map +1 -0
  321. package/dist/service/sns/command/sms/sms.command.js +2 -0
  322. package/dist/service/sns/command/sms/sms.command.js.map +1 -0
  323. package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts +5 -6
  324. package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.d.ts.map +1 -1
  325. package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js +8 -12
  326. package/dist/service/sns/delivery/sim-aws-sns-delivery-endpoints.js.map +1 -1
  327. package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts +6 -13
  328. package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.d.ts.map +1 -1
  329. package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js +13 -2
  330. package/dist/service/sns/delivery/sim-sns-no-delivery-endpoints.js.map +1 -1
  331. package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts +10 -1
  332. package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.d.ts.map +1 -1
  333. package/dist/service/sns/delivery/sim-sns-protocol-delivery-endpoints.js.map +1 -1
  334. package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.d.ts +34 -0
  335. package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.d.ts.map +1 -0
  336. package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.js +46 -0
  337. package/dist/service/sns/delivery/sms/sim-sns-delivery-sms.js.map +1 -0
  338. package/dist/service/sns/index.d.ts +5 -1
  339. package/dist/service/sns/index.d.ts.map +1 -1
  340. package/dist/service/sns/index.js +4 -1
  341. package/dist/service/sns/index.js.map +1 -1
  342. package/dist/service/sns/message/sim-sns-message-attribute-rules.d.ts.map +1 -1
  343. package/dist/service/sns/message/sim-sns-message-attribute-rules.js +9 -1
  344. package/dist/service/sns/message/sim-sns-message-attribute-rules.js.map +1 -1
  345. package/dist/service/sns/message/sim-sns-message-attributes.d.ts +8 -0
  346. package/dist/service/sns/message/sim-sns-message-attributes.d.ts.map +1 -1
  347. package/dist/service/sns/message/sim-sns-message-attributes.js +10 -0
  348. package/dist/service/sns/message/sim-sns-message-attributes.js.map +1 -1
  349. package/dist/service/sns/message/sim-sns-sms-attributes.d.ts +25 -0
  350. package/dist/service/sns/message/sim-sns-sms-attributes.d.ts.map +1 -0
  351. package/dist/service/sns/message/sim-sns-sms-attributes.js +46 -0
  352. package/dist/service/sns/message/sim-sns-sms-attributes.js.map +1 -0
  353. package/dist/service/sns/sdk/sim-sns-sdk-command-router.d.ts.map +1 -1
  354. package/dist/service/sns/sdk/sim-sns-sdk-command-router.js +12 -0
  355. package/dist/service/sns/sdk/sim-sns-sdk-command-router.js.map +1 -1
  356. package/dist/service/sns/sim-sns-sms.d.ts +63 -0
  357. package/dist/service/sns/sim-sns-sms.d.ts.map +1 -0
  358. package/dist/service/sns/sim-sns-sms.js +76 -0
  359. package/dist/service/sns/sim-sns-sms.js.map +1 -0
  360. package/dist/service/sns/sim-sns.d.ts +7 -15
  361. package/dist/service/sns/sim-sns.d.ts.map +1 -1
  362. package/dist/service/sns/sim-sns.js +23 -30
  363. package/dist/service/sns/sim-sns.js.map +1 -1
  364. package/dist/service/sns/sms/sim-sns-opt-out-list.d.ts +40 -0
  365. package/dist/service/sns/sms/sim-sns-opt-out-list.d.ts.map +1 -0
  366. package/dist/service/sns/sms/sim-sns-opt-out-list.js +47 -0
  367. package/dist/service/sns/sms/sim-sns-opt-out-list.js.map +1 -0
  368. package/dist/service/sns/sms/sim-sns-phone-number.d.ts +21 -0
  369. package/dist/service/sns/sms/sim-sns-phone-number.d.ts.map +1 -0
  370. package/dist/service/sns/sms/sim-sns-phone-number.js +41 -0
  371. package/dist/service/sns/sms/sim-sns-phone-number.js.map +1 -0
  372. package/dist/service/sns/sms/sim-sns-sent-sms-message.d.ts +69 -0
  373. package/dist/service/sns/sms/sim-sns-sent-sms-message.d.ts.map +1 -0
  374. package/dist/service/sns/sms/sim-sns-sent-sms-message.js +71 -0
  375. package/dist/service/sns/sms/sim-sns-sent-sms-message.js.map +1 -0
  376. package/dist/service/sns/sms/sim-sns-sent-sms-store.d.ts +25 -0
  377. package/dist/service/sns/sms/sim-sns-sent-sms-store.d.ts.map +1 -0
  378. package/dist/service/sns/sms/sim-sns-sent-sms-store.js +28 -0
  379. package/dist/service/sns/sms/sim-sns-sent-sms-store.js.map +1 -0
  380. package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts +9 -7
  381. package/dist/service/sns/subscription/sim-sns-subscription-endpoint.d.ts.map +1 -1
  382. package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js +7 -2
  383. package/dist/service/sns/subscription/sim-sns-subscription-endpoint.js.map +1 -1
  384. package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts +19 -1
  385. package/dist/service/sns/subscription/sim-sns-subscription-protocol.d.ts.map +1 -1
  386. package/dist/service/sns/subscription/sim-sns-subscription-protocol.js +26 -5
  387. package/dist/service/sns/subscription/sim-sns-subscription-protocol.js.map +1 -1
  388. package/package.json +2 -2
  389. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
  390. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
  391. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
  392. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
  393. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
  394. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
  395. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
  396. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +0 -1
@@ -0,0 +1,42 @@
1
+ import { refuseUnsimulatedPublishTarget } from "./sim-sns-publish-input.js";
2
+ /**
3
+ * Which of the two publishes a `Publish` request is.
4
+ *
5
+ * One SDK command name covers two operations that share a message and nothing
6
+ * else. A publish to a topic goes to the topic's subscriptions. A publish to a
7
+ * phone number reaches no topic, no subscription and no delivery endpoint, and
8
+ * is recorded as an SMS. Each has its own handler, and this is what reads the
9
+ * request to decide.
10
+ *
11
+ * The target refusals belong here, ahead of the decision, so that a request
12
+ * naming an unsimulated target is refused whichever way it would otherwise
13
+ * have gone.
14
+ *
15
+ * `PublishBatch` is only ever a topic publish, since the SNS API gives a batch
16
+ * entry no phone number field.
17
+ */
18
+ export class SimSnsPublishDispatch {
19
+ topic;
20
+ sms;
21
+ constructor(properties) {
22
+ this.topic = properties.topic;
23
+ this.sms = properties.sms;
24
+ }
25
+ /**
26
+ * Publish one message to a topic or to a phone number.
27
+ */
28
+ publish(command, options) {
29
+ refuseUnsimulatedPublishTarget(command.input);
30
+ if (command.input.PhoneNumber === undefined) {
31
+ return this.topic.publish(command, options);
32
+ }
33
+ return this.sms.publish(command.input, options);
34
+ }
35
+ /**
36
+ * Publish up to ten messages to a topic at once.
37
+ */
38
+ publishBatch(command, options) {
39
+ return this.topic.publishBatch(command, options);
40
+ }
41
+ }
42
+ //# sourceMappingURL=sim-sns-publish-dispatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-sns-publish-dispatch.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-dispatch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAc5E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,qBAAqB;IACf,KAAK,CAAwB;IAC7B,GAAG,CAAmB;IAEvC,YAAY,UAA2C;QACrD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,OAAO,CACL,OAA0B,EAC1B,OAA8B;QAE9B,8BAA8B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE9C,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,YAAY,CACV,OAA+B,EAC/B,OAA8B;QAE9B,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF"}
@@ -1,10 +1,10 @@
1
1
  import type { SimSnsPublishedMessageInput } from "../../message/sim-sns-published-message.js";
2
2
  import type { SimPublishCommandInput, SimSnsPublishedFields } from "./publish.command.js";
3
3
  /**
4
- * Refuse a publish to somewhere other than a topic.
4
+ * Refuse a publish to somewhere other than a topic or a phone number.
5
5
  *
6
- * Real SNS publishes to a topic, to a mobile application endpoint, or to a
7
- * phone number. Only the topic is simulated, so the other two are refused
6
+ * Real SNS publishes to a topic, to a phone number, or to a mobile application
7
+ * endpoint. The endpoint is the one that is not simulated, so it is refused
8
8
  * rather than answered with a message id for a message that reached nothing.
9
9
  */
10
10
  export declare function refuseUnsimulatedPublishTarget(input: SimPublishCommandInput): void;
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sns-publish-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,sBAAsB,GAC5B,IAAI,CAcN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,qBAAqB,GAC/B,2BAA2B,CAuB7B"}
1
+ {"version":3,"file":"sim-sns-publish-input.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-input.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAC9F,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,sBAAsB,GAC5B,IAAI,CAcN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,qBAAqB,GAC/B,2BAA2B,CAuB7B"}
@@ -1,20 +1,20 @@
1
- import { SimSnsUnsimulatedInputException } from "../../error/sim-sns.error.js";
1
+ import { SimSnsInvalidParameterException, SimSnsUnsimulatedInputException, } from "../../error/sim-sns.error.js";
2
2
  import { SimSnsMessageAttributes } from "../../message/sim-sns-message-attributes.js";
3
3
  /**
4
- * Refuse a publish to somewhere other than a topic.
4
+ * Refuse a publish to somewhere other than a topic or a phone number.
5
5
  *
6
- * Real SNS publishes to a topic, to a mobile application endpoint, or to a
7
- * phone number. Only the topic is simulated, so the other two are refused
6
+ * Real SNS publishes to a topic, to a phone number, or to a mobile application
7
+ * endpoint. The endpoint is the one that is not simulated, so it is refused
8
8
  * rather than answered with a message id for a message that reached nothing.
9
9
  */
10
10
  export function refuseUnsimulatedPublishTarget(input) {
11
11
  if (input.TargetArn !== undefined) {
12
12
  throw new SimSnsUnsimulatedInputException("TargetArn publishes to a mobile application endpoint, which simulated " +
13
- "SNS does not support. Publish to a TopicArn instead.");
13
+ "SNS does not support. Publish to a TopicArn or a PhoneNumber instead.");
14
14
  }
15
- if (input.PhoneNumber !== undefined) {
16
- throw new SimSnsUnsimulatedInputException("PhoneNumber publishes an SMS message, which simulated SNS does not " +
17
- "support. Publish to a TopicArn instead.");
15
+ if (input.TopicArn !== undefined && input.PhoneNumber !== undefined) {
16
+ throw new SimSnsInvalidParameterException("Invalid parameter: A publish names a TopicArn or a PhoneNumber, and " +
17
+ "this one names both");
18
18
  }
19
19
  }
20
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sns-publish-input.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAA6B;IAE7B,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,sDAAsD,CACzD,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACpC,MAAM,IAAI,+BAA+B,CACvC,qEAAqE;YACnE,yCAAyC,CAC5C,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,SAAgC;IAEhC,IACE,SAAS,CAAC,sBAAsB,KAAK,SAAS;QAC9C,SAAS,CAAC,cAAc,KAAK,SAAS,EACtC,CAAC;QACD,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,gCAAgC,CACnC,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QAC7C,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,8BAA8B,CACjC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,UAAU,EAAE,uBAAuB,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC;KACpE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"sim-sns-publish-input.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAA6B;IAE7B,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,uEAAuE,CAC1E,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACpE,MAAM,IAAI,+BAA+B,CACvC,sEAAsE;YACpE,qBAAqB,CACxB,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,SAAgC;IAEhC,IACE,SAAS,CAAC,sBAAsB,KAAK,SAAS;QAC9C,SAAS,CAAC,cAAc,KAAK,SAAS,EACtC,CAAC;QACD,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,gCAAgC,CACnC,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QAC7C,MAAM,IAAI,+BAA+B,CACvC,wEAAwE;YACtE,8BAA8B,CACjC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,UAAU,EAAE,uBAAuB,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC;KACpE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { BackgroundScheduler } from "../../../../util/background/background.js";
2
+ import type { SimSnsOptOutList } from "../../sms/sim-sns-opt-out-list.js";
3
+ import type { SimSnsSentSmsStore } from "../../sms/sim-sns-sent-sms-store.js";
4
+ import type { SimSnsRequestOptions } from "../sim-sns-request-options.js";
5
+ import type { SimSnsTopicAccess } from "../topic/sim-sns-topic-access.js";
6
+ import type { SimPublishCommandInput, SimPublishCommandOutput } from "./publish.command.js";
7
+ interface SimSnsPublishSmsProperties {
8
+ readonly access: SimSnsTopicAccess;
9
+ readonly clock: BackgroundScheduler;
10
+ readonly optOutList: SimSnsOptOutList;
11
+ readonly sent: SimSnsSentSmsStore;
12
+ }
13
+ /**
14
+ * Publishing straight to a phone number.
15
+ *
16
+ * This is the half of `Publish` that reaches no topic. Real SNS hands the
17
+ * message to a carrier and tells the publisher a message id, and the publisher
18
+ * hears nothing more about it. There is no carrier here to hand it to. The
19
+ * message is recorded, and the publisher gets the same message id it would
20
+ * have got on AWS.
21
+ */
22
+ export declare class SimSnsPublishSms {
23
+ private readonly access;
24
+ private readonly clock;
25
+ private readonly optOutList;
26
+ private readonly sent;
27
+ constructor(properties: SimSnsPublishSmsProperties);
28
+ /**
29
+ * Publish one SMS to a phone number.
30
+ *
31
+ * A number on the opt-out list still gets a message id, because that is what
32
+ * real SNS answers a publish it accepts and then delivers nowhere. The
33
+ * record says the opt-out list stopped it.
34
+ */
35
+ publish(input: SimPublishCommandInput, options?: SimSnsRequestOptions): SimPublishCommandOutput;
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=sim-sns-publish-sms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-sns-publish-sms.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-sms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAKrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAQ9B,UAAU,0BAA0B;IAClC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAE1C,YAAY,UAAU,EAAE,0BAA0B,EAKjD;IAED;;;;;;OAMG;IACH,OAAO,CACL,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,uBAAuB,CAuBzB;CACF"}
@@ -0,0 +1,53 @@
1
+ import { assertSimSnsMessageWithinLimit, SimSnsPublishedMessage, } from "../../message/sim-sns-published-message.js";
2
+ import { SimSnsPhoneNumber } from "../../sms/sim-sns-phone-number.js";
3
+ import { SimSnsSentSmsMessage } from "../../sms/sim-sns-sent-sms-message.js";
4
+ import { simSnsPublishedMessageInput } from "./sim-sns-publish-input.js";
5
+ /**
6
+ * Real SNS authorizes an SMS publish as `sns:Publish` against `*`, since there
7
+ * is no topic in the request for a policy to name.
8
+ */
9
+ const publishAction = "sns:Publish";
10
+ /**
11
+ * Publishing straight to a phone number.
12
+ *
13
+ * This is the half of `Publish` that reaches no topic. Real SNS hands the
14
+ * message to a carrier and tells the publisher a message id, and the publisher
15
+ * hears nothing more about it. There is no carrier here to hand it to. The
16
+ * message is recorded, and the publisher gets the same message id it would
17
+ * have got on AWS.
18
+ */
19
+ export class SimSnsPublishSms {
20
+ access;
21
+ clock;
22
+ optOutList;
23
+ sent;
24
+ constructor(properties) {
25
+ this.access = properties.access;
26
+ this.clock = properties.clock;
27
+ this.optOutList = properties.optOutList;
28
+ this.sent = properties.sent;
29
+ }
30
+ /**
31
+ * Publish one SMS to a phone number.
32
+ *
33
+ * A number on the opt-out list still gets a message id, because that is what
34
+ * real SNS answers a publish it accepts and then delivers nowhere. The
35
+ * record says the opt-out list stopped it.
36
+ */
37
+ publish(input, options) {
38
+ this.access.authorizeAnyTopic(publishAction, options);
39
+ const phoneNumber = SimSnsPhoneNumber.of(input.PhoneNumber);
40
+ const message = SimSnsPublishedMessage.of(simSnsPublishedMessageInput(input), this.clock.now());
41
+ assertSimSnsMessageWithinLimit(message.byteSize);
42
+ this.sent.add(new SimSnsSentSmsMessage({
43
+ messageId: message.messageId,
44
+ phoneNumber: phoneNumber.value,
45
+ message: message.body.value,
46
+ attributes: message.attributes,
47
+ suppressed: this.optOutList.isOptedOut(phoneNumber),
48
+ sentDate: message.publishedAt,
49
+ }));
50
+ return { $metadata: {}, MessageId: message.messageId };
51
+ }
52
+ }
53
+ //# sourceMappingURL=sim-sns-publish-sms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-sns-publish-sms.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/publish/sim-sns-publish-sms.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,4CAA4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E,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC;YACnD,QAAQ,EAAE,OAAO,CAAC,WAAW;SAC9B,CAAC,CACH,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;IACzD,CAAC;CACF"}
@@ -3,5 +3,6 @@
3
3
  */
4
4
  export type { SimCreateTopicCommand, SimCreateTopicCommandInput, SimCreateTopicCommandOutput, SimDeleteTopicCommand, SimDeleteTopicCommandInput, SimDeleteTopicCommandOutput, SimGetTopicAttributesCommand, SimGetTopicAttributesCommandInput, SimGetTopicAttributesCommandOutput, SimListTopicsCommand, SimListTopicsCommandInput, SimListTopicsCommandOutput, SimSetTopicAttributesCommand, SimSetTopicAttributesCommandInput, SimSetTopicAttributesCommandOutput, SimSnsListedTopic, SimSnsTag, } from "./topic/topic.command.js";
5
5
  export type { SimGetSubscriptionAttributesCommand, SimGetSubscriptionAttributesCommandInput, SimGetSubscriptionAttributesCommandOutput, SimListSubscriptionsByTopicCommand, SimListSubscriptionsByTopicCommandInput, SimListSubscriptionsByTopicCommandOutput, SimListSubscriptionsCommand, SimListSubscriptionsCommandInput, SimListSubscriptionsCommandOutput, SimSetSubscriptionAttributesCommand, SimSetSubscriptionAttributesCommandInput, SimSetSubscriptionAttributesCommandOutput, SimSnsListedSubscription, SimSubscribeCommand, SimSubscribeCommandInput, SimSubscribeCommandOutput, SimUnsubscribeCommand, SimUnsubscribeCommandInput, SimUnsubscribeCommandOutput, } from "./subscription/subscription.command.js";
6
+ export type { SimCheckIfPhoneNumberIsOptedOutCommand, SimCheckIfPhoneNumberIsOptedOutCommandInput, SimCheckIfPhoneNumberIsOptedOutCommandOutput, SimListPhoneNumbersOptedOutCommand, SimListPhoneNumbersOptedOutCommandInput, SimListPhoneNumbersOptedOutCommandOutput, SimOptInPhoneNumberCommand, SimOptInPhoneNumberCommandInput, SimOptInPhoneNumberCommandOutput, } from "./sms/sms.command.js";
6
7
  export type { SimPublishBatchCommand, SimPublishBatchCommandInput, SimPublishBatchCommandOutput, SimPublishCommand, SimPublishCommandInput, SimPublishCommandOutput, SimSnsBatchResultErrorEntry, SimSnsPublishBatchRequestEntry, SimSnsPublishBatchResultEntry, SimSnsPublishedFields, } from "./publish/publish.command.js";
7
8
  //# sourceMappingURL=sim-sns-command.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sns-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/sns/command/sim-sns-command.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,iBAAiB,EACjB,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mCAAmC,EACnC,wCAAwC,EACxC,yCAAyC,EACzC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,2BAA2B,EAC3B,gCAAgC,EAChC,iCAAiC,EACjC,mCAAmC,EACnC,wCAAwC,EACxC,yCAAyC,EACzC,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"sim-sns-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/sns/command/sim-sns-command.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,iBAAiB,EACjB,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mCAAmC,EACnC,wCAAwC,EACxC,yCAAyC,EACzC,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,2BAA2B,EAC3B,gCAAgC,EAChC,iCAAiC,EACjC,mCAAmC,EACnC,wCAAwC,EACxC,yCAAyC,EACzC,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,sCAAsC,EACtC,2CAA2C,EAC3C,4CAA4C,EAC5C,kCAAkC,EAClC,uCAAuC,EACvC,wCAAwC,EACxC,0BAA0B,EAC1B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,8BAA8B,EAC9B,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,8BAA8B,CAAC"}
@@ -1,12 +1,15 @@
1
1
  import type { BackgroundScheduler } from "../../../util/background/background.js";
2
2
  import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
3
3
  import type { SimIamInterServiceAuthZ } from "../../iam/authorize/sim-iam-inter-service-auth-z.js";
4
- import type { SimSnsDeliveryEndpoints } from "../delivery/sim-sns-delivery.js";
5
4
  import { SimSnsFanOut } from "../delivery/sim-sns-fan-out.js";
5
+ import { type SimSnsOutwardDeliveryEndpoints } from "../delivery/sim-sns-protocol-delivery-endpoints.js";
6
6
  import { SimSnsMessageSigner } from "../signature/sim-sns-message-signer.js";
7
7
  import type { SimSnsSubscriptionStore } from "../subscription/sim-sns-subscription-store.js";
8
8
  import type { SimSnsTopicStore } from "../topic/sim-sns-topic-store.js";
9
- import { SimSnsPublishCommands } from "./publish/sim-sns-publish-commands.js";
9
+ import { SimSnsOptOutList } from "../sms/sim-sns-opt-out-list.js";
10
+ import { SimSnsSentSmsStore } from "../sms/sim-sns-sent-sms-store.js";
11
+ import { SimSnsPublishDispatch } from "./publish/sim-sns-publish-dispatch.js";
12
+ import { SimSnsOptOutCommands } from "./sms/sim-sns-opt-out-commands.js";
10
13
  import { SimSnsSubscriptionAttributeCommands } from "./subscription/sim-sns-subscription-attribute-commands.js";
11
14
  import { SimSnsSubscriptionCommands } from "./subscription/sim-sns-subscription-commands.js";
12
15
  import { SimSnsSubscriptionListings } from "./subscription/sim-sns-subscription-listings.js";
@@ -18,7 +21,7 @@ interface SimSnsCommandsProperties {
18
21
  readonly subscriptions: SimSnsSubscriptionStore;
19
22
  readonly iam: SimIamInterServiceAuthZ;
20
23
  readonly background: BackgroundScheduler;
21
- readonly deliveryEndpoints: SimSnsDeliveryEndpoints;
24
+ readonly deliveryEndpoints: SimSnsOutwardDeliveryEndpoints;
22
25
  readonly accountRegionScope: SimAwsAccountRegionScope;
23
26
  }
24
27
  /**
@@ -36,9 +39,14 @@ export declare class SimSnsCommands {
36
39
  readonly subscriptions: SimSnsSubscriptionCommands;
37
40
  readonly subscriptionListings: SimSnsSubscriptionListings;
38
41
  readonly subscriptionAttributes: SimSnsSubscriptionAttributeCommands;
39
- readonly publish: SimSnsPublishCommands;
42
+ readonly publish: SimSnsPublishDispatch;
43
+ readonly optOut: SimSnsOptOutCommands;
40
44
  readonly fanOut: SimSnsFanOut;
41
45
  readonly signer: SimSnsMessageSigner;
46
+ /** Every SMS this scope would have sent, delivered or suppressed. */
47
+ readonly sentSms: SimSnsSentSmsStore;
48
+ /** The numbers this scope will send no SMS to. */
49
+ readonly optOutList: SimSnsOptOutList;
42
50
  constructor(properties: SimSnsCommandsProperties);
43
51
  }
44
52
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sns-commands.d.ts","sourceRoot":"","sources":["../../../../src/service/sns/command/sim-sns-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,UAAU,wBAAwB;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,uBAAuB,C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AgB,MAAM,EAAE,mBAAmB,CAAC;IAE5C,qEAAqE;IACrE,SAAgB,OAAO,qBAA4B;IAEnD,kDAAkD;IAClD,SAAgB,UAAU,mBAA0B;IAEpD,YAAY,UAAU,EAAE,wBAAwB,EA0E/C;CACF"}
@@ -1,8 +1,15 @@
1
1
  import { SimSnsDeliveryRequests } from "../delivery/sim-sns-delivery-request.js";
2
2
  import { SimSnsFanOut } from "../delivery/sim-sns-fan-out.js";
3
+ import { SimSnsProtocolDeliveryEndpoints, } from "../delivery/sim-sns-protocol-delivery-endpoints.js";
4
+ import { SimSnsDeliverySms } from "../delivery/sms/sim-sns-delivery-sms.js";
3
5
  import { SimSnsMessageSigner } from "../signature/sim-sns-message-signer.js";
6
+ import { SimSnsOptOutList } from "../sms/sim-sns-opt-out-list.js";
7
+ import { SimSnsSentSmsStore } from "../sms/sim-sns-sent-sms-store.js";
4
8
  import { SimSnsAuthorizer } from "./authorize/sim-sns-authorizer.js";
5
9
  import { SimSnsPublishCommands } from "./publish/sim-sns-publish-commands.js";
10
+ import { SimSnsPublishDispatch } from "./publish/sim-sns-publish-dispatch.js";
11
+ import { SimSnsPublishSms } from "./publish/sim-sns-publish-sms.js";
12
+ import { SimSnsOptOutCommands } from "./sms/sim-sns-opt-out-commands.js";
6
13
  import { SimSnsSubscriptionAccess } from "./subscription/sim-sns-subscription-access.js";
7
14
  import { SimSnsSubscriptionAttributeCommands } from "./subscription/sim-sns-subscription-attribute-commands.js";
8
15
  import { SimSnsSubscriptionCommands } from "./subscription/sim-sns-subscription-commands.js";
@@ -27,8 +34,13 @@ export class SimSnsCommands {
27
34
  subscriptionListings;
28
35
  subscriptionAttributes;
29
36
  publish;
37
+ optOut;
30
38
  fanOut;
31
39
  signer;
40
+ /** Every SMS this scope would have sent, delivered or suppressed. */
41
+ sentSms = new SimSnsSentSmsStore();
42
+ /** The numbers this scope will send no SMS to. */
43
+ optOutList = new SimSnsOptOutList();
32
44
  constructor(properties) {
33
45
  const { topics, subscriptions, accountRegionScope, background } = properties;
34
46
  const access = new SimSnsTopicAccess({
@@ -44,7 +56,18 @@ export class SimSnsCommands {
44
56
  this.signer = new SimSnsMessageSigner({ accountRegionScope });
45
57
  this.fanOut = new SimSnsFanOut({
46
58
  subscriptions,
47
- endpoints: properties.deliveryEndpoints,
59
+ // The protocols reaching another service are supplied from outside, and
60
+ // the one that reaches nothing is filled in here, where the store it
61
+ // records on lives.
62
+ endpoints: new SimSnsProtocolDeliveryEndpoints({
63
+ byProtocol: {
64
+ ...properties.deliveryEndpoints,
65
+ sms: new SimSnsDeliverySms({
66
+ optOutList: this.optOutList,
67
+ sent: this.sentSms,
68
+ }),
69
+ },
70
+ }),
48
71
  requests: new SimSnsDeliveryRequests({
49
72
  signer: this.signer,
50
73
  accountRegionScope,
@@ -73,10 +96,22 @@ export class SimSnsCommands {
73
96
  this.subscriptionAttributes = new SimSnsSubscriptionAttributeCommands({
74
97
  access: subscriptionAccess,
75
98
  });
76
- this.publish = new SimSnsPublishCommands({
99
+ this.publish = new SimSnsPublishDispatch({
100
+ topic: new SimSnsPublishCommands({
101
+ access,
102
+ clock: background,
103
+ fanOut: this.fanOut,
104
+ }),
105
+ sms: new SimSnsPublishSms({
106
+ access,
107
+ clock: background,
108
+ optOutList: this.optOutList,
109
+ sent: this.sentSms,
110
+ }),
111
+ });
112
+ this.optOut = new SimSnsOptOutCommands({
77
113
  access,
78
- clock: background,
79
- fanOut: this.fanOut,
114
+ optOutList: this.optOutList,
80
115
  });
81
116
  }
82
117
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sns-commands.js","sourceRoot":"","sources":["../../../../src/service/sns/command/sim-sns-commands.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAG7E,OAAO,EAAE,gBAAgB,EAA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,GAAG,IAAI,YAAY,CAAC;YAC7B,aAAa;YACb,SAAS,EAAE,UAAU,CAAC,iBAAiB;YACvC,QAAQ,EAAE,IAAI,sBAAsB,CAAC;gBACnC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,kBAAkB;aACnB,CAAC;YACF,UAAU;SACX,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,IAAI,iBAAiB,CAAC;YACzC,MAAM;YACN,MAAM;YACN,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAmB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,eAAe,GAAG,IAAI,4BAA4B,CAAC;YACtD,MAAM;YACN,aAAa;SACd,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,IAAI,0BAA0B,CAAC;YAClD,aAAa;YACb,WAAW,EAAE,MAAM;YACnB,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,0BAA0B,CAAC;YACzD,aAAa;YACb,WAAW,EAAE,MAAM;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,sBAAsB,GAAG,IAAI,mCAAmC,CAAC;YACpE,MAAM,EAAE,kBAAkB;SAC3B,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAqB,CAAC;YACvC,MAAM;YACN,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"sim-sns-commands.js","sourceRoot":"","sources":["../../../../src/service/sns/command/sim-sns-commands.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAEL,+BAA+B,GAChC,MAAM,oDAAoD,CAAC;AAC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AI,4BAA4B,CAAC;YACtD,MAAM;YACN,aAAa;SACd,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,IAAI,0BAA0B,CAAC;YAClD,aAAa;YACb,WAAW,EAAE,MAAM;YACnB,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,GAAG,IAAI,0BAA0B,CAAC;YACzD,aAAa;YACb,WAAW,EAAE,MAAM;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,sBAAsB,GAAG,IAAI,mCAAmC,CAAC;YACpE,MAAM,EAAE,kBAAkB;SAC3B,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAqB,CAAC;YACvC,KAAK,EAAE,IAAI,qBAAqB,CAAC;gBAC/B,MAAM;gBACN,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC;YACF,GAAG,EAAE,IAAI,gBAAgB,CAAC;gBACxB,MAAM;gBACN,KAAK,EAAE,UAAU;gBACjB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,IAAI,EAAE,IAAI,CAAC,OAAO;aACnB,CAAC;SACH,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,oBAAoB,CAAC;YACrC,MAAM;YACN,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,41 @@
1
+ import type { SimSnsOptOutList } from "../../sms/sim-sns-opt-out-list.js";
2
+ import type { SimSnsRequestOptions } from "../sim-sns-request-options.js";
3
+ import type { SimSnsTopicAccess } from "../topic/sim-sns-topic-access.js";
4
+ import type { SimCheckIfPhoneNumberIsOptedOutCommand, SimCheckIfPhoneNumberIsOptedOutCommandOutput, SimListPhoneNumbersOptedOutCommand, SimListPhoneNumbersOptedOutCommandOutput, SimOptInPhoneNumberCommand, SimOptInPhoneNumberCommandOutput } from "./sms.command.js";
5
+ interface SimSnsOptOutCommandsProperties {
6
+ readonly access: SimSnsTopicAccess;
7
+ readonly optOutList: SimSnsOptOutList;
8
+ }
9
+ /**
10
+ * The commands that read and unwind the phone number opt-out list.
11
+ *
12
+ * None of them names a topic, so each authorizes against `*` the way
13
+ * `ListTopics` does. A policy naming a topic ARN allows none of them, here as
14
+ * on AWS.
15
+ *
16
+ * There is no command for opting a number out. Real SNS puts a number on the
17
+ * list when the recipient replies STOP, and `SimSns.optOutPhoneNumber` stands
18
+ * in for the handset.
19
+ */
20
+ export declare class SimSnsOptOutCommands {
21
+ private readonly access;
22
+ private readonly optOutList;
23
+ constructor(properties: SimSnsOptOutCommandsProperties);
24
+ /**
25
+ * Say whether a number is opted out of receiving SMS.
26
+ */
27
+ checkIfPhoneNumberIsOptedOut(command: SimCheckIfPhoneNumberIsOptedOutCommand, options?: SimSnsRequestOptions): SimCheckIfPhoneNumberIsOptedOutCommandOutput;
28
+ /**
29
+ * List the opted-out numbers, in the order they were opted out.
30
+ */
31
+ listPhoneNumbersOptedOut(command: SimListPhoneNumbersOptedOutCommand, options?: SimSnsRequestOptions): SimListPhoneNumbersOptedOutCommandOutput;
32
+ /**
33
+ * Take a number back off the opt-out list.
34
+ *
35
+ * A number that was never on it succeeds and changes nothing, as it does on
36
+ * real SNS.
37
+ */
38
+ optInPhoneNumber(command: SimOptInPhoneNumberCommand, options?: SimSnsRequestOptions): SimOptInPhoneNumberCommandOutput;
39
+ }
40
+ export {};
41
+ //# sourceMappingURL=sim-sns-opt-out-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-sns-opt-out-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/sms/sim-sns-opt-out-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EACV,sCAAsC,EACtC,4CAA4C,EAC5C,kCAAkC,EAClC,wCAAwC,EACxC,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,kBAAkB,CAAC;AAE1B,UAAU,8BAA8B;IACtC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAE9C,YAAY,UAAU,EAAE,8BAA8B,EAGrD;IAED;;OAEG;IACH,4BAA4B,CAC1B,OAAO,EAAE,sCAAsC,EAC/C,OAAO,CAAC,EAAE,oBAAoB,GAC7B,4CAA4C,CAS9C;IAED;;OAEG;IACH,wBAAwB,CACtB,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,oBAAoB,GAC7B,wCAAwC,CAU1C;IAED;;;;;OAKG;IACH,gBAAgB,CACd,OAAO,EAAE,0BAA0B,EACnC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,gCAAgC,CAMlC;CACF"}
@@ -0,0 +1,56 @@
1
+ import { SimSnsPhoneNumber } from "../../sms/sim-sns-phone-number.js";
2
+ import { SimSnsPage } from "../sim-sns-page.js";
3
+ /**
4
+ * The commands that read and unwind the phone number opt-out list.
5
+ *
6
+ * None of them names a topic, so each authorizes against `*` the way
7
+ * `ListTopics` does. A policy naming a topic ARN allows none of them, here as
8
+ * on AWS.
9
+ *
10
+ * There is no command for opting a number out. Real SNS puts a number on the
11
+ * list when the recipient replies STOP, and `SimSns.optOutPhoneNumber` stands
12
+ * in for the handset.
13
+ */
14
+ export class SimSnsOptOutCommands {
15
+ access;
16
+ optOutList;
17
+ constructor(properties) {
18
+ this.access = properties.access;
19
+ this.optOutList = properties.optOutList;
20
+ }
21
+ /**
22
+ * Say whether a number is opted out of receiving SMS.
23
+ */
24
+ checkIfPhoneNumberIsOptedOut(command, options) {
25
+ this.access.authorizeAnyTopic("sns:CheckIfPhoneNumberIsOptedOut", options);
26
+ const phoneNumber = SimSnsPhoneNumber.of(command.input.phoneNumber);
27
+ return {
28
+ $metadata: {},
29
+ isOptedOut: this.optOutList.isOptedOut(phoneNumber),
30
+ };
31
+ }
32
+ /**
33
+ * List the opted-out numbers, in the order they were opted out.
34
+ */
35
+ listPhoneNumbersOptedOut(command, options) {
36
+ this.access.authorizeAnyTopic("sns:ListPhoneNumbersOptedOut", options);
37
+ const page = new SimSnsPage(this.optOutList.all, command.input.nextToken);
38
+ return {
39
+ $metadata: {},
40
+ phoneNumbers: page.items,
41
+ ...(page.nextToken !== undefined && { nextToken: page.nextToken }),
42
+ };
43
+ }
44
+ /**
45
+ * Take a number back off the opt-out list.
46
+ *
47
+ * A number that was never on it succeeds and changes nothing, as it does on
48
+ * real SNS.
49
+ */
50
+ optInPhoneNumber(command, options) {
51
+ this.access.authorizeAnyTopic("sns:OptInPhoneNumber", options);
52
+ this.optOutList.optIn(SimSnsPhoneNumber.of(command.input.phoneNumber));
53
+ return { $metadata: {} };
54
+ }
55
+ }
56
+ //# sourceMappingURL=sim-sns-opt-out-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-sns-opt-out-commands.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/sms/sim-sns-opt-out-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiBhD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,oBAAoB;IACd,MAAM,CAAoB;IAC1B,UAAU,CAAmB;IAE9C,YAAY,UAA0C;QACpD,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAC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PhoneNumberIsOptedOut command.
4
+ *
5
+ * The SMS operations name their fields in camel case, unlike every other SNS
6
+ * operation. That is how the SNS API has them, and the SDK carries it through.
7
+ *
8
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/CheckIfPhoneNumberIsOptedOutCommand/
9
+ */
10
+ export interface SimCheckIfPhoneNumberIsOptedOutCommand {
11
+ readonly input: SimCheckIfPhoneNumberIsOptedOutCommandInput;
12
+ }
13
+ export interface SimCheckIfPhoneNumberIsOptedOutCommandInput {
14
+ readonly phoneNumber?: string | undefined;
15
+ }
16
+ export interface SimCheckIfPhoneNumberIsOptedOutCommandOutput {
17
+ readonly isOptedOut?: boolean | undefined;
18
+ readonly $metadata: SimResponseMetadata;
19
+ }
20
+ /**
21
+ * Minimal structural sim SNS ListPhoneNumbersOptedOut command.
22
+ *
23
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/ListPhoneNumbersOptedOutCommand/
24
+ */
25
+ export interface SimListPhoneNumbersOptedOutCommand {
26
+ readonly input: SimListPhoneNumbersOptedOutCommandInput;
27
+ }
28
+ export interface SimListPhoneNumbersOptedOutCommandInput {
29
+ readonly nextToken?: string | undefined;
30
+ }
31
+ export interface SimListPhoneNumbersOptedOutCommandOutput {
32
+ readonly phoneNumbers?: readonly string[] | undefined;
33
+ readonly nextToken?: string | undefined;
34
+ readonly $metadata: SimResponseMetadata;
35
+ }
36
+ /**
37
+ * Minimal structural sim SNS OptInPhoneNumber command.
38
+ *
39
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sns/command/OptInPhoneNumberCommand/
40
+ */
41
+ export interface SimOptInPhoneNumberCommand {
42
+ readonly input: SimOptInPhoneNumberCommandInput;
43
+ }
44
+ export interface SimOptInPhoneNumberCommandInput {
45
+ readonly phoneNumber?: string | undefined;
46
+ }
47
+ export interface SimOptInPhoneNumberCommandOutput {
48
+ readonly $metadata: SimResponseMetadata;
49
+ }
50
+ //# sourceMappingURL=sms.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/sns/command/sms/sms.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAE3F;;;;;;;GAOG;AACH,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,KAAK,EAAE,2CAA2C,CAAC;CAC7D;AAED,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,4CAA4C;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,KAAK,EAAE,uCAAuC,CAAC;CACzD;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,+BAA+B,CAAC;CACjD;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sms.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.command.js","sourceRoot":"","sources":["../../../../../src/service/sns/command/sms/sms.command.ts"],"names":[],"mappings":""}
@@ -1,17 +1,16 @@
1
1
  import type { SimAws } from "../../aws/sim-aws.js";
2
- import { SimSnsProtocolDeliveryEndpoints } from "./sim-sns-protocol-delivery-endpoints.js";
2
+ import type { SimSnsOutwardDeliveryEndpoints } from "./sim-sns-protocol-delivery-endpoints.js";
3
3
  interface SimAwsSnsDeliveryEndpointsProperties {
4
4
  readonly simAws: SimAws;
5
5
  }
6
6
  /**
7
- * Everywhere the topics of one simulated AWS instance can deliver.
7
+ * Everywhere outside itself the topics of one simulated AWS instance deliver.
8
8
  *
9
9
  * Which protocols are simulated is a fact about simulated SNS rather than about
10
10
  * the service builder that hands it its endpoints, so the set is assembled
11
- * here.
11
+ * here. The `sms` protocol is not one of them: an SMS never leaves simulated
12
+ * SNS, which fills that one in itself.
12
13
  */
13
- export declare class SimAwsSnsDeliveryEndpoints extends SimSnsProtocolDeliveryEndpoints {
14
- constructor(properties: SimAwsSnsDeliveryEndpointsProperties);
15
- }
14
+ export declare function simAwsSnsDeliveryEndpoints(properties: SimAwsSnsDeliveryEndpointsProperties): SimSnsOutwardDeliveryEndpoints;
16
15
  export {};
17
16
  //# sourceMappingURL=sim-aws-sns-delivery-endpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-aws-sns-delivery-endpoints.d.ts","sourceRoot":"","sources":["../../../../src/service/sns/delivery/sim-aws-sns-delivery-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAG3F,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,+BAA+B;IAC7E,YAAY,UAAU,EAAE,oCAAoC,EAO3D;CACF"}
1
+ {"version":3,"file":"sim-aws-sns-delivery-endpoints.d.ts","sourceRoot":"","sources":["../../../../src/service/sns/delivery/sim-aws-sns-delivery-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAG/F,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,oCAAoC,GAC/C,8BAA8B,CAKhC"}
@@ -1,21 +1,17 @@
1
1
  import { SimAwsSnsDeliveryFunctions } from "./lambda/sim-aws-sns-delivery-functions.js";
2
- import { SimSnsProtocolDeliveryEndpoints } from "./sim-sns-protocol-delivery-endpoints.js";
3
2
  import { SimAwsSnsDeliveryQueues } from "./sqs/sim-aws-sns-delivery-queues.js";
4
3
  /**
5
- * Everywhere the topics of one simulated AWS instance can deliver.
4
+ * Everywhere outside itself the topics of one simulated AWS instance deliver.
6
5
  *
7
6
  * Which protocols are simulated is a fact about simulated SNS rather than about
8
7
  * the service builder that hands it its endpoints, so the set is assembled
9
- * here.
8
+ * here. The `sms` protocol is not one of them: an SMS never leaves simulated
9
+ * SNS, which fills that one in itself.
10
10
  */
11
- export class SimAwsSnsDeliveryEndpoints extends SimSnsProtocolDeliveryEndpoints {
12
- constructor(properties) {
13
- super({
14
- byProtocol: {
15
- sqs: new SimAwsSnsDeliveryQueues(properties),
16
- lambda: new SimAwsSnsDeliveryFunctions(properties),
17
- },
18
- });
19
- }
11
+ export function simAwsSnsDeliveryEndpoints(properties) {
12
+ return {
13
+ sqs: new SimAwsSnsDeliveryQueues(properties),
14
+ lambda: new SimAwsSnsDeliveryFunctions(properties),
15
+ };
20
16
  }
21
17
  //# sourceMappingURL=sim-aws-sns-delivery-endpoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-aws-sns-delivery-endpoints.js","sourceRoot":"","sources":["../../../../src/service/sns/delivery/sim-aws-sns-delivery-endpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAM/E;;;;;;GAMG;AACH,MAAM,OAAO,0BAA2B,SAAQ,+BAA+B;IAC7E,YAAY,UAAgD;QAC1D,KAAK,CAAC;YACJ,UAAU,EAAE;gBACV,GAAG,EAAE,IAAI,uBAAuB,CAAC,UAAU,CAAC;gBAC5C,MAAM,EAAE,IAAI,0BAA0B,CAAC,UAAU,CAAC;aACnD;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"sim-aws-sns-delivery-endpoints.js","sourceRoot":"","sources":["../../../../src/service/sns/delivery/sim-aws-sns-delivery-endpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAM/E;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CACxC,UAAgD;IAEhD,OAAO;QACL,GAAG,EAAE,IAAI,uBAAuB,CAAC,UAAU,CAAC;QAC5C,MAAM,EAAE,IAAI,0BAA0B,CAAC,UAAU,CAAC;KACnD,CAAC;AACJ,CAAC"}