Socket
Socket
Sign inDemoInstall

@aws-sdk/types

Package Overview
Dependencies
Maintainers
5
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/types - npm Package Compare versions

Comparing version 3.357.0 to 3.369.0

dist-cjs/connection.js

7

dist-cjs/auth.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpAuthLocation = void 0;
var HttpAuthLocation;
(function (HttpAuthLocation) {
HttpAuthLocation["HEADER"] = "header";
HttpAuthLocation["QUERY"] = "query";
})(HttpAuthLocation = exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));
var types_1 = require("@smithy/types");
Object.defineProperty(exports, "HttpAuthLocation", { enumerable: true, get: function () { return types_1.HttpAuthLocation; } });
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EndpointURLScheme = void 0;
var EndpointURLScheme;
(function (EndpointURLScheme) {
EndpointURLScheme["HTTP"] = "http";
EndpointURLScheme["HTTPS"] = "https";
})(EndpointURLScheme = exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));
var types_1 = require("@smithy/types");
Object.defineProperty(exports, "EndpointURLScheme", { enumerable: true, get: function () { return types_1.EndpointURLScheme; } });
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequestHandlerProtocol = void 0;
var RequestHandlerProtocol;
(function (RequestHandlerProtocol) {
RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
})(RequestHandlerProtocol = exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
var types_1 = require("@smithy/types");
Object.defineProperty(exports, "RequestHandlerProtocol", { enumerable: true, get: function () { return types_1.RequestHandlerProtocol; } });

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

export var HttpAuthLocation;
(function (HttpAuthLocation) {
HttpAuthLocation["HEADER"] = "header";
HttpAuthLocation["QUERY"] = "query";
})(HttpAuthLocation || (HttpAuthLocation = {}));
export { HttpAuthLocation } from "@smithy/types";

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

export var EndpointURLScheme;
(function (EndpointURLScheme) {
EndpointURLScheme["HTTP"] = "http";
EndpointURLScheme["HTTPS"] = "https";
})(EndpointURLScheme || (EndpointURLScheme = {}));
export { EndpointURLScheme, } from "@smithy/types";

@@ -1,6 +0,1 @@

export var RequestHandlerProtocol;
(function (RequestHandlerProtocol) {
RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
export { RequestHandlerProtocol, } from "@smithy/types";

@@ -1,49 +0,1 @@

/**
* @public
*/
export interface AbortHandler {
(this: AbortSignal, ev: any): any;
}
/**
* @public
*
* Holders of an AbortSignal object may query if the associated operation has
* been aborted and register an onabort handler.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
*/
export interface AbortSignal {
/**
* Whether the action represented by this signal has been cancelled.
*/
readonly aborted: boolean;
/**
* A function to be invoked when the action represented by this signal has
* been cancelled.
*/
onabort: AbortHandler | Function | null;
}
/**
* @public
*
* The AWS SDK uses a Controller/Signal model to allow for cooperative
* cancellation of asynchronous operations. When initiating such an operation,
* the caller can create an AbortController and then provide linked signal to
* subtasks. This allows a single source to communicate to multiple consumers
* that an action has been aborted without dictating how that cancellation
* should be handled.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController
*/
export interface AbortController {
/**
* An object that reports whether the action associated with this
* `AbortController` has been cancelled.
*/
readonly signal: AbortSignal;
/**
* Declares the operation associated with this AbortController to have been
* cancelled.
*/
abort(): void;
}
export { AbortController, AbortHandler, AbortSignal } from "@smithy/types";

@@ -1,55 +0,1 @@

/**
* @internal
*
* Authentication schemes represent a way that the service will authenticate the customer’s identity.
*/
export interface AuthScheme {
/**
* @example "sigv4a" or "sigv4"
*/
name: "sigv4" | "sigv4a" | string;
/**
* @example "s3"
*/
signingName: string;
/**
* @example "us-east-1"
*/
signingRegion: string;
/**
* @example ["*"]
* @example ["us-west-2", "us-east-1"]
*/
signingRegionSet?: string[];
/**
* @deprecated this field was renamed to signingRegion.
*/
signingScope?: never;
properties: Record<string, unknown>;
}
/**
* @internal
*/
export interface HttpAuthDefinition {
/**
* Defines the location of where the Auth is serialized.
*/
in: HttpAuthLocation;
/**
* Defines the name of the HTTP header or query string parameter
* that contains the Auth.
*/
name: string;
/**
* Defines the security scheme to use on the `Authorization` header value.
* This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}.
*/
scheme?: string;
}
/**
* @internal
*/
export declare enum HttpAuthLocation {
HEADER = "header",
QUERY = "query"
}
export { AuthScheme, HttpAuthDefinition, HttpAuthLocation } from "@smithy/types";

@@ -1,63 +0,1 @@

import { SourceData } from "./crypto";
/**
* @public
*
* An object that provides a checksum of data provided in chunks to `update`.
* The checksum may be performed incrementally as chunks are received or all
* at once when the checksum is finalized, depending on the underlying
* implementation.
*
* It's recommended to compute checksum incrementally to avoid reading the
* entire payload in memory.
*
* A class that implements this interface may accept an optional secret key in its
* constructor while computing checksum value, when using HMAC. If provided,
* this secret key would be used when computing checksum.
*/
export interface Checksum {
/**
* Constant length of the digest created by the algorithm in bytes.
*/
digestLength?: number;
/**
* Creates a new checksum object that contains a deep copy of the internal
* state of the current `Checksum` object.
*/
copy?(): Checksum;
/**
* Returns the digest of all of the data passed.
*/
digest(): Promise<Uint8Array>;
/**
* Allows marking a checksum for checksums that support the ability
* to mark and reset.
*
* @param readLimit - The maximum limit of bytes that can be read
* before the mark position becomes invalid.
*/
mark?(readLimit: number): void;
/**
* Resets the checksum to its initial value.
*/
reset(): void;
/**
* Adds a chunk of data for which checksum needs to be computed.
* This can be called many times with new data as it is streamed.
*
* Implementations may override this method which passes second param
* which makes Checksum object stateless.
*
* @param chunk - The buffer to update checksum with.
*/
update(chunk: Uint8Array): void;
}
/**
* @public
*
* A constructor for a Checksum that may be used to calculate an HMAC. Implementing
* classes should not directly hold the provided key in memory beyond the
* lexical scope of the constructor.
*/
export interface ChecksumConstructor {
new (secret?: SourceData): Checksum;
}
export { Checksum, ChecksumConstructor } from "@smithy/types";

@@ -1,25 +0,1 @@

import { Command } from "./command";
import { MiddlewareStack } from "./middleware";
import { MetadataBearer } from "./response";
/**
* @public
*
* function definition for different overrides of client's 'send' function.
*/
interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any): Promise<OutputType>;
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options: any, cb: (err: any, data?: OutputType) => void): void;
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any, cb?: (err: any, data?: OutputType) => void): Promise<OutputType> | void;
}
/**
* A general interface for service clients, idempotent to browser or node clients
* This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts).
* It's provided for using without importing the SmithyClient class.
*/
export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
readonly config: ResolvedClientConfiguration;
middlewareStack: MiddlewareStack<Input, Output>;
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
destroy: () => void;
}
export {};
export { Client } from "@smithy/types";

@@ -1,10 +0,1 @@

import { Handler, MiddlewareStack } from "./middleware";
import { MetadataBearer } from "./response";
/**
* @public
*/
export interface Command<ClientInput extends object, InputType extends ClientInput, ClientOutput extends MetadataBearer, OutputType extends ClientOutput, ResolvedConfiguration> {
readonly input: InputType;
readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
resolveMiddleware(stack: MiddlewareStack<ClientInput, ClientOutput>, configuration: ResolvedConfiguration, options: any): Handler<InputType, OutputType>;
}
export { Command } from "@smithy/types";

@@ -1,60 +0,1 @@

/**
* @public
*/
export type SourceData = string | ArrayBuffer | ArrayBufferView;
/**
* @public
*
* An object that provides a hash of data provided in chunks to `update`. The
* hash may be performed incrementally as chunks are received or all at once
* when the hash is finalized, depending on the underlying implementation.
*
* @deprecated use {@link Checksum}
*/
export interface Hash {
/**
* Adds a chunk of data to the hash. If a buffer is provided, the `encoding`
* argument will be ignored. If a string is provided without a specified
* encoding, implementations must assume UTF-8 encoding.
*
* Not all encodings are supported on all platforms, though all must support
* UTF-8.
*/
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
/**
* Finalizes the hash and provides a promise that will be fulfilled with the
* raw bytes of the calculated hash.
*/
digest(): Promise<Uint8Array>;
}
/**
* @public
*
* A constructor for a hash that may be used to calculate an HMAC. Implementing
* classes should not directly hold the provided key in memory beyond the
* lexical scope of the constructor.
*
* @deprecated use {@link ChecksumConstructor}
*/
export interface HashConstructor {
new (secret?: SourceData): Hash;
}
/**
* @public
*
* A function that calculates the hash of a data stream. Determining the hash
* will consume the stream, so only replayable streams should be provided to an
* implementation of this interface.
*/
export interface StreamHasher<StreamType = any> {
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
}
/**
* @public
*
* A function that returns a promise fulfilled with bytes from a
* cryptographically secure pseudorandom number generator.
*/
export interface randomValues {
(byteLength: number): Promise<Uint8Array>;
}
export { Hash, HashConstructor, StreamHasher, randomValues, SourceData } from "@smithy/types";

@@ -1,19 +0,1 @@

import { Message } from "./eventStream";
export interface MessageEncoder {
encode(message: Message): Uint8Array;
}
export interface MessageDecoder {
decode(message: ArrayBufferView): Message;
feed(message: ArrayBufferView): void;
endOfStream(): void;
getMessage(): AvailableMessage;
getAvailableMessages(): AvailableMessages;
}
export interface AvailableMessage {
getMessage(): Message | undefined;
isEndOfStream(): boolean;
}
export interface AvailableMessages {
getMessages(): Message[];
isEndOfStream(): boolean;
}
export { MessageDecoder, MessageEncoder, AvailableMessage, AvailableMessages } from "@smithy/types";

@@ -1,77 +0,1 @@

