@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.
Files changed (70) hide show
  1. package/dist-cjs/submodules/cbor/index.js +1 -1
  2. package/dist-cjs/submodules/schema/index.js +12 -0
  3. package/dist-cjs/submodules/serde/index.browser.js +163 -210
  4. package/dist-cjs/submodules/serde/index.js +220 -122
  5. package/dist-cjs/submodules/serde/index.native.js +163 -210
  6. package/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
  7. package/dist-es/submodules/schema/TypeRegistry.js +12 -0
  8. package/dist-es/submodules/serde/index.browser.js +16 -9
  9. package/dist-es/submodules/serde/index.js +14 -7
  10. package/dist-es/submodules/serde/index.native.js +14 -5
  11. package/dist-es/submodules/serde/util-base64/toBase64.browser.js +1 -1
  12. package/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js +19 -21
  13. package/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js +1 -1
  14. package/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js +2 -2
  15. package/dist-es/submodules/serde/util-stream/stream-collector.browser.js +1 -1
  16. package/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +10 -0
  17. package/dist-es/submodules/serde/uuid/v4.js +30 -29
  18. package/dist-types/pagination/createPaginator.d.ts +2 -2
  19. package/dist-types/request-builder/requestBuilder.d.ts +2 -1
  20. package/dist-types/setFeature.d.ts +3 -3
  21. package/dist-types/submodules/cbor/cbor-decode.d.ts +4 -3
  22. package/dist-types/submodules/cbor/cbor-types.d.ts +4 -4
  23. package/dist-types/submodules/cbor/cbor.d.ts +3 -4
  24. package/dist-types/submodules/checksum/chunked-blob-reader/chunked-blob-reader.d.ts +2 -1
  25. package/dist-types/submodules/client/smithy-client/client.d.ts +2 -5
  26. package/dist-types/submodules/client/smithy-client/default-error-handler.d.ts +2 -2
  27. package/dist-types/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.d.ts +1 -2
  28. package/dist-types/submodules/client/smithy-client/exceptions.d.ts +2 -2
  29. package/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +7 -7
  30. package/dist-types/submodules/client/smithy-client/get-array-if-single-item.d.ts +2 -2
  31. package/dist-types/submodules/client/smithy-client/get-value-from-text-node.d.ts +2 -2
  32. package/dist-types/submodules/client/smithy-client/object-mapping.d.ts +22 -21
  33. package/dist-types/submodules/client/smithy-client/ser-utils.d.ts +1 -2
  34. package/dist-types/submodules/client/smithy-client/serde-json.d.ts +1 -3
  35. package/dist-types/submodules/client/util-waiter/utils/validate.d.ts +2 -2
  36. package/dist-types/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.d.ts +2 -2
  37. package/dist-types/submodules/config/property-provider/CredentialsProviderError.d.ts +2 -3
  38. package/dist-types/submodules/config/property-provider/ProviderError.d.ts +2 -3
  39. package/dist-types/submodules/config/property-provider/TokenProviderError.d.ts +2 -3
  40. package/dist-types/submodules/config/property-provider/chain.d.ts +2 -3
  41. package/dist-types/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.d.ts +2 -1
  42. package/dist-types/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.d.ts +6 -5
  43. package/dist-types/submodules/endpoints/util-endpoints/cache/EndpointCache.d.ts +2 -2
  44. package/dist-types/submodules/endpoints/util-endpoints/getEndpointUrlConfig.d.ts +2 -1
  45. package/dist-types/submodules/protocols/collect-stream-body.d.ts +2 -2
  46. package/dist-types/submodules/protocols/extended-encode-uri-component.d.ts +2 -2
  47. package/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +4 -4
  48. package/dist-types/submodules/protocols/protocol-http/httpHandler.d.ts +2 -5
  49. package/dist-types/submodules/protocols/requestBuilder.d.ts +2 -1
  50. package/dist-types/submodules/retry/util-retry/constants.d.ts +4 -4
  51. package/dist-types/submodules/serde/date-utils.d.ts +7 -19
  52. package/dist-types/submodules/serde/index.browser.d.ts +15 -9
  53. package/dist-types/submodules/serde/index.d.ts +11 -7
  54. package/dist-types/submodules/serde/index.native.d.ts +9 -5
  55. package/dist-types/submodules/serde/lazy-json.d.ts +4 -6
  56. package/dist-types/submodules/serde/parse-utils.d.ts +31 -51
  57. package/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +3 -12
  58. package/dist-types/submodules/serde/split-every.d.ts +1 -2
  59. package/dist-types/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.d.ts +8 -12
  60. package/dist-types/submodules/serde/util-stream/createBufferedReadable.browser.d.ts +2 -1
  61. package/dist-types/submodules/serde/util-stream/createBufferedReadable.d.ts +2 -1
  62. package/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +2 -1
  63. package/dist-types/submodules/serde/util-utf8/toUint8Array.browser.d.ts +4 -0
  64. package/dist-types/submodules/serde/uuid/v4.d.ts +12 -7
  65. package/dist-types/util-identity-and-auth/memoizeIdentityProvider.d.ts +2 -1
  66. package/package.json +1 -1
  67. package/dist-es/submodules/serde/generateIdempotencyToken.js +0 -2
  68. package/dist-es/submodules/serde/uuid/randomUUID.js +0 -3
  69. package/dist-types/submodules/serde/generateIdempotencyToken.d.ts +0 -2
  70. package/dist-types/submodules/serde/uuid/randomUUID.d.ts +0 -1
