@smithy/middleware-retry 3.0.32 → 3.0.33

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.
@@ -2,12 +2,14 @@ import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } f
2
2
  import { RateLimiter } from "@smithy/util-retry";
3
3
  import { StandardRetryStrategy, StandardRetryStrategyOptions } from "./StandardRetryStrategy";
4
4
  /**
5
+ * @public
5
6
  * Strategy options to be passed to AdaptiveRetryStrategy
6
7
  */
7
8
  export interface AdaptiveRetryStrategyOptions extends StandardRetryStrategyOptions {
8
9
  rateLimiter?: RateLimiter;
9
10
  }
10
11
  /**
12
+ * @public
11
13
  * @deprecated use AdaptiveRetryStrategy from @smithy/util-retry
12
14
  */
13
15
  export declare class AdaptiveRetryStrategy extends StandardRetryStrategy {
@@ -2,6 +2,8 @@ import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, Re
2
2
  import { DelayDecider, RetryDecider, RetryQuota } from "./types";
3
3
  /**
4
4
  * Strategy options to be passed to StandardRetryStrategy
5
+ * @public
6
+ * @deprecated use StandardRetryStrategy from @smithy/util-retry
5
7
  */
6
8
  export interface StandardRetryStrategyOptions {
7
9
  retryDecider?: RetryDecider;
@@ -9,6 +11,7 @@ export interface StandardRetryStrategyOptions {
9
11
  retryQuota?: RetryQuota;
10
12
  }
11
13
  /**
14
+ * @public
12
15
  * @deprecated use StandardRetryStrategy from @smithy/util-retry
13
16
  */
14
17
  export declare class StandardRetryStrategy implements RetryStrategy {
@@ -1,7 +1,16 @@
1
1
  import { LoadedConfigSelectors } from "@smithy/node-config-provider";
2
2
  import { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
7
+ /**
8
+ * @internal
9
+ */
4
10
  export declare const CONFIG_MAX_ATTEMPTS = "max_attempts";
11
+ /**
12
+ * @internal
13
+ */
5
14
  export declare const NODE_MAX_ATTEMPT_CONFIG_OPTIONS: LoadedConfigSelectors<number>;
6
15
  /**
7
16
  * @public
@@ -39,7 +48,19 @@ export interface RetryResolvedConfig {
39
48
  */
40
49
  retryStrategy: Provider<RetryStrategyV2 | RetryStrategy>;
41
50
  }
51
+ /**
52
+ * @internal
53
+ */
42
54
  export declare const resolveRetryConfig: <T>(input: T & PreviouslyResolved & RetryInputConfig) => T & RetryResolvedConfig;
55
+ /**
56
+ * @internal
57
+ */
43
58
  export declare const ENV_RETRY_MODE = "AWS_RETRY_MODE";
59
+ /**
60
+ * @internal
61
+ */
44
62
  export declare const CONFIG_RETRY_MODE = "retry_mode";
63
+ /**
64
+ * @internal
65
+ */
45
66
  export declare const NODE_RETRY_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<string>;
@@ -1,4 +1,7 @@
1
1
  import { RetryQuota } from "./types";
2
+ /**
3
+ * @internal
4
+ */
2
5
  export interface DefaultRetryQuotaOptions {
3
6
  /**
4
7
  * The total amount of retry token to be incremented from retry token balance
@@ -15,4 +18,7 @@ export interface DefaultRetryQuotaOptions {
15
18
  */
16
19
  timeoutRetryCost?: number;
17
20
  }
21
+ /**
22
+ * @internal
23
+ */
18
24
  export declare const getDefaultRetryQuota: (initialRetryTokens: number, options?: DefaultRetryQuotaOptions) => RetryQuota;
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @internal
2
3
  * Calculate a capped, fully-jittered exponential backoff time.
3
4
  */
4
5
  export declare const defaultDelayDecider: (delayBase: number, attempts: number) => number;
@@ -1,4 +1,13 @@
1
1
  import { FinalizeHandler, MetadataBearer, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const omitRetryHeadersMiddleware: () => <Output extends MetadataBearer = MetadataBearer>(next: FinalizeHandler<any, Output>) => FinalizeHandler<any, Output>;
6
+ /**
7
+ * @internal
8
+ */
3
9
  export declare const omitRetryHeadersMiddlewareOptions: RelativeMiddlewareOptions;
10
+ /**
11
+ * @internal
12
+ */
4
13
  export declare const getOmitRetryHeadersPlugin: (options: unknown) => Pluggable<any, any>;
@@ -1,5 +1,6 @@
1
1
  import { SdkError } from "@smithy/types";
2
2
  /**
3
+ * @internal
3
4
  * @deprecated this is only used in the deprecated StandardRetryStrategy. Do not use in new code.
4
5
  */
5
6
  export declare const defaultRetryDecider: (error: SdkError) => boolean;
@@ -1,6 +1,18 @@
1
1
  import { AbsoluteLocation, FinalizeHandler, FinalizeRequestHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types";
2
2
  import { RetryResolvedConfig } from "./configurations";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare const retryMiddleware: (options: RetryResolvedConfig) => <Output extends MetadataBearer = MetadataBearer>(next: FinalizeHandler<any, Output>, context: HandlerExecutionContext) => FinalizeHandler<any, Output>;
7
+ /**
8
+ * @internal
9
+ */
4
10
  export declare const retryMiddlewareOptions: FinalizeRequestHandlerOptions & AbsoluteLocation;
11
+ /**
12
+ * @internal
13
+ */
5
14
  export declare const getRetryPlugin: (options: RetryResolvedConfig) => Pluggable<any, any>;
15
+ /**
16
+ * @internal
17
+ */
6
18
  export declare const getRetryAfterHint: (response: unknown) => Date | undefined;
@@ -2,12 +2,14 @@ import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider } f
2
2
  import { RateLimiter } from "@smithy/util-retry";
3
3
  import { StandardRetryStrategy, StandardRetryStrategyOptions } from "./StandardRetryStrategy";
4
4
  /**
5
+ * @public
5
6
  * Strategy options to be passed to AdaptiveRetryStrategy
6
7
  */
7
8
  export interface AdaptiveRetryStrategyOptions extends StandardRetryStrategyOptions {
8
9
  rateLimiter?: RateLimiter;
9
10
  }
10
11
  /**
12
+ * @public
11
13
  * @deprecated use AdaptiveRetryStrategy from @smithy/util-retry
12
14
  */
13
15
  export declare class AdaptiveRetryStrategy extends StandardRetryStrategy {
@@ -2,6 +2,8 @@ import { FinalizeHandler, FinalizeHandlerArguments, MetadataBearer, Provider, Re
2
2
  import { DelayDecider, RetryDecider, RetryQuota } from "./types";
3
3
  /**
4
4
  * Strategy options to be passed to StandardRetryStrategy
5
+ * @public
6
+ * @deprecated use StandardRetryStrategy from @smithy/util-retry
5
7
  */
6
8
  export interface StandardRetryStrategyOptions {
7
9
  retryDecider?: RetryDecider;
@@ -9,6 +11,7 @@ export interface StandardRetryStrategyOptions {
9
11
  retryQuota?: RetryQuota;
10
12
  }
11
13
  /**
14
+ * @public
12
15
  * @deprecated use StandardRetryStrategy from @smithy/util-retry
13
16
  */
14
17
  export declare class StandardRetryStrategy implements RetryStrategy {
@@ -1,7 +1,16 @@
1
1
  import { LoadedConfigSelectors } from "@smithy/node-config-provider";
2
2
  import { Provider, RetryStrategy, RetryStrategyV2 } from "@smithy/types";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
7
+ /**
8
+ * @internal
9
+ */
4
10
  export declare const CONFIG_MAX_ATTEMPTS = "max_attempts";
11
+ /**
12
+ * @internal
13
+ */
5
14
  export declare const NODE_MAX_ATTEMPT_CONFIG_OPTIONS: LoadedConfigSelectors<number>;
6
15
  /**
7
16
  * @public
@@ -39,7 +48,19 @@ export interface RetryResolvedConfig {
39
48
  */
40
49
  retryStrategy: Provider<RetryStrategyV2 | RetryStrategy>;
41
50
  }
51
+ /**
52
+ * @internal
53
+ */
42
54
  export declare const resolveRetryConfig: <T>(input: T & PreviouslyResolved & RetryInputConfig) => T & RetryResolvedConfig;
55
+ /**
56
+ * @internal
57
+ */
43
58
  export declare const ENV_RETRY_MODE = "AWS_RETRY_MODE";
59
+ /**
60
+ * @internal
61
+ */
44
62
  export declare const CONFIG_RETRY_MODE = "retry_mode";
63
+ /**
64
+ * @internal
65
+ */
45
66
  export declare const NODE_RETRY_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<string>;
@@ -1,4 +1,7 @@
1
1
  import { RetryQuota } from "./types";
2
+ /**
3
+ * @internal
4
+ */
2
5
  export interface DefaultRetryQuotaOptions {
3
6
  /**
4
7
  * The total amount of retry token to be incremented from retry token balance
@@ -15,4 +18,7 @@ export interface DefaultRetryQuotaOptions {
15
18
  */
16
19
  timeoutRetryCost?: number;
17
20
  }
21
+ /**
22
+ * @internal
23
+ */
18
24
  export declare const getDefaultRetryQuota: (initialRetryTokens: number, options?: DefaultRetryQuotaOptions) => RetryQuota;
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @internal
2
3
  * Calculate a capped, fully-jittered exponential backoff time.
3
4
  */
4
5
  export declare const defaultDelayDecider: (delayBase: number, attempts: number) => number;
@@ -1,4 +1,13 @@
1
1
  import { FinalizeHandler, MetadataBearer, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const omitRetryHeadersMiddleware: () => <Output extends MetadataBearer = MetadataBearer>(next: FinalizeHandler<any, Output>) => FinalizeHandler<any, Output>;
6
+ /**
7
+ * @internal
8
+ */
3
9
  export declare const omitRetryHeadersMiddlewareOptions: RelativeMiddlewareOptions;
10
+ /**
11
+ * @internal
12
+ */
4
13
  export declare const getOmitRetryHeadersPlugin: (options: unknown) => Pluggable<any, any>;
@@ -1,5 +1,6 @@
1
1
  import { SdkError } from "@smithy/types";
2
2
  /**
3
+ * @internal
3
4
  * @deprecated this is only used in the deprecated StandardRetryStrategy. Do not use in new code.
4
5
  */
5
6
  export declare const defaultRetryDecider: (error: SdkError) => boolean;
@@ -1,6 +1,18 @@
1
1
  import { AbsoluteLocation, FinalizeHandler, FinalizeRequestHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types";
2
2
  import { RetryResolvedConfig } from "./configurations";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare const retryMiddleware: (options: RetryResolvedConfig) => <Output extends MetadataBearer = MetadataBearer>(next: FinalizeHandler<any, Output>, context: HandlerExecutionContext) => FinalizeHandler<any, Output>;
7
+ /**
8
+ * @internal
9
+ */
4
10
  export declare const retryMiddlewareOptions: FinalizeRequestHandlerOptions & AbsoluteLocation;
11
+ /**
12
+ * @internal
13
+ */
5
14
  export declare const getRetryPlugin: (options: RetryResolvedConfig) => Pluggable<any, any>;
15
+ /**
16
+ * @internal
17
+ */
6
18
  export declare const getRetryAfterHint: (response: unknown) => Date | undefined;
@@ -4,6 +4,9 @@ import { SdkError } from "@smithy/types";
4
4
  * already attempted, the HTTP status code, and the error received (if any).
5
5
  *
6
6
  * @param error - The error encountered.
7
+ *
8
+ * @deprecated
9
+ * @internal
7
10
  */
8
11
  export interface RetryDecider {
9
12
  (error: SdkError): boolean;
@@ -13,12 +16,17 @@ export interface RetryDecider {
13
16
  *
14
17
  * @param delayBase - The base delay (in milliseconds).
15
18
  * @param attempts - The number of times the action has already been tried.
19
+ *
20
+ * @deprecated
21
+ * @internal
16
22
  */
17
23
  export interface DelayDecider {
18
24
  (delayBase: number, attempts: number): number;
19
25
  }
20
26
  /**
21
27
  * Interface that specifies the retry quota behavior.
28
+ * @deprecated
29
+ * @internal
22
30
  */
23
31
  export interface RetryQuota {
24
32
  /**
@@ -35,6 +43,10 @@ export interface RetryQuota {
35
43
  */
36
44
  releaseRetryTokens: (releaseCapacityAmount?: number) => void;
37
45
  }
46
+ /**
47
+ * @deprecated
48
+ * @internal
49
+ */
38
50
  export interface RateLimiter {
39
51
  /**
40
52
  * If there is sufficient capacity (tokens) available, it immediately returns.
@@ -4,6 +4,9 @@ import { SdkError } from "@smithy/types";
4
4
  * already attempted, the HTTP status code, and the error received (if any).
5
5
  *
6
6
  * @param error - The error encountered.
7
+ *
8
+ * @deprecated
9
+ * @internal
7
10
  */
8
11
  export interface RetryDecider {
9
12
  (error: SdkError): boolean;
@@ -13,12 +16,17 @@ export interface RetryDecider {
13
16
  *
14
17
  * @param delayBase - The base delay (in milliseconds).
15
18
  * @param attempts - The number of times the action has already been tried.
19
+ *
20
+ * @deprecated
21
+ * @internal
16
22
  */
17
23
  export interface DelayDecider {
18
24
  (delayBase: number, attempts: number): number;
19
25
  }
20
26
  /**
21
27
  * Interface that specifies the retry quota behavior.
28
+ * @deprecated
29
+ * @internal
22
30
  */
23
31
  export interface RetryQuota {
24
32
  /**
@@ -35,6 +43,10 @@ export interface RetryQuota {
35
43
  */
36
44
  releaseRetryTokens: (releaseCapacityAmount?: number) => void;
37
45
  }
46
+ /**
47
+ * @deprecated
48
+ * @internal
49
+ */
38
50
  export interface RateLimiter {
39
51
  /**
40
52
  * If there is sufficient capacity (tokens) available, it immediately returns.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "3.0.32",
3
+ "version": "3.0.33",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-retry",
@@ -36,7 +36,7 @@
36
36
  "@smithy/node-config-provider": "^3.1.12",
37
37
  "@smithy/protocol-http": "^4.1.8",
38
38
  "@smithy/service-error-classification": "^3.0.11",
39
- "@smithy/smithy-client": "^3.5.2",
39
+ "@smithy/smithy-client": "^3.6.0",
40
40
  "@smithy/types": "^3.7.2",
41
41
  "@smithy/util-middleware": "^3.0.11",
42
42
  "@smithy/util-retry": "^3.0.11",