@scality/cloudserverclient 0.0.2 → 0.0.3

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 (68) hide show
  1. package/README.md +0 -9
  2. package/build/smithy/source/typescript-codegen/dist-types/runtimeConfig.browser.d.ts +6 -1
  3. package/build/smithy/source/typescript-codegen/dist-types/runtimeConfig.d.ts +6 -1
  4. package/build/smithy/source/typescript-codegen/dist-types/runtimeConfig.native.d.ts +6 -1
  5. package/build/smithy/source/typescript-codegen/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-sdk/types/package.json +3 -3
  6. package/build/smithy/source/typescript-codegen/node_modules/@aws-crypto/sha256-js/node_modules/@aws-sdk/types/package.json +3 -3
  7. package/build/smithy/source/typescript-codegen/node_modules/@aws-crypto/util/node_modules/@aws-sdk/types/package.json +3 -3
  8. package/build/smithy/source/typescript-codegen/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +10 -38
  9. package/build/smithy/source/typescript-codegen/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
  10. package/build/smithy/source/typescript-codegen/node_modules/@smithy/abort-controller/package.json +2 -2
  11. package/build/smithy/source/typescript-codegen/node_modules/@smithy/config-resolver/package.json +5 -5
  12. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +19 -3
  13. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +8 -2
  14. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +19 -3
  15. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +8 -2
  16. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +6 -0
  17. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +6 -0
  18. package/build/smithy/source/typescript-codegen/node_modules/@smithy/core/package.json +10 -8
  19. package/build/smithy/source/typescript-codegen/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  20. package/build/smithy/source/typescript-codegen/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  21. package/build/smithy/source/typescript-codegen/node_modules/@smithy/hash-node/package.json +2 -2
  22. package/build/smithy/source/typescript-codegen/node_modules/@smithy/invalid-dependency/package.json +2 -2
  23. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-content-length/package.json +3 -3
  24. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +11 -3
  25. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +10 -2
  26. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +1 -1
  27. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/createConfigValueProvider.d.ts +2 -1
  28. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/createConfigValueProvider.d.ts +2 -1
  29. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  30. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-retry/package.json +8 -8
  31. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-serde/package.json +3 -3
  32. package/build/smithy/source/typescript-codegen/node_modules/@smithy/middleware-stack/package.json +2 -2
  33. package/build/smithy/source/typescript-codegen/node_modules/@smithy/node-config-provider/package.json +4 -4
  34. package/build/smithy/source/typescript-codegen/node_modules/@smithy/node-http-handler/package.json +5 -5
  35. package/build/smithy/source/typescript-codegen/node_modules/@smithy/property-provider/package.json +2 -2
  36. package/build/smithy/source/typescript-codegen/node_modules/@smithy/protocol-http/package.json +2 -2
  37. package/build/smithy/source/typescript-codegen/node_modules/@smithy/querystring-builder/package.json +2 -2
  38. package/build/smithy/source/typescript-codegen/node_modules/@smithy/querystring-parser/package.json +2 -2
  39. package/build/smithy/source/typescript-codegen/node_modules/@smithy/service-error-classification/package.json +2 -2
  40. package/build/smithy/source/typescript-codegen/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  41. package/build/smithy/source/typescript-codegen/node_modules/@smithy/signature-v4/package.json +4 -4
  42. package/build/smithy/source/typescript-codegen/node_modules/@smithy/smithy-client/dist-cjs/index.js +6 -0
  43. package/build/smithy/source/typescript-codegen/node_modules/@smithy/smithy-client/dist-es/client.js +6 -0
  44. package/build/smithy/source/typescript-codegen/node_modules/@smithy/smithy-client/dist-types/client.d.ts +33 -7
  45. package/build/smithy/source/typescript-codegen/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts +33 -7
  46. package/build/smithy/source/typescript-codegen/node_modules/@smithy/smithy-client/package.json +7 -7
  47. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +7 -0
  48. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/schema/schema.d.ts +6 -0
  49. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +16 -1
  50. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +7 -0
  51. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +6 -0
  52. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +16 -1
  53. package/build/smithy/source/typescript-codegen/node_modules/@smithy/types/package.json +1 -1
  54. package/build/smithy/source/typescript-codegen/node_modules/@smithy/url-parser/package.json +3 -3
  55. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  56. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  57. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-endpoints/package.json +3 -3
  58. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-middleware/package.json +2 -2
  59. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-retry/package.json +3 -3
  60. package/build/smithy/source/typescript-codegen/node_modules/@smithy/util-stream/package.json +4 -4
  61. package/build/smithy/source/typescript-codegen/node_modules/downlevel-dts/node_modules/typescript/lib/_tsc.js +1 -1
  62. package/build/smithy/source/typescript-codegen/node_modules/downlevel-dts/node_modules/typescript/lib/typescript.js +1 -1
  63. package/build/smithy/source/typescript-codegen/node_modules/downlevel-dts/node_modules/typescript/package.json +2 -2
  64. package/build/smithy/source/typescript-codegen/tsconfig.cjs.tsbuildinfo +1 -1
  65. package/build/smithy/source/typescript-codegen/tsconfig.es.tsbuildinfo +1 -1
  66. package/build/smithy/source/typescript-codegen/tsconfig.types.tsbuildinfo +1 -1
  67. package/build/smithy/source/typescript-codegen/yarn.lock +203 -203
  68. package/package.json +3 -3