@@ -15,9 +15,9 @@ export type HttpHandlerExtensionConfigType<HandlerConfig extends object = {}> =
15
15
  httpHandler: HttpHandler<HandlerConfig>;
16
16
  }>;
17
17
  /**
18
- * @internal
19
- *
20
18
  * Helper function to resolve default extension configuration from runtime config
19
+ *
20
+ * @internal
21
21
  */
22
22
  export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extends object = {}>(runtimeConfig: HttpHandlerExtensionConfigType<HandlerConfig>) => {
23
23
  setHttpHandler(handler: HttpHandler<HandlerConfig>): void;
@@ -26,8 +26,8 @@ export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extend
26
26
  httpHandlerConfigs(): HandlerConfig;
27
27
  };
28
28
  /**
29
- * @internal
30
- *
31
29
  * Helper function to resolve runtime config from default extension configuration
30
+ *
31
+ * @internal
32
32
  */
33
33
  export declare const resolveHttpHandlerRuntimeConfig: <HandlerConfig extends object = {}>(httpHandlerExtensionConfiguration: HttpHandlerExtensionConfiguration<HandlerConfig>) => HttpHandlerExtensionConfigType<HandlerConfig>;
@@ -15,21 +15,18 @@ export type HttpHandler<HttpHandlerConfig extends object = {}> = RequestHandler<
15
15
  httpHandlerConfigs(): HttpHandlerConfig;
16
16
  };
17
17
  /**
18
- * @public
19
- *
20
18
  * A type representing the accepted user inputs for the `requestHandler` field
21
19
  * of a client's constructor object.
22
- *
23
20
  * You may provide an instance of an HttpHandler, or alternatively
24
21
  * provide the constructor arguments as an object which will be passed
25
22
  * to the constructor of the default request handler.
26
- *
27
23
  * The default class constructor to which your arguments will be passed
28
24
  * varies. The Node.js default is the NodeHttpHandler and the browser/react-native
29
25
  * default is the FetchHttpHandler. In rarer cases specific clients may be
30
26
  * configured to use other default implementations such as Websocket or HTTP2.
31
- *
32
27
  * The fallback type Record<string, unknown> is part of the union to allow
33
28
  * passing constructor params to an unknown requestHandler type.
29
+ *
30
+ * @public
34
31
  */
35
32
  export type HttpHandlerUserInput = HttpHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<string, unknown>;
@@ -1,8 +1,9 @@
1
1
  import type { SerdeContext } from "@smithy/types";
2
2
  import { HttpRequest } from "./protocol-http/httpRequest";
3
3
  /**
4
- * @internal
5
4
  * used in code-generated serde.
5
+ *
6
+ * @internal
6
7
  */
7
8
  export declare function requestBuilder(input: any, context: SerdeContext): RequestBuilder;
8
9
  /**
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @public
3
- *
4
2
  * The base number of milliseconds to use in calculating a suitable cool-down
5
3
  * time when a retryable error is encountered.
4
+ *
5
+ * @public
6
6
  */
7
7
  export declare const DEFAULT_RETRY_DELAY_BASE = 100;
8
8
  /**
9
- * @public
10
- *
11
9
  * The maximum amount of time (in milliseconds) that will be used as a delay
12
10
  * between retry attempts.
11
+ *
12
+ * @public
13
13
  */
14
14
  export declare const MAXIMUM_RETRY_DELAY: number;
15
15
  /**
@@ -1,72 +1,60 @@
1
1
  /**
2
- * @internal
3
- *
4
2
  * Builds a proper UTC HttpDate timestamp from a Date object
5
3
  * since not all environments will have this as the expected
6
4
  * format.
7
- *
8
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString}
9
5
  * - Prior to ECMAScript 2018, the format of the return value
10
6
  * - varied according to the platform. The most common return
11
7
  * - value was an RFC-1123 formatted date stamp, which is a
12
8
  * - slightly updated version of RFC-822 date stamps.
9
+ *
10
+ * @internal
11
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString}
13
12
  */
