@trivikr-test/types
Advanced tools
Comparing version 3.55.0 to 3.170.0
@@ -9,2 +9,3 @@ "use strict"; | ||
tslib_1.__exportStar(require("./crypto"), exports); | ||
tslib_1.__exportStar(require("./endpoint"), exports); | ||
tslib_1.__exportStar(require("./eventStream"), exports); | ||
@@ -21,4 +22,5 @@ tslib_1.__exportStar(require("./http"), exports); | ||
tslib_1.__exportStar(require("./stream"), exports); | ||
tslib_1.__exportStar(require("./token"), exports); | ||
tslib_1.__exportStar(require("./transfer"), exports); | ||
tslib_1.__exportStar(require("./util"), exports); | ||
tslib_1.__exportStar(require("./waiter"), exports); |
@@ -6,2 +6,3 @@ export * from "./abort"; | ||
export * from "./crypto"; | ||
export * from "./endpoint"; | ||
export * from "./eventStream"; | ||
@@ -18,4 +19,5 @@ export * from "./http"; | ||
export * from "./stream"; | ||
export * from "./token"; | ||
export * from "./transfer"; | ||
export * from "./util"; | ||
export * from "./waiter"; |
@@ -13,5 +13,3 @@ import { HttpRequest } from "./http"; | ||
} | ||
export interface MessageHeaders { | ||
[name: string]: MessageHeaderValue; | ||
} | ||
export declare type MessageHeaders = Record<string, MessageHeaderValue>; | ||
export interface BooleanHeaderValue { | ||
@@ -65,8 +63,22 @@ type: "boolean"; | ||
} | ||
export interface EventStreamMarshaller { | ||
deserialize: (body: any, deserializer: (input: { | ||
[event: string]: Message; | ||
}) => any) => AsyncIterable<any>; | ||
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any; | ||
/** | ||
* 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>; | ||
} | ||
/** | ||
* A function that serializes modeled shape into binary stream message. | ||
*/ | ||
export interface EventStreamMarshallerSerFn<StreamType> { | ||
<T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType; | ||
} | ||
/** | ||
* 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>; | ||
} | ||
export interface EventStreamRequestSigner { | ||
@@ -73,0 +85,0 @@ sign(request: HttpRequest): Promise<HttpRequest>; |
@@ -40,5 +40,3 @@ import { AbortSignal } from "./abort"; | ||
*/ | ||
export interface HeaderBag { | ||
[key: string]: string; | ||
} | ||
export declare type HeaderBag = Record<string, string>; | ||
/** | ||
@@ -57,5 +55,3 @@ * Represents an HTTP message with headers and an optional static or streaming | ||
*/ | ||
export interface QueryParameterBag { | ||
[key: string]: string | Array<string> | null; | ||
} | ||
export declare type QueryParameterBag = Record<string, string | Array<string> | null>; | ||
export interface Endpoint { | ||
@@ -62,0 +58,0 @@ protocol: string; |
@@ -6,2 +6,3 @@ export * from "./abort"; | ||
export * from "./crypto"; | ||
export * from "./endpoint"; | ||
export * from "./eventStream"; | ||
@@ -18,4 +19,5 @@ export * from "./http"; | ||
export * from "./stream"; | ||
export * from "./token"; | ||
export * from "./transfer"; | ||
export * from "./util"; | ||
export * from "./waiter"; |
@@ -14,2 +14,10 @@ import { Client } from "./client"; | ||
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; | ||
} |
@@ -1,7 +0,8 @@ | ||
export interface Profile { | ||
[key: string]: string | undefined; | ||
export declare type IniSection = Record<string, string | undefined>; | ||
/** | ||
* @deprecated: Please use IniSection | ||
*/ | ||
export interface Profile extends IniSection { | ||
} | ||
export interface ParsedIniData { | ||
[key: string]: Profile; | ||
} | ||
export declare type ParsedIniData = Record<string, IniSection>; | ||
export interface SharedConfigFiles { | ||
@@ -8,0 +9,0 @@ credentialsFile: ParsedIniData; |
@@ -50,1 +50,29 @@ import { Endpoint } from "./http"; | ||
} | ||
/** | ||
* Declare ReadableStream in case dom.d.ts is not added to the tsconfig lib causing | ||
* ReadableStream interface is not defined. For developers with dom.d.ts added, | ||
* the ReadableStream interface will be merged correctly. | ||
* | ||
* This is also required for any clients with streaming interface where ReadableStream | ||
* type is also referred. The type is only declared here once since this @trivikr-test/types | ||
* is depended by all @trivikr-test packages. | ||
*/ | ||
declare global { | ||
export interface ReadableStream { | ||
} | ||
} | ||
/** | ||
* 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; | ||
} | ||
/** | ||
* The type describing a runtime-specific stream implementation with mix-in | ||
* utility functions. | ||
*/ | ||
export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin; |
export interface AbortHandler { | ||
(this: AbortSignal, ev: any): any; | ||
(this: AbortSignal, ev: any): any; | ||
} | ||
export interface AbortSignal { | ||
readonly aborted: boolean; | ||
onabort: AbortHandler | null; | ||
readonly aborted: boolean; | ||
onabort: AbortHandler | null; | ||
} | ||
export interface AbortController { | ||
readonly signal: AbortSignal; | ||
abort(): void; | ||
readonly signal: AbortSignal; | ||
abort(): void; | ||
} |
@@ -5,14 +5,51 @@ import { Command } from "./command"; | ||
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; | ||
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 interface Client< | ||
Input extends object, | ||
Output extends MetadataBearer, | ||
ResolvedClientConfiguration | ||
> { | ||
readonly config: ResolvedClientConfiguration; | ||
middlewareStack: MiddlewareStack<Input, Output>; | ||
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>; | ||
destroy: () => void; | ||
} | ||
export {}; |
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 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>; | ||
} |
import { Provider } from "./util"; | ||
export interface Credentials { | ||
readonly accessKeyId: string; | ||
readonly secretAccessKey: string; | ||
readonly sessionToken?: string; | ||
readonly expiration?: Date; | ||
readonly accessKeyId: string; | ||
readonly secretAccessKey: string; | ||
readonly sessionToken?: string; | ||
readonly expiration?: Date; | ||
} | ||
export declare type CredentialProvider = Provider<Credentials>; |
export declare type SourceData = string | ArrayBuffer | ArrayBufferView; | ||
export interface Hash { | ||
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; | ||
digest(): Promise<Uint8Array>; | ||
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; | ||
digest(): Promise<Uint8Array>; | ||
} | ||
export interface HashConstructor { | ||
new (secret?: SourceData): Hash; | ||
new (secret?: SourceData): Hash; | ||
} | ||
export interface StreamHasher<StreamType = any> { | ||
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>; | ||
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>; | ||
} | ||
export interface randomValues { | ||
(byteLength: number): Promise<Uint8Array>; | ||
(byteLength: number): Promise<Uint8Array>; | ||
} |
import { HttpRequest } from "./http"; | ||
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware"; | ||
import { | ||
FinalizeHandler, | ||
FinalizeHandlerArguments, | ||
FinalizeHandlerOutput, | ||
HandlerExecutionContext, | ||
} from "./middleware"; | ||
import { MetadataBearer } from "./response"; | ||
export interface Message { | ||
headers: MessageHeaders; | ||
body: Uint8Array; | ||
headers: MessageHeaders; | ||
body: Uint8Array; | ||
} | ||
export interface MessageHeaders { | ||
[name: string]: MessageHeaderValue; | ||
} | ||
export declare type MessageHeaders = Record<string, MessageHeaderValue>; | ||
export interface BooleanHeaderValue { | ||
type: "boolean"; | ||
value: boolean; | ||
type: "boolean"; | ||
value: boolean; | ||
} | ||
export interface ByteHeaderValue { | ||
type: "byte"; | ||
value: number; | ||
type: "byte"; | ||
value: number; | ||
} | ||
export interface ShortHeaderValue { | ||
type: "short"; | ||
value: number; | ||
type: "short"; | ||
value: number; | ||
} | ||
export interface IntegerHeaderValue { | ||
type: "integer"; | ||
value: number; | ||
type: "integer"; | ||
value: number; | ||
} | ||
export interface LongHeaderValue { | ||
type: "long"; | ||
value: Int64; | ||
type: "long"; | ||
value: Int64; | ||
} | ||
export interface BinaryHeaderValue { | ||
type: "binary"; | ||
value: Uint8Array; | ||
type: "binary"; | ||
value: Uint8Array; | ||
} | ||
export interface StringHeaderValue { | ||
type: "string"; | ||
value: string; | ||
type: "string"; | ||
value: string; | ||
} | ||
export interface TimestampHeaderValue { | ||
type: "timestamp"; | ||
value: Date; | ||
type: "timestamp"; | ||
value: Date; | ||
} | ||
export interface UuidHeaderValue { | ||
type: "uuid"; | ||
value: string; | ||
type: "uuid"; | ||
value: string; | ||
} | ||
export declare type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; | ||
export declare type MessageHeaderValue = | ||
| BooleanHeaderValue | ||
| ByteHeaderValue | ||
| ShortHeaderValue | ||
| IntegerHeaderValue | ||
| LongHeaderValue | ||
| BinaryHeaderValue | ||
| StringHeaderValue | ||
| TimestampHeaderValue | ||
| UuidHeaderValue; | ||
export interface Int64 { | ||
readonly bytes: Uint8Array; | ||
valueOf: () => number; | ||
toString: () => string; | ||
readonly bytes: Uint8Array; | ||
valueOf: () => number; | ||
toString: () => string; | ||
} | ||
export interface EventStreamSerdeContext { | ||
eventStreamMarshaller: EventStreamMarshaller; | ||
eventStreamMarshaller: EventStreamMarshaller; | ||
} | ||
export interface EventStreamMarshaller { | ||
deserialize: (body: any, deserializer: (input: { | ||
[event: string]: Message; | ||
}) => any) => AsyncIterable<any>; | ||
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any; | ||
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>; | ||
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>>; | ||
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; | ||
(options: any): EventStreamPayloadHandler; | ||
} | ||
export interface EventStreamSerdeProvider { | ||
(options: any): EventStreamMarshaller; | ||
(options: any): EventStreamMarshaller; | ||
} | ||
export interface EventStreamSignerProvider { | ||
(options: any): EventStreamRequestSigner; | ||
(options: any): EventStreamRequestSigner; | ||
} |
import { AbortSignal } from "./abort"; | ||
export interface Headers extends Map<string, string> { | ||
withHeader(headerName: string, headerValue: string): Headers; | ||
withoutHeader(headerName: string): Headers; | ||
} | ||
withHeader(headerName: string, headerValue: string): Headers; | ||
export interface HeaderBag { | ||
[key: string]: string; | ||
withoutHeader(headerName: string): Headers; | ||
} | ||
export declare type HeaderBag = Record<string, string>; | ||
export interface HttpMessage { | ||
headers: HeaderBag; | ||
body?: any; | ||
headers: HeaderBag; | ||
body?: any; | ||
} | ||
export interface QueryParameterBag { | ||
[key: string]: string | Array<string> | null; | ||
} | ||
export declare type QueryParameterBag = Record< | ||
string, | ||
string | Array<string> | null | ||
>; | ||
export interface Endpoint { | ||
protocol: string; | ||
hostname: string; | ||
port?: number; | ||
path: string; | ||
query?: QueryParameterBag; | ||
protocol: string; | ||
hostname: string; | ||
port?: number; | ||
path: string; | ||
query?: QueryParameterBag; | ||
} | ||
export interface HttpRequest extends HttpMessage, Endpoint { | ||
method: string; | ||
method: string; | ||
} | ||
export interface HttpResponse extends HttpMessage { | ||
statusCode: number; | ||
statusCode: number; | ||
} | ||
export interface ResolvedHttpResponse extends HttpResponse { | ||
body: string; | ||
body: string; | ||
} | ||
export interface HttpHandlerOptions { | ||
abortSignal?: AbortSignal; | ||
abortSignal?: AbortSignal; | ||
} |
@@ -6,2 +6,3 @@ export * from "./abort"; | ||
export * from "./crypto"; | ||
export * from "./endpoint"; | ||
export * from "./eventStream"; | ||
@@ -18,4 +19,5 @@ export * from "./http"; | ||
export * from "./stream"; | ||
export * from "./token"; | ||
export * from "./transfer"; | ||
export * from "./util"; | ||
export * from "./waiter"; |
@@ -0,14 +1,19 @@ | ||
export declare type LogLevel = | ||
| "all" | ||
| "log" | ||
| "info" | ||
| "warn" | ||
| "error" | ||
| "off"; | ||
export declare type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off"; | ||
export interface LoggerOptions { | ||
logger?: Logger; | ||
logLevel?: LogLevel; | ||
logger?: Logger; | ||
logLevel?: LogLevel; | ||
} | ||
export interface Logger { | ||
debug(...content: any[]): void; | ||
info(...content: any[]): void; | ||
warn(...content: any[]): void; | ||
error(...content: any[]): void; | ||
debug(...content: any[]): void; | ||
info(...content: any[]): void; | ||
warn(...content: any[]): void; | ||
error(...content: any[]): void; | ||
} |
import { Logger } from "./logger"; | ||
import { UserAgent } from "./util"; | ||
export interface InitializeHandlerArguments<Input extends object> { | ||
input: Input; | ||
input: Input; | ||
} | ||
export interface InitializeHandlerOutput<Output extends object> extends DeserializeHandlerOutput<Output> { | ||
output: Output; | ||
export interface InitializeHandlerOutput<Output extends object> | ||
extends DeserializeHandlerOutput<Output> { | ||
output: Output; | ||
} | ||
export interface SerializeHandlerArguments<Input extends object> extends InitializeHandlerArguments<Input> { | ||
request?: unknown; | ||
export interface SerializeHandlerArguments<Input extends object> | ||
extends InitializeHandlerArguments<Input> { | ||
request?: unknown; | ||
} | ||
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> { | ||
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 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 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; | ||
response: unknown; | ||
output?: Output; | ||
} | ||
export interface InitializeHandler<Input extends object, Output extends object> { | ||
(args: InitializeHandlerArguments<Input>): Promise<InitializeHandlerOutput<Output>>; | ||
export interface InitializeHandler< | ||
Input extends object, | ||
Output extends object | ||
> { | ||
(args: InitializeHandlerArguments<Input>): Promise< | ||
InitializeHandlerOutput<Output> | ||
>; | ||
} | ||
export declare type Handler<Input extends object, Output extends object> = InitializeHandler<Input, Output>; | ||
export declare 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>>; | ||
(args: SerializeHandlerArguments<Input>): Promise< | ||
SerializeHandlerOutput<Output> | ||
>; | ||
} | ||
export interface FinalizeHandler<Input extends object, Output extends object> { | ||
(args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>>; | ||
(args: FinalizeHandlerArguments<Input>): Promise< | ||
FinalizeHandlerOutput<Output> | ||
>; | ||
} | ||
export interface BuildHandler<Input extends object, Output extends object> { | ||
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>; | ||
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>; | ||
} | ||
export interface DeserializeHandler<Input extends object, Output extends object> { | ||
(args: DeserializeHandlerArguments<Input>): Promise<DeserializeHandlerOutput<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 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 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 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>; | ||
( | ||
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 interface DeserializeMiddleware< | ||
Input extends object, | ||
Output extends object | ||
> { | ||
( | ||
next: DeserializeHandler<Input, Output>, | ||
context: HandlerExecutionContext | ||
): DeserializeHandler<Input, Output>; | ||
} | ||
export declare type MiddlewareType<Input extends object, Output extends object> = InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>; | ||
export declare 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>; | ||
<Input extends object, Output extends object>( | ||
context: HandlerExecutionContext | ||
): DeserializeHandler<Input, Output>; | ||
} | ||
export declare type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize"; | ||
export declare type Step = | ||
| "initialize" | ||
| "serialize" | ||
| "build" | ||
| "finalizeRequest" | ||
| "deserialize"; | ||
export declare type Priority = "high" | "normal" | "low"; | ||
export interface HandlerOptions { | ||
step?: Step; | ||
tags?: Array<string>; | ||
name?: string; | ||
override?: boolean; | ||
step?: Step; | ||
tags?: Array<string>; | ||
name?: string; | ||
override?: boolean; | ||
} | ||
export interface AbsoluteLocation { | ||
priority?: Priority; | ||
priority?: Priority; | ||
} | ||
export declare type Relation = "before" | "after"; | ||
export interface RelativeLocation { | ||
relation: Relation; | ||
toMiddleware: string; | ||
relation: Relation; | ||
toMiddleware: string; | ||
} | ||
export declare type RelativeMiddlewareOptions = RelativeLocation & Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>; | ||
export declare type RelativeMiddlewareOptions = RelativeLocation & | ||
Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>; | ||
export interface InitializeHandlerOptions extends HandlerOptions { | ||
step?: "initialize"; | ||
step?: "initialize"; | ||
} | ||
export interface SerializeHandlerOptions extends HandlerOptions { | ||
step: "serialize"; | ||
step: "serialize"; | ||
} | ||
export interface BuildHandlerOptions extends HandlerOptions { | ||
step: "build"; | ||
step: "build"; | ||
} | ||
export interface FinalizeRequestHandlerOptions extends HandlerOptions { | ||
step: "finalizeRequest"; | ||
step: "finalizeRequest"; | ||
} | ||
export interface DeserializeHandlerOptions extends HandlerOptions { | ||
step: "deserialize"; | ||
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>; | ||
resolve<InputType extends Input, OutputType extends Output>(handler: DeserializeHandler<InputType, OutputType>, context: HandlerExecutionContext): InitializeHandler<InputType, OutputType>; | ||
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>; | ||
resolve<InputType extends Input, OutputType extends Output>( | ||
handler: DeserializeHandler<InputType, OutputType>, | ||
context: HandlerExecutionContext | ||
): InitializeHandler<InputType, OutputType>; | ||
} | ||
export interface HandlerExecutionContext { | ||
logger?: Logger; | ||
userAgent?: UserAgent; | ||
[key: string]: any; | ||
logger?: Logger; | ||
userAgent?: UserAgent; | ||
[key: string]: any; | ||
} | ||
export interface Pluggable<Input extends object, Output extends object> { | ||
applyToStack: (stack: MiddlewareStack<Input, Output>) => void; | ||
applyToStack: (stack: MiddlewareStack<Input, Output>) => void; | ||
} |
@@ -6,5 +6,7 @@ import { Client } from "./client"; | ||
export interface PaginationConfiguration { | ||
client: Client<any, any, any>; | ||
pageSize?: number; | ||
startingToken?: any; | ||
client: Client<any, any, any>; | ||
pageSize?: number; | ||
startingToken?: any; | ||
stopOnSameToken?: boolean; | ||
} |
@@ -1,10 +0,8 @@ | ||
export interface Profile { | ||
[key: string]: string | undefined; | ||
} | ||
export interface ParsedIniData { | ||
[key: string]: Profile; | ||
} | ||
export declare type IniSection = Record<string, string | undefined>; | ||
export interface Profile extends IniSection {} | ||
export declare type ParsedIniData = Record<string, IniSection>; | ||
export interface SharedConfigFiles { | ||
credentialsFile: ParsedIniData; | ||
configFile: ParsedIniData; | ||
credentialsFile: ParsedIniData; | ||
configFile: ParsedIniData; | ||
} |
export interface ResponseMetadata { | ||
httpStatusCode?: number; | ||
requestId?: string; | ||
extendedRequestId?: string; | ||
cfId?: string; | ||
attempts?: number; | ||
totalRetryDelay?: number; | ||
httpStatusCode?: number; | ||
requestId?: string; | ||
extendedRequestId?: string; | ||
cfId?: string; | ||
attempts?: number; | ||
totalRetryDelay?: number; | ||
} | ||
export interface MetadataBearer { | ||
$metadata: ResponseMetadata; | ||
$metadata: ResponseMetadata; | ||
} |
@@ -6,25 +6,41 @@ import { Endpoint } from "./http"; | ||
export interface EndpointBearer { | ||
endpoint: Provider<Endpoint>; | ||
endpoint: Provider<Endpoint>; | ||
} | ||
export interface StreamCollector { | ||
(stream: any): Promise<Uint8Array>; | ||
(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; | ||
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 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 interface ResponseDeserializer< | ||
OutputType, | ||
ResponseType = any, | ||
Context = any | ||
> { | ||
(output: ResponseType, context: Context): Promise<OutputType>; | ||
} | ||
declare global { | ||
export interface ReadableStream {} | ||
} | ||
export interface SdkStreamMixin { | ||
transformToByteArray: () => Promise<Uint8Array>; | ||
transformToString: (encoding?: string) => Promise<string>; | ||
transformToWebStream: () => ReadableStream; | ||
} | ||
export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin; |
import { HttpResponse } from "./http"; | ||
import { MetadataBearer } from "./response"; | ||
export declare type DocumentType = null | boolean | number | string | DocumentType[] | { | ||
[prop: string]: DocumentType; | ||
}; | ||
export declare type DocumentType = | ||
| null | ||
| boolean | ||
| number | ||
| string | ||
| DocumentType[] | ||
| { | ||
[prop: string]: DocumentType; | ||
}; | ||
export interface RetryableTrait { | ||
readonly throttling?: boolean; | ||
readonly throttling?: boolean; | ||
} | ||
export interface SmithyException { | ||
readonly name: string; | ||
readonly $fault: "client" | "server"; | ||
readonly $service?: string; | ||
readonly $retryable?: RetryableTrait; | ||
readonly $response?: HttpResponse; | ||
readonly name: string; | ||
readonly $fault: "client" | "server"; | ||
readonly $service?: string; | ||
readonly $retryable?: RetryableTrait; | ||
readonly $response?: HttpResponse; | ||
} | ||
export declare type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>; | ||
export declare type SdkError = Error & | ||
Partial<SmithyException> & | ||
Partial<MetadataBearer>; |
@@ -5,44 +5,43 @@ import { HttpRequest } from "./http"; | ||
export interface SigningArguments { | ||
signingDate?: DateInput; | ||
signingService?: string; | ||
signingRegion?: string; | ||
signingDate?: DateInput; | ||
signingService?: string; | ||
signingRegion?: string; | ||
} | ||
export interface RequestSigningArguments extends SigningArguments { | ||
unsignableHeaders?: Set<string>; | ||
signableHeaders?: Set<string>; | ||
unsignableHeaders?: Set<string>; | ||
signableHeaders?: Set<string>; | ||
} | ||
export interface RequestPresigningArguments extends RequestSigningArguments { | ||
expiresIn?: number; | ||
unhoistableHeaders?: Set<string>; | ||
expiresIn?: number; | ||
unhoistableHeaders?: Set<string>; | ||
} | ||
export interface EventSigningArguments extends SigningArguments { | ||
priorSignature: string; | ||
priorSignature: string; | ||
} | ||
export interface RequestPresigner { | ||
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>; | ||
presign( | ||
requestToSign: HttpRequest, | ||
options?: RequestPresigningArguments | ||
): Promise<HttpRequest>; | ||
} | ||
export interface RequestSigner { | ||
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>; | ||
sign( | ||
requestToSign: HttpRequest, | ||
options?: RequestSigningArguments | ||
): Promise<HttpRequest>; | ||
} | ||
export interface StringSigner { | ||
sign(stringToSign: string, options?: SigningArguments): Promise<string>; | ||
sign(stringToSign: string, options?: SigningArguments): Promise<string>; | ||
} | ||
export interface FormattedEvent { | ||
headers: Uint8Array; | ||
payload: Uint8Array; | ||
headers: Uint8Array; | ||
payload: Uint8Array; | ||
} | ||
export interface EventSigner { | ||
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>; | ||
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>; | ||
} |
import { HashConstructor, StreamHasher } from "./crypto"; | ||
import { BodyLengthCalculator, Encoder } from "./util"; | ||
export interface GetAwsChunkedEncodingStreamOptions { | ||
base64Encoder?: Encoder; | ||
bodyLengthChecker: BodyLengthCalculator; | ||
checksumAlgorithmFn?: HashConstructor; | ||
checksumLocationName?: string; | ||
streamHasher?: StreamHasher; | ||
base64Encoder?: Encoder; | ||
bodyLengthChecker: BodyLengthCalculator; | ||
checksumAlgorithmFn?: HashConstructor; | ||
checksumLocationName?: string; | ||
streamHasher?: StreamHasher; | ||
} | ||
export interface GetAwsChunkedEncodingStream<StreamType = any> { | ||
(readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType; | ||
( | ||
readableStream: StreamType, | ||
options: GetAwsChunkedEncodingStreamOptions | ||
): StreamType; | ||
} |
export declare type RequestHandlerOutput<ResponseType> = { | ||
response: ResponseType; | ||
response: ResponseType; | ||
}; | ||
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> { | ||
metadata?: RequestHandlerMetadata; | ||
destroy?: () => void; | ||
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>; | ||
export interface RequestHandler< | ||
RequestType, | ||
ResponseType, | ||
HandlerOptions = {} | ||
> { | ||
metadata?: RequestHandlerMetadata; | ||
destroy?: () => void; | ||
handle: ( | ||
request: RequestType, | ||
handlerOptions?: HandlerOptions | ||
) => Promise<RequestHandlerOutput<ResponseType>>; | ||
} | ||
export interface RequestHandlerMetadata { | ||
handlerProtocol: string; | ||
handlerProtocol: string; | ||
} |
import { Endpoint } from "./http"; | ||
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware"; | ||
import { | ||
FinalizeHandler, | ||
FinalizeHandlerArguments, | ||
FinalizeHandlerOutput, | ||
} from "./middleware"; | ||
import { MetadataBearer } from "./response"; | ||
export interface Encoder { | ||
(input: Uint8Array): string; | ||
(input: Uint8Array): string; | ||
} | ||
export interface Decoder { | ||
(input: string): Uint8Array; | ||
(input: string): Uint8Array; | ||
} | ||
export interface Provider<T> { | ||
(): Promise<T>; | ||
(): Promise<T>; | ||
} | ||
export interface MemoizedProvider<T> { | ||
(options?: { | ||
forceRefresh?: boolean; | ||
}): Promise<T>; | ||
(options?: { forceRefresh?: boolean }): Promise<T>; | ||
} | ||
export interface BodyLengthCalculator { | ||
(body: any): number | undefined; | ||
(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>>; | ||
mode?: string; | ||
retry: <Input extends object, Output extends MetadataBearer>( | ||
next: FinalizeHandler<Input, Output>, | ||
args: FinalizeHandlerArguments<Input> | ||
) => Promise<FinalizeHandlerOutput<Output>>; | ||
} | ||
export interface UrlParser { | ||
(url: string): Endpoint; | ||
(url: string): Endpoint; | ||
} | ||
export interface RegionInfo { | ||
hostname: string; | ||
partition: string; | ||
path?: string; | ||
signingService?: string; | ||
signingRegion?: string; | ||
hostname: string; | ||
partition: string; | ||
path?: string; | ||
signingService?: string; | ||
signingRegion?: string; | ||
} | ||
export interface RegionInfoProviderOptions { | ||
useDualstackEndpoint: boolean; | ||
useFipsEndpoint: boolean; | ||
useDualstackEndpoint: boolean; | ||
useFipsEndpoint: boolean; | ||
} | ||
export interface RegionInfoProvider { | ||
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>; | ||
(region: string, options?: RegionInfoProviderOptions): Promise< | ||
RegionInfo | undefined | ||
>; | ||
} | ||
export declare type UserAgentPair = [ | ||
string, | ||
string | ||
]; | ||
export declare type UserAgentPair = [string, string]; | ||
export declare type UserAgent = UserAgentPair[]; |
import { AbortController } from "./abort"; | ||
export interface WaiterConfiguration<Client> { | ||
client: Client; | ||
maxWaitTime: number; | ||
abortController?: AbortController; | ||
abortSignal?: AbortController["signal"]; | ||
minDelay?: number; | ||
maxDelay?: number; | ||
client: Client; | ||
maxWaitTime: number; | ||
abortController?: AbortController; | ||
abortSignal?: AbortController["signal"]; | ||
minDelay?: number; | ||
maxDelay?: number; | ||
} |
{ | ||
"name": "@trivikr-test/types", | ||
"version": "3.55.0", | ||
"version": "3.170.0", | ||
"main": "./dist-cjs/index.js", | ||
@@ -12,2 +12,3 @@ "module": "./dist-es/index.js", | ||
"build:es": "tsc -p tsconfig.es.json", | ||
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", | ||
"build:types": "tsc -p tsconfig.types.json", | ||
@@ -45,3 +46,3 @@ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", | ||
"concurrently": "7.0.0", | ||
"downlevel-dts": "0.7.0", | ||
"downlevel-dts": "0.10.1", | ||
"rimraf": "3.0.2", | ||
@@ -48,0 +49,0 @@ "typedoc": "0.19.2", |
@@ -1,4 +0,1 @@ | ||
# @aws-sdk/types | ||
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/types/latest.svg)](https://www.npmjs.com/package/@aws-sdk/types) | ||
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/types.svg)](https://www.npmjs.com/package/@aws-sdk/types) | ||
Please refer [README.md](https://github.com/aws/aws-sdk-js-v3/blob/v3.170.0/packages/types/README.md) for v3.170.0. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85790
91
2128
2