@mavogel/awscdk-rootmail 0.0.310 → 0.0.312

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 (236) hide show
  1. package/.jsii +3 -3
  2. package/lib/rootmail.js +1 -1
  3. package/lib/ses-receive.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/endpoint/EndpointParameters.d.ts +7 -7
  5. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.browser.d.ts +2 -2
  6. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.native.d.ts +2 -2
  7. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +7 -7
  8. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  9. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  10. package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +12 -12
  11. package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +3 -0
  12. package/node_modules/@aws-sdk/client-route-53/dist-es/models/models_0.js +3 -0
  13. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/AssociateVPCWithHostedZoneCommand.d.ts +1 -1
  14. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/ChangeResourceRecordSetsCommand.d.ts +1 -1
  15. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/CreateHealthCheckCommand.d.ts +2 -2
  16. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/CreateHostedZoneCommand.d.ts +2 -2
  17. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/CreateVPCAssociationAuthorizationCommand.d.ts +2 -2
  18. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/DeleteVPCAssociationAuthorizationCommand.d.ts +1 -1
  19. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/DisassociateVPCFromHostedZoneCommand.d.ts +1 -1
  20. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/GetHealthCheckCommand.d.ts +1 -1
  21. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/GetHostedZoneCommand.d.ts +1 -1
  22. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/ListHealthChecksCommand.d.ts +1 -1
  23. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/ListHostedZonesByVPCCommand.d.ts +1 -1
  24. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/ListResourceRecordSetsCommand.d.ts +1 -1
  25. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/ListVPCAssociationAuthorizationsCommand.d.ts +1 -1
  26. package/node_modules/@aws-sdk/client-route-53/dist-types/commands/UpdateHealthCheckCommand.d.ts +2 -2
  27. package/node_modules/@aws-sdk/client-route-53/dist-types/endpoint/EndpointParameters.d.ts +7 -7
  28. package/node_modules/@aws-sdk/client-route-53/dist-types/models/models_0.d.ts +3 -0
  29. package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.browser.d.ts +2 -2
  30. package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.native.d.ts +2 -2
  31. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +7 -7
  32. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/models/models_0.d.ts +3 -0
  33. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  34. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  35. package/node_modules/@aws-sdk/client-route-53/package.json +12 -12
  36. package/node_modules/@aws-sdk/client-s3/dist-cjs/auth/httpAuthSchemeProvider.js +1 -1
  37. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +1 -1
  38. package/node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js +2 -2
  39. package/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +1 -1
  40. package/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +2 -2
  41. package/node_modules/@aws-sdk/client-s3/dist-types/endpoint/EndpointParameters.d.ts +26 -26
  42. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +9 -9
  43. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +7 -7
  44. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +9 -9
  45. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.shared.d.ts +2 -2
  46. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +1 -1
  47. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -26
  48. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +22 -10
  49. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +16 -8
  50. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +22 -10
  51. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.shared.d.ts +6 -3
  52. package/node_modules/@aws-sdk/client-s3/package.json +17 -17
  53. package/node_modules/@aws-sdk/client-ses/dist-types/endpoint/EndpointParameters.d.ts +7 -7
  54. package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.browser.d.ts +2 -2
  55. package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.native.d.ts +2 -2
  56. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +7 -7
  57. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  58. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  59. package/node_modules/@aws-sdk/client-ses/package.json +12 -12
  60. package/node_modules/@aws-sdk/client-ssm/dist-types/endpoint/EndpointParameters.d.ts +7 -7
  61. package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.browser.d.ts +2 -2
  62. package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.native.d.ts +2 -2
  63. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +7 -7
  64. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  65. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  66. package/node_modules/@aws-sdk/client-ssm/package.json +12 -12
  67. package/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts +7 -7
  68. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -2
  69. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -2
  70. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +7 -7
  71. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  72. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  73. package/node_modules/@aws-sdk/client-sso/package.json +11 -11
  74. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1496 -14
  75. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
  76. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +13 -0
  77. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +14 -0
  78. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +14 -0
  79. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +84 -0
  80. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +118 -0
  81. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +20 -0
  82. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +105 -0
  83. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +106 -0
  84. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +46 -0
  85. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +18 -0
  86. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +17 -0
  87. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +147 -0
  88. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js +1 -0
  89. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +152 -0
  90. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +126 -0
  91. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +20 -0
  92. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +154 -0
  93. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +279 -0
  94. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/simpleFormatXml.js +27 -0
  95. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  96. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/common.d.ts +2 -2
  97. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +13 -0
  98. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +12 -0
  99. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +12 -0
  100. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +18 -0
  101. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +19 -0
  102. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +19 -0
  103. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -0
  104. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +15 -0
  105. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +21 -0
  106. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +15 -0
  107. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +3 -3
  108. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +20 -0
  109. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsQueryProtocol.d.ts +39 -0
  110. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +6 -0
  111. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -0
  112. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +21 -0
  113. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +14 -0
  114. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlShapeDeserializer.d.ts +20 -0
  115. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -0
  116. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/simpleFormatXml.d.ts +6 -0
  117. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +5 -0
  118. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -2
  119. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +13 -0
  120. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +6 -0
  121. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +6 -0
  122. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +33 -0
  123. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +34 -0
  124. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +16 -0
  125. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -0
  126. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +15 -0
  127. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +7 -0
  128. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +7 -0
  129. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +3 -3
  130. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +14 -0
  131. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +55 -0
  132. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +6 -0
  133. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -0
  134. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +39 -0
  135. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +17 -0
  136. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +15 -0
  137. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -0
  138. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +1 -0
  139. package/node_modules/@aws-sdk/core/package.json +7 -3
  140. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  141. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  142. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  143. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  144. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  145. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  146. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  147. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-cjs/index.js +7 -36
  148. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-es/NodeUseArnRegionConfigOptions.js +1 -1
  149. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-es/bucketHostname.js +1 -19
  150. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-es/bucketHostnameUtils.js +2 -23
  151. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-es/configurations.js +1 -1
  152. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/NodeUseArnRegionConfigOptions.d.ts +2 -2
  153. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/bucketEndpointMiddleware.d.ts +12 -0
  154. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/bucketHostname.d.ts +8 -0
  155. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/bucketHostnameUtils.d.ts +59 -3
  156. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/configurations.d.ts +13 -1
  157. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/ts3.4/NodeUseArnRegionConfigOptions.d.ts +3 -1
  158. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-types/ts3.4/configurations.d.ts +1 -1
  159. package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +1 -1
  160. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
  161. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +4 -4
  162. package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
  163. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +7 -7
  164. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -2
  165. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -2
  166. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/EndpointParameters.d.ts +9 -9
  167. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +3 -3
  168. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -1
  169. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +3 -3
  170. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +7 -7
  171. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +4 -2
  172. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +4 -2
  173. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/EndpointParameters.d.ts +9 -9
  174. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +8 -3
  175. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +4 -1
  176. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +8 -3
  177. package/node_modules/@aws-sdk/nested-clients/package.json +11 -11
  178. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +8 -0
  179. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +9 -0
  180. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/SignatureV4MultiRegion.d.ts +1 -0
  181. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/ts3.4/SignatureV4MultiRegion.d.ts +1 -0
  182. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
  183. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  184. package/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +3 -0
  185. package/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json +3 -0
  186. package/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +3 -0
  187. package/node_modules/@aws-sdk/util-endpoints/package.json +1 -1
  188. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  189. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +9 -8
  190. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +4 -1
  191. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -6
  192. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +9 -2
  193. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +1 -1
  194. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +3 -0
  195. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +4 -0
  196. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +4 -0
  197. package/node_modules/@smithy/core/package.json +1 -1
  198. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  199. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  200. package/node_modules/@smithy/smithy-client/package.json +3 -3
  201. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  202. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  203. package/node_modules/axios/CHANGELOG.md +24 -0
  204. package/node_modules/axios/README.md +20 -17
  205. package/node_modules/axios/dist/axios.js +6 -3
  206. package/node_modules/axios/dist/axios.js.map +1 -1
  207. package/node_modules/axios/dist/axios.min.js +2 -2
  208. package/node_modules/axios/dist/axios.min.js.map +1 -1
  209. package/node_modules/axios/dist/browser/axios.cjs +7 -3
  210. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  211. package/node_modules/axios/dist/esm/axios.js +7 -3
  212. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  213. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  214. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  215. package/node_modules/axios/dist/node/axios.cjs +7 -3
  216. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  217. package/node_modules/axios/index.d.cts +1 -1
  218. package/node_modules/axios/index.d.ts +1 -1
  219. package/node_modules/axios/lib/adapters/fetch.js +1 -1
  220. package/node_modules/axios/lib/env/data.js +1 -1
  221. package/node_modules/axios/lib/helpers/toFormData.js +4 -0
  222. package/node_modules/axios/package.json +10 -1
  223. package/node_modules/cdk-nag/.jsii +3 -3
  224. package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +5 -5
  225. package/node_modules/cdk-nag/lib/nag-logger.js +2 -2
  226. package/node_modules/cdk-nag/lib/nag-pack.js +1 -1
  227. package/node_modules/cdk-nag/lib/nag-rules.js +1 -1
  228. package/node_modules/cdk-nag/lib/nag-suppressions.js +1 -1
  229. package/node_modules/cdk-nag/lib/packs/aws-solutions.js +1 -1
  230. package/node_modules/cdk-nag/lib/packs/hipaa-security.js +1 -1
  231. package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +1 -1
  232. package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +1 -1
  233. package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +1 -1
  234. package/node_modules/cdk-nag/lib/packs/serverless.js +1 -1
  235. package/node_modules/cdk-nag/package.json +2 -2
  236. package/package.json +1 -1
