@aws-sdk/types 3.254.0 → 3.266.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/dist-cjs/auth.js CHANGED
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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 = {}));
package/dist-cjs/index.js CHANGED
@@ -16,6 +16,7 @@ tslib_1.__exportStar(require("./logger"), exports);
16
16
  tslib_1.__exportStar(require("./middleware"), exports);
17
17
  tslib_1.__exportStar(require("./pagination"), exports);
18
18
  tslib_1.__exportStar(require("./profile"), exports);
19
+ tslib_1.__exportStar(require("./request"), exports);
19
20
  tslib_1.__exportStar(require("./response"), exports);
20
21
  tslib_1.__exportStar(require("./retry"), exports);
21
22
  tslib_1.__exportStar(require("./serde"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist-es/auth.js CHANGED
@@ -1 +1,5 @@
1
- export {};
1
+ export var HttpAuthLocation;
2
+ (function (HttpAuthLocation) {
3
+ HttpAuthLocation["HEADER"] = "header";
4
+ HttpAuthLocation["QUERY"] = "query";
5
+ })(HttpAuthLocation || (HttpAuthLocation = {}));
package/dist-es/index.js CHANGED
@@ -13,6 +13,7 @@ export * from "./logger";
13
13
  export * from "./middleware";
14
14
  export * from "./pagination";
15
15
  export * from "./profile";
16
+ export * from "./request";
16
17
  export * from "./response";
17
18
  export * from "./retry";
18
19
  export * from "./serde";
@@ -0,0 +1 @@
1
+ export {};
@@ -25,3 +25,23 @@ export interface AuthScheme {
25
25
  signingScope?: never;
26
26
  properties: Record<string, unknown>;
27
27
  }
28
+ export interface HttpAuthDefinition {
29
+ /**
30
+ * Defines the location of where the Auth is serialized.
31
+ */
32
+ in: HttpAuthLocation;
33
+ /**
34
+ * Defines the name of the HTTP header or query string parameter
35
+ * that contains the Auth.
36
+ */
37
+ name: string;
38
+ /**
39
+ * Defines the security scheme to use on the `Authorization` header value.
40
+ * This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}.
41
+ */
42
+ scheme?: string;
43
+ }
44
+ export declare enum HttpAuthLocation {
45
+ HEADER = "header",
46
+ QUERY = "query"
47
+ }
@@ -13,6 +13,7 @@ export * from "./logger";
13
13
  export * from "./middleware";
14
14
  export * from "./pagination";
15
15
  export * from "./profile";
16
+ export * from "./request";
16
17
  export * from "./response";
17
18
  export * from "./retry";
18
19
  export * from "./serde";
@@ -1,4 +1,4 @@
1
- import { AuthScheme } from "./auth";
1
+ import { AuthScheme, HttpAuthDefinition } from "./auth";
2
2
  import { EndpointV2 } from "./endpoint";
3
3
  import { Logger } from "./logger";
4
4
  import { UserAgent } from "./util";
@@ -343,6 +343,11 @@ export interface HandlerExecutionContext {
343
343
  * Set at the same time as endpointV2.
344
344
  */
345
345
  authSchemes?: AuthScheme[];
346
+ /**
347
+ * The current auth configuration that has been set by any auth middleware and
348
+ * that will prevent from being set more than once.
349
+ */
350
+ currentAuthConfig?: HttpAuthDefinition;
346
351
  /**
347
352
  * Used by DynamoDbDocumentClient.
348
353
  */
@@ -0,0 +1,4 @@
1
+ export interface Request {
2
+ destination: URL;
3
+ body?: any;
4
+ }
@@ -32,3 +32,6 @@ export interface MetadataBearer {
32
32
  */
33
33
  $metadata: ResponseMetadata;
34
34
  }
35
+ export interface Response {
36
+ body: any;
37
+ }
@@ -6,3 +6,12 @@ export interface AuthScheme {
6
6
  signingScope?: never;
7
7
  properties: Record<string, unknown>;
8
8
  }
9
+ export interface HttpAuthDefinition {
10
+ in: HttpAuthLocation;
11
+ name: string;
12
+ scheme?: string;
13
+ }
14
+ export declare enum HttpAuthLocation {
15
+ HEADER = "header",
16
+ QUERY = "query",
17
+ }
@@ -13,6 +13,7 @@ export * from "./logger";
13
13
  export * from "./middleware";
14
14
  export * from "./pagination";
15
15
  export * from "./profile";
16
+ export * from "./request";
16
17
  export * from "./response";
17
18
  export * from "./retry";
18
19
  export * from "./serde";
@@ -1,4 +1,4 @@
1
- import { AuthScheme } from "./auth";
1
+ import { AuthScheme, HttpAuthDefinition } from "./auth";
2
2
  import { EndpointV2 } from "./endpoint";
3
3
  import { Logger } from "./logger";
4
4
  import { UserAgent } from "./util";
@@ -202,6 +202,7 @@ export interface HandlerExecutionContext {
202
202
  userAgent?: UserAgent;
203
203
  endpointV2?: EndpointV2;
204
204
  authSchemes?: AuthScheme[];
205
+ currentAuthConfig?: HttpAuthDefinition;
205
206
  dynamoDbDocumentClientOptions?: Partial<{
206
207
  overrideInputFilterSensitiveLog(...args: any[]): string | void;
207
208
  overrideOutputFilterSensitiveLog(...args: any[]): string | void;
@@ -0,0 +1,4 @@
1
+ export interface Request {
2
+ destination: URL;
3
+ body?: any;
4
+ }
@@ -9,3 +9,6 @@ export interface ResponseMetadata {
9
9
  export interface MetadataBearer {
10
10
  $metadata: ResponseMetadata;
11
11
  }
12
+ export interface Response {
13
+ body: any;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.254.0",
3
+ "version": "3.266.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",