@aws-sdk/types 3.266.0 → 3.267.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.
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HostAddressType = void 0;
4
+ var HostAddressType;
5
+ (function (HostAddressType) {
6
+ HostAddressType["AAAA"] = "AAAA";
7
+ HostAddressType["A"] = "A";
8
+ })(HostAddressType = exports.HostAddressType || (exports.HostAddressType = {}));
package/dist-cjs/index.js CHANGED
@@ -8,6 +8,7 @@ tslib_1.__exportStar(require("./client"), exports);
8
8
  tslib_1.__exportStar(require("./command"), exports);
9
9
  tslib_1.__exportStar(require("./credentials"), exports);
10
10
  tslib_1.__exportStar(require("./crypto"), exports);
11
+ tslib_1.__exportStar(require("./dns"), exports);
11
12
  tslib_1.__exportStar(require("./endpoint"), exports);
12
13
  tslib_1.__exportStar(require("./eventStream"), exports);
13
14
  tslib_1.__exportStar(require("./http"), exports);
package/dist-es/dns.js ADDED
@@ -0,0 +1,5 @@
1
+ export var HostAddressType;
2
+ (function (HostAddressType) {
3
+ HostAddressType["AAAA"] = "AAAA";
4
+ HostAddressType["A"] = "A";
5
+ })(HostAddressType || (HostAddressType = {}));
package/dist-es/index.js CHANGED
@@ -5,6 +5,7 @@ export * from "./client";
5
5
  export * from "./command";
6
6
  export * from "./credentials";
7
7
  export * from "./crypto";
8
+ export * from "./dns";
8
9
  export * from "./endpoint";
9
10
  export * from "./eventStream";
10
11
  export * from "./http";
@@ -0,0 +1,68 @@
1
+ /**
2
+ * DNS record types
3
+ */
4
+ export declare enum HostAddressType {
5
+ /**
6
+ * IPv6
7
+ */
8
+ AAAA = "AAAA",
9
+ /**
10
+ * IPv4
11
+ */
12
+ A = "A"
13
+ }
14
+ export interface HostAddress {
15
+ /**
16
+ * The {@link HostAddressType} of the host address.
17
+ */
18
+ addressType: HostAddressType;
19
+ /**
20
+ * The resolved numerical address represented as a
21
+ * string.
22
+ */
23
+ address: string;
24
+ /**
25
+ * The host name the {@link address} was resolved from.
26
+ */
27
+ hostName: string;
28
+ /**
29
+ * The service record of {@link hostName}.
30
+ */
31
+ service?: string;
32
+ }
33
+ export interface HostResolverArguments {
34
+ /**
35
+ * The host name to resolve.
36
+ */
37
+ hostName: string;
38
+ /**
39
+ * The service record of {@link hostName}.
40
+ */
41
+ service?: string;
42
+ }
43
+ /**
44
+ * Host Resolver interface for DNS queries
45
+ */
46
+ export interface HostResolver {
47
+ /**
48
+ * Resolves the address(es) for {@link HostResolverArguments}. Calls to this
49
+ * function will likely alter the cache (if implemented) so that if there's
50
+ * multiple addresses, a different set will be returned on the next call.
51
+ * @param args arguments with host name query addresses for
52
+ * @returns promise with a list of {@link HostAddress}
53
+ */
54
+ resolveAddress(args: HostResolverArguments): Promise<HostAddress[]>;
55
+ /**
56
+ * Reports a failure on a {@link HostAddress} so that the cache (if implemented)
57
+ * can accomodate the failure and likely not return the address until it recovers.
58
+ * @param addr host address to report a failure on
59
+ */
60
+ reportFailureOnAddress(addr: HostAddress): void;
61
+ /**
62
+ * Empties the cache (if implemented) for a {@link HostResolverArguments.hostName}.
63
+ * If {@link HostResolverArguments.hostName} is not provided, the cache (if
64
+ * implemented) is emptied for all host names.
65
+ * @param args optional arguments to empty the cache for
66
+ */
67
+ purgeCache(args?: HostResolverArguments): void;
68
+ }
@@ -5,6 +5,7 @@ export * from "./client";
5
5
  export * from "./command";
6
6
  export * from "./credentials";
7
7
  export * from "./crypto";
8
+ export * from "./dns";
8
9
  export * from "./endpoint";
9
10
  export * from "./eventStream";
10
11
  export * from "./http";
@@ -48,17 +48,19 @@ export interface ResponseDeserializer<OutputType, ResponseType = any, Context =
48
48
  (output: ResponseType, context: Context): Promise<OutputType>;
49
49
  }
50
50
  /**
51
- * Declare ReadableStream in case dom.d.ts is not added to the tsconfig lib causing
52
- * ReadableStream interface is not defined. For developers with dom.d.ts added,
53
- * the ReadableStream interface will be merged correctly.
51
+ * Declare DOM interfaces in case dom.d.ts is not added to the tsconfig lib, causing
52
+ * interfaces to not be defined. For developers with dom.d.ts added, the interfaces will
53
+ * be merged correctly.
54
54
  *
55
- * This is also required for any clients with streaming interface where ReadableStream
56
- * type is also referred. The type is only declared here once since this @aws-sdk/types
55
+ * This is also required for any clients with streaming interfaces where the corresponding
56
+ * types are also referred. The type is only declared here once since this @aws-sdk/types
57
57
  * is depended by all @aws-sdk packages.
58
58
  */
59
59
  declare global {
60
60
  export interface ReadableStream {
61
61
  }
62
+ export interface Blob {
63
+ }
62
64
  }
63
65
  /**
64
66
  * The interface contains mix-in utility functions to transfer the runtime-specific
@@ -0,0 +1,19 @@
1
+ export declare enum HostAddressType {
2
+ AAAA = "AAAA",
3
+ A = "A",
4
+ }
5
+ export interface HostAddress {
6
+ addressType: HostAddressType;
7
+ address: string;
8
+ hostName: string;
9
+ service?: string;
10
+ }
11
+ export interface HostResolverArguments {
12
+ hostName: string;
13
+ service?: string;
14
+ }
15
+ export interface HostResolver {
16
+ resolveAddress(args: HostResolverArguments): Promise<HostAddress[]>;
17
+ reportFailureOnAddress(addr: HostAddress): void;
18
+ purgeCache(args?: HostResolverArguments): void;
19
+ }
@@ -5,6 +5,7 @@ export * from "./client";
5
5
  export * from "./command";
6
6
  export * from "./credentials";
7
7
  export * from "./crypto";
8
+ export * from "./dns";
8
9
  export * from "./endpoint";
9
10
  export * from "./eventStream";
10
11
  export * from "./http";
@@ -31,6 +31,7 @@ export interface ResponseDeserializer<
31
31
  }
32
32
  declare global {
33
33
  export interface ReadableStream {}
34
+ export interface Blob {}
34
35
  }
35
36
  export interface SdkStreamMixin {
36
37
  transformToByteArray: () => Promise<Uint8Array>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.266.0",
3
+ "version": "3.267.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",