import { AuthScheme } from "./auth";
/**
* @public
*/
export interface EndpointPartition {
name: string;
dnsSuffix: string;
dualStackDnsSuffix: string;
supportsFIPS: boolean;
supportsDualStack: boolean;
}
/**
* @public
*/
export interface EndpointARN {
partition: string;
service: string;
region: string;
accountId: string;
resourceId: Array<string>;
}
/**
* @public
*/
export declare enum EndpointURLScheme {
HTTP = "http",
HTTPS = "https"
}
/**
* @public
*/
export interface EndpointURL {
/**
* The URL scheme such as http or https.
*/
scheme: EndpointURLScheme;
/**
* The authority is the host and optional port component of the URL.
*/
authority: string;
/**
* The parsed path segment of the URL.
* This value is as-is as provided by the user.
*/
path: string;
/**
* The parsed path segment of the URL.
* This value is guranteed to start and end with a "/".
*/
normalizedPath: string;
/**
* A boolean indicating whether the authority is an IP address.
*/
isIp: boolean;
}
/**
* @public
*/
export type EndpointObjectProperty = string | boolean | {
[key: string]: EndpointObjectProperty;
} | EndpointObjectProperty[];
/**
* @public
*/
export interface EndpointV2 {
url: URL;
properties?: {
authSchemes?: AuthScheme[];
} & Record<string, EndpointObjectProperty>;
headers?: Record<string, string[]>;
}
/**
* @public
*/
export type EndpointParameters = {
[name: string]: undefined | string | boolean;
};
export { EndpointARN, EndpointPartition, EndpointURLScheme, EndpointURL, EndpointObjectProperty, EndpointV2, EndpointParameters, } from "@smithy/types";

@@ -1,108 +0,1 @@

import { HttpRequest } from "./http";
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware";
import { MetadataBearer } from "./response";
/**
* @public
*
* An event stream message. The headers and body properties will always be
* defined, with empty headers represented as an object with no keys and an
* empty body represented as a zero-length Uint8Array.
*/
export interface Message {
headers: MessageHeaders;
body: Uint8Array;
}
/**
* @public
*/
export type MessageHeaders = Record<string, MessageHeaderValue>;
type HeaderValue<K extends string, V> = {
type: K;
value: V;
};
export type BooleanHeaderValue = HeaderValue<"boolean", boolean>;
export type ByteHeaderValue = HeaderValue<"byte", number>;
export type ShortHeaderValue = HeaderValue<"short", number>;
export type IntegerHeaderValue = HeaderValue<"integer", number>;
export type LongHeaderValue = HeaderValue<"long", Int64>;
export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>;
export type StringHeaderValue = HeaderValue<"string", string>;
export type TimestampHeaderValue = HeaderValue<"timestamp", Date>;
export type UuidHeaderValue = HeaderValue<"uuid", string>;
/**
* @public
*/
export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue;
/**
* @public
*/
export interface Int64 {
readonly bytes: Uint8Array;
valueOf: () => number;
toString: () => string;
}
/**
* @public
*
* Util functions for serializing or deserializing event stream
*/
export interface EventStreamSerdeContext {
eventStreamMarshaller: EventStreamMarshaller;
}
/**
* @public
*
* A function which deserializes binary event stream message into modeled shape.
*/
export interface EventStreamMarshallerDeserFn<StreamType> {
<T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>;
}
/**
* @public
*
* A function that serializes modeled shape into binary stream message.
*/
export interface EventStreamMarshallerSerFn<StreamType> {
<T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
}
/**
* @public
*
* An interface which provides functions for serializing and deserializing binary event stream
* to/from corresponsing modeled shape.
*/
export interface EventStreamMarshaller<StreamType = any> {
deserialize: EventStreamMarshallerDeserFn<StreamType>;
serialize: EventStreamMarshallerSerFn<StreamType>;
}
/**
* @public
*/
export interface EventStreamRequestSigner {
sign(request: HttpRequest): Promise<HttpRequest>;
}
/**
* @public
*/
export interface EventStreamPayloadHandler {
handle: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>, context?: HandlerExecutionContext) => Promise<FinalizeHandlerOutput<Output>>;
}
/**
* @public
*/
export interface EventStreamPayloadHandlerProvider {
(options: any): EventStreamPayloadHandler;
}
/**
* @public
*/
export interface EventStreamSerdeProvider {
(options: any): EventStreamMarshaller;
}
/**
* @public
*/
export interface EventStreamSignerProvider {
(options: any): EventStreamRequestSigner;
}
export {};
export { Message, MessageHeaders, BooleanHeaderValue, ByteHeaderValue, ShortHeaderValue, IntegerHeaderValue, LongHeaderValue, BinaryHeaderValue, StringHeaderValue, TimestampHeaderValue, UuidHeaderValue, MessageHeaderValue, Int64, EventStreamSerdeContext, EventStreamMarshaller, EventStreamMarshallerDeserFn, EventStreamMarshallerSerFn, EventStreamPayloadHandler, EventStreamPayloadHandlerProvider, EventStreamRequestSigner, EventStreamSerdeProvider, EventStreamSignerProvider, } from "@smithy/types";

@@ -1,3 +0,3 @@

import { AbortSignal } from "./abort";
import { URI } from "./uri";
import { HttpResponse } from "@smithy/types";
export { Endpoint, HeaderBag, HttpHandlerOptions, HttpMessage, HttpRequest, HttpResponse, QueryParameterBag, } from "@smithy/types";
/**

@@ -28,74 +28,2 @@ * @public

*
* A mapping of header names to string values. Multiple values for the same
* header should be represented as a single string with values separated by
* `, `.
*
* Keys should be considered case insensitive, even if this is not enforced by a
* particular implementation. For example, given the following HeaderBag, where
* keys differ only in case:
*
* ```json
* {
* 'x-amz-date': '2000-01-01T00:00:00Z',
* 'X-Amz-Date': '2001-01-01T00:00:00Z'
* }
* ```
*
* The SDK may at any point during processing remove one of the object
* properties in favor of the other. The headers may or may not be combined, and
* the SDK will not deterministically select which header candidate to use.
*/
export type HeaderBag = Record<string, string>;
/**
* @public
*
* Represents an HTTP message with headers and an optional static or streaming
* body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream;
*/
export interface HttpMessage {
headers: HeaderBag;
body?: any;
}
/**
* @public
*
* A mapping of query parameter names to strings or arrays of strings, with the
* second being used when a parameter contains a list of values. Value can be set
* to null when query is not in key-value pairs shape
*/
export type QueryParameterBag = Record<string, string | Array<string> | null>;
/**
* @public
*
* @deprecated use {@link EndpointV2} from `@aws-sdk/types`.
*/
export interface Endpoint {
protocol: string;
hostname: string;
port?: number;
path: string;
query?: QueryParameterBag;
}
/**
* @public
*
* Interface an HTTP request class. Contains
* addressing information in addition to standard message properties.
*/
export interface HttpRequest extends HttpMessage, URI {
method: string;
}
/**
* @public
*
* Represents an HTTP message as received in reply to a request. Contains a
* numeric status code in addition to standard message properties.
*/
export interface HttpResponse extends HttpMessage {
statusCode: number;
reason?: string;
}
/**
* @public
*
* Represents HTTP message whose body has been resolved to a string. This is

@@ -107,14 +35,1 @@ * used in parsing http message.

}
/**
* @public
*
* Represents the options that may be passed to an Http Handler.
*/
export interface HttpHandlerOptions {
abortSignal?: AbortSignal;
/**
* The maximum time in milliseconds that the connection phase of a request
* may take before the connection attempt is abandoned.
*/
requestTimeout?: number;
}

@@ -1,23 +0,1 @@

