@kensio/yulin 1.3.0 → 1.4.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 (375) 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 +10 -8
  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 +22 -23
  8. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  9. package/dist/service/aws/factory/sim-aws-s3-notification-destinations.d.ts +11 -0
  10. package/dist/service/aws/factory/sim-aws-s3-notification-destinations.d.ts.map +1 -0
  11. package/dist/service/aws/factory/sim-aws-s3-notification-destinations.js +23 -0
  12. package/dist/service/aws/factory/sim-aws-s3-notification-destinations.js.map +1 -0
  13. package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
  14. package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
  15. package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
  16. package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
  17. package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -0
  18. package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
  19. package/dist/service/aws/sim-aws-account-region-scope.js +6 -0
  20. package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
  21. package/dist/service/aws/sim-aws-service-accessors.d.ts +3 -0
  22. package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
  23. package/dist/service/aws/sim-aws-service-accessors.js +4 -0
  24. package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
  25. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-cfn-value-adapter.d.ts +4 -0
  26. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-cfn-value-adapter.d.ts.map +1 -1
  27. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-cfn-value-adapter.js +19 -2
  28. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-cfn-value-adapter.js.map +1 -1
  29. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.d.ts +20 -4
  30. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.d.ts.map +1 -1
  31. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.js +28 -6
  32. package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.js.map +1 -1
  33. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-capacity.d.ts +26 -0
  34. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-capacity.d.ts.map +1 -0
  35. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-capacity.js +28 -0
  36. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-capacity.js.map +1 -0
  37. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.d.ts +26 -0
  38. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.d.ts.map +1 -0
  39. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.js +27 -0
  40. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-creator.js.map +1 -0
  41. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-indexes.d.ts +17 -0
  42. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-indexes.d.ts.map +1 -0
  43. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-indexes.js +62 -0
  44. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-indexes.js.map +1 -0
  45. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-properties.d.ts +37 -0
  46. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-properties.d.ts.map +1 -0
  47. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-properties.js +88 -0
  48. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-properties.js.map +1 -0
  49. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property-rules.d.ts +23 -0
  50. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property-rules.d.ts.map +1 -0
  51. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property-rules.js +151 -0
  52. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property-rules.js.map +1 -0
  53. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property.d.ts +29 -0
  54. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property.d.ts.map +1 -0
  55. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property.js +26 -0
  56. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-property.js.map +1 -0
  57. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replica-rules.d.ts +15 -0
  58. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replica-rules.d.ts.map +1 -0
  59. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replica-rules.js +98 -0
  60. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replica-rules.js.map +1 -0
  61. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replicas.d.ts +48 -0
  62. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replicas.d.ts.map +1 -0
  63. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replicas.js +78 -0
  64. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-replicas.js.map +1 -0
  65. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-resource.factory.d.ts +53 -0
  66. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-resource.factory.d.ts.map +1 -0
  67. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-resource.factory.js +46 -0
  68. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-resource.factory.js.map +1 -0
  69. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-simulated.d.ts +18 -0
  70. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-simulated.d.ts.map +1 -0
  71. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-simulated.js +41 -0
  72. package/dist/service/dynamodb/cfn/global-table/sim-cfn-dynamodb-global-table-simulated.js.map +1 -0
  73. package/dist/service/dynamodb/cfn/{table/sim-cfn-dynamodb-table-property-error.d.ts → property/sim-cfn-dynamodb-property-error.d.ts} +9 -5
  74. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-error.d.ts.map +1 -0
  75. package/dist/service/dynamodb/cfn/{table/sim-cfn-dynamodb-table-property-error.js → property/sim-cfn-dynamodb-property-error.js} +11 -7
  76. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-error.js.map +1 -0
  77. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-rules.d.ts +54 -0
  78. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-rules.d.ts.map +1 -0
  79. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-rules.js +71 -0
  80. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-rules.js.map +1 -0
  81. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-scalars.d.ts +17 -0
  82. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-scalars.d.ts.map +1 -0
  83. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-scalars.js +35 -0
  84. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-scalars.js.map +1 -0
  85. package/dist/service/dynamodb/cfn/{table/sim-cfn-dynamodb-table-values.d.ts → property/sim-cfn-dynamodb-property-values.d.ts} +23 -17
  86. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-values.d.ts.map +1 -0
  87. package/dist/service/dynamodb/cfn/{table/sim-cfn-dynamodb-table-values.js → property/sim-cfn-dynamodb-property-values.js} +33 -30
  88. package/dist/service/dynamodb/cfn/property/sim-cfn-dynamodb-property-values.js.map +1 -0
  89. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.d.ts +6 -4
  90. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.d.ts.map +1 -1
  91. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.js +15 -5
  92. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-factory.js.map +1 -1
  93. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-type.d.ts +14 -0
  94. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-type.d.ts.map +1 -0
  95. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-type.js +14 -0
  96. package/dist/service/dynamodb/cfn/sim-cfn-dynamodb-resource-type.js.map +1 -0
  97. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-index-rules.d.ts +8 -26
  98. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-index-rules.d.ts.map +1 -1
  99. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-index-rules.js +23 -59
  100. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-index-rules.js.map +1 -1
  101. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-indexes.d.ts +2 -2
  102. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-indexes.d.ts.map +1 -1
  103. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-indexes.js.map +1 -1
  104. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-key-schema.d.ts +2 -2
  105. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-key-schema.d.ts.map +1 -1
  106. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-key-schema.js.map +1 -1
  107. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-properties.d.ts.map +1 -1
  108. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-properties.js +4 -2
  109. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-properties.js.map +1 -1
  110. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-rules.d.ts +2 -3
  111. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-rules.d.ts.map +1 -1
  112. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-rules.js +13 -18
  113. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-rules.js.map +1 -1
  114. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-resource.factory.d.ts +7 -0
  115. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-resource.factory.d.ts.map +1 -1
  116. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-resource.factory.js +5 -2
  117. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-resource.factory.js.map +1 -1
  118. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream-rules.d.ts +3 -15
  119. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream-rules.d.ts.map +1 -1
  120. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream-rules.js +11 -33
  121. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream-rules.js.map +1 -1
  122. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream.d.ts +2 -2
  123. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream.d.ts.map +1 -1
  124. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-stream.js.map +1 -1
  125. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-throughput.d.ts +2 -2
  126. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-throughput.d.ts.map +1 -1
  127. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-throughput.js.map +1 -1
  128. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-time-to-live.d.ts +2 -2
  129. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-time-to-live.d.ts.map +1 -1
  130. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-time-to-live.js.map +1 -1
  131. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts +26 -0
  132. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts.map +1 -0
  133. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js +45 -0
  134. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js.map +1 -0
  135. package/dist/service/rekognition/command/detect-faces/detect-faces-request.d.ts +12 -0
  136. package/dist/service/rekognition/command/detect-faces/detect-faces-request.d.ts.map +1 -0
  137. package/dist/service/rekognition/command/detect-faces/detect-faces-request.js +18 -0
  138. package/dist/service/rekognition/command/detect-faces/detect-faces-request.js.map +1 -0
  139. package/dist/service/rekognition/command/detect-faces/detect-faces.command.d.ts +133 -0
  140. package/dist/service/rekognition/command/detect-faces/detect-faces.command.d.ts.map +1 -0
  141. package/dist/service/rekognition/command/detect-faces/detect-faces.command.js +2 -0
  142. package/dist/service/rekognition/command/detect-faces/detect-faces.command.js.map +1 -0
  143. package/dist/service/rekognition/command/detect-faces/detect-faces.handler.d.ts +35 -0
  144. package/dist/service/rekognition/command/detect-faces/detect-faces.handler.d.ts.map +1 -0
  145. package/dist/service/rekognition/command/detect-faces/detect-faces.handler.js +39 -0
  146. package/dist/service/rekognition/command/detect-faces/detect-faces.handler.js.map +1 -0
  147. package/dist/service/rekognition/command/detect-labels/detect-labels-request.d.ts +30 -0
  148. package/dist/service/rekognition/command/detect-labels/detect-labels-request.d.ts.map +1 -0
  149. package/dist/service/rekognition/command/detect-labels/detect-labels-request.js +71 -0
  150. package/dist/service/rekognition/command/detect-labels/detect-labels-request.js.map +1 -0
  151. package/dist/service/rekognition/command/detect-labels/detect-labels.command.d.ts +57 -0
  152. package/dist/service/rekognition/command/detect-labels/detect-labels.command.d.ts.map +1 -0
  153. package/dist/service/rekognition/command/detect-labels/detect-labels.command.js +2 -0
  154. package/dist/service/rekognition/command/detect-labels/detect-labels.command.js.map +1 -0
  155. package/dist/service/rekognition/command/detect-labels/detect-labels.handler.d.ts +35 -0
  156. package/dist/service/rekognition/command/detect-labels/detect-labels.handler.d.ts.map +1 -0
  157. package/dist/service/rekognition/command/detect-labels/detect-labels.handler.js +41 -0
  158. package/dist/service/rekognition/command/detect-labels/detect-labels.handler.js.map +1 -0
  159. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels-request.d.ts +17 -0
  160. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels-request.d.ts.map +1 -0
  161. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels-request.js +30 -0
  162. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels-request.js.map +1 -0
  163. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.command.d.ts +42 -0
  164. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.command.d.ts.map +1 -0
  165. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.command.js +2 -0
  166. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.command.js.map +1 -0
  167. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.handler.d.ts +36 -0
  168. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.handler.d.ts.map +1 -0
  169. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.handler.js +47 -0
  170. package/dist/service/rekognition/command/detect-moderation-labels/detect-moderation-labels.handler.js.map +1 -0
  171. package/dist/service/rekognition/command/sim-rekognition-min-confidence.d.ts +19 -0
  172. package/dist/service/rekognition/command/sim-rekognition-min-confidence.d.ts.map +1 -0
  173. package/dist/service/rekognition/command/sim-rekognition-min-confidence.js +34 -0
  174. package/dist/service/rekognition/command/sim-rekognition-min-confidence.js.map +1 -0
  175. package/dist/service/rekognition/command/sim-rekognition-request-options.d.ts +16 -0
  176. package/dist/service/rekognition/command/sim-rekognition-request-options.d.ts.map +1 -0
  177. package/dist/service/rekognition/command/sim-rekognition-request-options.js +2 -0
  178. package/dist/service/rekognition/command/sim-rekognition-request-options.js.map +1 -0
  179. package/dist/service/rekognition/command/sim-rekognition-unsimulated-input.d.ts +19 -0
  180. package/dist/service/rekognition/command/sim-rekognition-unsimulated-input.d.ts.map +1 -0
  181. package/dist/service/rekognition/command/sim-rekognition-unsimulated-input.js +30 -0
  182. package/dist/service/rekognition/command/sim-rekognition-unsimulated-input.js.map +1 -0
  183. package/dist/service/rekognition/error/sim-rekognition.error.d.ts +87 -0
  184. package/dist/service/rekognition/error/sim-rekognition.error.d.ts.map +1 -0
  185. package/dist/service/rekognition/error/sim-rekognition.error.js +95 -0
  186. package/dist/service/rekognition/error/sim-rekognition.error.js.map +1 -0
  187. package/dist/service/rekognition/face/sim-rekognition-declared-value.d.ts +26 -0
  188. package/dist/service/rekognition/face/sim-rekognition-declared-value.d.ts.map +1 -0
  189. package/dist/service/rekognition/face/sim-rekognition-declared-value.js +28 -0
  190. package/dist/service/rekognition/face/sim-rekognition-declared-value.js.map +1 -0
  191. package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts +29 -0
  192. package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts.map +1 -0
  193. package/dist/service/rekognition/face/sim-rekognition-detected-face.js +53 -0
  194. package/dist/service/rekognition/face/sim-rekognition-detected-face.js.map +1 -0
  195. package/dist/service/rekognition/face/sim-rekognition-emotion-name.d.ts +18 -0
  196. package/dist/service/rekognition/face/sim-rekognition-emotion-name.d.ts.map +1 -0
  197. package/dist/service/rekognition/face/sim-rekognition-emotion-name.js +27 -0
  198. package/dist/service/rekognition/face/sim-rekognition-emotion-name.js.map +1 -0
  199. package/dist/service/rekognition/face/sim-rekognition-face-age-and-gender.d.ts +24 -0
  200. package/dist/service/rekognition/face/sim-rekognition-face-age-and-gender.d.ts.map +1 -0
  201. package/dist/service/rekognition/face/sim-rekognition-face-age-and-gender.js +62 -0
  202. package/dist/service/rekognition/face/sim-rekognition-face-age-and-gender.js.map +1 -0
  203. package/dist/service/rekognition/face/sim-rekognition-face-attributes.d.ts +41 -0
  204. package/dist/service/rekognition/face/sim-rekognition-face-attributes.d.ts.map +1 -0
  205. package/dist/service/rekognition/face/sim-rekognition-face-attributes.js +75 -0
  206. package/dist/service/rekognition/face/sim-rekognition-face-attributes.js.map +1 -0
  207. package/dist/service/rekognition/face/sim-rekognition-face-declaration.d.ts +116 -0
  208. package/dist/service/rekognition/face/sim-rekognition-face-declaration.d.ts.map +1 -0
  209. package/dist/service/rekognition/face/sim-rekognition-face-declaration.js +2 -0
  210. package/dist/service/rekognition/face/sim-rekognition-face-declaration.js.map +1 -0
  211. package/dist/service/rekognition/face/sim-rekognition-face-defaults.d.ts +31 -0
  212. package/dist/service/rekognition/face/sim-rekognition-face-defaults.d.ts.map +1 -0
  213. package/dist/service/rekognition/face/sim-rekognition-face-defaults.js +120 -0
  214. package/dist/service/rekognition/face/sim-rekognition-face-defaults.js.map +1 -0
  215. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts +31 -0
  216. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -0
  217. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js +38 -0
  218. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -0
  219. package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts +21 -0
  220. package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts.map +1 -0
  221. package/dist/service/rekognition/face/sim-rekognition-face-detection.js +33 -0
  222. package/dist/service/rekognition/face/sim-rekognition-face-detection.js.map +1 -0
  223. package/dist/service/rekognition/face/sim-rekognition-face-emotions.d.ts +23 -0
  224. package/dist/service/rekognition/face/sim-rekognition-face-emotions.d.ts.map +1 -0
  225. package/dist/service/rekognition/face/sim-rekognition-face-emotions.js +55 -0
  226. package/dist/service/rekognition/face/sim-rekognition-face-emotions.js.map +1 -0
  227. package/dist/service/rekognition/face/sim-rekognition-face-eye-direction.d.ts +19 -0
  228. package/dist/service/rekognition/face/sim-rekognition-face-eye-direction.d.ts.map +1 -0
  229. package/dist/service/rekognition/face/sim-rekognition-face-eye-direction.js +31 -0
  230. package/dist/service/rekognition/face/sim-rekognition-face-eye-direction.js.map +1 -0
  231. package/dist/service/rekognition/face/sim-rekognition-face-feature-members.d.ts +56 -0
  232. package/dist/service/rekognition/face/sim-rekognition-face-feature-members.d.ts.map +1 -0
  233. package/dist/service/rekognition/face/sim-rekognition-face-feature-members.js +22 -0
  234. package/dist/service/rekognition/face/sim-rekognition-face-feature-members.js.map +1 -0
  235. package/dist/service/rekognition/face/sim-rekognition-face-features.d.ts +19 -0
  236. package/dist/service/rekognition/face/sim-rekognition-face-features.d.ts.map +1 -0
  237. package/dist/service/rekognition/face/sim-rekognition-face-features.js +39 -0
  238. package/dist/service/rekognition/face/sim-rekognition-face-features.js.map +1 -0
  239. package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts +27 -0
  240. package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts.map +1 -0
  241. package/dist/service/rekognition/face/sim-rekognition-face-frame.js +74 -0
  242. package/dist/service/rekognition/face/sim-rekognition-face-frame.js.map +1 -0
  243. package/dist/service/rekognition/face/sim-rekognition-face-landmark-points.d.ts +25 -0
  244. package/dist/service/rekognition/face/sim-rekognition-face-landmark-points.d.ts.map +1 -0
  245. package/dist/service/rekognition/face/sim-rekognition-face-landmark-points.js +89 -0
  246. package/dist/service/rekognition/face/sim-rekognition-face-landmark-points.js.map +1 -0
  247. package/dist/service/rekognition/face/sim-rekognition-face-landmarks.d.ts +20 -0
  248. package/dist/service/rekognition/face/sim-rekognition-face-landmarks.d.ts.map +1 -0
  249. package/dist/service/rekognition/face/sim-rekognition-face-landmarks.js +32 -0
  250. package/dist/service/rekognition/face/sim-rekognition-face-landmarks.js.map +1 -0
  251. package/dist/service/rekognition/face/sim-rekognition-face-measures.d.ts +27 -0
  252. package/dist/service/rekognition/face/sim-rekognition-face-measures.d.ts.map +1 -0
  253. package/dist/service/rekognition/face/sim-rekognition-face-measures.js +49 -0
  254. package/dist/service/rekognition/face/sim-rekognition-face-measures.js.map +1 -0
  255. package/dist/service/rekognition/face/sim-rekognition-faces.d.ts +36 -0
  256. package/dist/service/rekognition/face/sim-rekognition-faces.d.ts.map +1 -0
  257. package/dist/service/rekognition/face/sim-rekognition-faces.js +49 -0
  258. package/dist/service/rekognition/face/sim-rekognition-faces.js.map +1 -0
  259. package/dist/service/rekognition/face/sim-rekognition-landmark-name.d.ts +30 -0
  260. package/dist/service/rekognition/face/sim-rekognition-landmark-name.d.ts.map +1 -0
  261. package/dist/service/rekognition/face/sim-rekognition-landmark-name.js +66 -0
  262. package/dist/service/rekognition/face/sim-rekognition-landmark-name.js.map +1 -0
  263. package/dist/service/rekognition/image/s3/sim-aws-rekognition-image-objects.d.ts +48 -0
  264. package/dist/service/rekognition/image/s3/sim-aws-rekognition-image-objects.d.ts.map +1 -0
  265. package/dist/service/rekognition/image/s3/sim-aws-rekognition-image-objects.js +78 -0
  266. package/dist/service/rekognition/image/s3/sim-aws-rekognition-image-objects.js.map +1 -0
  267. package/dist/service/rekognition/image/sim-rekognition-bounding-box.d.ts +48 -0
  268. package/dist/service/rekognition/image/sim-rekognition-bounding-box.d.ts.map +1 -0
  269. package/dist/service/rekognition/image/sim-rekognition-bounding-box.js +50 -0
  270. package/dist/service/rekognition/image/sim-rekognition-bounding-box.js.map +1 -0
  271. package/dist/service/rekognition/image/sim-rekognition-image-format.d.ts +17 -0
  272. package/dist/service/rekognition/image/sim-rekognition-image-format.d.ts.map +1 -0
  273. package/dist/service/rekognition/image/sim-rekognition-image-format.js +28 -0
  274. package/dist/service/rekognition/image/sim-rekognition-image-format.js.map +1 -0
  275. package/dist/service/rekognition/image/sim-rekognition-image-hash.d.ts +15 -0
  276. package/dist/service/rekognition/image/sim-rekognition-image-hash.d.ts.map +1 -0
  277. package/dist/service/rekognition/image/sim-rekognition-image-hash.js +20 -0
  278. package/dist/service/rekognition/image/sim-rekognition-image-hash.js.map +1 -0
  279. package/dist/service/rekognition/image/sim-rekognition-image-input.d.ts +23 -0
  280. package/dist/service/rekognition/image/sim-rekognition-image-input.d.ts.map +1 -0
  281. package/dist/service/rekognition/image/sim-rekognition-image-input.js +2 -0
  282. package/dist/service/rekognition/image/sim-rekognition-image-input.js.map +1 -0
  283. package/dist/service/rekognition/image/sim-rekognition-image-objects.d.ts +35 -0
  284. package/dist/service/rekognition/image/sim-rekognition-image-objects.d.ts.map +1 -0
  285. package/dist/service/rekognition/image/sim-rekognition-image-objects.js +21 -0
  286. package/dist/service/rekognition/image/sim-rekognition-image-objects.js.map +1 -0
  287. package/dist/service/rekognition/image/sim-rekognition-image-request.d.ts +59 -0
  288. package/dist/service/rekognition/image/sim-rekognition-image-request.d.ts.map +1 -0
  289. package/dist/service/rekognition/image/sim-rekognition-image-request.js +88 -0
  290. package/dist/service/rekognition/image/sim-rekognition-image-request.js.map +1 -0
  291. package/dist/service/rekognition/image/sim-rekognition-image.d.ts +30 -0
  292. package/dist/service/rekognition/image/sim-rekognition-image.d.ts.map +1 -0
  293. package/dist/service/rekognition/image/sim-rekognition-image.js +36 -0
  294. package/dist/service/rekognition/image/sim-rekognition-image.js.map +1 -0
  295. package/dist/service/rekognition/index.d.ts +18 -0
  296. package/dist/service/rekognition/index.d.ts.map +1 -0
  297. package/dist/service/rekognition/index.js +13 -0
  298. package/dist/service/rekognition/index.js.map +1 -0
  299. package/dist/service/rekognition/label/sim-rekognition-detected-label.d.ts +11 -0
  300. package/dist/service/rekognition/label/sim-rekognition-detected-label.d.ts.map +1 -0
  301. package/dist/service/rekognition/label/sim-rekognition-detected-label.js +49 -0
  302. package/dist/service/rekognition/label/sim-rekognition-detected-label.js.map +1 -0
  303. package/dist/service/rekognition/label/sim-rekognition-label-declaration.d.ts +43 -0
  304. package/dist/service/rekognition/label/sim-rekognition-label-declaration.d.ts.map +1 -0
  305. package/dist/service/rekognition/label/sim-rekognition-label-declaration.js +10 -0
  306. package/dist/service/rekognition/label/sim-rekognition-label-declaration.js.map +1 -0
  307. package/dist/service/rekognition/label/sim-rekognition-label-defaults.d.ts +22 -0
  308. package/dist/service/rekognition/label/sim-rekognition-label-defaults.d.ts.map +1 -0
  309. package/dist/service/rekognition/label/sim-rekognition-label-defaults.js +42 -0
  310. package/dist/service/rekognition/label/sim-rekognition-label-defaults.js.map +1 -0
  311. package/dist/service/rekognition/label/sim-rekognition-label-detection.d.ts +32 -0
  312. package/dist/service/rekognition/label/sim-rekognition-label-detection.d.ts.map +1 -0
  313. package/dist/service/rekognition/label/sim-rekognition-label-detection.js +35 -0
  314. package/dist/service/rekognition/label/sim-rekognition-label-detection.js.map +1 -0
  315. package/dist/service/rekognition/label/sim-rekognition-label-instances.d.ts +19 -0
  316. package/dist/service/rekognition/label/sim-rekognition-label-instances.d.ts.map +1 -0
  317. package/dist/service/rekognition/label/sim-rekognition-label-instances.js +28 -0
  318. package/dist/service/rekognition/label/sim-rekognition-label-instances.js.map +1 -0
  319. package/dist/service/rekognition/label/sim-rekognition-labels.d.ts +30 -0
  320. package/dist/service/rekognition/label/sim-rekognition-labels.d.ts.map +1 -0
  321. package/dist/service/rekognition/label/sim-rekognition-labels.js +38 -0
  322. package/dist/service/rekognition/label/sim-rekognition-labels.js.map +1 -0
  323. package/dist/service/rekognition/moderation/sim-rekognition-moderation-labels.d.ts +29 -0
  324. package/dist/service/rekognition/moderation/sim-rekognition-moderation-labels.d.ts.map +1 -0
  325. package/dist/service/rekognition/moderation/sim-rekognition-moderation-labels.js +85 -0
  326. package/dist/service/rekognition/moderation/sim-rekognition-moderation-labels.js.map +1 -0
  327. package/dist/service/rekognition/moderation/sim-rekognition-moderation-result.d.ts +46 -0
  328. package/dist/service/rekognition/moderation/sim-rekognition-moderation-result.d.ts.map +1 -0
  329. package/dist/service/rekognition/moderation/sim-rekognition-moderation-result.js +79 -0
  330. package/dist/service/rekognition/moderation/sim-rekognition-moderation-result.js.map +1 -0
  331. package/dist/service/rekognition/moderation/sim-rekognition-moderation-taxonomy.d.ts +55 -0
  332. package/dist/service/rekognition/moderation/sim-rekognition-moderation-taxonomy.d.ts.map +1 -0
  333. package/dist/service/rekognition/moderation/sim-rekognition-moderation-taxonomy.js +87 -0
  334. package/dist/service/rekognition/moderation/sim-rekognition-moderation-taxonomy.js.map +1 -0
  335. package/dist/service/rekognition/moderation/sim-rekognition-moderation.d.ts +35 -0
  336. package/dist/service/rekognition/moderation/sim-rekognition-moderation.d.ts.map +1 -0
  337. package/dist/service/rekognition/moderation/sim-rekognition-moderation.js +57 -0
  338. package/dist/service/rekognition/moderation/sim-rekognition-moderation.js.map +1 -0
  339. package/dist/service/rekognition/rule/sim-rekognition-declared-confidence.d.ts +21 -0
  340. package/dist/service/rekognition/rule/sim-rekognition-declared-confidence.d.ts.map +1 -0
  341. package/dist/service/rekognition/rule/sim-rekognition-declared-confidence.js +34 -0
  342. package/dist/service/rekognition/rule/sim-rekognition-declared-confidence.js.map +1 -0
  343. package/dist/service/rekognition/rule/sim-rekognition-result-rules.d.ts +51 -0
  344. package/dist/service/rekognition/rule/sim-rekognition-result-rules.d.ts.map +1 -0
  345. package/dist/service/rekognition/rule/sim-rekognition-result-rules.js +80 -0
  346. package/dist/service/rekognition/rule/sim-rekognition-result-rules.js.map +1 -0
  347. package/dist/service/rekognition/sample/sim-rekognition-sample-image-files.d.ts +27 -0
  348. package/dist/service/rekognition/sample/sim-rekognition-sample-image-files.d.ts.map +1 -0
  349. package/dist/service/rekognition/sample/sim-rekognition-sample-image-files.js +62 -0
  350. package/dist/service/rekognition/sample/sim-rekognition-sample-image-files.js.map +1 -0
  351. package/dist/service/rekognition/sample/sim-rekognition-sample-image.d.ts +26 -0
  352. package/dist/service/rekognition/sample/sim-rekognition-sample-image.d.ts.map +1 -0
  353. package/dist/service/rekognition/sample/sim-rekognition-sample-image.js +32 -0
  354. package/dist/service/rekognition/sample/sim-rekognition-sample-image.js.map +1 -0
  355. package/dist/service/rekognition/sample/sim-rekognition-sample-images.d.ts +52 -0
  356. package/dist/service/rekognition/sample/sim-rekognition-sample-images.d.ts.map +1 -0
  357. package/dist/service/rekognition/sample/sim-rekognition-sample-images.js +63 -0
  358. package/dist/service/rekognition/sample/sim-rekognition-sample-images.js.map +1 -0
  359. package/dist/service/rekognition/sample/sim-rekognition-sample-rules.d.ts +29 -0
  360. package/dist/service/rekognition/sample/sim-rekognition-sample-rules.d.ts.map +1 -0
  361. package/dist/service/rekognition/sample/sim-rekognition-sample-rules.js +31 -0
  362. package/dist/service/rekognition/sample/sim-rekognition-sample-rules.js.map +1 -0
  363. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.d.ts +20 -0
  364. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.d.ts.map +1 -0
  365. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js +38 -0
  366. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js.map +1 -0
  367. package/dist/service/rekognition/sim-rekognition.d.ts +95 -0
  368. package/dist/service/rekognition/sim-rekognition.d.ts.map +1 -0
  369. package/dist/service/rekognition/sim-rekognition.js +124 -0
  370. package/dist/service/rekognition/sim-rekognition.js.map +1 -0
  371. package/package.json +6 -1
  372. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-error.d.ts.map +0 -1
  373. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-property-error.js.map +0 -1
  374. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-values.d.ts.map +0 -1
  375. package/dist/service/dynamodb/cfn/table/sim-cfn-dynamodb-table-values.js.map +0 -1
