@middy/sts 3.1.1 → 3.2.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/index.d.ts +29 -5
- package/package.json +5 -4
package/index.d.ts
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
|
-
import STS from 'aws-sdk/clients/sts'
|
|
2
1
|
import middy from '@middy/core'
|
|
3
2
|
import { Options as MiddyOptions } from '@middy/util'
|
|
3
|
+
import { Context as LambdaContext } from 'aws-lambda'
|
|
4
|
+
import STS from 'aws-sdk/clients/sts'
|
|
4
5
|
|
|
5
6
|
interface Options<S = STS>
|
|
6
|
-
extends Pick<
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
extends Pick<
|
|
8
|
+
MiddyOptions<S, STS.Types.ClientConfiguration>,
|
|
9
|
+
| 'AwsClient'
|
|
10
|
+
| 'awsClientOptions'
|
|
11
|
+
| 'awsClientCapture'
|
|
12
|
+
| 'fetchData'
|
|
13
|
+
| 'disablePrefetch'
|
|
14
|
+
| 'cacheKey'
|
|
15
|
+
| 'cacheExpiry'
|
|
16
|
+
| 'setToContext'
|
|
17
|
+
> {}
|
|
18
|
+
|
|
19
|
+
export type Context<TOptions extends Options | undefined> = TOptions extends {
|
|
20
|
+
setToContext: true
|
|
9
21
|
}
|
|
22
|
+
? LambdaContext &
|
|
23
|
+
Record<
|
|
24
|
+
keyof TOptions['fetchData'],
|
|
25
|
+
{
|
|
26
|
+
accessKeyId: STS.accessKeyIdType
|
|
27
|
+
secretAccessKey: STS.accessKeySecretType
|
|
28
|
+
sessionToken: STS.tokenType
|
|
29
|
+
}
|
|
30
|
+
>
|
|
31
|
+
: LambdaContext
|
|
10
32
|
|
|
11
|
-
declare function sts
|
|
33
|
+
declare function sts<TOptions extends Options> (
|
|
34
|
+
options?: TOptions
|
|
35
|
+
): middy.MiddlewareObj<unknown, any, Error, Context<TOptions>>
|
|
12
36
|
|
|
13
37
|
export default sts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/sts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "STS (Security Token Service) credentials middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -62,12 +62,13 @@
|
|
|
62
62
|
},
|
|
63
63
|
"homepage": "https://middy.js.org",
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@middy/util": "3.
|
|
65
|
+
"@middy/util": "3.2.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@middy/core": "3.
|
|
68
|
+
"@middy/core": "3.2.0",
|
|
69
|
+
"@types/aws-lambda": "^8.10.101",
|
|
69
70
|
"aws-sdk": "^2.939.0",
|
|
70
71
|
"aws-xray-sdk": "^3.3.3"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "ac46270daa388b52a81472ae8f9b8808a0136940"
|
|
73
74
|
}
|