import { Identity, IdentityProvider } from "./Identity";
/**
* @public
*/
export interface AwsCredentialIdentity extends Identity {
/**
* AWS access key ID
*/
readonly accessKeyId: string;
/**
* AWS secret access key
*/
readonly secretAccessKey: string;
/**
* A security or session token to use with these credentials. Usually
* present for temporary credentials.
*/
readonly sessionToken?: string;
}
/**
* @public
*/
export type AwsCredentialIdentityProvider = IdentityProvider<AwsCredentialIdentity>;
export { AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@smithy/types";

@@ -1,15 +0,1 @@

/**
* @public
*/
export interface Identity {
/**
* A `Date` when the identity or credential will no longer be accepted.
*/
readonly expiration?: Date;
}
/**
* @public
*/
export interface IdentityProvider<IdentityT extends Identity> {
(identityProperties?: Record<string, any>): Promise<IdentityT>;
}
export { Identity, IdentityProvider } from "@smithy/types";

@@ -0,1 +1,3 @@

import { Logger } from "@smithy/types";
export { Logger } from "@smithy/types";
/**

@@ -21,14 +23,1 @@ * @public

}
/**
* @public
*
* Represents a logger object that is available in HandlerExecutionContext
* throughout the middleware stack.
*/
export interface Logger {
trace?: (...content: any[]) => void;
debug: (...content: any[]) => void;
info: (...content: any[]) => void;
warn: (...content: any[]) => void;
error: (...content: any[]) => void;
}

@@ -1,475 +0,1 @@

import { AuthScheme, HttpAuthDefinition } from "./auth";
import { EndpointV2 } from "./endpoint";
import { Logger } from "./logger";
import { UserAgent } from "./util";
/**
* @public
*/
export interface InitializeHandlerArguments<Input extends object> {
/**
* User input to a command. Reflects the userland representation of the
* union of data types the command can effectively handle.
*/
input: Input;
}
/**
* @public
*/
export interface InitializeHandlerOutput<Output extends object> extends DeserializeHandlerOutput<Output> {
output: Output;
}
/**
* @public
*/
export interface SerializeHandlerArguments<Input extends object> extends InitializeHandlerArguments<Input> {
/**
* The user input serialized as a request object. The request object is unknown,
* so you cannot modify it directly. When work with request, you need to guard its
* type to e.g. HttpRequest with 'instanceof' operand
*
* During the build phase of the execution of a middleware stack, a built
* request may or may not be available.
*/
request?: unknown;
}
/**
* @public
*/
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
}
/**
* @public
*/
export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
}
/**
* @public
*/
export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
}
/**
* @public
*/
export interface FinalizeHandlerArguments<Input extends object> extends SerializeHandlerArguments<Input> {
/**
* The user input serialized as a request.
*/
request: unknown;
}
/**
* @public
*/
export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
}
/**
* @public
*/
export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
}
/**
* @public
*/
export interface DeserializeHandlerOutput<Output extends object> {
/**
* The raw response object from runtime is deserialized to structured output object.
* The response object is unknown so you cannot modify it directly. When work with
* response, you need to guard its type to e.g. HttpResponse with 'instanceof' operand.
*
* During the deserialize phase of the execution of a middleware stack, a deserialized
* response may or may not be available
*/
response: unknown;
output?: Output;
}
/**
* @public
*/
export interface InitializeHandler<Input extends object, Output extends object> {
/**
* Asynchronously converts an input object into an output object.
*
* @param args - An object containing a input to the command as well as any
* associated or previously generated execution artifacts.
*/
(args: InitializeHandlerArguments<Input>): Promise<InitializeHandlerOutput<Output>>;
}
/**
* @public
*/
export type Handler<Input extends object, Output extends object> = InitializeHandler<Input, Output>;
/**
* @public
*/
export interface SerializeHandler<Input extends object, Output extends object> {
/**
* Asynchronously converts an input object into an output object.
*
* @param args - An object containing a input to the command as well as any
* associated or previously generated execution artifacts.
*/
(args: SerializeHandlerArguments<Input>): Promise<SerializeHandlerOutput<Output>>;
}
/**
* @public
*/
export interface FinalizeHandler<Input extends object, Output extends object> {
/**
* Asynchronously converts an input object into an output object.
*
* @param args - An object containing a input to the command as well as any
* associated or previously generated execution artifacts.
*/
(args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>>;
}
/**
* @public
*/
export interface BuildHandler<Input extends object, Output extends object> {
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
}
/**
* @public
*/
export interface DeserializeHandler<Input extends object, Output extends object> {
(args: DeserializeHandlerArguments<Input>): Promise<DeserializeHandlerOutput<Output>>;
}
/**
* @public
*
* A factory function that creates functions implementing the `Handler`
* interface.
*/
export interface InitializeMiddleware<Input extends object, Output extends object> {
/**
* @param next - The handler to invoke after this middleware has operated on
* the user input and before this middleware operates on the output.
*
* @param context - Invariant data and functions for use by the handler.
*/
(next: InitializeHandler<Input, Output>, context: HandlerExecutionContext): InitializeHandler<Input, Output>;
}
/**
* @public
*
* A factory function that creates functions implementing the `BuildHandler`
* interface.
*/
export interface SerializeMiddleware<Input extends object, Output extends object> {
/**
* @param next - The handler to invoke after this middleware has operated on
* the user input and before this middleware operates on the output.
*
* @param context - Invariant data and functions for use by the handler.
*/
(next: SerializeHandler<Input, Output>, context: HandlerExecutionContext): SerializeHandler<Input, Output>;
}
/**
* @public
*
* A factory function that creates functions implementing the `FinalizeHandler`
* interface.
*/
export interface FinalizeRequestMiddleware<Input extends object, Output extends object> {
/**
* @param next - The handler to invoke after this middleware has operated on
* the user input and before this middleware operates on the output.
*
* @param context - Invariant data and functions for use by the handler.
*/
(next: FinalizeHandler<Input, Output>, context: HandlerExecutionContext): FinalizeHandler<Input, Output>;
}
/**
* @public
*/
export interface BuildMiddleware<Input extends object, Output extends object> {
(next: BuildHandler<Input, Output>, context: HandlerExecutionContext): BuildHandler<Input, Output>;
}
/**
* @public
*/
export interface DeserializeMiddleware<Input extends object, Output extends object> {
(next: DeserializeHandler<Input, Output>, context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
}
/**
* @public
*/
export type MiddlewareType<Input extends object, Output extends object> = InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>;
/**
* @public
*
* A factory function that creates the terminal handler atop which a middleware
* stack sits.
*/
export interface Terminalware {
<Input extends object, Output extends object>(context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
}
/**
* @public
*/
export type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize";
/**
* @public
*/
export type Priority = "high" | "normal" | "low";
/**
* @public
*/
export interface HandlerOptions {
/**
* Handlers are ordered using a "step" that describes the stage of command
* execution at which the handler will be executed. The available steps are:
*
* - initialize: The input is being prepared. Examples of typical
* initialization tasks include injecting default options computing
* derived parameters.
* - serialize: The input is complete and ready to be serialized. Examples
* of typical serialization tasks include input validation and building
* an HTTP request from user input.
* - build: The input has been serialized into an HTTP request, but that
* request may require further modification. Any request alterations
* will be applied to all retries. Examples of typical build tasks
* include injecting HTTP headers that describe a stable aspect of the
* request, such as `Content-Length` or a body checksum.
* - finalizeRequest: The request is being prepared to be sent over the wire. The
* request in this stage should already be semantically complete and
* should therefore only be altered as match the recipient's
* expectations. Examples of typical finalization tasks include request
* signing and injecting hop-by-hop headers.
* - deserialize: The response has arrived, the middleware here will deserialize
* the raw response object to structured response
*
* Unlike initialization and build handlers, which are executed once
* per operation execution, finalization and deserialize handlers will be
* executed foreach HTTP request sent.
*
* @defaultValue 'initialize'
*/
step?: Step;
/**
* A list of strings to any that identify the general purpose or important
* characteristics of a given handler.
*/
tags?: Array<string>;
/**
* A unique name to refer to a middleware
*/
name?: string;
/**
* A flag to override the existing middleware with the same name. Without
* setting it, adding middleware with duplicated name will throw an exception.
* @internal
*/
override?: boolean;
}
/**
* @public
*/
export interface AbsoluteLocation {
/**
* By default middleware will be added to individual step in un-guaranteed order.
* In the case that
*
* @defaultValue 'normal'
*/
priority?: Priority;
}
/**
* @public
*/
export type Relation = "before" | "after";
/**
* @public
*/
export interface RelativeLocation {
/**
* Specify the relation to be before or after a know middleware.
*/
relation: Relation;
/**
* A known middleware name to indicate inserting middleware's location.
*/
toMiddleware: string;
}
/**
* @public
*/
export type RelativeMiddlewareOptions = RelativeLocation & Omit<HandlerOptions, "step">;
/**
* @public
*/
export interface InitializeHandlerOptions extends HandlerOptions {
step?: "initialize";
}
/**
* @public
*/
export interface SerializeHandlerOptions extends HandlerOptions {
step: "serialize";
}
/**
* @public
*/
export interface BuildHandlerOptions extends HandlerOptions {
step: "build";
}
/**
* @public
*/
export interface FinalizeRequestHandlerOptions extends HandlerOptions {
step: "finalizeRequest";
}
/**
* @public
*/
export interface DeserializeHandlerOptions extends HandlerOptions {
step: "deserialize";
}
/**
* @public
*
* A stack storing middleware. It can be resolved into a handler. It supports 2
* approaches for adding middleware:
* 1. Adding middleware to specific step with `add()`. The order of middleware
* added into same step is determined by order of adding them. If one middleware
* needs to be executed at the front of the step or at the end of step, set
* `priority` options to `high` or `low`.
* 2. Adding middleware to location relative to known middleware with `addRelativeTo()`.
* This is useful when given middleware must be executed before or after specific
* middleware(`toMiddleware`). You can add a middleware relatively to another
* middleware which also added relatively. But eventually, this relative middleware
* chain **must** be 'anchored' by a middleware that added using `add()` API
* with absolute `step` and `priority`. This mothod will throw if specified
* `toMiddleware` is not found.
*/
export interface MiddlewareStack<Input extends object, Output extends object> extends Pluggable<Input, Output> {
/**
* Add middleware to the stack to be executed during the "initialize" step,
* optionally specifying a priority, tags and name
*/
add(middleware: InitializeMiddleware<Input, Output>, options?: InitializeHandlerOptions & AbsoluteLocation): void;
/**
* Add middleware to the stack to be executed during the "serialize" step,
* optionally specifying a priority, tags and name
*/
add(middleware: SerializeMiddleware<Input, Output>, options: SerializeHandlerOptions & AbsoluteLocation): void;
/**
* Add middleware to the stack to be executed during the "build" step,
* optionally specifying a priority, tags and name
*/
add(middleware: BuildMiddleware<Input, Output>, options: BuildHandlerOptions & AbsoluteLocation): void;
/**
* Add middleware to the stack to be executed during the "finalizeRequest" step,
* optionally specifying a priority, tags and name
*/
add(middleware: FinalizeRequestMiddleware<Input, Output>, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void;
/**
* Add middleware to the stack to be executed during the "deserialize" step,
* optionally specifying a priority, tags and name
*/
add(middleware: DeserializeMiddleware<Input, Output>, options: DeserializeHandlerOptions & AbsoluteLocation): void;
/**
* Add middleware to a stack position before or after a known middleware,optionally
* specifying name and tags.
*/
addRelativeTo(middleware: MiddlewareType<Input, Output>, options: RelativeMiddlewareOptions): void;
/**
* Apply a customization function to mutate the middleware stack, often
* used for customizations that requires mutating multiple middleware.
*/
use(pluggable: Pluggable<Input, Output>): void;
/**
* Create a shallow clone of this stack. Step bindings and handler priorities
* and tags are preserved in the copy.
*/
clone(): MiddlewareStack<Input, Output>;
/**
* Removes middleware from the stack.
*
* If a string is provided, it will be treated as middleware name. If a middleware
* is inserted with the given name, it will be removed.
*
* If a middleware class is provided, all usages thereof will be removed.
*/
remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
/**
* Removes middleware that contains given tag
*
* Multiple middleware will potentially be removed
*/
removeByTag(toRemove: string): boolean;
/**
* Create a stack containing the middlewares in this stack as well as the
* middlewares in the `from` stack. Neither source is modified, and step
* bindings and handler priorities and tags are preserved in the copy.
*/
concat<InputType extends Input, OutputType extends Output>(from: MiddlewareStack<InputType, OutputType>): MiddlewareStack<InputType, OutputType>;
/**
* Returns a list of the current order of middleware in the stack.
* This does not execute the middleware functions, nor does it
* provide a reference to the stack itself.
*/
identify(): string[];
/**
* Builds a single handler function from zero or more middleware classes and
* a core handler. The core handler is meant to send command objects to AWS
* services and return promises that will resolve with the operation result
* or be rejected with an error.
*
* When a composed handler is invoked, the arguments will pass through all
* middleware in a defined order, and the return from the innermost handler
* will pass through all middleware in the reverse of that order.
*/
resolve<InputType extends Input, OutputType extends Output>(handler: DeserializeHandler<InputType, OutputType>, context: HandlerExecutionContext): InitializeHandler<InputType, OutputType>;
}
/**
* @public
*
* Data and helper objects that are not expected to change from one execution of
* a composed handler to another.
*/
export interface HandlerExecutionContext {
/**
* A logger that may be invoked by any handler during execution of an
* operation.
*/
logger?: Logger;
/**
* Additional user agent that inferred by middleware. It can be used to save
* the internal user agent sections without overriding the `customUserAgent`
* config in clients.
*/
userAgent?: UserAgent;
/**
* Resolved by the endpointMiddleware function of `@aws-sdk/middleware-endpoint`
* in the serialization stage.
*/
endpointV2?: EndpointV2;
/**
* Set at the same time as endpointV2.
*/
authSchemes?: AuthScheme[];
/**
* The current auth configuration that has been set by any auth middleware and
* that will prevent from being set more than once.
*/
currentAuthConfig?: HttpAuthDefinition;
/**
* Used by DynamoDbDocumentClient.
*/
dynamoDbDocumentClientOptions?: Partial<{
overrideInputFilterSensitiveLog(...args: any[]): string | void;
overrideOutputFilterSensitiveLog(...args: any[]): string | void;
}>;
[key: string]: any;
}
/**
* @public
*/
export interface Pluggable<Input extends object, Output extends object> {
/**
* A function that mutate the passed in middleware stack. Functions implementing
* this interface can add, remove, modify existing middleware stack from clients
* or commands
*/
applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
}
export { AbsoluteLocation, BuildHandler, BuildHandlerArguments, BuildHandlerOptions, BuildHandlerOutput, BuildMiddleware, DeserializeHandler, DeserializeHandlerArguments, DeserializeHandlerOptions, DeserializeHandlerOutput, DeserializeMiddleware, FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, FinalizeRequestHandlerOptions, FinalizeRequestMiddleware, Handler, HandlerExecutionContext, HandlerOptions, InitializeHandler, InitializeHandlerArguments, InitializeHandlerOptions, InitializeHandlerOutput, InitializeMiddleware, MiddlewareStack, MiddlewareType, Pluggable, Priority, Relation, RelativeLocation, RelativeMiddlewareOptions, SerializeHandler, SerializeHandlerArguments, SerializeHandlerOptions, SerializeHandlerOutput, SerializeMiddleware, Step, Terminalware, } from "@smithy/types";

@@ -1,26 +0,1 @@

import { Client } from "./client";
/**
* @public
*
* Expected type definition of a paginator.
*/
export type Paginator<T> = AsyncGenerator<T, T, unknown>;
/**
* @public
*
* Expected paginator configuration passed to an operation. Services will extend
* this interface definition and may type client further.
*/
export interface PaginationConfiguration {
client: Client<any, any, any>;
pageSize?: number;
startingToken?: any;
/**
* For some APIs, such as CloudWatchLogs events, the next page token will always
* be present.
*
* When true, this config field will have the paginator stop when the token doesn't change
* instead of when it is not present.
*/
stopOnSameToken?: boolean;
}
export { PaginationConfiguration, Paginator } from "@smithy/types";

@@ -1,22 +0,1 @@

/**
* @public
*/
export type IniSection = Record<string, string | undefined>;
/**
* @public
*
* @deprecated Please use {@link IniSection}
*/
export interface Profile extends IniSection {
}
/**
* @public
*/
export type ParsedIniData = Record<string, IniSection>;
/**
* @public
*/
export interface SharedConfigFiles {
credentialsFile: ParsedIniData;
configFile: ParsedIniData;
}
export { IniSection, Profile, ParsedIniData, SharedConfigFiles } from "@smithy/types";

@@ -0,46 +1,7 @@

export { MetadataBearer, ResponseMetadata } from "@smithy/types";
/**
* @internal
*/
export interface ResponseMetadata {
/**
* The status code of the last HTTP response received for this operation.
*/
httpStatusCode?: number;
/**
* A unique identifier for the last request sent for this operation. Often
* requested by AWS service teams to aid in debugging.
*/
requestId?: string;
/**
* A secondary identifier for the last request sent. Used for debugging.
*/
extendedRequestId?: string;
/**
* A tertiary identifier for the last request sent. Used for debugging.
*/
cfId?: string;
/**
* The number of times this operation was attempted.
*/
attempts?: number;
/**
* The total amount of time (in milliseconds) that was spent waiting between
* retry attempts.
*/
totalRetryDelay?: number;
}
/**
* @public
*/
export interface MetadataBearer {
/**
* Metadata pertaining to this request.
*/
$metadata: ResponseMetadata;
}
/**
* @internal
*/
export interface Response {
body: any;
}

@@ -1,128 +0,1 @@

/**
* @public
*/
export type RetryErrorType =
/**
* This is a connection level error such as a socket timeout, socket connect
* error, tls negotiation timeout etc...
* Typically these should never be applied for non-idempotent request types
* since in this scenario, it's impossible to know whether the operation had
* a side effect on the server.
*/
"TRANSIENT"
/**
* This is an error where the server explicitly told the client to back off,
* such as a 429 or 503 Http error.
*/
| "THROTTLING"
/**
* This is a server error that isn't explicitly throttling but is considered
* by the client to be something that should be retried.
*/
| "SERVER_ERROR"
/**
* Doesn't count against any budgets. This could be something like a 401
* challenge in Http.
*/
| "CLIENT_ERROR";
/**
* @public
*/
export interface RetryErrorInfo {
errorType: RetryErrorType;
/**
* Protocol hint. This could come from Http's 'retry-after' header or
* something from MQTT or any other protocol that has the ability to convey
* retry info from a peer.
*
* @returns the Date after which a retry should be attempted.
*/
retryAfterHint?: Date;
}
/**
* @public
*/
export interface RetryBackoffStrategy {
/**
* @returns the number of milliseconds to wait before retrying an action.
*/
computeNextBackoffDelay(retryAttempt: number): number;
}
/**
* @public
*/
export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy {
/**
* Sets the delayBase used to compute backoff delays.
* @param delayBase -
*/
setDelayBase(delayBase: number): void;
}
/**
* @public
*/
export interface RetryStrategyOptions {
backoffStrategy: RetryBackoffStrategy;
maxRetriesBase: number;
}
/**
* @public
*/
export interface RetryToken {
/**
* @returns the current count of retry.
*/
getRetryCount(): number;
/**
* @returns the number of milliseconds to wait before retrying an action.
*/
getRetryDelay(): number;
}
/**
* @public
*/
export interface StandardRetryToken extends RetryToken {
/**
* @returns the cost of the last retry attempt.
*/
getRetryCost(): number | undefined;
}
/**
* @public
*/
export interface RetryStrategyV2 {
/**
* Called before any retries (for the first call to the operation). It either
* returns a retry token or an error upon the failure to acquire a token prior.
*
* tokenScope is arbitrary and out of scope for this component. However,
* adding it here offers us a lot of future flexibility for outage detection.
* For example, it could be "us-east-1" on a shared retry strategy, or
* "us-west-2-c:dynamodb".
*/
acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
/**
* After a failed operation call, this function is invoked to refresh the
* retryToken returned by acquireInitialRetryToken(). This function can
* either choose to allow another retry and send a new or updated token,
* or reject the retry attempt and report the error either in an exception
* or returning an error.
*/
refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
/**
* Upon successful completion of the operation, this function is called
* to record that the operation was successful.
*/
recordSuccess(token: RetryToken): void;
}
/**
* @public
*/
export type ExponentialBackoffJitterType = "DEFAULT" | "NONE" | "FULL" | "DECORRELATED";
/**
* @public
*/
export interface ExponentialBackoffStrategyOptions {
jitterType: ExponentialBackoffJitterType;
backoffScaleValue?: number;
}
export { ExponentialBackoffJitterType, ExponentialBackoffStrategyOptions, RetryBackoffStrategy, RetryErrorInfo, RetryErrorType, RetryStrategyOptions, RetryStrategyV2, RetryToken, StandardRetryBackoffStrategy, StandardRetryToken, } from "@smithy/types";

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

import { Endpoint } from "./http";
import { RequestHandler } from "./transfer";
import { Decoder, Encoder, Provider } from "./util";
export { EndpointBearer, StreamCollector, SerdeContext, ResponseDeserializer, RequestSerializer, SdkStreamMixin, SdkStream, WithSdkStreamMixin, SdkStreamMixinInjector, SdkStreamSerdeContext, } from "@smithy/types";
/**
* @public
*
* Interface for object requires an Endpoint set.
*/
export interface EndpointBearer {
endpoint: Provider<Endpoint>;
}
/**
* @public
*/
export interface StreamCollector {
/**
* A function that converts a stream into an array of bytes.
*
* @param stream - The low-level native stream from browser or Nodejs runtime
*/
(stream: any): Promise<Uint8Array>;
}
/**
* @public
*
* Request and Response serde util functions and settings for AWS services
*/
export interface SerdeContext extends EndpointBearer {
base64Encoder: Encoder;
base64Decoder: Decoder;
utf8Encoder: Encoder;
utf8Decoder: Decoder;
streamCollector: StreamCollector;
requestHandler: RequestHandler<any, any>;
disableHostPrefix: boolean;
}
/**
* @public
*/
export interface RequestSerializer<Request, Context extends EndpointBearer = any> {
/**
* Converts the provided `input` into a request object
*
* @param input - The user input to serialize.
*
* @param context - Context containing runtime-specific util functions.
*/
(input: any, context: Context): Promise<Request>;
}
/**
* @public
*/
export interface ResponseDeserializer<OutputType, ResponseType = any, Context = any> {
/**
* Converts the output of an operation into JavaScript types.
*
* @param output - The HTTP response received from the service
*
* @param context - context containing runtime-specific util functions.
*/
(output: ResponseType, context: Context): Promise<OutputType>;
}
/**
* @public
*
* Declare DOM interfaces in case dom.d.ts is not added to the tsconfig lib, causing

@@ -86,43 +25,1 @@ * interfaces to not be defined. For developers with dom.d.ts added, the interfaces will

}
/**
* The interface contains mix-in utility functions to transfer the runtime-specific
* stream implementation to specified format. Each stream can ONLY be transformed
* once.
*/
export interface SdkStreamMixin {
transformToByteArray: () => Promise<Uint8Array>;
transformToString: (encoding?: string) => Promise<string>;
transformToWebStream: () => ReadableStream;
}
/**
* @public
*
* The type describing a runtime-specific stream implementation with mix-in
* utility functions.
*/
export type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
/**
* @public
*
* Indicates that the member of type T with
* key StreamKey have been extended
* with the SdkStreamMixin helper methods.
*/
export type WithSdkStreamMixin<T, StreamKey extends keyof T> = {
[key in keyof T]: key extends StreamKey ? SdkStream<T[StreamKey]> : T[key];
};
/**
* Interface for internal function to inject stream utility functions
* implementation
*
* @internal
*/
export interface SdkStreamMixinInjector {
(stream: unknown): SdkStreamMixin;
}
/**
* @internal
*/
export interface SdkStreamSerdeContext {
sdkStreamMixin: SdkStreamMixinInjector;
}

@@ -1,72 +0,1 @@

import { HttpResponse } from "./http";
import { MetadataBearer } from "./response";
/**
* @public
*
* A document type represents an untyped JSON-like value.
*
* Not all protocols support document types, and the serialization format of a
* document type is protocol specific. All JSON protocols SHOULD support
* document types and they SHOULD serialize document types inline as normal
* JSON values.
*/
export type DocumentType = null | boolean | number | string | DocumentType[] | {
[prop: string]: DocumentType;
};
/**
* @public
*
* A structure shape with the error trait.
* https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait
*/
export interface RetryableTrait {
/**
* Indicates that the error is a retryable throttling error.
*/
readonly throttling?: boolean;
}
/**
* @public
*
* Type that is implemented by all Smithy shapes marked with the
* error trait.
* @deprecated
*/
export interface SmithyException {
/**
* The shape ID name of the exception.
*/
readonly name: string;
/**
* Whether the client or server are at fault.
*/
readonly $fault: "client" | "server";
/**
* The service that encountered the exception.
*/
readonly $service?: string;
/**
* Indicates that an error MAY be retried by the client.
*/
readonly $retryable?: RetryableTrait;
/**
* Reference to low-level HTTP response object.
*/
readonly $response?: HttpResponse;
}
/**
* @public
*
* @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/}
*
* This type should not be used in your application.
* Users of the AWS SDK for JavaScript v3 service clients should prefer to
* use the specific Exception classes corresponding to each operation.
* These can be found as code in the deserializer for the operation's Command class,
* or as declarations in the service model file in codegen/sdk-codegen/aws-models.
*
* If no exceptions are enumerated by a particular Command operation,
* the base exception for the service should be used. Each client exports
* a base ServiceException prefixed with the service name.
*/
export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
export { DocumentType, RetryableTrait, SmithyException, SdkError } from "@smithy/types";

@@ -1,150 +0,1 @@

import { Message } from "./eventStream";
import { HttpRequest } from "./http";
/**
* @public
*
* A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be
* understood by the JavaScript `Date` constructor.
*/
export type DateInput = number | string | Date;
/**
* @public
*/
export interface SigningArguments {
/**
* The date and time to be used as signature metadata. This value should be
* a Date object, a unix (epoch) timestamp, or a string that can be
* understood by the JavaScript `Date` constructor.If not supplied, the
* value returned by `new Date()` will be used.
*/
signingDate?: DateInput;
/**
* The service signing name. It will override the service name of the signer
* in current invocation
*/
signingService?: string;
/**
* The region name to sign the request. It will override the signing region of the
* signer in current invocation
*/
signingRegion?: string;
}
/**
* @public
*/
export interface RequestSigningArguments extends SigningArguments {
/**
* A set of strings whose members represents headers that cannot be signed.
* All headers in the provided request will have their names converted to
* lower case and then checked for existence in the unsignableHeaders set.
*/
unsignableHeaders?: Set<string>;
/**
* A set of strings whose members represents headers that should be signed.
* Any values passed here will override those provided via unsignableHeaders,
* allowing them to be signed.
*
* All headers in the provided request will have their names converted to
* lower case before signing.
*/
signableHeaders?: Set<string>;
}
/**
* @public
*/
export interface RequestPresigningArguments extends RequestSigningArguments {
/**
* The number of seconds before the presigned URL expires
*/
expiresIn?: number;
/**
* A set of strings whose representing headers that should not be hoisted
* to presigned request's query string. If not supplied, the presigner
* moves all the AWS-specific headers (starting with `x-amz-`) to the request
* query string. If supplied, these headers remain in the presigned request's
* header.
* All headers in the provided request will have their names converted to
* lower case and then checked for existence in the unhoistableHeaders set.
*/
unhoistableHeaders?: Set<string>;
}
/**
* @public
*/
export interface EventSigningArguments extends SigningArguments {
priorSignature: string;
}
/**
* @public
*/
export interface RequestPresigner {
/**
* Signs a request for future use.
*
* The request will be valid until either the provided `expiration` time has
* passed or the underlying credentials have expired.
*
* @param requestToSign - The request that should be signed.
* @param options - Additional signing options.
*/
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
}
/**
* @public
*
* An object that signs request objects with AWS credentials using one of the
* AWS authentication protocols.
*/
export interface RequestSigner {
/**
* Sign the provided request for immediate dispatch.
*/
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
}
/**
* @public
*/
export interface StringSigner {
/**
* Sign the provided `stringToSign` for use outside of the context of
* request signing. Typical uses include signed policy generation.
*/
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
}
/**
* @public
*/
export interface FormattedEvent {
headers: Uint8Array;
payload: Uint8Array;
}
/**
* @public
*/
export interface EventSigner {
/**
* Sign the individual event of the event stream.
*/
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
}
/**
* @public
*/
export interface SignableMessage {
message: Message;
priorSignature: string;
}
/**
* @public
*/
export interface SignedMessage {
message: Message;
signature: string;
}
/**
* @public
*/
export interface MessageSigner {
signMessage(message: SignableMessage, args: SigningArguments): Promise<SignedMessage>;
sign(event: SignableMessage, options: SigningArguments): Promise<SignedMessage>;
}
export { DateInput, EventSigner, EventSigningArguments, FormattedEvent, MessageSigner, RequestSigningArguments, RequestPresigner, RequestPresigningArguments, RequestSigner, SignableMessage, SignedMessage, SigningArguments, StringSigner, } from "@smithy/types";

@@ -1,22 +0,1 @@

import { ChecksumConstructor } from "./checksum";
import { HashConstructor, StreamHasher } from "./crypto";
import { BodyLengthCalculator, Encoder } from "./util";
/**
* @public
*/
export interface GetAwsChunkedEncodingStreamOptions {
base64Encoder?: Encoder;
bodyLengthChecker: BodyLengthCalculator;
checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
checksumLocationName?: string;
streamHasher?: StreamHasher;
}
/**
* @public
*
* A function that returns Readable Stream which follows aws-chunked encoding stream.
* It optionally adds checksum if options are provided.
*/
export interface GetAwsChunkedEncodingStream<StreamType = any> {
(readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType;
}
export { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types";

@@ -1,33 +0,1 @@

/**
* @public
*/
export type RequestHandlerOutput<ResponseType> = {
response: ResponseType;
};
/**
* @public
*/
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> {
/**
* metadata contains information of a handler. For example
* 'h2' refers this handler is for handling HTTP/2 requests,
* whereas 'h1' refers handling HTTP1 requests
*/
metadata?: RequestHandlerMetadata;
destroy?: () => void;
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
}
/**
* @public
*/
export interface RequestHandlerMetadata {
handlerProtocol: RequestHandlerProtocol | string;
}
export declare enum RequestHandlerProtocol {
HTTP_0_9 = "http/0.9",
HTTP_1_0 = "http/1.0",
TDS_8_0 = "tds/8.0"
}
export interface RequestContext {
destination: URL;
}
export { RequestContext, RequestHandler, RequestHandlerMetadata, RequestHandlerOutput, RequestHandlerProtocol, } from "@smithy/types";

@@ -1,11 +0,1 @@

export interface AbortHandler {
(this: AbortSignal, ev: any): any;
}
export interface AbortSignal {
readonly aborted: boolean;
onabort: AbortHandler | Function | null;
}
export interface AbortController {
readonly signal: AbortSignal;
abort(): void;
}
export { AbortController, AbortHandler, AbortSignal } from "@smithy/types";

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

export interface AuthScheme {
name: "sigv4" | "sigv4a" | string;
signingName: string;
signingRegion: string;
signingRegionSet?: string[];
signingScope?: never;
properties: Record<string, unknown>;
}
export interface HttpAuthDefinition {
in: HttpAuthLocation;
name: string;
scheme?: string;
}
export declare enum HttpAuthLocation {
HEADER = "header",
QUERY = "query",
}
export {
AuthScheme,
HttpAuthDefinition,
HttpAuthLocation,
} from "@smithy/types";

@@ -1,12 +0,1 @@

import { SourceData } from "./crypto";
export interface Checksum {
digestLength?: number;
copy?(): Checksum;
digest(): Promise<Uint8Array>;
mark?(readLimit: number): void;
reset(): void;
update(chunk: Uint8Array): void;
}
export interface ChecksumConstructor {
new (secret?: SourceData): Checksum;
}
export { Checksum, ChecksumConstructor } from "@smithy/types";

@@ -1,52 +0,1 @@

import { Command } from "./command";
import { MiddlewareStack } from "./middleware";
import { MetadataBearer } from "./response";
interface InvokeFunction<
InputTypes extends object,
OutputTypes extends MetadataBearer,
ResolvedClientConfiguration
> {
<InputType extends InputTypes, OutputType extends OutputTypes>(
command: Command<
InputTypes,
InputType,
OutputTypes,
OutputType,
ResolvedClientConfiguration
>,
options?: any
): Promise<OutputType>;
<InputType extends InputTypes, OutputType extends OutputTypes>(
command: Command<
InputTypes,
InputType,
OutputTypes,
OutputType,
ResolvedClientConfiguration
>,
options: any,
cb: (err: any, data?: OutputType) => void
): void;
<InputType extends InputTypes, OutputType extends OutputTypes>(
command: Command<
InputTypes,
InputType,
OutputTypes,
OutputType,
ResolvedClientConfiguration
>,
options?: any,
cb?: (err: any, data?: OutputType) => void
): Promise<OutputType> | void;
}
export interface Client<
Input extends object,
Output extends MetadataBearer,
ResolvedClientConfiguration
> {
readonly config: ResolvedClientConfiguration;
middlewareStack: MiddlewareStack<Input, Output>;
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
destroy: () => void;
}
export {};
export { Client } from "@smithy/types";

@@ -1,17 +0,1 @@

import { Handler, MiddlewareStack } from "./middleware";
import { MetadataBearer } from "./response";
export interface Command<
ClientInput extends object,
InputType extends ClientInput,
ClientOutput extends MetadataBearer,
OutputType extends ClientOutput,
ResolvedConfiguration
> {
readonly input: InputType;
readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
resolveMiddleware(
stack: MiddlewareStack<ClientInput, ClientOutput>,
configuration: ResolvedConfiguration,
options: any
): Handler<InputType, OutputType>;
}
export { Command } from "@smithy/types";

@@ -1,14 +0,7 @@

export type SourceData = string | ArrayBuffer | ArrayBufferView;
export interface Hash {
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
digest(): Promise<Uint8Array>;
}
export interface HashConstructor {
new (secret?: SourceData): Hash;
}
export interface StreamHasher<StreamType = any> {
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
}
export interface randomValues {
(byteLength: number): Promise<Uint8Array>;
}
export {
Hash,
HashConstructor,
StreamHasher,
randomValues,
SourceData,
} from "@smithy/types";

@@ -1,19 +0,6 @@

import { Message } from "./eventStream";
export interface MessageEncoder {
encode(message: Message): Uint8Array;
}
export interface MessageDecoder {
decode(message: ArrayBufferView): Message;
feed(message: ArrayBufferView): void;
endOfStream(): void;
getMessage(): AvailableMessage;
getAvailableMessages(): AvailableMessages;
}
export interface AvailableMessage {
getMessage(): Message | undefined;
isEndOfStream(): boolean;
}
export interface AvailableMessages {
getMessages(): Message[];
isEndOfStream(): boolean;
}
export {
MessageDecoder,
MessageEncoder,
AvailableMessage,
AvailableMessages,
} from "@smithy/types";

@@ -1,43 +0,9 @@

import { AuthScheme } from "./auth";
export interface EndpointPartition {
name: string;
dnsSuffix: string;
dualStackDnsSuffix: string;
supportsFIPS: boolean;
supportsDualStack: boolean;
}
export interface EndpointARN {
partition: string;
service: string;
region: string;
accountId: string;
resourceId: Array<string>;
}
export declare enum EndpointURLScheme {
HTTP = "http",
HTTPS = "https",
}
export interface EndpointURL {
scheme: EndpointURLScheme;
authority: string;
path: string;
normalizedPath: string;
isIp: boolean;
}
export type EndpointObjectProperty =
| string
| boolean
| {
[key: string]: EndpointObjectProperty;
}
| EndpointObjectProperty[];
export interface EndpointV2 {
url: URL;
properties?: {
authSchemes?: AuthScheme[];
} & Record<string, EndpointObjectProperty>;
headers?: Record<string, string[]>;
}
export type EndpointParameters = {
[name: string]: undefined | string | boolean;
};
export {
EndpointARN,
EndpointPartition,
EndpointURLScheme,
EndpointURL,
EndpointObjectProperty,
EndpointV2,
EndpointParameters,
} from "@smithy/types";

@@ -1,77 +0,24 @@

import { HttpRequest } from "./http";
import {
FinalizeHandler,
FinalizeHandlerArguments,
FinalizeHandlerOutput,
HandlerExecutionContext,
} from "./middleware";
import { MetadataBearer } from "./response";
export interface Message {
headers: MessageHeaders;
body: Uint8Array;
}
export type MessageHeaders = Record<string, MessageHeaderValue>;
type HeaderValue<K extends string, V> = {
type: K;
value: V;
};
export type BooleanHeaderValue = HeaderValue<"boolean", boolean>;
export type ByteHeaderValue = HeaderValue<"byte", number>;
export type ShortHeaderValue = HeaderValue<"short", number>;
export type IntegerHeaderValue = HeaderValue<"integer", number>;
export type LongHeaderValue = HeaderValue<"long", Int64>;
export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>;
export type StringHeaderValue = HeaderValue<"string", string>;
export type TimestampHeaderValue = HeaderValue<"timestamp", Date>;
export type UuidHeaderValue = HeaderValue<"uuid", string>;
export type MessageHeaderValue =
| BooleanHeaderValue
| ByteHeaderValue
| ShortHeaderValue
| IntegerHeaderValue
| LongHeaderValue
| BinaryHeaderValue
| StringHeaderValue
| TimestampHeaderValue
| UuidHeaderValue;
export interface Int64 {
readonly bytes: Uint8Array;
valueOf: () => number;
toString: () => string;
}
export interface EventStreamSerdeContext {
eventStreamMarshaller: EventStreamMarshaller;
}
export interface EventStreamMarshallerDeserFn<StreamType> {
<T>(
body: StreamType,
deserializer: (input: Record<string, Message>) => Promise<T>
): AsyncIterable<T>;
}
export interface EventStreamMarshallerSerFn<StreamType> {
<T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
}
export interface EventStreamMarshaller<StreamType = any> {
deserialize: EventStreamMarshallerDeserFn<StreamType>;
serialize: EventStreamMarshallerSerFn<StreamType>;
}
export interface EventStreamRequestSigner {
sign(request: HttpRequest): Promise<HttpRequest>;
}
export interface EventStreamPayloadHandler {
handle: <Input extends object, Output extends MetadataBearer>(
next: FinalizeHandler<Input, Output>,
args: FinalizeHandlerArguments<Input>,
context?: HandlerExecutionContext
) => Promise<FinalizeHandlerOutput<Output>>;
}
export interface EventStreamPayloadHandlerProvider {
(options: any): EventStreamPayloadHandler;
}
export interface EventStreamSerdeProvider {
(options: any): EventStreamMarshaller;
}
export interface EventStreamSignerProvider {
(options: any): EventStreamRequestSigner;
}
export {};
export {
Message,
MessageHeaders,
BooleanHeaderValue,
ByteHeaderValue,
ShortHeaderValue,
IntegerHeaderValue,
LongHeaderValue,
BinaryHeaderValue,
StringHeaderValue,
TimestampHeaderValue,
UuidHeaderValue,
MessageHeaderValue,
Int64,
EventStreamSerdeContext,
EventStreamMarshaller,
EventStreamMarshallerDeserFn,
EventStreamMarshallerSerFn,
EventStreamPayloadHandler,
EventStreamPayloadHandlerProvider,
EventStreamRequestSigner,
EventStreamSerdeProvider,
EventStreamSignerProvider,
} from "@smithy/types";

@@ -1,3 +0,11 @@

import { AbortSignal } from "./abort";
import { URI } from "./uri";
import { HttpResponse } from "@smithy/types";
export {
Endpoint,
HeaderBag,
HttpHandlerOptions,
HttpMessage,
HttpRequest,
HttpResponse,
QueryParameterBag,
} from "@smithy/types";
export interface Headers extends Map<string, string> {

@@ -7,28 +15,4 @@ withHeader(headerName: string, headerValue: string): Headers;

}
export type HeaderBag = Record<string, string>;
export interface HttpMessage {
headers: HeaderBag;
body?: any;
}
export type QueryParameterBag = Record<string, string | Array<string> | null>;
export interface Endpoint {
protocol: string;
hostname: string;
port?: number;
path: string;
query?: QueryParameterBag;
}
export interface HttpRequest extends HttpMessage, URI {
method: string;
}
export interface HttpResponse extends HttpMessage {
statusCode: number;
reason?: string;
}
export interface ResolvedHttpResponse extends HttpResponse {
body: string;
}
export interface HttpHandlerOptions {
abortSignal?: AbortSignal;
requestTimeout?: number;
}

@@ -1,8 +0,4 @@

import { Identity, IdentityProvider } from "./Identity";
export interface AwsCredentialIdentity extends Identity {
readonly accessKeyId: string;
readonly secretAccessKey: string;
readonly sessionToken?: string;
}
export type AwsCredentialIdentityProvider =
IdentityProvider<AwsCredentialIdentity>;
export {
AwsCredentialIdentity,
AwsCredentialIdentityProvider,
} from "@smithy/types";

@@ -1,6 +0,1 @@

export interface Identity {
readonly expiration?: Date;
}
export interface IdentityProvider<IdentityT extends Identity> {
(identityProperties?: Record<string, any>): Promise<IdentityT>;
}
export { Identity, IdentityProvider } from "@smithy/types";

@@ -0,1 +1,3 @@

import { Logger } from "@smithy/types";
export { Logger } from "@smithy/types";
export type LogLevel =

@@ -14,8 +16,1 @@ | "all"

}
export interface Logger {
trace?: (...content: any[]) => void;
debug: (...content: any[]) => void;
info: (...content: any[]) => void;
warn: (...content: any[]) => void;
error: (...content: any[]) => void;
}

@@ -1,211 +0,40 @@

import { AuthScheme, HttpAuthDefinition } from "./auth";
import { EndpointV2 } from "./endpoint";
import { Logger } from "./logger";
import { UserAgent } from "./util";
export interface InitializeHandlerArguments<Input extends object> {
input: Input;
}
export interface InitializeHandlerOutput<Output extends object>
extends DeserializeHandlerOutput<Output> {
output: Output;
}
export interface SerializeHandlerArguments<Input extends object>
extends InitializeHandlerArguments<Input> {
request?: unknown;
}
export interface SerializeHandlerOutput<Output extends object>
extends InitializeHandlerOutput<Output> {}
export interface BuildHandlerArguments<Input extends object>
extends FinalizeHandlerArguments<Input> {}
export interface BuildHandlerOutput<Output extends object>
extends InitializeHandlerOutput<Output> {}
export interface FinalizeHandlerArguments<Input extends object>
extends SerializeHandlerArguments<Input> {
request: unknown;
}
export interface FinalizeHandlerOutput<Output extends object>
extends InitializeHandlerOutput<Output> {}
export interface DeserializeHandlerArguments<Input extends object>
extends FinalizeHandlerArguments<Input> {}
export interface DeserializeHandlerOutput<Output extends object> {
response: unknown;
output?: Output;
}
export interface InitializeHandler<
Input extends object,
Output extends object
> {
(args: InitializeHandlerArguments<Input>): Promise<
InitializeHandlerOutput<Output>
>;
}
export type Handler<
Input extends object,
Output extends object
> = InitializeHandler<Input, Output>;
export interface SerializeHandler<Input extends object, Output extends object> {
(args: SerializeHandlerArguments<Input>): Promise<
SerializeHandlerOutput<Output>
>;
}
export interface FinalizeHandler<Input extends object, Output extends object> {
(args: FinalizeHandlerArguments<Input>): Promise<
FinalizeHandlerOutput<Output>
>;
}
export interface BuildHandler<Input extends object, Output extends object> {
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
}
export interface DeserializeHandler<
Input extends object,
Output extends object
> {
(args: DeserializeHandlerArguments<Input>): Promise<
DeserializeHandlerOutput<Output>
>;
}
export interface InitializeMiddleware<
Input extends object,
Output extends object
> {
(
next: InitializeHandler<Input, Output>,
context: HandlerExecutionContext
): InitializeHandler<Input, Output>;
}
export interface SerializeMiddleware<
Input extends object,
Output extends object
> {
(
next: SerializeHandler<Input, Output>,
context: HandlerExecutionContext
): SerializeHandler<Input, Output>;
}
export interface FinalizeRequestMiddleware<
Input extends object,
Output extends object
> {
(
next: FinalizeHandler<Input, Output>,
context: HandlerExecutionContext
): FinalizeHandler<Input, Output>;
}
export interface BuildMiddleware<Input extends object, Output extends object> {
(
next: BuildHandler<Input, Output>,
context: HandlerExecutionContext
): BuildHandler<Input, Output>;
}
export interface DeserializeMiddleware<
Input extends object,
Output extends object
> {
(
next: DeserializeHandler<Input, Output>,
context: HandlerExecutionContext
): DeserializeHandler<Input, Output>;
}
export type MiddlewareType<Input extends object, Output extends object> =
| InitializeMiddleware<Input, Output>
| SerializeMiddleware<Input, Output>
| BuildMiddleware<Input, Output>
| FinalizeRequestMiddleware<Input, Output>
| DeserializeMiddleware<Input, Output>;
export interface Terminalware {
<Input extends object, Output extends object>(
context: HandlerExecutionContext
): DeserializeHandler<Input, Output>;
}
export type Step =
| "initialize"
| "serialize"
| "build"
| "finalizeRequest"
| "deserialize";
export type Priority = "high" | "normal" | "low";
export interface HandlerOptions {
step?: Step;
tags?: Array<string>;
name?: string;
override?: boolean;
}
export interface AbsoluteLocation {
priority?: Priority;
}
export type Relation = "before" | "after";
export interface RelativeLocation {
relation: Relation;
toMiddleware: string;
}
export type RelativeMiddlewareOptions = RelativeLocation &
Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>;
export interface InitializeHandlerOptions extends HandlerOptions {
step?: "initialize";
}
export interface SerializeHandlerOptions extends HandlerOptions {
step: "serialize";
}
export interface BuildHandlerOptions extends HandlerOptions {
step: "build";
}
export interface FinalizeRequestHandlerOptions extends HandlerOptions {
step: "finalizeRequest";
}
export interface DeserializeHandlerOptions extends HandlerOptions {
step: "deserialize";
}
export interface MiddlewareStack<Input extends object, Output extends object>
extends Pluggable<Input, Output> {
add(
middleware: InitializeMiddleware<Input, Output>,
options?: InitializeHandlerOptions & AbsoluteLocation
): void;
add(
middleware: SerializeMiddleware<Input, Output>,
options: SerializeHandlerOptions & AbsoluteLocation
): void;
add(
middleware: BuildMiddleware<Input, Output>,
options: BuildHandlerOptions & AbsoluteLocation
): void;
add(
middleware: FinalizeRequestMiddleware<Input, Output>,
options: FinalizeRequestHandlerOptions & AbsoluteLocation
): void;
add(
middleware: DeserializeMiddleware<Input, Output>,
options: DeserializeHandlerOptions & AbsoluteLocation
): void;
addRelativeTo(
middleware: MiddlewareType<Input, Output>,
options: RelativeMiddlewareOptions
): void;
use(pluggable: Pluggable<Input, Output>): void;
clone(): MiddlewareStack<Input, Output>;
remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
removeByTag(toRemove: string): boolean;
concat<InputType extends Input, OutputType extends Output>(
from: MiddlewareStack<InputType, OutputType>
): MiddlewareStack<InputType, OutputType>;
identify(): string[];
resolve<InputType extends Input, OutputType extends Output>(
handler: DeserializeHandler<InputType, OutputType>,
context: HandlerExecutionContext
): InitializeHandler<InputType, OutputType>;
}
export interface HandlerExecutionContext {
logger?: Logger;
userAgent?: UserAgent;
endpointV2?: EndpointV2;
authSchemes?: AuthScheme[];
currentAuthConfig?: HttpAuthDefinition;
dynamoDbDocumentClientOptions?: Partial<{
overrideInputFilterSensitiveLog(...args: any[]): string | void;
overrideOutputFilterSensitiveLog(...args: any[]): string | void;
}>;
[key: string]: any;
}
export interface Pluggable<Input extends object, Output extends object> {
applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
}
export {
AbsoluteLocation,
BuildHandler,
BuildHandlerArguments,
BuildHandlerOptions,
BuildHandlerOutput,
BuildMiddleware,
DeserializeHandler,
DeserializeHandlerArguments,
DeserializeHandlerOptions,
DeserializeHandlerOutput,
DeserializeMiddleware,
FinalizeHandler,
FinalizeHandlerArguments,
FinalizeHandlerOutput,
FinalizeRequestHandlerOptions,
FinalizeRequestMiddleware,
Handler,
HandlerExecutionContext,
HandlerOptions,
InitializeHandler,
InitializeHandlerArguments,
InitializeHandlerOptions,
InitializeHandlerOutput,
InitializeMiddleware,
MiddlewareStack,
MiddlewareType,
Pluggable,
Priority,
Relation,
RelativeLocation,
RelativeMiddlewareOptions,
SerializeHandler,
SerializeHandlerArguments,
SerializeHandlerOptions,
SerializeHandlerOutput,
SerializeMiddleware,
Step,
Terminalware,
} from "@smithy/types";

@@ -1,8 +0,1 @@

import { Client } from "./client";
export type Paginator<T> = AsyncGenerator<T, T, unknown>;
export interface PaginationConfiguration {
client: Client<any, any, any>;
pageSize?: number;
startingToken?: any;
stopOnSameToken?: boolean;
}
export { PaginationConfiguration, Paginator } from "@smithy/types";

@@ -1,7 +0,6 @@

export type IniSection = Record<string, string | undefined>;
export interface Profile extends IniSection {}
export type ParsedIniData = Record<string, IniSection>;
export interface SharedConfigFiles {
credentialsFile: ParsedIniData;
configFile: ParsedIniData;
}
export {
IniSection,
Profile,
ParsedIniData,
SharedConfigFiles,
} from "@smithy/types";

@@ -1,14 +0,4 @@

export interface ResponseMetadata {
httpStatusCode?: number;
requestId?: string;
extendedRequestId?: string;
cfId?: string;
attempts?: number;
totalRetryDelay?: number;
}
export interface MetadataBearer {
$metadata: ResponseMetadata;
}
export { MetadataBearer, ResponseMetadata } from "@smithy/types";
export interface Response {
body: any;
}

@@ -1,43 +0,12 @@

export type RetryErrorType =
| "TRANSIENT"
| "THROTTLING"
| "SERVER_ERROR"
| "CLIENT_ERROR";
export interface RetryErrorInfo {
errorType: RetryErrorType;
retryAfterHint?: Date;
}
export interface RetryBackoffStrategy {
computeNextBackoffDelay(retryAttempt: number): number;
}
export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy {
setDelayBase(delayBase: number): void;
}
export interface RetryStrategyOptions {
backoffStrategy: RetryBackoffStrategy;
maxRetriesBase: number;
}
export interface RetryToken {
getRetryCount(): number;
getRetryDelay(): number;
}
export interface StandardRetryToken extends RetryToken {
getRetryCost(): number | undefined;
}
export interface RetryStrategyV2 {
acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
refreshRetryTokenForRetry(
tokenToRenew: RetryToken,
errorInfo: RetryErrorInfo
): Promise<RetryToken>;
recordSuccess(token: RetryToken): void;
}
export type ExponentialBackoffJitterType =
| "DEFAULT"
| "NONE"
| "FULL"
| "DECORRELATED";
export interface ExponentialBackoffStrategyOptions {
jitterType: ExponentialBackoffJitterType;
backoffScaleValue?: number;
}
export {
ExponentialBackoffJitterType,
ExponentialBackoffStrategyOptions,
RetryBackoffStrategy,
RetryErrorInfo,
RetryErrorType,
RetryStrategyOptions,
RetryStrategyV2,
RetryToken,
StandardRetryBackoffStrategy,
StandardRetryToken,
} from "@smithy/types";

@@ -1,32 +0,13 @@

import { Endpoint } from "./http";
import { RequestHandler } from "./transfer";
import { Decoder, Encoder, Provider } from "./util";
export interface EndpointBearer {
endpoint: Provider<Endpoint>;
}
export interface StreamCollector {
(stream: any): Promise<Uint8Array>;
}
export interface SerdeContext extends EndpointBearer {
base64Encoder: Encoder;
base64Decoder: Decoder;
utf8Encoder: Encoder;
utf8Decoder: Decoder;
streamCollector: StreamCollector;
requestHandler: RequestHandler<any, any>;
disableHostPrefix: boolean;
}
export interface RequestSerializer<
Request,
Context extends EndpointBearer = any
> {
(input: any, context: Context): Promise<Request>;
}
export interface ResponseDeserializer<
OutputType,
ResponseType = any,
Context = any
> {
(output: ResponseType, context: Context): Promise<OutputType>;
}
export {
EndpointBearer,
StreamCollector,
SerdeContext,
ResponseDeserializer,
RequestSerializer,
SdkStreamMixin,
SdkStream,
WithSdkStreamMixin,
SdkStreamMixinInjector,
SdkStreamSerdeContext,
} from "@smithy/types";
declare global {

@@ -36,16 +17,1 @@ export interface ReadableStream {}

}
export interface SdkStreamMixin {
transformToByteArray: () => Promise<Uint8Array>;
transformToString: (encoding?: string) => Promise<string>;
transformToWebStream: () => ReadableStream;
}
export type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
export type WithSdkStreamMixin<T, StreamKey extends keyof T> = {
[key in keyof T]: key extends StreamKey ? SdkStream<T[StreamKey]> : T[key];
};
export interface SdkStreamMixinInjector {
(stream: unknown): SdkStreamMixin;
}
export interface SdkStreamSerdeContext {
sdkStreamMixin: SdkStreamMixinInjector;
}

@@ -1,24 +0,6 @@

import { HttpResponse } from "./http";
import { MetadataBearer } from "./response";
export type DocumentType =
| null
| boolean
| number
| string
| DocumentType[]
| {
[prop: string]: DocumentType;
};
export interface RetryableTrait {
readonly throttling?: boolean;
}
export interface SmithyException {
readonly name: string;
readonly $fault: "client" | "server";
readonly $service?: string;
readonly $retryable?: RetryableTrait;
readonly $response?: HttpResponse;
}
export type SdkError = Error &
Partial<SmithyException> &
Partial<MetadataBearer>;
export {
DocumentType,
RetryableTrait,
SmithyException,
SdkError,
} from "@smithy/types";

@@ -1,59 +0,15 @@

import { Message } from "./eventStream";
import { HttpRequest } from "./http";
export type DateInput = number | string | Date;
export interface SigningArguments {
signingDate?: DateInput;
signingService?: string;
signingRegion?: string;
}
export interface RequestSigningArguments extends SigningArguments {
unsignableHeaders?: Set<string>;
signableHeaders?: Set<string>;
}
export interface RequestPresigningArguments extends RequestSigningArguments {
expiresIn?: number;
unhoistableHeaders?: Set<string>;
}
export interface EventSigningArguments extends SigningArguments {
priorSignature: string;
}
export interface RequestPresigner {
presign(
requestToSign: HttpRequest,
options?: RequestPresigningArguments
): Promise<HttpRequest>;
}
export interface RequestSigner {
sign(
requestToSign: HttpRequest,
options?: RequestSigningArguments
): Promise<HttpRequest>;
}
export interface StringSigner {
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
}
export interface FormattedEvent {
headers: Uint8Array;
payload: Uint8Array;
}
export interface EventSigner {
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
}
export interface SignableMessage {
message: Message;
priorSignature: string;
}
export interface SignedMessage {
message: Message;
signature: string;
}
export interface MessageSigner {
signMessage(
message: SignableMessage,
args: SigningArguments
): Promise<SignedMessage>;
sign(
event: SignableMessage,
options: SigningArguments
): Promise<SignedMessage>;
}
export {
DateInput,
EventSigner,
EventSigningArguments,
FormattedEvent,
MessageSigner,
RequestSigningArguments,
RequestPresigner,
RequestPresigningArguments,
RequestSigner,
SignableMessage,
SignedMessage,
SigningArguments,
StringSigner,
} from "@smithy/types";

@@ -1,16 +0,4 @@

import { ChecksumConstructor } from "./checksum";
import { HashConstructor, StreamHasher } from "./crypto";
import { BodyLengthCalculator, Encoder } from "./util";
export interface GetAwsChunkedEncodingStreamOptions {
base64Encoder?: Encoder;
bodyLengthChecker: BodyLengthCalculator;
checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
checksumLocationName?: string;
streamHasher?: StreamHasher;
}
export interface GetAwsChunkedEncodingStream<StreamType = any> {
(
readableStream: StreamType,
options: GetAwsChunkedEncodingStreamOptions
): StreamType;
}
export {
GetAwsChunkedEncodingStream,
GetAwsChunkedEncodingStreamOptions,
} from "@smithy/types";

@@ -1,26 +0,7 @@

export type RequestHandlerOutput<ResponseType> = {
response: ResponseType;
};
export interface RequestHandler<
RequestType,
ResponseType,
HandlerOptions = {}
> {
metadata?: RequestHandlerMetadata;
destroy?: () => void;
handle: (
request: RequestType,
handlerOptions?: HandlerOptions
) => Promise<RequestHandlerOutput<ResponseType>>;
}
export interface RequestHandlerMetadata {
handlerProtocol: RequestHandlerProtocol | string;
}
export declare enum RequestHandlerProtocol {
HTTP_0_9 = "http/0.9",
HTTP_1_0 = "http/1.0",
TDS_8_0 = "tds/8.0",
}
export interface RequestContext {
destination: URL;
}
export {
RequestContext,
RequestHandler,
RequestHandlerMetadata,
RequestHandlerOutput,
RequestHandlerProtocol,
} from "@smithy/types";

@@ -1,11 +0,1 @@

import { QueryParameterBag } from "./http";
export type URI = {
protocol: string;
hostname: string;
port?: number;
path: string;
query?: QueryParameterBag;
username?: string;
password?: string;
fragment?: string;
};
export { URI } from "@smithy/types";

@@ -1,50 +0,14 @@

import { Endpoint } from "./http";
import {
FinalizeHandler,
FinalizeHandlerArguments,
FinalizeHandlerOutput,
} from "./middleware";
import { MetadataBearer } from "./response";
export interface Encoder {
(input: Uint8Array): string;
}
export interface Decoder {
(input: string): Uint8Array;
}
export interface Provider<T> {
(): Promise<T>;
}
export interface MemoizedProvider<T> {
(options?: { forceRefresh?: boolean }): Promise<T>;
}
export interface BodyLengthCalculator {
(body: any): number | undefined;
}
export interface RetryStrategy {
mode?: string;
retry: <Input extends object, Output extends MetadataBearer>(
next: FinalizeHandler<Input, Output>,
args: FinalizeHandlerArguments<Input>
) => Promise<FinalizeHandlerOutput<Output>>;
}
export interface UrlParser {
(url: string | URL): Endpoint;
}
export interface RegionInfo {
hostname: string;
partition: string;
path?: string;
signingService?: string;
signingRegion?: string;
}
export interface RegionInfoProviderOptions {
useDualstackEndpoint: boolean;
useFipsEndpoint: boolean;
}
export interface RegionInfoProvider {
(region: string, options?: RegionInfoProviderOptions): Promise<
RegionInfo | undefined
>;
}
export type UserAgentPair = [string, string];
export type UserAgent = UserAgentPair[];
export {
Encoder,
Decoder,
Provider,
UserAgentPair,
UserAgent,
UrlParser,
MemoizedProvider,
BodyLengthCalculator,
RegionInfo,
RegionInfoProviderOptions,
RegionInfoProvider,
RetryStrategy,
} from "@smithy/types";

@@ -1,9 +0,1 @@

import { AbortController } from "./abort";
export interface WaiterConfiguration<Client> {
client: Client;
maxWaitTime: number;
abortController?: AbortController;
abortSignal?: AbortController["signal"];
minDelay?: number;
maxDelay?: number;
}
export { WaiterConfiguration } from "@smithy/types";

@@ -1,17 +0,1 @@

import { QueryParameterBag } from "./http";
/**
* @internal
*
* Represents the components parts of a Uniform Resource Identifier used to
* construct the target location of a Request.
*/
export type URI = {
protocol: string;
hostname: string;
port?: number;
path: string;
query?: QueryParameterBag;
username?: string;
password?: string;
fragment?: string;
};
export { URI } from "@smithy/types";

@@ -1,155 +0,1 @@

import { Endpoint } from "./http";
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
import { MetadataBearer } from "./response";
/**
* @public
*
* A function that, given a TypedArray of bytes, can produce a string
* representation thereof.
*
* @example An encoder function that converts bytes to hexadecimal
* representation would return `'deadbeef'` when given
* `new Uint8Array([0xde, 0xad, 0xbe, 0xef])`.
*/
export interface Encoder {
(input: Uint8Array): string;
}
/**
* @public
*
* A function that, given a string, can derive the bytes represented by that
* string.
*
* @example A decoder function that converts bytes to hexadecimal
* representation would return `new Uint8Array([0xde, 0xad, 0xbe, 0xef])` when
* given the string `'deadbeef'`.
*/
export interface Decoder {
(input: string): Uint8Array;
}
/**
* @public
*
* A function that, when invoked, returns a promise that will be fulfilled with
* a value of type T.
*
* @example A function that reads credentials from shared SDK configuration
* files, assuming roles and collecting MFA tokens as necessary.
*/
export interface Provider<T> {
(): Promise<T>;
}
/**
* @public
*
* A function that, when invoked, returns a promise that will be fulfilled with
* a value of type T. It memoizes the result from the previous invocation
* instead of calling the underlying resources every time.
*
* You can force the provider to refresh the memoized value by invoke the
* function with optional parameter hash with `forceRefresh` boolean key and
* value `true`.
*
* @example A function that reads credentials from IMDS service that could
* return expired credentials. The SDK will keep using the expired credentials
* until an unretryable service error requiring a force refresh of the
* credentials.
*/
export interface MemoizedProvider<T> {
(options?: {
forceRefresh?: boolean;
}): Promise<T>;
}
/**
* @public
*
* A function that, given a request body, determines the
* length of the body. This is used to determine the Content-Length
* that should be sent with a request.
*
* @example A function that reads a file stream and calculates
* the size of the file.
*/
export interface BodyLengthCalculator {
(body: any): number | undefined;
}
/**
* @public
*
* Interface that specifies the retry behavior
*/
export interface RetryStrategy {
/**
* The retry mode describing how the retry strategy control the traffic flow.
*/
mode?: string;
/**
* the retry behavior the will invoke the next handler and handle the retry accordingly.
* This function should also update the $metadata from the response accordingly.
* @see {@link ResponseMetadata}
*/
retry: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>) => Promise<FinalizeHandlerOutput<Output>>;
}
/**
* @public
*
* Parses a URL in string form into an Endpoint object.
*/
export interface UrlParser {
(url: string | URL): Endpoint;
}
/**
* @public
*
* Object containing regionalization information of
* AWS services.
*/
export interface RegionInfo {
hostname: string;
partition: string;
path?: string;
signingService?: string;
signingRegion?: string;
}
/**
* @public
*
* Options to pass when calling {@link RegionInfoProvider}
*/
export interface RegionInfoProviderOptions {
/**
* Enables IPv6/IPv4 dualstack endpoint.
* @defaultValue false
*/
useDualstackEndpoint: boolean;
/**
* Enables FIPS compatible endpoints.
* @defaultValue false
*/
useFipsEndpoint: boolean;
}
/**
* @public
*
* Function returns designated service's regionalization
* information from given region. Each service client
* comes with its regionalization provider. it serves
* to provide the default values of related configurations
*/
export interface RegionInfoProvider {
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>;
}
/**
* @public
*
* A tuple that represents an API name and optional version
* of a library built using the AWS SDK.
*/
export type UserAgentPair = [name: string, version?: string];
/**
* @public
*
* User agent data that to be put into the request's user
* agent.
*/
export type UserAgent = UserAgentPair[];
export { Encoder, Decoder, Provider, UserAgentPair, UserAgent, UrlParser, MemoizedProvider, BodyLengthCalculator, RegionInfo, RegionInfoProviderOptions, RegionInfoProvider, RetryStrategy, } from "@smithy/types";

@@ -1,35 +0,1 @@

import { AbortController } from "./abort";
/**
* @public
*/
export interface WaiterConfiguration<Client> {
/**
* Required service client
*/
client: Client;
/**
* The amount of time in seconds a user is willing to wait for a waiter to complete.
*/
maxWaitTime: number;
/**
* @deprecated Use abortSignal
* Abort controller. Used for ending the waiter early.
*/
abortController?: AbortController;
/**
* Abort Signal. Used for ending the waiter early.
*/
abortSignal?: AbortController["signal"];
/**
* The minimum amount of time to delay between retries in seconds. This is the
* floor of the exponential backoff. This value defaults to service default
* if not specified. This value MUST be less than or equal to maxDelay and greater than 0.
*/
minDelay?: number;
/**
* The maximum amount of time to delay between retries in seconds. This is the
* ceiling of the exponential backoff. This value defaults to service default
* if not specified. If specified, this value MUST be greater than or equal to 1.
*/
maxDelay?: number;
}
export { WaiterConfiguration } from "@smithy/types";
{
"name": "@aws-sdk/types",
"version": "3.357.0",
"version": "3.369.0",
"main": "./dist-cjs/index.js",

@@ -44,2 +44,3 @@ "module": "./dist-es/index.js",

"dependencies": {
"@smithy/types": "1.1.0",
"tslib": "^2.5.0"

@@ -46,0 +47,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc