import { Command } from "./command"; import { MiddlewareStack } from "./middleware"; import { MetadataBearer } from "./response"; import { OptionalParameter } from "./util"; /** * @public * * A type which checks if the client configuration is optional. * If all entries of the client configuration are optional, it allows client creation without passing any config. */ export type CheckOptionalClientConfig = OptionalParameter; /** * @public * * function definition for different overrides of client's 'send' function. */ export interface InvokeFunction { (command: Command, options?: any): Promise; (command: Command, cb: (err: any, data?: OutputType) => void): void; (command: Command, options: any, cb: (err: any, data?: OutputType) => void): void; (command: Command, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; } /** * @public * * Signature that appears on aggregated clients' methods. */ export interface InvokeMethod { (input: InputType, options?: any): Promise; (input: InputType, cb: (err: any, data?: OutputType) => void): void; (input: InputType, options: any, cb: (err: any, data?: OutputType) => void): void; (input: InputType, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | 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 { readonly config: ResolvedClientConfiguration; middlewareStack: MiddlewareStack; send: InvokeFunction; destroy: () => void; }