@@ -0,0 +1,87 @@
1
+ import { SimRekognitionDeclarationError } from "../error/sim-rekognition.error.js";
2
+ import { moderationLabels, simRekognitionModerationModelVersion, } from "./sim-rekognition-moderation-labels.js";
3
+ /**
4
+ * One label in the moderation taxonomy.
5
+ *
6
+ * A top-level label carries a parent name of `""` rather than no parent at
7
+ * all, which is what real Rekognition puts in `ParentName` for one.
8
+ */
9
+ export class SimRekognitionModerationLabelNode {
10
+ name;
11
+ parentName;
12
+ taxonomyLevel;
13
+ constructor(name, parentName, taxonomyLevel) {
14
+ this.name = name;
15
+ this.parentName = parentName;
16
+ this.taxonomyLevel = taxonomyLevel;
17
+ }
18
+ }
19
+ /**
20
+ * The content moderation label taxonomy, as the thing a declared label is
21
+ * resolved against.
22
+ *
23
+ * Declaring a label is declaring a whole chain: real Rekognition returns the
24
+ * detected label together with every label above it, so an image declared as
25
+ * `Implied Nudity` comes back as that, its `Non-Explicit Nudity` parent, and
26
+ * the top-level category above that. Handler code filtering on the top-level
27
+ * category therefore sees what it would see on AWS.
28
+ */
29
+ export class SimRekognitionModerationTaxonomy {
30
+ nodes = new Map();
31
+ constructor() {
32
+ for (const [name, parentName] of moderationLabels) {
33
+ this.nodes.set(name, new SimRekognitionModerationLabelNode(name, parentName, this.levelOf(parentName) + 1));
34
+ }
35
+ }
36
+ /**
37
+ * Whether a name is a label in this taxonomy.
38
+ */
39
+ has(name) {
40
+ return this.nodes.has(name);
41
+ }
42
+ /**
43
+ * The chain of labels a detected label comes back with, from the top-level
44
+ * category down to the label itself.
45
+ */
46
+ chain(name) {
47
+ const node = this.require(name);
48
+ if (node.parentName === "") {
49
+ return [node];
50
+ }
51
+ return [...this.chain(node.parentName), node];
52
+ }
53
+ /**
54
+ * Get a label by name, refusing one this taxonomy does not have.
55
+ */
56
+ require(name) {
57
+ const node = this.nodes.get(name);
58
+ if (node === undefined) {
59
+ throw new SimRekognitionDeclarationError(`'${name}' is not a Rekognition moderation label. Declare one of the ` +
60
+ `${String(this.nodes.size)} labels in the version ` +
61
+ `${simRekognitionModerationModelVersion} content moderation ` +
62
+ `taxonomy, such as 'Explicit Nudity' or 'Violence'.`);
63
+ }
64
+ return node;
65
+ }
66
+ /**
67
+ * How deep a parent sits, so its children can be numbered below it.
68
+ *
69
+ * The labels are declared parents-first, so a parent is always in place by
70
+ * the time its children are built.
71
+ */
72
+ levelOf(parentName) {
73
+ if (parentName === "") {
74
+ return 0;
75
+ }
76
+ return this.require(parentName).taxonomyLevel;
77
+ }
78
+ }
79
+ /**
80
+ * The one taxonomy instance the simulation resolves labels against.
81
+ *
82
+ * It holds no per-simulation state, only the published label list, so there is
83
+ * nothing for one SimAws to leak into another through it.
84
+ */
85
+ export const simRekognitionModerationTaxonomy = new SimRekognitionModerationTaxonomy();
86
+ export { simRekognitionModerationModelVersion } from "./sim-rekognition-moderation-labels.js";
87
+ //# sourceMappingURL=sim-rekognition-moderation-taxonomy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-moderation-taxonomy.js","sourceRoot":"","sources":["../../../../src/service/rekognition/moderation/sim-rekognition-moderation-taxonomy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,oCAAoC,GACrC,MAAM,wCAAwC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,OAAO,iCAAiC;IAE1B,IAAI;IACJ,UAAU;IACV,aAAa;IAH/B,YACkB,IAAY,EACZ,UAAkB,EAClB,aAAqB;oBAFrB,IAAI;0BACJ,UAAU;6BACV,aAAa;IAC5B,CAAC;CACL;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,gCAAgC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAA6C,CAAC;IAE9E;QACE,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,gBAAgB,EAAE,CAAC;YAClD,IAAI,CAAC,KAAK,CAAC,GAAG,CACZ,IAAI,EACJ,IAAI,iCAAiC,CACnC,IAAI,EACJ,UAAU,EACV,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAC7B,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAY;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEhC,IAAI,IAAI,CAAC,UAAU,KAAK,EAAE,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QAED,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAY;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,8BAA8B,CACtC,IAAI,IAAI,8DAA8D;gBACpE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB;gBACnD,GAAG,oCAAoC,sBAAsB;gBAC7D,oDAAoD,CACvD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACK,OAAO,CAAC,UAAkB;QAChC,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;YACtB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC;IAChD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,IAAI,gCAAgC,EAAE,CAAC;AAEzC,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { SimRekognitionImage } from "../image/sim-rekognition-image.js";
2
+ import { SimRekognitionModerationDetection, type SimRekognitionModerationResult } from "./sim-rekognition-moderation-result.js";
3
+ /**
4
+ * The moderation results simulated Rekognition answers with.
5
+ *
6
+ * The rules are grouped per operation rather than hung off the service, so
7
+ * `moderation()`, and the operation groups added beside it, each own the
8
+ * result shape their own operation answers with.
9
+ */
10
+ export declare class SimRekognitionModeration {
11
+ private readonly rules;
12
+ /**
13
+ * The sample images are declared as ordinary hash rules, so a rule a test
14
+ * registers for the same image replaces the built-in one through the usual
15
+ * precedence rather than through anything special-cased here.
16
+ */
17
+ constructor();
18
+ /**
19
+ * Answer with this result for any image no other rule matches.
20
+ */
21
+ byDefault(result: SimRekognitionModerationResult): void;
22
+ /**
23
+ * Answer with this result for the S3 object with this exact name.
24
+ */
25
+ onName(name: string, result: SimRekognitionModerationResult): void;
26
+ /**
27
+ * Answer with this result for the image with this exact content hash.
28
+ */
29
+ onHash(hash: string, result: SimRekognitionModerationResult): void;
30
+ /**
31
+ * The moderation result for one image.
32
+ */
33
+ detectionFor(image: SimRekognitionImage): SimRekognitionModerationDetection;
34
+ }
35
+ //# sourceMappingURL=sim-rekognition-moderation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-moderation.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/moderation/sim-rekognition-moderation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAG7E,OAAO,EACL,iCAAiC,EACjC,KAAK,8BAA8B,EACpC,MAAM,wCAAwC,CAAC;AAYhD;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAGlB;IAEJ;;;;OAIG;IACH,cAIC;IAED;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAEtD;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAEjE;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAEjE;IAED;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,mBAAmB,GAAG,iCAAiC,CAE1E;CACF"}
@@ -0,0 +1,57 @@
1
+ import { SimRekognitionResultRules } from "../rule/sim-rekognition-result-rules.js";
2
+ import { simRekognitionSampleModerationRules } from "../sample/sim-rekognition-sample-rules.js";
3
+ import { SimRekognitionModerationDetection, } from "./sim-rekognition-moderation-result.js";
4
+ /**
5
+ * What DetectModerationLabels answers with before anything is configured.
6
+ *
7
+ * A clean image is the useful default: a moderation pipeline is mostly
8
+ * exercised by images that pass, with the ones that fail declared image by
9
+ * image. Which images those are is a decision about the system under test, so
10
+ * the simulation does not invent one.
11
+ */
12
+ const cleanImage = { labels: [] };
13
+ /**
14
+ * The moderation results simulated Rekognition answers with.
15
+ *
16
+ * The rules are grouped per operation rather than hung off the service, so
17
+ * `moderation()`, and the operation groups added beside it, each own the
18
+ * result shape their own operation answers with.
19
+ */
20
+ export class SimRekognitionModeration {
21
+ rules = new SimRekognitionResultRules(new SimRekognitionModerationDetection(cleanImage));
22
+ /**
23
+ * The sample images are declared as ordinary hash rules, so a rule a test
24
+ * registers for the same image replaces the built-in one through the usual
25
+ * precedence rather than through anything special-cased here.
26
+ */
27
+ constructor() {
28
+ for (const sample of simRekognitionSampleModerationRules) {
29
+ this.onHash(sample.image.hash, sample.result);
30
+ }
31
+ }
32
+ /**
33
+ * Answer with this result for any image no other rule matches.
34
+ */
35
+ byDefault(result) {
36
+ this.rules.byDefault(new SimRekognitionModerationDetection(result));
37
+ }
38
+ /**
39
+ * Answer with this result for the S3 object with this exact name.
40
+ */
41
+ onName(name, result) {
42
+ this.rules.onName(name, new SimRekognitionModerationDetection(result));
43
+ }
44
+ /**
45
+ * Answer with this result for the image with this exact content hash.
46
+ */
47
+ onHash(hash, result) {
48
+ this.rules.onHash(hash, new SimRekognitionModerationDetection(result));
49
+ }
50
+ /**
51
+ * The moderation result for one image.
52
+ */
53
+ detectionFor(image) {
54
+ return this.rules.resultFor(image);
55
+ }
56
+ }
57
+ //# sourceMappingURL=sim-rekognition-moderation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-moderation.js","sourceRoot":"","sources":["../../../../src/service/rekognition/moderation/sim-rekognition-moderation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,mCAAmC,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,UAAU,GAAmC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;IAClB,KAAK,GACpB,IAAI,yBAAyB,CAC3B,IAAI,iCAAiC,CAAC,UAAU,CAAC,CAClD,CAAC;IAEJ;;;;OAIG;IACH;QACE,KAAK,MAAM,MAAM,IAAI,mCAAmC,EAAE,CAAC;YACzD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,MAAsC;QAC9C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,iCAAiC,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY,EAAE,MAAsC;QACzD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,iCAAiC,CAAC,MAAM,CAAC,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAY,EAAE,MAAsC;QACzD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,iCAAiC,CAAC,MAAM,CAAC,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,KAA0B;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The confidence a declared result reports a label at.
3
+ *
4
+ * Every operation group declares confidences the same way and defaults them
5
+ * differently, so the range check lives here and the default is passed in.
6
+ *
7
+ * Confidences pass through `Math.fround`. Real Rekognition confidences are
8
+ * float32 values with a long tail, such as `99.44782257080078`, and a value
9
+ * rounded to four decimals is identifiable as fake.
10
+ */
11
+ export declare class SimRekognitionDeclaredConfidence {
12
+ private readonly whenUndeclared;
13
+ constructor(whenUndeclared: number);
14
+ /**
15
+ * The confidence to report a declared label at.
16
+ *
17
+ * The label name is only used to say which declaration was wrong.
18
+ */
19
+ of(name: string, declared: number | undefined): number;
20
+ }
21
+ //# sourceMappingURL=sim-rekognition-declared-confidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-declared-confidence.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/rule/sim-rekognition-declared-confidence.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,qBAAa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAA3C,YAA6B,cAAc,EAAE,MAAM,EAAI;IAEvD;;;;OAIG;IACH,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAcrD;CACF"}
@@ -0,0 +1,34 @@
1
+ import { SimRekognitionDeclarationError } from "../error/sim-rekognition.error.js";
2
+ /**
3
+ * The confidence a declared result reports a label at.
4
+ *
5
+ * Every operation group declares confidences the same way and defaults them
6
+ * differently, so the range check lives here and the default is passed in.
7
+ *
8
+ * Confidences pass through `Math.fround`. Real Rekognition confidences are
9
+ * float32 values with a long tail, such as `99.44782257080078`, and a value
10
+ * rounded to four decimals is identifiable as fake.
11
+ */
12
+ export class SimRekognitionDeclaredConfidence {
13
+ whenUndeclared;
14
+ constructor(whenUndeclared) {
15
+ this.whenUndeclared = whenUndeclared;
16
+ }
17
+ /**
18
+ * The confidence to report a declared label at.
19
+ *
20
+ * The label name is only used to say which declaration was wrong.
21
+ */
22
+ of(name, declared) {
23
+ const confidence = declared ?? this.whenUndeclared;
24
+ // A NaN is refused with everything else out of range. Every comparison
25
+ // with one is false, so a label declared at NaN would never survive
26
+ // MinConfidence filtering and would look like a rule that never matched.
27
+ if (!Number.isFinite(confidence) || confidence < 0 || confidence > 100) {
28
+ throw new SimRekognitionDeclarationError(`A confidence of ${String(confidence)} declared for '${name}' is not ` +
29
+ `a Rekognition confidence, which is a percentage from 0 to 100.`);
30
+ }
31
+ return Math.fround(confidence);
32
+ }
33
+ }
34
+ //# sourceMappingURL=sim-rekognition-declared-confidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-declared-confidence.js","sourceRoot":"","sources":["../../../../src/service/rekognition/rule/sim-rekognition-declared-confidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAEnF;;;;;;;;;GASG;AACH,MAAM,OAAO,gCAAgC;IACd,cAAc;IAA3C,YAA6B,cAAsB;8BAAtB,cAAc;IAAW,CAAC;IAEvD;;;;OAIG;IACH,EAAE,CAAC,IAAY,EAAE,QAA4B;QAC3C,MAAM,UAAU,GAAG,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC;QAEnD,uEAAuE;QACvE,oEAAoE;QACpE,yEAAyE;QACzE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,GAAG,GAAG,EAAE,CAAC;YACvE,MAAM,IAAI,8BAA8B,CACtC,mBAAmB,MAAM,CAAC,UAAU,CAAC,kBAAkB,IAAI,WAAW;gBACpE,gEAAgE,CACnE,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC;CACF"}
@@ -0,0 +1,51 @@
1
+ import type { SimRekognitionImage } from "../image/sim-rekognition-image.js";
2
+ /**
3
+ * The results one detection operation answers with, by image.
4
+ *
5
+ * Simulated Rekognition does no image recognition. Every operation answers
6
+ * from the rules registered against it, in the way simulated ACM issues
7
+ * certificates without producing real TLS certificates.
8
+ *
9
+ * There are three kinds of rule and one order between them: a rule for an
10
+ * exact content hash wins, then a rule for an exact S3 object name, then the
11
+ * default. Matching is exact, with no pattern syntax, so which rule applies
12
+ * never depends on how specific a pattern is thought to be.
13
+ *
14
+ * An image passed as `Image.Bytes` has no name, so it consults hash rules and
15
+ * then the default.
16
+ */
17
+ export declare class SimRekognitionResultRules<TResult> {
18
+ private defaultResult;
19
+ private readonly resultsByName;
20
+ private readonly resultsByHash;
21
+ constructor(defaultResult: TResult);
22
+ /**
23
+ * Answer with this result for any image no other rule matches.
24
+ */
25
+ byDefault(result: TResult): void;
26
+ /**
27
+ * Answer with this result for an image read from an S3 object with this
28
+ * exact name.
29
+ *
30
+ * The name is the `Name` a request gives Rekognition, which is the object
31
+ * key. It is matched on its own rather than with the Bucket, so a rule for
32
+ * a key applies to that key in whichever Bucket the request names.
33
+ */
34
+ onName(name: string, result: TResult): void;
35
+ /**
36
+ * Answer with this result for an image whose bytes have this exact content
37
+ * hash.
38
+ *
39
+ * This is the rule for a system that generates its own object keys, where
40
+ * the name is not something a test can usefully match on. The hash is the
41
+ * sha256 digest of the image bytes as lowercase hex, which
42
+ * `simRekognitionImageHash` produces from a fixture.
43
+ */
44
+ onHash(hash: string, result: TResult): void;
45
+ /**
46
+ * The result for one image.
47
+ */
48
+ resultFor(image: SimRekognitionImage): TResult;
49
+ private byNameOrDefault;
50
+ }
51
+ //# sourceMappingURL=sim-rekognition-result-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-result-rules.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/rule/sim-rekognition-result-rules.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,qBAAa,yBAAyB,CAAC,OAAO;IAC5C,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAE5D,YAAY,aAAa,EAAE,OAAO,EAEjC;IAED;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAE/B;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAQ1C;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAY1C;IAED;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAQ7C;IAED,OAAO,CAAC,eAAe;CAOxB"}
@@ -0,0 +1,80 @@
1
+ import { SimRekognitionDeclarationError } from "../error/sim-rekognition.error.js";
2
+ import { isSimRekognitionImageHash } from "../image/sim-rekognition-image-hash.js";
3
+ /**
4
+ * The results one detection operation answers with, by image.
5
+ *
6
+ * Simulated Rekognition does no image recognition. Every operation answers
7
+ * from the rules registered against it, in the way simulated ACM issues
8
+ * certificates without producing real TLS certificates.
9
+ *
10
+ * There are three kinds of rule and one order between them: a rule for an
11
+ * exact content hash wins, then a rule for an exact S3 object name, then the
12
+ * default. Matching is exact, with no pattern syntax, so which rule applies
13
+ * never depends on how specific a pattern is thought to be.
14
+ *
15
+ * An image passed as `Image.Bytes` has no name, so it consults hash rules and
16
+ * then the default.
17
+ */
18
+ export class SimRekognitionResultRules {
19
+ defaultResult;
20
+ resultsByName = new Map();
21
+ resultsByHash = new Map();
22
+ constructor(defaultResult) {
23
+ this.defaultResult = defaultResult;
24
+ }
25
+ /**
26
+ * Answer with this result for any image no other rule matches.
27
+ */
28
+ byDefault(result) {
29
+ this.defaultResult = result;
30
+ }
31
+ /**
32
+ * Answer with this result for an image read from an S3 object with this
33
+ * exact name.
34
+ *
35
+ * The name is the `Name` a request gives Rekognition, which is the object
36
+ * key. It is matched on its own rather than with the Bucket, so a rule for
37
+ * a key applies to that key in whichever Bucket the request names.
38
+ */
39
+ onName(name, result) {
40
+ if (name.length === 0) {
41
+ throw new SimRekognitionDeclarationError("A simulated Rekognition name rule needs an S3 object name to match");
42
+ }
43
+ this.resultsByName.set(name, result);
44
+ }
45
+ /**
46
+ * Answer with this result for an image whose bytes have this exact content
47
+ * hash.
48
+ *
49
+ * This is the rule for a system that generates its own object keys, where
50
+ * the name is not something a test can usefully match on. The hash is the
51
+ * sha256 digest of the image bytes as lowercase hex, which
52
+ * `simRekognitionImageHash` produces from a fixture.
53
+ */
54
+ onHash(hash, result) {
55
+ const digest = hash.toLowerCase();
56
+ if (!isSimRekognitionImageHash(digest)) {
57
+ throw new SimRekognitionDeclarationError(`'${hash}' is not a simulated Rekognition image hash. A hash rule ` +
58
+ `matches a sha256 digest of the image bytes, as 64 hex ` +
59
+ `characters, which simRekognitionImageHash produces.`);
60
+ }
61
+ this.resultsByHash.set(digest, result);
62
+ }
63
+ /**
64
+ * The result for one image.
65
+ */
66
+ resultFor(image) {
67
+ const byHash = this.resultsByHash.get(image.hash());
68
+ if (byHash !== undefined) {
69
+ return byHash;
70
+ }
71
+ return this.byNameOrDefault(image);
72
+ }
73
+ byNameOrDefault(image) {
74
+ if (image.name === undefined) {
75
+ return this.defaultResult;
76
+ }
77
+ return this.resultsByName.get(image.name) ?? this.defaultResult;
78
+ }
79
+ }
80
+ //# sourceMappingURL=sim-rekognition-result-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-result-rules.js","sourceRoot":"","sources":["../../../../src/service/rekognition/rule/sim-rekognition-result-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGnF;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,yBAAyB;IAC5B,aAAa,CAAU;IACd,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAE5D,YAAY,aAAsB;QAChC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,MAAe;QACvB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,8BAA8B,CACtC,oEAAoE,CACrE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY,EAAE,MAAe;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAElC,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,8BAA8B,CACtC,IAAI,IAAI,2DAA2D;gBACjE,wDAAwD;gBACxD,qDAAqD,CACxD,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,KAA0B;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAEpD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAEO,eAAe,CAAC,KAA0B;QAChD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,27 @@
1
+ import { SimRekognitionSampleImage } from "./sim-rekognition-sample-image.js";
2
+ /**
3
+ * The images that ship with simulated Rekognition.
4
+ *
5
+ * Each is a real 16 by 16 PNG or JPEG, so the format check reads the same
6
+ * magic bytes from a sample image as from any other image and there is no
7
+ * path around it. Three are PNG and two are JPEG, which is the pair of formats
8
+ * Rekognition accepts.
9
+ *
10
+ * They are 1,909 bytes in total, held here as base64. What they are pictures
11
+ * of decides nothing: no image is looked at, and each one answers from the
12
+ * rule registered against its hash. They are pictures of something anyway,
13
+ * because an image that reads as a photograph of a landscape is easier to
14
+ * follow in a test than a rectangle of one colour.
15
+ *
16
+ * The bytes are fixed. Re-encoding one would change its hash and leave the
17
+ * built-in rule matching nothing, so they are checked in as they are rather
18
+ * than generated at build time.
19
+ */
20
+ export declare const simRekognitionSampleImageFiles: {
21
+ passesModeration: SimRekognitionSampleImage;
22
+ flaggedByModeration: SimRekognitionSampleImage;
23
+ noFaces: SimRekognitionSampleImage;
24
+ oneFace: SimRekognitionSampleImage;
25
+ severalFaces: SimRekognitionSampleImage;
26
+ };
27
+ //# sourceMappingURL=sim-rekognition-sample-image-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-sample-image-files.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/sample/sim-rekognition-sample-image-files.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,8BAA8B;IACzC,gBAAgB;IAIhB,mBAAmB;IAkBnB,OAAO;IAIP,OAAO;IAkBP,YAAY;CAKb,CAAC"}
@@ -0,0 +1,62 @@
1
+ /* eslint-disable no-secrets/no-secrets -- base64 image files, not secrets. */
2
+ import { SimRekognitionSampleImage } from "./sim-rekognition-sample-image.js";
3
+ /**
4
+ * The images that ship with simulated Rekognition.
5
+ *
6
+ * Each is a real 16 by 16 PNG or JPEG, so the format check reads the same
7
+ * magic bytes from a sample image as from any other image and there is no
8
+ * path around it. Three are PNG and two are JPEG, which is the pair of formats
9
+ * Rekognition accepts.
10
+ *
11
+ * They are 1,909 bytes in total, held here as base64. What they are pictures
12
+ * of decides nothing: no image is looked at, and each one answers from the
13
+ * rule registered against its hash. They are pictures of something anyway,
14
+ * because an image that reads as a photograph of a landscape is easier to
15
+ * follow in a test than a rectangle of one colour.
16
+ *
17
+ * The bytes are fixed. Re-encoding one would change its hash and leave the
18
+ * built-in rule matching nothing, so they are checked in as they are rather
19
+ * than generated at build time.
20
+ */
21
+ export const simRekognitionSampleImageFiles = {
22
+ passesModeration: new SimRekognitionSampleImage("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHklEQVR42mMwTp" +
23
+ "tJEmKgo4ZPz07iQaMaho+GQZP4ABIcwWyZg5lwAAAAAElFTkSuQmCC"),
24
+ flaggedByModeration: new SimRekognitionSampleImage("/9j/4AAQSkZJRgABAQAASABIAAD/wAARCAAQABADASIAAhEBAxEB/8QAHwAAAQ" +
25
+ "UBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9" +
26
+ "AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJi" +
27
+ "coKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG" +
28
+ "h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19" +
29
+ "jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAEC" +
30
+ "AwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcR" +
31
+ "MiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZH" +
32
+ "SElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoq" +
33
+ "OkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP0" +
34
+ "9fb3+Pn6/9sAQwAEBAQEBAQGBAQGCQYGBgkMCQkJCQwPDAwMDAwPEg8PDw8PDx" +
35
+ "ISEhISEhISFRUVFRUVGRkZGRkcHBwcHBwcHBwc/9sAQwEEBQUHBwcMBwcMHRQQ" +
36
+ "FB0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR" +
37
+ "0dHR0d/90ABAAB/9oADAMBAAIRAxEAPwDwL7//AE08z95+848zH/LWX+7Ev8K9" +
38
+ "6Pv/APTTzP3n7zjzMf8ALWX+7Ev8K96Pv/8ATTzP3n7zjzMf8tZf7sS/wr3o+/" +
39
+ "8A9NPM/efvOPMx/wAtZf7sS/wr3rxv6/r+vutp+l7/ANf8P387363/AHn/2Q=="),
40
+ noFaces: new SimRekognitionSampleImage("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAG0lEQVR42mNo3/" +
41
+ "uCJMQwqmGIavDvsicJjUgNAOxJxJC8NL++AAAAAElFTkSuQmCC"),
42
+ oneFace: new SimRekognitionSampleImage("/9j/4AAQSkZJRgABAQAASABIAAD/wAARCAAQABADASIAAhEBAxEB/8QAHwAAAQ" +
43
+ "UBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9" +
44
+ "AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJi" +
45
+ "coKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG" +
46
+ "h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19" +
47
+ "jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAEC" +
48
+ "AwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcR" +
49
+ "MiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZH" +
50
+ "SElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoq" +
51
+ "OkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP0" +
52
+ "9fb3+Pn6/9sAQwAEBAQEBAQGBAQGCQYGBgkMCQkJCQwPDAwMDAwPEg8PDw8PDx" +
53
+ "ISEhISEhISFRUVFRUVGRkZGRkcHBwcHBwcHBwc/9sAQwEEBQUHBwcMBwcMHRQQ" +
54
+ "FB0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR" +
55
+ "0dHR0d/90ABAAB/9oADAMBAAIRAxEAPwD2ZF3sF6ZoddjFeuK8bHivXwci6x/w" +
56
+ "BP8A4mg+K9fJybrP/AE/+Jrp/wBZaPtub3uS21lvfe9+x8jy0/YcvL799/K21v" +
57
+ "U//9k="),
58
+ severalFaces: new SimRekognitionSampleImage("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAMElEQVR42mNo3/" +
59
+ "uCJMQwJDQ82DAJgnBqQFNBqQY0LjU04PcS4VBC1+DfZU8SGpEaAJaDwyjublVb" +
60
+ "AAAAAElFTkSuQmCC"),
61
+ };
62
+ //# sourceMappingURL=sim-rekognition-sample-image-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-sample-image-files.js","sourceRoot":"","sources":["../../../../src/service/rekognition/sample/sim-rekognition-sample-image-files.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,gBAAgB,EAAE,IAAI,yBAAyB,CAC7C,gEAAgE;QAC9D,wDAAwD,CAC3D;IACD,mBAAmB,EAAE,IAAI,yBAAyB,CAChD,gEAAgE;QAC9D,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE,CACnE;IACD,OAAO,EAAE,IAAI,yBAAyB,CACpC,gEAAgE;QAC9D,oDAAoD,CACvD;IACD,OAAO,EAAE,IAAI,yBAAyB,CACpC,gEAAgE;QAC9D,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,gEAAgE;QAChE,QAAQ,CACX;IACD,YAAY,EAAE,IAAI,yBAAyB,CACzC,gEAAgE;QAC9D,gEAAgE;QAChE,kBAAkB,CACrB;CACF,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * One image that ships with simulated Rekognition.
3
+ *
4
+ * The bytes are held as base64 in the source rather than as a file beside it,
5
+ * so a sample image is the same bytes in the published package as in this
6
+ * repository, and reading one needs no filesystem.
7
+ *
8
+ * The hash is taken once, when the image is made, because it is what the
9
+ * built-in rules are registered against.
10
+ */
11
+ export declare class SimRekognitionSampleImage {
12
+ /**
13
+ * The content hash of this image, which is the hash a rule matches it by.
14
+ */
15
+ readonly hash: string;
16
+ private readonly image;
17
+ constructor(base64: string);
18
+ /**
19
+ * The bytes of this image.
20
+ *
21
+ * A copy, so a caller that writes into what it uploaded cannot change what
22
+ * the next caller gets and leave the built-in rule matching nothing.
23
+ */
24
+ bytes(): Uint8Array;
25
+ }
26
+ //# sourceMappingURL=sim-rekognition-sample-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-sample-image.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/sample/sim-rekognition-sample-image.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,qBAAa,yBAAyB;IACpC;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IAEnC,YAAY,MAAM,EAAE,MAAM,EAGzB;IAED;;;;;OAKG;IACH,KAAK,IAAI,UAAU,CAElB;CACF"}
@@ -0,0 +1,32 @@
1
+ import { simRekognitionImageHash } from "../image/sim-rekognition-image-hash.js";
2
+ /**
3
+ * One image that ships with simulated Rekognition.
4
+ *
5
+ * The bytes are held as base64 in the source rather than as a file beside it,
6
+ * so a sample image is the same bytes in the published package as in this
7
+ * repository, and reading one needs no filesystem.
8
+ *
9
+ * The hash is taken once, when the image is made, because it is what the
10
+ * built-in rules are registered against.
11
+ */
12
+ export class SimRekognitionSampleImage {
13
+ /**
14
+ * The content hash of this image, which is the hash a rule matches it by.
15
+ */
16
+ hash;
17
+ image;
18
+ constructor(base64) {
19
+ this.image = Uint8Array.from(Buffer.from(base64, "base64"));
20
+ this.hash = simRekognitionImageHash(this.image);
21
+ }
22
+ /**
23
+ * The bytes of this image.
24
+ *
25
+ * A copy, so a caller that writes into what it uploaded cannot change what
26
+ * the next caller gets and leave the built-in rule matching nothing.
27
+ */
28
+ bytes() {
29
+ return Uint8Array.from(this.image);
30
+ }
31
+ }
32
+ //# sourceMappingURL=sim-rekognition-sample-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-sample-image.js","sourceRoot":"","sources":["../../../../src/service/rekognition/sample/sim-rekognition-sample-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAAyB;IACpC;;OAEG;IACa,IAAI,CAAS;IAEZ,KAAK,CAAa;IAEnC,YAAY,MAAc;QACxB,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACH,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The images simulated Rekognition ships with, each already declared as a
3
+ * rule.
4
+ *
5
+ * They are for the case the hash rules exist for: a system that generates its
6
+ * own object keys, where the name a detection sees is not something a test can
7
+ * match on. A test uploads one of these through its own code and gets a known
8
+ * answer without configuring anything.
9
+ *
10
+ * ```typescript
11
+ * await simAws.s3().putObject(
12
+ * new PutObjectCommand({
13
+ * Bucket: "uploads",
14
+ * Key: randomUUID(),
15
+ * Body: simRekognitionSampleImages.flaggedByModeration(),
16
+ * }),
17
+ * );
18
+ * ```
19
+ *
20
+ * Each image is declared for the one operation it is named for. The
21
+ * moderation images say nothing about faces, and the face images say nothing
22
+ * about moderation, so those detections answer from their own rules as they
23
+ * would for any other image.
24
+ */
25
+ export declare class SimRekognitionSampleImages {
26
+ /**
27
+ * A PNG that content moderation finds nothing in.
28
+ */
29
+ passesModeration(): Uint8Array;
30
+ /**
31
+ * A JPEG that content moderation flags, as `Weapon Violence` and the two
32
+ * labels above it in the taxonomy.
33
+ */
34
+ flaggedByModeration(): Uint8Array;
35
+ /**
36
+ * A PNG with nobody in it.
37
+ */
38
+ noFaces(): Uint8Array;
39
+ /**
40
+ * A JPEG with one face in it, reported as the built-in default face.
41
+ */
42
+ oneFace(): Uint8Array;
43
+ /**
44
+ * A PNG with three faces in it.
45
+ */
46
+ severalFaces(): Uint8Array;
47
+ }
48
+ /**
49
+ * The sample images simulated Rekognition ships with.
50
+ */
51
+ export declare const simRekognitionSampleImages: SimRekognitionSampleImages;
52
+ //# sourceMappingURL=sim-rekognition-sample-images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-rekognition-sample-images.d.ts","sourceRoot":"","sources":["../../../../src/service/rekognition/sample/sim-rekognition-sample-images.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,0BAA0B;IACrC;;OAEG;IACH,gBAAgB,IAAI,UAAU,CAE7B;IAED;;;OAGG;IACH,mBAAmB,IAAI,UAAU,CAEhC;IAED;;OAEG;IACH,OAAO,IAAI,UAAU,CAEpB;IAED;;OAEG;IACH,OAAO,IAAI,UAAU,CAEpB;IAED;;OAEG;IACH,YAAY,IAAI,UAAU,CAEzB;CACF;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}