@aws-sdk/types 3.347.0 → 3.369.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.
Files changed (89) hide show
  1. package/dist-cjs/auth.js +2 -5
  2. package/dist-cjs/connection.js +2 -0
  3. package/dist-cjs/endpoint.js +2 -5
  4. package/dist-cjs/index.js +1 -0
  5. package/dist-cjs/transfer.js +2 -6
  6. package/dist-es/auth.js +1 -5
  7. package/dist-es/connection.js +1 -0
  8. package/dist-es/endpoint.js +1 -5
  9. package/dist-es/index.js +1 -0
  10. package/dist-es/transfer.js +1 -6
  11. package/dist-types/abort.d.ts +1 -49
  12. package/dist-types/auth.d.ts +1 -55
  13. package/dist-types/blob/blob-types.d.ts +22 -0
  14. package/dist-types/blob/runtime-blob-types.browser.d.ts +6 -0
  15. package/dist-types/blob/runtime-blob-types.node.d.ts +9 -0
  16. package/dist-types/checksum.d.ts +1 -63
  17. package/dist-types/client.d.ts +1 -25
  18. package/dist-types/command.d.ts +1 -10
  19. package/dist-types/connection.d.ts +1 -0
  20. package/dist-types/crypto.d.ts +1 -60
  21. package/dist-types/encode.d.ts +1 -19
  22. package/dist-types/endpoint.d.ts +1 -77
  23. package/dist-types/eventStream.d.ts +1 -108
  24. package/dist-types/http.d.ts +2 -87
  25. package/dist-types/identity/AwsCredentialIdentity.d.ts +1 -23
  26. package/dist-types/identity/Identity.d.ts +1 -15
  27. package/dist-types/index.d.ts +1 -0
  28. package/dist-types/logger.d.ts +2 -13
  29. package/dist-types/middleware.d.ts +1 -475
  30. package/dist-types/pagination.d.ts +1 -26
  31. package/dist-types/profile.d.ts +1 -22
  32. package/dist-types/response.d.ts +1 -40
  33. package/dist-types/retry.d.ts +1 -128
  34. package/dist-types/serde.d.ts +1 -104
  35. package/dist-types/shapes.d.ts +1 -72
  36. package/dist-types/signature.d.ts +1 -150
  37. package/dist-types/stream.d.ts +1 -22
  38. package/dist-types/transfer.d.ts +1 -33
  39. package/dist-types/ts3.4/abort.d.ts +1 -11
  40. package/dist-types/ts3.4/auth.d.ts +5 -17
  41. package/dist-types/ts3.4/blob/blob-types.d.ts +7 -0
  42. package/dist-types/ts3.4/blob/runtime-blob-types.browser.d.ts +1 -0
  43. package/dist-types/ts3.4/blob/runtime-blob-types.node.d.ts +2 -0
  44. package/dist-types/ts3.4/checksum.d.ts +1 -12
  45. package/dist-types/ts3.4/client.d.ts +1 -52
  46. package/dist-types/ts3.4/command.d.ts +1 -17
  47. package/dist-types/ts3.4/connection.d.ts +6 -0
  48. package/dist-types/ts3.4/crypto.d.ts +7 -14
  49. package/dist-types/ts3.4/encode.d.ts +6 -19
  50. package/dist-types/ts3.4/endpoint.d.ts +9 -43
  51. package/dist-types/ts3.4/eventStream.d.ts +24 -77
  52. package/dist-types/ts3.4/http.d.ts +10 -26
  53. package/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +4 -8
  54. package/dist-types/ts3.4/identity/Identity.d.ts +1 -6
  55. package/dist-types/ts3.4/index.d.ts +1 -0
  56. package/dist-types/ts3.4/logger.d.ts +2 -7
  57. package/dist-types/ts3.4/middleware.d.ts +40 -211
  58. package/dist-types/ts3.4/pagination.d.ts +1 -8
  59. package/dist-types/ts3.4/profile.d.ts +6 -7
  60. package/dist-types/ts3.4/response.d.ts +1 -11
  61. package/dist-types/ts3.4/retry.d.ts +12 -43
  62. package/dist-types/ts3.4/serde.d.ts +12 -46
  63. package/dist-types/ts3.4/shapes.d.ts +6 -24
  64. package/dist-types/ts3.4/signature.d.ts +15 -59
  65. package/dist-types/ts3.4/stream.d.ts +4 -16
  66. package/dist-types/ts3.4/transfer.d.ts +7 -26
  67. package/dist-types/ts3.4/uri.d.ts +1 -11
  68. package/dist-types/ts3.4/util.d.ts +14 -50
  69. package/dist-types/ts3.4/waiter.d.ts +1 -9
  70. package/dist-types/uri.d.ts +1 -17
  71. package/dist-types/util.d.ts +1 -155
  72. package/dist-types/waiter.d.ts +1 -35
  73. package/package.json +8 -1
  74. package/dist-cjs/connection/index.js +0 -6
  75. package/dist-es/connection/index.js +0 -3
  76. package/dist-types/connection/config.d.ts +0 -7
  77. package/dist-types/connection/index.d.ts +0 -3
  78. package/dist-types/connection/manager.d.ts +0 -28
  79. package/dist-types/connection/pool.d.ts +0 -24
  80. package/dist-types/ts3.4/connection/config.d.ts +0 -3
  81. package/dist-types/ts3.4/connection/index.d.ts +0 -3
  82. package/dist-types/ts3.4/connection/manager.d.ts +0 -14
  83. package/dist-types/ts3.4/connection/pool.d.ts +0 -9
  84. /package/dist-cjs/{connection/config.js → blob/blob-types.js} +0 -0
  85. /package/dist-cjs/{connection/manager.js → blob/runtime-blob-types.browser.js} +0 -0
  86. /package/dist-cjs/{connection/pool.js → blob/runtime-blob-types.node.js} +0 -0
  87. /package/dist-es/{connection/config.js → blob/blob-types.js} +0 -0
  88. /package/dist-es/{connection/manager.js → blob/runtime-blob-types.browser.js} +0 -0
  89. /package/dist-es/{connection/pool.js → blob/runtime-blob-types.node.js} +0 -0
