@aws-sdk/client-qbusiness 3.1075.0 → 3.1077.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
3
  import { invalidFunction, invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
5
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
@@ -28,7 +27,6 @@ export const getRuntimeConfig = (config) => {
28
27
  region: config?.region ?? invalidProvider("Region is missing"),
29
28
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
30
29
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
31
- sha256: config?.sha256 ?? Sha256,
32
30
  streamCollector: config?.streamCollector ?? streamCollector,
33
31
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
34
32
  useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
@@ -7,7 +7,7 @@ import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smi
7
7
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
8
8
  import { eventStreamSerdeProvider } from "@smithy/core/event-streams";
9
9
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
10
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
10
+ import { calculateBodyLength } from "@smithy/core/serde";
11
11
  import { NodeHttp2Handler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
13
  export const getRuntimeConfig = (config) => {
@@ -42,7 +42,6 @@ export const getRuntimeConfig = (config) => {
42
42
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
43
43
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
44
44
  }, config),
45
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
46
45
  streamCollector: config?.streamCollector ?? streamCollector,
47
46
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
48
47
  useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { invalidFunction } from "@smithy/core/client";
3
2
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
4
3
  export const getRuntimeConfig = (config) => {
@@ -10,6 +9,5 @@ export const getRuntimeConfig = (config) => {
10
9
  eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
11
10
  handle: invalidFunction("event stream request is not supported in ReactNative."),
12
11
  })),
13
- sha256: config?.sha256 ?? Sha256,
14
12
  };
15
13
  };
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
3
+ import { Sha256 } from "@smithy/core/checksum";
3
4
  import { NoOpLogger } from "@smithy/core/client";
4
5
  import { parseUrl } from "@smithy/core/protocols";
5
6
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -31,6 +32,7 @@ export const getRuntimeConfig = (config) => {
31
32
  serviceTarget: "ExpertQ",
32
33
  },
33
34
  serviceId: config?.serviceId ?? "QBusiness",
35
+ sha256: config?.sha256 ?? Sha256,
34
36
  urlParser: config?.urlParser ?? parseUrl,
35
37
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
38
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -15,8 +15,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
15
15
  region: string | import("@smithy/types").Provider<any>;
16
16
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
17
17
  retryMode: string | import("@smithy/types").Provider<string>;
18
- sha256: import("@smithy/types").HashConstructor;
19
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
20
19
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
21
20
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
22
21
  cacheMiddleware?: boolean | undefined;
@@ -26,6 +25,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
26
25
  [setting: string]: unknown;
27
26
  };
28
27
  apiVersion: string;
28
+ sha256: import("@smithy/types").HashConstructor;
29
29
  urlParser: import("@smithy/types").UrlParser;
30
30
  base64Decoder: import("@smithy/types").Decoder;
31
31
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -16,8 +16,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
16
16
  region: string | import("@smithy/types").Provider<string>;
17
17
  requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
18
18
  retryMode: string | import("@smithy/types").Provider<string>;
19
- sha256: import("@smithy/types").HashConstructor;
20
- streamCollector: import("@smithy/types").StreamCollector;
19
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
21
20
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
22
21
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
23
22
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -28,6 +27,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
28
27
  [setting: string]: unknown;
29
28
  };
30
29
  apiVersion: string;
30
+ sha256: import("@smithy/types").HashConstructor;
31
31
  urlParser: import("@smithy/types").UrlParser;
32
32
  base64Decoder: import("@smithy/types").Decoder;
33
33
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -5,7 +5,6 @@ import type { QBusinessClientConfig } from "./QBusinessClient";
5
5
  export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
6
6
  runtime: string;
7
7
  eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
8
- sha256: import("@smithy/types").HashConstructor;
9
8
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
10
9
  cacheMiddleware?: boolean;
11
10
  protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core/protocols").AwsRestJsonProtocol;
@@ -14,9 +13,10 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
14
13
  [setting: string]: unknown;
15
14
  };
16
15
  apiVersion: string;
16
+ sha256: import("@smithy/types").HashConstructor;
17
17
  urlParser: import("@smithy/types").UrlParser;
