@cdklabs/cdk-ssm-documents 0.0.55 → 0.0.57

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 (379) hide show
  1. package/.jsii +12 -12
  2. package/lib/construct/synth-utils.js +1 -1
  3. package/lib/document/automation-document.js +1 -1
  4. package/lib/document/command-document.js +1 -1
  5. package/lib/document/document-builder.js +2 -2
  6. package/lib/document/ssm-document.js +1 -1
  7. package/lib/domain/aws-service.js +1 -1
  8. package/lib/domain/choice.js +1 -1
  9. package/lib/domain/data-type.js +1 -1
  10. package/lib/domain/enum/install-action.js +2 -2
  11. package/lib/domain/enum/install-uninstall-repair.js +2 -2
  12. package/lib/domain/enum/installation-type.js +2 -2
  13. package/lib/domain/enum/package-name.js +2 -2
  14. package/lib/domain/input.js +1 -1
  15. package/lib/domain/operation.js +1 -1
  16. package/lib/domain/platform.js +1 -1
  17. package/lib/domain/precondition.js +1 -1
  18. package/lib/incident-response/incident-response.js +3 -3
  19. package/lib/interface/approve-hook.js +2 -2
  20. package/lib/interface/auth-method.js +3 -3
  21. package/lib/interface/aws-invoker.js +2 -2
  22. package/lib/interface/downloadable-content.js +8 -8
  23. package/lib/interface/environment.js +3 -3
  24. package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
  25. package/lib/interface/observer.js +1 -1
  26. package/lib/interface/on-failure.js +6 -6
  27. package/lib/interface/pause-hook.js +2 -2
  28. package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
  29. package/lib/interface/run-document-location.js +2 -2
  30. package/lib/interface/sleep-hook.js +2 -2
  31. package/lib/interface/step-ref.js +1 -1
  32. package/lib/interface/variables/boolean-variable.js +2 -2
  33. package/lib/interface/variables/map-list-variable.js +2 -2
  34. package/lib/interface/variables/number-variable.js +2 -2
  35. package/lib/interface/variables/secure-string-variable.js +4 -4
  36. package/lib/interface/variables/string-list-variable.js +2 -2
  37. package/lib/interface/variables/string-map-variable.js +2 -2
  38. package/lib/interface/variables/string-variable.js +4 -4
  39. package/lib/interface/variables/variable.js +2 -2
  40. package/lib/interface/webhook.js +1 -1
  41. package/lib/parent-steps/automation/approve-step.js +1 -1
  42. package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
  43. package/lib/parent-steps/automation/aws-api-step.js +1 -1
  44. package/lib/parent-steps/automation/branch-step.js +1 -1
  45. package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
  46. package/lib/parent-steps/automation/copy-image-step.js +1 -1
  47. package/lib/parent-steps/automation/create-image-step.js +1 -1
  48. package/lib/parent-steps/automation/create-stack-step.js +3 -3
  49. package/lib/parent-steps/automation/create-tags-step.js +3 -3
  50. package/lib/parent-steps/automation/delete-image-step.js +1 -1
  51. package/lib/parent-steps/automation/delete-stack-step.js +1 -1
  52. package/lib/parent-steps/automation/execute-automation-step.js +1 -1
  53. package/lib/parent-steps/automation/execute-script-step.js +5 -5
  54. package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
  55. package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
  56. package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
  57. package/lib/parent-steps/automation/pause-step.js +1 -1
  58. package/lib/parent-steps/automation/run-command-step.js +3 -3
  59. package/lib/parent-steps/automation/run-instance-step.js +1 -1
  60. package/lib/parent-steps/automation/sleep-step.js +1 -1
  61. package/lib/parent-steps/automation/update-variable.js +1 -1
  62. package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
  63. package/lib/parent-steps/automation-step.js +1 -1
  64. package/lib/parent-steps/command/applications-step.js +1 -1
  65. package/lib/parent-steps/command/configure-docker-step.js +1 -1
  66. package/lib/parent-steps/command/configure-package-step.js +1 -1
  67. package/lib/parent-steps/command/domain-join-step.js +1 -1
  68. package/lib/parent-steps/command/download-content-step.js +1 -1
  69. package/lib/parent-steps/command/ps-module-step.js +1 -1
  70. package/lib/parent-steps/command/run-docker-action-step.js +1 -1
  71. package/lib/parent-steps/command/run-document-step.js +1 -1
  72. package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
  73. package/lib/parent-steps/command/run-shell-script-step.js +1 -1
  74. package/lib/parent-steps/command/software-inventory-step.js +1 -1
  75. package/lib/parent-steps/command/update-agent-step.js +1 -1
  76. package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
  77. package/lib/parent-steps/command-step.js +1 -1
  78. package/lib/parent-steps/step.js +1 -1
  79. package/lib/patterns/automation/composite-step.js +2 -2
  80. package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
  81. package/lib/patterns/automation/string-step.js +1 -1
  82. package/lib/patterns/document/string-document.js +1 -1
  83. package/lib/patterns/document/timed-document.js +1 -1
  84. package/lib/samples/hello-world.js +1 -1
  85. package/lib/simulation/automation/approve-simulation.js +1 -1
  86. package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
  87. package/lib/simulation/automation/automation-simulation-base.js +1 -1
  88. package/lib/simulation/automation/aws-api-simulation.js +1 -1
  89. package/lib/simulation/automation/branch-simulation.js +1 -1
  90. package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
  91. package/lib/simulation/automation/copy-image-simulation.js +1 -1
  92. package/lib/simulation/automation/create-image-simulation.js +1 -1
  93. package/lib/simulation/automation/create-stack-simulation.js +1 -1
  94. package/lib/simulation/automation/create-tags-simulation.js +1 -1
  95. package/lib/simulation/automation/delete-image-simulation.js +1 -1
  96. package/lib/simulation/automation/delete-stack-simulation.js +1 -1
  97. package/lib/simulation/automation/execute-script-simulation.js +1 -1
  98. package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
  99. package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
  100. package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
  101. package/lib/simulation/automation/pause-simulation.js +1 -1
  102. package/lib/simulation/automation/run-command-simulation.js +1 -1
  103. package/lib/simulation/automation/run-instance-simulation.js +1 -1
  104. package/lib/simulation/automation/sleep-simulation.js +1 -1
  105. package/lib/simulation/automation/update-variable-simulation.js +1 -1
  106. package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
  107. package/lib/simulation/automation-step-simulation.js +1 -1
  108. package/lib/simulation/command/command-simulation-base.js +1 -1
  109. package/lib/simulation/command/ps-module-simulation.js +1 -1
  110. package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
  111. package/lib/simulation/command/run-shell-script-simulation.js +1 -1
  112. package/lib/simulation/command-step-simulation.js +1 -1
  113. package/lib/simulation/document/automation-simulation.js +1 -1
  114. package/lib/simulation/document/command-simulation.js +1 -1
  115. package/lib/simulation/simulation.js +1 -1
  116. package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
  117. package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/models_0.d.ts +2 -2
  118. package/node_modules/@aws-sdk/client-cloudwatch/package.json +36 -36
  119. package/node_modules/@aws-sdk/client-ec2/README.md +14 -0
  120. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +41 -0
  121. package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +156 -78
  122. package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +6 -0
  123. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerMonitoredTagKeysCommand.js +16 -0
  124. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/UpdateCapacityManagerMonitoredTagKeysCommand.js +16 -0
  125. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +2 -0
  126. package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +8 -0
  127. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetCapacityManagerMonitoredTagKeysPaginator.js +4 -0
  128. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
  129. package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +96 -18
  130. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +23 -0
  131. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +4 -2
  132. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +9 -2
  133. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +9 -2
  134. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +87 -0
  135. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetConsoleScreenshotCommand.d.ts +1 -1
  136. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +1 -2
  137. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
  138. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
  139. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +91 -0
  140. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +2 -0
  141. package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +16 -0
  142. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +126 -79
  143. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +81 -122
  144. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +168 -3
  145. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +7 -0
  146. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
  147. package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +8 -0
  148. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +55 -0
  149. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +12 -0
  150. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
  151. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetConsoleScreenshotCommand.d.ts +1 -1
  152. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +4 -2
  153. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
  154. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
  155. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
  156. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +2 -0
  157. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +10 -0
  158. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +23 -18
  159. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +19 -34
  160. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +43 -0
  161. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +11 -0
  162. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
  163. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -0
  164. package/node_modules/@aws-sdk/client-ec2/package.json +36 -36
  165. package/node_modules/@aws-sdk/client-iam/package.json +35 -35
  166. package/node_modules/@aws-sdk/client-lambda/dist-cjs/models/errors.js +52 -1
  167. package/node_modules/@aws-sdk/client-lambda/dist-cjs/schemas/schemas_0.js +29 -8
  168. package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +48 -0
  169. package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +22 -1
  170. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +9 -0
  171. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +9 -0
  172. package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +66 -0
  173. package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +6 -6
  174. package/node_modules/@aws-sdk/client-lambda/dist-types/schemas/schemas_0.d.ts +3 -0
  175. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +30 -0
  176. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
  177. package/node_modules/@aws-sdk/client-lambda/package.json +38 -38
  178. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +5 -0
  179. package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +5 -0
  180. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +1 -1
  181. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +1 -1
  182. package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +5 -0
  183. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +5 -0
  184. package/node_modules/@aws-sdk/client-s3/package.json +50 -50
  185. package/node_modules/@aws-sdk/client-sns/package.json +33 -33
  186. package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +2 -0
  187. package/node_modules/@aws-sdk/client-sqs/dist-es/commands/ReceiveMessageCommand.js +2 -0
  188. package/node_modules/@aws-sdk/client-sqs/package.json +36 -36
  189. package/node_modules/@aws-sdk/client-ssm/package.json +34 -34
  190. package/node_modules/@aws-sdk/core/dist-cjs/index.js +69 -50
  191. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +17 -0
  192. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +52 -50
  193. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  194. package/node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js +15 -0
  195. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +11 -10
  196. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +4 -1
  197. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +4 -5
  198. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -1
  199. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +9 -7
  200. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +17 -17
  201. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -8
  202. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -1
  203. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  204. package/node_modules/@aws-sdk/core/dist-types/submodules/client/longPollMiddleware.d.ts +14 -0
  205. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
  206. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  207. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +15 -0
  208. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +1 -1
  209. package/node_modules/@aws-sdk/core/package.json +11 -11
  210. package/node_modules/@aws-sdk/crc64-nvme/package.json +2 -2
  211. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  212. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  213. package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
  214. package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
  215. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  216. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  217. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  218. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  219. package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
  220. package/node_modules/@aws-sdk/middleware-expect-continue/package.json +4 -4
  221. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +10 -10
  222. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  223. package/node_modules/@aws-sdk/middleware-location-constraint/package.json +3 -3
  224. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  225. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  226. package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +8 -8
  227. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +11 -11
  228. package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +4 -4
  229. package/node_modules/@aws-sdk/middleware-ssec/package.json +3 -3
  230. package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
  231. package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
  232. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  233. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +6 -6
  234. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  235. package/node_modules/@aws-sdk/types/package.json +2 -2
  236. package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
  237. package/node_modules/@aws-sdk/util-format-url/package.json +4 -4
  238. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  239. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  240. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  241. package/node_modules/@smithy/config-resolver/package.json +5 -5
  242. package/node_modules/@smithy/core/dist-cjs/index.js +2 -1
  243. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -14
  244. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -2
  245. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +16 -8
  246. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -10
  247. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +6 -1
  248. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +6 -3
  249. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  250. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +23 -11
  251. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +9 -3
  252. package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +2 -2
  253. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +16 -8
  254. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -4
  255. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +8 -6
  256. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +6 -1
  257. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +6 -3
  258. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  259. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  260. package/node_modules/@smithy/core/package.json +7 -7
  261. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  262. package/node_modules/@smithy/eventstream-codec/package.json +2 -2
  263. package/node_modules/@smithy/eventstream-serde-browser/package.json +3 -3
  264. package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +2 -2
  265. package/node_modules/@smithy/eventstream-serde-node/package.json +3 -3
  266. package/node_modules/@smithy/eventstream-serde-universal/package.json +3 -3
  267. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  268. package/node_modules/@smithy/hash-blob-browser/package.json +2 -2
  269. package/node_modules/@smithy/hash-node/package.json +2 -2
  270. package/node_modules/@smithy/hash-stream-node/package.json +2 -2
  271. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  272. package/node_modules/@smithy/md5-js/package.json +2 -2
  273. package/node_modules/@smithy/middleware-compression/package.json +6 -6
  274. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  275. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  276. package/node_modules/@smithy/middleware-retry/package.json +9 -9
  277. package/node_modules/@smithy/middleware-serde/package.json +4 -4
  278. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  279. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  280. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +191 -96
  281. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +45 -0
  282. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +71 -35
  283. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -18
  284. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +44 -43
  285. package/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +42 -0
  286. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +34 -14
  287. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +32 -8
  288. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +14 -6
  289. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  290. package/node_modules/@smithy/property-provider/package.json +2 -2
  291. package/node_modules/@smithy/protocol-http/package.json +2 -2
  292. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  293. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  294. package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +5 -0
  295. package/node_modules/@smithy/service-error-classification/dist-es/index.js +4 -0
  296. package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +6 -0
  297. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  298. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  299. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +11 -5
  300. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +11 -5
  301. package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +3 -3
  302. package/node_modules/@smithy/signature-v4/package.json +4 -4
  303. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +8 -1
  304. package/node_modules/@smithy/smithy-client/dist-es/command.js +8 -1
  305. package/node_modules/@smithy/smithy-client/package.json +7 -7
  306. package/node_modules/@smithy/types/dist-types/connection/config.d.ts +5 -0
  307. package/node_modules/@smithy/types/dist-types/signature.d.ts +20 -3
  308. package/node_modules/@smithy/types/package.json +1 -1
  309. package/node_modules/@smithy/url-parser/package.json +3 -3
  310. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  311. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  312. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +212 -111
  313. package/node_modules/@smithy/util-endpoints/dist-es/bdd/BinaryDecisionDiagram.js +15 -0
  314. package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +42 -0
  315. package/node_modules/@smithy/util-endpoints/dist-es/index.js +2 -0
  316. package/node_modules/@smithy/util-endpoints/dist-es/lib/coalesce.js +8 -0
  317. package/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +2 -1
  318. package/node_modules/@smithy/util-endpoints/dist-es/lib/index.js +3 -0
  319. package/node_modules/@smithy/util-endpoints/dist-es/lib/ite.js +3 -0
  320. package/node_modules/@smithy/util-endpoints/dist-es/lib/split.js +13 -0
  321. package/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +1 -1
  322. package/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +8 -13
  323. package/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +4 -1
  324. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +9 -7
  325. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +12 -8
  326. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +14 -13
  327. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +7 -4
  328. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +22 -5
  329. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +4 -4
  330. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +3 -6
  331. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +5 -5
  332. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +4 -4
  333. package/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +1 -5
  334. package/node_modules/@smithy/util-endpoints/dist-types/bdd/BinaryDecisionDiagram.d.ts +22 -0
  335. package/node_modules/@smithy/util-endpoints/dist-types/decideEndpoint.d.ts +7 -0
  336. package/node_modules/@smithy/util-endpoints/dist-types/index.d.ts +2 -0
  337. package/node_modules/@smithy/util-endpoints/dist-types/lib/coalesce.d.ts +7 -0
  338. package/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts +3 -0
  339. package/node_modules/@smithy/util-endpoints/dist-types/lib/ite.d.ts +6 -0
  340. package/node_modules/@smithy/util-endpoints/dist-types/lib/split.d.ts +11 -0
  341. package/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts +3 -3
  342. package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +2 -11
  343. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts +6 -3
  344. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts +3 -3
  345. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts +1 -1
  346. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +2 -2
  347. package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +3 -1
  348. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  349. package/node_modules/@smithy/util-middleware/package.json +2 -2
  350. package/node_modules/@smithy/util-retry/dist-cjs/index.js +6 -0
  351. package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +3 -0
  352. package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +3 -0
  353. package/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts +5 -0
  354. package/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts +5 -0
  355. package/node_modules/@smithy/util-retry/package.json +3 -3
  356. package/node_modules/@smithy/util-stream/package.json +4 -4
  357. package/node_modules/@smithy/util-waiter/package.json +3 -3
  358. package/node_modules/fast-xml-builder/package.json +1 -1
  359. package/node_modules/fast-xml-builder/src/fxb.js +6 -2
  360. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +16 -2
  361. package/node_modules/path-expression-matcher/README.md +214 -62
  362. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
  363. package/node_modules/path-expression-matcher/lib/pem.d.cts +111 -0
  364. package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
  365. package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -1
  366. package/node_modules/path-expression-matcher/package.json +1 -1
  367. package/node_modules/path-expression-matcher/src/Expression.js +2 -2
  368. package/node_modules/path-expression-matcher/src/ExpressionSet.js +209 -0
  369. package/node_modules/path-expression-matcher/src/Matcher.js +235 -177
  370. package/node_modules/path-expression-matcher/src/index.d.ts +199 -194
  371. package/node_modules/path-expression-matcher/src/index.js +3 -2
  372. package/node_modules/strnum/package.json +1 -1
  373. package/package.json +10 -10
  374. package/node_modules/strnum/.github/SECURITY.md +0 -5
  375. package/node_modules/strnum/.vscode/launch.json +0 -25
  376. package/node_modules/strnum/algo.stflow +0 -84
  377. package/node_modules/strnum/tests/infinity_test.js +0 -18
  378. package/node_modules/strnum/tests/strnum_test.js +0 -175
  379. package/node_modules/strnum/tests/temp.js +0 -8
