@effect-aws/client-sts 1.3.0 → 1.9.3
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/Errors/package.json +6 -0
- package/STSClientInstance/package.json +6 -0
- package/STSService/package.json +6 -0
- package/STSServiceConfig/package.json +6 -0
- package/{lib → dist/cjs}/Errors.d.ts +6 -11
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +16 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/STSClientInstance.d.ts +24 -0
- package/dist/cjs/STSClientInstance.d.ts.map +1 -0
- package/dist/cjs/STSClientInstance.js +50 -0
- package/dist/cjs/STSClientInstance.js.map +1 -0
- package/dist/cjs/STSService.d.ts +77 -0
- package/dist/cjs/STSService.d.ts.map +1 -0
- package/dist/cjs/STSService.js +68 -0
- package/dist/cjs/STSService.js.map +1 -0
- package/dist/cjs/STSServiceConfig.d.ts +25 -0
- package/dist/cjs/STSServiceConfig.d.ts.map +1 -0
- package/dist/cjs/STSServiceConfig.js +35 -0
- package/dist/cjs/STSServiceConfig.js.map +1 -0
- package/dist/cjs/index.d.ts +39 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/Errors.d.ts +15 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/STSClientInstance.d.ts +24 -0
- package/dist/dts/STSClientInstance.d.ts.map +1 -0
- package/dist/dts/STSService.d.ts +77 -0
- package/dist/dts/STSService.d.ts.map +1 -0
- package/dist/dts/STSServiceConfig.d.ts +25 -0
- package/dist/dts/STSServiceConfig.d.ts.map +1 -0
- package/dist/dts/index.d.ts +39 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/esm/Errors.js +13 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/STSClientInstance.js +23 -0
- package/dist/esm/STSClientInstance.js.map +1 -0
- package/dist/esm/STSService.js +41 -0
- package/dist/esm/STSService.js.map +1 -0
- package/dist/esm/STSServiceConfig.js +31 -0
- package/dist/esm/STSServiceConfig.js.map +1 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +60 -43
- package/src/Errors.ts +35 -0
- package/src/STSClientInstance.ts +33 -0
- package/src/STSService.ts +234 -0
- package/src/STSServiceConfig.ts +51 -0
- package/src/index.ts +44 -0
- package/CHANGELOG.md +0 -41
- package/docgen.json +0 -8
- package/lib/Errors.js +0 -16
- package/lib/STSClientInstance.d.ts +0 -31
- package/lib/STSClientInstance.js +0 -57
- package/lib/STSClientInstanceConfig.d.ts +0 -23
- package/lib/STSClientInstanceConfig.js +0 -44
- package/lib/STSService.d.ts +0 -110
- package/lib/STSService.js +0 -97
- package/lib/esm/Errors.js +0 -13
- package/lib/esm/STSClientInstance.js +0 -30
- package/lib/esm/STSClientInstanceConfig.js +0 -40
- package/lib/esm/STSService.js +0 -93
- package/lib/esm/index.js +0 -5
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -21
- package/project.json +0 -77
- package/vitest.config.ts +0 -3
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException } from "@aws-sdk/client-sts";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
name: string;
|
|
6
|
-
}> = T & {
|
|
7
|
-
readonly _tag: T["name"];
|
|
8
|
-
};
|
|
2
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
3
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
4
|
+
export declare const AllServiceErrors: readonly ["ExpiredTokenException", "IDPCommunicationErrorException", "IDPRejectedClaimException", "InvalidAuthorizationMessageException", "InvalidIdentityTokenException", "MalformedPolicyDocumentException", "PackedPolicyTooLargeException", "RegionDisabledException"];
|
|
9
5
|
export type ExpiredTokenError = TaggedException<ExpiredTokenException>;
|
|
10
6
|
export type IDPCommunicationError = TaggedException<IDPCommunicationErrorException>;
|
|
11
7
|
export type IDPRejectedClaimError = TaggedException<IDPRejectedClaimException>;
|
|
@@ -14,7 +10,6 @@ export type InvalidIdentityTokenError = TaggedException<InvalidIdentityTokenExce
|
|
|
14
10
|
export type MalformedPolicyDocumentError = TaggedException<MalformedPolicyDocumentException>;
|
|
15
11
|
export type PackedPolicyTooLargeError = TaggedException<PackedPolicyTooLargeException>;
|
|
16
12
|
export type RegionDisabledError = TaggedException<RegionDisabledException>;
|
|
17
|
-
export type SdkError =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare const SdkError: Data.Case.Constructor<SdkError, "_tag">;
|
|
13
|
+
export type SdkError = CommonSdkError;
|
|
14
|
+
export declare const SdkError: import("effect/Data").Case.Constructor<CommonSdkError, "_tag">;
|
|
15
|
+
//# sourceMappingURL=Errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,oCAAoC,EACpC,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,eAAO,MAAM,gBAAgB,4QASnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,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,4BAA4B,GAAG,eAAe,CAAC,gCAAgC,CAAC,CAAC;AAC7F,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACvF,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAE3E,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC;AACtC,eAAO,MAAM,QAAQ,gEAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SdkError = exports.AllServiceErrors = void 0;
|
|
4
|
+
const commons_1 = require("@effect-aws/commons");
|
|
5
|
+
exports.AllServiceErrors = [
|
|
6
|
+
"ExpiredTokenException",
|
|
7
|
+
"IDPCommunicationErrorException",
|
|
8
|
+
"IDPRejectedClaimException",
|
|
9
|
+
"InvalidAuthorizationMessageException",
|
|
10
|
+
"InvalidIdentityTokenException",
|
|
11
|
+
"MalformedPolicyDocumentException",
|
|
12
|
+
"PackedPolicyTooLargeException",
|
|
13
|
+
"RegionDisabledException",
|
|
14
|
+
];
|
|
15
|
+
exports.SdkError = commons_1.SdkError;
|
|
16
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;AAWA,iDAAiE;AAEpD,QAAA,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,gCAAgC;IAChC,2BAA2B;IAC3B,sCAAsC;IACtC,+BAA+B;IAC/B,kCAAkC;IAClC,+BAA+B;IAC/B,yBAAyB;CACjB,CAAC;AAYE,QAAA,QAAQ,GAAG,kBAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 GetFederationTokenCommandInput, type GetFederationTokenCommandOutput, type GetSessionTokenCommandInput, type GetSessionTokenCommandOutput, type STSClient, type STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
|
+
import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, Layer } from "effect";
|
|
7
|
+
import type { ExpiredTokenError, IDPCommunicationError, IDPRejectedClaimError, InvalidAuthorizationMessageError, InvalidIdentityTokenError, MalformedPolicyDocumentError, PackedPolicyTooLargeError, RegionDisabledError } from "./Errors.js";
|
|
8
|
+
import * as Instance from "./STSClientInstance.js";
|
|
9
|
+
interface STSService$ {
|
|
10
|
+
readonly _: unique symbol;
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link AssumeRoleCommand}
|
|
13
|
+
*/
|
|
14
|
+
assumeRole(args: AssumeRoleCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleCommandOutput, SdkError | ExpiredTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link AssumeRoleWithSAMLCommand}
|
|
17
|
+
*/
|
|
18
|
+
assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithSAMLCommandOutput, SdkError | ExpiredTokenError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
19
|
+
/**
|
|
20
|
+
* @see {@link AssumeRoleWithWebIdentityCommand}
|
|
21
|
+
*/
|
|
22
|
+
assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithWebIdentityCommandOutput, SdkError | ExpiredTokenError | IDPCommunicationError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
23
|
+
/**
|
|
24
|
+
* @see {@link AssumeRootCommand}
|
|
25
|
+
*/
|
|
26
|
+
assumeRoot(args: AssumeRootCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRootCommandOutput, SdkError | ExpiredTokenError | RegionDisabledError>;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link DecodeAuthorizationMessageCommand}
|
|
29
|
+
*/
|
|
30
|
+
decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: HttpHandlerOptions): Effect.Effect<DecodeAuthorizationMessageCommandOutput, SdkError | InvalidAuthorizationMessageError>;
|
|
31
|
+
/**
|
|
32
|
+
* @see {@link GetAccessKeyInfoCommand}
|
|
33
|
+
*/
|
|
34
|
+
getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAccessKeyInfoCommandOutput, SdkError>;
|
|
35
|
+
/**
|
|
36
|
+
* @see {@link GetCallerIdentityCommand}
|
|
37
|
+
*/
|
|
38
|
+
getCallerIdentity(args: GetCallerIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetCallerIdentityCommandOutput, SdkError>;
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link GetFederationTokenCommand}
|
|
41
|
+
*/
|
|
42
|
+
getFederationToken(args: GetFederationTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetFederationTokenCommandOutput, SdkError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
43
|
+
/**
|
|
44
|
+
* @see {@link GetSessionTokenCommand}
|
|
45
|
+
*/
|
|
46
|
+
getSessionToken(args: GetSessionTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetSessionTokenCommandOutput, SdkError | RegionDisabledError>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category constructors
|
|
51
|
+
*/
|
|
52
|
+
export declare const makeSTSService: Effect.Effect<STSService$, never, Instance.STSClientInstance>;
|
|
53
|
+
declare const STSService_base: import("effect/Context").TagClass<STSService, "@effect-aws/client-sts/STSService", STSService$> & Effect.Tag.Proxy<STSService, STSService$> & {
|
|
54
|
+
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, import("effect/Cause").UnknownException, STSService> : Effect.Effect<X, never, STSService>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
* @category models
|
|
59
|
+
*/
|
|
60
|
+
export declare class STSService extends STSService_base {
|
|
61
|
+
static readonly defaultLayer: Layer.Layer<STSService, never, never>;
|
|
62
|
+
static readonly layer: (config: STSService.Config) => Layer.Layer<STSService, never, never>;
|
|
63
|
+
static readonly baseLayer: (evaluate: (defaultConfig: STSClientConfig) => STSClient) => Layer.Layer<STSService, never, never>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @since 1.0.0
|
|
67
|
+
*/
|
|
68
|
+
export declare namespace STSService {
|
|
69
|
+
/**
|
|
70
|
+
* @since 1.0.0
|
|
71
|
+
*/
|
|
72
|
+
interface Config extends Omit<STSClientConfig, "logger"> {
|
|
73
|
+
readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=STSService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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,CAAC;IAEF;;OAEG;IACH,eAAe,CACb,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,MAAM,CAAC,MAAM,CACd,4BAA4B,EAC5B,QAAQ,GAAG,mBAAmB,CAC/B,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,+DAWzB,CAAC;;;;AAEH;;;GAGG;AACH,qBAAa,UAAW,SAAQ,eAG7B;IACD,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;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
GetFederationTokenCommand: client_sts_1.GetFederationTokenCommand,
|
|
45
|
+
GetSessionTokenCommand: client_sts_1.GetSessionTokenCommand,
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @since 1.0.0
|
|
49
|
+
* @category constructors
|
|
50
|
+
*/
|
|
51
|
+
exports.makeSTSService = effect_1.Effect.gen(function* () {
|
|
52
|
+
const client = yield* Instance.STSClientInstance;
|
|
53
|
+
return commons_1.Service.fromClientAndCommands(client, commands, {
|
|
54
|
+
errorTags: Errors_js_1.AllServiceErrors,
|
|
55
|
+
resolveClientConfig: STSServiceConfig.toSTSClientConfig,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* @since 1.0.0
|
|
60
|
+
* @category models
|
|
61
|
+
*/
|
|
62
|
+
class STSService extends effect_1.Effect.Tag("@effect-aws/client-sts/STSService")() {
|
|
63
|
+
static defaultLayer = effect_1.Layer.effect(this, exports.makeSTSService).pipe(effect_1.Layer.provide(Instance.layer));
|
|
64
|
+
static layer = (config) => effect_1.Layer.effect(this, exports.makeSTSService).pipe(effect_1.Layer.provide(Instance.layer), effect_1.Layer.provide(STSServiceConfig.setSTSServiceConfig(config)));
|
|
65
|
+
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))));
|
|
66
|
+
}
|
|
67
|
+
exports.STSService = STSService;
|
|
68
|
+
//# sourceMappingURL=STSService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STSService.js","sourceRoot":"","sources":["../../src/STSService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDA8B6B;AAE7B,iDAA8C;AAC9C,mCAAuC;AAWvC,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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BAAiB,EAAE,QAAQ,CAAC,CACzD,CACF,CACF,CAAC;;AApBN,gCAqBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @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
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
* @category exports
|
|
36
|
+
* @alias STSService
|
|
37
|
+
*/
|
|
38
|
+
export declare const STS: typeof STSService;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;CACxC;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,mBAAa,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;AAehC;;;;GAIG;AACU,QAAA,GAAG,GAAG,0BAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException } from "@aws-sdk/client-sts";
|
|
2
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
3
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
4
|
+
export declare const AllServiceErrors: readonly ["ExpiredTokenException", "IDPCommunicationErrorException", "IDPRejectedClaimException", "InvalidAuthorizationMessageException", "InvalidIdentityTokenException", "MalformedPolicyDocumentException", "PackedPolicyTooLargeException", "RegionDisabledException"];
|
|
5
|
+
export type ExpiredTokenError = TaggedException<ExpiredTokenException>;
|
|
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 MalformedPolicyDocumentError = TaggedException<MalformedPolicyDocumentException>;
|
|
11
|
+
export type PackedPolicyTooLargeError = TaggedException<PackedPolicyTooLargeException>;
|
|
12
|
+
export type RegionDisabledError = TaggedException<RegionDisabledException>;
|
|
13
|
+
export type SdkError = CommonSdkError;
|
|
14
|
+
export declare const SdkError: import("effect/Data").Case.Constructor<CommonSdkError, "_tag">;
|
|
15
|
+
//# sourceMappingURL=Errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,oCAAoC,EACpC,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,eAAO,MAAM,gBAAgB,4QASnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,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,4BAA4B,GAAG,eAAe,CAAC,gCAAgC,CAAC,CAAC;AAC7F,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AACvF,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAE3E,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC;AACtC,eAAO,MAAM,QAAQ,gEAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 GetFederationTokenCommandInput, type GetFederationTokenCommandOutput, type GetSessionTokenCommandInput, type GetSessionTokenCommandOutput, type STSClient, type STSClientConfig } from "@aws-sdk/client-sts";
|
|
5
|
+
import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, Layer } from "effect";
|
|
7
|
+
import type { ExpiredTokenError, IDPCommunicationError, IDPRejectedClaimError, InvalidAuthorizationMessageError, InvalidIdentityTokenError, MalformedPolicyDocumentError, PackedPolicyTooLargeError, RegionDisabledError } from "./Errors.js";
|
|
8
|
+
import * as Instance from "./STSClientInstance.js";
|
|
9
|
+
interface STSService$ {
|
|
10
|
+
readonly _: unique symbol;
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link AssumeRoleCommand}
|
|
13
|
+
*/
|
|
14
|
+
assumeRole(args: AssumeRoleCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleCommandOutput, SdkError | ExpiredTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link AssumeRoleWithSAMLCommand}
|
|
17
|
+
*/
|
|
18
|
+
assumeRoleWithSAML(args: AssumeRoleWithSAMLCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithSAMLCommandOutput, SdkError | ExpiredTokenError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
19
|
+
/**
|
|
20
|
+
* @see {@link AssumeRoleWithWebIdentityCommand}
|
|
21
|
+
*/
|
|
22
|
+
assumeRoleWithWebIdentity(args: AssumeRoleWithWebIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRoleWithWebIdentityCommandOutput, SdkError | ExpiredTokenError | IDPCommunicationError | IDPRejectedClaimError | InvalidIdentityTokenError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
23
|
+
/**
|
|
24
|
+
* @see {@link AssumeRootCommand}
|
|
25
|
+
*/
|
|
26
|
+
assumeRoot(args: AssumeRootCommandInput, options?: HttpHandlerOptions): Effect.Effect<AssumeRootCommandOutput, SdkError | ExpiredTokenError | RegionDisabledError>;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link DecodeAuthorizationMessageCommand}
|
|
29
|
+
*/
|
|
30
|
+
decodeAuthorizationMessage(args: DecodeAuthorizationMessageCommandInput, options?: HttpHandlerOptions): Effect.Effect<DecodeAuthorizationMessageCommandOutput, SdkError | InvalidAuthorizationMessageError>;
|
|
31
|
+
/**
|
|
32
|
+
* @see {@link GetAccessKeyInfoCommand}
|
|
33
|
+
*/
|
|
34
|
+
getAccessKeyInfo(args: GetAccessKeyInfoCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAccessKeyInfoCommandOutput, SdkError>;
|
|
35
|
+
/**
|
|
36
|
+
* @see {@link GetCallerIdentityCommand}
|
|
37
|
+
*/
|
|
38
|
+
getCallerIdentity(args: GetCallerIdentityCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetCallerIdentityCommandOutput, SdkError>;
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link GetFederationTokenCommand}
|
|
41
|
+
*/
|
|
42
|
+
getFederationToken(args: GetFederationTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetFederationTokenCommandOutput, SdkError | MalformedPolicyDocumentError | PackedPolicyTooLargeError | RegionDisabledError>;
|
|
43
|
+
/**
|
|
44
|
+
* @see {@link GetSessionTokenCommand}
|
|
45
|
+
*/
|
|
46
|
+
getSessionToken(args: GetSessionTokenCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetSessionTokenCommandOutput, SdkError | RegionDisabledError>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category constructors
|
|
51
|
+
*/
|
|
52
|
+
export declare const makeSTSService: Effect.Effect<STSService$, never, Instance.STSClientInstance>;
|
|
53
|
+
declare const STSService_base: import("effect/Context").TagClass<STSService, "@effect-aws/client-sts/STSService", STSService$> & Effect.Tag.Proxy<STSService, STSService$> & {
|
|
54
|
+
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, import("effect/Cause").UnknownException, STSService> : Effect.Effect<X, never, STSService>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
* @category models
|
|
59
|
+
*/
|
|
60
|
+
export declare class STSService extends STSService_base {
|
|
61
|
+
static readonly defaultLayer: Layer.Layer<STSService, never, never>;
|
|
62
|
+
static readonly layer: (config: STSService.Config) => Layer.Layer<STSService, never, never>;
|
|
63
|
+
static readonly baseLayer: (evaluate: (defaultConfig: STSClientConfig) => STSClient) => Layer.Layer<STSService, never, never>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @since 1.0.0
|
|
67
|
+
*/
|
|
68
|
+
export declare namespace STSService {
|
|
69
|
+
/**
|
|
70
|
+
* @since 1.0.0
|
|
71
|
+
*/
|
|
72
|
+
interface Config extends Omit<STSClientConfig, "logger"> {
|
|
73
|
+
readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=STSService.d.ts.map
|