package/README.md CHANGED
@@ -17,15 +17,6 @@ yarn build
17
17
  ### Local testing
18
18
 
19
19
  1. Install dependencies & build the smithy client: `yarn build`
20
-
21
- If you want to try a release build in another project, you can also push your branch after adding this push condition in `release.yml`:
22
- ```yaml
23
- # Uncomment to test your work as a release before it's merged
24
- push:
25
- branches:
26
- - improvement/CLDSRVCLT-X
27
- ```
28
-
29
20
  2. Start CloudServer: `S3VAULT=mem S3METADATA=mem S3DATA=mem REMOTE_MANAGEMENT_DISABLE=true yarn start`
30
21
  Some tests require different cloudserver setup :
31
22
  For example : tests/testIndexesApis.test.ts : `S3METADATA=mongodb`
@@ -17,8 +17,13 @@ export declare const getRuntimeConfig: (config: CloudserverClientConfig) => {
17
17
  streamCollector: import("@smithy/types").StreamCollector;
18
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
19
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
- apiVersion: string;
21
20
  cacheMiddleware?: boolean | undefined;
21
+ protocol?: (import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any>) | undefined;
22
+ protocolSettings?: {
23
+ defaultNamespace?: string;
24
+ [setting: string]: unknown;
25
+ } | undefined;
26
+ apiVersion: string;
22
27
  urlParser: import("@smithy/types").UrlParser;
23
28
  base64Decoder: import("@smithy/types").Decoder;
24
29
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -19,8 +19,13 @@ export declare const getRuntimeConfig: (config: CloudserverClientConfig) => {
19
19
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
20
20
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
21
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
22
- apiVersion: string;
23
22
  cacheMiddleware?: boolean | undefined;
23
+ protocol?: (import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any>) | undefined;
24
+ protocolSettings?: {
25
+ defaultNamespace?: string;
26
+ [setting: string]: unknown;
27
+ } | undefined;
28
+ apiVersion: string;
24
29
  urlParser: import("@smithy/types").UrlParser;
25
30
  base64Decoder: import("@smithy/types").Decoder;
26
31
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -6,8 +6,13 @@ export declare const getRuntimeConfig: (config: CloudserverClientConfig) => {
6
6
  runtime: string;
7
7
  sha256: import("@smithy/types").HashConstructor;
8
8
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
9
- apiVersion: string;
10
9
  cacheMiddleware?: boolean;
10
+ protocol?: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any>;
11
+ protocolSettings?: {
12
+ defaultNamespace?: string;
13
+ [setting: string]: unknown;
14
+ };
15
+ apiVersion: string;
11
16
  urlParser: import("@smithy/types").UrlParser;
12
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
13
18
  streamCollector: import("@smithy/types").StreamCollector;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.936.0",
3
+ "version": "3.953.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
7
7
  "description": "Types for the AWS SDK",
8
8
  "scripts": {
9
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
9
+ "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
10
10
  "build:cjs": "node ../../scripts/compilation/inline types",
11
11
  "build:es": "tsc -p tsconfig.es.json",
12
12
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
@@ -42,7 +42,7 @@
42
42
  "directory": "packages/types"
43
43
  },
44
44
  "dependencies": {
45
- "@smithy/types": "^4.9.0",
45
+ "@smithy/types": "^4.10.0",
46
46
  "tslib": "^2.6.2"
47
47
  },
48
48
  "devDependencies": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.936.0",
3
+ "version": "3.953.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
7
7
  "description": "Types for the AWS SDK",
8
8
  "scripts": {
9
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
9
+ "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
10
10
  "build:cjs": "node ../../scripts/compilation/inline types",
11
11
  "build:es": "tsc -p tsconfig.es.json",
12
12
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
@@ -42,7 +42,7 @@
42
42
  "directory": "packages/types"
43
43
  },
44
44
  "dependencies": {
45
- "@smithy/types": "^4.9.0",
45
+ "@smithy/types": "^4.10.0",
46
46
  "tslib": "^2.6.2"
47
47
  },
48
48
  "devDependencies": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.936.0",
3
+ "version": "3.953.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
7
7
  "description": "Types for the AWS SDK",
8
8
  "scripts": {
9
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
9
+ "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
10
10
  "build:cjs": "node ../../scripts/compilation/inline types",
11
11
  "build:es": "tsc -p tsconfig.es.json",
12
12
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
@@ -42,7 +42,7 @@
42
42
  "directory": "packages/types"
43
43
  },
44
44
  "dependencies": {
45
- "@smithy/types": "^4.9.0",
45
+ "@smithy/types": "^4.10.0",
46
46
  "tslib": "^2.6.2"
47
47
  },
48
48
  "devDependencies": {
@@ -1,42 +1,14 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
20
2
 
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- locateWindow: () => locateWindow
25
- });
26
- module.exports = __toCommonJS(index_exports);
27
- var fallbackWindow = {};
3
+ const fallbackWindow = {};
28
4
  function locateWindow() {
29
- if (typeof window !== "undefined") {
30
- return window;
31
- } else if (typeof self !== "undefined") {
32
- return self;
33
- }
34
- return fallbackWindow;
5
+ if (typeof window !== "undefined") {
6
+ return window;
7
+ }
8
+ else if (typeof self !== "undefined") {
9
+ return self;
10
+ }
11
+ return fallbackWindow;
35
12
  }
36
- __name(locateWindow, "locateWindow");
37
- // Annotate the CommonJS export names for ESM import in node:
38
-
39
- 0 && (module.exports = {
40
- locateWindow
41
- });
42
13
 
14
+ exports.locateWindow = locateWindow;
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-locate-window",
3
- "version": "3.893.0",
3
+ "version": "3.953.0",
4
4
  "scripts": {
5
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
5
+ "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline util-locate-window",
7
7
  "build:es": "tsc -p tsconfig.es.json",
8
8
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/abort-controller",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "description": "A simple abort controller library",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,7 +26,7 @@
26
26
  "license": "Apache-2.0",
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@smithy/types": "^4.9.0",
29
+ "@smithy/types": "^4.11.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/config-resolver",
3
- "version": "4.4.3",
3
+ "version": "4.4.5",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline config-resolver",
@@ -25,11 +25,11 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/node-config-provider": "^4.3.5",
29
- "@smithy/types": "^4.9.0",
28
+ "@smithy/node-config-provider": "^4.3.7",
29
+ "@smithy/types": "^4.11.0",
30
30
  "@smithy/util-config-provider": "^4.2.0",
31
- "@smithy/util-endpoints": "^3.2.5",
32
- "@smithy/util-middleware": "^4.2.5",
31
+ "@smithy/util-endpoints": "^3.2.7",
32
+ "@smithy/util-middleware": "^4.2.7",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
@@ -851,6 +851,11 @@ class CborShapeSerializer extends protocols.SerdeContext {
851
851
  newObject[key] = value;
852
852
  }
853
853
  }
854
+ const isUnion = ns.isUnionSchema();
855
+ if (isUnion && Array.isArray(sourceObject.$unknown)) {
856
+ const [k, v] = sourceObject.$unknown;
857
+ newObject[k] = v;
858
+ }
854
859
  }
855
860
  else if (ns.isDocumentSchema()) {
856
861
  for (const key of Object.keys(sourceObject)) {
@@ -935,11 +940,22 @@ class CborShapeDeserializer extends protocols.SerdeContext {
935
940
  }
936
941
  }
937
942
  else if (ns.isStructSchema()) {
943
+ const isUnion = ns.isUnionSchema();
944
+ let keys;
945
+ if (isUnion) {
946
+ keys = new Set(Object.keys(value).filter((k) => k !== "__type"));
947
+ }
938
948
  for (const [key, memberSchema] of ns.structIterator()) {
939
- const v = this.readValue(memberSchema, value[key]);
940
- if (v != null) {
941
- newObject[key] = v;
949
+ if (isUnion) {
950
+ keys.delete(key);
942
951
  }
952
+ if (value[key] != null) {
953
+ newObject[key] = this.readValue(memberSchema, value[key]);
954
+ }
955
+ }
956
+ if (isUnion && keys?.size === 1 && Object.keys(newObject).length === 0) {
957
+ const k = keys.values().next().value;
958
+ newObject.$unknown = [k, value[k]];
943
959
  }
944
960
  }
945
961
  return newObject;
@@ -350,8 +350,14 @@ class NormalizedSchema {
350
350
  }
351
351
  isStructSchema() {
352
352
  const sc = this.getSchema();
353
- return (sc[0] === 3 ||
354
- sc[0] === -3);
353
+ const id = sc[0];
354
+ return (id === 3 ||
355
+ id === -3 ||
356
+ id === 4);
357
+ }
358
+ isUnionSchema() {
359
+ const sc = this.getSchema();
360
+ return sc[0] === 4;
355
361
  }
356
362
  isBlobSchema() {
357
363
  const sc = this.getSchema();
@@ -75,6 +75,11 @@ export class CborShapeSerializer extends SerdeContext {
75
75
  newObject[key] = value;
76
76
  }
77
77
  }
78
+ const isUnion = ns.isUnionSchema();
79
+ if (isUnion && Array.isArray(sourceObject.$unknown)) {
80
+ const [k, v] = sourceObject.$unknown;
81
+ newObject[k] = v;
82
+ }
78
83
  }
79
84
  else if (ns.isDocumentSchema()) {
80
85
  for (const key of Object.keys(sourceObject)) {
@@ -159,11 +164,22 @@ export class CborShapeDeserializer extends SerdeContext {
159
164
  }
160
165
  }
161
166
  else if (ns.isStructSchema()) {
167
+ const isUnion = ns.isUnionSchema();
168
+ let keys;
169
+ if (isUnion) {
170
+ keys = new Set(Object.keys(value).filter((k) => k !== "__type"));
171
+ }
162
172
  for (const [key, memberSchema] of ns.structIterator()) {
163
- const v = this.readValue(memberSchema, value[key]);
164
- if (v != null) {
165
- newObject[key] = v;
173
+ if (isUnion) {
174
+ keys.delete(key);
166
175
  }
176
+ if (value[key] != null) {
177
+ newObject[key] = this.readValue(memberSchema, value[key]);
178
+ }
179
+ }
180
+ if (isUnion && keys?.size === 1 && Object.keys(newObject).length === 0) {
181
+ const k = keys.values().next().value;
182
+ newObject.$unknown = [k, value[k]];
167
183
  }
168
184
  }
169
185
  return newObject;
@@ -110,8 +110,14 @@ export class NormalizedSchema {
110
110
  }
111
111
  isStructSchema() {
112
112
  const sc = this.getSchema();
113
- return (sc[0] === 3 ||
114
- sc[0] === -3);
113
+ const id = sc[0];
114
+ return (id === 3 ||
115
+ id === -3 ||
116
+ id === 4);
117
+ }
118
+ isUnionSchema() {
119
+ const sc = this.getSchema();
120
+ return sc[0] === 4;
115
121
  }
116
122
  isBlobSchema() {
117
123
  const sc = this.getSchema();
@@ -45,7 +45,13 @@ export declare class NormalizedSchema implements INormalizedSchema {
45
45
  */
46
46
  isListSchema(): boolean;
47
47
  isMapSchema(): boolean;
48
+ /**
49
+ * To simplify serialization logic, static union schemas are considered a specialization
50
+ * of structs in the TypeScript typings and JS runtime, as well as static error schemas
51
+ * which have a different identifier.
52
+ */
48
53
  isStructSchema(): boolean;
54
+ isUnionSchema(): boolean;
49
55
  isBlobSchema(): boolean;
50
56
  isTimestampSchema(): boolean;
51
57
  isUnitSchema(): boolean;
@@ -45,7 +45,13 @@ export declare class NormalizedSchema implements INormalizedSchema {
45
45
  */
46
46
  isListSchema(): boolean;
47
47
  isMapSchema(): boolean;
48
+ /**
49
+ * To simplify serialization logic, static union schemas are considered a specialization
50
+ * of structs in the TypeScript typings and JS runtime, as well as static error schemas
51
+ * which have a different identifier.
52
+ */
48
53
  isStructSchema(): boolean;
54
+ isUnionSchema(): boolean;
49
55
  isBlobSchema(): boolean;
50
56
  isTimestampSchema(): boolean;
51
57
  isUnitSchema(): boolean;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.18.7",
3
+ "version": "3.20.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -14,7 +14,9 @@
14
14
  "extract:docs": "api-extractor run --local",
15
15
  "test:cbor:perf": "node ./scripts/cbor-perf.mjs",
16
16
  "test": "yarn g:vitest run",
17
- "test:watch": "yarn g:vitest watch"
17
+ "test:watch": "yarn g:vitest watch",
18
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
19
+ "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
18
20
  },
19
21
  "main": "./dist-cjs/index.js",
20
22
  "module": "./dist-es/index.js",
@@ -77,13 +79,13 @@
77
79
  "license": "Apache-2.0",
78
80
  "sideEffects": false,
79
81
  "dependencies": {
80
- "@smithy/middleware-serde": "^4.2.6",
81
- "@smithy/protocol-http": "^5.3.5",
82
- "@smithy/types": "^4.9.0",
82
+ "@smithy/middleware-serde": "^4.2.8",
83
+ "@smithy/protocol-http": "^5.3.7",
84
+ "@smithy/types": "^4.11.0",
83
85
  "@smithy/util-base64": "^4.3.0",
84
86
  "@smithy/util-body-length-browser": "^4.2.0",
85
- "@smithy/util-middleware": "^4.2.5",
86
- "@smithy/util-stream": "^4.5.6",
87
+ "@smithy/util-middleware": "^4.2.7",
88
+ "@smithy/util-stream": "^4.5.8",
87
89
  "@smithy/util-utf8": "^4.2.0",
88
90
  "@smithy/uuid": "^1.1.0",
89
91
  "tslib": "^2.6.2"
@@ -118,7 +120,7 @@
118
120
  "directory": "packages/core"
119
121
  },
120
122
  "devDependencies": {
121
- "@smithy/eventstream-serde-node": "^4.2.5",
123
+ "@smithy/eventstream-serde-node": "^4.2.7",
122
124
  "@types/node": "^18.11.9",
123
125
  "concurrently": "7.0.0",
124
126
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -28,10 +28,10 @@
28
28
  "license": "Apache-2.0",
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@smithy/node-config-provider": "^4.3.5",
32
- "@smithy/property-provider": "^4.2.5",
33
- "@smithy/types": "^4.9.0",
34
- "@smithy/url-parser": "^4.2.5",
31
+ "@smithy/node-config-provider": "^4.3.7",
32
+ "@smithy/property-provider": "^4.2.7",
33
+ "@smithy/types": "^4.11.0",
34
+ "@smithy/url-parser": "^4.2.7",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.3.6",
3
+ "version": "5.3.8",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -28,14 +28,14 @@
28
28
  "module": "./dist-es/index.js",
29
29
  "types": "./dist-types/index.d.ts",
30
30
  "dependencies": {
31
- "@smithy/protocol-http": "^5.3.5",
32
- "@smithy/querystring-builder": "^4.2.5",
33
- "@smithy/types": "^4.9.0",
31
+ "@smithy/protocol-http": "^5.3.7",
32
+ "@smithy/querystring-builder": "^4.2.7",
33
+ "@smithy/types": "^4.11.0",
34
34
  "@smithy/util-base64": "^4.3.0",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@smithy/abort-controller": "^4.2.5",
38
+ "@smithy/abort-controller": "^4.2.7",
39
39
  "concurrently": "7.0.0",
40
40
  "downlevel-dts": "0.10.1",
41
41
  "rimraf": "3.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/hash-node",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline hash-node",
@@ -32,7 +32,7 @@
32
32
  "typedoc": "0.23.23"
33
33
  },
34
34
  "dependencies": {
35
- "@smithy/types": "^4.9.0",
35
+ "@smithy/types": "^4.11.0",
36
36
  "@smithy/util-buffer-from": "^4.2.0",
37
37
  "@smithy/util-utf8": "^4.2.0",
38
38
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/invalid-dependency",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline invalid-dependency",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
- "@smithy/types": "^4.9.0",
27
+ "@smithy/types": "^4.11.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-content-length",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-content-length",
@@ -25,8 +25,8 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/protocol-http": "^5.3.5",
29
- "@smithy/types": "^4.9.0",
28
+ "@smithy/protocol-http": "^5.3.7",
29
+ "@smithy/types": "^4.11.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {
@@ -42,9 +42,17 @@ const isArnBucketName = (bucketName) => {
42
42
  return isValidArn;
43
43
  };
44
44
 
45
- const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
45
+ const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
46
46
  const configProvider = async () => {
47
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
47
+ let configValue;
48
+ if (isClientContextParam) {
49
+ const clientContextParams = config.clientContextParams;
50
+ const nestedValue = clientContextParams?.[configKey];
51
+ configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
52
+ }
53
+ else {
54
+ configValue = config[configKey] ?? config[canonicalEndpointParamKey];
55
+ }
48
56
  if (typeof configValue === "function") {
49
57
  return configValue();
50
58
  }
@@ -129,7 +137,7 @@ const resolveParams = async (commandInput, instructionsSupplier, clientConfig) =
129
137
  break;
130
138
  case "clientContextParams":
131
139
  case "builtInParams":
132
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
140
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
133
141
  break;
134
142
  case "operationContextParams":
135
143
  endpointParams[name] = instruction.get(commandInput);
@@ -1,6 +1,14 @@
1
- export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
1
+ export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
2
2
  const configProvider = async () => {
3
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
3
+ let configValue;
4
+ if (isClientContextParam) {
5
+ const clientContextParams = config.clientContextParams;
6
+ const nestedValue = clientContextParams?.[configKey];
7
+ configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];
8
+ }
9
+ else {
10
+ configValue = config[configKey] ?? config[canonicalEndpointParamKey];
11
+ }
4
12
  if (typeof configValue === "function") {
5
13
  return configValue();
6
14
  }
@@ -36,7 +36,7 @@ export const resolveParams = async (commandInput, instructionsSupplier, clientCo
36
36
  break;
37
37
  case "clientContextParams":
38
38
  case "builtInParams":
39
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
39
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
40
40
  break;
41
41
  case "operationContextParams":
42
42
  endpointParams[name] = instruction.get(commandInput);
@@ -7,7 +7,8 @@
7
7
  * it will most likely not contain the config
8
8
  * value, but we use it as a fallback.
9
9
  * @param config - container of the config values.
10
+ * @param isClientContextParam - whether this is a client context parameter.
10
11
  *
11
12
  * @returns async function that will resolve with the value.
12
13
  */
13
- export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise<any>;
14
+ export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config, isClientContextParam?: boolean) => () => Promise<any>;
@@ -7,7 +7,8 @@
7
7
  * it will most likely not contain the config
8
8
  * value, but we use it as a fallback.
9
9
  * @param config - container of the config values.
10
+ * @param isClientContextParam - whether this is a client context parameter.
10
11
  *
11
12
  * @returns async function that will resolve with the value.
12
13
  */
13
- export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config) => () => Promise<any>;
14
+ export declare const createConfigValueProvider: <Config extends Record<string, unknown>>(configKey: string, canonicalEndpointParamKey: string, config: Config, isClientContextParam?: boolean) => () => Promise<any>;