@effect-aws/client-sts 1.10.9 → 2.0.0-beta.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/LICENSE +1 -1
- package/README.md +3 -3
- package/dist/dts/STSClientInstance.d.ts +2 -2
- package/dist/dts/STSClientInstance.d.ts.map +1 -1
- package/dist/dts/STSService.d.ts +13 -15
- package/dist/dts/STSService.d.ts.map +1 -1
- package/dist/dts/STSServiceConfig.d.ts.map +1 -1
- package/dist/esm/STSClientInstance.js +3 -3
- package/dist/esm/STSClientInstance.js.map +1 -1
- package/dist/esm/STSService.js +2 -2
- package/dist/esm/STSService.js.map +1 -1
- package/dist/esm/STSServiceConfig.js +5 -6
- package/dist/esm/STSServiceConfig.js.map +1 -1
- package/package.json +8 -14
- package/src/STSClientInstance.ts +4 -4
- package/src/STSService.ts +14 -14
- package/src/STSServiceConfig.ts +6 -7
- package/dist/cjs/Errors.d.ts +0 -19
- package/dist/cjs/Errors.d.ts.map +0 -1
- package/dist/cjs/Errors.js +0 -18
- package/dist/cjs/Errors.js.map +0 -1
- package/dist/cjs/STSClientInstance.d.ts +0 -24
- package/dist/cjs/STSClientInstance.d.ts.map +0 -1
- package/dist/cjs/STSClientInstance.js +0 -50
- package/dist/cjs/STSClientInstance.js.map +0 -1
- package/dist/cjs/STSService.d.ts +0 -90
- package/dist/cjs/STSService.d.ts.map +0 -1
- package/dist/cjs/STSService.js +0 -70
- package/dist/cjs/STSService.js.map +0 -1
- package/dist/cjs/STSServiceConfig.d.ts +0 -25
- package/dist/cjs/STSServiceConfig.d.ts.map +0 -1
- package/dist/cjs/STSServiceConfig.js +0 -35
- package/dist/cjs/STSServiceConfig.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -44
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -56
- package/dist/cjs/index.js.map +0 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ With default STSClient instance:
|
|
|
16
16
|
```typescript
|
|
17
17
|
import { STS } from "@effect-aws/client-sts";
|
|
18
18
|
|
|
19
|
-
const program = STS.getCallerIdentity(args);
|
|
19
|
+
const program = STS.use((svc) => svc.getCallerIdentity(args));
|
|
20
20
|
|
|
21
21
|
const result = pipe(
|
|
22
22
|
program,
|
|
@@ -30,7 +30,7 @@ With custom STSClient instance:
|
|
|
30
30
|
```typescript
|
|
31
31
|
import { STS } from "@effect-aws/client-sts";
|
|
32
32
|
|
|
33
|
-
const program = STS.getCallerIdentity(args);
|
|
33
|
+
const program = STS.use((svc) => svc.getCallerIdentity(args));
|
|
34
34
|
|
|
35
35
|
const result = await pipe(
|
|
36
36
|
program,
|
|
@@ -46,7 +46,7 @@ With custom STSClient configuration:
|
|
|
46
46
|
```typescript
|
|
47
47
|
import { STS } from "@effect-aws/client-sts";
|
|
48
48
|
|
|
49
|
-
const program = STS.getCallerIdentity(args);
|
|
49
|
+
const program = STS.use((svc) => svc.getCallerIdentity(args));
|
|
50
50
|
|
|
51
51
|
const result = await pipe(
|
|
52
52
|
program,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
4
|
import { STSClient } from "@aws-sdk/client-sts";
|
|
5
|
-
import {
|
|
6
|
-
declare const STSClientInstance_base:
|
|
5
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
6
|
+
declare const STSClientInstance_base: ServiceMap.ServiceClass<STSClientInstance, "@effect-aws/client-sts/STSClientInstance", STSClient>;
|
|
7
7
|
/**
|
|
8
8
|
* @since 1.0.0
|
|
9
9
|
* @category tags
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSClientInstance.d.ts","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"STSClientInstance.d.ts","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;;AAGnD;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,sBAEtC;CAAG;AAEJ;;;GAGG;AACH,eAAO,MAAM,IAAI,+DAOhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,8CAAwC,CAAC"}
|
package/dist/dts/STSService.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { type AssumeRoleCommandInput, type AssumeRoleCommandOutput, type AssumeRoleWithSAMLCommandInput, type AssumeRoleWithSAMLCommandOutput, type AssumeRoleWithWebIdentityCommandInput, type AssumeRoleWithWebIdentityCommandOutput, type AssumeRootCommandInput, type AssumeRootCommandOutput, type DecodeAuthorizationMessageCommandInput, type DecodeAuthorizationMessageCommandOutput, type GetAccessKeyInfoCommandInput, type GetAccessKeyInfoCommandOutput, type GetCallerIdentityCommandInput, type GetCallerIdentityCommandOutput, type GetDelegatedAccessTokenCommandInput, type GetDelegatedAccessTokenCommandOutput, type GetFederationTokenCommandInput, type GetFederationTokenCommandOutput, type GetSessionTokenCommandInput, type GetSessionTokenCommandOutput, type GetWebIdentityTokenCommandInput, type GetWebIdentityTokenCommandOutput, type STSClient, type STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
5
|
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
6
6
|
import type { Cause } from "effect";
|
|
7
|
-
import { Effect, Layer } from "effect";
|
|
7
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
8
8
|
import type { ExpiredTokenError, ExpiredTradeInTokenError, IDPCommunicationError, IDPRejectedClaimError, InvalidAuthorizationMessageError, InvalidIdentityTokenError, JWTPayloadSizeExceededError, MalformedPolicyDocumentError, OutboundWebIdentityFederationDisabledError, PackedPolicyTooLargeError, RegionDisabledError, SdkError, SessionDurationEscalationError } from "./Errors.js";
|
|
9
9
|
import * as Instance from "./STSClientInstance.js";
|
|
10
10
|
interface STSService$ {
|
|
@@ -12,56 +12,54 @@ interface STSService$ {
|
|
|
12
12
|
/**
|
|
13
13
|
* @see {@link AssumeRoleCommand}
|
|
14
14
|
*/
|
|
15
|
-
assumeRole(args: AssumeRoleCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleCommandOutput, Cause.
|
|
15
|
+
assumeRole(args: AssumeRoleCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleCommandOutput, Cause.TimeoutError | SdkError | ExpiredTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
16
16
|
/**
|
|
17
17
|
* @see {@link AssumeRoleWithSAMLCommand}
|
|
18
18
|
*/
|
|
19
|
-
assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithSAMLCommandOutput, Cause.
|
|
19
|
+
assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithSAMLCommandOutput, Cause.TimeoutError | SdkError | ExpiredTokenError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
20
20
|
/**
|
|
21
21
|
* @see {@link AssumeRoleWithWebIdentityCommand}
|
|
22
22
|
*/
|
|
23
|
-
assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithWebIdentityCommandOutput, Cause.
|
|
23
|
+
assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithWebIdentityCommandOutput, Cause.TimeoutError | SdkError | ExpiredTokenError | IDPCommunicationError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
24
24
|
/**
|
|
25
25
|
* @see {@link AssumeRootCommand}
|
|
26
26
|
*/
|
|
27
|
-
assumeRoot(args: AssumeRootCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRootCommandOutput, Cause.
|
|
27
|
+
assumeRoot(args: AssumeRootCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRootCommandOutput, Cause.TimeoutError | SdkError | ExpiredTokenError | RegionDisabledError>;
|
|
28
28
|
/**
|
|
29
29
|
* @see {@link DecodeAuthorizationMessageCommand}
|
|
30
30
|
*/
|
|
31
|
-
decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: HttpHandlerOptions): Effect.Effect<DecodeAuthorizationMessageCommandOutput, Cause.
|
|
31
|
+
decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: HttpHandlerOptions): Effect.Effect<DecodeAuthorizationMessageCommandOutput, Cause.TimeoutError | SdkError | InvalidAuthorizationMessageError>;
|
|
32
32
|
/**
|
|
33
33
|
* @see {@link GetAccessKeyInfoCommand}
|
|
34
34
|
*/
|
|
35
|
-
getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAccessKeyInfoCommandOutput, Cause.
|
|
35
|
+
getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAccessKeyInfoCommandOutput, Cause.TimeoutError | SdkError>;
|
|
36
36
|
/**
|
|
37
37
|
* @see {@link GetCallerIdentityCommand}
|
|
38
38
|
*/
|
|
39
|
-
getCallerIdentity(args: GetCallerIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetCallerIdentityCommandOutput, Cause.
|
|
39
|
+
getCallerIdentity(args: GetCallerIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetCallerIdentityCommandOutput, Cause.TimeoutError | SdkError>;
|
|
40
40
|
/**
|
|
41
41
|
* @see {@link GetDelegatedAccessTokenCommand}
|
|
42
42
|
*/
|
|
43
|
-
getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetDelegatedAccessTokenCommandOutput, Cause.
|
|
43
|
+
getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetDelegatedAccessTokenCommandOutput, Cause.TimeoutError | SdkError | ExpiredTradeInTokenError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
44
44
|
/**
|
|
45
45
|
* @see {@link GetFederationTokenCommand}
|
|
46
46
|
*/
|
|
47
|
-
getFederationToken(args: GetFederationTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetFederationTokenCommandOutput, Cause.
|
|
47
|
+
getFederationToken(args: GetFederationTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetFederationTokenCommandOutput, Cause.TimeoutError | SdkError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
48
48
|
/**
|
|
49
49
|
* @see {@link GetSessionTokenCommand}
|
|
50
50
|
*/
|
|
51
|
-
getSessionToken(args: GetSessionTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetSessionTokenCommandOutput, Cause.
|
|
51
|
+
getSessionToken(args: GetSessionTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetSessionTokenCommandOutput, Cause.TimeoutError | SdkError | RegionDisabledError>;
|
|
52
52
|
/**
|
|
53
53
|
* @see {@link GetWebIdentityTokenCommand}
|
|
54
54
|
*/
|
|
55
|
-
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetWebIdentityTokenCommandOutput, Cause.
|
|
55
|
+
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetWebIdentityTokenCommandOutput, Cause.TimeoutError | SdkError | JWTPayloadSizeExceededError | OutboundWebIdentityFederationDisabledError | SessionDurationEscalationError>;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* @since 1.0.0
|
|
59
59
|
* @category constructors
|
|
60
60
|
*/
|
|
61
61
|
export declare const makeSTSService: Effect.Effect<STSService$, never, Instance.STSClientInstance>;
|
|
62
|
-
declare const STSService_base:
|
|
63
|
-
use: <X>(body: (_: STSService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, STSService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1, Cause.UnknownException, STSService> : Effect.Effect<X, never, STSService>;
|
|
64
|
-
};
|
|
62
|
+
declare const STSService_base: ServiceMap.ServiceClass<STSService, "@effect-aws/client-sts/STSService", STSService$>;
|
|
65
63
|
/**
|
|
66
64
|
* @since 1.0.0
|
|
67
65
|
* @category models
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSService.d.ts","sourceRoot":"","sources":["../../src/STSService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE5B,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EAEpC,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAE3C,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE5B,KAAK,sCAAsC,EAC3C,KAAK,uCAAuC,EAE5C,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAElC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EAEnC,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EAEzC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EAEpC,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EAEjC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE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M,cAAc,+DAWzB,CAAC;;AAEH;;;GAGG;AACH,qBAAa,UAAW,SAAQ,eAGQ;IACtC,MAAM,CAAC,QAAQ,CAAC,YAAY,wCAA0E;IACtG,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAY,WAAW,MAAM,2CAI9C;IACJ,MAAM,CAAC,QAAQ,CAAC,SAAS,aACb,CAAC,aAAa,EAAE,eAAe,KAAK,SAAS,2CASrD;CACL;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC;;OAEG;IACH,UAAiB,MAAO,SAAQ,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;QAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC;KACtE;IAED;;OAEG;IACH,KAAY,IAAI,GAAG,WAAW,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSServiceConfig.d.ts","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"STSServiceConfig.d.ts","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAc,MAAM,QAAQ,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAWlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE;IACjC,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACjG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAK9F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,WAAW,MAAM,qCAAmD,CAAC;AAEjH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAQ3D,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
4
|
import { STSClient } from "@aws-sdk/client-sts";
|
|
5
|
-
import {
|
|
5
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
6
6
|
import * as STSServiceConfig from "./STSServiceConfig.js";
|
|
7
7
|
/**
|
|
8
8
|
* @since 1.0.0
|
|
9
9
|
* @category tags
|
|
10
10
|
*/
|
|
11
|
-
export class STSClientInstance extends
|
|
11
|
+
export class STSClientInstance extends ServiceMap.Service()("@effect-aws/client-sts/STSClientInstance") {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @since 1.0.0
|
|
@@ -19,5 +19,5 @@ export const make = Effect.flatMap(STSServiceConfig.toSTSClientConfig, (config)
|
|
|
19
19
|
* @since 1.0.0
|
|
20
20
|
* @category layers
|
|
21
21
|
*/
|
|
22
|
-
export const layer = Layer.
|
|
22
|
+
export const layer = Layer.effect(STSClientInstance, make);
|
|
23
23
|
//# sourceMappingURL=STSClientInstance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSClientInstance.js","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"STSClientInstance.js","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAU,CAAC,OAAO,EAAgC,CACvF,0CAA0C,CAC3C;CAAG;AAEJ;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,gBAAgB,CAAC,iBAAiB,EAClC,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,EACxC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAChD,CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC"}
|
package/dist/esm/STSService.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { AssumeRoleCommand, AssumeRoleWithSAMLCommand, AssumeRoleWithWebIdentityCommand, AssumeRootCommand, DecodeAuthorizationMessageCommand, GetAccessKeyInfoCommand, GetCallerIdentityCommand, GetDelegatedAccessTokenCommand, GetFederationTokenCommand, GetSessionTokenCommand, GetWebIdentityTokenCommand, } from "@aws-sdk/client-sts";
|
|
5
5
|
import { Service } from "@effect-aws/commons";
|
|
6
|
-
import { Effect, Layer } from "effect";
|
|
6
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
7
7
|
import { AllServiceErrors } from "./Errors.js";
|
|
8
8
|
import * as Instance from "./STSClientInstance.js";
|
|
9
9
|
import * as STSServiceConfig from "./STSServiceConfig.js";
|
|
@@ -35,7 +35,7 @@ export const makeSTSService = Effect.gen(function* () {
|
|
|
35
35
|
* @since 1.0.0
|
|
36
36
|
* @category models
|
|
37
37
|
*/
|
|
38
|
-
export class STSService extends
|
|
38
|
+
export class STSService extends ServiceMap.Service()("@effect-aws/client-sts/STSService") {
|
|
39
39
|
static defaultLayer = Layer.effect(this, makeSTSService).pipe(Layer.provide(Instance.layer));
|
|
40
40
|
static layer = (config) => Layer.effect(this, makeSTSService).pipe(Layer.provide(Instance.layer), Layer.provide(STSServiceConfig.setSTSServiceConfig(config)));
|
|
41
41
|
static baseLayer = (evaluate) => Layer.effect(this, makeSTSService).pipe(Layer.provide(Layer.effect(Instance.STSClientInstance, Effect.map(STSServiceConfig.toSTSClientConfig, evaluate))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSService.js","sourceRoot":"","sources":["../../src/STSService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,iBAAiB,EAGjB,yBAAyB,EAGzB,gCAAgC,EAGhC,iBAAiB,EAGjB,iCAAiC,EAGjC,uBAAuB,EAGvB,wBAAwB,EAGxB,8BAA8B,EAG9B,yBAAyB,EAGzB,sBAAsB,EAGtB,0BAA0B,GAK3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"STSService.js","sourceRoot":"","sources":["../../src/STSService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,iBAAiB,EA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CAAC,CAAC,CAAC;IACtG,MAAM,CAAU,KAAK,GAAG,CAAC,MAAyB,EAAE,EAAE,CACpD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,IAAI,CACrC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC7B,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAC5D,CAAC;IACJ,MAAM,CAAU,SAAS,GAAG,CAC1B,QAAuD,EACvD,EAAE,CACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,IAAI,CACrC,KAAK,CAAC,OAAO,CACX,KAAK,CAAC,MAAM,CACV,QAAQ,CAAC,iBAAiB,EAC1B,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CACzD,CACF,CACF,CAAC"}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { ServiceLogger } from "@effect-aws/commons";
|
|
2
|
-
import { Effect,
|
|
2
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
3
3
|
import { dual } from "effect/Function";
|
|
4
|
-
import { globalValue } from "effect/GlobalValue";
|
|
5
4
|
/**
|
|
6
5
|
* @since 1.0.0
|
|
7
6
|
* @category sts service config
|
|
8
7
|
*/
|
|
9
|
-
const currentSTSServiceConfig =
|
|
8
|
+
const currentSTSServiceConfig = ServiceMap.Reference("@effect-aws/client-sts/currentSTSServiceConfig", { defaultValue: () => ({}) });
|
|
10
9
|
/**
|
|
11
10
|
* @since 1.0.0
|
|
12
11
|
* @category sts service config
|
|
13
12
|
*/
|
|
14
|
-
export const withSTSServiceConfig = dual(2, (effect, config) => Effect.
|
|
13
|
+
export const withSTSServiceConfig = dual(2, (effect, config) => Effect.provideService(effect, currentSTSServiceConfig, config));
|
|
15
14
|
/**
|
|
16
15
|
* @since 1.0.0
|
|
17
16
|
* @category sts service config
|
|
18
17
|
*/
|
|
19
|
-
export const setSTSServiceConfig = (config) => Layer.
|
|
18
|
+
export const setSTSServiceConfig = (config) => Layer.succeed(currentSTSServiceConfig, config);
|
|
20
19
|
/**
|
|
21
20
|
* @since 1.0.0
|
|
22
21
|
* @category adapters
|
|
23
22
|
*/
|
|
24
23
|
export const toSTSClientConfig = Effect.gen(function* () {
|
|
25
|
-
const { logger: serviceLogger, ...config } = yield*
|
|
24
|
+
const { logger: serviceLogger, ...config } = yield* currentSTSServiceConfig;
|
|
26
25
|
const logger = serviceLogger === true
|
|
27
26
|
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
|
28
27
|
: (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STSServiceConfig.js","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"STSServiceConfig.js","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC;;;GAGG;AACH,MAAM,uBAAuB,GAAG,UAAU,CAAC,SAAS,CAClD,gDAAgD,EAChD,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAC7B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAG7B,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAyB,EAA0B,EAAE,CAC7F,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAEjH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,uBAAuB,CAAC;IAE5E,MAAM,MAAM,GAAG,aAAa,KAAK,IAAI;QACnC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CAAC;QACzE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEzG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-aws/client-sts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "Effectful AWS STS client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,40 +16,34 @@
|
|
|
16
16
|
"homepage": "https://floydspace.github.io/effect-aws/docs/client-sts",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@aws-sdk/client-sts": "^3",
|
|
19
|
-
"@effect-aws/commons": "^0.
|
|
19
|
+
"@effect-aws/commons": "^1.0.0-beta.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"effect": ">=
|
|
22
|
+
"effect": ">=4.0.0 <5.0.0"
|
|
23
23
|
},
|
|
24
|
-
"main": "./dist/cjs/index.js",
|
|
25
24
|
"module": "./dist/esm/index.js",
|
|
26
25
|
"types": "./dist/dts/index.d.ts",
|
|
27
26
|
"exports": {
|
|
28
27
|
"./package.json": "./package.json",
|
|
29
28
|
".": {
|
|
30
29
|
"types": "./dist/dts/index.d.ts",
|
|
31
|
-
"import": "./dist/esm/index.js"
|
|
32
|
-
"default": "./dist/cjs/index.js"
|
|
30
|
+
"import": "./dist/esm/index.js"
|
|
33
31
|
},
|
|
34
32
|
"./Errors": {
|
|
35
33
|
"types": "./dist/dts/Errors.d.ts",
|
|
36
|
-
"import": "./dist/esm/Errors.js"
|
|
37
|
-
"default": "./dist/cjs/Errors.js"
|
|
34
|
+
"import": "./dist/esm/Errors.js"
|
|
38
35
|
},
|
|
39
36
|
"./STSClientInstance": {
|
|
40
37
|
"types": "./dist/dts/STSClientInstance.d.ts",
|
|
41
|
-
"import": "./dist/esm/STSClientInstance.js"
|
|
42
|
-
"default": "./dist/cjs/STSClientInstance.js"
|
|
38
|
+
"import": "./dist/esm/STSClientInstance.js"
|
|
43
39
|
},
|
|
44
40
|
"./STSService": {
|
|
45
41
|
"types": "./dist/dts/STSService.d.ts",
|
|
46
|
-
"import": "./dist/esm/STSService.js"
|
|
47
|
-
"default": "./dist/cjs/STSService.js"
|
|
42
|
+
"import": "./dist/esm/STSService.js"
|
|
48
43
|
},
|
|
49
44
|
"./STSServiceConfig": {
|
|
50
45
|
"types": "./dist/dts/STSServiceConfig.d.ts",
|
|
51
|
-
"import": "./dist/esm/STSServiceConfig.js"
|
|
52
|
-
"default": "./dist/cjs/STSServiceConfig.js"
|
|
46
|
+
"import": "./dist/esm/STSServiceConfig.js"
|
|
53
47
|
}
|
|
54
48
|
},
|
|
55
49
|
"typesVersions": {
|
package/src/STSClientInstance.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
4
|
import { STSClient } from "@aws-sdk/client-sts";
|
|
5
|
-
import {
|
|
5
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
6
6
|
import * as STSServiceConfig from "./STSServiceConfig.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @since 1.0.0
|
|
10
10
|
* @category tags
|
|
11
11
|
*/
|
|
12
|
-
export class STSClientInstance extends
|
|
12
|
+
export class STSClientInstance extends ServiceMap.Service<STSClientInstance, STSClient>()(
|
|
13
13
|
"@effect-aws/client-sts/STSClientInstance",
|
|
14
|
-
)
|
|
14
|
+
) {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @since 1.0.0
|
|
@@ -30,4 +30,4 @@ export const make = Effect.flatMap(
|
|
|
30
30
|
* @since 1.0.0
|
|
31
31
|
* @category layers
|
|
32
32
|
*/
|
|
33
|
-
export const layer = Layer.
|
|
33
|
+
export const layer = Layer.effect(STSClientInstance, make);
|
package/src/STSService.ts
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
42
42
|
import { Service } from "@effect-aws/commons";
|
|
43
43
|
import type { Cause } from "effect";
|
|
44
|
-
import { Effect, Layer } from "effect";
|
|
44
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
45
45
|
import type {
|
|
46
46
|
ExpiredTokenError,
|
|
47
47
|
ExpiredTradeInTokenError,
|
|
@@ -86,7 +86,7 @@ interface STSService$ {
|
|
|
86
86
|
options?: HttpHandlerOptions,
|
|
87
87
|
): Effect.Effect<
|
|
88
88
|
AssumeRoleCommandOutput,
|
|
89
|
-
| Cause.
|
|
89
|
+
| Cause.TimeoutError
|
|
90
90
|
| SdkError
|
|
91
91
|
| ExpiredTokenError
|
|
92
92
|
| MalformedPolicyDocumentError
|
|
@@ -102,7 +102,7 @@ interface STSService$ {
|
|
|
102
102
|
options?: HttpHandlerOptions,
|
|
103
103
|
): Effect.Effect<
|
|
104
104
|
AssumeRoleWithSAMLCommandOutput,
|
|
105
|
-
| Cause.
|
|
105
|
+
| Cause.TimeoutError
|
|
106
106
|
| SdkError
|
|
107
107
|
| ExpiredTokenError
|
|
108
108
|
| IDPRejectedClaimError
|
|
@@ -120,7 +120,7 @@ interface STSService$ {
|
|
|
120
120
|
options?: HttpHandlerOptions,
|
|
121
121
|
): Effect.Effect<
|
|
122
122
|
AssumeRoleWithWebIdentityCommandOutput,
|
|
123
|
-
| Cause.
|
|
123
|
+
| Cause.TimeoutError
|
|
124
124
|
| SdkError
|
|
125
125
|
| ExpiredTokenError
|
|
126
126
|
| IDPCommunicationError
|
|
@@ -139,7 +139,7 @@ interface STSService$ {
|
|
|
139
139
|
options?: HttpHandlerOptions,
|
|
140
140
|
): Effect.Effect<
|
|
141
141
|
AssumeRootCommandOutput,
|
|
142
|
-
Cause.
|
|
142
|
+
Cause.TimeoutError | SdkError | ExpiredTokenError | RegionDisabledError
|
|
143
143
|
>;
|
|
144
144
|
|
|
145
145
|
/**
|
|
@@ -150,7 +150,7 @@ interface STSService$ {
|
|
|
150
150
|
options?: HttpHandlerOptions,
|
|
151
151
|
): Effect.Effect<
|
|
152
152
|
DecodeAuthorizationMessageCommandOutput,
|
|
153
|
-
Cause.
|
|
153
|
+
Cause.TimeoutError | SdkError | InvalidAuthorizationMessageError
|
|
154
154
|
>;
|
|
155
155
|
|
|
156
156
|
/**
|
|
@@ -161,7 +161,7 @@ interface STSService$ {
|
|
|
161
161
|
options?: HttpHandlerOptions,
|
|
162
162
|
): Effect.Effect<
|
|
163
163
|
GetAccessKeyInfoCommandOutput,
|
|
164
|
-
Cause.
|
|
164
|
+
Cause.TimeoutError | SdkError
|
|
165
165
|
>;
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -172,7 +172,7 @@ interface STSService$ {
|
|
|
172
172
|
options?: HttpHandlerOptions,
|
|
173
173
|
): Effect.Effect<
|
|
174
174
|
GetCallerIdentityCommandOutput,
|
|
175
|
-
Cause.
|
|
175
|
+
Cause.TimeoutError | SdkError
|
|
176
176
|
>;
|
|
177
177
|
|
|
178
178
|
/**
|
|
@@ -183,7 +183,7 @@ interface STSService$ {
|
|
|
183
183
|
options?: HttpHandlerOptions,
|
|
184
184
|
): Effect.Effect<
|
|
185
185
|
GetDelegatedAccessTokenCommandOutput,
|
|
186
|
-
Cause.
|
|
186
|
+
Cause.TimeoutError | SdkError | ExpiredTradeInTokenError | PackedPolicyTooLargeError | RegionDisabledError
|
|
187
187
|
>;
|
|
188
188
|
|
|
189
189
|
/**
|
|
@@ -194,7 +194,7 @@ interface STSService$ {
|
|
|
194
194
|
options?: HttpHandlerOptions,
|
|
195
195
|
): Effect.Effect<
|
|
196
196
|
GetFederationTokenCommandOutput,
|
|
197
|
-
Cause.
|
|
197
|
+
Cause.TimeoutError | SdkError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError
|
|
198
198
|
>;
|
|
199
199
|
|
|
200
200
|
/**
|
|
@@ -205,7 +205,7 @@ interface STSService$ {
|
|
|
205
205
|
options?: HttpHandlerOptions,
|
|
206
206
|
): Effect.Effect<
|
|
207
207
|
GetSessionTokenCommandOutput,
|
|
208
|
-
Cause.
|
|
208
|
+
Cause.TimeoutError | SdkError | RegionDisabledError
|
|
209
209
|
>;
|
|
210
210
|
|
|
211
211
|
/**
|
|
@@ -216,7 +216,7 @@ interface STSService$ {
|
|
|
216
216
|
options?: HttpHandlerOptions,
|
|
217
217
|
): Effect.Effect<
|
|
218
218
|
GetWebIdentityTokenCommandOutput,
|
|
219
|
-
| Cause.
|
|
219
|
+
| Cause.TimeoutError
|
|
220
220
|
| SdkError
|
|
221
221
|
| JWTPayloadSizeExceededError
|
|
222
222
|
| OutboundWebIdentityFederationDisabledError
|
|
@@ -245,10 +245,10 @@ export const makeSTSService = Effect.gen(function*() {
|
|
|
245
245
|
* @since 1.0.0
|
|
246
246
|
* @category models
|
|
247
247
|
*/
|
|
248
|
-
export class STSService extends
|
|
248
|
+
export class STSService extends ServiceMap.Service<
|
|
249
249
|
STSService,
|
|
250
250
|
STSService$
|
|
251
|
-
>() {
|
|
251
|
+
>()("@effect-aws/client-sts/STSService") {
|
|
252
252
|
static readonly defaultLayer = Layer.effect(this, makeSTSService).pipe(Layer.provide(Instance.layer));
|
|
253
253
|
static readonly layer = (config: STSService.Config) =>
|
|
254
254
|
Layer.effect(this, makeSTSService).pipe(
|
package/src/STSServiceConfig.ts
CHANGED
|
@@ -3,18 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
5
|
import { ServiceLogger } from "@effect-aws/commons";
|
|
6
|
-
import { Effect,
|
|
6
|
+
import { Effect, Layer, ServiceMap } from "effect";
|
|
7
7
|
import { dual } from "effect/Function";
|
|
8
|
-
import { globalValue } from "effect/GlobalValue";
|
|
9
8
|
import type { STSService } from "./STSService.js";
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* @since 1.0.0
|
|
13
12
|
* @category sts service config
|
|
14
13
|
*/
|
|
15
|
-
const currentSTSServiceConfig =
|
|
14
|
+
const currentSTSServiceConfig = ServiceMap.Reference<STSService.Config>(
|
|
16
15
|
"@effect-aws/client-sts/currentSTSServiceConfig",
|
|
17
|
-
() =>
|
|
16
|
+
{ defaultValue: () => ({}) },
|
|
18
17
|
);
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -27,21 +26,21 @@ export const withSTSServiceConfig: {
|
|
|
27
26
|
} = dual(
|
|
28
27
|
2,
|
|
29
28
|
<A, E, R>(effect: Effect.Effect<A, E, R>, config: STSService.Config): Effect.Effect<A, E, R> =>
|
|
30
|
-
Effect.
|
|
29
|
+
Effect.provideService(effect, currentSTSServiceConfig, config),
|
|
31
30
|
);
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* @since 1.0.0
|
|
35
34
|
* @category sts service config
|
|
36
35
|
*/
|
|
37
|
-
export const setSTSServiceConfig = (config: STSService.Config) => Layer.
|
|
36
|
+
export const setSTSServiceConfig = (config: STSService.Config) => Layer.succeed(currentSTSServiceConfig, config);
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* @since 1.0.0
|
|
41
40
|
* @category adapters
|
|
42
41
|
*/
|
|
43
42
|
export const toSTSClientConfig: Effect.Effect<STSClientConfig> = Effect.gen(function*() {
|
|
44
|
-
const { logger: serviceLogger, ...config } = yield*
|
|
43
|
+
const { logger: serviceLogger, ...config } = yield* currentSTSServiceConfig;
|
|
45
44
|
|
|
46
45
|
const logger = serviceLogger === true
|
|
47
46
|
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
package/dist/cjs/Errors.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ExpiredTokenException, ExpiredTradeInTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, JWTPayloadSizeExceededException, MalformedPolicyDocumentException, OutboundWebIdentityFederationDisabledException, PackedPolicyTooLargeException, RegionDisabledException, SessionDurationEscalationException } from "@aws-sdk/client-sts";
|
|
2
|
-
import type { TaggedException } from "@effect-aws/commons";
|
|
3
|
-
export declare const AllServiceErrors: readonly ["ExpiredTokenException", "ExpiredTradeInTokenException", "IDPCommunicationErrorException", "IDPRejectedClaimException", "InvalidAuthorizationMessageException", "InvalidIdentityTokenException", "JWTPayloadSizeExceededException", "MalformedPolicyDocumentException", "OutboundWebIdentityFederationDisabledException", "PackedPolicyTooLargeException", "RegionDisabledException", "SessionDurationEscalationException"];
|
|
4
|
-
export type ExpiredTokenError = TaggedException<ExpiredTokenException>;
|
|
5
|
-
export type ExpiredTradeInTokenError = TaggedException<ExpiredTradeInTokenException>;
|
|
6
|
-
export type IDPCommunicationError = TaggedException<IDPCommunicationErrorException>;
|
|
7
|
-
export type IDPRejectedClaimError = TaggedException<IDPRejectedClaimException>;
|
|
8
|
-
export type InvalidAuthorizationMessageError = TaggedException<InvalidAuthorizationMessageException>;
|
|
9
|
-
export type InvalidIdentityTokenError = TaggedException<InvalidIdentityTokenException>;
|
|
10
|
-
export type JWTPayloadSizeExceededError = TaggedException<JWTPayloadSizeExceededException>;
|
|
11
|
-
export type MalformedPolicyDocumentError = TaggedException<MalformedPolicyDocumentException>;
|
|
12
|
-
export type OutboundWebIdentityFederationDisabledError = TaggedException<OutboundWebIdentityFederationDisabledException>;
|
|
13
|
-
export type PackedPolicyTooLargeError = TaggedException<PackedPolicyTooLargeException>;
|
|
14
|
-
export type RegionDisabledError = TaggedException<RegionDisabledException>;
|
|
15
|
-
export type SessionDurationEscalationError = TaggedException<SessionDurationEscalationException>;
|
|
16
|
-
export type SdkError = TaggedException<Error & {
|
|
17
|
-
name: "SdkError";
|
|
18
|
-
}>;
|
|
19
|
-
//# sourceMappingURL=Errors.d.ts.map
|
package/dist/cjs/Errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,oCAAoC,EACpC,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,8CAA8C,EAC9C,6BAA6B,EAC7B,uBAAuB,EACvB,kCAAkC,EACnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,gBAAgB,uaAanB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,4BAA4B,CAAC,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,8BAA8B,CAAC,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC/E,MAAM,MAAM,gCAAgC,GAAG,eAAe,CAAC,oCAAoC,CAAC,CAAC;AACrG,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACvF,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC,+BAA+B,CAAC,CAAC;AAC3F,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC,gCAAgC,CAAC,CAAC;AAC7F,MAAM,MAAM,0CAA0C,GAAG,eAAe,CACtE,8CAA8C,CAC/C,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACvF,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAC3E,MAAM,MAAM,8BAA8B,GAAG,eAAe,CAAC,kCAAkC,CAAC,CAAC;AACjG,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC"}
|
package/dist/cjs/Errors.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AllServiceErrors = void 0;
|
|
4
|
-
exports.AllServiceErrors = [
|
|
5
|
-
"ExpiredTokenException",
|
|
6
|
-
"ExpiredTradeInTokenException",
|
|
7
|
-
"IDPCommunicationErrorException",
|
|
8
|
-
"IDPRejectedClaimException",
|
|
9
|
-
"InvalidAuthorizationMessageException",
|
|
10
|
-
"InvalidIdentityTokenException",
|
|
11
|
-
"JWTPayloadSizeExceededException",
|
|
12
|
-
"MalformedPolicyDocumentException",
|
|
13
|
-
"OutboundWebIdentityFederationDisabledException",
|
|
14
|
-
"PackedPolicyTooLargeException",
|
|
15
|
-
"RegionDisabledException",
|
|
16
|
-
"SessionDurationEscalationException",
|
|
17
|
-
];
|
|
18
|
-
//# sourceMappingURL=Errors.js.map
|
package/dist/cjs/Errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;AAgBa,QAAA,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,8BAA8B;IAC9B,gCAAgC;IAChC,2BAA2B;IAC3B,sCAAsC;IACtC,+BAA+B;IAC/B,iCAAiC;IACjC,kCAAkC;IAClC,gDAAgD;IAChD,+BAA+B;IAC/B,yBAAyB;IACzB,oCAAoC;CAC5B,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import { STSClient } from "@aws-sdk/client-sts";
|
|
5
|
-
import { Context, Effect, Layer } from "effect";
|
|
6
|
-
declare const STSClientInstance_base: Context.TagClass<STSClientInstance, "@effect-aws/client-sts/STSClientInstance", STSClient>;
|
|
7
|
-
/**
|
|
8
|
-
* @since 1.0.0
|
|
9
|
-
* @category tags
|
|
10
|
-
*/
|
|
11
|
-
export declare class STSClientInstance extends STSClientInstance_base {
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @since 1.0.0
|
|
15
|
-
* @category constructors
|
|
16
|
-
*/
|
|
17
|
-
export declare const make: Effect.Effect<STSClient, never, import("effect/Scope").Scope>;
|
|
18
|
-
/**
|
|
19
|
-
* @since 1.0.0
|
|
20
|
-
* @category layers
|
|
21
|
-
*/
|
|
22
|
-
export declare const layer: Layer.Layer<STSClientInstance, never, never>;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=STSClientInstance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSClientInstance.d.ts","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;;AAGhD;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,sBAEN;CAAG;AAEpC;;;GAGG;AACH,eAAO,MAAM,IAAI,+DAOhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,8CAAwC,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.layer = exports.make = exports.STSClientInstance = void 0;
|
|
27
|
-
/**
|
|
28
|
-
* @since 1.0.0
|
|
29
|
-
*/
|
|
30
|
-
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
31
|
-
const effect_1 = require("effect");
|
|
32
|
-
const STSServiceConfig = __importStar(require("./STSServiceConfig.js"));
|
|
33
|
-
/**
|
|
34
|
-
* @since 1.0.0
|
|
35
|
-
* @category tags
|
|
36
|
-
*/
|
|
37
|
-
class STSClientInstance extends effect_1.Context.Tag("@effect-aws/client-sts/STSClientInstance")() {
|
|
38
|
-
}
|
|
39
|
-
exports.STSClientInstance = STSClientInstance;
|
|
40
|
-
/**
|
|
41
|
-
* @since 1.0.0
|
|
42
|
-
* @category constructors
|
|
43
|
-
*/
|
|
44
|
-
exports.make = effect_1.Effect.flatMap(STSServiceConfig.toSTSClientConfig, (config) => effect_1.Effect.acquireRelease(effect_1.Effect.sync(() => new client_sts_1.STSClient(config)), (client) => effect_1.Effect.sync(() => client.destroy())));
|
|
45
|
-
/**
|
|
46
|
-
* @since 1.0.0
|
|
47
|
-
* @category layers
|
|
48
|
-
*/
|
|
49
|
-
exports.layer = effect_1.Layer.scoped(STSClientInstance, exports.make);
|
|
50
|
-
//# sourceMappingURL=STSClientInstance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSClientInstance.js","sourceRoot":"","sources":["../../src/STSClientInstance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAAgD;AAChD,mCAAgD;AAChD,wEAA0D;AAE1D;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,gBAAO,CAAC,GAAG,CAChD,0CAA0C,CAC3C,EAAgC;CAAG;AAFpC,8CAEoC;AAEpC;;;GAGG;AACU,QAAA,IAAI,GAAG,eAAM,CAAC,OAAO,CAChC,gBAAgB,CAAC,iBAAiB,EAClC,CAAC,MAAM,EAAE,EAAE,CACT,eAAM,CAAC,cAAc,CACnB,eAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,sBAAS,CAAC,MAAM,CAAC,CAAC,EACxC,CAAC,MAAM,EAAE,EAAE,CAAC,eAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAChD,CACJ,CAAC;AAEF;;;GAGG;AACU,QAAA,KAAK,GAAG,cAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,YAAI,CAAC,CAAC"}
|
package/dist/cjs/STSService.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import { type AssumeRoleCommandInput, type AssumeRoleCommandOutput, type AssumeRoleWithSAMLCommandInput, type AssumeRoleWithSAMLCommandOutput, type AssumeRoleWithWebIdentityCommandInput, type AssumeRoleWithWebIdentityCommandOutput, type AssumeRootCommandInput, type AssumeRootCommandOutput, type DecodeAuthorizationMessageCommandInput, type DecodeAuthorizationMessageCommandOutput, type GetAccessKeyInfoCommandInput, type GetAccessKeyInfoCommandOutput, type GetCallerIdentityCommandInput, type GetCallerIdentityCommandOutput, type GetDelegatedAccessTokenCommandInput, type GetDelegatedAccessTokenCommandOutput, type GetFederationTokenCommandInput, type GetFederationTokenCommandOutput, type GetSessionTokenCommandInput, type GetSessionTokenCommandOutput, type GetWebIdentityTokenCommandInput, type GetWebIdentityTokenCommandOutput, type STSClient, type STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
|
-
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
6
|
-
import type { Cause } from "effect";
|
|
7
|
-
import { Effect, Layer } from "effect";
|
|
8
|
-
import type { ExpiredTokenError, ExpiredTradeInTokenError, IDPCommunicationError, IDPRejectedClaimError, InvalidAuthorizationMessageError, InvalidIdentityTokenError, JWTPayloadSizeExceededError, MalformedPolicyDocumentError, OutboundWebIdentityFederationDisabledError, PackedPolicyTooLargeError, RegionDisabledError, SdkError, SessionDurationEscalationError } from "./Errors.js";
|
|
9
|
-
import * as Instance from "./STSClientInstance.js";
|
|
10
|
-
interface STSService$ {
|
|
11
|
-
readonly _: unique symbol;
|
|
12
|
-
/**
|
|
13
|
-
* @see {@link AssumeRoleCommand}
|
|
14
|
-
*/
|
|
15
|
-
assumeRole(args: AssumeRoleCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleCommandOutput, Cause.TimeoutException | SdkError | ExpiredTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
16
|
-
/**
|
|
17
|
-
* @see {@link AssumeRoleWithSAMLCommand}
|
|
18
|
-
*/
|
|
19
|
-
assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithSAMLCommandOutput, Cause.TimeoutException | SdkError | ExpiredTokenError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
20
|
-
/**
|
|
21
|
-
* @see {@link AssumeRoleWithWebIdentityCommand}
|
|
22
|
-
*/
|
|
23
|
-
assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithWebIdentityCommandOutput, Cause.TimeoutException | SdkError | ExpiredTokenError | IDPCommunicationError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
24
|
-
/**
|
|
25
|
-
* @see {@link AssumeRootCommand}
|
|
26
|
-
*/
|
|
27
|
-
assumeRoot(args: AssumeRootCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRootCommandOutput, Cause.TimeoutException | SdkError | ExpiredTokenError | RegionDisabledError>;
|
|
28
|
-
/**
|
|
29
|
-
* @see {@link DecodeAuthorizationMessageCommand}
|
|
30
|
-
*/
|
|
31
|
-
decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: HttpHandlerOptions): Effect.Effect<DecodeAuthorizationMessageCommandOutput, Cause.TimeoutException | SdkError | InvalidAuthorizationMessageError>;
|
|
32
|
-
/**
|
|
33
|
-
* @see {@link GetAccessKeyInfoCommand}
|
|
34
|
-
*/
|
|
35
|
-
getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAccessKeyInfoCommandOutput, Cause.TimeoutException | SdkError>;
|
|
36
|
-
/**
|
|
37
|
-
* @see {@link GetCallerIdentityCommand}
|
|
38
|
-
*/
|
|
39
|
-
getCallerIdentity(args: GetCallerIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetCallerIdentityCommandOutput, Cause.TimeoutException | SdkError>;
|
|
40
|
-
/**
|
|
41
|
-
* @see {@link GetDelegatedAccessTokenCommand}
|
|
42
|
-
*/
|
|
43
|
-
getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetDelegatedAccessTokenCommandOutput, Cause.TimeoutException | SdkError | ExpiredTradeInTokenError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
44
|
-
/**
|
|
45
|
-
* @see {@link GetFederationTokenCommand}
|
|
46
|
-
*/
|
|
47
|
-
getFederationToken(args: GetFederationTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetFederationTokenCommandOutput, Cause.TimeoutException | SdkError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
48
|
-
/**
|
|
49
|
-
* @see {@link GetSessionTokenCommand}
|
|
50
|
-
*/
|
|
51
|
-
getSessionToken(args: GetSessionTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetSessionTokenCommandOutput, Cause.TimeoutException | SdkError | RegionDisabledError>;
|
|
52
|
-
/**
|
|
53
|
-
* @see {@link GetWebIdentityTokenCommand}
|
|
54
|
-
*/
|
|
55
|
-
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetWebIdentityTokenCommandOutput, Cause.TimeoutException | SdkError | JWTPayloadSizeExceededError | OutboundWebIdentityFederationDisabledError | SessionDurationEscalationError>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @since 1.0.0
|
|
59
|
-
* @category constructors
|
|
60
|
-
*/
|
|
61
|
-
export declare const makeSTSService: Effect.Effect<STSService$, never, Instance.STSClientInstance>;
|
|
62
|
-
declare const STSService_base: import("effect/Context").TagClass<STSService, "@effect-aws/client-sts/STSService", STSService$> & Effect.Tag.Proxy<STSService, STSService$> & {
|
|
63
|
-
use: <X>(body: (_: STSService$) => X) => [X] extends [Effect.Effect<infer A, infer E, infer R>] ? Effect.Effect<A, E, STSService | R> : [X] extends [PromiseLike<infer A_1>] ? Effect.Effect<A_1, Cause.UnknownException, STSService> : Effect.Effect<X, never, STSService>;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* @since 1.0.0
|
|
67
|
-
* @category models
|
|
68
|
-
*/
|
|
69
|
-
export declare class STSService extends STSService_base {
|
|
70
|
-
static readonly defaultLayer: Layer.Layer<STSService, never, never>;
|
|
71
|
-
static readonly layer: (config: STSService.Config) => Layer.Layer<STSService, never, never>;
|
|
72
|
-
static readonly baseLayer: (evaluate: (defaultConfig: STSClientConfig) => STSClient) => Layer.Layer<STSService, never, never>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* @since 1.0.0
|
|
76
|
-
*/
|
|
77
|
-
export declare namespace STSService {
|
|
78
|
-
/**
|
|
79
|
-
* @since 1.0.0
|
|
80
|
-
*/
|
|
81
|
-
interface Config extends Omit<STSClientConfig, "logger"> {
|
|
82
|
-
readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @since 1.0.0
|
|
86
|
-
*/
|
|
87
|
-
type Type = STSService$;
|
|
88
|
-
}
|
|
89
|
-
export {};
|
|
90
|
-
//# sourceMappingURL=STSService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSService.d.ts","sourceRoot":"","sources":["../../src/STSService.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AM,CAAC,QAAQ,CAAC,SAAS,aACb,CAAC,aAAa,EAAE,eAAe,KAAK,SAAS,2CASrD;CACL;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC;;OAEG;IACH,UAAiB,MAAO,SAAQ,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;QAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC;KACtE;IAED;;OAEG;IACH,KAAY,IAAI,GAAG,WAAW,CAAC;CAChC"}
|
package/dist/cjs/STSService.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.STSService = exports.makeSTSService = void 0;
|
|
27
|
-
/**
|
|
28
|
-
* @since 1.0.0
|
|
29
|
-
*/
|
|
30
|
-
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
31
|
-
const commons_1 = require("@effect-aws/commons");
|
|
32
|
-
const effect_1 = require("effect");
|
|
33
|
-
const Errors_js_1 = require("./Errors.js");
|
|
34
|
-
const Instance = __importStar(require("./STSClientInstance.js"));
|
|
35
|
-
const STSServiceConfig = __importStar(require("./STSServiceConfig.js"));
|
|
36
|
-
const commands = {
|
|
37
|
-
AssumeRoleCommand: client_sts_1.AssumeRoleCommand,
|
|
38
|
-
AssumeRoleWithSAMLCommand: client_sts_1.AssumeRoleWithSAMLCommand,
|
|
39
|
-
AssumeRoleWithWebIdentityCommand: client_sts_1.AssumeRoleWithWebIdentityCommand,
|
|
40
|
-
AssumeRootCommand: client_sts_1.AssumeRootCommand,
|
|
41
|
-
DecodeAuthorizationMessageCommand: client_sts_1.DecodeAuthorizationMessageCommand,
|
|
42
|
-
GetAccessKeyInfoCommand: client_sts_1.GetAccessKeyInfoCommand,
|
|
43
|
-
GetCallerIdentityCommand: client_sts_1.GetCallerIdentityCommand,
|
|
44
|
-
GetDelegatedAccessTokenCommand: client_sts_1.GetDelegatedAccessTokenCommand,
|
|
45
|
-
GetFederationTokenCommand: client_sts_1.GetFederationTokenCommand,
|
|
46
|
-
GetSessionTokenCommand: client_sts_1.GetSessionTokenCommand,
|
|
47
|
-
GetWebIdentityTokenCommand: client_sts_1.GetWebIdentityTokenCommand,
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @since 1.0.0
|
|
51
|
-
* @category constructors
|
|
52
|
-
*/
|
|
53
|
-
exports.makeSTSService = effect_1.Effect.gen(function* () {
|
|
54
|
-
const client = yield* Instance.STSClientInstance;
|
|
55
|
-
return yield* commons_1.Service.fromClientAndCommands(client, commands, {
|
|
56
|
-
errorTags: Errors_js_1.AllServiceErrors,
|
|
57
|
-
resolveClientConfig: STSServiceConfig.toSTSClientConfig,
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
/**
|
|
61
|
-
* @since 1.0.0
|
|
62
|
-
* @category models
|
|
63
|
-
*/
|
|
64
|
-
class STSService extends effect_1.Effect.Tag("@effect-aws/client-sts/STSService")() {
|
|
65
|
-
static defaultLayer = effect_1.Layer.effect(this, exports.makeSTSService).pipe(effect_1.Layer.provide(Instance.layer));
|
|
66
|
-
static layer = (config) => effect_1.Layer.effect(this, exports.makeSTSService).pipe(effect_1.Layer.provide(Instance.layer), effect_1.Layer.provide(STSServiceConfig.setSTSServiceConfig(config)));
|
|
67
|
-
static baseLayer = (evaluate) => effect_1.Layer.effect(this, exports.makeSTSService).pipe(effect_1.Layer.provide(effect_1.Layer.effect(Instance.STSClientInstance, effect_1.Effect.map(STSServiceConfig.toSTSClientConfig, evaluate))));
|
|
68
|
-
}
|
|
69
|
-
exports.STSService = STSService;
|
|
70
|
-
//# sourceMappingURL=STSService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSService.js","sourceRoot":"","sources":["../../src/STSService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAoC6B;AAE7B,iDAA8C;AAE9C,mCAAuC;AAgBvC,2CAA+C;AAC/C,iEAAmD;AACnD,wEAA0D;AAE1D,MAAM,QAAQ,GAAG;IACf,iBAAiB,EAAjB,8BAAiB;IACjB,yBAAyB,EAAzB,sCAAyB;IACzB,gCAAgC,EAAhC,6CAAgC;IAChC,iBAAiB,EAAjB,8BAAiB;IACjB,iCAAiC,EAAjC,8CAAiC;IACjC,uBAAuB,EAAvB,oCAAuB;IACvB,wBAAwB,EAAxB,qCAAwB;IACxB,8BAA8B,EAA9B,2CAA8B;IAC9B,yBAAyB,EAAzB,sCAAyB;IACzB,sBAAsB,EAAtB,mCAAsB;IACtB,0BAA0B,EAA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
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import type { STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
|
-
import { Effect, Layer } from "effect";
|
|
6
|
-
import type { STSService } from "./STSService.js";
|
|
7
|
-
/**
|
|
8
|
-
* @since 1.0.0
|
|
9
|
-
* @category sts service config
|
|
10
|
-
*/
|
|
11
|
-
export declare const withSTSServiceConfig: {
|
|
12
|
-
(config: STSService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
13
|
-
<A, E, R>(effect: Effect.Effect<A, E, R>, config: STSService.Config): Effect.Effect<A, E, R>;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* @since 1.0.0
|
|
17
|
-
* @category sts service config
|
|
18
|
-
*/
|
|
19
|
-
export declare const setSTSServiceConfig: (config: STSService.Config) => Layer.Layer<never, never, never>;
|
|
20
|
-
/**
|
|
21
|
-
* @since 1.0.0
|
|
22
|
-
* @category adapters
|
|
23
|
-
*/
|
|
24
|
-
export declare const toSTSClientConfig: Effect.Effect<STSClientConfig>;
|
|
25
|
-
//# sourceMappingURL=STSServiceConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSServiceConfig.d.ts","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAY,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAWlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE;IACjC,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACjG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAK9F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,WAAW,MAAM,qCAAyD,CAAC;AAEvH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAQ3D,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toSTSClientConfig = exports.setSTSServiceConfig = exports.withSTSServiceConfig = void 0;
|
|
4
|
-
const commons_1 = require("@effect-aws/commons");
|
|
5
|
-
const effect_1 = require("effect");
|
|
6
|
-
const Function_1 = require("effect/Function");
|
|
7
|
-
const GlobalValue_1 = require("effect/GlobalValue");
|
|
8
|
-
/**
|
|
9
|
-
* @since 1.0.0
|
|
10
|
-
* @category sts service config
|
|
11
|
-
*/
|
|
12
|
-
const currentSTSServiceConfig = (0, GlobalValue_1.globalValue)("@effect-aws/client-sts/currentSTSServiceConfig", () => effect_1.FiberRef.unsafeMake({}));
|
|
13
|
-
/**
|
|
14
|
-
* @since 1.0.0
|
|
15
|
-
* @category sts service config
|
|
16
|
-
*/
|
|
17
|
-
exports.withSTSServiceConfig = (0, Function_1.dual)(2, (effect, config) => effect_1.Effect.locally(effect, currentSTSServiceConfig, config));
|
|
18
|
-
/**
|
|
19
|
-
* @since 1.0.0
|
|
20
|
-
* @category sts service config
|
|
21
|
-
*/
|
|
22
|
-
const setSTSServiceConfig = (config) => effect_1.Layer.locallyScoped(currentSTSServiceConfig, config);
|
|
23
|
-
exports.setSTSServiceConfig = setSTSServiceConfig;
|
|
24
|
-
/**
|
|
25
|
-
* @since 1.0.0
|
|
26
|
-
* @category adapters
|
|
27
|
-
*/
|
|
28
|
-
exports.toSTSClientConfig = effect_1.Effect.gen(function* () {
|
|
29
|
-
const { logger: serviceLogger, ...config } = yield* effect_1.FiberRef.get(currentSTSServiceConfig);
|
|
30
|
-
const logger = serviceLogger === true
|
|
31
|
-
? yield* commons_1.ServiceLogger.toClientLogger(commons_1.ServiceLogger.defaultServiceLogger)
|
|
32
|
-
: (serviceLogger ? yield* commons_1.ServiceLogger.toClientLogger(commons_1.ServiceLogger.make(serviceLogger)) : undefined);
|
|
33
|
-
return { logger, ...config };
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=STSServiceConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"STSServiceConfig.js","sourceRoot":"","sources":["../../src/STSServiceConfig.ts"],"names":[],"mappings":";;;AAIA,iDAAoD;AACpD,mCAAiD;AACjD,8CAAuC;AACvC,oDAAiD;AAGjD;;;GAGG;AACH,MAAM,uBAAuB,GAAG,IAAA,yBAAW,EACzC,gDAAgD,EAChD,GAAG,EAAE,CAAC,iBAAQ,CAAC,UAAU,CAAoB,EAAE,CAAC,CACjD,CAAC;AAEF;;;GAGG;AACU,QAAA,oBAAoB,GAG7B,IAAA,eAAI,EACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAyB,EAA0B,EAAE,CAC7F,eAAM,CAAC,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CAC1D,CAAC;AAEF;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,cAAK,CAAC,aAAa,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAA1G,QAAA,mBAAmB,uBAAuF;AAEvH;;;GAGG;AACU,QAAA,iBAAiB,GAAmC,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,iBAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE1F,MAAM,MAAM,GAAG,aAAa,KAAK,IAAI;QACnC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAa,CAAC,cAAc,CAAC,uBAAa,CAAC,oBAAoB,CAAC;QACzE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAa,CAAC,cAAc,CAAC,uBAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEzG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import { STSService } from "./STSService.js";
|
|
5
|
-
/**
|
|
6
|
-
* @since 1.0.0
|
|
7
|
-
*/
|
|
8
|
-
export * from "./Errors.js";
|
|
9
|
-
/**
|
|
10
|
-
* @since 1.0.0
|
|
11
|
-
*/
|
|
12
|
-
export * as STSClientInstance from "./STSClientInstance.js";
|
|
13
|
-
/**
|
|
14
|
-
* @since 1.0.0
|
|
15
|
-
*/
|
|
16
|
-
export * as STSServiceConfig from "./STSServiceConfig.js";
|
|
17
|
-
/**
|
|
18
|
-
* @since 1.0.0
|
|
19
|
-
*/
|
|
20
|
-
export * from "./STSService.js";
|
|
21
|
-
/**
|
|
22
|
-
* @since 1.0.0
|
|
23
|
-
* @category exports
|
|
24
|
-
* @alias STSService
|
|
25
|
-
*/
|
|
26
|
-
export declare namespace STS {
|
|
27
|
-
/**
|
|
28
|
-
* @since 1.0.0
|
|
29
|
-
* @alias STSService.Config
|
|
30
|
-
*/
|
|
31
|
-
type Config = STSService.Config;
|
|
32
|
-
/**
|
|
33
|
-
* @since 1.0.0
|
|
34
|
-
* @alias STSService.Type
|
|
35
|
-
*/
|
|
36
|
-
type Type = STSService.Type;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @since 1.0.0
|
|
40
|
-
* @category exports
|
|
41
|
-
* @alias STSService
|
|
42
|
-
*/
|
|
43
|
-
export declare const STS: typeof STSService;
|
|
44
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,cAAc,iBAAiB,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B;;;OAGG;IACH,KAAY,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAEvC;;;OAGG;IACH,KAAY,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;CACpC;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,mBAAa,CAAC"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.STS = exports.STSServiceConfig = exports.STSClientInstance = void 0;
|
|
30
|
-
/**
|
|
31
|
-
* @since 1.0.0
|
|
32
|
-
*/
|
|
33
|
-
const STSService_js_1 = require("./STSService.js");
|
|
34
|
-
/**
|
|
35
|
-
* @since 1.0.0
|
|
36
|
-
*/
|
|
37
|
-
__exportStar(require("./Errors.js"), exports);
|
|
38
|
-
/**
|
|
39
|
-
* @since 1.0.0
|
|
40
|
-
*/
|
|
41
|
-
exports.STSClientInstance = __importStar(require("./STSClientInstance.js"));
|
|
42
|
-
/**
|
|
43
|
-
* @since 1.0.0
|
|
44
|
-
*/
|
|
45
|
-
exports.STSServiceConfig = __importStar(require("./STSServiceConfig.js"));
|
|
46
|
-
/**
|
|
47
|
-
* @since 1.0.0
|
|
48
|
-
*/
|
|
49
|
-
__exportStar(require("./STSService.js"), exports);
|
|
50
|
-
/**
|
|
51
|
-
* @since 1.0.0
|
|
52
|
-
* @category exports
|
|
53
|
-
* @alias STSService
|
|
54
|
-
*/
|
|
55
|
-
exports.STS = STSService_js_1.STSService;
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,mDAA6C;AAE7C;;GAEG;AACH,8CAA4B;AAE5B;;GAEG;AACH,4EAA4D;AAE5D;;GAEG;AACH,0EAA0D;AAE1D;;GAEG;AACH,kDAAgC;AAqBhC;;;;GAIG;AACU,QAAA,GAAG,GAAG,0BAAU,CAAC"}
|