14
13
  export declare function dateToUtcString(date: Date): string;
15
14
  /**
16
- * @internal
17
- *
18
15
  * Parses a value into a Date. Returns undefined if the input is null or
19
16
  * undefined, throws an error if the input is not a string that can be parsed
20
17
  * as an RFC 3339 date.
21
- *
22
18
  * Input strings must conform to RFC3339 section 5.6, and cannot have a UTC
23
19
  * offset. Fractional precision is supported.
24
20
  *
21
+ * @internal
25
22
  * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
26
- *
27
23
  * @param value - the value to parse
28
24
  * @returns a Date or undefined
29
25
  */
30
26
  export declare const parseRfc3339DateTime: (value: unknown) => Date | undefined;
31
27
  /**
32
- * @internal
33
- *
34
28
  * Parses a value into a Date. Returns undefined if the input is null or
35
29
  * undefined, throws an error if the input is not a string that can be parsed
36
30
  * as an RFC 3339 date.
37
- *
38
31
  * Input strings must conform to RFC3339 section 5.6, and can have a UTC
39
32
  * offset. Fractional precision is supported.
40
33
  *
34
+ * @internal
41
35
  * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
42
- *
43
36
  * @param value - the value to parse
44
37
  * @returns a Date or undefined
45
38
  */
46
39
  export declare const parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
47
40
  /**
48
- * @internal
49
- *
50
41
  * Parses a value into a Date. Returns undefined if the input is null or
51
42
  * undefined, throws an error if the input is not a string that can be parsed
52
43
  * as an RFC 7231 IMF-fixdate or obs-date.
53
- *
54
44
  * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
55
45
  *
46
+ * @internal
56
47
  * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
57
- *
58
48
  * @param value - the value to parse
59
49
  * @returns a Date or undefined
60
50
  */
61
51
  export declare const parseRfc7231DateTime: (value: unknown) => Date | undefined;
62
52
  /**
63
- * @internal
64
- *
65
53
  * Parses a value into a Date. Returns undefined if the input is null or
66
54
  * undefined, throws an error if the input is not a number or a parseable string.
67
- *
68
55
  * Input strings must be an integer or floating point number. Fractional seconds are supported.
69
56
  *
57
+ * @internal
70
58
  * @param value - the value to parse
71
59
  * @returns a Date or undefined
72
60
  */
@@ -1,6 +1,9 @@
1
+ import { fromBase64 } from "./util-base64/fromBase64.browser";
2
+ import { toBase64 } from "./util-base64/toBase64.browser";
3
+ import { fromUtf8 } from "./util-utf8/fromUtf8.browser";
4
+ import { toUtf8 } from "./util-utf8/toUtf8.browser";
1
5
  export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
2
6
  export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
3
- export { generateIdempotencyToken } from "./generateIdempotencyToken";
4
7
  export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";
5
8
  export { logger, parseBoolean, expectBoolean, expectNumber, expectFloat32, expectInt, expectInt32, expectShort, expectByte, expectNonNull, expectObject, expectString, expectUnion, expectLong, strictParseDouble, strictParseFloat, strictParseFloat32, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, } from "./parse-utils";
6
9
  export { quoteHeader } from "./quote-header";
@@ -9,19 +12,21 @@ export { splitEvery } from "./split-every";
9
12
  export { splitHeader } from "./split-header";
10
13
  export { NumericValue, nv, type NumericType } from "./value/NumericValue";
11
14
  export { fromHex, toHex } from "./util-hex-encoding/hex-encoding";
12
- export { fromBase64 } from "./util-base64/fromBase64.browser";
13
- export { toBase64 } from "./util-base64/toBase64.browser";
15
+ export { toBase64, fromBase64 };
14
16
  export { calculateBodyLength } from "./util-body-length/calculateBodyLength.browser";
15
- export { fromUtf8 } from "./util-utf8/fromUtf8.browser";
16
- export { toUint8Array } from "./util-utf8/toUint8Array";
17
- export { toUtf8 } from "./util-utf8/toUtf8.browser";
18
- export { fromArrayBuffer, fromString, type StringEncoding } from "./util-buffer-from/buffer-from";
17
+ export { toUint8Array } from "./util-utf8/toUint8Array.browser";
18
+ export { toUtf8, fromUtf8 };
19
+ export { type StringEncoding } from "./util-buffer-from/buffer-from";
20
+ export declare const fromArrayBuffer: symbol;
21
+ export declare const fromString: symbol;
19
22
  export { isArrayBuffer } from "./is-array-buffer/is-array-buffer";
20
23
  export { deserializerMiddleware } from "./middleware-serde/deserializerMiddleware";
