Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@smithy/core

Package Overview
Dependencies
Maintainers
3
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/core - npm Package Compare versions

Comparing version
3.24.0
to
3.24.1
+12
-0
dist-cjs/submodules/schema/index.js

@@ -625,2 +625,14 @@ 'use strict';

if (!this.schemas.has(id)) {
if (!shapeId.includes("#")) {
const suffix = "#" + shapeId;
const candidates = [];
for (const [shapeId, schema] of this.schemas.entries()) {
if (shapeId.endsWith(suffix)) {
candidates.push(schema);
}
}
if (candidates.length === 1) {
return candidates[0];
}
}
throw new Error(`@smithy/core/schema - schema not found for ${id}`);

@@ -627,0 +639,0 @@ }

+37
-36

@@ -6,2 +6,35 @@ 'use strict';

const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
function bindV4(getRandomValues) {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return () => crypto.randomUUID();
}
return () => {
const rnds = new Uint8Array(16);
getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
}
const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;

@@ -433,37 +466,2 @@

const randomUUID = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function"
? crypto.randomUUID.bind(crypto)
: undefined;
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
const v4 = () => {
if (randomUUID) {
return randomUUID();
}
const rnds = new Uint8Array(16);
crypto.getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
const LazyJsonString = function LazyJsonString(val) {

@@ -1384,2 +1382,5 @@ const str = Object.assign(new String(val), {

const Hash = no;
const _getRandomValues = (array) => crypto.getRandomValues(array);
const v4 = bindV4(_getRandomValues);
const generateIdempotencyToken = v4;

@@ -1418,3 +1419,3 @@ exports.ChecksumStream = ChecksumStream;

exports.fromUtf8 = fromUtf8;
exports.generateIdempotencyToken = v4;
exports.generateIdempotencyToken = generateIdempotencyToken;
exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;

@@ -1421,0 +1422,0 @@ exports.getSerdePlugin = getSerdePlugin;

'use strict';
var node_crypto = require('node:crypto');
var node_fs = require('node:fs');
var protocols = require('@smithy/core/protocols');
var endpoints = require('@smithy/core/endpoints');
var node_crypto = require('node:crypto');
var node_stream = require('node:stream');
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
function bindV4(getRandomValues) {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return () => crypto.randomUUID();
}
return () => {
const rnds = new Uint8Array(16);
getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
}
const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;

@@ -435,37 +468,2 @@

const randomUUID = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function"
? crypto.randomUUID.bind(crypto)
: undefined;
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
const v4 = () => {
if (randomUUID) {
return randomUUID();
}
const rnds = new Uint8Array(16);
crypto.getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
const LazyJsonString = function LazyJsonString(val) {

@@ -1623,2 +1621,6 @@ const str = Object.assign(new String(val), {

const _getRandomValues = node_crypto.getRandomValues;
const v4 = bindV4(_getRandomValues);
const generateIdempotencyToken = v4;
exports.ChecksumStream = ChecksumStream$1;

@@ -1656,3 +1658,3 @@ exports.Hash = Hash;

exports.fromUtf8 = fromUtf8;
exports.generateIdempotencyToken = v4;
exports.generateIdempotencyToken = generateIdempotencyToken;
exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;

@@ -1659,0 +1661,0 @@ exports.getSerdePlugin = getSerdePlugin;

@@ -6,2 +6,35 @@ 'use strict';

const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
function bindV4(getRandomValues) {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return () => crypto.randomUUID();
}
return () => {
const rnds = new Uint8Array(16);
getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
}
const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;

@@ -433,37 +466,2 @@

const randomUUID = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function"
? crypto.randomUUID.bind(crypto)
: undefined;
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
const v4 = () => {
if (randomUUID) {
return randomUUID();
}
const rnds = new Uint8Array(16);
crypto.getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
const LazyJsonString = function LazyJsonString(val) {

@@ -1384,2 +1382,5 @@ const str = Object.assign(new String(val), {

const Hash = no;
const _getRandomValues = (array) => crypto.getRandomValues(array);
const v4 = bindV4(_getRandomValues);
const generateIdempotencyToken = v4;

@@ -1418,3 +1419,3 @@ exports.ChecksumStream = ChecksumStream;

exports.fromUtf8 = fromUtf8;
exports.generateIdempotencyToken = v4;
exports.generateIdempotencyToken = generateIdempotencyToken;
exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;

@@ -1421,0 +1422,0 @@ exports.getSerdePlugin = getSerdePlugin;

@@ -39,2 +39,14 @@ export class TypeRegistry {

if (!this.schemas.has(id)) {
if (!shapeId.includes("#")) {
const suffix = "#" + shapeId;
const candidates = [];
for (const [shapeId, schema] of this.schemas.entries()) {
if (shapeId.endsWith(suffix)) {
candidates.push(schema);
}
}
if (candidates.length === 1) {
return candidates[0];
}
}
throw new Error(`@smithy/core/schema - schema not found for ${id}`);

@@ -41,0 +53,0 @@ }

@@ -0,5 +1,5 @@

import { bindV4 } from "./uuid/v4";
const no = Symbol.for("node-only");
export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString } from "./lazy-json";

@@ -34,2 +34,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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
const _getRandomValues = (array) => crypto.getRandomValues(array);
export const v4 = bindV4(_getRandomValues);
export const generateIdempotencyToken = v4;

@@ -0,4 +1,5 @@

import { getRandomValues } from "node:crypto";
import { bindV4 } from "./uuid/v4";
export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString } from "./lazy-json";

@@ -33,2 +34,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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
const _getRandomValues = getRandomValues;
export const v4 = bindV4(_getRandomValues);
export const generateIdempotencyToken = v4;

@@ -0,5 +1,5 @@

import { bindV4 } from "./uuid/v4";
const no = Symbol.for("node-only");
export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString } from "./lazy-json";

@@ -34,2 +34,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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
const _getRandomValues = (array) => crypto.getRandomValues(array);
export const v4 = bindV4(_getRandomValues);
export const generateIdempotencyToken = v4;

@@ -1,31 +0,32 @@

import { randomUUID } from "./randomUUID";
const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
export const v4 = () => {
if (randomUUID) {
return randomUUID();
export function bindV4(getRandomValues) {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return () => crypto.randomUUID();
}
const rnds = new Uint8Array(16);
crypto.getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
return () => {
const rnds = new Uint8Array(16);
getRandomValues(rnds);
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
return (decimalToHex[rnds[0]] +
decimalToHex[rnds[1]] +
decimalToHex[rnds[2]] +
decimalToHex[rnds[3]] +
"-" +
decimalToHex[rnds[4]] +
decimalToHex[rnds[5]] +
"-" +
decimalToHex[rnds[6]] +
decimalToHex[rnds[7]] +
"-" +
decimalToHex[rnds[8]] +
decimalToHex[rnds[9]] +
"-" +
decimalToHex[rnds[10]] +
decimalToHex[rnds[11]] +
decimalToHex[rnds[12]] +
decimalToHex[rnds[13]] +
decimalToHex[rnds[14]] +
decimalToHex[rnds[15]]);
};
}
import type { PaginationConfiguration, Paginator } from "@smithy/types";
/**
* Creates a paginator.
*
* @internal
*
* Creates a paginator.
*/
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>;
/**
* Backwards compatibility re-export.
*
* @internal
* Backwards compatibility re-export.
*/
export { requestBuilder } from "@smithy/core/protocols";
import type { HandlerExecutionContext, SmithyFeatures } from "@smithy/types";
/**
* @internal
* Indicates to the request context that a given feature is active.
* specification asks the library not to include a runtime lookup of all
* the feature identifiers.
*
* @internal
* @param context - handler execution context.
* @param feature - readable name of feature.
* @param value - encoding value of feature. This is required because the
* specification asks the library not to include a runtime lookup of all
* the feature identifiers.
*/
export declare function setFeature<F extends keyof SmithyFeatures>(context: HandlerExecutionContext, feature: F, value: SmithyFeatures[F]): void;
import { type CborValueType, type Float32, type Uint8, type Uint32 } from "./cbor-types";
/**
* Sets the decode bytearray source and its data view.
*
* @internal
* @param bytes - to be set as the decode source.
*
* Sets the decode bytearray source and its data view.
*/
export declare function setPayload(bytes: Uint8Array): void;
/**
* Decodes the data between the two indices.
*
* @internal
* Decodes the data between the two indices.
*/

@@ -13,0 +14,0 @@ export declare function decode(at: Uint32, to: Uint32): CborValueType;

@@ -42,13 +42,13 @@ export type CborItemType = undefined | boolean | number | bigint | [CborUnstructuredByteStringType, Uint64] | string | CborTagType;

/**
* @public
*
* The presence of this symbol as an object key indicates it should be considered a tag
* for CBOR serialization purposes.
* The object must also have the properties "tag" and "value".
*
* The object must also have the properties "tag" and "value".
* @public
*/
export declare const tagSymbol: unique symbol;
/**
* Applies the tag symbol to the object.
*
* @public
* Applies the tag symbol to the object.
*/

@@ -55,0 +55,0 @@ export declare function tag(data: {

@@ -15,13 +15,12 @@ /**

/**
* @public
* @param size - byte length to allocate.
*
* This may be used to garbage collect the CBOR
* shared encoding buffer space,
* e.g. resizeEncodingBuffer(0);
*
* This may also be used to pre-allocate more space for
* CBOR encoding, e.g. resizeEncodingBuffer(100_000_000);
*
* @public
* @param size - byte length to allocate.
*/
resizeEncodingBuffer(size: number): void;
};
/**
* Reads the blob data into the onChunk consumer.
*
* @internal
* Reads the blob data into the onChunk consumer.
*/
export declare function blobReader(blob: Blob, onChunk: (chunk: Uint8Array) => void, chunkSize?: number): Promise<void>;

@@ -11,6 +11,3 @@ import type { $ClientProtocol, $ClientProtocolCtor, ClientProtocol, ClientProtocolCtor, Command, FetchHttpHandlerOptions, Client as IClient, MetadataBearer, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";

/**
* @public
*
* Default false.
*
* When true, the client will only resolve the middleware stack once per

@@ -20,7 +17,7 @@ * Command class. This means modifying the middlewareStack of the

* recognized.
*
* Calling client.destroy() also clears this cache.
*
* Enable this only if needing the additional time saved (0-1ms per request)
* and not needing middleware modifications between requests.
*
* @public
*/

@@ -27,0 +24,0 @@ cacheMiddleware?: boolean;

@@ -9,5 +9,5 @@ /**

/**
* Creates {@link throwDefaultError} with bound ExceptionCtor.
*
* @internal
*
* Creates {@link throwDefaultError} with bound ExceptionCtor.
*/

@@ -14,0 +14,0 @@ export declare const withBaseException: (ExceptionCtor: {

/**
* @internal
*
* Emits warning if the provided Node.js version string is pending deprecation.
*
* @internal
* @param version - The Node.js version string.
*/
export declare const emitWarningIfUnsupportedVersion: (version: string) => void;

@@ -16,5 +16,5 @@ import type { HttpResponse, MetadataBearer, ResponseMetadata, RetryableTrait, SmithyException } from "@smithy/types";

/**
* Base exception class for the exceptions from the server-side.
*
* @public
*
* Base exception class for the exceptions from the server-side.
*/

@@ -21,0 +21,0 @@ export declare class ServiceException extends Error implements SmithyException, MetadataBearer {

@@ -9,5 +9,5 @@ import type { DefaultExtensionConfiguration } from "@smithy/types";

/**
* Helper function to resolve default extension configuration from runtime config
*
* @internal
*
* Helper function to resolve default extension configuration from runtime config
*/

@@ -22,6 +22,6 @@ export declare const getDefaultExtensionConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => {

/**
* Helper function to resolve default extension configuration from runtime config
*
* @internal
* @deprecated use getDefaultExtensionConfiguration
* @internal
*
* Helper function to resolve default extension configuration from runtime config
*/

@@ -36,6 +36,6 @@ export declare const getDefaultClientConfiguration: (runtimeConfig: DefaultExtensionRuntimeConfigType) => {

/**
* Helper function to resolve runtime config from default extension configuration
*
* @internal
*
* Helper function to resolve runtime config from default extension configuration
*/
export declare const resolveDefaultRuntimeConfig: (config: DefaultExtensionConfiguration) => DefaultExtensionRuntimeConfigType;
/**
* @internal
*
* The XML parser will set one K:V for a member that could
* return multiple entries but only has one.
*
* @internal
*/
export declare const getArrayIfSingleItem: <T>(mayBeArray: T) => T | T[];
/**
* @internal
*
* Recursively parses object and populates value is node from
* "#text" key if it's available
*
* @internal
*/
export declare const getValueFromTextNode: (obj: any) => any;
/**
* @internal
*
* A set of instructions for multiple keys.

@@ -46,22 +44,24 @@ * The aim is to provide a concise yet readable way to map and filter values

* ```
*
* @internal
*/
export type ObjectMappingInstructions = Record<string, ObjectMappingInstruction>;
/**
* @internal
*
* A variant of the object mapping instruction for the `take` function.
* In this case, the source value is provided to the value function, turning it
* from a supplier into a mapper.
*
* @internal
*/
export type SourceMappingInstructions = Record<string, ValueMapper | SourceMappingInstruction>;
/**
* An instruction set for assigning a value to a target object.
*
* @internal
*
* An instruction set for assigning a value to a target object.
*/
export type ObjectMappingInstruction = LazyValueInstruction | ConditionalLazyValueInstruction | SimpleValueInstruction | ConditionalValueInstruction | UnfilteredValue;
/**
* non-array
*
* @internal
*
* non-array
*/

@@ -90,4 +90,2 @@ export type UnfilteredValue = any;

/**
* @internal
*
* Filter is considered passed if

@@ -97,37 +95,38 @@ * 1. It is a boolean true.

* 3. It is undefined and the corresponding _value_ is neither null nor undefined.
*
* @internal
*/
export type FilterStatus = boolean | unknown | void;
/**
* Supplies the filter check but not against any value as input.
*
* @internal
*
* Supplies the filter check but not against any value as input.
*/
export type FilterStatusSupplier = () => boolean;
/**
* Filter check with the given value.
*
* @internal
*
* Filter check with the given value.
*/
export type ValueFilteringFunction = (value: any) => boolean;
/**
* Supplies the value for lazy evaluation.
*
* @internal
*
* Supplies the value for lazy evaluation.
*/
export type ValueSupplier = () => any;
/**
* @internal
*
* A function that maps the source value to the target value.
* Defaults to pass-through with nullish check.
*
* @internal
*/
export type ValueMapper = (value: any) => any;
/**
* A non-function value.
*
* @internal
*
* A non-function value.
*/
export type Value = any;
/**
* @internal
* Internal/Private, for codegen use only.

@@ -142,2 +141,4 @@ *

* @see ObjectMappingInstructions for an example.
*
* @internal
*/

@@ -144,0 +145,0 @@ export declare function map(target: any, filter: (value: any) => boolean, instructions: Record<string, ValueSupplier | Value>): typeof target;

/**
* @internal
*
* Serializes a number, turning non-numeric values into strings.
*
* @internal
* @param value - The number to serialize.

@@ -7,0 +6,0 @@ * @returns A number, or a string if the given number was non-numeric.

/**
* @internal
*
* Maps an object through the default JSON serde behavior.
* This means removing nullish fields and un-sparsifying lists.
*
* This is also used by Smithy RPCv2 CBOR as the default serde behavior.
*
* @internal
* @param obj - to be checked.

@@ -10,0 +8,0 @@ * @returns same object with default serde behavior applied.

import type { WaiterOptions } from "../waiter";
/**
* Validates that waiter options are passed correctly
*
* @internal
*
* Validates that waiter options are passed correctly
* @param options - a waiter configuration object
*/
export declare const validateWaiterOptions: <Client>(options: WaiterOptions<Client>) => void;

@@ -51,8 +51,8 @@ import type { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types";

/**
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits.
*
* @internal
*
* @deprecated endpoints rulesets use \@smithy/middleware-endpoint resolveEndpointConfig.
* All generated clients should migrate to Endpoints 2.0 endpointRuleSet traits.
*/
export declare const resolveEndpointsConfig: <T>(input: T & EndpointsInputConfig & PreviouslyResolved) => T & EndpointsResolvedConfig;
export {};
import type { Provider } from "@smithy/types";
/**
* @internal
*
* Compose a single credential provider function from multiple credential

@@ -9,6 +7,7 @@ * providers. The first provider in the argument list will always be invoked;

* were received if the preceding provider did not successfully resolve.
*
* If no providers were received or no provider resolves successfully, the
* returned promise will be rejected.
*
* @internal
*/
export declare const chain: <T>(...providers: Array<Provider<T>>) => Provider<T>;
import { ProviderError, type ProviderErrorOptionsType } from "./ProviderError";
/**
* @public
*
* An error representing a failure of an individual credential provider.
*
* This error class has special meaning to the {@link chain} method. If a

@@ -12,2 +9,4 @@ * provider in the chain is rejected with an error, the chain will only proceed

* ensures the chain will stop if an entirely unexpected error is encountered.
*
* @public
*/

@@ -14,0 +13,0 @@ export declare class CredentialsProviderError extends ProviderError {

@@ -10,6 +10,3 @@ import type { Logger } from "@smithy/types";

/**
* @public
*
* An error representing a failure of an individual provider.
*
* This error class has special meaning to the {@link chain} method. If a

@@ -20,2 +17,4 @@ * provider in the chain is rejected with an error, the chain will only proceed

* ensures the chain will stop if an entirely unexpected error is encountered.
*
* @public
*/

@@ -22,0 +21,0 @@ export declare class ProviderError extends Error {

import { ProviderError, type ProviderErrorOptionsType } from "./ProviderError";
/**
* @public
*
* An error representing a failure of an individual token provider.
*
* This error class has special meaning to the {@link chain} method. If a

@@ -12,2 +9,4 @@ * provider in the chain is rejected with an error, the chain will only proceed

* ensures the chain will stop if an entirely unexpected error is encountered.
*
* @public
*/

@@ -14,0 +13,0 @@ export declare class TokenProviderError extends ProviderError {

@@ -48,6 +48,7 @@ /**

/**
* Returns the SSO token from the file system.
*
* @internal
* @param id - can be either a start URL or the SSO session name.
* Returns the SSO token from the file system.
*/
export declare const getSSOTokenFromFile: (id: string) => Promise<any>;
import type { Endpoint, EndpointParameters, EndpointV2, Logger, Provider, UrlParser } from "@smithy/types";
import type { GetEndpointFromConfig } from "./adaptors/getEndpointFromInstructions";
/**
* @public
*
* Endpoint config interfaces and resolver for Endpoint v2. They live in separate package to allow per-service onboarding.
* When all services onboard Endpoint v2, the resolver in config-resolver package can be removed.
* This interface includes all the endpoint parameters with built-in bindings of "AWS::*" and "SDK::*"
*
* @public
*/

@@ -41,4 +41,5 @@ export interface EndpointInputConfig<T extends EndpointParameters = EndpointParameters> {

/**
* This field is used internally so you should not fill any value to this field.
*
* @internal
* This field is used internally so you should not fill any value to this field.
*/

@@ -59,6 +60,6 @@ serviceConfiguredEndpoint?: never;

/**
* @internal
*
* This supersedes the similarly named EndpointsResolvedConfig (no parametric types)
* from resolveEndpointsConfig.ts in \@smithy/config-resolver.
*
* @internal
*/

@@ -65,0 +66,0 @@ export interface EndpointResolvedConfig<T extends EndpointParameters = EndpointParameters> {

import type { EndpointParams, EndpointV2 } from "@smithy/types";
/**
* Cache for endpoint ruleSet resolution.
*
* @internal
*
* Cache for endpoint ruleSet resolution.
*/

@@ -7,0 +7,0 @@ export declare class EndpointCache {

/**
* Inlined from @smithy/core/config to avoid circular dependency.
*
* @internal
* Inlined from @smithy/core/config to avoid circular dependency.
*/

@@ -5,0 +6,0 @@ type LoadedConfigSelectors<T> = {

import { Uint8ArrayBlobAdapter } from "@smithy/core/serde";
import type { SerdeContext } from "@smithy/types";
/**
* Collect low-level response body stream to Uint8Array.
*
* @internal
*
* Collect low-level response body stream to Uint8Array.
*/

@@ -8,0 +8,0 @@ export declare const collectBody: (streamBody: any | undefined, context: {

/**
* @internal
*
* Function that wraps encodeURIComponent to encode additional characters
* to fully adhere to RFC 3986.
*
* @internal
*/
export declare function extendedEncodeURIComponent(str: string): string;

@@ -18,5 +18,5 @@ import type { HttpHandler } from "../httpHandler";

/**
* Helper function to resolve default extension configuration from runtime config
*
* @internal
*
* Helper function to resolve default extension configuration from runtime config
*/

@@ -30,6 +30,6 @@ export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extends object = {}>(runtimeConfig: HttpHandlerExtensionConfigType<HandlerConfig>) => {

/**
* Helper function to resolve runtime config from default extension configuration
*
* @internal
*
* Helper function to resolve runtime config from default extension configuration
*/
export declare const resolveHttpHandlerRuntimeConfig: <HandlerConfig extends object = {}>(httpHandlerExtensionConfiguration: HttpHandlerExtensionConfiguration<HandlerConfig>) => HttpHandlerExtensionConfigType<HandlerConfig>;

@@ -18,11 +18,7 @@ import type { FetchHttpHandlerOptions, HttpHandlerOptions, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";

/**
* @public
*
* A type representing the accepted user inputs for the `requestHandler` field
* of a client's constructor object.
*
* You may provide an instance of an HttpHandler, or alternatively
* provide the constructor arguments as an object which will be passed
* to the constructor of the default request handler.
*
* The default class constructor to which your arguments will be passed

@@ -32,6 +28,7 @@ * varies. The Node.js default is the NodeHttpHandler and the browser/react-native

* configured to use other default implementations such as Websocket or HTTP2.
*
* The fallback type Record<string, unknown> is part of the union to allow
* passing constructor params to an unknown requestHandler type.
*
* @public
*/
export type HttpHandlerUserInput = HttpHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<string, unknown>;
import type { SerdeContext } from "@smithy/types";
import { HttpRequest } from "./protocol-http/httpRequest";
/**
* used in code-generated serde.
*
* @internal
* used in code-generated serde.
*/

@@ -7,0 +8,0 @@ export declare function requestBuilder(input: any, context: SerdeContext): RequestBuilder;

/**
* @public
*
* The base number of milliseconds to use in calculating a suitable cool-down
* time when a retryable error is encountered.
*
* @public
*/
export declare const DEFAULT_RETRY_DELAY_BASE = 100;
/**
* @public
*
* The maximum amount of time (in milliseconds) that will be used as a delay
* between retry attempts.
*
* @public
*/

@@ -14,0 +14,0 @@ export declare const MAXIMUM_RETRY_DELAY: number;

/**
* @internal
*
* Builds a proper UTC HttpDate timestamp from a Date object
* since not all environments will have this as the expected
* format.
*
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString}
* - Prior to ECMAScript 2018, the format of the return value

@@ -13,16 +9,16 @@ * - varied according to the platform. The most common return

* - slightly updated version of RFC-822 date stamps.
*
* @internal
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString}
*/
export declare function dateToUtcString(date: Date): string;
/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a string that can be parsed
* as an RFC 3339 date.
*
* Input strings must conform to RFC3339 section 5.6, and cannot have a UTC
* offset. Fractional precision is supported.
*
* @internal
* @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
*
* @param value - the value to parse

@@ -33,13 +29,10 @@ * @returns a Date or undefined

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a string that can be parsed
* as an RFC 3339 date.
*
* Input strings must conform to RFC3339 section 5.6, and can have a UTC
* offset. Fractional precision is supported.
*
* @internal
* @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
*
* @param value - the value to parse

@@ -50,12 +43,9 @@ * @returns a Date or undefined

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a string that can be parsed
* as an RFC 7231 IMF-fixdate or obs-date.
*
* Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
*
* @internal
* @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
*
* @param value - the value to parse

@@ -66,9 +56,7 @@ * @returns a Date or undefined

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a number or a parseable string.
*
* Input strings must be an integer or floating point number. Fractional seconds are supported.
*
* @internal
* @param value - the value to parse

@@ -75,0 +63,0 @@ * @returns a Date or undefined

export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";

@@ -33,2 +32,3 @@ 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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
export declare const v4: () => string;
export declare const generateIdempotencyToken: () => string;
export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";

@@ -33,2 +32,3 @@ 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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
export declare const v4: () => string;
export declare const generateIdempotencyToken: () => string;
export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from "./date-utils";
export { generateIdempotencyToken } from "./generateIdempotencyToken";
export { LazyJsonString, type AutomaticJsonStringConversion } from "./lazy-json";

@@ -33,2 +32,3 @@ 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";

export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
export { v4 } from "./uuid/v4";
export declare const v4: () => string;
export declare const generateIdempotencyToken: () => string;
/**
* @public
*
* A model field with this type means that you may provide a JavaScript
* object in lieu of a JSON string, and it will be serialized to JSON
* automatically before being sent in a request.
*
* For responses, you will receive a "LazyJsonString", which is a boxed String object

@@ -12,2 +9,4 @@ * with additional mixin methods.

* call `.deserializeJSON()` or parse it yourself.
*
* @public
*/

@@ -29,10 +28,9 @@ export type AutomaticJsonStringConversion = Parameters<typeof JSON.stringify>[0] | LazyJsonString;

/**
* @internal
*
* Extension of the native String class in the previous implementation
* has negative global performance impact on method dispatch for strings,
* and is generally discouraged.
*
* This current implementation may look strange, but is necessary to preserve the interface and
* behavior of extending the String class.
*
* @internal
*/

@@ -39,0 +37,0 @@ export declare const LazyJsonString: {

/**
* @internal
*
* Give an input string, strictly parses a boolean value.
*
* @internal
* @param value - The boolean string to parse.

@@ -11,43 +10,39 @@ * @returns true for "true", false for "false", otherwise an error is thrown.

/**
* @internal
*
* Asserts a value is a boolean and returns it.
* Casts strings and numbers with a warning if there is evidence that they were
* intended to be booleans.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be a boolean.
* @returns The value if it's a boolean, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectBoolean: (value: any) => boolean | undefined;
/**
* @internal
*
* Asserts a value is a number and returns it.
* Casts strings with a warning if the string is a parseable number.
* This is to unblock slight API definition/implementation inconsistencies.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be a number.
* @returns The value if it's a number, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectNumber: (value: any) => number | undefined;
/**
* @internal
*
* Asserts a value is a 32-bit float and returns it.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be a 32-bit float.
* @returns The value if it's a float, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectFloat32: (value: any) => number | undefined;
/**
* @internal
*
* Asserts a value is an integer and returns it.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be an integer.
* @returns The value if it's an integer, undefined if it's null/undefined,
* otherwise an error is thrown.
*/

@@ -62,36 +57,32 @@ export declare const expectLong: (value: any) => number | undefined;

/**
* @internal
*
* Asserts a value is a 32-bit integer and returns it.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be an integer.
* @returns The value if it's an integer, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectInt32: (value: any) => number | undefined;
/**
* @internal
*
* Asserts a value is a 16-bit integer and returns it.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be an integer.
* @returns The value if it's an integer, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectShort: (value: any) => number | undefined;
/**
* @internal
*
* Asserts a value is an 8-bit integer and returns it.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be an integer.
* @returns The value if it's an integer, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectByte: (value: any) => number | undefined;
/**
* @internal
*
* Asserts a value is not null or undefined and returns it, or throws an error.
*
* @internal
* @param value - A value that is expected to be defined

@@ -103,38 +94,33 @@ * @param location - The location where we're expecting to find a defined object (optional)

/**
* @internal
*
* Asserts a value is an JSON-like object and returns it. This is expected to be used
* with values parsed from JSON (arrays, objects, numbers, strings, booleans).
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be an object
* @returns The value if it's an object, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectObject: (value: any) => Record<string, any> | undefined;
/**
* @internal
*
* Asserts a value is a string and returns it.
* Numbers and boolean will be cast to strings with a warning.
* otherwise an error is thrown.
*
* @internal
* @param value - A value that is expected to be a string.
* @returns The value if it's a string, undefined if it's null/undefined,
* otherwise an error is thrown.
*/
export declare const expectString: (value: any) => string | undefined;
/**
* @internal
*
* Asserts a value is a JSON-like object with only one non-null/non-undefined key and
* returns it.
* non-undefined key.
* an error is thrown.
*
* @internal
* @param value - A value that is expected to be an object with exactly one non-null,
* non-undefined key.
* @returns the value if it's a union, undefined if it's null/undefined, otherwise
* an error is thrown.
*/
export declare const expectUnion: (value: unknown) => Record<string, any> | undefined;
/**
* @internal
*
* Parses a value into a double. If the value is null or undefined, undefined

@@ -146,2 +132,3 @@ * will be returned. If the value is a string, it will be parsed by the standard

*
* @internal
* @param value - A number or string representation of a double.

@@ -158,4 +145,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into a float. If the value is null or undefined, undefined

@@ -167,2 +152,3 @@ * will be returned. If the value is a string, it will be parsed by the standard

*
* @internal
* @param value - A number or string representation of a float.

@@ -173,4 +159,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Asserts a value is a number and returns it. If the value is a string

@@ -182,2 +166,3 @@ * representation of a non-numeric number type (NaN, Infinity, -Infinity),

*
* @internal
* @param value - A number or string representation of a non-numeric float.

@@ -200,4 +185,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Asserts a value is a 32-bit float and returns it. If the value is a string

@@ -209,2 +192,3 @@ * representation of a non-numeric number type (NaN, Infinity, -Infinity),

*
* @internal
* @param value - A number or string representation of a non-numeric float.

@@ -215,4 +199,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into an integer. If the value is null or undefined, undefined

@@ -224,2 +206,3 @@ * will be returned. If the value is a string, it will be parsed by parseFloat

*
* @internal
* @param value - A number or string representation of an integer.

@@ -236,4 +219,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into a 32-bit integer. If the value is null or undefined, undefined

@@ -245,2 +226,3 @@ * will be returned. If the value is a string, it will be parsed by parseFloat

*
* @internal
* @param value - A number or string representation of a 32-bit integer.

@@ -251,4 +233,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into a 16-bit integer. If the value is null or undefined, undefined

@@ -260,2 +240,3 @@ * will be returned. If the value is a string, it will be parsed by parseFloat

*
* @internal
* @param value - A number or string representation of a 16-bit integer.

@@ -266,4 +247,2 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into an 8-bit integer. If the value is null or undefined, undefined

@@ -275,2 +254,3 @@ * will be returned. If the value is a string, it will be parsed by parseFloat

*
* @internal
* @param value - A number or string representation of an 8-bit integer.

@@ -277,0 +257,0 @@ * @returns The value as a number, or undefined if it's null/undefined.

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a number or a parseable string.
*
* Input strings must be an integer or floating point number. Fractional seconds are supported.
*
* @internal
* @param value - the value to parse

@@ -14,13 +12,10 @@ * @returns a Date or undefined

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a string that can be parsed
* as an RFC 3339 date.
*
* Input strings must conform to RFC3339 section 5.6, and can have a UTC
* offset. Fractional precision is supported.
*
* @internal
* @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
*
* @param value - the value to parse

@@ -31,10 +26,6 @@ * @returns a Date or undefined

/**
* @internal
*
* Parses a value into a Date. Returns undefined if the input is null or
* undefined, throws an error if the input is not a string that can be parsed
* as an RFC 7231 date.
*
* Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
*
* RFC 850 and unix asctime formats are also accepted.

@@ -44,4 +35,4 @@ * todo: practically speaking, are RFC 850 and asctime even used anymore?

*
* @internal
* @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
*
* @param value - the value to parse.

@@ -48,0 +39,0 @@ * @returns a Date or undefined.

/**
* @internal
*
* Given an input string, splits based on the delimiter after a given
* number of delimiters has been encountered.
*
* @internal
* @param value - The input string to split.

@@ -8,0 +7,0 @@ * @param delimiter - The delimiter to split on.

@@ -7,2 +7,4 @@ import type { Logger } from "@smithy/types";

/**
* the minimum size is met, except for the last chunk.
*
* @internal

@@ -13,3 +15,2 @@ * @param upstream - any ReadableStream.

* @returns another stream of the same data, but buffers chunks until
* the minimum size is met, except for the last chunk.
*/

@@ -16,0 +17,0 @@ export declare function createBufferedReadableStream(upstream: ReadableStream, size: number, logger?: Logger): ReadableStream;

import { Readable } from "node:stream";
import type { Logger } from "@smithy/types";
/**
* the minimum size is met, except for the last chunk.
*
* @internal

@@ -9,3 +11,2 @@ * @param upstream - any Readable or ReadableStream.

* @returns another stream of the same data and stream class, but buffers chunks until
* the minimum size is met, except for the last chunk.
*/

@@ -12,0 +13,0 @@ export declare function createBufferedReadable(upstream: Readable, size: number, logger?: Logger): Readable;

/**
* Inlined from @smithy/fetch-http-handler streamCollector.
*
* @internal
* Inlined from @smithy/fetch-http-handler streamCollector.
*/
export declare const streamCollector: (stream: Blob | ReadableStream) => Promise<Uint8Array>;
/**
* Generates a RFC4122 version 4 UUID
* @internal
*/
export type GetRandomValues = (array: Uint8Array) => Uint8Array;
/**
* Creates a RFC4122 version 4 UUID generator.
*
* This function generates a random UUID using one of two methods:
* 1. The native randomUUID() function if available
* 2. A fallback implementation using crypto.getRandomValues()
* Uses the native crypto.randomUUID() if available, otherwise falls back
* to a manual implementation using the provided getRandomValues function.
*
* The fallback implementation:
* - Generates 16 random bytes using crypto.getRandomValues()
* - Generates 16 random bytes using getRandomValues()
* - Sets the version bits to indicate version 4

@@ -14,3 +17,5 @@ * - Sets the variant bits to indicate RFC4122

*
* @returns A version 4 UUID string in the format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
* @param getRandomValues - platform-specific random byte source.
* @returns A function that generates version 4 UUID strings
* in the format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
* where x is any hexadecimal digit and y is one of 8, 9, a, or b.

@@ -20,2 +25,2 @@ *

*/
export declare const v4: () => string;
export declare function bindV4(getRandomValues: GetRandomValues): () => string;

@@ -7,4 +7,5 @@ import type { Identity, IdentityProvider } from "@smithy/types";

/**
* This may need to be configurable in the future, but for now it is defaulted to 5min.
*
* @internal
* This may need to be configurable in the future, but for now it is defaulted to 5min.
*/

@@ -11,0 +12,0 @@ export declare const EXPIRATION_MS = 300000;

{
"name": "@smithy/core",
"version": "3.24.0",
"version": "3.24.1",
"scripts": {

@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",

import { v4 as generateIdempotencyToken } from "./uuid/v4";
export { generateIdempotencyToken };
export const randomUUID = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function"
? crypto.randomUUID.bind(crypto)
: undefined;
import { v4 as generateIdempotencyToken } from "./uuid/v4";
export { generateIdempotencyToken };
export declare const randomUUID: (() => `${string}-${string}-${string}-${string}-${string}`) | undefined;