@@ -30,6 +30,22 @@ More information can be found at: https://a.co/c895JFp`);
30
30
  }
31
31
  };
32
32
 
33
+ const longPollMiddleware = () => (next, context) => async (args) => {
34
+ context.__retryLongPoll = true;
35
+ return next(args);
36
+ };
37
+ const longPollMiddlewareOptions = {
38
+ name: "longPollMiddleware",
39
+ tags: ["RETRY"],
40
+ step: "initialize",
41
+ override: true,
42
+ };
43
+ const getLongPollPlugin = (options) => ({
44
+ applyToStack: (clientStack) => {
45
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
46
+ },
47
+ });
48
+
33
49
  function setCredentialFeature(credentials, feature, value) {
34
50
  if (!credentials.$source) {
35
51
  credentials.$source = {};
@@ -434,12 +450,11 @@ class ProtocolLib {
434
450
  if (msg) {
435
451
  error.message = msg;
436
452
  }
437
- error.Error = {
438
- ...error.Error,
439
- Type: error.Error?.Type,
440
- Code: error.Error?.Code,
441
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
442
- };
453
+ const errorObj = error.Error ?? {};
454
+ errorObj.Type = error.Error?.Type;
455
+ errorObj.Code = error.Error?.Code;
456
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
457
+ error.Error = errorObj;
443
458
  const reqId = error.$metadata.requestId;
444
459
  if (reqId) {
445
460
  error.RequestId = reqId;
@@ -452,14 +467,16 @@ class ProtocolLib {
452
467
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
453
468
  if (output !== undefined && queryErrorHeader != null) {
454
469
  const [Code, Type] = queryErrorHeader.split(";");
455
- const entries = Object.entries(output);
470
+ const keys = Object.keys(output);
456
471
  const Error = {
457
472
  Code,
458
473
  Type,
459
474
  };
460
- Object.assign(output, Error);
461
- for (const [k, v] of entries) {
462
- Error[k === "message" ? "Message" : k] = v;
475
+ output.Code = Code;
476
+ output.Type = Type;
477
+ for (let i = 0; i < keys.length; i++) {
478
+ const k = keys[i];
479
+ Error[k === "message" ? "Message" : k] = output[k];
463
480
  }
464
481
  delete Error.__type;
465
482
  output.Error = Error;
@@ -598,7 +615,10 @@ class UnionSerde {
598
615
  constructor(from, to) {
599
616
  this.from = from;
600
617
  this.to = to;
601
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
618
+ const keys = Object.keys(this.from);
619
+ const set = new Set(keys);
620
+ set.delete("__type");
621
+ this.keys = set;
602
622
  }
603
623
  mark(key) {
604
624
  this.keys.delete(key);
@@ -656,24 +676,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
656
676
  value.message = value.message ?? value.Message;
657
677
  return value;
658
678
  };
679
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
680
+ const sanitizeErrorCode = (rawValue) => {
681
+ let cleanValue = rawValue;
682
+ if (typeof cleanValue === "number") {
683
+ cleanValue = cleanValue.toString();
684
+ }
685
+ if (cleanValue.indexOf(",") >= 0) {
686
+ cleanValue = cleanValue.split(",")[0];
687
+ }
688
+ if (cleanValue.indexOf(":") >= 0) {
689
+ cleanValue = cleanValue.split(":")[0];
690
+ }
691
+ if (cleanValue.indexOf("#") >= 0) {
692
+ cleanValue = cleanValue.split("#")[1];
693
+ }
694
+ return cleanValue;
695
+ };
659
696
  const loadRestJsonErrorCode = (output, data) => {
660
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
661
- const sanitizeErrorCode = (rawValue) => {
662
- let cleanValue = rawValue;
663
- if (typeof cleanValue === "number") {
664
- cleanValue = cleanValue.toString();
665
- }
666
- if (cleanValue.indexOf(",") >= 0) {
667
- cleanValue = cleanValue.split(",")[0];
668
- }
669
- if (cleanValue.indexOf(":") >= 0) {
670
- cleanValue = cleanValue.split(":")[0];
671
- }
672
- if (cleanValue.indexOf("#") >= 0) {
673
- cleanValue = cleanValue.split("#")[1];
674
- }
675
- return cleanValue;
676
- };
677
697
  const headerKey = findKey(output.headers, "x-amzn-errortype");
678
698
  if (headerKey !== undefined) {
679
699
  return sanitizeErrorCode(output.headers[headerKey]);
@@ -890,12 +910,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
890
910
  this.rootSchema = schema.NormalizedSchema.of(schema$1);
891
911
  this.buffer = this._write(this.rootSchema, value);
892
912
  }
893
- writeDiscriminatedDocument(schema$1, value) {
894
- this.write(schema$1, value);
895
- if (typeof this.buffer === "object") {
896
- this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
897
- }
898
- }
899
913
  flush() {
900
914
  const { rootSchema, useReplacer } = this;
901
915
  this.rootSchema = undefined;
@@ -909,6 +923,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
909
923
  }
910
924
  return this.buffer;
911
925
  }
926
+ writeDiscriminatedDocument(schema$1, value) {
927
+ this.write(schema$1, value);
928
+ if (typeof this.buffer === "object") {
929
+ this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
930
+ }
931
+ }
912
932
  _write(schema$1, value, container) {
913
933
  const isObject = value !== null && typeof value === "object";
914
934
  const ns = schema.NormalizedSchema.of(schema$1);
@@ -921,6 +941,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
921
941
  if (jsonName) {
922
942
  nameMap = {};
923
943
  }
944
+ let outCount = 0;
924
945
  for (const [memberName, memberSchema] of ns.structIterator()) {
925
946
  const serializableValue = this._write(memberSchema, record[memberName], ns);
926
947
  if (serializableValue !== undefined) {
@@ -930,9 +951,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
930
951
  nameMap[memberName] = targetKey;
931
952
  }
932
953
  out[targetKey] = serializableValue;
954
+ outCount++;
933
955
  }
934
956
  }
935
- if (ns.isUnionSchema() && Object.keys(out).length === 0) {
957
+ if (ns.isUnionSchema() && outCount === 0) {
936
958
  const { $unknown } = record;
937
959
  if (Array.isArray($unknown)) {
938
960
  const [k, v] = $unknown;
@@ -1098,10 +1120,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
1098
1120
  if (!request.path.endsWith("/")) {
1099
1121
  request.path += "/";
1100
1122
  }
1101
- Object.assign(request.headers, {
1102
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
1103
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
1104
- });
1123
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
1124
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
1105
1125
  if (this.awsQueryCompatible) {
1106
1126
  request.headers["x-amzn-query-mode"] = "true";
1107
1127
  }
@@ -1125,9 +1145,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
1125
1145
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
1126
1146
  const exception = new ErrorCtor(message);
1127
1147
  const output = {};
1148
+ const errorDeserializer = this.codec.createDeserializer();
1128
1149
  for (const [name, member] of ns.structIterator()) {
1129
1150
  if (dataObject[name] != null) {
1130
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
1151
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
1131
1152
  }
1132
1153
  }
1133
1154
  if (this.awsQueryCompatible) {
@@ -1248,9 +1269,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
1248
1269
  const exception = new ErrorCtor(message);
1249
1270
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
1250
1271
  const output = {};
1272
+ const errorDeserializer = this.codec.createDeserializer();
1251
1273
  for (const [name, member] of ns.structIterator()) {
1252
1274
  const target = member.getMergedTraits().jsonName ?? name;
1253
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
1275
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
1254
1276
  }
1255
1277
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
1256
1278
  $fault: ns.getMergedTraits().error,
@@ -1641,9 +1663,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1641
1663
  if (!request.path.endsWith("/")) {
1642
1664
  request.path += "/";
1643
1665
  }
1644
- Object.assign(request.headers, {
1645
- "content-type": `application/x-www-form-urlencoded`,
1646
- });
1666
+ request.headers["content-type"] = "application/x-www-form-urlencoded";
1647
1667
  if (schema.deref(operationSchema.input) === "unit" || !request.body) {
1648
1668
  request.body = "";
1649
1669
  }
@@ -1676,11 +1696,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1676
1696
  if (bytes.byteLength > 0) {
1677
1697
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
1678
1698
  }
1679
- const output = {
1680
- $metadata: this.deserializeMetadata(response),
1681
- ...dataObject,
1682
- };
1683
- return output;
1699
+ dataObject.$metadata = this.deserializeMetadata(response);
1700
+ return dataObject;
1684
1701
  }
1685
1702
  useNestedResult() {
1686
1703
  return true;
@@ -2180,10 +2197,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
2180
2197
  const exception = new ErrorCtor(message);
2181
2198
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
2182
2199
  const output = {};
2200
+ const errorDeserializer = this.codec.createDeserializer();
2183
2201
  for (const [name, member] of ns.structIterator()) {
2184
2202
  const target = member.getMergedTraits().xmlName ?? name;
2185
2203
  const value = dataObject.Error?.[target] ?? dataObject[target];
2186
- output[name] = this.codec.createDeserializer().readSchema(member, value);
2204
+ output[name] = errorDeserializer.readSchema(member, value);
2187
2205
  }
2188
2206
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
2189
2207
  $fault: ns.getMergedTraits().error,
@@ -2229,6 +2247,7 @@ exports._toStr = _toStr;
2229
2247
  exports.awsExpectUnion = awsExpectUnion;
2230
2248
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
2231
2249
  exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
2250
+ exports.getLongPollPlugin = getLongPollPlugin;
2232
2251
  exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
2233
2252
  exports.loadRestXmlErrorCode = loadRestXmlErrorCode;
2234
2253
  exports.parseJsonBody = parseJsonBody;
@@ -16,6 +16,22 @@ More information can be found at: https://a.co/c895JFp`);
16
16
  }
17
17
  };
18
18
 
19
+ const longPollMiddleware = () => (next, context) => async (args) => {
20
+ context.__retryLongPoll = true;
21
+ return next(args);
22
+ };
23
+ const longPollMiddlewareOptions = {
24
+ name: "longPollMiddleware",
25
+ tags: ["RETRY"],
26
+ step: "initialize",
27
+ override: true,
28
+ };
29
+ const getLongPollPlugin = (options) => ({
30
+ applyToStack: (clientStack) => {
31
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
32
+ },
33
+ });
34
+
19
35
  function setCredentialFeature(credentials, feature, value) {
20
36
  if (!credentials.$source) {
21
37
  credentials.$source = {};
@@ -45,6 +61,7 @@ function setTokenFeature(token, feature, value) {
45
61
  }
46
62
 
47
63
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
64
+ exports.getLongPollPlugin = getLongPollPlugin;
48
65
  exports.setCredentialFeature = setCredentialFeature;
49
66
  exports.setFeature = setFeature;
50
67
  exports.setTokenFeature = setTokenFeature;
@@ -96,12 +96,11 @@ class ProtocolLib {
96
96
  if (msg) {
97
97
  error.message = msg;
98
98
  }
99
- error.Error = {
100
- ...error.Error,
101
- Type: error.Error?.Type,
102
- Code: error.Error?.Code,
103
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
104
- };
99
+ const errorObj = error.Error ?? {};
100
+ errorObj.Type = error.Error?.Type;
101
+ errorObj.Code = error.Error?.Code;
102
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
103
+ error.Error = errorObj;
105
104
  const reqId = error.$metadata.requestId;
106
105
  if (reqId) {
107
106
  error.RequestId = reqId;
@@ -114,14 +113,16 @@ class ProtocolLib {
114
113
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
115
114
  if (output !== undefined && queryErrorHeader != null) {
116
115
  const [Code, Type] = queryErrorHeader.split(";");
117
- const entries = Object.entries(output);
116
+ const keys = Object.keys(output);
118
117
  const Error = {
119
118
  Code,
120
119
  Type,
121
120
  };
122
- Object.assign(output, Error);
123
- for (const [k, v] of entries) {
124
- Error[k === "message" ? "Message" : k] = v;
121
+ output.Code = Code;
122
+ output.Type = Type;
123
+ for (let i = 0; i < keys.length; i++) {
124
+ const k = keys[i];
125
+ Error[k === "message" ? "Message" : k] = output[k];
125
126
  }
126
127
  delete Error.__type;
127
128
  output.Error = Error;
@@ -260,7 +261,10 @@ class UnionSerde {
260
261
  constructor(from, to) {
261
262
  this.from = from;
262
263
  this.to = to;
263
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
264
+ const keys = Object.keys(this.from);
265
+ const set = new Set(keys);
266
+ set.delete("__type");
267
+ this.keys = set;
264
268
  }
265
269
  mark(key) {
266
270
  this.keys.delete(key);
@@ -318,24 +322,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
318
322
  value.message = value.message ?? value.Message;
319
323
  return value;
320
324
  };
325
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
326
+ const sanitizeErrorCode = (rawValue) => {
327
+ let cleanValue = rawValue;
328
+ if (typeof cleanValue === "number") {
329
+ cleanValue = cleanValue.toString();
330
+ }
331
+ if (cleanValue.indexOf(",") >= 0) {
332
+ cleanValue = cleanValue.split(",")[0];
333
+ }
334
+ if (cleanValue.indexOf(":") >= 0) {
335
+ cleanValue = cleanValue.split(":")[0];
336
+ }
337
+ if (cleanValue.indexOf("#") >= 0) {
338
+ cleanValue = cleanValue.split("#")[1];
339
+ }
340
+ return cleanValue;
341
+ };
321
342
  const loadRestJsonErrorCode = (output, data) => {
322
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
323
- const sanitizeErrorCode = (rawValue) => {
324
- let cleanValue = rawValue;
325
- if (typeof cleanValue === "number") {
326
- cleanValue = cleanValue.toString();
327
- }
328
- if (cleanValue.indexOf(",") >= 0) {
329
- cleanValue = cleanValue.split(",")[0];
330
- }
331
- if (cleanValue.indexOf(":") >= 0) {
332
- cleanValue = cleanValue.split(":")[0];
333
- }
334
- if (cleanValue.indexOf("#") >= 0) {
335
- cleanValue = cleanValue.split("#")[1];
336
- }
337
- return cleanValue;
338
- };
339
343
  const headerKey = findKey(output.headers, "x-amzn-errortype");
340
344
  if (headerKey !== undefined) {
341
345
  return sanitizeErrorCode(output.headers[headerKey]);
@@ -552,12 +556,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
552
556
  this.rootSchema = schema.NormalizedSchema.of(schema$1);
553
557
  this.buffer = this._write(this.rootSchema, value);
554
558
  }
555
- writeDiscriminatedDocument(schema$1, value) {
556
- this.write(schema$1, value);
557
- if (typeof this.buffer === "object") {
558
- this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
559
- }
560
- }
561
559
  flush() {
562
560
  const { rootSchema, useReplacer } = this;
563
561
  this.rootSchema = undefined;
@@ -571,6 +569,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
571
569
  }
572
570
  return this.buffer;
573
571
  }
572
+ writeDiscriminatedDocument(schema$1, value) {
573
+ this.write(schema$1, value);
574
+ if (typeof this.buffer === "object") {
575
+ this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
576
+ }
577
+ }
574
578
  _write(schema$1, value, container) {
575
579
  const isObject = value !== null && typeof value === "object";
576
580
  const ns = schema.NormalizedSchema.of(schema$1);
@@ -583,6 +587,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
583
587
  if (jsonName) {
584
588
  nameMap = {};
585
589
  }
590
+ let outCount = 0;
586
591
  for (const [memberName, memberSchema] of ns.structIterator()) {
587
592
  const serializableValue = this._write(memberSchema, record[memberName], ns);
588
593
  if (serializableValue !== undefined) {
@@ -592,9 +597,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
592
597
  nameMap[memberName] = targetKey;
593
598
  }
594
599
  out[targetKey] = serializableValue;
600
+ outCount++;
595
601
  }
596
602
  }
597
- if (ns.isUnionSchema() && Object.keys(out).length === 0) {
603
+ if (ns.isUnionSchema() && outCount === 0) {
598
604
  const { $unknown } = record;
599
605
  if (Array.isArray($unknown)) {
600
606
  const [k, v] = $unknown;
@@ -760,10 +766,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
760
766
  if (!request.path.endsWith("/")) {
761
767
  request.path += "/";
762
768
  }
763
- Object.assign(request.headers, {
764
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
765
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
766
- });
769
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
770
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
767
771
  if (this.awsQueryCompatible) {
768
772
  request.headers["x-amzn-query-mode"] = "true";
769
773
  }
@@ -787,9 +791,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
787
791
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
788
792
  const exception = new ErrorCtor(message);
789
793
  const output = {};
794
+ const errorDeserializer = this.codec.createDeserializer();
790
795
  for (const [name, member] of ns.structIterator()) {
791
796
  if (dataObject[name] != null) {
792
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
797
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
793
798
  }
794
799
  }
795
800
  if (this.awsQueryCompatible) {
@@ -910,9 +915,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
910
915
  const exception = new ErrorCtor(message);
911
916
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
912
917
  const output = {};
918
+ const errorDeserializer = this.codec.createDeserializer();
913
919
  for (const [name, member] of ns.structIterator()) {
914
920
  const target = member.getMergedTraits().jsonName ?? name;
915
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
921
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
916
922
  }
917
923
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
918
924
  $fault: ns.getMergedTraits().error,
@@ -1303,9 +1309,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1303
1309
  if (!request.path.endsWith("/")) {
1304
1310
  request.path += "/";
1305
1311
  }
1306
- Object.assign(request.headers, {
1307
- "content-type": `application/x-www-form-urlencoded`,
1308
- });
1312
+ request.headers["content-type"] = "application/x-www-form-urlencoded";
1309
1313
  if (schema.deref(operationSchema.input) === "unit" || !request.body) {
1310
1314
  request.body = "";
1311
1315
  }
@@ -1338,11 +1342,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1338
1342
  if (bytes.byteLength > 0) {
1339
1343
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
1340
1344
  }
1341
- const output = {
1342
- $metadata: this.deserializeMetadata(response),
1343
- ...dataObject,
1344
- };
1345
- return output;
1345
+ dataObject.$metadata = this.deserializeMetadata(response);
1346
+ return dataObject;
1346
1347
  }
1347
1348
  useNestedResult() {
1348
1349
  return true;
@@ -1842,10 +1843,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
1842
1843
  const exception = new ErrorCtor(message);
1843
1844
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
1844
1845
  const output = {};
1846
+ const errorDeserializer = this.codec.createDeserializer();
1845
1847
  for (const [name, member] of ns.structIterator()) {
1846
1848
  const target = member.getMergedTraits().xmlName ?? name;
1847
1849
  const value = dataObject.Error?.[target] ?? dataObject[target];
1848
- output[name] = this.codec.createDeserializer().readSchema(member, value);
1850
+ output[name] = errorDeserializer.readSchema(member, value);
1849
1851
  }
1850
1852
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
1851
1853
  $fault: ns.getMergedTraits().error,
@@ -1,4 +1,5 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export { getLongPollPlugin } from "./longPollMiddleware";
2
3
  export * from "./setCredentialFeature";
3
4
  export * from "./setFeature";
4
5
  export * from "./setTokenFeature";
@@ -0,0 +1,15 @@
1
+ export const longPollMiddleware = () => (next, context) => async (args) => {
2
+ context.__retryLongPoll = true;
3
+ return next(args);
4
+ };
5
+ export const longPollMiddlewareOptions = {
6
+ name: "longPollMiddleware",
7
+ tags: ["RETRY"],
8
+ step: "initialize",
9
+ override: true,
10
+ };
11
+ export const getLongPollPlugin = (options) => ({
12
+ applyToStack: (clientStack) => {
13
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
14
+ },
15
+ });
@@ -87,12 +87,11 @@ export class ProtocolLib {
87
87
  if (msg) {
88
88
  error.message = msg;
89
89
  }
90
- error.Error = {
91
- ...error.Error,
92
- Type: error.Error?.Type,
93
- Code: error.Error?.Code,
94
- Message: error.Error?.message ?? error.Error?.Message ?? msg,
95
- };
90
+ const errorObj = error.Error ?? {};
91
+ errorObj.Type = error.Error?.Type;
92
+ errorObj.Code = error.Error?.Code;
93
+ errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
94
+ error.Error = errorObj;
96
95
  const reqId = error.$metadata.requestId;
97
96
  if (reqId) {
98
97
  error.RequestId = reqId;
@@ -105,14 +104,16 @@ export class ProtocolLib {
105
104
  const queryErrorHeader = response.headers?.["x-amzn-query-error"];
106
105
  if (output !== undefined && queryErrorHeader != null) {
107
106
  const [Code, Type] = queryErrorHeader.split(";");
108
- const entries = Object.entries(output);
107
+ const keys = Object.keys(output);
109
108
  const Error = {
110
109
  Code,
111
110
  Type,
112
111
  };
113
- Object.assign(output, Error);
114
- for (const [k, v] of entries) {
115
- Error[k === "message" ? "Message" : k] = v;
112
+ output.Code = Code;
113
+ output.Type = Type;
114
+ for (let i = 0; i < keys.length; i++) {
115
+ const k = keys[i];
116
+ Error[k === "message" ? "Message" : k] = output[k];
116
117
  }
117
118
  delete Error.__type;
118
119
  output.Error = Error;
@@ -5,7 +5,10 @@ export class UnionSerde {
5
5
  constructor(from, to) {
6
6
  this.from = from;
7
7
  this.to = to;
8
- this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
8
+ const keys = Object.keys(this.from);
9
+ const set = new Set(keys);
10
+ set.delete("__type");
11
+ this.keys = set;
9
12
  }
10
13
  mark(key) {
11
14
  this.keys.delete(key);
@@ -35,10 +35,8 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
35
35
  if (!request.path.endsWith("/")) {
36
36
  request.path += "/";
37
37
  }
38
- Object.assign(request.headers, {
39
- "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
40
- "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
41
- });
38
+ request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
39
+ request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
42
40
  if (this.awsQueryCompatible) {
43
41
  request.headers["x-amzn-query-mode"] = "true";
44
42
  }
@@ -62,9 +60,10 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
62
60
  const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
63
61
  const exception = new ErrorCtor(message);
64
62
  const output = {};
63
+ const errorDeserializer = this.codec.createDeserializer();
65
64
  for (const [name, member] of ns.structIterator()) {
66
65
  if (dataObject[name] != null) {
67
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);
66
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
68
67
  }
69
68
  }
70
69
  if (this.awsQueryCompatible) {
@@ -69,9 +69,10 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
69
69
  const exception = new ErrorCtor(message);
70
70
  await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
71
71
  const output = {};
72
+ const errorDeserializer = this.codec.createDeserializer();
72
73
  for (const [name, member] of ns.structIterator()) {
73
74
  const target = member.getMergedTraits().jsonName ?? name;
74
- output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
75
+ output[name] = errorDeserializer.readObject(member, dataObject[target]);
75
76
  }
76
77
  throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
77
78
  $fault: ns.getMergedTraits().error,
@@ -17,12 +17,6 @@ export class JsonShapeSerializer extends SerdeContextConfig {
17
17
  this.rootSchema = NormalizedSchema.of(schema);
18
18
  this.buffer = this._write(this.rootSchema, value);
19
19
  }
20
- writeDiscriminatedDocument(schema, value) {
21
- this.write(schema, value);
22
- if (typeof this.buffer === "object") {
23
- this.buffer.__type = NormalizedSchema.of(schema).getName(true);
24
- }
25
- }
26
20
  flush() {
27
21
  const { rootSchema, useReplacer } = this;
28
22
  this.rootSchema = undefined;
@@ -36,6 +30,12 @@ export class JsonShapeSerializer extends SerdeContextConfig {
36
30
  }
37
31
  return this.buffer;
38
32
  }
33
+ writeDiscriminatedDocument(schema, value) {
34
+ this.write(schema, value);
35
+ if (typeof this.buffer === "object") {
36
+ this.buffer.__type = NormalizedSchema.of(schema).getName(true);
37
+ }
38
+ }
39
39
  _write(schema, value, container) {
40
40
  const isObject = value !== null && typeof value === "object";
41
41
  const ns = NormalizedSchema.of(schema);
@@ -48,6 +48,7 @@ export class JsonShapeSerializer extends SerdeContextConfig {
48
48
  if (jsonName) {
49
49
  nameMap = {};
50
50
  }
51
+ let outCount = 0;
51
52
  for (const [memberName, memberSchema] of ns.structIterator()) {
52
53
  const serializableValue = this._write(memberSchema, record[memberName], ns);
53
54
  if (serializableValue !== undefined) {
@@ -57,9 +58,10 @@ export class JsonShapeSerializer extends SerdeContextConfig {
57
58
  nameMap[memberName] = targetKey;
58
59
  }
59
60
  out[targetKey] = serializableValue;
61
+ outCount++;
60
62
  }
61
63
  }
62
- if (ns.isUnionSchema() && Object.keys(out).length === 0) {
64
+ if (ns.isUnionSchema() && outCount === 0) {
63
65
  const { $unknown } = record;
64
66
  if (Array.isArray($unknown)) {
65
67
  const [k, v] = $unknown;