18
18
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
19
- streamCollector: import("@smithy/types").StreamCollector;
19
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
20
20
  base64Decoder: import("@smithy/types").Decoder;
21
21
  base64Encoder: (_input: Uint8Array | string) => string;
22
22
  utf8Decoder: import("@smithy/types").Decoder;
@@ -21,6 +21,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
21
21
  defaultNamespace?: string;
22
22
  };
23
23
  serviceId: string;
24
+ sha256: import("@smithy/types").HashConstructor;
24
25
  urlParser: import("@smithy/types").UrlParser;
25
26
  utf8Decoder: import("@smithy/types").Decoder;
26
27
  utf8Encoder: (input: Uint8Array | string) => string;
@@ -22,8 +22,13 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
22
22
  | import("@smithy/core/protocols").HttpHandler<any>
23
23
  | RequestHandler;
24
24
  retryMode: string | import("@smithy/types").Provider<string>;
25
- sha256: import("@smithy/types").HashConstructor;
26
- streamCollector: import("@smithy/types").StreamCollector;
25
+ streamCollector: (
26
+ stream:
27
+ | import("stream").Readable
28
+ | import("stream/web").ReadableStream
29
+ | ReadableStream
30
+ | Blob
31
+ ) => Promise<Uint8Array>;
27
32
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
28
33
  (boolean | import("@smithy/types").Provider<boolean | undefined>);
29
34
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
@@ -38,6 +43,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
38
43
  [setting: string]: unknown;
39
44
  };
40
45
  apiVersion: string;
46
+ sha256: import("@smithy/types").HashConstructor;
41
47
  urlParser: import("@smithy/types").UrlParser;
42
48
  base64Decoder: import("@smithy/types").Decoder;
43
49
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -23,8 +23,13 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
23
23
  | RequestHandler
24
24
  | import("@smithy/core/protocols").HttpHandler<any>;
25
25
  retryMode: string | import("@smithy/types").Provider<string>;
26
- sha256: import("@smithy/types").HashConstructor;
27
- streamCollector: import("@smithy/types").StreamCollector;
26
+ streamCollector: (
27
+ stream:
28
+ | import("stream").Readable
29
+ | import("stream/web").ReadableStream
30
+ | ReadableStream
31
+ | Blob
32
+ ) => Promise<Uint8Array>;
28
33
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
29
34
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
30
35
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -38,6 +43,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
38
43
  [setting: string]: unknown;
39
44
  };
40
45
  apiVersion: string;
46
+ sha256: import("@smithy/types").HashConstructor;
41
47
  urlParser: import("@smithy/types").UrlParser;
42
48
  base64Decoder: import("@smithy/types").Decoder;
43
49
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -2,7 +2,6 @@ import { QBusinessClientConfig } from "./QBusinessClient";
2
2
  export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
3
3
  runtime: string;
4
4
  eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
5
- sha256: import("@smithy/types").HashConstructor;
6
5
  requestHandler:
7
6
  | import("@smithy/types").NodeHttpHandlerOptions
8
7
  | import("@smithy/types").FetchHttpHandlerOptions
@@ -19,9 +18,16 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
19
18
  [setting: string]: unknown;
20
19
  };
21
20
  apiVersion: string;
21
+ sha256: import("@smithy/types").HashConstructor;
22
22
  urlParser: import("@smithy/types").UrlParser;
23
23
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
24
- streamCollector: import("@smithy/types").StreamCollector;
24
+ streamCollector: (
25
+ stream:
26
+ | import("stream").Readable
27
+ | import("stream/web").ReadableStream
28
+ | ReadableStream
29
+ | Blob
30
+ ) => Promise<Uint8Array>;
25
31
  base64Decoder: import("@smithy/types").Decoder;
26
32
  base64Encoder: (_input: Uint8Array | string) => string;
27
33
  utf8Decoder: import("@smithy/types").Decoder;
@@ -24,6 +24,7 @@ export declare const getRuntimeConfig: (config: QBusinessClientConfig) => {
24
24
  defaultNamespace?: string;
25
25
  };
26
26
  serviceId: string;
27
+ sha256: import("@smithy/types").HashConstructor;
27
28
  urlParser: import("@smithy/types").UrlParser;
28
29
  utf8Decoder: import("@smithy/types").Decoder;
