@effect-aws/client-account 1.2.0 → 1.9.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/AccountClientInstance/package.json +6 -0
- package/AccountService/package.json +6 -0
- package/AccountServiceConfig/package.json +6 -0
- package/Errors/package.json +6 -0
- package/dist/cjs/AccountClientInstance.d.ts +24 -0
- package/dist/cjs/AccountClientInstance.d.ts.map +1 -0
- package/dist/cjs/AccountClientInstance.js +50 -0
- package/dist/cjs/AccountClientInstance.js.map +1 -0
- package/{lib → dist/cjs}/AccountService.d.ts +16 -38
- package/dist/cjs/AccountService.d.ts.map +1 -0
- package/dist/cjs/AccountService.js +68 -0
- package/dist/cjs/AccountService.js.map +1 -0
- package/dist/cjs/AccountServiceConfig.d.ts +25 -0
- package/dist/cjs/AccountServiceConfig.d.ts.map +1 -0
- package/dist/cjs/AccountServiceConfig.js +35 -0
- package/dist/cjs/AccountServiceConfig.js.map +1 -0
- package/{lib → dist/cjs}/Errors.d.ts +6 -11
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +14 -0
- package/dist/cjs/Errors.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/AccountClientInstance.d.ts +24 -0
- package/dist/dts/AccountClientInstance.d.ts.map +1 -0
- package/dist/dts/AccountService.d.ts +103 -0
- package/dist/dts/AccountService.d.ts.map +1 -0
- package/dist/dts/AccountServiceConfig.d.ts +25 -0
- package/dist/dts/AccountServiceConfig.d.ts.map +1 -0
- package/dist/dts/Errors.d.ts +13 -0
- package/dist/dts/Errors.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/AccountClientInstance.js +23 -0
- package/dist/esm/AccountClientInstance.js.map +1 -0
- package/dist/esm/AccountService.js +41 -0
- package/dist/esm/AccountService.js.map +1 -0
- package/dist/esm/AccountServiceConfig.js +31 -0
- package/dist/esm/AccountServiceConfig.js.map +1 -0
- package/dist/esm/Errors.js +11 -0
- package/dist/esm/Errors.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/AccountClientInstance.ts +33 -0
- package/src/AccountService.ts +269 -0
- package/src/AccountServiceConfig.ts +52 -0
- package/src/Errors.ts +29 -0
- package/src/index.ts +44 -0
- package/CHANGELOG.md +0 -35
- package/docgen.json +0 -8
- package/lib/AccountClientInstance.d.ts +0 -31
- package/lib/AccountClientInstance.js +0 -57
- package/lib/AccountClientInstanceConfig.d.ts +0 -23
- package/lib/AccountClientInstanceConfig.js +0 -44
- package/lib/AccountService.js +0 -100
- package/lib/Errors.js +0 -14
- package/lib/esm/AccountClientInstance.js +0 -30
- package/lib/esm/AccountClientInstanceConfig.js +0 -40
- package/lib/esm/AccountService.js +0 -96
- package/lib/esm/Errors.js +0 -11
- 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
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
AcceptPrimaryEmailUpdateCommand,
|
|
6
|
+
type AcceptPrimaryEmailUpdateCommandInput,
|
|
7
|
+
type AcceptPrimaryEmailUpdateCommandOutput,
|
|
8
|
+
type AccountClient,
|
|
9
|
+
type AccountClientConfig,
|
|
10
|
+
DeleteAlternateContactCommand,
|
|
11
|
+
type DeleteAlternateContactCommandInput,
|
|
12
|
+
type DeleteAlternateContactCommandOutput,
|
|
13
|
+
DisableRegionCommand,
|
|
14
|
+
type DisableRegionCommandInput,
|
|
15
|
+
type DisableRegionCommandOutput,
|
|
16
|
+
EnableRegionCommand,
|
|
17
|
+
type EnableRegionCommandInput,
|
|
18
|
+
type EnableRegionCommandOutput,
|
|
19
|
+
GetAlternateContactCommand,
|
|
20
|
+
type GetAlternateContactCommandInput,
|
|
21
|
+
type GetAlternateContactCommandOutput,
|
|
22
|
+
GetContactInformationCommand,
|
|
23
|
+
type GetContactInformationCommandInput,
|
|
24
|
+
type GetContactInformationCommandOutput,
|
|
25
|
+
GetPrimaryEmailCommand,
|
|
26
|
+
type GetPrimaryEmailCommandInput,
|
|
27
|
+
type GetPrimaryEmailCommandOutput,
|
|
28
|
+
GetRegionOptStatusCommand,
|
|
29
|
+
type GetRegionOptStatusCommandInput,
|
|
30
|
+
type GetRegionOptStatusCommandOutput,
|
|
31
|
+
ListRegionsCommand,
|
|
32
|
+
type ListRegionsCommandInput,
|
|
33
|
+
type ListRegionsCommandOutput,
|
|
34
|
+
PutAlternateContactCommand,
|
|
35
|
+
type PutAlternateContactCommandInput,
|
|
36
|
+
type PutAlternateContactCommandOutput,
|
|
37
|
+
PutContactInformationCommand,
|
|
38
|
+
type PutContactInformationCommandInput,
|
|
39
|
+
type PutContactInformationCommandOutput,
|
|
40
|
+
StartPrimaryEmailUpdateCommand,
|
|
41
|
+
type StartPrimaryEmailUpdateCommandInput,
|
|
42
|
+
type StartPrimaryEmailUpdateCommandOutput,
|
|
43
|
+
} from "@aws-sdk/client-account";
|
|
44
|
+
import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
|
|
45
|
+
import { Service } from "@effect-aws/commons";
|
|
46
|
+
import { Effect, Layer } from "effect";
|
|
47
|
+
import * as Instance from "./AccountClientInstance.js";
|
|
48
|
+
import * as AccountServiceConfig from "./AccountServiceConfig.js";
|
|
49
|
+
import type {
|
|
50
|
+
AccessDeniedError,
|
|
51
|
+
ConflictError,
|
|
52
|
+
InternalServerError,
|
|
53
|
+
ResourceNotFoundError,
|
|
54
|
+
TooManyRequestsError,
|
|
55
|
+
ValidationError,
|
|
56
|
+
} from "./Errors.js";
|
|
57
|
+
import { AllServiceErrors } from "./Errors.js";
|
|
58
|
+
|
|
59
|
+
const commands = {
|
|
60
|
+
AcceptPrimaryEmailUpdateCommand,
|
|
61
|
+
DeleteAlternateContactCommand,
|
|
62
|
+
DisableRegionCommand,
|
|
63
|
+
EnableRegionCommand,
|
|
64
|
+
GetAlternateContactCommand,
|
|
65
|
+
GetContactInformationCommand,
|
|
66
|
+
GetPrimaryEmailCommand,
|
|
67
|
+
GetRegionOptStatusCommand,
|
|
68
|
+
ListRegionsCommand,
|
|
69
|
+
PutAlternateContactCommand,
|
|
70
|
+
PutContactInformationCommand,
|
|
71
|
+
StartPrimaryEmailUpdateCommand,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
interface AccountService$ {
|
|
75
|
+
readonly _: unique symbol;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @see {@link AcceptPrimaryEmailUpdateCommand}
|
|
79
|
+
*/
|
|
80
|
+
acceptPrimaryEmailUpdate(
|
|
81
|
+
args: AcceptPrimaryEmailUpdateCommandInput,
|
|
82
|
+
options?: HttpHandlerOptions,
|
|
83
|
+
): Effect.Effect<
|
|
84
|
+
AcceptPrimaryEmailUpdateCommandOutput,
|
|
85
|
+
| SdkError
|
|
86
|
+
| AccessDeniedError
|
|
87
|
+
| ConflictError
|
|
88
|
+
| InternalServerError
|
|
89
|
+
| ResourceNotFoundError
|
|
90
|
+
| TooManyRequestsError
|
|
91
|
+
| ValidationError
|
|
92
|
+
>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @see {@link DeleteAlternateContactCommand}
|
|
96
|
+
*/
|
|
97
|
+
deleteAlternateContact(
|
|
98
|
+
args: DeleteAlternateContactCommandInput,
|
|
99
|
+
options?: HttpHandlerOptions,
|
|
100
|
+
): Effect.Effect<
|
|
101
|
+
DeleteAlternateContactCommandOutput,
|
|
102
|
+
SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @see {@link DisableRegionCommand}
|
|
107
|
+
*/
|
|
108
|
+
disableRegion(
|
|
109
|
+
args: DisableRegionCommandInput,
|
|
110
|
+
options?: HttpHandlerOptions,
|
|
111
|
+
): Effect.Effect<
|
|
112
|
+
DisableRegionCommandOutput,
|
|
113
|
+
SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError
|
|
114
|
+
>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @see {@link EnableRegionCommand}
|
|
118
|
+
*/
|
|
119
|
+
enableRegion(
|
|
120
|
+
args: EnableRegionCommandInput,
|
|
121
|
+
options?: HttpHandlerOptions,
|
|
122
|
+
): Effect.Effect<
|
|
123
|
+
EnableRegionCommandOutput,
|
|
124
|
+
SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError
|
|
125
|
+
>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @see {@link GetAlternateContactCommand}
|
|
129
|
+
*/
|
|
130
|
+
getAlternateContact(
|
|
131
|
+
args: GetAlternateContactCommandInput,
|
|
132
|
+
options?: HttpHandlerOptions,
|
|
133
|
+
): Effect.Effect<
|
|
134
|
+
GetAlternateContactCommandOutput,
|
|
135
|
+
SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
|
|
136
|
+
>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @see {@link GetContactInformationCommand}
|
|
140
|
+
*/
|
|
141
|
+
getContactInformation(
|
|
142
|
+
args: GetContactInformationCommandInput,
|
|
143
|
+
options?: HttpHandlerOptions,
|
|
144
|
+
): Effect.Effect<
|
|
145
|
+
GetContactInformationCommandOutput,
|
|
146
|
+
SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
|
|
147
|
+
>;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @see {@link GetPrimaryEmailCommand}
|
|
151
|
+
*/
|
|
152
|
+
getPrimaryEmail(
|
|
153
|
+
args: GetPrimaryEmailCommandInput,
|
|
154
|
+
options?: HttpHandlerOptions,
|
|
155
|
+
): Effect.Effect<
|
|
156
|
+
GetPrimaryEmailCommandOutput,
|
|
157
|
+
SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
|
|
158
|
+
>;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @see {@link GetRegionOptStatusCommand}
|
|
162
|
+
*/
|
|
163
|
+
getRegionOptStatus(
|
|
164
|
+
args: GetRegionOptStatusCommandInput,
|
|
165
|
+
options?: HttpHandlerOptions,
|
|
166
|
+
): Effect.Effect<
|
|
167
|
+
GetRegionOptStatusCommandOutput,
|
|
168
|
+
SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
|
|
169
|
+
>;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @see {@link ListRegionsCommand}
|
|
173
|
+
*/
|
|
174
|
+
listRegions(
|
|
175
|
+
args: ListRegionsCommandInput,
|
|
176
|
+
options?: HttpHandlerOptions,
|
|
177
|
+
): Effect.Effect<
|
|
178
|
+
ListRegionsCommandOutput,
|
|
179
|
+
SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
|
|
180
|
+
>;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @see {@link PutAlternateContactCommand}
|
|
184
|
+
*/
|
|
185
|
+
putAlternateContact(
|
|
186
|
+
args: PutAlternateContactCommandInput,
|
|
187
|
+
options?: HttpHandlerOptions,
|
|
188
|
+
): Effect.Effect<
|
|
189
|
+
PutAlternateContactCommandOutput,
|
|
190
|
+
SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
|
|
191
|
+
>;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @see {@link PutContactInformationCommand}
|
|
195
|
+
*/
|
|
196
|
+
putContactInformation(
|
|
197
|
+
args: PutContactInformationCommandInput,
|
|
198
|
+
options?: HttpHandlerOptions,
|
|
199
|
+
): Effect.Effect<
|
|
200
|
+
PutContactInformationCommandOutput,
|
|
201
|
+
SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
|
|
202
|
+
>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @see {@link StartPrimaryEmailUpdateCommand}
|
|
206
|
+
*/
|
|
207
|
+
startPrimaryEmailUpdate(
|
|
208
|
+
args: StartPrimaryEmailUpdateCommandInput,
|
|
209
|
+
options?: HttpHandlerOptions,
|
|
210
|
+
): Effect.Effect<
|
|
211
|
+
StartPrimaryEmailUpdateCommandOutput,
|
|
212
|
+
| SdkError
|
|
213
|
+
| AccessDeniedError
|
|
214
|
+
| ConflictError
|
|
215
|
+
| InternalServerError
|
|
216
|
+
| ResourceNotFoundError
|
|
217
|
+
| TooManyRequestsError
|
|
218
|
+
| ValidationError
|
|
219
|
+
>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @since 1.0.0
|
|
224
|
+
* @category constructors
|
|
225
|
+
*/
|
|
226
|
+
export const makeAccountService = Effect.gen(function*() {
|
|
227
|
+
const client = yield* Instance.AccountClientInstance;
|
|
228
|
+
|
|
229
|
+
return Service.fromClientAndCommands<AccountService$>(client, commands, AllServiceErrors);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @since 1.0.0
|
|
234
|
+
* @category models
|
|
235
|
+
*/
|
|
236
|
+
export class AccountService extends Effect.Tag("@effect-aws/client-account/AccountService")<
|
|
237
|
+
AccountService,
|
|
238
|
+
AccountService$
|
|
239
|
+
>() {
|
|
240
|
+
static readonly defaultLayer = Layer.effect(this, makeAccountService).pipe(Layer.provide(Instance.layer));
|
|
241
|
+
static readonly layer = (config: AccountService.Config) =>
|
|
242
|
+
Layer.effect(this, makeAccountService).pipe(
|
|
243
|
+
Layer.provide(Instance.layer),
|
|
244
|
+
Layer.provide(AccountServiceConfig.setAccountServiceConfig(config)),
|
|
245
|
+
);
|
|
246
|
+
static readonly baseLayer = (
|
|
247
|
+
evaluate: (defaultConfig: AccountClientConfig) => AccountClient,
|
|
248
|
+
) =>
|
|
249
|
+
Layer.effect(this, makeAccountService).pipe(
|
|
250
|
+
Layer.provide(
|
|
251
|
+
Layer.effect(
|
|
252
|
+
Instance.AccountClientInstance,
|
|
253
|
+
Effect.map(AccountServiceConfig.toAccountClientConfig, evaluate),
|
|
254
|
+
),
|
|
255
|
+
),
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @since 1.0.0
|
|
261
|
+
*/
|
|
262
|
+
export declare namespace AccountService {
|
|
263
|
+
/**
|
|
264
|
+
* @since 1.0.0
|
|
265
|
+
*/
|
|
266
|
+
export interface Config extends Omit<AccountClientConfig, "logger"> {
|
|
267
|
+
readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type { AccountClientConfig } from "@aws-sdk/client-account";
|
|
5
|
+
import { ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, FiberRef, Layer } from "effect";
|
|
7
|
+
import { dual } from "effect/Function";
|
|
8
|
+
import { globalValue } from "effect/GlobalValue";
|
|
9
|
+
import type { AccountService } from "./AccountService.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category account service config
|
|
14
|
+
*/
|
|
15
|
+
const currentAccountServiceConfig = globalValue(
|
|
16
|
+
"@effect-aws/client-account/currentAccountServiceConfig",
|
|
17
|
+
() => FiberRef.unsafeMake<AccountService.Config>({}),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category account service config
|
|
23
|
+
*/
|
|
24
|
+
export const withAccountServiceConfig: {
|
|
25
|
+
(config: AccountService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
26
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: AccountService.Config): Effect.Effect<A, E, R>;
|
|
27
|
+
} = dual(
|
|
28
|
+
2,
|
|
29
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: AccountService.Config): Effect.Effect<A, E, R> =>
|
|
30
|
+
Effect.locally(effect, currentAccountServiceConfig, config),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
* @category account service config
|
|
36
|
+
*/
|
|
37
|
+
export const setAccountServiceConfig = (config: AccountService.Config) =>
|
|
38
|
+
Layer.locallyScoped(currentAccountServiceConfig, config);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
* @category adapters
|
|
43
|
+
*/
|
|
44
|
+
export const toAccountClientConfig: Effect.Effect<AccountClientConfig> = Effect.gen(function*() {
|
|
45
|
+
const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentAccountServiceConfig);
|
|
46
|
+
|
|
47
|
+
const logger = serviceLogger === true
|
|
48
|
+
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
|
49
|
+
: (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
|
|
50
|
+
|
|
51
|
+
return { logger, ...config };
|
|
52
|
+
});
|
package/src/Errors.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccessDeniedException,
|
|
3
|
+
ConflictException,
|
|
4
|
+
InternalServerException,
|
|
5
|
+
ResourceNotFoundException,
|
|
6
|
+
TooManyRequestsException,
|
|
7
|
+
ValidationException,
|
|
8
|
+
} from "@aws-sdk/client-account";
|
|
9
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
10
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
11
|
+
|
|
12
|
+
export const AllServiceErrors = [
|
|
13
|
+
"AccessDeniedException",
|
|
14
|
+
"ConflictException",
|
|
15
|
+
"InternalServerException",
|
|
16
|
+
"ResourceNotFoundException",
|
|
17
|
+
"TooManyRequestsException",
|
|
18
|
+
"ValidationException",
|
|
19
|
+
] as const;
|
|
20
|
+
|
|
21
|
+
export type AccessDeniedError = TaggedException<AccessDeniedException>;
|
|
22
|
+
export type ConflictError = TaggedException<ConflictException>;
|
|
23
|
+
export type InternalServerError = TaggedException<InternalServerException>;
|
|
24
|
+
export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
|
|
25
|
+
export type TooManyRequestsError = TaggedException<TooManyRequestsException>;
|
|
26
|
+
export type ValidationError = TaggedException<ValidationException>;
|
|
27
|
+
|
|
28
|
+
export type SdkError = CommonSdkError;
|
|
29
|
+
export const SdkError = CommonSdkError;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { AccountService } from "./AccountService.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from "./Errors.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
export * as AccountClientInstance from "./AccountClientInstance.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
export * as AccountServiceConfig from "./AccountServiceConfig.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export * from "./AccountService.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category exports
|
|
29
|
+
* @alias AccountService
|
|
30
|
+
*/
|
|
31
|
+
export declare namespace Account {
|
|
32
|
+
/**
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @alias AccountService.Config
|
|
35
|
+
*/
|
|
36
|
+
export type Config = AccountService.Config;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @since 1.0.0
|
|
41
|
+
* @category exports
|
|
42
|
+
* @alias AccountService
|
|
43
|
+
*/
|
|
44
|
+
export const Account = AccountService;
|
package/CHANGELOG.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# @effect-aws/client-account
|
|
2
|
-
|
|
3
|
-
## 1.2.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#93](https://github.com/floydspace/effect-aws/pull/93) [`a96fbd8`](https://github.com/floydspace/effect-aws/commit/a96fbd8840a7a6cfb795a2a6ab96aa32d32a3525) Thanks [@godu](https://github.com/godu)! - Destroy client after layer lifecycle to release idle connections.
|
|
8
|
-
|
|
9
|
-
## 1.1.0
|
|
10
|
-
|
|
11
|
-
### Minor Changes
|
|
12
|
-
|
|
13
|
-
- [#80](https://github.com/floydspace/effect-aws/pull/80) [`4b16fbe`](https://github.com/floydspace/effect-aws/commit/4b16fbebce8131df7798ee92f43cf6b7df3e907c) Thanks [@floydspace](https://github.com/floydspace)! - simplify layers configuration (closes #78)
|
|
14
|
-
|
|
15
|
-
## 1.0.1
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- [#75](https://github.com/floydspace/effect-aws/pull/75) [`9dc170d`](https://github.com/floydspace/effect-aws/commit/9dc170d975c04888bbc7ca7b241b4b5265668fb5) Thanks [@godu](https://github.com/godu)! - export the HttpHandlerOptions type
|
|
20
|
-
|
|
21
|
-
## 1.0.0
|
|
22
|
-
|
|
23
|
-
### Major Changes
|
|
24
|
-
|
|
25
|
-
- [#69](https://github.com/floydspace/effect-aws/pull/69) [`0cf6af5`](https://github.com/floydspace/effect-aws/commit/0cf6af591e45f0d8838b26493525db5ef389a90f) Thanks [@godu](https://github.com/godu)! - implement effectful account client
|
|
26
|
-
implement effectful cloudtrail client
|
|
27
|
-
implement effectful cloudwatch client
|
|
28
|
-
implement effectful cloudwatch-events client
|
|
29
|
-
implement effectful cloudwatch-logs client
|
|
30
|
-
implement effectful cognito-identity-provider client
|
|
31
|
-
implement effectful kms client
|
|
32
|
-
implement effectful mq client
|
|
33
|
-
implement effectful cloudsearch client
|
|
34
|
-
implement effectful rds client
|
|
35
|
-
implement effectful sts client
|
package/docgen.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import { AccountClient } from "@aws-sdk/client-account";
|
|
5
|
-
import * as Context from "effect/Context";
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import * as Layer from "effect/Layer";
|
|
8
|
-
import { AccountClientInstanceConfig } from "./AccountClientInstanceConfig";
|
|
9
|
-
declare const AccountClientInstance_base: Context.TagClass<AccountClientInstance, "@effect-aws/client-account/AccountClientInstance", AccountClient>;
|
|
10
|
-
/**
|
|
11
|
-
* @since 1.0.0
|
|
12
|
-
* @category tags
|
|
13
|
-
*/
|
|
14
|
-
export declare class AccountClientInstance extends AccountClientInstance_base {
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @since 1.0.0
|
|
18
|
-
* @category constructors
|
|
19
|
-
*/
|
|
20
|
-
export declare const makeAccountClientInstance: Effect.Effect<AccountClient, never, import("effect/Scope").Scope | AccountClientInstanceConfig>;
|
|
21
|
-
/**
|
|
22
|
-
* @since 1.0.0
|
|
23
|
-
* @category layers
|
|
24
|
-
*/
|
|
25
|
-
export declare const AccountClientInstanceLayer: Layer.Layer<AccountClientInstance, never, AccountClientInstanceConfig>;
|
|
26
|
-
/**
|
|
27
|
-
* @since 1.0.0
|
|
28
|
-
* @category layers
|
|
29
|
-
*/
|
|
30
|
-
export declare const DefaultAccountClientInstanceLayer: Layer.Layer<AccountClientInstance, never, never>;
|
|
31
|
-
export {};
|
|
@@ -1,57 +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.DefaultAccountClientInstanceLayer = exports.AccountClientInstanceLayer = exports.makeAccountClientInstance = exports.AccountClientInstance = void 0;
|
|
27
|
-
/**
|
|
28
|
-
* @since 1.0.0
|
|
29
|
-
*/
|
|
30
|
-
const client_account_1 = require("@aws-sdk/client-account");
|
|
31
|
-
const Context = __importStar(require("effect/Context"));
|
|
32
|
-
const Effect = __importStar(require("effect/Effect"));
|
|
33
|
-
const Layer = __importStar(require("effect/Layer"));
|
|
34
|
-
const AccountClientInstanceConfig_1 = require("./AccountClientInstanceConfig");
|
|
35
|
-
/**
|
|
36
|
-
* @since 1.0.0
|
|
37
|
-
* @category tags
|
|
38
|
-
*/
|
|
39
|
-
class AccountClientInstance extends Context.Tag("@effect-aws/client-account/AccountClientInstance")() {
|
|
40
|
-
}
|
|
41
|
-
exports.AccountClientInstance = AccountClientInstance;
|
|
42
|
-
/**
|
|
43
|
-
* @since 1.0.0
|
|
44
|
-
* @category constructors
|
|
45
|
-
*/
|
|
46
|
-
exports.makeAccountClientInstance = Effect.flatMap(AccountClientInstanceConfig_1.AccountClientInstanceConfig, (config) => Effect.acquireRelease(Effect.sync(() => new client_account_1.AccountClient(config)), (client) => Effect.sync(() => client.destroy())));
|
|
47
|
-
/**
|
|
48
|
-
* @since 1.0.0
|
|
49
|
-
* @category layers
|
|
50
|
-
*/
|
|
51
|
-
exports.AccountClientInstanceLayer = Layer.scoped(AccountClientInstance, exports.makeAccountClientInstance);
|
|
52
|
-
/**
|
|
53
|
-
* @since 1.0.0
|
|
54
|
-
* @category layers
|
|
55
|
-
*/
|
|
56
|
-
exports.DefaultAccountClientInstanceLayer = exports.AccountClientInstanceLayer.pipe(Layer.provide(AccountClientInstanceConfig_1.DefaultAccountClientConfigLayer));
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWNjb3VudENsaWVudEluc3RhbmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0FjY291bnRDbGllbnRJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBOztHQUVHO0FBQ0gsNERBQXdEO0FBQ3hELHdEQUEwQztBQUMxQyxzREFBd0M7QUFDeEMsb0RBQXND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udEluc3RhbmNlLFxuKTtcblxuLyoqXG4gKiBAc2luY2UgMS4wLjBcbiAqIEBjYXRlZ29yeSBsYXllcnNcbiAqL1xuZXhwb3J0IGNvbnN0IERlZmF1bHRBY2NvdW50Q2xpZW50SW5zdGFuY2VMYXllciA9XG4gIEFjY291bnRDbGllbnRJbnN0YW5jZUxheWVyLnBpcGUoXG4gICAgTGF5ZXIucHJvdmlkZShEZWZhdWx0QWNjb3VudENsaWVudENvbmZpZ0xheWVyKSxcbiAgKTtcbiJdfQ==
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @since 1.0.0
|
|
3
|
-
*/
|
|
4
|
-
import type { AccountClientConfig } from "@aws-sdk/client-account";
|
|
5
|
-
import { Context, Effect, Layer } from "effect";
|
|
6
|
-
declare const AccountClientInstanceConfig_base: Context.TagClass<AccountClientInstanceConfig, "@effect-aws/client-account/AccountClientInstanceConfig", AccountClientConfig>;
|
|
7
|
-
/**
|
|
8
|
-
* @since 1.0.0
|
|
9
|
-
* @category tags
|
|
10
|
-
*/
|
|
11
|
-
export declare class AccountClientInstanceConfig extends AccountClientInstanceConfig_base {
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @since 1.0.0
|
|
15
|
-
* @category constructors
|
|
16
|
-
*/
|
|
17
|
-
export declare const makeDefaultAccountClientInstanceConfig: Effect.Effect<AccountClientConfig>;
|
|
18
|
-
/**
|
|
19
|
-
* @since 1.0.0
|
|
20
|
-
* @category layers
|
|
21
|
-
*/
|
|
22
|
-
export declare const DefaultAccountClientConfigLayer: Layer.Layer<AccountClientInstanceConfig, never, never>;
|
|
23
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DefaultAccountClientConfigLayer = exports.makeDefaultAccountClientInstanceConfig = exports.AccountClientInstanceConfig = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
/**
|
|
6
|
-
* @since 1.0.0
|
|
7
|
-
* @category tags
|
|
8
|
-
*/
|
|
9
|
-
class AccountClientInstanceConfig extends effect_1.Context.Tag("@effect-aws/client-account/AccountClientInstanceConfig")() {
|
|
10
|
-
}
|
|
11
|
-
exports.AccountClientInstanceConfig = AccountClientInstanceConfig;
|
|
12
|
-
/**
|
|
13
|
-
* @since 1.0.0
|
|
14
|
-
* @category constructors
|
|
15
|
-
*/
|
|
16
|
-
exports.makeDefaultAccountClientInstanceConfig = effect_1.Effect.gen(function* (_) {
|
|
17
|
-
const runtime = yield* _(effect_1.Effect.runtime());
|
|
18
|
-
const runSync = effect_1.Runtime.runSync(runtime);
|
|
19
|
-
return {
|
|
20
|
-
logger: {
|
|
21
|
-
info(m) {
|
|
22
|
-
effect_1.Effect.logInfo(m).pipe(runSync);
|
|
23
|
-
},
|
|
24
|
-
warn(m) {
|
|
25
|
-
effect_1.Effect.logWarning(m).pipe(runSync);
|
|
26
|
-
},
|
|
27
|
-
error(m) {
|
|
28
|
-
effect_1.Effect.logError(m).pipe(runSync);
|
|
29
|
-
},
|
|
30
|
-
debug(m) {
|
|
31
|
-
effect_1.Effect.logDebug(m).pipe(runSync);
|
|
32
|
-
},
|
|
33
|
-
trace(m) {
|
|
34
|
-
effect_1.Effect.logTrace(m).pipe(runSync);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
/**
|
|
40
|
-
* @since 1.0.0
|
|
41
|
-
* @category layers
|
|
42
|
-
*/
|
|
43
|
-
exports.DefaultAccountClientConfigLayer = effect_1.Layer.effect(AccountClientInstanceConfig, exports.makeDefaultAccountClientInstanceConfig);
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWNjb3VudENsaWVudEluc3RhbmNlQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0FjY291b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