@aws-sdk/types 3.170.0 → 3.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.171.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.170.0...v3.171.0) (2022-09-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **endpoint:** util-endpoints and middleware-endpoint for endpoints 2.0 ([#3932](https://github.com/aws/aws-sdk-js-v3/issues/3932)) ([e81b7d0](https://github.com/aws/aws-sdk-js-v3/commit/e81b7d0920a74843a2a34857f41b0d6d93abc465))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/types
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist-cjs/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./abort"), exports);
5
+ tslib_1.__exportStar(require("./auth"), exports);
5
6
  tslib_1.__exportStar(require("./client"), exports);
6
7
  tslib_1.__exportStar(require("./command"), exports);
7
8
  tslib_1.__exportStar(require("./credentials"), exports);
@@ -0,0 +1 @@
1
+ export {};
package/dist-es/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./abort";
2
+ export * from "./auth";
2
3
  export * from "./client";
3
4
  export * from "./command";
4
5
  export * from "./credentials";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Authentication schemes represent a way that the service will authenticate the customer’s identity.
3
+ */
4
+ export interface AuthScheme {
5
+ name: string;
6
+ properties: Record<string, unknown>;
7
+ }
@@ -1,8 +1,14 @@
1
1
  import { Provider } from "./util";
2
+ export interface AwsCredentialIdentity {
3
+ /**
4
+ * A {Date} when the identity or credential will no longer be accepted.
5
+ */
6
+ readonly expiration?: Date;
7
+ }
2
8
  /**
3
9
  * An object representing temporary or permanent AWS credentials.
4
10
  */
5
- export interface Credentials {
11
+ export interface Credentials extends AwsCredentialIdentity {
6
12
  /**
7
13
  * AWS access key ID
8
14
  */
@@ -16,9 +22,5 @@ export interface Credentials {
16
22
  * present for temporary credentials.
17
23
  */
18
24
  readonly sessionToken?: string;
19
- /**
20
- * A {Date} when these credentials will no longer be accepted.
21
- */
22
- readonly expiration?: Date;
23
25
  }
24
26
  export declare type CredentialProvider = Provider<Credentials>;
@@ -48,3 +48,6 @@ export interface EndpointV2 {
48
48
  properties?: Record<string, EndpointObjectProperty>;
49
49
  headers?: Record<string, string[]>;
50
50
  }
51
+ export declare type EndpointParameters = {
52
+ [name: string]: undefined | string | boolean;
53
+ };
@@ -1,4 +1,5 @@
1
1
  export * from "./abort";
2
+ export * from "./auth";
2
3
  export * from "./client";
3
4
  export * from "./command";
4
5
  export * from "./credentials";
@@ -1,15 +1,11 @@
1
1
  export interface AbortHandler {
2
2
  (this: AbortSignal, ev: any): any;
3
3
  }
4
-
5
4
  export interface AbortSignal {
6
5
  readonly aborted: boolean;
7
-
8
6
  onabort: AbortHandler | null;
9
7
  }
10
-
11
8
  export interface AbortController {
12
9
  readonly signal: AbortSignal;
13
-
14
10
  abort(): void;
15
11
  }
@@ -0,0 +1,4 @@
1
+ export interface AuthScheme {
2
+ name: string;
3
+ properties: Record<string, unknown>;
4
+ }
@@ -1,7 +1,6 @@
1
1
  import { Command } from "./command";
2
2
  import { MiddlewareStack } from "./middleware";
3
3
  import { MetadataBearer } from "./response";
4
-
5
4
  interface InvokeFunction<
6
5
  InputTypes extends object,
7
6
  OutputTypes extends MetadataBearer,
@@ -40,7 +39,6 @@ interface InvokeFunction<
40
39
  cb?: (err: any, data?: OutputType) => void
41
40
  ): Promise<OutputType> | void;
42
41
  }
43
-
44
42
  export interface Client<
45
43
  Input extends object,
46
44
  Output extends MetadataBearer,
@@ -1,12 +1,10 @@
1
1
  import { Provider } from "./util";
2
-
3
- export interface Credentials {
2
+ export interface AwsCredentialIdentity {
3
+ readonly expiration?: Date;
4
+ }
5
+ export interface Credentials extends AwsCredentialIdentity {
4
6
  readonly accessKeyId: string;
5
-
6
7
  readonly secretAccessKey: string;
7
-
8
8
  readonly sessionToken?: string;
9
-
10
- readonly expiration?: Date;
11
9
  }
12
10
  export declare type CredentialProvider = Provider<Credentials>;
@@ -1,19 +1,14 @@
1
1
  export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
2
-
3
2
  export interface Hash {
4
3
  update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
5
-
6
4
  digest(): Promise<Uint8Array>;
7
5
  }
8
-
9
6
  export interface HashConstructor {
10
7
  new (secret?: SourceData): Hash;
11
8
  }
12
-
13
9
  export interface StreamHasher<StreamType = any> {
14
10
  (hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
15
11
  }
16
-
17
12
  export interface randomValues {
18
13
  (byteLength: number): Promise<Uint8Array>;
19
14
  }
@@ -18,13 +18,9 @@ export declare enum EndpointURLScheme {
18
18
  }
19
19
  export interface EndpointURL {
20
20
  scheme: EndpointURLScheme;
21
-
22
21
  authority: string;
23
-
24
22
  path: string;
25
-
26
23
  normalizedPath: string;
27
-
28
24
  isIp: boolean;
29
25
  }
30
26
  export declare type EndpointObjectProperty =
@@ -39,3 +35,6 @@ export interface EndpointV2 {
39
35
  properties?: Record<string, EndpointObjectProperty>;
40
36
  headers?: Record<string, string[]>;
41
37
  }
38
+ export declare type EndpointParameters = {
39
+ [name: string]: undefined | string | boolean;
40
+ };
@@ -6,7 +6,6 @@ import {
6
6
  HandlerExecutionContext,
7
7
  } from "./middleware";
8
8
  import { MetadataBearer } from "./response";
9
-
10
9
  export interface Message {
11
10
  headers: MessageHeaders;
12
11
  body: Uint8Array;
@@ -63,22 +62,18 @@ export interface Int64 {
63
62
  valueOf: () => number;
64
63
  toString: () => string;
65
64
  }
66
-
67
65
  export interface EventStreamSerdeContext {
68
66
  eventStreamMarshaller: EventStreamMarshaller;
69
67
  }
70
-
71
68
  export interface EventStreamMarshallerDeserFn<StreamType> {
72
69
  <T>(
73
70
  body: StreamType,
74
71
  deserializer: (input: Record<string, Message>) => Promise<T>
75
72
  ): AsyncIterable<T>;
76
73
  }
77
-
78
74
  export interface EventStreamMarshallerSerFn<StreamType> {
79
75
  <T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
80
76
  }
81
-
82
77
  export interface EventStreamMarshaller<StreamType = any> {
83
78
  deserialize: EventStreamMarshallerDeserFn<StreamType>;
84
79
  serialize: EventStreamMarshallerSerFn<StreamType>;
@@ -1,18 +1,13 @@
1
1
  import { AbortSignal } from "./abort";
2
-
3
2
  export interface Headers extends Map<string, string> {
4
3
  withHeader(headerName: string, headerValue: string): Headers;
5
-
6
4
  withoutHeader(headerName: string): Headers;
7
5
  }
8
-
9
6
  export declare type HeaderBag = Record<string, string>;
10
-
11
7
  export interface HttpMessage {
12
8
  headers: HeaderBag;
13
9
  body?: any;
14
10
  }
15
-
16
11
  export declare type QueryParameterBag = Record<
17
12
  string,
18
13
  string | Array<string> | null
@@ -24,19 +19,15 @@ export interface Endpoint {
24
19
  path: string;
25
20
  query?: QueryParameterBag;
26
21
  }
27
-
28
22
  export interface HttpRequest extends HttpMessage, Endpoint {
29
23
  method: string;
30
24
  }
31
-
32
25
  export interface HttpResponse extends HttpMessage {
33
26
  statusCode: number;
34
27
  }
35
-
36
28
  export interface ResolvedHttpResponse extends HttpResponse {
37
29
  body: string;
38
30
  }
39
-
40
31
  export interface HttpHandlerOptions {
41
32
  abortSignal?: AbortSignal;
42
33
  }
@@ -1,4 +1,5 @@
1
1
  export * from "./abort";
2
+ export * from "./auth";
2
3
  export * from "./client";
3
4
  export * from "./command";
4
5
  export * from "./credentials";
@@ -5,12 +5,10 @@ export declare type LogLevel =
5
5
  | "warn"
6
6
  | "error"
7
7
  | "off";
8
-
9
8
  export interface LoggerOptions {
10
9
  logger?: Logger;
11
10
  logLevel?: LogLevel;
12
11
  }
13
-
14
12
  export interface Logger {
15
13
  debug(...content: any[]): void;
16
14
  info(...content: any[]): void;
@@ -62,7 +62,6 @@ export interface DeserializeHandler<
62
62
  DeserializeHandlerOutput<Output>
63
63
  >;
64
64
  }
65
-
66
65
  export interface InitializeMiddleware<
67
66
  Input extends object,
68
67
  Output extends object
@@ -72,7 +71,6 @@ export interface InitializeMiddleware<
72
71
  context: HandlerExecutionContext
73
72
  ): InitializeHandler<Input, Output>;
74
73
  }
75
-
76
74
  export interface SerializeMiddleware<
77
75
  Input extends object,
78
76
  Output extends object
@@ -82,7 +80,6 @@ export interface SerializeMiddleware<
82
80
  context: HandlerExecutionContext
83
81
  ): SerializeHandler<Input, Output>;
84
82
  }
85
-
86
83
  export interface FinalizeRequestMiddleware<
87
84
  Input extends object,
88
85
  Output extends object
@@ -116,7 +113,6 @@ export declare type MiddlewareType<
116
113
  | BuildMiddleware<Input, Output>
117
114
  | FinalizeRequestMiddleware<Input, Output>
118
115
  | DeserializeMiddleware<Input, Output>;
119
-
120
116
  export interface Terminalware {
121
117
  <Input extends object, Output extends object>(
122
118
  context: HandlerExecutionContext
@@ -131,11 +127,8 @@ export declare type Step =
131
127
  export declare type Priority = "high" | "normal" | "low";
132
128
  export interface HandlerOptions {
133
129
  step?: Step;
134
-
135
130
  tags?: Array<string>;
136
-
137
131
  name?: string;
138
-
139
132
  override?: boolean;
140
133
  }
141
134
  export interface AbsoluteLocation {
@@ -144,7 +137,6 @@ export interface AbsoluteLocation {
144
137
  export declare type Relation = "before" | "after";
145
138
  export interface RelativeLocation {
146
139
  relation: Relation;
147
-
148
140
  toMiddleware: string;
149
141
  }
150
142
  export declare type RelativeMiddlewareOptions = RelativeLocation &
@@ -164,60 +156,46 @@ export interface FinalizeRequestHandlerOptions extends HandlerOptions {
164
156
  export interface DeserializeHandlerOptions extends HandlerOptions {
165
157
  step: "deserialize";
166
158
  }
167
-
168
159
  export interface MiddlewareStack<Input extends object, Output extends object>
169
160
  extends Pluggable<Input, Output> {
170
161
  add(
171
162
  middleware: InitializeMiddleware<Input, Output>,
172
163
  options?: InitializeHandlerOptions & AbsoluteLocation
173
164
  ): void;
174
-
175
165
  add(
176
166
  middleware: SerializeMiddleware<Input, Output>,
177
167
  options: SerializeHandlerOptions & AbsoluteLocation
178
168
  ): void;
179
-
180
169
  add(
181
170
  middleware: BuildMiddleware<Input, Output>,
182
171
  options: BuildHandlerOptions & AbsoluteLocation
183
172
  ): void;
184
-
185
173
  add(
186
174
  middleware: FinalizeRequestMiddleware<Input, Output>,
187
175
  options: FinalizeRequestHandlerOptions & AbsoluteLocation
188
176
  ): void;
189
-
190
177
  add(
191
178
  middleware: DeserializeMiddleware<Input, Output>,
192
179
  options: DeserializeHandlerOptions & AbsoluteLocation
193
180
  ): void;
194
-
195
181
  addRelativeTo(
196
182
  middleware: MiddlewareType<Input, Output>,
197
183
  options: RelativeMiddlewareOptions
198
184
  ): void;
199
-
200
185
  use(pluggable: Pluggable<Input, Output>): void;
201
-
202
186
  clone(): MiddlewareStack<Input, Output>;
203
-
204
187
  remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
205
-
206
188
  removeByTag(toRemove: string): boolean;
207
-
208
189
  concat<InputType extends Input, OutputType extends Output>(
209
190
  from: MiddlewareStack<InputType, OutputType>
210
191
  ): MiddlewareStack<InputType, OutputType>;
211
-
212
192
  resolve<InputType extends Input, OutputType extends Output>(
213
193
  handler: DeserializeHandler<InputType, OutputType>,
214
194
  context: HandlerExecutionContext
215
195
  ): InitializeHandler<InputType, OutputType>;
216
196
  }
217
-
218
197
  export interface HandlerExecutionContext {
219
198
  logger?: Logger;
220
-
221
199
  userAgent?: UserAgent;
222
200
  [key: string]: any;
223
201
  }
@@ -1,11 +1,8 @@
1
1
  import { Client } from "./client";
2
-
3
2
  export declare type Paginator<T> = AsyncGenerator<T, T, unknown>;
4
-
5
3
  export interface PaginationConfiguration {
6
4
  client: Client<any, any, any>;
7
5
  pageSize?: number;
8
6
  startingToken?: any;
9
-
10
7
  stopOnSameToken?: boolean;
11
8
  }
@@ -1,5 +1,4 @@
1
1
  export declare type IniSection = Record<string, string | undefined>;
2
-
3
2
  export interface Profile extends IniSection {}
4
3
  export declare type ParsedIniData = Record<string, IniSection>;
5
4
  export interface SharedConfigFiles {
@@ -1,14 +1,9 @@
1
1
  export interface ResponseMetadata {
2
2
  httpStatusCode?: number;
3
-
4
3
  requestId?: string;
5
-
6
4
  extendedRequestId?: string;
7
-
8
5
  cfId?: string;
9
-
10
6
  attempts?: number;
11
-
12
7
  totalRetryDelay?: number;
13
8
  }
14
9
  export interface MetadataBearer {
@@ -1,14 +1,12 @@
1
1
  import { Endpoint } from "./http";
2
2
  import { RequestHandler } from "./transfer";
3
3
  import { Decoder, Encoder, Provider } from "./util";
4
-
5
4
  export interface EndpointBearer {
6
5
  endpoint: Provider<Endpoint>;
7
6
  }
8
7
  export interface StreamCollector {
9
8
  (stream: any): Promise<Uint8Array>;
10
9
  }
11
-
12
10
  export interface SerdeContext extends EndpointBearer {
13
11
  base64Encoder: Encoder;
14
12
  base64Decoder: Decoder;
@@ -31,15 +29,12 @@ export interface ResponseDeserializer<
31
29
  > {
32
30
  (output: ResponseType, context: Context): Promise<OutputType>;
33
31
  }
34
-
35
32
  declare global {
36
33
  export interface ReadableStream {}
37
34
  }
38
-
39
35
  export interface SdkStreamMixin {
40
36
  transformToByteArray: () => Promise<Uint8Array>;
41
37
  transformToString: (encoding?: string) => Promise<string>;
42
38
  transformToWebStream: () => ReadableStream;
43
39
  }
44
-
45
40
  export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
@@ -1,6 +1,5 @@
1
1
  import { HttpResponse } from "./http";
2
2
  import { MetadataBearer } from "./response";
3
-
4
3
  export declare type DocumentType =
5
4
  | null
6
5
  | boolean
@@ -10,23 +9,16 @@ export declare type DocumentType =
10
9
  | {
11
10
  [prop: string]: DocumentType;
12
11
  };
13
-
14
12
  export interface RetryableTrait {
15
13
  readonly throttling?: boolean;
16
14
  }
17
-
18
15
  export interface SmithyException {
19
16
  readonly name: string;
20
-
21
17
  readonly $fault: "client" | "server";
22
-
23
18
  readonly $service?: string;
24
-
25
19
  readonly $retryable?: RetryableTrait;
26
-
27
20
  readonly $response?: HttpResponse;
28
21
  }
29
-
30
22
  export declare type SdkError = Error &
31
23
  Partial<SmithyException> &
32
24
  Partial<MetadataBearer>;
@@ -1,21 +1,16 @@
1
1
  import { HttpRequest } from "./http";
2
-
3
2
  export declare type DateInput = number | string | Date;
4
3
  export interface SigningArguments {
5
4
  signingDate?: DateInput;
6
-
7
5
  signingService?: string;
8
-
9
6
  signingRegion?: string;
10
7
  }
11
8
  export interface RequestSigningArguments extends SigningArguments {
12
9
  unsignableHeaders?: Set<string>;
13
-
14
10
  signableHeaders?: Set<string>;
15
11
  }
16
12
  export interface RequestPresigningArguments extends RequestSigningArguments {
17
13
  expiresIn?: number;
18
-
19
14
  unhoistableHeaders?: Set<string>;
20
15
  }
21
16
  export interface EventSigningArguments extends SigningArguments {
@@ -27,7 +22,6 @@ export interface RequestPresigner {
27
22
  options?: RequestPresigningArguments
28
23
  ): Promise<HttpRequest>;
29
24
  }
30
-
31
25
  export interface RequestSigner {
32
26
  sign(
33
27
  requestToSign: HttpRequest,
@@ -7,7 +7,6 @@ export interface GetAwsChunkedEncodingStreamOptions {
7
7
  checksumLocationName?: string;
8
8
  streamHasher?: StreamHasher;
9
9
  }
10
-
11
10
  export interface GetAwsChunkedEncodingStream<StreamType = any> {
12
11
  (
13
12
  readableStream: StreamType,
@@ -1,8 +1,6 @@
1
1
  import { Provider } from "./util";
2
-
3
2
  export interface Token {
4
3
  readonly token: string;
5
-
6
4
  readonly expiration?: Date;
7
5
  }
8
6
  export declare type TokenProvider = Provider<Token>;
@@ -5,40 +5,31 @@ import {
5
5
  FinalizeHandlerOutput,
6
6
  } from "./middleware";
7
7
  import { MetadataBearer } from "./response";
8
-
9
8
  export interface Encoder {
10
9
  (input: Uint8Array): string;
11
10
  }
12
-
13
11
  export interface Decoder {
14
12
  (input: string): Uint8Array;
15
13
  }
16
-
17
14
  export interface Provider<T> {
18
15
  (): Promise<T>;
19
16
  }
20
-
21
17
  export interface MemoizedProvider<T> {
22
18
  (options?: { forceRefresh?: boolean }): Promise<T>;
23
19
  }
24
-
25
20
  export interface BodyLengthCalculator {
26
21
  (body: any): number | undefined;
27
22
  }
28
-
29
23
  export interface RetryStrategy {
30
24
  mode?: string;
31
-
32
25
  retry: <Input extends object, Output extends MetadataBearer>(
33
26
  next: FinalizeHandler<Input, Output>,
34
27
  args: FinalizeHandlerArguments<Input>
35
28
  ) => Promise<FinalizeHandlerOutput<Output>>;
36
29
  }
37
-
38
30
  export interface UrlParser {
39
- (url: string): Endpoint;
31
+ (url: string | URL): Endpoint;
40
32
  }
41
-
42
33
  export interface RegionInfo {
43
34
  hostname: string;
44
35
  partition: string;
@@ -46,19 +37,14 @@ export interface RegionInfo {
46
37
  signingService?: string;
47
38
  signingRegion?: string;
48
39
  }
49
-
50
40
  export interface RegionInfoProviderOptions {
51
41
  useDualstackEndpoint: boolean;
52
-
53
42
  useFipsEndpoint: boolean;
54
43
  }
55
-
56
44
  export interface RegionInfoProvider {
57
45
  (region: string, options?: RegionInfoProviderOptions): Promise<
58
46
  RegionInfo | undefined
59
47
  >;
60
48
  }
61
-
62
49
  export declare type UserAgentPair = [string, string];
63
-
64
50
  export declare type UserAgent = UserAgentPair[];
@@ -1,14 +1,9 @@
1
1
  import { AbortController } from "./abort";
2
2
  export interface WaiterConfiguration<Client> {
3
3
  client: Client;
4
-
5
4
  maxWaitTime: number;
6
-
7
5
  abortController?: AbortController;
8
-
9
6
  abortSignal?: AbortController["signal"];
10
-
11
7
  minDelay?: number;
12
-
13
8
  maxDelay?: number;
14
9
  }
@@ -82,7 +82,7 @@ export interface RetryStrategy {
82
82
  * Parses a URL in string form into an Endpoint object.
83
83
  */
84
84
  export interface UrlParser {
85
- (url: string): Endpoint;
85
+ (url: string | URL): Endpoint;
86
86
  }
87
87
  /**
88
88
  * Object containing regionalization information of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.170.0",
3
+ "version": "3.171.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",