29
30
  utf8Encoder: (input: Uint8Array | string) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-qbusiness",
3
3
  "description": "AWS SDK for JavaScript Qbusiness Client for Node.js, Browser and React Native",
4
- "version": "3.1075.0",
4
+ "version": "3.1077.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -23,21 +23,19 @@
23
23
  "module": "./dist-es/index.js",
24
24
  "sideEffects": false,
25
25
  "dependencies": {
26
- "@aws-crypto/sha256-browser": "5.2.0",
27
- "@aws-crypto/sha256-js": "5.2.0",
28
- "@aws-sdk/core": "^3.974.23",
29
- "@aws-sdk/credential-provider-node": "^3.972.58",
30
- "@aws-sdk/eventstream-handler-node": "^3.972.22",
31
- "@aws-sdk/middleware-eventstream": "^3.972.18",
32
- "@aws-sdk/types": "^3.973.13",
33
- "@smithy/core": "^3.24.6",
34
- "@smithy/fetch-http-handler": "^5.4.6",
35
- "@smithy/node-http-handler": "^4.7.6",
36
- "@smithy/types": "^4.14.3",
26
+ "@aws-sdk/core": "^3.974.25",
27
+ "@aws-sdk/credential-provider-node": "^3.972.60",
28
+ "@aws-sdk/eventstream-handler-node": "^3.972.24",
29
+ "@aws-sdk/middleware-eventstream": "^3.972.20",
30
+ "@aws-sdk/types": "^3.973.14",
31
+ "@smithy/core": "^3.28.0",
32
+ "@smithy/fetch-http-handler": "^5.6.1",
33
+ "@smithy/node-http-handler": "^4.9.1",
34
+ "@smithy/types": "^4.15.0",
37
35
  "tslib": "^2.6.2"
38
36
  },
