@aws-sdk/types 3.168.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,25 @@
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
+
17
+ # [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/types
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.168.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.167.0...v3.168.0) (2022-09-09)
7
26
 
8
27
  **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>;
@@ -30,6 +30,11 @@ export interface EndpointURL {
30
30
  * This value is as-is as provided by the user.
31
31
  */
32
32
  path: string;
33
+ /**
34
+ * The parsed path segment of the URL.
35
+ * This value is guranteed to start and end with a "/".
36
+ */
37
+ normalizedPath: string;
33
38
  /**
34
39
  * A boolean indicating whether the authority is an IP address.
35
40
  */
@@ -43,3 +48,6 @@ export interface EndpointV2 {
43
48
  properties?: Record<string, EndpointObjectProperty>;
44
49
  headers?: Record<string, string[]>;
45
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,17 +1,11 @@
1
- export interface AbortHandler {
2
- (this: AbortSignal, ev: any): any;
3
- }
4
-
5
- export interface AbortSignal {
6
-
7
- readonly aborted: boolean;
8
-
9
- onabort: AbortHandler | null;
10
- }
11
-
12
- export interface AbortController {
13
-
14
- readonly signal: AbortSignal;
15
-
16
- abort(): void;
17
- }
1
+ export interface AbortHandler {
2
+ (this: AbortSignal, ev: any): any;
3
+ }
4
+ export interface AbortSignal {
5
+ readonly aborted: boolean;
6
+ onabort: AbortHandler | null;
7
+ }
8
+ export interface AbortController {
9
+ readonly signal: AbortSignal;
10
+ abort(): void;
11
+ }
@@ -0,0 +1,4 @@
1
+ export interface AuthScheme {
2
+ name: string;
3
+ properties: Record<string, unknown>;
4
+ }
@@ -1,17 +1,52 @@
1
- import { Command } from "./command";
2
- import { MiddlewareStack } from "./middleware";
3
- import { MetadataBearer } from "./response";
4
-
5
- interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
6
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any): Promise<OutputType>;
7
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options: any, cb: (err: any, data?: OutputType) => void): void;
8
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any, cb?: (err: any, data?: OutputType) => void): Promise<OutputType> | void;
9
- }
10
-
11
- export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
12
- readonly config: ResolvedClientConfiguration;
13
- middlewareStack: MiddlewareStack<Input, Output>;
14
- send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
15
- destroy: () => void;
16
- }
17
- export {};
1
+ import { Command } from "./command";
2
+ import { MiddlewareStack } from "./middleware";
3
+ import { MetadataBearer } from "./response";
4
+ interface InvokeFunction<
5
+ InputTypes extends object,
6
+ OutputTypes extends MetadataBearer,
7
+ ResolvedClientConfiguration
8
+ > {
9
+ <InputType extends InputTypes, OutputType extends OutputTypes>(
10
+ command: Command<
11
+ InputTypes,
12
+ InputType,
13
+ OutputTypes,
14
+ OutputType,
15
+ ResolvedClientConfiguration
16
+ >,
17
+ options?: any
18
+ ): Promise<OutputType>;
19
+ <InputType extends InputTypes, OutputType extends OutputTypes>(
20
+ command: Command<
21
+ InputTypes,
22
+ InputType,
23
+ OutputTypes,
24
+ OutputType,
25
+ ResolvedClientConfiguration
26
+ >,
27
+ options: any,
28
+ cb: (err: any, data?: OutputType) => void
29
+ ): void;
30
+ <InputType extends InputTypes, OutputType extends OutputTypes>(
31
+ command: Command<
32
+ InputTypes,
33
+ InputType,
34
+ OutputTypes,
35
+ OutputType,
36
+ ResolvedClientConfiguration
37
+ >,
38
+ options?: any,
39
+ cb?: (err: any, data?: OutputType) => void
40
+ ): Promise<OutputType> | void;
41
+ }
42
+ export interface Client<
43
+ Input extends object,
44
+ Output extends MetadataBearer,
45
+ ResolvedClientConfiguration
46
+ > {
47
+ readonly config: ResolvedClientConfiguration;
48
+ middlewareStack: MiddlewareStack<Input, Output>;
49
+ send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
50
+ destroy: () => void;
51
+ }
52
+ export {};
@@ -1,7 +1,17 @@
1
- import { Handler, MiddlewareStack } from "./middleware";
2
- import { MetadataBearer } from "./response";
3
- export interface Command<ClientInput extends object, InputType extends ClientInput, ClientOutput extends MetadataBearer, OutputType extends ClientOutput, ResolvedConfiguration> {
4
- readonly input: InputType;
5
- readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
6
- resolveMiddleware(stack: MiddlewareStack<ClientInput, ClientOutput>, configuration: ResolvedConfiguration, options: any): Handler<InputType, OutputType>;
7
- }
1
+ import { Handler, MiddlewareStack } from "./middleware";
2
+ import { MetadataBearer } from "./response";
3
+ export interface Command<
4
+ ClientInput extends object,
5
+ InputType extends ClientInput,
6
+ ClientOutput extends MetadataBearer,
7
+ OutputType extends ClientOutput,
8
+ ResolvedConfiguration
9
+ > {
10
+ readonly input: InputType;
11
+ readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
12
+ resolveMiddleware(
13
+ stack: MiddlewareStack<ClientInput, ClientOutput>,
14
+ configuration: ResolvedConfiguration,
15
+ options: any
16
+ ): Handler<InputType, OutputType>;
17
+ }
@@ -1,13 +1,10 @@
1
- import { Provider } from "./util";
2
-
3
- export interface Credentials {
4
-
5
- readonly accessKeyId: string;
6
-
7
- readonly secretAccessKey: string;
8
-
9
- readonly sessionToken?: string;
10
-
11
- readonly expiration?: Date;
12
- }
13
- export declare type CredentialProvider = Provider<Credentials>;
1
+ import { Provider } from "./util";
2
+ export interface AwsCredentialIdentity {
3
+ readonly expiration?: Date;
4
+ }
5
+ export interface Credentials extends AwsCredentialIdentity {
6
+ readonly accessKeyId: string;
7
+ readonly secretAccessKey: string;
8
+ readonly sessionToken?: string;
9
+ }
10
+ export declare type CredentialProvider = Provider<Credentials>;
@@ -1,20 +1,14 @@
1
- export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
2
-
3
- export interface Hash {
4
-
5
- update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
6
-
7
- digest(): Promise<Uint8Array>;
8
- }
9
-
10
- export interface HashConstructor {
11
- new (secret?: SourceData): Hash;
12
- }
13
-
14
- export interface StreamHasher<StreamType = any> {
15
- (hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
16
- }
17
-
18
- export interface randomValues {
19
- (byteLength: number): Promise<Uint8Array>;
20
- }
1
+ export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
2
+ export interface Hash {
3
+ update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
4
+ digest(): Promise<Uint8Array>;
5
+ }
6
+ export interface HashConstructor {
7
+ new (secret?: SourceData): Hash;
8
+ }
9
+ export interface StreamHasher<StreamType = any> {
10
+ (hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
11
+ }
12
+ export interface randomValues {
13
+ (byteLength: number): Promise<Uint8Array>;
14
+ }
@@ -1,36 +1,40 @@
1
- export interface EndpointPartition {
2
- name: string;
3
- dnsSuffix: string;
4
- dualStackDnsSuffix: string;
5
- supportsFIPS: boolean;
6
- supportsDualStack: boolean;
7
- }
8
- export interface EndpointARN {
9
- partition: string;
10
- service: string;
11
- region: string;
12
- accountId: string;
13
- resourceId: Array<string>;
14
- }
15
- export declare enum EndpointURLScheme {
16
- HTTP = "http",
17
- HTTPS = "https"
18
- }
19
- export interface EndpointURL {
20
-
21
- scheme: EndpointURLScheme;
22
-
23
- authority: string;
24
-
25
- path: string;
26
-
27
- isIp: boolean;
28
- }
29
- export declare type EndpointObjectProperty = string | boolean | {
30
- [key: string]: EndpointObjectProperty;
31
- } | EndpointObjectProperty[];
32
- export interface EndpointV2 {
33
- url: URL;
34
- properties?: Record<string, EndpointObjectProperty>;
35
- headers?: Record<string, string[]>;
36
- }
1
+ export interface EndpointPartition {
2
+ name: string;
3
+ dnsSuffix: string;
4
+ dualStackDnsSuffix: string;
5
+ supportsFIPS: boolean;
6
+ supportsDualStack: boolean;
7
+ }
8
+ export interface EndpointARN {
9
+ partition: string;
10
+ service: string;
11
+ region: string;
12
+ accountId: string;
13
+ resourceId: Array<string>;
14
+ }
15
+ export declare enum EndpointURLScheme {
16
+ HTTP = "http",
17
+ HTTPS = "https",
18
+ }
19
+ export interface EndpointURL {
20
+ scheme: EndpointURLScheme;
21
+ authority: string;
22
+ path: string;
23
+ normalizedPath: string;
24
+ isIp: boolean;
25
+ }
26
+ export declare type EndpointObjectProperty =
27
+ | string
28
+ | boolean
29
+ | {
30
+ [key: string]: EndpointObjectProperty;
31
+ }
32
+ | EndpointObjectProperty[];
33
+ export interface EndpointV2 {
34
+ url: URL;
35
+ properties?: Record<string, EndpointObjectProperty>;
36
+ headers?: Record<string, string[]>;
37
+ }
38
+ export declare type EndpointParameters = {
39
+ [name: string]: undefined | string | boolean;
40
+ };
@@ -1,83 +1,99 @@
1
- import { HttpRequest } from "./http";
2
- import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware";
3
- import { MetadataBearer } from "./response";
4
-
5
- export interface Message {
6
- headers: MessageHeaders;
7
- body: Uint8Array;
8
- }
9
- export declare type MessageHeaders = Record<string, MessageHeaderValue>;
10
- export interface BooleanHeaderValue {
11
- type: "boolean";
12
- value: boolean;
13
- }
14
- export interface ByteHeaderValue {
15
- type: "byte";
16
- value: number;
17
- }
18
- export interface ShortHeaderValue {
19
- type: "short";
20
- value: number;
21
- }
22
- export interface IntegerHeaderValue {
23
- type: "integer";
24
- value: number;
25
- }
26
- export interface LongHeaderValue {
27
- type: "long";
28
- value: Int64;
29
- }
30
- export interface BinaryHeaderValue {
31
- type: "binary";
32
- value: Uint8Array;
33
- }
34
- export interface StringHeaderValue {
35
- type: "string";
36
- value: string;
37
- }
38
- export interface TimestampHeaderValue {
39
- type: "timestamp";
40
- value: Date;
41
- }
42
- export interface UuidHeaderValue {
43
- type: "uuid";
44
- value: string;
45
- }
46
- export declare type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue;
47
- export interface Int64 {
48
- readonly bytes: Uint8Array;
49
- valueOf: () => number;
50
- toString: () => string;
51
- }
52
-
53
- export interface EventStreamSerdeContext {
54
- eventStreamMarshaller: EventStreamMarshaller;
55
- }
56
-
57
- export interface EventStreamMarshallerDeserFn<StreamType> {
58
- <T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>;
59
- }
60
-
61
- export interface EventStreamMarshallerSerFn<StreamType> {
62
- <T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
63
- }
64
-
65
- export interface EventStreamMarshaller<StreamType = any> {
66
- deserialize: EventStreamMarshallerDeserFn<StreamType>;
67
- serialize: EventStreamMarshallerSerFn<StreamType>;
68
- }
69
- export interface EventStreamRequestSigner {
70
- sign(request: HttpRequest): Promise<HttpRequest>;
71
- }
72
- export interface EventStreamPayloadHandler {
73
- handle: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>, context?: HandlerExecutionContext) => Promise<FinalizeHandlerOutput<Output>>;
74
- }
75
- export interface EventStreamPayloadHandlerProvider {
76
- (options: any): EventStreamPayloadHandler;
77
- }
78
- export interface EventStreamSerdeProvider {
79
- (options: any): EventStreamMarshaller;
80
- }
81
- export interface EventStreamSignerProvider {
82
- (options: any): EventStreamRequestSigner;
83
- }
1
+ import { HttpRequest } from "./http";
2
+ import {
3
+ FinalizeHandler,
4
+ FinalizeHandlerArguments,
5
+ FinalizeHandlerOutput,
6
+ HandlerExecutionContext,
7
+ } from "./middleware";
8
+ import { MetadataBearer } from "./response";
9
+ export interface Message {
10
+ headers: MessageHeaders;
11
+ body: Uint8Array;
12
+ }
13
+ export declare type MessageHeaders = Record<string, MessageHeaderValue>;
14
+ export interface BooleanHeaderValue {
15
+ type: "boolean";
16
+ value: boolean;
17
+ }
18
+ export interface ByteHeaderValue {
19
+ type: "byte";
20
+ value: number;
21
+ }
22
+ export interface ShortHeaderValue {
23
+ type: "short";
24
+ value: number;
25
+ }
26
+ export interface IntegerHeaderValue {
27
+ type: "integer";
28
+ value: number;
29
+ }
30
+ export interface LongHeaderValue {
31
+ type: "long";
32
+ value: Int64;
33
+ }
34
+ export interface BinaryHeaderValue {
35
+ type: "binary";
36
+ value: Uint8Array;
37
+ }
38
+ export interface StringHeaderValue {
39
+ type: "string";
40
+ value: string;
41
+ }
42
+ export interface TimestampHeaderValue {
43
+ type: "timestamp";
44
+ value: Date;
45
+ }
46
+ export interface UuidHeaderValue {
47
+ type: "uuid";
48
+ value: string;
49
+ }
50
+ export declare type MessageHeaderValue =
51
+ | BooleanHeaderValue
52
+ | ByteHeaderValue
53
+ | ShortHeaderValue
54
+ | IntegerHeaderValue
55
+ | LongHeaderValue
56
+ | BinaryHeaderValue
57
+ | StringHeaderValue
58
+ | TimestampHeaderValue
59
+ | UuidHeaderValue;
60
+ export interface Int64 {
61
+ readonly bytes: Uint8Array;
62
+ valueOf: () => number;
63
+ toString: () => string;
64
+ }
65
+ export interface EventStreamSerdeContext {
66
+ eventStreamMarshaller: EventStreamMarshaller;
67
+ }
68
+ export interface EventStreamMarshallerDeserFn<StreamType> {
69
+ <T>(
70
+ body: StreamType,
71
+ deserializer: (input: Record<string, Message>) => Promise<T>
72
+ ): AsyncIterable<T>;
73
+ }
74
+ export interface EventStreamMarshallerSerFn<StreamType> {
75
+ <T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
76
+ }
77
+ export interface EventStreamMarshaller<StreamType = any> {
78
+ deserialize: EventStreamMarshallerDeserFn<StreamType>;
79
+ serialize: EventStreamMarshallerSerFn<StreamType>;
80
+ }
81
+ export interface EventStreamRequestSigner {
82
+ sign(request: HttpRequest): Promise<HttpRequest>;
83
+ }
84
+ export interface EventStreamPayloadHandler {
85
+ handle: <Input extends object, Output extends MetadataBearer>(
86
+ next: FinalizeHandler<Input, Output>,
87
+ args: FinalizeHandlerArguments<Input>,
88
+ context?: HandlerExecutionContext
89
+ ) => Promise<FinalizeHandlerOutput<Output>>;
90
+ }
91
+ export interface EventStreamPayloadHandlerProvider {
92
+ (options: any): EventStreamPayloadHandler;
93
+ }
94
+ export interface EventStreamSerdeProvider {
95
+ (options: any): EventStreamMarshaller;
96
+ }
97
+ export interface EventStreamSignerProvider {
98
+ (options: any): EventStreamRequestSigner;
99
+ }
@@ -1,40 +1,33 @@
1
- import { AbortSignal } from "./abort";
2
-
3
- export interface Headers extends Map<string, string> {
4
-
5
- withHeader(headerName: string, headerValue: string): Headers;
6
-
7
- withoutHeader(headerName: string): Headers;
8
- }
9
-
10
- export declare type HeaderBag = Record<string, string>;
11
-
12
- export interface HttpMessage {
13
- headers: HeaderBag;
14
- body?: any;
15
- }
16
-
17
- export declare type QueryParameterBag = Record<string, string | Array<string> | null>;
18
- export interface Endpoint {
19
- protocol: string;
20
- hostname: string;
21
- port?: number;
22
- path: string;
23
- query?: QueryParameterBag;
24
- }
25
-
26
- export interface HttpRequest extends HttpMessage, Endpoint {
27
- method: string;
28
- }
29
-
30
- export interface HttpResponse extends HttpMessage {
31
- statusCode: number;
32
- }
33
-
34
- export interface ResolvedHttpResponse extends HttpResponse {
35
- body: string;
36
- }
37
-
38
- export interface HttpHandlerOptions {
39
- abortSignal?: AbortSignal;
40
- }
1
+ import { AbortSignal } from "./abort";
2
+ export interface Headers extends Map<string, string> {
3
+ withHeader(headerName: string, headerValue: string): Headers;
4
+ withoutHeader(headerName: string): Headers;
5
+ }
6
+ export declare type HeaderBag = Record<string, string>;
7
+ export interface HttpMessage {
8
+ headers: HeaderBag;
9
+ body?: any;
10
+ }
11
+ export declare type QueryParameterBag = Record<
12
+ string,
13
+ string | Array<string> | null
14
+ >;
15
+ export interface Endpoint {
16
+ protocol: string;
17
+ hostname: string;
18
+ port?: number;
19
+ path: string;
20
+ query?: QueryParameterBag;
21
+ }
22
+ export interface HttpRequest extends HttpMessage, Endpoint {
23
+ method: string;
24
+ }
25
+ export interface HttpResponse extends HttpMessage {
26
+ statusCode: number;
27
+ }
28
+ export interface ResolvedHttpResponse extends HttpResponse {
29
+ body: string;
30
+ }
31
+ export interface HttpHandlerOptions {
32
+ abortSignal?: AbortSignal;
33
+ }