21
24
  export { deserializerMiddlewareOption, serializerMiddlewareOption, getSerdePlugin, type V1OrV2Endpoint, } from "./middleware-serde/serdePlugin";
22
25
  export { serializerMiddleware } from "./middleware-serde/serializerMiddleware";
23
26
  export declare const Hash: symbol;
24
- export { Uint8ArrayBlobAdapter } from "./util-stream/blob/Uint8ArrayBlobAdapter";
27
+ declare const Uint8ArrayBlobAdapter_base: import("./util-stream/blob/Uint8ArrayBlobAdapter").Uint8ArrayBlobAdapterConstructor;
28
+ export declare class Uint8ArrayBlobAdapter extends Uint8ArrayBlobAdapter_base {
29
+ }
25
30
  export { ChecksumStream, type ChecksumStreamInit } from "./util-stream/checksum/ChecksumStream.browser";
26
31
  export { createChecksumStream } from "./util-stream/checksum/createChecksumStream.browser";
27
32
  export { createBufferedReadable } from "./util-stream/createBufferedReadable.browser";
@@ -30,4 +35,5 @@ export { headStream } from "./util-stream/headStream.browser";
30
35
  export { sdkStreamMixin } from "./util-stream/sdk-stream-mixin.browser";
31
36
  export { splitStream } from "./util-stream/splitStream.browser";
32
37
  export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
33
- export { v4 } from "./uuid/v4";
38
+ export declare const v4: () => string;
39
+ export declare const generateIdempotencyToken: () => string;
@@ -1,6 +1,9 @@
1
+ import { fromBase64 } from "./util-base64/fromBase64";
2
+ import { toBase64 } from "./util-base64/toBase64";
3
+ import { fromUtf8 } from "./util-utf8/fromUtf8";
4
+ import { toUtf8 } from "./util-utf8/toUtf8";
1
5
  export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
2
6
  export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
3
- export { generateIdempotencyToken } from "./generateIdempotencyToken";
4
7
  export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";
5
8
  export { logger, parseBoolean, expectBoolean, expectNumber, expectFloat32, expectInt, expectInt32, expectShort, expectByte, expectNonNull, expectObject, expectString, expectUnion, expectLong, strictParseDouble, strictParseFloat, strictParseFloat32, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, } from "./parse-utils";
6
9
  export { quoteHeader } from "./quote-header";
@@ -9,19 +12,19 @@ export { splitEvery } from "./split-every";
9
12
  export { splitHeader } from "./split-header";
10
13
  export { NumericValue, nv, type NumericType } from "./value/NumericValue";
11
14
  export { fromHex, toHex } from "./util-hex-encoding/hex-encoding";
12
- export { fromBase64 } from "./util-base64/fromBase64";
13
- export { toBase64 } from "./util-base64/toBase64";
15
+ export { toBase64, fromBase64 };
14
16
  export { calculateBodyLength } from "./util-body-length/calculateBodyLength";
15
- export { fromUtf8 } from "./util-utf8/fromUtf8";
16
17
  export { toUint8Array } from "./util-utf8/toUint8Array";
17
- export { toUtf8 } from "./util-utf8/toUtf8";
18
+ export { toUtf8, fromUtf8 };
18
19
  export { fromArrayBuffer, fromString, type StringEncoding } from "./util-buffer-from/buffer-from";
19
20
  export { isArrayBuffer } from "./is-array-buffer/is-array-buffer";
20
21
  export { deserializerMiddleware } from "./middleware-serde/deserializerMiddleware";
21
22
  export { deserializerMiddlewareOption, serializerMiddlewareOption, getSerdePlugin, type V1OrV2Endpoint, } from "./middleware-serde/serdePlugin";
22
23
  export { serializerMiddleware } from "./middleware-serde/serializerMiddleware";
23
24
  export { Hash } from "./hash-node/hash-node";
24
- export { Uint8ArrayBlobAdapter } from "./util-stream/blob/Uint8ArrayBlobAdapter";
25
+ declare const Uint8ArrayBlobAdapter_base: import("./util-stream/blob/Uint8ArrayBlobAdapter").Uint8ArrayBlobAdapterConstructor;
26
+ export declare class Uint8ArrayBlobAdapter extends Uint8ArrayBlobAdapter_base {
27
+ }
25
28
  export { ChecksumStream, type ChecksumStreamInit } from "./util-stream/checksum/ChecksumStream";
26
29
  export { createChecksumStream } from "./util-stream/checksum/createChecksumStream";
27
30
  export { createBufferedReadable } from "./util-stream/createBufferedReadable";
@@ -30,4 +33,5 @@ export { headStream } from "./util-stream/headStream";
30
33
  export { sdkStreamMixin } from "./util-stream/sdk-stream-mixin";