package/dist-cjs/auth.js CHANGED
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HttpAuthLocation = void 0;
4
- var HttpAuthLocation;
5
- (function (HttpAuthLocation) {
6
- HttpAuthLocation["HEADER"] = "header";
7
- HttpAuthLocation["QUERY"] = "query";
8
- })(HttpAuthLocation = exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));
4
+ var types_1 = require("@smithy/types");
5
+ Object.defineProperty(exports, "HttpAuthLocation", { enumerable: true, get: function () { return types_1.HttpAuthLocation; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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 = {}));
4
+ var types_1 = require("@smithy/types");
5
+ Object.defineProperty(exports, "EndpointURLScheme", { enumerable: true, get: function () { return types_1.EndpointURLScheme; } });
package/dist-cjs/index.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./abort"), exports);
5
5
  tslib_1.__exportStar(require("./auth"), exports);
6
+ tslib_1.__exportStar(require("./blob/blob-types"), exports);
6
7
  tslib_1.__exportStar(require("./checksum"), exports);
7
8
  tslib_1.__exportStar(require("./client"), exports);
8
9
  tslib_1.__exportStar(require("./command"), exports);
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RequestHandlerProtocol = void 0;
4
- var RequestHandlerProtocol;
5
- (function (RequestHandlerProtocol) {
6
- RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
7
- RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
8
- RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
9
- })(RequestHandlerProtocol = exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
4
+ var types_1 = require("@smithy/types");
5
+ Object.defineProperty(exports, "RequestHandlerProtocol", { enumerable: true, get: function () { return types_1.RequestHandlerProtocol; } });
package/dist-es/auth.js CHANGED
@@ -1,5 +1 @@
1
- export var HttpAuthLocation;
2
- (function (HttpAuthLocation) {
3
- HttpAuthLocation["HEADER"] = "header";
4
- HttpAuthLocation["QUERY"] = "query";
5
- })(HttpAuthLocation || (HttpAuthLocation = {}));
1
+ export { HttpAuthLocation } from "@smithy/types";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1 @@
1
- export var EndpointURLScheme;
2
- (function (EndpointURLScheme) {
3
- EndpointURLScheme["HTTP"] = "http";
4
- EndpointURLScheme["HTTPS"] = "https";
5
- })(EndpointURLScheme || (EndpointURLScheme = {}));
1
+ export { EndpointURLScheme, } from "@smithy/types";
package/dist-es/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./abort";
2
2
  export * from "./auth";
3
+ export * from "./blob/blob-types";
3
4
  export * from "./checksum";
4
5
  export * from "./client";
5
6
  export * from "./command";
@@ -1,6 +1 @@
1
- export var RequestHandlerProtocol;
2
- (function (RequestHandlerProtocol) {
3
- RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
4
- RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
5
- RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
6
- })(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
1
+ export { RequestHandlerProtocol, } from "@smithy/types";
@@ -1,49 +1 @@
1
- /**
2
- * @public
3
- */
4
- export interface AbortHandler {
5
- (this: AbortSignal, ev: any): any;
6
- }
7
- /**
8
- * @public
9
- *
10
- * Holders of an AbortSignal object may query if the associated operation has
11
- * been aborted and register an onabort handler.
12
- *
13
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
14
- */
15
- export interface AbortSignal {
16
- /**
17
- * Whether the action represented by this signal has been cancelled.
18
- */
19
- readonly aborted: boolean;
20
- /**
21
- * A function to be invoked when the action represented by this signal has
22
- * been cancelled.
23
- */
24
- onabort: AbortHandler | Function | null;
25
- }
26
- /**
27
- * @public
28
- *
29
- * The AWS SDK uses a Controller/Signal model to allow for cooperative
30
- * cancellation of asynchronous operations. When initiating such an operation,
31
- * the caller can create an AbortController and then provide linked signal to
32
- * subtasks. This allows a single source to communicate to multiple consumers
33
- * that an action has been aborted without dictating how that cancellation
34
- * should be handled.
35
- *
36
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController
37
- */
38
- export interface AbortController {
39
- /**
40
- * An object that reports whether the action associated with this
41
- * `AbortController` has been cancelled.
42
- */
43
- readonly signal: AbortSignal;
44
- /**
45
- * Declares the operation associated with this AbortController to have been
46
- * cancelled.
47
- */
48
- abort(): void;
49
- }
1
+ export { AbortController, AbortHandler, AbortSignal } from "@smithy/types";
@@ -1,55 +1 @@
1
- /**
2
- * @internal
3
- *
4
- * Authentication schemes represent a way that the service will authenticate the customer’s identity.
5
- */
6
- export interface AuthScheme {
7
- /**
8
- * @example "sigv4a" or "sigv4"
9
- */
10
- name: "sigv4" | "sigv4a" | string;
11
- /**
12
- * @example "s3"
13
- */
14
- signingName: string;
15
- /**
16
- * @example "us-east-1"
17
- */
18
- signingRegion: string;
19
- /**
20
- * @example ["*"]
21
- * @example ["us-west-2", "us-east-1"]
22
- */
23
- signingRegionSet?: string[];
24
- /**
25
- * @deprecated this field was renamed to signingRegion.
26
- */
27
- signingScope?: never;
28
- properties: Record<string, unknown>;
29
- }
30
- /**
31
- * @internal
32
- */
33
- export interface HttpAuthDefinition {
34
- /**
35
- * Defines the location of where the Auth is serialized.
36
- */
37
- in: HttpAuthLocation;
38
- /**
39
- * Defines the name of the HTTP header or query string parameter
40
- * that contains the Auth.
41
- */
42
- name: string;
43
- /**
44
- * Defines the security scheme to use on the `Authorization` header value.
45
- * This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}.
46
- */
47
- scheme?: string;
48
- }
49
- /**
50
- * @internal
51
- */
52
- export declare enum HttpAuthLocation {
53
- HEADER = "header",
54
- QUERY = "query"
55
- }
1
+ export { AuthScheme, HttpAuthDefinition, HttpAuthLocation } from "@smithy/types";
@@ -0,0 +1,22 @@
1
+ import { RuntimeBlobTypes } from "./runtime-blob-types.node";
2
+ /**
3
+ * @public
4
+ *
5
+ * A union of types that can be used as inputs for the service model
6
+ * "blob" type when it represents the request's entire payload or body.
7
+ *
8
+ * For example, in Lambda::invoke, the payload is modeled as a blob type
9
+ * and this union applies to it.
10
+ * In contrast, in Lambda::createFunction the Zip file option is a blob type,
11
+ * but is not the (entire) payload and this union does not apply.
12
+ *
13
+ * Note: not all types are signable by the standard SignatureV4 signer when
14
+ * used as the request body. For example, in Node.js a Readable stream
15
+ * is not signable by the default signer.
16
+ * They are included in the union because it may work in some cases,
17
+ * but the expected types are primarily string and Uint8Array.
18
+ *
19
+ * Additional details may be found in the internal
20
+ * function "getPayloadHash" in the SignatureV4 module.
21
+ */
22
+ export type BlobTypes = string | ArrayBuffer | ArrayBufferView | Uint8Array | RuntimeBlobTypes;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @public
3
+ *
4
+ * Additional blob types for the browser environment.
5
+ */
6
+ export type RuntimeBlobTypes = Blob | ReadableStream;
@@ -0,0 +1,9 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Readable } from "stream";
4
+ /**
5
+ * @public
6
+ *
7
+ * Additional blob types for the Node.js environment.
8
+ */
9
+ export type RuntimeBlobTypes = Readable | Buffer;
@@ -1,63 +1 @@
1
- import { SourceData } from "./crypto";
2
- /**
3
- * @public
4
- *
5
- * An object that provides a checksum of data provided in chunks to `update`.
6
- * The checksum may be performed incrementally as chunks are received or all
7
- * at once when the checksum is finalized, depending on the underlying
8
- * implementation.
9
- *
10
- * It's recommended to compute checksum incrementally to avoid reading the
11
- * entire payload in memory.
12
- *
13
- * A class that implements this interface may accept an optional secret key in its
14
- * constructor while computing checksum value, when using HMAC. If provided,
15
- * this secret key would be used when computing checksum.
16
- */
17
- export interface Checksum {
18
- /**
19
- * Constant length of the digest created by the algorithm in bytes.
20
- */
21
- digestLength?: number;
22
- /**
23
- * Creates a new checksum object that contains a deep copy of the internal
24
- * state of the current `Checksum` object.
25
- */
26
- copy?(): Checksum;
27
- /**
28
- * Returns the digest of all of the data passed.
29
- */
30
- digest(): Promise<Uint8Array>;
31
- /**
32
- * Allows marking a checksum for checksums that support the ability
33
- * to mark and reset.
34
- *
35
- * @param readLimit - The maximum limit of bytes that can be read
36
- * before the mark position becomes invalid.
37
- */
38
- mark?(readLimit: number): void;
39
- /**
40
- * Resets the checksum to its initial value.
41
- */
42
- reset(): void;
43
- /**
44
- * Adds a chunk of data for which checksum needs to be computed.
45
- * This can be called many times with new data as it is streamed.
46
- *
47
- * Implementations may override this method which passes second param
48
- * which makes Checksum object stateless.
49
- *
50
- * @param chunk - The buffer to update checksum with.
51
- */
52
- update(chunk: Uint8Array): void;
53
- }
54
- /**
55
- * @public
56
- *
57
- * A constructor for a Checksum that may be used to calculate an HMAC. Implementing
58
- * classes should not directly hold the provided key in memory beyond the
59
- * lexical scope of the constructor.
60
- */
61
- export interface ChecksumConstructor {
62
- new (secret?: SourceData): Checksum;
63
- }
1
+ export { Checksum, ChecksumConstructor } from "@smithy/types";
@@ -1,25 +1 @@
1
- import { Command } from "./command";
2
- import { MiddlewareStack } from "./middleware";
3
- import { MetadataBearer } from "./response";
4
- /**
5
- * @public
6
- *
7
- * function definition for different overrides of client's 'send' function.
8
- */
9
- interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
10
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any): Promise<OutputType>;
11
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options: any, cb: (err: any, data?: OutputType) => void): void;
12
- <InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any, cb?: (err: any, data?: OutputType) => void): Promise<OutputType> | void;
13
- }
14
- /**
15
- * A general interface for service clients, idempotent to browser or node clients
16
- * This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts).
17
- * It's provided for using without importing the SmithyClient class.
18
- */
19
- export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
20
- readonly config: ResolvedClientConfiguration;
21
- middlewareStack: MiddlewareStack<Input, Output>;
22
- send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
23
- destroy: () => void;
24
- }
25
- export {};
1
+ export { Client } from "@smithy/types";
@@ -1,10 +1 @@
1
- import { Handler, MiddlewareStack } from "./middleware";
2
- import { MetadataBearer } from "./response";
3
- /**
4
- * @public
5
- */
6
- export interface Command<ClientInput extends object, InputType extends ClientInput, ClientOutput extends MetadataBearer, OutputType extends ClientOutput, ResolvedConfiguration> {
7
- readonly input: InputType;
8
- readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
9
- resolveMiddleware(stack: MiddlewareStack<ClientInput, ClientOutput>, configuration: ResolvedConfiguration, options: any): Handler<InputType, OutputType>;
10
- }
1
+ export { Command } from "@smithy/types";
@@ -0,0 +1 @@
1
+ export { ConnectConfiguration, ConnectionManager, ConnectionManagerConfiguration, ConnectionPool } from "@smithy/types";
@@ -1,60 +1 @@
1
- /**
2
- * @public
3
- */
4
- export type SourceData = string | ArrayBuffer | ArrayBufferView;
5
- /**
6
- * @public
7
- *
8
- * An object that provides a hash of data provided in chunks to `update`. The
9
- * hash may be performed incrementally as chunks are received or all at once
10
- * when the hash is finalized, depending on the underlying implementation.
11
- *
12
- * @deprecated use {@link Checksum}
13
- */
14
- export interface Hash {
15
- /**
16
- * Adds a chunk of data to the hash. If a buffer is provided, the `encoding`
17
- * argument will be ignored. If a string is provided without a specified
18
- * encoding, implementations must assume UTF-8 encoding.
19
- *
20
- * Not all encodings are supported on all platforms, though all must support
21
- * UTF-8.
22
- */
23
- update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
24
- /**
25
- * Finalizes the hash and provides a promise that will be fulfilled with the
26
- * raw bytes of the calculated hash.
27
- */
28
- digest(): Promise<Uint8Array>;
29
- }
30
- /**
31
- * @public
32
- *
33
- * A constructor for a hash that may be used to calculate an HMAC. Implementing
34
- * classes should not directly hold the provided key in memory beyond the
35
- * lexical scope of the constructor.
36
- *
37
- * @deprecated use {@link ChecksumConstructor}
38
- */
39
- export interface HashConstructor {
40
- new (secret?: SourceData): Hash;
41
- }
42
- /**
43
- * @public
44
- *
45
- * A function that calculates the hash of a data stream. Determining the hash
46
- * will consume the stream, so only replayable streams should be provided to an
47
- * implementation of this interface.
48
- */
49
- export interface StreamHasher<StreamType = any> {
50
- (hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
51
- }
52
- /**
53
- * @public
54
- *
55
- * A function that returns a promise fulfilled with bytes from a
56
- * cryptographically secure pseudorandom number generator.
57
- */
58
- export interface randomValues {
59
- (byteLength: number): Promise<Uint8Array>;
60
- }
1
+ export { Hash, HashConstructor, StreamHasher, randomValues, SourceData } from "@smithy/types";
@@ -1,19 +1 @@
1
- import { Message } from "./eventStream";
2
- export interface MessageEncoder {
3
- encode(message: Message): Uint8Array;
4
- }
5
- export interface MessageDecoder {
6
- decode(message: ArrayBufferView): Message;
7
- feed(message: ArrayBufferView): void;
8
- endOfStream(): void;
9
- getMessage(): AvailableMessage;
10
- getAvailableMessages(): AvailableMessages;
11
- }
12
- export interface AvailableMessage {
13
- getMessage(): Message | undefined;
14
- isEndOfStream(): boolean;
15
- }
16
- export interface AvailableMessages {
17
- getMessages(): Message[];
18
- isEndOfStream(): boolean;
19
- }
1
+ export { MessageDecoder, MessageEncoder, AvailableMessage, AvailableMessages } from "@smithy/types";
@@ -1,77 +1 @@
1
- import { AuthScheme } from "./auth";
2
- /**
3
- * @public
4
- */
5
- export interface EndpointPartition {
6
- name: string;
7
- dnsSuffix: string;
8
- dualStackDnsSuffix: string;
9
- supportsFIPS: boolean;
10
- supportsDualStack: boolean;
11
- }
12
- /**
13
- * @public
14
- */
15
- export interface EndpointARN {
16
- partition: string;
17
- service: string;
18
- region: string;
19
- accountId: string;
20
- resourceId: Array<string>;
21
- }
22
- /**
23
- * @public
24
- */
25
- export declare enum EndpointURLScheme {
26
- HTTP = "http",
27
- HTTPS = "https"
28
- }
29
- /**
30
- * @public
31
- */
32
- export interface EndpointURL {
33
- /**
34
- * The URL scheme such as http or https.
35
- */
36
- scheme: EndpointURLScheme;
37
- /**
38
- * The authority is the host and optional port component of the URL.
39
- */
40
- authority: string;
41
- /**
42
- * The parsed path segment of the URL.
43
- * This value is as-is as provided by the user.
44
- */
45
- path: string;
46
- /**
47
- * The parsed path segment of the URL.
48
- * This value is guranteed to start and end with a "/".
49
- */
50
- normalizedPath: string;
51
- /**
52
- * A boolean indicating whether the authority is an IP address.
53
- */
54
- isIp: boolean;
55
- }
56
- /**
57
- * @public
58
- */
59
- export type EndpointObjectProperty = string | boolean | {
60
- [key: string]: EndpointObjectProperty;
61
- } | EndpointObjectProperty[];
62
- /**
63
- * @public
64
- */
65
- export interface EndpointV2 {
66
- url: URL;
67
- properties?: {
68
- authSchemes?: AuthScheme[];
69
- } & Record<string, EndpointObjectProperty>;
70
- headers?: Record<string, string[]>;
71
- }
72
- /**
73
- * @public
74
- */
75
- export type EndpointParameters = {
76
- [name: string]: undefined | string | boolean;
77
- };
1
+ export { EndpointARN, EndpointPartition, EndpointURLScheme, EndpointURL, EndpointObjectProperty, EndpointV2, EndpointParameters, } from "@smithy/types";
@@ -1,108 +1 @@
1
- import { HttpRequest } from "./http";
2
- import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware";
3
- import { MetadataBearer } from "./response";
4
- /**
5
- * @public
6
- *
7
- * An event stream message. The headers and body properties will always be
8
- * defined, with empty headers represented as an object with no keys and an
9
- * empty body represented as a zero-length Uint8Array.
10
- */
11
- export interface Message {
12
- headers: MessageHeaders;
13
- body: Uint8Array;
14
- }
15
- /**
16
- * @public
17
- */
18
- export type MessageHeaders = Record<string, MessageHeaderValue>;
19
- type HeaderValue<K extends string, V> = {
20
- type: K;
21
- value: V;
22
- };
23
- export type BooleanHeaderValue = HeaderValue<"boolean", boolean>;
24
- export type ByteHeaderValue = HeaderValue<"byte", number>;
25
- export type ShortHeaderValue = HeaderValue<"short", number>;
26
- export type IntegerHeaderValue = HeaderValue<"integer", number>;
27
- export type LongHeaderValue = HeaderValue<"long", Int64>;
28
- export type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>;
29
- export type StringHeaderValue = HeaderValue<"string", string>;
30
- export type TimestampHeaderValue = HeaderValue<"timestamp", Date>;
31
- export type UuidHeaderValue = HeaderValue<"uuid", string>;
32
- /**
33
- * @public
34
- */
35
- export type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue;
36
- /**
37
- * @public
38
- */
39
- export interface Int64 {
40
- readonly bytes: Uint8Array;
41
- valueOf: () => number;
42
- toString: () => string;
43
- }
44
- /**
45
- * @public
46
- *
47
- * Util functions for serializing or deserializing event stream
48
- */
49
- export interface EventStreamSerdeContext {
50
- eventStreamMarshaller: EventStreamMarshaller;
51
- }
52
- /**
53
- * @public
54
- *
55
- * A function which deserializes binary event stream message into modeled shape.
56
- */
57
- export interface EventStreamMarshallerDeserFn<StreamType> {
58
- <T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>;
59
- }
60
- /**
61
- * @public
62
- *
63
- * A function that serializes modeled shape into binary stream message.
64
- */
65
- export interface EventStreamMarshallerSerFn<StreamType> {
66
- <T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType;
67
- }
68
- /**
69
- * @public
70
- *
71
- * An interface which provides functions for serializing and deserializing binary event stream
72
- * to/from corresponsing modeled shape.
73
- */
74
- export interface EventStreamMarshaller<StreamType = any> {
75
- deserialize: EventStreamMarshallerDeserFn<StreamType>;
76
- serialize: EventStreamMarshallerSerFn<StreamType>;
77
- }
78
- /**
79
- * @public
80
- */
81
- export interface EventStreamRequestSigner {
82
- sign(request: HttpRequest): Promise<HttpRequest>;
83
- }
84
- /**
85
- * @public
86
- */
87
- export interface EventStreamPayloadHandler {
88
- handle: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>, context?: HandlerExecutionContext) => Promise<FinalizeHandlerOutput<Output>>;
89
- }
90
- /**
91
- * @public
92
- */
93
- export interface EventStreamPayloadHandlerProvider {
94
- (options: any): EventStreamPayloadHandler;
95
- }
96
- /**
97
- * @public
98
- */
99
- export interface EventStreamSerdeProvider {
100
- (options: any): EventStreamMarshaller;
101
- }
102
- /**
103
- * @public
104
- */
105
- export interface EventStreamSignerProvider {
106
- (options: any): EventStreamRequestSigner;
107
- }
108
- export {};
1
+ export { Message, MessageHeaders, BooleanHeaderValue, ByteHeaderValue, ShortHeaderValue, IntegerHeaderValue, LongHeaderValue, BinaryHeaderValue, StringHeaderValue, TimestampHeaderValue, UuidHeaderValue, MessageHeaderValue, Int64, EventStreamSerdeContext, EventStreamMarshaller, EventStreamMarshallerDeserFn, EventStreamMarshallerSerFn, EventStreamPayloadHandler, EventStreamPayloadHandlerProvider, EventStreamRequestSigner, EventStreamSerdeProvider, EventStreamSignerProvider, } from "@smithy/types";