@aws-sdk/types
Advanced tools
Comparing version 1.0.0-gamma.3 to 1.0.0-gamma.4
@@ -191,3 +191,3 @@ import { Logger } from "./logger"; | ||
export declare type Relation = "before" | "after"; | ||
export interface RelativeLocation<Input extends object, Output extends object> { | ||
export interface RelativeLocation { | ||
/** | ||
@@ -202,2 +202,3 @@ * Specify the relation to be before or after a know middleware. | ||
} | ||
export declare type RelativeMiddlewareOptions = RelativeLocation & Omit<HandlerOptions, "step">; | ||
export interface InitializeHandlerOptions extends HandlerOptions { | ||
@@ -227,10 +228,11 @@ step?: "initialize"; | ||
* This is useful when given middleware must be executed before or after specific | ||
* middleware(`toMiddleware`). If specified `toMiddleware` is not found, given | ||
* middleware will be added to given step with normal priority. | ||
* Note `toMiddleware` can only be added to middleware stack staticly using | ||
* `add()` API. | ||
* middleware(`toMiddleware`). You can add a middleware relatively to another | ||
* middleware which also added relatively. But eventually, this relative middleware | ||
* chain **must** be 'anchored' by a middleware that added using `add()` API | ||
* with absolute `step` and `priority`. This mothod will throw if specified | ||
* `toMiddleware` is not found. | ||
*/ | ||
export interface MiddlewareStack<Input extends object, Output extends object> { | ||
export interface MiddlewareStack<Input extends object, Output extends object> extends Pluggable<Input, Output> { | ||
/** | ||
* Add middleware to the list to be executed during the "initialize" step, | ||
* Add middleware to the stack to be executed during the "initialize" step, | ||
* optionally specifying a priority, tags and name | ||
@@ -240,3 +242,3 @@ */ | ||
/** | ||
* Add middleware to the list to be executed during the "serialize" step, | ||
* Add middleware to the stack to be executed during the "serialize" step, | ||
* optionally specifying a priority, tags and name | ||
@@ -246,3 +248,3 @@ */ | ||
/** | ||
* Add middleware to the list to be executed during the "build" step, | ||
* Add middleware to the stack to be executed during the "build" step, | ||
* optionally specifying a priority, tags and name | ||
@@ -252,3 +254,3 @@ */ | ||
/** | ||
* Add middleware to the list to be executed during the "finalizeRequest" step, | ||
* Add middleware to the stack to be executed during the "finalizeRequest" step, | ||
* optionally specifying a priority, tags and name | ||
@@ -258,3 +260,3 @@ */ | ||
/** | ||
* Add middleware to the list to be executed during the "deserialize" step, | ||
* Add middleware to the stack to be executed during the "deserialize" step, | ||
* optionally specifying a priority, tags and name | ||
@@ -264,37 +266,7 @@ */ | ||
/** | ||
* Add middleware to location relative to a known middleware in 'initialize' step. | ||
* Require setting `relation` (to `before` or `after`) and `toMiddleware` to | ||
* identify the location of inserted middleware | ||
* optionally specifying tags and name | ||
* Add middleware to a stack position before or after a known middleware,optionally | ||
* specifying name and tags. | ||
*/ | ||
addRelativeTo(middleware: InitializeMiddleware<Input, Output>, options: InitializeHandlerOptions & RelativeLocation<Input, Output>): void; | ||
addRelativeTo(middleware: MiddlewareType<Input, Output>, options: RelativeMiddlewareOptions): void; | ||
/** | ||
* Add middleware to location relative to a known middleware in 'serialize' step. | ||
* Require setting `relation` (to `before` or `after`) and `toMiddleware` to | ||
* identify the location of inserted middleware | ||
* optionally specifying tags and name | ||
*/ | ||
addRelativeTo(middleware: SerializeMiddleware<Input, Output>, options: SerializeHandlerOptions & RelativeLocation<Input, Output>): void; | ||
/** | ||
* Add middleware to location relative to a known middleware in 'build' step. | ||
* Require setting `relation` (to `before` or `after`) and `toMiddleware` to | ||
* identify the location of inserted middleware | ||
* optionally specifying tags and name | ||
*/ | ||
addRelativeTo(middleware: BuildMiddleware<Input, Output>, options: BuildHandlerOptions & RelativeLocation<Input, Output>): void; | ||
/** | ||
* Add middleware to location relative to a known middleware in 'finalizeRequest' step. | ||
* Require setting `relation` (to `before` or `after`) and `toMiddleware` to | ||
* identify the location of inserted middleware | ||
* optionally specifying tags and name | ||
*/ | ||
addRelativeTo(middleware: FinalizeRequestMiddleware<Input, Output>, options: FinalizeRequestHandlerOptions & RelativeLocation<Input, Output>): void; | ||
/** | ||
* Add middleware to location relative to a known middleware in 'deserialize' step. | ||
* Require setting `relation` (to `before` or `after`) and `toMiddleware` to | ||
* identify the location of inserted middleware | ||
* optionally specifying tags and name | ||
*/ | ||
addRelativeTo(middleware: DeserializeMiddleware<Input, Output>, options: DeserializeHandlerOptions & RelativeLocation<Input, Output>): void; | ||
/** | ||
* Apply a customization function to mutate the middleware stack, often | ||
@@ -305,3 +277,3 @@ * used for customizations that requires mutating multiple middleware. | ||
/** | ||
* Create a shallow clone of this list. Step bindings and handler priorities | ||
* Create a shallow clone of this stack. Step bindings and handler priorities | ||
* and tags are preserved in the copy. | ||
@@ -326,4 +298,4 @@ */ | ||
/** | ||
* Create a list containing the middlewares in this list as well as the | ||
* middlewares in the `from` list. Neither source is modified, and step | ||
* Create a stack containing the middlewares in this stack as well as the | ||
* middlewares in the `from` stack. Neither source is modified, and step | ||
* bindings and handler priorities and tags are preserved in the copy. | ||
@@ -330,0 +302,0 @@ */ |
{ | ||
"name": "@aws-sdk/types", | ||
"version": "1.0.0-gamma.3", | ||
"version": "1.0.0-gamma.4", | ||
"main": "./dist/cjs/index.js", | ||
@@ -16,2 +16,3 @@ "module": "./dist/es/index.js", | ||
"build:es": "tsc -p tsconfig.es.json", | ||
"build": "yarn build:es && yarn build:cjs", | ||
"test": "exit 0" | ||
@@ -18,0 +19,0 @@ }, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164907
96
1992