31
34
  export { splitStream } from "./util-stream/splitStream";
32
35
  export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
33
- export { v4 } from "./uuid/v4";
36
+ export declare const v4: () => string;
37
+ export declare const generateIdempotencyToken: () => string;
@@ -1,6 +1,5 @@
1
1
  export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
2
2
  export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
3
- export { generateIdempotencyToken } from "./generateIdempotencyToken";
4
3
  export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";
5
4
  export { logger, parseBoolean, expectBoolean, expectNumber, expectFloat32, expectInt, expectInt32, expectShort, expectByte, expectNonNull, expectObject, expectString, expectUnion, expectLong, strictParseDouble, strictParseFloat, strictParseFloat32, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, } from "./parse-utils";
6
5
  export { quoteHeader } from "./quote-header";
@@ -13,15 +12,19 @@ export { fromBase64 } from "./util-base64/fromBase64.browser";
13
12
  export { toBase64 } from "./util-base64/toBase64.browser";
14
13
  export { calculateBodyLength } from "./util-body-length/calculateBodyLength.browser";
15
14
  export { fromUtf8 } from "./util-utf8/fromUtf8.browser";
16
- export { toUint8Array } from "./util-utf8/toUint8Array";
15
+ export { toUint8Array } from "./util-utf8/toUint8Array.browser";
17
16
  export { toUtf8 } from "./util-utf8/toUtf8.browser";
18
- export { fromArrayBuffer, fromString, type StringEncoding } from "./util-buffer-from/buffer-from";
17
+ export { type StringEncoding } from "./util-buffer-from/buffer-from";
18
+ export declare const fromArrayBuffer: symbol;
19
+ export declare const fromString: symbol;
19
20
  export { isArrayBuffer } from "./is-array-buffer/is-array-buffer";
20
21
  export { deserializerMiddleware } from "./middleware-serde/deserializerMiddleware";
21
22
  export { deserializerMiddlewareOption, serializerMiddlewareOption, getSerdePlugin, type V1OrV2Endpoint, } from "./middleware-serde/serdePlugin";
22
23
  export { serializerMiddleware } from "./middleware-serde/serializerMiddleware";
23
24
  export declare const Hash: symbol;
24
- export { Uint8ArrayBlobAdapter } from "./util-stream/blob/Uint8ArrayBlobAdapter";
25
+ declare const Uint8ArrayBlobAdapter_base: import("./util-stream/blob/Uint8ArrayBlobAdapter").Uint8ArrayBlobAdapterConstructor;
26
+ export declare class Uint8ArrayBlobAdapter extends Uint8ArrayBlobAdapter_base {
27
+ }
25
28
  export { ChecksumStream, type ChecksumStreamInit } from "./util-stream/checksum/ChecksumStream.browser";
26
29
  export { createChecksumStream } from "./util-stream/checksum/createChecksumStream.browser";
27
30
  export { createBufferedReadable } from "./util-stream/createBufferedReadable.browser";
@@ -30,4 +33,5 @@ export { headStream } from "./util-stream/headStream.browser";
30
33
  export { sdkStreamMixin } from "./util-stream/sdk-stream-mixin.browser";
31
34
  export { splitStream } from "./util-stream/splitStream.browser";
32
35
  export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
33
- export { v4 } from "./uuid/v4";
36
+ export declare const v4: () => string;
37
+ export declare const generateIdempotencyToken: () => string;
@@ -1,14 +1,13 @@
1
1
  /**
2
- * @public
3
- *
4
2
  * A model field with this type means that you may provide a JavaScript
5
3
  * object in lieu of a JSON string, and it will be serialized to JSON
6
4
  * automatically before being sent in a request.
7
- *
8
5
  * For responses, you will receive a "LazyJsonString", which is a boxed String object
9
6
  * with additional mixin methods.
10
7
  * To get the string value, call `.toString()`, or to get the JSON object value,
11
8
  * call `.deserializeJSON()` or parse it yourself.
9
+ *
10
+ * @public
12
11
  */
13
12
  export type AutomaticJsonStringConversion = Parameters<typeof JSON.stringify>[0] | LazyJsonString;
14
13
  /**
@@ -25,14 +24,13 @@ export interface LazyJsonString extends String {
25
24
  toJSON(): string;
26
25
  }
27
26
  /**
28
- * @internal
29
- *
30
27
  * Extension of the native String class in the previous implementation
31
28
  * has negative global performance impact on method dispatch for strings,
32
29
  * and is generally discouraged.
33
- *
34
30
  * This current implementation may look strange, but is necessary to preserve the interface and
35
31
  * behavior of extending the String class.
32
+ *
33
+ * @internal
36
34
  */