@@ -0,0 +1,147 @@
1
+ import { collectBody, RpcProtocol } from "@smithy/core/protocols";
2
+ import { deref, NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema";
3
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
4
+ import { XmlShapeDeserializer } from "../xml/XmlShapeDeserializer";
5
+ import { QueryShapeSerializer } from "./QueryShapeSerializer";
6
+ export class AwsQueryProtocol extends RpcProtocol {
7
+ options;
8
+ serializer;
9
+ deserializer;
10
+ constructor(options) {
11
+ super({
12
+ defaultNamespace: options.defaultNamespace,
13
+ });
14
+ this.options = options;
15
+ const settings = {
16
+ timestampFormat: {
17
+ useTrait: true,
18
+ default: SCHEMA.TIMESTAMP_DATE_TIME,
19
+ },
20
+ httpBindings: false,
21
+ xmlNamespace: options.xmlNamespace,
22
+ serviceNamespace: options.defaultNamespace,
23
+ serializeEmptyLists: true,
24
+ };
25
+ this.serializer = new QueryShapeSerializer(settings);
26
+ this.deserializer = new XmlShapeDeserializer(settings);
27
+ }
28
+ getShapeId() {
29
+ return "aws.protocols#awsQuery";
30
+ }
31
+ setSerdeContext(serdeContext) {
32
+ this.serializer.setSerdeContext(serdeContext);
33
+ this.deserializer.setSerdeContext(serdeContext);
34
+ }
35
+ getPayloadCodec() {
36
+ throw new Error("AWSQuery protocol has no payload codec.");
37
+ }
38
+ async serializeRequest(operationSchema, input, context) {
39
+ const request = await super.serializeRequest(operationSchema, input, context);
40
+ if (!request.path.endsWith("/")) {
41
+ request.path += "/";
42
+ }
43
+ Object.assign(request.headers, {
44
+ "content-type": `application/x-www-form-urlencoded`,
45
+ });
46
+ if (deref(operationSchema.input) === "unit" || !request.body) {
47
+ request.body = "";
48
+ }
49
+ request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body;
50
+ if (request.body.endsWith("&")) {
51
+ request.body = request.body.slice(-1);
52
+ }
53
+ try {
54
+ request.headers["content-length"] = String(calculateBodyLength(request.body));
55
+ }
56
+ catch (e) { }
57
+ return request;
58
+ }
59
+ async deserializeResponse(operationSchema, context, response) {
60
+ const deserializer = this.deserializer;
61
+ const ns = NormalizedSchema.of(operationSchema.output);
62
+ const dataObject = {};
63
+ if (response.statusCode >= 300) {
64
+ const bytes = await collectBody(response.body, context);
65
+ if (bytes.byteLength > 0) {
66
+ Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes));
67
+ }
68
+ await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
69
+ }
70
+ for (const header in response.headers) {
71
+ const value = response.headers[header];
72
+ delete response.headers[header];
73
+ response.headers[header.toLowerCase()] = value;
74
+ }
75
+ const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : undefined;
76
+ const bytes = await collectBody(response.body, context);
77
+ if (bytes.byteLength > 0) {
78
+ Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
79
+ }
80
+ const output = {
81
+ $metadata: this.deserializeMetadata(response),
82
+ ...dataObject,
83
+ };
84
+ return output;
85
+ }
86
+ useNestedResult() {
87
+ return true;
88
+ }
89
+ async handleError(operationSchema, context, response, dataObject, metadata) {
90
+ const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
91
+ let namespace = this.options.defaultNamespace;
92
+ let errorName = errorIdentifier;
93
+ if (errorIdentifier.includes("#")) {
94
+ [namespace, errorName] = errorIdentifier.split("#");
95
+ }
96
+ const errorDataSource = this.loadQueryError(dataObject);
97
+ const registry = TypeRegistry.for(namespace);
98
+ let errorSchema;
99
+ try {
100
+ errorSchema = registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
101
+ if (!errorSchema) {
102
+ errorSchema = registry.getSchema(errorIdentifier);
103
+ }
104
+ }
105
+ catch (e) {
106
+ const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException();
107
+ if (baseExceptionSchema) {
108
+ const ErrorCtor = baseExceptionSchema.ctor;
109
+ throw Object.assign(new ErrorCtor(errorName), errorDataSource);
110
+ }
111
+ throw new Error(errorName);
112
+ }
113
+ const ns = NormalizedSchema.of(errorSchema);
114
+ const message = this.loadQueryErrorMessage(dataObject);
115
+ const exception = new errorSchema.ctor(message);
116
+ const output = {};
117
+ for (const [name, member] of ns.structIterator()) {
118
+ const target = member.getMergedTraits().xmlName ?? name;
119
+ const value = errorDataSource[target] ?? dataObject[target];
120
+ output[name] = this.deserializer.readSchema(member, value);
121
+ }
122
+ Object.assign(exception, {
123
+ $metadata: metadata,
124
+ $response: response,
125
+ $fault: ns.getMergedTraits().error,
126
+ message,
127
+ ...output,
128
+ });
129
+ throw exception;
130
+ }
131
+ loadQueryErrorCode(output, data) {
132
+ const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
133
+ if (code !== undefined) {
134
+ return code;
135
+ }
136
+ if (output.statusCode == 404) {
137
+ return "NotFound";
138
+ }
139
+ }
140
+ loadQueryError(data) {
141
+ return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
142
+ }
143
+ loadQueryErrorMessage(data) {
144
+ const errorData = this.loadQueryError(data);
145
+ return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
146
+ }
147
+ }
@@ -0,0 +1,152 @@
1
+ import { determineTimestampFormat, extendedEncodeURIComponent } from "@smithy/core/protocols";
2
+ import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
3
+ import { NumericValue } from "@smithy/core/serde";
4
+ import { dateToUtcString } from "@smithy/smithy-client";
5
+ import { toBase64 } from "@smithy/util-base64";
6
+ import { SerdeContextConfig } from "../ConfigurableSerdeContext";
7
+ export class QueryShapeSerializer extends SerdeContextConfig {
8
+ settings;
9
+ buffer;
10
+ constructor(settings) {
11
+ super();
12
+ this.settings = settings;
13
+ }
14
+ write(schema, value, prefix = "") {
15
+ if (this.buffer === undefined) {
16
+ this.buffer = "";
17
+ }
18
+ const ns = NormalizedSchema.of(schema);
19
+ if (prefix && !prefix.endsWith(".")) {
20
+ prefix += ".";
21
+ }
22
+ if (ns.isBlobSchema()) {
23
+ if (typeof value === "string" || value instanceof Uint8Array) {
24
+ this.writeKey(prefix);
25
+ this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));
26
+ }
27
+ }
28
+ else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
29
+ if (value != null) {
30
+ this.writeKey(prefix);
31
+ this.writeValue(String(value));
32
+ }
33
+ }
34
+ else if (ns.isBigIntegerSchema()) {
35
+ if (value != null) {
36
+ this.writeKey(prefix);
37
+ this.writeValue(String(value));
38
+ }
39
+ }
40
+ else if (ns.isBigDecimalSchema()) {
41
+ if (value != null) {
42
+ this.writeKey(prefix);
43
+ this.writeValue(value instanceof NumericValue ? value.string : String(value));
44
+ }
45
+ }
46
+ else if (ns.isTimestampSchema()) {
47
+ if (value instanceof Date) {
48
+ this.writeKey(prefix);
49
+ const format = determineTimestampFormat(ns, this.settings);
50
+ switch (format) {
51
+ case SCHEMA.TIMESTAMP_DATE_TIME:
52
+ this.writeValue(value.toISOString().replace(".000Z", "Z"));
53
+ break;
54
+ case SCHEMA.TIMESTAMP_HTTP_DATE:
55
+ this.writeValue(dateToUtcString(value));
56
+ break;
57
+ case SCHEMA.TIMESTAMP_EPOCH_SECONDS:
58
+ this.writeValue(String(value.getTime() / 1000));
59
+ break;
60
+ }
61
+ }
62
+ }
63
+ else if (ns.isDocumentSchema()) {
64
+ throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`);
65
+ }
66
+ else if (ns.isListSchema()) {
67
+ if (Array.isArray(value)) {
68
+ if (value.length === 0) {
69
+ if (this.settings.serializeEmptyLists) {
70
+ this.writeKey(prefix);
71
+ this.writeValue("");
72
+ }
73
+ }
74
+ else {
75
+ const member = ns.getValueSchema();
76
+ const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
77
+ let i = 1;
78
+ for (const item of value) {
79
+ if (item == null) {
80
+ continue;
81
+ }
82
+ const suffix = this.getKey("member", member.getMergedTraits().xmlName);
83
+ const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;
84
+ this.write(member, item, key);
85
+ ++i;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ else if (ns.isMapSchema()) {
91
+ if (value && typeof value === "object") {
92
+ const keySchema = ns.getKeySchema();
93
+ const memberSchema = ns.getValueSchema();
94
+ const flat = ns.getMergedTraits().xmlFlattened;
95
+ let i = 1;
96
+ for (const [k, v] of Object.entries(value)) {
97
+ if (v == null) {
98
+ continue;
99
+ }
100
+ const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName);
101
+ const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;
102
+ const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName);
103
+ const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;
104
+ this.write(keySchema, k, key);
105
+ this.write(memberSchema, v, valueKey);
106
+ ++i;
107
+ }
108
+ }
109
+ }
110
+ else if (ns.isStructSchema()) {
111
+ if (value && typeof value === "object") {
112
+ for (const [memberName, member] of ns.structIterator()) {
113
+ if (value[memberName] == null) {
114
+ continue;
115
+ }
116
+ const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
117
+ const key = `${prefix}${suffix}`;
118
+ this.write(member, value[memberName], key);
119
+ }
120
+ }
121
+ }
122
+ else if (ns.isUnitSchema()) {
123
+ }
124
+ else {
125
+ throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
126
+ }
127
+ }
128
+ flush() {
129
+ if (this.buffer === undefined) {
130
+ throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
131
+ }
132
+ const str = this.buffer;
133
+ delete this.buffer;
134
+ return str;
135
+ }
136
+ getKey(memberName, xmlName) {
137
+ const key = xmlName ?? memberName;
138
+ if (this.settings.capitalizeKeys) {
139
+ return key[0].toUpperCase() + key.slice(1);
140
+ }
141
+ return key;
142
+ }
143
+ writeKey(key) {
144
+ if (key.endsWith(".")) {
145
+ key = key.slice(0, key.length - 1);
146
+ }
147
+ this.buffer += `&${extendedEncodeURIComponent(key)}=`;
148
+ }
149
+ writeValue(value) {
150
+ this.buffer += extendedEncodeURIComponent(value);
151
+ }
152
+ }
@@ -0,0 +1,126 @@
1
+ import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from "@smithy/core/protocols";
2
+ import { NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema";
3
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
4
+ import { loadRestXmlErrorCode } from "./parseXmlBody";
5
+ import { XmlCodec } from "./XmlCodec";
6
+ export class AwsRestXmlProtocol extends HttpBindingProtocol {
7
+ codec;
8
+ serializer;
9
+ deserializer;
10
+ constructor(options) {
11
+ super(options);
12
+ const settings = {
13
+ timestampFormat: {
14
+ useTrait: true,
15
+ default: SCHEMA.TIMESTAMP_DATE_TIME,
16
+ },
17
+ httpBindings: true,
18
+ xmlNamespace: options.xmlNamespace,
19
+ serviceNamespace: options.defaultNamespace,
20
+ };
21
+ this.codec = new XmlCodec(settings);
22
+ this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
23
+ this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
24
+ }
25
+ getPayloadCodec() {
26
+ return this.codec;
27
+ }
28
+ getShapeId() {
29
+ return "aws.protocols#restXml";
30
+ }
31
+ async serializeRequest(operationSchema, input, context) {
32
+ const request = await super.serializeRequest(operationSchema, input, context);
33
+ const ns = NormalizedSchema.of(operationSchema.input);
34
+ const members = ns.getMemberSchemas();
35
+ request.path =
36
+ String(request.path)
37
+ .split("/")
38
+ .filter((segment) => {
39
+ return segment !== "{Bucket}";
40
+ })
41
+ .join("/") || "/";
42
+ if (!request.headers["content-type"]) {
43
+ const httpPayloadMember = Object.values(members).find((m) => {
44
+ return !!m.getMergedTraits().httpPayload;
45
+ });
46
+ if (httpPayloadMember) {
47
+ const mediaType = httpPayloadMember.getMergedTraits().mediaType;
48
+ if (mediaType) {
49
+ request.headers["content-type"] = mediaType;
50
+ }
51
+ else if (httpPayloadMember.isStringSchema()) {
52
+ request.headers["content-type"] = "text/plain";
53
+ }
54
+ else if (httpPayloadMember.isBlobSchema()) {
55
+ request.headers["content-type"] = "application/octet-stream";
56
+ }
57
+ else {
58
+ request.headers["content-type"] = "application/xml";
59
+ }
60
+ }
61
+ else if (!ns.isUnitSchema()) {
62
+ const hasBody = Object.values(members).find((m) => {
63
+ const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
64
+ return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
65
+ });
66
+ if (hasBody) {
67
+ request.headers["content-type"] = "application/xml";
68
+ }
69
+ }
70
+ }
71
+ if (request.headers["content-type"] === "application/xml") {
72
+ if (typeof request.body === "string") {
73
+ request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
74
+ }
75
+ }
76
+ if (request.body) {
77
+ try {
78
+ request.headers["content-length"] = String(calculateBodyLength(request.body));
79
+ }
80
+ catch (e) { }
81
+ }
82
+ return request;
83
+ }
84
+ async deserializeResponse(operationSchema, context, response) {
85
+ return super.deserializeResponse(operationSchema, context, response);
86
+ }
87
+ async handleError(operationSchema, context, response, dataObject, metadata) {
88
+ const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
89
+ let namespace = this.options.defaultNamespace;
90
+ let errorName = errorIdentifier;
91
+ if (errorIdentifier.includes("#")) {
92
+ [namespace, errorName] = errorIdentifier.split("#");
93
+ }
94
+ const registry = TypeRegistry.for(namespace);
95
+ let errorSchema;
96
+ try {
97
+ errorSchema = registry.getSchema(errorIdentifier);
98
+ }
99
+ catch (e) {
100
+ const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException();
101
+ if (baseExceptionSchema) {
102
+ const ErrorCtor = baseExceptionSchema.ctor;
103
+ throw Object.assign(new ErrorCtor(errorName), dataObject);
104
+ }
105
+ throw new Error(errorName);
106
+ }
107
+ const ns = NormalizedSchema.of(errorSchema);
108
+ const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
109
+ const exception = new errorSchema.ctor(message);
110
+ await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
111
+ const output = {};
112
+ for (const [name, member] of ns.structIterator()) {
113
+ const target = member.getMergedTraits().xmlName ?? name;
114
+ const value = dataObject.Error?.[target] ?? dataObject[target];
115
+ output[name] = this.codec.createDeserializer().readSchema(member, value);
116
+ }
117
+ Object.assign(exception, {
118
+ $metadata: metadata,
119
+ $response: response,
120
+ $fault: ns.getMergedTraits().error,
121
+ message,
122
+ ...output,
123
+ });
124
+ throw exception;
125
+ }
126
+ }
@@ -0,0 +1,20 @@
1
+ import { SerdeContextConfig } from "../ConfigurableSerdeContext";
2
+ import { XmlShapeDeserializer } from "./XmlShapeDeserializer";
3
+ import { XmlShapeSerializer } from "./XmlShapeSerializer";
4
+ export class XmlCodec extends SerdeContextConfig {
5
+ settings;
6
+ constructor(settings) {
7
+ super();
8
+ this.settings = settings;
9
+ }
10
+ createSerializer() {
11
+ const serializer = new XmlShapeSerializer(this.settings);
12
+ serializer.setSerdeContext(this.serdeContext);
13
+ return serializer;
14
+ }
15
+ createDeserializer() {
16
+ const deserializer = new XmlShapeDeserializer(this.settings);
17
+ deserializer.setSerdeContext(this.serdeContext);
18
+ return deserializer;
19
+ }
20
+ }
@@ -0,0 +1,154 @@
1
+ import { FromStringShapeDeserializer } from "@smithy/core/protocols";
2
+ import { NormalizedSchema } from "@smithy/core/schema";
3
+ import { getValueFromTextNode } from "@smithy/smithy-client";
4
+ import { toUtf8 } from "@smithy/util-utf8";
5
+ import { XMLParser } from "fast-xml-parser";
6
+ import { SerdeContextConfig } from "../ConfigurableSerdeContext";
7
+ export class XmlShapeDeserializer extends SerdeContextConfig {
8
+ settings;
9
+ stringDeserializer;
10
+ constructor(settings) {
11
+ super();
12
+ this.settings = settings;
13
+ this.stringDeserializer = new FromStringShapeDeserializer(settings);
14
+ }
15
+ setSerdeContext(serdeContext) {
16
+ this.serdeContext = serdeContext;
17
+ this.stringDeserializer.setSerdeContext(serdeContext);
18
+ }
19
+ read(schema, bytes, key) {
20
+ const ns = NormalizedSchema.of(schema);
21
+ const memberSchemas = ns.getMemberSchemas();
22
+ const isEventPayload = ns.isStructSchema() &&
23
+ ns.isMemberSchema() &&
24
+ !!Object.values(memberSchemas).find((memberNs) => {
25
+ return !!memberNs.getMemberTraits().eventPayload;
26
+ });
27
+ if (isEventPayload) {
28
+ const output = {};
29
+ const memberName = Object.keys(memberSchemas)[0];
30
+ const eventMemberSchema = memberSchemas[memberName];
31
+ if (eventMemberSchema.isBlobSchema()) {
32
+ output[memberName] = bytes;
33
+ }
34
+ else {
35
+ output[memberName] = this.read(memberSchemas[memberName], bytes);
36
+ }
37
+ return output;
38
+ }
39
+ const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);
40
+ const parsedObject = this.parseXml(xmlString);
41
+ return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
42
+ }
43
+ readSchema(_schema, value) {
44
+ const ns = NormalizedSchema.of(_schema);
45
+ const traits = ns.getMergedTraits();
46
+ const schema = ns.getSchema();
47
+ if (ns.isListSchema() && !Array.isArray(value)) {
48
+ return this.readSchema(schema, [value]);
49
+ }
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ if (typeof value === "object") {
54
+ const sparse = !!traits.sparse;
55
+ const flat = !!traits.xmlFlattened;
56
+ if (ns.isListSchema()) {
57
+ const listValue = ns.getValueSchema();
58
+ const buffer = [];
59
+ const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
60
+ const source = flat ? value : (value[0] ?? value)[sourceKey];
61
+ const sourceArray = Array.isArray(source) ? source : [source];
62
+ for (const v of sourceArray) {
63
+ if (v != null || sparse) {
64
+ buffer.push(this.readSchema(listValue, v));
65
+ }
66
+ }
67
+ return buffer;
68
+ }
69
+ const buffer = {};
70
+ if (ns.isMapSchema()) {
71
+ const keyNs = ns.getKeySchema();
72
+ const memberNs = ns.getValueSchema();
73
+ let entries;
74
+ if (flat) {
75
+ entries = Array.isArray(value) ? value : [value];
76
+ }
77
+ else {
78
+ entries = Array.isArray(value.entry) ? value.entry : [value.entry];
79
+ }
80
+ const keyProperty = keyNs.getMergedTraits().xmlName ?? "key";
81
+ const valueProperty = memberNs.getMergedTraits().xmlName ?? "value";
82
+ for (const entry of entries) {
83
+ const key = entry[keyProperty];
84
+ const value = entry[valueProperty];
85
+ if (value != null || sparse) {
86
+ buffer[key] = this.readSchema(memberNs, value);
87
+ }
88
+ }
89
+ return buffer;
90
+ }
91
+ if (ns.isStructSchema()) {
92
+ for (const [memberName, memberSchema] of ns.structIterator()) {
93
+ const memberTraits = memberSchema.getMergedTraits();
94
+ const xmlObjectKey = !memberTraits.httpPayload
95
+ ? memberSchema.getMemberTraits().xmlName ?? memberName
96
+ : memberTraits.xmlName ?? memberSchema.getName();
97
+ if (value[xmlObjectKey] != null) {
98
+ buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);
99
+ }
100
+ }
101
+ return buffer;
102
+ }
103
+ if (ns.isDocumentSchema()) {
104
+ return value;
105
+ }
106
+ throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
107
+ }
108
+ else {
109
+ if (ns.isListSchema()) {
110
+ return [];
111
+ }
112
+ else if (ns.isMapSchema() || ns.isStructSchema()) {
113
+ return {};
114
+ }
115
+ return this.stringDeserializer.read(ns, value);
116
+ }
117
+ }
118
+ parseXml(xml) {
119
+ if (xml.length) {
120
+ const parser = new XMLParser({
121
+ attributeNamePrefix: "",
122
+ htmlEntities: true,
123
+ ignoreAttributes: false,
124
+ ignoreDeclaration: true,
125
+ parseTagValue: false,
126
+ trimValues: false,
127
+ tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
128
+ });
129
+ parser.addEntity("#xD", "\r");
130
+ parser.addEntity("#10", "\n");
131
+ let parsedObj;
132
+ try {
133
+ parsedObj = parser.parse(xml, true);
134
+ }
135
+ catch (e) {
136
+ if (e && typeof e === "object") {
137
+ Object.defineProperty(e, "$responseBodyText", {
138
+ value: xml,
139
+ });
140
+ }
141
+ throw e;
142
+ }
143
+ const textNodeName = "#text";
144
+ const key = Object.keys(parsedObj)[0];
145
+ const parsedObjToReturn = parsedObj[key];
146
+ if (parsedObjToReturn[textNodeName]) {
147
+ parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
148
+ delete parsedObjToReturn[textNodeName];
149
+ }
150
+ return getValueFromTextNode(parsedObjToReturn);
151
+ }
152
+ return {};
153
+ }
154
+ }