@aws-sdk/types 3.54.1 → 3.55.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.55.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.1...v3.55.0) (2022-03-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **types:** remove [@internal](https://github.com/internal) jsdoc tag from profile types ([#3452](https://github.com/aws/aws-sdk-js-v3/issues/3452)) ([2d7c151](https://github.com/aws/aws-sdk-js-v3/commit/2d7c151bb6d9ccfdd1eb3bd8b007e4ebcdd5daa3))
12
+
13
+
14
+ ### Features
15
+
16
+ * **property-provider:** memoize() supports force refresh ([#3413](https://github.com/aws/aws-sdk-js-v3/issues/3413)) ([a79f962](https://github.com/aws/aws-sdk-js-v3/commit/a79f962873ff11a3d6f98199224155bd2ddc0b1e))
17
+
18
+
19
+
20
+
21
+
6
22
  ## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/types
@@ -1,18 +1,9 @@
1
- /**
2
- * @internal
3
- */
4
1
  export interface Profile {
5
2
  [key: string]: string | undefined;
6
3
  }
7
- /**
8
- * @internal
9
- */
10
4
  export interface ParsedIniData {
11
5
  [key: string]: Profile;
12
6
  }
13
- /**
14
- * @internal
15
- */
16
7
  export interface SharedConfigFiles {
17
8
  credentialsFile: ParsedIniData;
18
9
  configFile: ParsedIniData;
@@ -1,12 +1,9 @@
1
-
2
1
  export interface Profile {
3
2
  [key: string]: string | undefined;
4
3
  }
5
-
6
4
  export interface ParsedIniData {
7
5
  [key: string]: Profile;
8
6
  }
9
-
10
7
  export interface SharedConfigFiles {
11
8
  credentialsFile: ParsedIniData;
12
9
  configFile: ParsedIniData;
@@ -14,6 +14,12 @@ export interface Provider<T> {
14
14
  (): Promise<T>;
15
15
  }
16
16
 
17
+ export interface MemoizedProvider<T> {
18
+ (options?: {
19
+ forceRefresh?: boolean;
20
+ }): Promise<T>;
21
+ }
22
+
17
23
  export interface BodyLengthCalculator {
18
24
  (body: any): number | undefined;
19
25
  }
@@ -33,6 +33,25 @@ export interface Decoder {
33
33
  export interface Provider<T> {
34
34
  (): Promise<T>;
35
35
  }
36
+ /**
37
+ * A function that, when invoked, returns a promise that will be fulfilled with
38
+ * a value of type T. It memoizes the result from the previous invocation
39
+ * instead of calling the underlying resources every time.
40
+ *
41
+ * You can force the provider to refresh the memoized value by invoke the
42
+ * function with optional parameter hash with `forceRefresh` boolean key and
43
+ * value `true`.
44
+ *
45
+ * @example A function that reads credentials from IMDS service that could
46
+ * return expired credentials. The SDK will keep using the expired credentials
47
+ * until an unretryable service error requiring a force refresh of the
48
+ * credentials.
49
+ */
50
+ export interface MemoizedProvider<T> {
51
+ (options?: {
52
+ forceRefresh?: boolean;
53
+ }): Promise<T>;
54
+ }
36
55
  /**
37
56
  * A function that, given a request body, determines the
38
57
  * length of the body. This is used to determine the Content-Length
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.54.1",
3
+ "version": "3.55.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
@@ -44,6 +44,6 @@
44
44
  "downlevel-dts": "0.7.0",
45
45
  "rimraf": "3.0.2",
46
46
  "typedoc": "0.19.2",
47
- "typescript": "~4.3.5"
47
+ "typescript": "~4.6.2"
48
48
  }
49
49
  }