37
35
  export declare const LazyJsonString: {
38
36
  new (s: string): LazyJsonString;
@@ -1,54 +1,49 @@
1
1
  /**
2
- * @internal
3
- *
4
2
  * Give an input string, strictly parses a boolean value.
5
3
  *
4
+ * @internal
6
5
  * @param value - The boolean string to parse.
7
6
  * @returns true for "true", false for "false", otherwise an error is thrown.
8
7
  */
9
8
  export declare const parseBoolean: (value: string) => boolean;
10
9
  /**
11
- * @internal
12
- *
13
10
  * Asserts a value is a boolean and returns it.
14
11
  * Casts strings and numbers with a warning if there is evidence that they were
15
12
  * intended to be booleans.
13
+ * otherwise an error is thrown.
16
14
  *
15
+ * @internal
17
16
  * @param value - A value that is expected to be a boolean.
18
17
  * @returns The value if it's a boolean, undefined if it's null/undefined,
19
- * otherwise an error is thrown.
20
18
  */
21
19
  export declare const expectBoolean: (value: any) => boolean | undefined;
22
20
  /**
23
- * @internal
24
- *
25
21
  * Asserts a value is a number and returns it.
26
22
  * Casts strings with a warning if the string is a parseable number.
27
23
  * This is to unblock slight API definition/implementation inconsistencies.
24
+ * otherwise an error is thrown.
28
25
  *
26
+ * @internal
29
27
  * @param value - A value that is expected to be a number.
30
28
  * @returns The value if it's a number, undefined if it's null/undefined,
31
- * otherwise an error is thrown.
32
29
  */
33
30
  export declare const expectNumber: (value: any) => number | undefined;
34
31
  /**
35
- * @internal
36
- *
37
32
  * Asserts a value is a 32-bit float and returns it.
33
+ * otherwise an error is thrown.
38
34
  *
35
+ * @internal
39
36
  * @param value - A value that is expected to be a 32-bit float.
40
37
  * @returns The value if it's a float, undefined if it's null/undefined,
41
- * otherwise an error is thrown.
42
38
  */
43
39
  export declare const expectFloat32: (value: any) => number | undefined;
44
40
  /**
45
- * @internal
46
- *
47
41
  * Asserts a value is an integer and returns it.
42
+ * otherwise an error is thrown.
48
43
  *
44
+ * @internal
49
45
  * @param value - A value that is expected to be an integer.
50
46
  * @returns The value if it's an integer, undefined if it's null/undefined,
51
- * otherwise an error is thrown.
52
47
  */
53
48
  export declare const expectLong: (value: any) => number | undefined;
54
49
  /**
@@ -58,88 +53,80 @@ export declare const expectLong: (value: any) => number | undefined;
58
53
  */
59
54
  export declare const expectInt: (value: any) => number | undefined;
60
55
  /**
61
- * @internal
62
- *
63
56
  * Asserts a value is a 32-bit integer and returns it.
57
+ * otherwise an error is thrown.
64
58
  *
59
+ * @internal
65
60
  * @param value - A value that is expected to be an integer.
66
61
  * @returns The value if it's an integer, undefined if it's null/undefined,
67
- * otherwise an error is thrown.
68
62
  */
69
63
  export declare const expectInt32: (value: any) => number | undefined;
70
64
  /**
71
- * @internal
72
- *
73
65
  * Asserts a value is a 16-bit integer and returns it.
66
+ * otherwise an error is thrown.
74
67
  *
68
+ * @internal
75
69
  * @param value - A value that is expected to be an integer.
76
70
  * @returns The value if it's an integer, undefined if it's null/undefined,
77
- * otherwise an error is thrown.
78
71
  */
79
72
  export declare const expectShort: (value: any) => number | undefined;
80
73
  /**
81
- * @internal
82
- *
83
74
  * Asserts a value is an 8-bit integer and returns it.
75
+ * otherwise an error is thrown.
84
76
  *
77
+ * @internal
85
78
  * @param value - A value that is expected to be an integer.
86
79
  * @returns The value if it's an integer, undefined if it's null/undefined,
87
- * otherwise an error is thrown.
88
80
  */
89
81
  export declare const expectByte: (value: any) => number | undefined;
90
82
  /**
91
- * @internal
92
- *
93
83
  * Asserts a value is not null or undefined and returns it, or throws an error.
94
84
  *
85
+ * @internal
95
86
  * @param value - A value that is expected to be defined
96
87
  * @param location - The location where we're expecting to find a defined object (optional)
97
88
  * @returns The value if it's not undefined, otherwise throws an error
98
89
  */
99
90
  export declare const expectNonNull: <T>(value: T | null | undefined, location?: string) => T;
100
91
  /**
101
- * @internal
102
- *
103
92
  * Asserts a value is an JSON-like object and returns it. This is expected to be used
104
93
  * with values parsed from JSON (arrays, objects, numbers, strings, booleans).
94
+ * otherwise an error is thrown.
105
95
  *
96
+ * @internal
106
97
  * @param value - A value that is expected to be an object
107
98
  * @returns The value if it's an object, undefined if it's null/undefined,
108
- * otherwise an error is thrown.
109
99
  */
110
100
  export declare const expectObject: (value: any) => Record<string, any> | undefined;
111
101
  /**
112
- * @internal
113
- *
114
102
  * Asserts a value is a string and returns it.
115
103
  * Numbers and boolean will be cast to strings with a warning.
104
+ * otherwise an error is thrown.
116
105
  *
106
+ * @internal
117
107
  * @param value - A value that is expected to be a string.
118
108
  * @returns The value if it's a string, undefined if it's null/undefined,
119
- * otherwise an error is thrown.
120
109
  */
121
110
  export declare const expectString: (value: any) => string | undefined;
122
111
  /**
123
- * @internal
124
- *
125
112
  * Asserts a value is a JSON-like object with only one non-null/non-undefined key and
126
113
  * returns it.
114
+ * non-undefined key.
115
+ * an error is thrown.
127
116
  *
117
+ * @internal
128
118
  * @param value - A value that is expected to be an object with exactly one non-null,
129
- * non-undefined key.
130
119
  * @returns the value if it's a union, undefined if it's null/undefined, otherwise
131
- * an error is thrown.
132
120
  */
133
121
  export declare const expectUnion: (value: unknown) => Record<string, any> | undefined;
134
122
  /**
135
- * @internal
136
- *
137
123
  * Parses a value into a double. If the value is null or undefined, undefined
138
124
  * will be returned. If the value is a string, it will be parsed by the standard
139
125
  * parseFloat with one exception: NaN may only be explicitly set as the string
140
126
  * "NaN", any implicit Nan values will result in an error being thrown. If any
141
127
  * other type is provided, an exception will be thrown.
142
128
  *
129
+ * @internal
143
130
  * @param value - A number or string representation of a double.
144
131
  * @returns The value as a number, or undefined if it's null/undefined.
145
132
  */
@@ -151,27 +138,25 @@ export declare const strictParseDouble: (value: string | number) => number | und
151
138
  */
152
139
  export declare const strictParseFloat: (value: string | number) => number | undefined;
153
140
  /**
154
- * @internal
155
- *
156
141
  * Parses a value into a float. If the value is null or undefined, undefined
157
142
  * will be returned. If the value is a string, it will be parsed by the standard
158
143
  * parseFloat with one exception: NaN may only be explicitly set as the string
159
144
  * "NaN", any implicit Nan values will result in an error being thrown. If any
160
145
  * other type is provided, an exception will be thrown.
161
146
  *
147
+ * @internal
162
148
  * @param value - A number or string representation of a float.
163
149
  * @returns The value as a number, or undefined if it's null/undefined.
164
150
  */
165
151
  export declare const strictParseFloat32: (value: string | number) => number | undefined;
166
152
  /**
167
- * @internal
168
- *
169
153
  * Asserts a value is a number and returns it. If the value is a string
170
154
  * representation of a non-numeric number type (NaN, Infinity, -Infinity),
171
155
  * the value will be parsed. Any other string value will result in an exception
172
156
  * being thrown. Null or undefined will be returned as undefined. Any other
173
157
  * type will result in an exception being thrown.
174
158
  *
159
+ * @internal
175
160
  * @param value - A number or string representation of a non-numeric float.
176
161
  * @returns The value as a number, or undefined if it's null/undefined.
177
162
  */
@@ -189,27 +174,25 @@ export declare const handleFloat: (value: string | number) => number | undefined
189
174
  */
190
175
  export declare const limitedParseFloat: (value: string | number) => number | undefined;
191
176
  /**
192
- * @internal
193
- *
194
177
  * Asserts a value is a 32-bit float and returns it. If the value is a string
195
178
  * representation of a non-numeric number type (NaN, Infinity, -Infinity),
196
179
  * the value will be parsed. Any other string value will result in an exception
197
180
  * being thrown. Null or undefined will be returned as undefined. Any other
198
181
  * type will result in an exception being thrown.
199
182
  *
183
+ * @internal
200
184
  * @param value - A number or string representation of a non-numeric float.
201
185
  * @returns The value as a number, or undefined if it's null/undefined.
202
186
  */
203
187
  export declare const limitedParseFloat32: (value: string | number) => number | undefined;
204
188
  /**
205
- * @internal
206
- *
207
189
  * Parses a value into an integer. If the value is null or undefined, undefined
208
190
  * will be returned. If the value is a string, it will be parsed by parseFloat
209
191
  * and the result will be asserted to be an integer. If the parsed value is not
210
192
  * an integer, or the raw value is any type other than a string or number, an
211
193
  * exception will be thrown.
212
194
  *
195
+ * @internal
213
196
  * @param value - A number or string representation of an integer.
214
197
  * @returns The value as a number, or undefined if it's null/undefined.
215
198
  */
@@ -221,40 +204,37 @@ export declare const strictParseLong: (value: string | number) => number | undef
221
204
  */
222
205
  export declare const strictParseInt: (value: string | number) => number | undefined;
223
206
  /**
224
- * @internal
225
- *
226
207
  * Parses a value into a 32-bit integer. If the value is null or undefined, undefined
227
208
  * will be returned. If the value is a string, it will be parsed by parseFloat
228
209
  * and the result will be asserted to be an integer. If the parsed value is not
229
210
  * an integer, or the raw value is any type other than a string or number, an
230
211
  * exception will be thrown.
231
212
  *
213
+ * @internal
232
214
  * @param value - A number or string representation of a 32-bit integer.
233
215
  * @returns The value as a number, or undefined if it's null/undefined.
234
216
  */
235
217
  export declare const strictParseInt32: (value: string | number) => number | undefined;
236
218
  /**
237
- * @internal
238
- *
239
219
  * Parses a value into a 16-bit integer. If the value is null or undefined, undefined
240
220
  * will be returned. If the value is a string, it will be parsed by parseFloat
241
221
  * and the result will be asserted to be an integer. If the parsed value is not
242
222
  * an integer, or the raw value is any type other than a string or number, an
243
223
  * exception will be thrown.
244
224
  *
225
+ * @internal
245
226
  * @param value - A number or string representation of a 16-bit integer.
246
227
  * @returns The value as a number, or undefined if it's null/undefined.
247
228
  */
248
229
  export declare const strictParseShort: (value: string | number) => number | undefined;
249
230
  /**
250
- * @internal
251
- *
252
231
  * Parses a value into an 8-bit integer. If the value is null or undefined, undefined
253
232
  * will be returned. If the value is a string, it will be parsed by parseFloat
254
233
  * and the result will be asserted to be an integer. If the parsed value is not
255
234
  * an integer, or the raw value is any type other than a string or number, an
256
235
  * exception will be thrown.
257
236
  *
237
+ * @internal
258
238
  * @param value - A number or string representation of an 8-bit integer.
259
239
  * @returns The value as a number, or undefined if it's null/undefined.
260
240
  */
@@ -1,46 +1,37 @@
1
1
  /**
2
- * @internal
3
- *
4
2
  * Parses a value into a Date. Returns undefined if the input is null or
5
3
  * undefined, throws an error if the input is not a number or a parseable string.
6
- *
7
4
  * Input strings must be an integer or floating point number. Fractional seconds are supported.
8
5
  *
6
+ * @internal
9
7
  * @param value - the value to parse
10
8
  * @returns a Date or undefined
11
9
  */
12
10
  export declare const _parseEpochTimestamp: (value: unknown) => Date | undefined;
13
11
  /**
14
- * @internal
15
- *
16
12
  * Parses a value into a Date. Returns undefined if the input is null or
17
13
  * undefined, throws an error if the input is not a string that can be parsed
18
14
  * as an RFC 3339 date.
19
- *
20
15
  * Input strings must conform to RFC3339 section 5.6, and can have a UTC
21
16
  * offset. Fractional precision is supported.
22
17
  *
18
+ * @internal
23
19
  * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
24
- *
25
20
  * @param value - the value to parse
26
21
  * @returns a Date or undefined
27
22
  */
28
23
  export declare const _parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
29
24
  /**
30
- * @internal
31
- *
32
25
  * Parses a value into a Date. Returns undefined if the input is null or
33
26
  * undefined, throws an error if the input is not a string that can be parsed
34
27
  * as an RFC 7231 date.
35
- *
36
28
  * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
37
- *
38
29
  * RFC 850 and unix asctime formats are also accepted.
39
30
  * todo: practically speaking, are RFC 850 and asctime even used anymore?
40
31
  * todo: can we remove those parts?
41
32
  *
33
+ * @internal
42
34
  * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
43
- *
44
35
  * @param value - the value to parse.
45
36
  * @returns a Date or undefined.
46
37
  */
@@ -1,9 +1,8 @@
1
1
  /**
2
- * @internal
3
- *
4
2
  * Given an input string, splits based on the delimiter after a given
5
3
  * number of delimiters has been encountered.
6
4
  *
5
+ * @internal
7
6
  * @param value - The input string to split.
8
7
  * @param delimiter - The delimiter to split on.
9
8
  * @param numDelimiters - The number of delimiters to have encountered to split.