@smithy/core 3.24.0 → 3.24.2
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.
- package/dist-cjs/submodules/cbor/index.js +1 -1
- package/dist-cjs/submodules/schema/index.js +12 -0
- package/dist-cjs/submodules/serde/index.browser.js +163 -210
- package/dist-cjs/submodules/serde/index.js +220 -122
- package/dist-cjs/submodules/serde/index.native.js +163 -210
- package/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/dist-es/submodules/schema/TypeRegistry.js +12 -0
- package/dist-es/submodules/serde/index.browser.js +16 -9
- package/dist-es/submodules/serde/index.js +14 -7
- package/dist-es/submodules/serde/index.native.js +14 -5
- package/dist-es/submodules/serde/util-base64/toBase64.browser.js +1 -1
- package/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js +19 -21
- package/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js +1 -1
- package/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js +2 -2
- package/dist-es/submodules/serde/util-stream/stream-collector.browser.js +1 -1
- package/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +10 -0
- package/dist-es/submodules/serde/uuid/v4.js +30 -29
- package/dist-types/pagination/createPaginator.d.ts +2 -2
- package/dist-types/request-builder/requestBuilder.d.ts +2 -1
- package/dist-types/setFeature.d.ts +3 -3
- package/dist-types/submodules/cbor/cbor-decode.d.ts +4 -3
- package/dist-types/submodules/cbor/cbor-types.d.ts +4 -4
- package/dist-types/submodules/cbor/cbor.d.ts +3 -4
- package/dist-types/submodules/checksum/chunked-blob-reader/chunked-blob-reader.d.ts +2 -1
- package/dist-types/submodules/client/smithy-client/client.d.ts +2 -5
- package/dist-types/submodules/client/smithy-client/default-error-handler.d.ts +2 -2
- package/dist-types/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.d.ts +1 -2
- package/dist-types/submodules/client/smithy-client/exceptions.d.ts +2 -2
- package/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +7 -7
- package/dist-types/submodules/client/smithy-client/get-array-if-single-item.d.ts +2 -2
- package/dist-types/submodules/client/smithy-client/get-value-from-text-node.d.ts +2 -2
- package/dist-types/submodules/client/smithy-client/object-mapping.d.ts +22 -21
- package/dist-types/submodules/client/smithy-client/ser-utils.d.ts +1 -2
- package/dist-types/submodules/client/smithy-client/serde-json.d.ts +1 -3
- package/dist-types/submodules/client/util-waiter/utils/validate.d.ts +2 -2
- package/dist-types/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.d.ts +2 -2
- package/dist-types/submodules/config/property-provider/CredentialsProviderError.d.ts +2 -3
- package/dist-types/submodules/config/property-provider/ProviderError.d.ts +2 -3
- package/dist-types/submodules/config/property-provider/TokenProviderError.d.ts +2 -3
- package/dist-types/submodules/config/property-provider/chain.d.ts +2 -3
- package/dist-types/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.d.ts +2 -1
- package/dist-types/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.d.ts +6 -5
- package/dist-types/submodules/endpoints/util-endpoints/cache/EndpointCache.d.ts +2 -2
- package/dist-types/submodules/endpoints/util-endpoints/getEndpointUrlConfig.d.ts +2 -1
- package/dist-types/submodules/protocols/collect-stream-body.d.ts +2 -2
- package/dist-types/submodules/protocols/extended-encode-uri-component.d.ts +2 -2
- package/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +4 -4
- package/dist-types/submodules/protocols/protocol-http/httpHandler.d.ts +2 -5
- package/dist-types/submodules/protocols/requestBuilder.d.ts +2 -1
- package/dist-types/submodules/retry/util-retry/constants.d.ts +4 -4
- package/dist-types/submodules/serde/date-utils.d.ts +7 -19
- package/dist-types/submodules/serde/index.browser.d.ts +15 -9
- package/dist-types/submodules/serde/index.d.ts +11 -7
- package/dist-types/submodules/serde/index.native.d.ts +9 -5
- package/dist-types/submodules/serde/lazy-json.d.ts +4 -6
- package/dist-types/submodules/serde/parse-utils.d.ts +31 -51
- package/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +3 -12
- package/dist-types/submodules/serde/split-every.d.ts +1 -2
- package/dist-types/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.d.ts +8 -12
- package/dist-types/submodules/serde/util-stream/createBufferedReadable.browser.d.ts +2 -1
- package/dist-types/submodules/serde/util-stream/createBufferedReadable.d.ts +2 -1
- package/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +2 -1
- package/dist-types/submodules/serde/util-utf8/toUint8Array.browser.d.ts +4 -0
- package/dist-types/submodules/serde/uuid/v4.d.ts +12 -7
- package/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts +2 -1
- package/package.json +1 -1
- package/dist-es/submodules/serde/generateIdempotencyToken.js +0 -2
- package/dist-es/submodules/serde/uuid/randomUUID.js +0 -3
- package/dist-types/submodules/serde/generateIdempotencyToken.d.ts +0 -2
- package/dist-types/submodules/serde/uuid/randomUUID.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { toBase64 } from "../util-base64/toBase64";
|
|
1
|
+
import { toBase64 } from "../util-base64/toBase64.browser";
|
|
2
2
|
import { toHex } from "../util-hex-encoding/hex-encoding";
|
|
3
|
-
import { toUtf8 } from "../util-utf8/toUtf8";
|
|
3
|
+
import { toUtf8 } from "../util-utf8/toUtf8.browser";
|
|
4
4
|
import { streamCollector } from "./stream-collector.browser";
|
|
5
5
|
import { isReadableStream } from "./stream-type-check";
|
|
6
6
|
const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fromBase64 } from "../util-base64/fromBase64";
|
|
1
|
+
import { fromBase64 } from "../util-base64/fromBase64.browser";
|
|
2
2
|
export const streamCollector = async (stream) => {
|
|
3
3
|
if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") {
|
|
4
4
|
if (Blob.prototype.arrayBuffer !== undefined) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { fromUtf8 } from "./fromUtf8.browser";
|
|
2
|
+
export const toUint8Array = (data) => {
|
|
3
|
+
if (typeof data === "string") {
|
|
4
|
+
return fromUtf8(data);
|
|
5
|
+
}
|
|
6
|
+
if (ArrayBuffer.isView(data)) {
|
|
7
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
8
|
+
}
|
|
9
|
+
return new Uint8Array(data);
|
|
10
|
+
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { randomUUID } from "./randomUUID";
|
|
2
1
|
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
3
|
-
export
|
|
4
|
-
if (randomUUID) {
|
|
5
|
-
return randomUUID();
|
|
2
|
+
export function bindV4(getRandomValues) {
|
|
3
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
4
|
+
return () => crypto.randomUUID();
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
decimalToHex[rnds[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
return () => {
|
|
7
|
+
const rnds = new Uint8Array(16);
|
|
8
|
+
getRandomValues(rnds);
|
|
9
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
10
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
11
|
+
return (decimalToHex[rnds[0]] +
|
|
12
|
+
decimalToHex[rnds[1]] +
|
|
13
|
+
decimalToHex[rnds[2]] +
|
|
14
|
+
decimalToHex[rnds[3]] +
|
|
15
|
+
"-" +
|
|
16
|
+
decimalToHex[rnds[4]] +
|
|
17
|
+
decimalToHex[rnds[5]] +
|
|
18
|
+
"-" +
|
|
19
|
+
decimalToHex[rnds[6]] +
|
|
20
|
+
decimalToHex[rnds[7]] +
|
|
21
|
+
"-" +
|
|
22
|
+
decimalToHex[rnds[8]] +
|
|
23
|
+
decimalToHex[rnds[9]] +
|
|
24
|
+
"-" +
|
|
25
|
+
decimalToHex[rnds[10]] +
|
|
26
|
+
decimalToHex[rnds[11]] +
|
|
27
|
+
decimalToHex[rnds[12]] +
|
|
28
|
+
decimalToHex[rnds[13]] +
|
|
29
|
+
decimalToHex[rnds[14]] +
|
|
30
|
+
decimalToHex[rnds[15]]);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
3
|
* Creates a paginator.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export declare function createPaginator<PaginationConfigType extends PaginationConfiguration, InputType extends object, OutputType extends object>(ClientCtor: any, CommandCtor: any, inputTokenName: string, outputTokenName: string, pageSizeTokenName?: string): (config: PaginationConfigType, input: InputType, ...additionalArguments: any[]) => Paginator<OutputType>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { HandlerExecutionContext, SmithyFeatures } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
|
-
* @internal
|
|
4
3
|
* Indicates to the request context that a given feature is active.
|
|
4
|
+
* specification asks the library not to include a runtime lookup of all
|
|
5
|
+
* the feature identifiers.
|
|
5
6
|
*
|
|
7
|
+
* @internal
|
|
6
8
|
* @param context - handler execution context.
|
|
7
9
|
* @param feature - readable name of feature.
|
|
8
10
|
* @param value - encoding value of feature. This is required because the
|
|
9
|
-
* specification asks the library not to include a runtime lookup of all
|
|
10
|
-
* the feature identifiers.
|
|
11
11
|
*/
|
|
12
12
|
export declare function setFeature<F extends keyof SmithyFeatures>(context: HandlerExecutionContext, feature: F, value: SmithyFeatures[F]): void;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { type CborValueType, type Float32, type Uint8, type Uint32 } from "./cbor-types";
|
|
2
2
|
/**
|
|
3
|
+
* Sets the decode bytearray source and its data view.
|
|
4
|
+
*
|
|
3
5
|
* @internal
|
|
4
6
|
* @param bytes - to be set as the decode source.
|
|
5
|
-
*
|
|
6
|
-
* Sets the decode bytearray source and its data view.
|
|
7
7
|
*/
|
|
8
8
|
export declare function setPayload(bytes: Uint8Array): void;
|
|
9
9
|
/**
|
|
10
|
-
* @internal
|
|
11
10
|
* Decodes the data between the two indices.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
12
13
|
*/
|
|
13
14
|
export declare function decode(at: Uint32, to: Uint32): CborValueType;
|
|
14
15
|
/**
|
|
@@ -39,17 +39,17 @@ export declare const extendedFloat64 = 27;
|
|
|
39
39
|
export declare const minorIndefinite = 31;
|
|
40
40
|
export declare function alloc(size: number): Uint8Array;
|
|
41
41
|
/**
|
|
42
|
-
* @public
|
|
43
|
-
*
|
|
44
42
|
* The presence of this symbol as an object key indicates it should be considered a tag
|
|
45
43
|
* for CBOR serialization purposes.
|
|
46
|
-
*
|
|
47
44
|
* The object must also have the properties "tag" and "value".
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
48
47
|
*/
|
|
49
48
|
export declare const tagSymbol: unique symbol;
|
|
50
49
|
/**
|
|
51
|
-
* @public
|
|
52
50
|
* Applies the tag symbol to the object.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
53
|
*/
|
|
54
54
|
export declare function tag(data: {
|
|
55
55
|
tag: number | bigint;
|
|
@@ -12,15 +12,14 @@ export declare const cbor: {
|
|
|
12
12
|
deserialize(payload: Uint8Array): any;
|
|
13
13
|
serialize(input: any): Uint8Array;
|
|
14
14
|
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @param size - byte length to allocate.
|
|
17
|
-
*
|
|
18
15
|
* This may be used to garbage collect the CBOR
|
|
19
16
|
* shared encoding buffer space,
|
|
20
17
|
* e.g. resizeEncodingBuffer(0);
|
|
21
|
-
*
|
|
22
18
|
* This may also be used to pre-allocate more space for
|
|
23
19
|
* CBOR encoding, e.g. resizeEncodingBuffer(100_000_000);
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
* @param size - byte length to allocate.
|
|
24
23
|
*/
|
|
25
24
|
resizeEncodingBuffer(size: number): void;
|
|
26
25
|
};
|
|
@@ -8,19 +8,16 @@ export interface SmithyConfiguration<HandlerOptions> {
|
|
|
8
8
|
*/
|
|
9
9
|
requestHandler: RequestHandler<any, any, HandlerOptions> | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<string, unknown>;
|
|
10
10
|
/**
|
|
11
|
-
* @public
|
|
12
|
-
*
|
|
13
11
|
* Default false.
|
|
14
|
-
*
|
|
15
12
|
* When true, the client will only resolve the middleware stack once per
|
|
16
13
|
* Command class. This means modifying the middlewareStack of the
|
|
17
14
|
* command or client after requests have been made will not be
|
|
18
15
|
* recognized.
|
|
19
|
-
*
|
|
20
16
|
* Calling client.destroy() also clears this cache.
|
|
21
|
-
*
|
|
22
17
|
* Enable this only if needing the additional time saved (0-1ms per request)
|
|
23
18
|
* and not needing middleware modifications between requests.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
24
21
|
*/
|
|
25
22
|
cacheMiddleware?: boolean;
|
|
26
23
|
/**
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const throwDefaultError: ({ output, parsedBody, exceptionCtor, errorCode }: any) => never;
|
|
8
8
|
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*
|
|
11
9
|
* Creates {@link throwDefaultError} with bound ExceptionCtor.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
12
|
*/
|
|
13
13
|
export declare const withBaseException: (ExceptionCtor: {
|
|
14
14
|
new (...args: any): any;
|
|
@@ -13,9 +13,9 @@ export interface ServiceExceptionOptions extends SmithyException, MetadataBearer
|
|
|
13
13
|
message?: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* @public
|
|
17
|
-
*
|
|
18
16
|
* Base exception class for the exceptions from the server-side.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
19
|
*/
|
|
20
20
|
export declare class ServiceException extends Error implements SmithyException, MetadataBearer {
|
|
21
21
|
readonly $fault: "client" | "server";
|
package/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { type PartialRetryRuntimeConfigType } from "./retry";
|
|
|
6
6
|
*/
|
|
7
7
|
export type DefaultExtensionRuntimeConfigType = PartialRetryRuntimeConfigType & PartialChecksumRuntimeConfigType;
|
|
8
8
|
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*
|
|
11
9
|
* Helper function to resolve default extension configuration from runtime config
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
12
|
*/
|
|
13
13
|
export declare const getDefaultExtensionConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => {
|
|
14
14
|
addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void;
|
|
@@ -18,10 +18,10 @@ export declare const getDefaultExtensionConfiguration: (runtimeConfig: DefaultEx
|
|
|
18
18
|
retryStrategy(): import("@smithy/types").Provider<import("@smithy/types").RetryStrategyV2 | import("@smithy/types").RetryStrategy>;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* @deprecated use getDefaultExtensionConfiguration
|
|
22
|
-
* @internal
|
|
23
|
-
*
|
|
24
21
|
* Helper function to resolve default extension configuration from runtime config
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated use getDefaultExtensionConfiguration
|
|
25
25
|
*/
|
|
26
26
|
export declare const getDefaultClientConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => {
|
|
27
27
|
addChecksumAlgorithm(algo: import("@smithy/types").ChecksumAlgorithm): void;
|
|
@@ -31,8 +31,8 @@ export declare const getDefaultClientConfiguration: (runtimeConfig: DefaultExten
|
|
|
31
31
|
retryStrategy(): import("@smithy/types").Provider<import("@smithy/types").RetryStrategyV2 | import("@smithy/types").RetryStrategy>;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* @internal
|
|
35
|
-
*
|
|
36
34
|
* Helper function to resolve runtime config from default extension configuration
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
37
|
*/
|
|
38
38
|
export declare const resolveDefaultRuntimeConfig: (config: DefaultExtensionConfiguration) => DefaultExtensionRuntimeConfigType;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
2
|
* A set of instructions for multiple keys.
|
|
5
3
|
* The aim is to provide a concise yet readable way to map and filter values
|
|
6
4
|
* onto a target object.
|
|
@@ -43,26 +41,28 @@
|
|
|
43
41
|
* conditionalValue3: 12,
|
|
44
42
|
* };
|
|
45
43
|
* ```
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
46
|
*/
|
|
47
47
|
export type ObjectMappingInstructions = Record<string, ObjectMappingInstruction>;
|
|
48
48
|
/**
|
|
49
|
-
* @internal
|
|
50
|
-
*
|
|
51
49
|
* A variant of the object mapping instruction for the `take` function.
|
|
52
50
|
* In this case, the source value is provided to the value function, turning it
|
|
53
51
|
* from a supplier into a mapper.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
54
54
|
*/
|
|
55
55
|
export type SourceMappingInstructions = Record<string, ValueMapper | SourceMappingInstruction>;
|
|
56
56
|
/**
|
|
57
|
-
* @internal
|
|
58
|
-
*
|
|
59
57
|
* An instruction set for assigning a value to a target object.
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
60
|
*/
|
|
61
61
|
export type ObjectMappingInstruction = LazyValueInstruction | ConditionalLazyValueInstruction | SimpleValueInstruction | ConditionalValueInstruction | UnfilteredValue;
|
|
62
62
|
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*
|
|
65
63
|
* non-array
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
66
|
*/
|
|
67
67
|
export type UnfilteredValue = any;
|
|
68
68
|
/**
|
|
@@ -86,47 +86,46 @@ export type ConditionalValueInstruction = [ValueFilteringFunction, Value];
|
|
|
86
86
|
*/
|
|
87
87
|
export type SourceMappingInstruction = [(ValueFilteringFunction | FilterStatus)?, ValueMapper?, string?];
|
|
88
88
|
/**
|
|
89
|
-
* @internal
|
|
90
|
-
*
|
|
91
89
|
* Filter is considered passed if
|
|
92
90
|
* 1. It is a boolean true.
|
|
93
91
|
* 2. It is not undefined and is itself truthy.
|
|
94
92
|
* 3. It is undefined and the corresponding _value_ is neither null nor undefined.
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
95
95
|
*/
|
|
96
96
|
export type FilterStatus = boolean | unknown | void;
|
|
97
97
|
/**
|
|
98
|
-
* @internal
|
|
99
|
-
*
|
|
100
98
|
* Supplies the filter check but not against any value as input.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
101
|
*/
|
|
102
102
|
export type FilterStatusSupplier = () => boolean;
|
|
103
103
|
/**
|
|
104
|
-
* @internal
|
|
105
|
-
*
|
|
106
104
|
* Filter check with the given value.
|
|
105
|
+
*
|
|
106
|
+
* @internal
|
|
107
107
|
*/
|
|
108
108
|
export type ValueFilteringFunction = (value: any) => boolean;
|
|
109
109
|
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*
|
|
112
110
|
* Supplies the value for lazy evaluation.
|
|
111
|
+
*
|
|
112
|
+
* @internal
|
|
113
113
|
*/
|
|
114
114
|
export type ValueSupplier = () => any;
|
|
115
115
|
/**
|
|
116
|
-
* @internal
|
|
117
|
-
*
|
|
118
116
|
* A function that maps the source value to the target value.
|
|
119
117
|
* Defaults to pass-through with nullish check.
|
|
118
|
+
*
|
|
119
|
+
* @internal
|
|
120
120
|
*/
|
|
121
121
|
export type ValueMapper = (value: any) => any;
|
|
122
122
|
/**
|
|
123
|
-
* @internal
|
|
124
|
-
*
|
|
125
123
|
* A non-function value.
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
126
|
*/
|
|
127
127
|
export type Value = any;
|
|
128
128
|
/**
|
|
129
|
-
* @internal
|
|
130
129
|
* Internal/Private, for codegen use only.
|
|
131
130
|
*
|
|
132
131
|
* Transfer a set of keys from [instructions] to [target].
|
|
@@ -136,6 +135,8 @@ export type Value = any;
|
|
|
136
135
|
* The target assigned value will be supplied by the instructions as an evaluable function or non-function value.
|
|
137
136
|
*
|
|
138
137
|
* @see ObjectMappingInstructions for an example.
|
|
138
|
+
*
|
|
139
|
+
* @internal
|
|
139
140
|
*/
|
|
140
141
|
export declare function map(target: any, filter: (value: any) => boolean, instructions: Record<string, ValueSupplier | Value>): typeof target;
|
|
141
142
|
/**
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
2
|
* Maps an object through the default JSON serde behavior.
|
|
5
3
|
* This means removing nullish fields and un-sparsifying lists.
|
|
6
|
-
*
|
|
7
4
|
* This is also used by Smithy RPCv2 CBOR as the default serde behavior.
|
|
8
5
|
*
|
|
6
|
+
* @internal
|
|
9
7
|
* @param obj - to be checked.
|
|
10
8
|
* @returns same object with default serde behavior applied.
|
|
11
9
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { WaiterOptions } from "../waiter";
|
|
2
2
|
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
3
|
* Validates that waiter options are passed correctly
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
6
|
* @param options - a waiter configuration object
|
|
7
7
|
*/
|
|
8
8
|
export declare const validateWaiterOptions: <Client>(options: WaiterOptions<Client>) => void;
|
package/dist-types/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.d.ts
CHANGED
|
@@ -48,10 +48,10 @@ export interface EndpointsResolvedConfig extends Required<EndpointsInputConfig>
|
|
|
48
48
|
useDualstackEndpoint: Provider<boolean>;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits.
|
|
52
52
|
*
|
|
53
|
+
* @internal
|
|
53
54
|
* @deprecated endpoints rulesets use \@smithy/middleware-endpoint resolveEndpointConfig.
|
|
54
|
-
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits.
|
|
55
55
|
*/
|
|
56
56
|
export declare const resolveEndpointsConfig: <T>(input: T & EndpointsInputConfig & PreviouslyResolved) => T & EndpointsResolvedConfig;
|
|
57
57
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ProviderError, type ProviderErrorOptionsType } from "./ProviderError";
|
|
2
2
|
/**
|
|
3
|
-
* @public
|
|
4
|
-
*
|
|
5
3
|
* An error representing a failure of an individual credential provider.
|
|
6
|
-
*
|
|
7
4
|
* This error class has special meaning to the {@link chain} method. If a
|
|
8
5
|
* provider in the chain is rejected with an error, the chain will only proceed
|
|
9
6
|
* to the next provider if the value of the `tryNextLink` property on the error
|
|
10
7
|
* is truthy. This allows individual providers to halt the chain and also
|
|
11
8
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
12
11
|
*/
|
|
13
12
|
export declare class CredentialsProviderError extends ProviderError {
|
|
14
13
|
name: string;
|
|
@@ -7,15 +7,14 @@ export type ProviderErrorOptionsType = {
|
|
|
7
7
|
logger?: Logger;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* @public
|
|
11
|
-
*
|
|
12
10
|
* An error representing a failure of an individual provider.
|
|
13
|
-
*
|
|
14
11
|
* This error class has special meaning to the {@link chain} method. If a
|
|
15
12
|
* provider in the chain is rejected with an error, the chain will only proceed
|
|
16
13
|
* to the next provider if the value of the `tryNextLink` property on the error
|
|
17
14
|
* is truthy. This allows individual providers to halt the chain and also
|
|
18
15
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
19
18
|
*/
|
|
20
19
|
export declare class ProviderError extends Error {
|
|
21
20
|
name: string;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ProviderError, type ProviderErrorOptionsType } from "./ProviderError";
|
|
2
2
|
/**
|
|
3
|
-
* @public
|
|
4
|
-
*
|
|
5
3
|
* An error representing a failure of an individual token provider.
|
|
6
|
-
*
|
|
7
4
|
* This error class has special meaning to the {@link chain} method. If a
|
|
8
5
|
* provider in the chain is rejected with an error, the chain will only proceed
|
|
9
6
|
* to the next provider if the value of the `tryNextLink` property on the error
|
|
10
7
|
* is truthy. This allows individual providers to halt the chain and also
|
|
11
8
|
* ensures the chain will stop if an entirely unexpected error is encountered.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
12
11
|
*/
|
|
13
12
|
export declare class TokenProviderError extends ProviderError {
|
|
14
13
|
name: string;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { Provider } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
3
|
* Compose a single credential provider function from multiple credential
|
|
6
4
|
* providers. The first provider in the argument list will always be invoked;
|
|
7
5
|
* subsequent providers in the list will be invoked in the order in which the
|
|
8
6
|
* were received if the preceding provider did not successfully resolve.
|
|
9
|
-
*
|
|
10
7
|
* If no providers were received or no provider resolves successfully, the
|
|
11
8
|
* returned promise will be rejected.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
12
11
|
*/
|
|
13
12
|
export declare const chain: <T>(...providers: Array<Provider<T>>) => Provider<T>;
|
|
@@ -45,8 +45,9 @@ export interface SSOToken {
|
|
|
45
45
|
*/
|
|
46
46
|
export declare const tokenIntercept: Record<string, any>;
|
|
47
47
|
/**
|
|
48
|
+
* Returns the SSO token from the file system.
|
|
49
|
+
*
|
|
48
50
|
* @internal
|
|
49
51
|
* @param id - can be either a start URL or the SSO session name.
|
|
50
|
-
* Returns the SSO token from the file system.
|
|
51
52
|
*/
|
|
52
53
|
export declare const getSSOTokenFromFile: (id: string) => Promise<any>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types";
|
|
2
2
|
import type { GetEndpointFromConfig } from "./adaptors/getEndpointFromInstructions";
|
|
3
3
|
/**
|
|
4
|
-
* @public
|
|
5
|
-
*
|
|
6
4
|
* Endpoint config interfaces and resolver for Endpoint v2. They live in separate package to allow per-service onboarding.
|
|
7
5
|
* When all services onboard Endpoint v2, the resolver in config-resolver package can be removed.
|
|
8
6
|
* This interface includes all the endpoint parameters with built-in bindings of "AWS::*" and "SDK::*"
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
10
|
export interface EndpointInputConfig<T extends EndpointParameters = EndpointParameters> {
|
|
11
11
|
/**
|
|
@@ -38,8 +38,9 @@ export interface EndpointInputConfig<T extends EndpointParameters = EndpointPara
|
|
|
38
38
|
*/
|
|
39
39
|
useFipsEndpoint?: boolean | Provider<boolean | undefined>;
|
|
40
40
|
/**
|
|
41
|
-
* @internal
|
|
42
41
|
* This field is used internally so you should not fill any value to this field.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
43
44
|
*/
|
|
44
45
|
serviceConfiguredEndpoint?: never;
|
|
45
46
|
}
|
|
@@ -55,10 +56,10 @@ export interface PreviouslyResolved<T extends EndpointParameters = EndpointParam
|
|
|
55
56
|
serviceId?: string;
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
58
|
-
* @internal
|
|
59
|
-
*
|
|
60
59
|
* This supersedes the similarly named EndpointsResolvedConfig (no parametric types)
|
|
61
60
|
* from resolveEndpointsConfig.ts in \@smithy/config-resolver.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
62
63
|
*/
|
|
63
64
|
export interface EndpointResolvedConfig<T extends EndpointParameters = EndpointParameters> {
|
|
64
65
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Uint8ArrayBlobAdapter } from "@smithy/core/serde";
|
|
2
2
|
import type { SerdeContext } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*
|
|
6
4
|
* Collect low-level response body stream to Uint8Array.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare const collectBody: (streamBody: any | undefined, context: {
|
|
9
9
|
streamCollector: SerdeContext["streamCollector"];
|