@aws-sdk/types 3.109.0 → 3.159.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,37 @@
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.159.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.158.0...v3.159.0) (2022-08-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * **token-providers:** add token based authentication ([#3883](https://github.com/aws/aws-sdk-js-v3/issues/3883)) ([9f31345](https://github.com/aws/aws-sdk-js-v3/commit/9f313451a31b9bc317c277d6ab86e1d328066ad8))
12
+ * **util-endpoints:** add ruleSet standard library ([#3880](https://github.com/aws/aws-sdk-js-v3/issues/3880)) ([4ffc67b](https://github.com/aws/aws-sdk-js-v3/commit/4ffc67b6f9c8349f93ccf91b9b3aa17d6a22b06e))
13
+
14
+
15
+
16
+
17
+
18
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
19
+
20
+
21
+ ### Features
22
+
23
+ * **types:** add types to sdk stream utility mixin ([#3779](https://github.com/aws/aws-sdk-js-v3/issues/3779)) ([f311cab](https://github.com/aws/aws-sdk-js-v3/commit/f311cab406a16274dc2487dfe55c36b45a5811f5))
24
+
25
+
26
+
27
+
28
+
29
+ # [3.110.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.109.0...v3.110.0) (2022-06-14)
30
+
31
+ **Note:** Version bump only for package @aws-sdk/types
32
+
33
+
34
+
35
+
36
+
6
37
  # [3.109.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.108.1...v3.109.0) (2022-06-13)
7
38
 
8
39
  **Note:** Version bump only for package @aws-sdk/types
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EndpointURLScheme = void 0;
4
+ var EndpointURLScheme;
5
+ (function (EndpointURLScheme) {
6
+ EndpointURLScheme["HTTP"] = "http";
7
+ EndpointURLScheme["HTTPS"] = "https";
8
+ })(EndpointURLScheme = exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));
package/dist-cjs/index.js CHANGED
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./client"), exports);
6
6
  tslib_1.__exportStar(require("./command"), exports);
7
7
  tslib_1.__exportStar(require("./credentials"), exports);
8
8
  tslib_1.__exportStar(require("./crypto"), exports);
9
+ tslib_1.__exportStar(require("./endpoint"), exports);
9
10
  tslib_1.__exportStar(require("./eventStream"), exports);
10
11
  tslib_1.__exportStar(require("./http"), exports);
11
12
  tslib_1.__exportStar(require("./logger"), exports);
@@ -17,6 +18,7 @@ tslib_1.__exportStar(require("./serde"), exports);
17
18
  tslib_1.__exportStar(require("./shapes"), exports);
18
19
  tslib_1.__exportStar(require("./signature"), exports);
19
20
  tslib_1.__exportStar(require("./stream"), exports);
21
+ tslib_1.__exportStar(require("./token"), exports);
20
22
  tslib_1.__exportStar(require("./transfer"), exports);
21
23
  tslib_1.__exportStar(require("./util"), exports);
22
24
  tslib_1.__exportStar(require("./waiter"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export var EndpointURLScheme;
2
+ (function (EndpointURLScheme) {
3
+ EndpointURLScheme["HTTP"] = "http";
4
+ EndpointURLScheme["HTTPS"] = "https";
5
+ })(EndpointURLScheme || (EndpointURLScheme = {}));
package/dist-es/index.js CHANGED
@@ -3,6 +3,7 @@ export * from "./client";
3
3
  export * from "./command";
4
4
  export * from "./credentials";
5
5
  export * from "./crypto";
6
+ export * from "./endpoint";
6
7
  export * from "./eventStream";
7
8
  export * from "./http";
8
9
  export * from "./logger";
@@ -14,6 +15,7 @@ export * from "./serde";
14
15
  export * from "./shapes";
15
16
  export * from "./signature";
16
17
  export * from "./stream";
18
+ export * from "./token";
17
19
  export * from "./transfer";
18
20
  export * from "./util";
19
21
  export * from "./waiter";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ export declare enum EndpointURLScheme {
2
+ HTTP = "http",
3
+ HTTPS = "https"
4
+ }
5
+ export interface EndpointURL {
6
+ /**
7
+ * The URL scheme such as http or https.
8
+ */
9
+ scheme: EndpointURLScheme;
10
+ /**
11
+ * The authority is the host and optional port component of the URL.
12
+ */
13
+ authority: string;
14
+ /**
15
+ * The parsed path segment of the URL.
16
+ * This value is as-is as provided by the user.
17
+ */
18
+ path: string;
19
+ /**
20
+ * A boolean indicating whether the authority is an IP address.
21
+ */
22
+ isIp: boolean;
23
+ }
@@ -10,9 +10,7 @@ export interface Message {
10
10
  headers: MessageHeaders;
11
11
  body: Uint8Array;
12
12
  }
13
- export interface MessageHeaders {
14
- [name: string]: MessageHeaderValue;
15
- }
13
+ export declare type MessageHeaders = Record<string, MessageHeaderValue>;
16
14
  export interface BooleanHeaderValue {
17
15
  type: "boolean";
18
16
  value: boolean;
@@ -61,9 +59,25 @@ export interface Int64 {
61
59
  export interface EventStreamSerdeContext {
62
60
  eventStreamMarshaller: EventStreamMarshaller;
63
61
  }
64
- export interface EventStreamMarshaller {
65
- deserialize: (body: any, deserializer: (input: Record<string, Message>) => any) => AsyncIterable<any>;
66
- serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any;
62
+ /**
63
+ * A function which deserializes binary event stream message into modeled shape.
64
+ */
65
+ export interface EventStreamMarshallerDeserFn<StreamType> {
66
+ <T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>;
67
+ }
68
+ /**
69
+ * A function that serializes modeled shape into binary stream message.
70
+ */
71
+ export interface EventStreamMarshallerSerFn<StreamType> {
72
+ <T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
73
+ }
74
+ /**
75
+ * An interface which provides functions for serializing and deserializing binary event stream
76
+ * to/from corresponsing modeled shape.
77
+ */
78
+ export interface EventStreamMarshaller<StreamType = any> {
79
+ deserialize: EventStreamMarshallerDeserFn<StreamType>;
80
+ serialize: EventStreamMarshallerSerFn<StreamType>;
67
81
  }
68
82
  export interface EventStreamRequestSigner {
69
83
  sign(request: HttpRequest): Promise<HttpRequest>;
@@ -37,9 +37,7 @@ export interface Headers extends Map<string, string> {
37
37
  * properties in favor of the other. The headers may or may not be combined, and
38
38
  * the SDK will not deterministically select which header candidate to use.
39
39
  */
40
- export interface HeaderBag {
41
- [key: string]: string;
42
- }
40
+ export declare type HeaderBag = Record<string, string>;
43
41
  /**
44
42
  * Represents an HTTP message with headers and an optional static or streaming
45
43
  * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream;
@@ -53,9 +51,7 @@ export interface HttpMessage {
53
51
  * second being used when a parameter contains a list of values. Value can be set
54
52
  * to null when query is not in key-value pairs shape
55
53
  */
56
- export interface QueryParameterBag {
57
- [key: string]: string | Array<string> | null;
58
- }
54
+ export declare type QueryParameterBag = Record<string, string | Array<string> | null>;
59
55
  export interface Endpoint {
60
56
  protocol: string;
61
57
  hostname: string;
@@ -3,6 +3,7 @@ export * from "./client";
3
3
  export * from "./command";
4
4
  export * from "./credentials";
5
5
  export * from "./crypto";
6
+ export * from "./endpoint";
6
7
  export * from "./eventStream";
7
8
  export * from "./http";
8
9
  export * from "./logger";
@@ -14,6 +15,7 @@ export * from "./serde";
14
15
  export * from "./shapes";
15
16
  export * from "./signature";
16
17
  export * from "./stream";
18
+ export * from "./token";
17
19
  export * from "./transfer";
18
20
  export * from "./util";
19
21
  export * from "./waiter";
@@ -1,14 +1,10 @@
1
- export interface IniSection {
2
- [key: string]: string | undefined;
3
- }
1
+ export declare type IniSection = Record<string, string | undefined>;
4
2
  /**
5
3
  * @deprecated: Please use IniSection
6
4
  */
7
5
  export interface Profile extends IniSection {
8
6
  }
9
- export interface ParsedIniData {
10
- [key: string]: IniSection;
11
- }
7
+ export declare type ParsedIniData = Record<string, IniSection>;
12
8
  export interface SharedConfigFiles {
13
9
  credentialsFile: ParsedIniData;
14
10
  configFile: ParsedIniData;
@@ -47,3 +47,18 @@ export interface ResponseDeserializer<OutputType, ResponseType = any, Context =
47
47
  */
48
48
  (output: ResponseType, context: Context): Promise<OutputType>;
49
49
  }
50
+ /**
51
+ * The interface contains mix-in utility functions to transfer the runtime-specific
52
+ * stream implementation to specified format. Each stream can ONLY be transformed
53
+ * once.
54
+ */
55
+ export interface SdkStreamMixin {
56
+ transformToByteArray: () => Promise<Uint8Array>;
57
+ transformToString: (encoding?: string) => Promise<string>;
58
+ transformToWebStream: () => ReadableStream;
59
+ }
60
+ /**
61
+ * The type describing a runtime-specific stream implementation with mix-in
62
+ * utility functions.
63
+ */
64
+ export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
@@ -0,0 +1,16 @@
1
+ import { Provider } from "./util";
2
+ /**
3
+ * An object representing temporary or permanent AWS token.
4
+ */
5
+ export interface Token {
6
+ /**
7
+ *The literal token string
8
+ */
9
+ readonly token: string;
10
+ /**
11
+ * A {Date} when these token will no longer be accepted.
12
+ * When expiration is not defined, the token is assumed to be permanent.
13
+ */
14
+ readonly expiration?: Date;
15
+ }
16
+ export declare type TokenProvider = Provider<Token>;
@@ -0,0 +1,14 @@
1
+ export declare enum EndpointURLScheme {
2
+ HTTP = "http",
3
+ HTTPS = "https"
4
+ }
5
+ export interface EndpointURL {
6
+
7
+ scheme: EndpointURLScheme;
8
+
9
+ authority: string;
10
+
11
+ path: string;
12
+
13
+ isIp: boolean;
14
+ }
@@ -6,9 +6,7 @@ export interface Message {
6
6
  headers: MessageHeaders;
7
7
  body: Uint8Array;
8
8
  }
9
- export interface MessageHeaders {
10
- [name: string]: MessageHeaderValue;
11
- }
9
+ export declare type MessageHeaders = Record<string, MessageHeaderValue>;
12
10
  export interface BooleanHeaderValue {
13
11
  type: "boolean";
14
12
  value: boolean;
@@ -55,9 +53,18 @@ export interface Int64 {
55
53
  export interface EventStreamSerdeContext {
56
54
  eventStreamMarshaller: EventStreamMarshaller;
57
55
  }
58
- export interface EventStreamMarshaller {
59
- deserialize: (body: any, deserializer: (input: Record<string, Message>) => any) => AsyncIterable<any>;
60
- serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any;
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>;
61
68
  }
62
69
  export interface EventStreamRequestSigner {
63
70
  sign(request: HttpRequest): Promise<HttpRequest>;
@@ -7,18 +7,14 @@ export interface Headers extends Map<string, string> {
7
7
  withoutHeader(headerName: string): Headers;
8
8
  }
9
9
 
10
- export interface HeaderBag {
11
- [key: string]: string;
12
- }
10
+ export declare type HeaderBag = Record<string, string>;
13
11
 
14
12
  export interface HttpMessage {
15
13
  headers: HeaderBag;
16
14
  body?: any;
17
15
  }
18
16
 
19
- export interface QueryParameterBag {
20
- [key: string]: string | Array<string> | null;
21
- }
17
+ export declare type QueryParameterBag = Record<string, string | Array<string> | null>;
22
18
  export interface Endpoint {
23
19
  protocol: string;
24
20
  hostname: string;
@@ -3,6 +3,7 @@ export * from "./client";
3
3
  export * from "./command";
4
4
  export * from "./credentials";
5
5
  export * from "./crypto";
6
+ export * from "./endpoint";
6
7
  export * from "./eventStream";
7
8
  export * from "./http";
8
9
  export * from "./logger";
@@ -14,6 +15,7 @@ export * from "./serde";
14
15
  export * from "./shapes";
15
16
  export * from "./signature";
16
17
  export * from "./stream";
18
+ export * from "./token";
17
19
  export * from "./transfer";
18
20
  export * from "./util";
19
21
  export * from "./waiter";
@@ -1,12 +1,8 @@
1
- export interface IniSection {
2
- [key: string]: string | undefined;
3
- }
1
+ export declare type IniSection = Record<string, string | undefined>;
4
2
 
5
3
  export interface Profile extends IniSection {
6
4
  }
7
- export interface ParsedIniData {
8
- [key: string]: IniSection;
9
- }
5
+ export declare type ParsedIniData = Record<string, IniSection>;
10
6
  export interface SharedConfigFiles {
11
7
  credentialsFile: ParsedIniData;
12
8
  configFile: ParsedIniData;
@@ -27,3 +27,11 @@ export interface ResponseDeserializer<OutputType, ResponseType = any, Context =
27
27
 
28
28
  (output: ResponseType, context: Context): Promise<OutputType>;
29
29
  }
30
+
31
+ export interface SdkStreamMixin {
32
+ transformToByteArray: () => Promise<Uint8Array>;
33
+ transformToString: (encoding?: string) => Promise<string>;
34
+ transformToWebStream: () => ReadableStream;
35
+ }
36
+
37
+ export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
@@ -0,0 +1,9 @@
1
+ import { Provider } from "./util";
2
+
3
+ export interface Token {
4
+
5
+ readonly token: string;
6
+
7
+ readonly expiration?: Date;
8
+ }
9
+ export declare type TokenProvider = Provider<Token>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.109.0",
3
+ "version": "3.159.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",