39
37
  "devDependencies": {
40
- "@smithy/snapshot-testing": "^2.1.7",
38
+ "@smithy/snapshot-testing": "^2.2.4",
41
39
  "@tsconfig/node20": "20.1.8",
42
40
  "@types/node": "^20.14.8",
43
41
  "concurrently": "7.0.0",
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.defaultQBusinessHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
- return {
5
- operation: getSmithyContext(context).operation,
6
- region: await normalizeProvider(config.region)() || (() => {
7
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
- })(),
9
- };
10
- };
11
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
- return {
13
- schemeId: "aws.auth#sigv4",
14
- signingProperties: {
15
- name: "qbusiness",
16
- region: authParameters.region,
17
- },
18
- propertiesExtractor: (config, context) => ({
19
- signingProperties: {
20
- config,
21
- context,
22
- },
23
- }),
24
- };
25
- }
26
- exports.defaultQBusinessHttpAuthSchemeProvider = (authParameters) => {
27
- const options = [];
28
- switch (authParameters.operation) {
29
- default: {
30
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
- }
32
- }
33
- return options;
34
- };
35
- exports.resolveHttpAuthSchemeConfig = (config) => {
36
- const config_0 = resolveAwsSdkSigV4Config(config);
37
- return Object.assign(config_0, {
38
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
- });
40
- };
@@ -1,38 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const j = "ref";
3
- const a = true, b = "isSet", c = "PartitionResult", d = "booleanEquals", e = "getAttr", f = { [j]: "Endpoint" }, g = { [j]: c }, h = {}, i = [{ [j]: "Region" }];
4
- const _data = {
5
- conditions: [
6
- [b, [f]],
7
- [b, i],
8
- ["aws.partition", i, c],
9
- [d, [{ [j]: "UseFIPS" }, a]],
10
- [d, [{ fn: e, argv: [g, "supportsFIPS"] }, a]],
11
- [d, [{ fn: e, argv: [g, "supportsDualStack"] }, a]]
12
- ],
13
- results: [
14
- [-1],
15
- [-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
16
- [f, h],
17
- ["https://qbusiness-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", h],
18
- [-1, "FIPS is enabled but this partition does not support FIPS"],
19
- ["https://qbusiness.{Region}.{PartitionResult#dualStackDnsSuffix}", h],
20
- ["https://qbusiness-fips.{Region}.{PartitionResult#dnsSuffix}", h],
21
- ["https://qbusiness.{Region}.{PartitionResult#dnsSuffix}", h],
22
- [-1, "Invalid Configuration: Missing Region"]
23
- ]
24
- };
25
- const root = 2;
26
- const r = 100_000_000;
27
- const nodes = new Int32Array([
28
- -1, 1, -1,
29
- 0, 9, 3,
30
- 1, 4, r + 8,
31
- 2, 5, r + 8,
32
- 3, 7, 6,
33
- 5, r + 5, r + 7,
34
- 4, 8, r + 4,
35
- 5, r + 3, r + 6,
36
- 3, r + 1, r + 2,
37
- ]);
38
- exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,14 +0,0 @@
1
- const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
- const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
- const { bdd } = require("./bdd");
4
- const cache = new EndpointCache({
5
- size: 50,
6
- params: ["Endpoint", "Region", "UseFIPS"],
7
- });
8
- exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
- return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
- endpointParams: endpointParams,
11
- logger: context.logger,
12
- }));
13
- };
14
- customEndpointFunctions.aws = awsEndpointFunctions;
@@ -1,8 +0,0 @@
1
- const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
- exports.__ServiceException = __ServiceException;
3
- exports.QBusinessServiceException = class QBusinessServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, QBusinessServiceException.prototype);
7
- }
8
- };
@@ -1,137 +0,0 @@
1
- const { QBusinessServiceException: __BaseException } = require("./QBusinessServiceException");
2
- exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
3
- name = "AccessDeniedException";
4
- $fault = "client";
5
- constructor(opts) {
6
- super({
7
- name: "AccessDeniedException",
8
- $fault: "client",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
- }
13
- };
14
- exports.ConflictException = class ConflictException extends __BaseException {
15
- name = "ConflictException";
16
- $fault = "client";
17
- resourceId;
18
- resourceType;
19
- constructor(opts) {
20
- super({
21
- name: "ConflictException",
22
- $fault: "client",
23
- ...opts,
24
- });
25
- Object.setPrototypeOf(this, ConflictException.prototype);
26
- this.resourceId = opts.resourceId;
27
- this.resourceType = opts.resourceType;
28
- }
29
- };
30
- exports.InternalServerException = class InternalServerException extends __BaseException {
31
- name = "InternalServerException";
32
- $fault = "server";
33
- constructor(opts) {
34
- super({
35
- name: "InternalServerException",
36
- $fault: "server",
37
- ...opts,
38
- });
39
- Object.setPrototypeOf(this, InternalServerException.prototype);
40
- }
41
- };
42
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
43
- name = "ResourceNotFoundException";
44
- $fault = "client";
45
- resourceId;
46
- resourceType;
47
- constructor(opts) {
48
- super({
49
- name: "ResourceNotFoundException",
50
- $fault: "client",
51
- ...opts,
52
- });
53
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
54
- this.resourceId = opts.resourceId;
55
- this.resourceType = opts.resourceType;
56
- }
57
- };
58
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
59
- name = "ServiceQuotaExceededException";
60
- $fault = "client";
61
- resourceId;
62
- resourceType;
63
- constructor(opts) {
64
- super({
65
- name: "ServiceQuotaExceededException",
66
- $fault: "client",
67
- ...opts,
68
- });
69
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
70
- this.resourceId = opts.resourceId;
71
- this.resourceType = opts.resourceType;
72
- }
73
- };
74
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
75
- name = "ThrottlingException";
76
- $fault = "client";
77
- constructor(opts) {
78
- super({
79
- name: "ThrottlingException",
80
- $fault: "client",
81
- ...opts,
82
- });
83
- Object.setPrototypeOf(this, ThrottlingException.prototype);
84
- }
85
- };
86
- exports.ValidationException = class ValidationException extends __BaseException {
87
- name = "ValidationException";
88
- $fault = "client";
89
- reason;
90
- fields;
91
- constructor(opts) {
92
- super({
93
- name: "ValidationException",
94
- $fault: "client",
95
- ...opts,
96
- });
97
- Object.setPrototypeOf(this, ValidationException.prototype);
98
- this.reason = opts.reason;
99
- this.fields = opts.fields;
100
- }
101
- };
102
- exports.ExternalResourceException = class ExternalResourceException extends __BaseException {
103
- name = "ExternalResourceException";
104
- $fault = "client";
105
- constructor(opts) {
106
- super({
107
- name: "ExternalResourceException",
108
- $fault: "client",
109
- ...opts,
110
- });
111
- Object.setPrototypeOf(this, ExternalResourceException.prototype);
112
- }
113
- };
114
- exports.LicenseNotFoundException = class LicenseNotFoundException extends __BaseException {
115
- name = "LicenseNotFoundException";
116
- $fault = "client";
117
- constructor(opts) {
118
- super({
119
- name: "LicenseNotFoundException",
120
- $fault: "client",
121
- ...opts,
122
- });
123
- Object.setPrototypeOf(this, LicenseNotFoundException.prototype);
124
- }
125
- };
126
- exports.MediaTooLargeException = class MediaTooLargeException extends __BaseException {
127
- name = "MediaTooLargeException";
128
- $fault = "client";
129
- constructor(opts) {
130
- super({
131
- name: "MediaTooLargeException",
132
- $fault: "client",
133
- ...opts,
134
- });
135
- Object.setPrototypeOf(this, MediaTooLargeException.prototype);
136
- }
137
- };
@@ -1,37 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidFunction, invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
7
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
8
- const { calculateBodyLength } = require("@smithy/core/serde");
9
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- const defaultsMode = resolveDefaultsModeConfig(config);
13
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
14
- const clientSharedValues = getSharedRuntimeConfig(config);
15
- return {
16
- ...clientSharedValues,
17
- ...config,
18
- runtime: "browser",
19
- defaultsMode,
20
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
21
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
22
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
24
- handle: invalidFunction("event stream request is not supported in browser."),
25
- })),
26
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
27
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
28
- region: config?.region ?? invalidProvider("Region is missing"),
29
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
30
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
31
- sha256: config?.sha256 ?? Sha256,
32
- streamCollector: config?.streamCollector ?? streamCollector,
33
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
34
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
35
- };
36
- };
37
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,52 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { eventStreamPayloadHandlerProvider } = require("@aws-sdk/eventstream-handler-node");
6
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
7
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
8
- const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
9
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
10
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
11
- const { NodeHttp2Handler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
12
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
13
- const getRuntimeConfig = (config) => {
14
- emitWarningIfUnsupportedVersion(process.version);
15
- const defaultsMode = resolveDefaultsModeConfig(config);
16
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
- const clientSharedValues = getSharedRuntimeConfig(config);
18
- awsCheckVersion(process.version);
19
- const loaderConfig = {
20
- profile: config?.profile,
21
- logger: clientSharedValues.logger,
22
- };
23
- return {
24
- ...clientSharedValues,
25
- ...config,
26
- runtime: "node",
27
- defaultsMode,
28
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
29
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
31
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
33
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
34
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
- requestHandler: RequestHandler.create(config?.requestHandler ?? (async () => ({
37
- ...await defaultConfigProvider(),
38
- disableConcurrentStreams: true
39
- }))),
40
- retryMode: config?.retryMode ??
41
- loadNodeConfig({
42
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
43
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
44
- }, config),
45
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
46
- streamCollector: config?.streamCollector ?? streamCollector,
47
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
48
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
50
- };
51
- };
52
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,16 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { invalidFunction } = require("@smithy/core/client");
3
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
4
- const getRuntimeConfig = (config) => {
5
- const browserDefaults = getBrowserRuntimeConfig(config);
6
- return {
7
- ...browserDefaults,
8
- ...config,
9
- runtime: "react-native",
10
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
11
- handle: invalidFunction("event stream request is not supported in ReactNative."),
12
- })),
13
- sha256: config?.sha256 ?? Sha256,
14
- };
15
- };
16
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,38 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultQBusinessHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2023-11-27",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultQBusinessHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsRestJsonProtocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.qbusiness",
29
- errorTypeRegistries,
30
- version: "2023-11-27",
31
- serviceTarget: "ExpertQ",
32
- },
33
- serviceId: config?.serviceId ?? "QBusiness",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };