@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.
Files changed (68) hide show
  1. package/AccountClientInstance/package.json +6 -0
  2. package/AccountService/package.json +6 -0
  3. package/AccountServiceConfig/package.json +6 -0
  4. package/Errors/package.json +6 -0
  5. package/dist/cjs/AccountClientInstance.d.ts +24 -0
  6. package/dist/cjs/AccountClientInstance.d.ts.map +1 -0
  7. package/dist/cjs/AccountClientInstance.js +50 -0
  8. package/dist/cjs/AccountClientInstance.js.map +1 -0
  9. package/{lib → dist/cjs}/AccountService.d.ts +16 -38
  10. package/dist/cjs/AccountService.d.ts.map +1 -0
  11. package/dist/cjs/AccountService.js +68 -0
  12. package/dist/cjs/AccountService.js.map +1 -0
  13. package/dist/cjs/AccountServiceConfig.d.ts +25 -0
  14. package/dist/cjs/AccountServiceConfig.d.ts.map +1 -0
  15. package/dist/cjs/AccountServiceConfig.js +35 -0
  16. package/dist/cjs/AccountServiceConfig.js.map +1 -0
  17. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  18. package/dist/cjs/Errors.d.ts.map +1 -0
  19. package/dist/cjs/Errors.js +14 -0
  20. package/dist/cjs/Errors.js.map +1 -0
  21. package/dist/cjs/index.d.ts +39 -0
  22. package/dist/cjs/index.d.ts.map +1 -0
  23. package/dist/cjs/index.js +56 -0
  24. package/dist/cjs/index.js.map +1 -0
  25. package/dist/dts/AccountClientInstance.d.ts +24 -0
  26. package/dist/dts/AccountClientInstance.d.ts.map +1 -0
  27. package/dist/dts/AccountService.d.ts +103 -0
  28. package/dist/dts/AccountService.d.ts.map +1 -0
  29. package/dist/dts/AccountServiceConfig.d.ts +25 -0
  30. package/dist/dts/AccountServiceConfig.d.ts.map +1 -0
  31. package/dist/dts/Errors.d.ts +13 -0
  32. package/dist/dts/Errors.d.ts.map +1 -0
  33. package/dist/dts/index.d.ts +39 -0
  34. package/dist/dts/index.d.ts.map +1 -0
  35. package/dist/esm/AccountClientInstance.js +23 -0
  36. package/dist/esm/AccountClientInstance.js.map +1 -0
  37. package/dist/esm/AccountService.js +41 -0
  38. package/dist/esm/AccountService.js.map +1 -0
  39. package/dist/esm/AccountServiceConfig.js +31 -0
  40. package/dist/esm/AccountServiceConfig.js.map +1 -0
  41. package/dist/esm/Errors.js +11 -0
  42. package/dist/esm/Errors.js.map +1 -0
  43. package/dist/esm/index.js +27 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/package.json +4 -0
  46. package/package.json +60 -43
  47. package/src/AccountClientInstance.ts +33 -0
  48. package/src/AccountService.ts +269 -0
  49. package/src/AccountServiceConfig.ts +52 -0
  50. package/src/Errors.ts +29 -0
  51. package/src/index.ts +44 -0
  52. package/CHANGELOG.md +0 -35
  53. package/docgen.json +0 -8
  54. package/lib/AccountClientInstance.d.ts +0 -31
  55. package/lib/AccountClientInstance.js +0 -57
  56. package/lib/AccountClientInstanceConfig.d.ts +0 -23
  57. package/lib/AccountClientInstanceConfig.js +0 -44
  58. package/lib/AccountService.js +0 -100
  59. package/lib/Errors.js +0 -14
  60. package/lib/esm/AccountClientInstance.js +0 -30
  61. package/lib/esm/AccountClientInstanceConfig.js +0 -40
  62. package/lib/esm/AccountService.js +0 -96
  63. package/lib/esm/Errors.js +0 -11
  64. package/lib/esm/index.js +0 -5
  65. package/lib/index.d.ts +0 -4
  66. package/lib/index.js +0 -21
  67. package/project.json +0 -77
  68. package/vitest.config.ts +0 -3
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { type AcceptPrimaryEmailUpdateCommandInput, type AcceptPrimaryEmailUpdateCommandOutput, type AccountClient, type AccountClientConfig, type DeleteAlternateContactCommandInput, type DeleteAlternateContactCommandOutput, type DisableRegionCommandInput, type DisableRegionCommandOutput, type EnableRegionCommandInput, type EnableRegionCommandOutput, type GetAlternateContactCommandInput, type GetAlternateContactCommandOutput, type GetContactInformationCommandInput, type GetContactInformationCommandOutput, type GetPrimaryEmailCommandInput, type GetPrimaryEmailCommandOutput, type GetRegionOptStatusCommandInput, type GetRegionOptStatusCommandOutput, type ListRegionsCommandInput, type ListRegionsCommandOutput, type PutAlternateContactCommandInput, type PutAlternateContactCommandOutput, type PutContactInformationCommandInput, type PutContactInformationCommandOutput, type StartPrimaryEmailUpdateCommandInput, type StartPrimaryEmailUpdateCommandOutput } from "@aws-sdk/client-account";
5
+ import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import * as Instance from "./AccountClientInstance.js";
8
+ import type { AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, TooManyRequestsError, ValidationError } from "./Errors.js";
9
+ interface AccountService$ {
10
+ readonly _: unique symbol;
11
+ /**
12
+ * @see {@link AcceptPrimaryEmailUpdateCommand}
13
+ */
14
+ acceptPrimaryEmailUpdate(args: AcceptPrimaryEmailUpdateCommandInput, options?: HttpHandlerOptions): Effect.Effect<AcceptPrimaryEmailUpdateCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
15
+ /**
16
+ * @see {@link DeleteAlternateContactCommand}
17
+ */
18
+ deleteAlternateContact(args: DeleteAlternateContactCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteAlternateContactCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
19
+ /**
20
+ * @see {@link DisableRegionCommand}
21
+ */
22
+ disableRegion(args: DisableRegionCommandInput, options?: HttpHandlerOptions): Effect.Effect<DisableRegionCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError>;
23
+ /**
24
+ * @see {@link EnableRegionCommand}
25
+ */
26
+ enableRegion(args: EnableRegionCommandInput, options?: HttpHandlerOptions): Effect.Effect<EnableRegionCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError>;
27
+ /**
28
+ * @see {@link GetAlternateContactCommand}
29
+ */
30
+ getAlternateContact(args: GetAlternateContactCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetAlternateContactCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
31
+ /**
32
+ * @see {@link GetContactInformationCommand}
33
+ */
34
+ getContactInformation(args: GetContactInformationCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetContactInformationCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
35
+ /**
36
+ * @see {@link GetPrimaryEmailCommand}
37
+ */
38
+ getPrimaryEmail(args: GetPrimaryEmailCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetPrimaryEmailCommandOutput, SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
39
+ /**
40
+ * @see {@link GetRegionOptStatusCommand}
41
+ */
42
+ getRegionOptStatus(args: GetRegionOptStatusCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetRegionOptStatusCommandOutput, SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError>;
43
+ /**
44
+ * @see {@link ListRegionsCommand}
45
+ */
46
+ listRegions(args: ListRegionsCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListRegionsCommandOutput, SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError>;
47
+ /**
48
+ * @see {@link PutAlternateContactCommand}
49
+ */
50
+ putAlternateContact(args: PutAlternateContactCommandInput, options?: HttpHandlerOptions): Effect.Effect<PutAlternateContactCommandOutput, SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError>;
51
+ /**
52
+ * @see {@link PutContactInformationCommand}
53
+ */
54
+ putContactInformation(args: PutContactInformationCommandInput, options?: HttpHandlerOptions): Effect.Effect<PutContactInformationCommandOutput, SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError>;
55
+ /**
56
+ * @see {@link StartPrimaryEmailUpdateCommand}
57
+ */
58
+ startPrimaryEmailUpdate(args: StartPrimaryEmailUpdateCommandInput, options?: HttpHandlerOptions): Effect.Effect<StartPrimaryEmailUpdateCommandOutput, SdkError | AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError>;
59
+ }
60
+ /**
61
+ * @since 1.0.0
62
+ * @category constructors
63
+ */
64
+ export declare const makeAccountService: Effect.Effect<AccountService$, never, Instance.AccountClientInstance>;
65
+ declare const AccountService_base: import("effect/Context").TagClass<AccountService, "@effect-aws/client-account/AccountService", AccountService$> & {
66
+ readonly _: Effect.Effect<AccountService$["_"], never, AccountService>;
67
+ acceptPrimaryEmailUpdate: (args: AcceptPrimaryEmailUpdateCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<AcceptPrimaryEmailUpdateCommandOutput, AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
68
+ deleteAlternateContact: (args: DeleteAlternateContactCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteAlternateContactCommandOutput, AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
69
+ disableRegion: (args: DisableRegionCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DisableRegionCommandOutput, AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
70
+ enableRegion: (args: EnableRegionCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<EnableRegionCommandOutput, AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
71
+ getAlternateContact: (args: GetAlternateContactCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetAlternateContactCommandOutput, AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
72
+ getContactInformation: (args: GetContactInformationCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetContactInformationCommandOutput, AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
73
+ getPrimaryEmail: (args: GetPrimaryEmailCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetPrimaryEmailCommandOutput, AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
74
+ getRegionOptStatus: (args: GetRegionOptStatusCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetRegionOptStatusCommandOutput, AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
75
+ listRegions: (args: ListRegionsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListRegionsCommandOutput, AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
76
+ putAlternateContact: (args: PutAlternateContactCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<PutAlternateContactCommandOutput, AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
77
+ putContactInformation: (args: PutContactInformationCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<PutContactInformationCommandOutput, AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
78
+ startPrimaryEmailUpdate: (args: StartPrimaryEmailUpdateCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<StartPrimaryEmailUpdateCommandOutput, AccessDeniedError | ConflictError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError | SdkError, AccountService>;
79
+ } & {
80
+ use: <X>(body: (_: AccountService$) => X) => X extends Effect.Effect<infer A, infer E, infer R> ? Effect.Effect<A, E, AccountService | R> : Effect.Effect<X, never, AccountService>;
81
+ };
82
+ /**
83
+ * @since 1.0.0
84
+ * @category models
85
+ */
86
+ export declare class AccountService extends AccountService_base {
87
+ static readonly defaultLayer: Layer.Layer<AccountService, never, never>;
88
+ static readonly layer: (config: AccountService.Config) => Layer.Layer<AccountService, never, never>;
89
+ static readonly baseLayer: (evaluate: (defaultConfig: AccountClientConfig) => AccountClient) => Layer.Layer<AccountService, never, never>;
90
+ }
91
+ /**
92
+ * @since 1.0.0
93
+ */
94
+ export declare namespace AccountService {
95
+ /**
96
+ * @since 1.0.0
97
+ */
98
+ interface Config extends Omit<AccountClientConfig, "logger"> {
99
+ readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
100
+ }
101
+ }
102
+ export {};
103
+ //# sourceMappingURL=AccountService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountService.d.ts","sourceRoot":"","sources":["../../src/AccountService.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type { AccountClientConfig } from "@aws-sdk/client-account";
5
+ import { Effect, Layer } from "effect";
6
+ import type { AccountService } from "./AccountService.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category account service config
10
+ */
11
+ export declare const withAccountServiceConfig: {
12
+ (config: AccountService.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: AccountService.Config): Effect.Effect<A, E, R>;
14
+ };
15
+ /**
16
+ * @since 1.0.0
17
+ * @category account service config
18
+ */
19
+ export declare const setAccountServiceConfig: (config: AccountService.Config) => Layer.Layer<never, never, never>;
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export declare const toAccountClientConfig: Effect.Effect<AccountClientConfig>;
25
+ //# sourceMappingURL=AccountServiceConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountServiceConfig.d.ts","sourceRoot":"","sources":["../../src/AccountServiceConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAY,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAW1D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE;IACrC,CAAC,MAAM,EAAE,cAAc,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;IACrG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAKlG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,WAAY,eAAe,MAAM,qCACX,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAQnE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException } from "@aws-sdk/client-account";
2
+ import type { TaggedException } from "@effect-aws/commons";
3
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
4
+ export declare const AllServiceErrors: readonly ["AccessDeniedException", "ConflictException", "InternalServerException", "ResourceNotFoundException", "TooManyRequestsException", "ValidationException"];
5
+ export type AccessDeniedError = TaggedException<AccessDeniedException>;
6
+ export type ConflictError = TaggedException<ConflictException>;
7
+ export type InternalServerError = TaggedException<InternalServerException>;
8
+ export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
9
+ export type TooManyRequestsError = TaggedException<TooManyRequestsException>;
10
+ export type ValidationError = TaggedException<ValidationException>;
11
+ export type SdkError = CommonSdkError;
12
+ export declare const SdkError: import("effect/Data").Case.Constructor<CommonSdkError, "_tag">;
13
+ //# 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,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,eAAO,MAAM,gBAAgB,oKAOnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC/E,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAEnE,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC;AACtC,eAAO,MAAM,QAAQ,gEAAiB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AccountService } from "./AccountService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as AccountClientInstance from "./AccountClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as AccountServiceConfig from "./AccountServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./AccountService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias AccountService
25
+ */
26
+ export declare namespace Account {
27
+ /**
28
+ * @since 1.0.0
29
+ * @alias AccountService.Config
30
+ */
31
+ type Config = AccountService.Config;
32
+ }
33
+ /**
34
+ * @since 1.0.0
35
+ * @category exports
36
+ * @alias AccountService
37
+ */
38
+ export declare const Account: typeof AccountService;
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,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AAEpE;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAElE;;GAEG;AACH,cAAc,qBAAqB,CAAC;AAEpC;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B;;;OAGG;IACH,KAAY,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;CAC5C;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,uBAAiB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AccountClient } from "@aws-sdk/client-account";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as AccountServiceConfig from "./AccountServiceConfig.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category tags
10
+ */
11
+ export class AccountClientInstance extends Context.Tag("@effect-aws/client-account/AccountClientInstance")() {
12
+ }
13
+ /**
14
+ * @since 1.0.0
15
+ * @category constructors
16
+ */
17
+ export const make = Effect.flatMap(AccountServiceConfig.toAccountClientConfig, (config) => Effect.acquireRelease(Effect.sync(() => new AccountClient(config)), (client) => Effect.sync(() => client.destroy())));
18
+ /**
19
+ * @since 1.0.0
20
+ * @category layers
21
+ */
22
+ export const layer = Layer.scoped(AccountClientInstance, make);
23
+ //# sourceMappingURL=AccountClientInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountClientInstance.js","sourceRoot":"","sources":["../../src/AccountClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAElE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,OAAO,CAAC,GAAG,CACpD,kDAAkD,CACnD,EAAwC;CAAG;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,oBAAoB,CAAC,qBAAqB,EAC1C,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,EAC5C,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,qBAAqB,EAAE,IAAI,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AcceptPrimaryEmailUpdateCommand, DeleteAlternateContactCommand, DisableRegionCommand, EnableRegionCommand, GetAlternateContactCommand, GetContactInformationCommand, GetPrimaryEmailCommand, GetRegionOptStatusCommand, ListRegionsCommand, PutAlternateContactCommand, PutContactInformationCommand, StartPrimaryEmailUpdateCommand, } from "@aws-sdk/client-account";
5
+ import { Service } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import * as Instance from "./AccountClientInstance.js";
8
+ import * as AccountServiceConfig from "./AccountServiceConfig.js";
9
+ import { AllServiceErrors } from "./Errors.js";
10
+ const commands = {
11
+ AcceptPrimaryEmailUpdateCommand,
12
+ DeleteAlternateContactCommand,
13
+ DisableRegionCommand,
14
+ EnableRegionCommand,
15
+ GetAlternateContactCommand,
16
+ GetContactInformationCommand,
17
+ GetPrimaryEmailCommand,
18
+ GetRegionOptStatusCommand,
19
+ ListRegionsCommand,
20
+ PutAlternateContactCommand,
21
+ PutContactInformationCommand,
22
+ StartPrimaryEmailUpdateCommand,
23
+ };
24
+ /**
25
+ * @since 1.0.0
26
+ * @category constructors
27
+ */
28
+ export const makeAccountService = Effect.gen(function* () {
29
+ const client = yield* Instance.AccountClientInstance;
30
+ return Service.fromClientAndCommands(client, commands, AllServiceErrors);
31
+ });
32
+ /**
33
+ * @since 1.0.0
34
+ * @category models
35
+ */
36
+ export class AccountService extends Effect.Tag("@effect-aws/client-account/AccountService")() {
37
+ static defaultLayer = Layer.effect(this, makeAccountService).pipe(Layer.provide(Instance.layer));
38
+ static layer = (config) => Layer.effect(this, makeAccountService).pipe(Layer.provide(Instance.layer), Layer.provide(AccountServiceConfig.setAccountServiceConfig(config)));
39
+ static baseLayer = (evaluate) => Layer.effect(this, makeAccountService).pipe(Layer.provide(Layer.effect(Instance.AccountClientInstance, Effect.map(AccountServiceConfig.toAccountClientConfig, evaluate))));
40
+ }
41
+ //# sourceMappingURL=AccountService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountService.js","sourceRoot":"","sources":["../../src/AccountService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,+BAA+B,EAK/B,6BAA6B,EAG7B,oBAAoB,EAGpB,mBAAmB,EAGnB,0BAA0B,EAG1B,4BAA4B,EAG5B,sBAAsB,EAGtB,yBAAyB,EAGzB,kBAAkB,EAGlB,0BAA0B,EAG1B,4BAA4B,EAG5B,8BAA8B,GAG/B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AASlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,QAAQ,GAAG;IACf,+BAA+B;IAC/B,6BAA6B;IAC7B,oBAAoB;IACpB,mBAAmB;IACnB,0BAA0B;IAC1B,4BAA4B;IAC5B,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,0BAA0B;IAC1B,4BAA4B;IAC5B,8BAA8B;CAC/B,CAAC;AAsJF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACpD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAErD,OAAO,OAAO,CAAC,qBAAqB,CAAkB,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;AAC5F,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC,EAGxF;IACD,MAAM,CAAU,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1G,MAAM,CAAU,KAAK,GAAG,CAAC,MAA6B,EAAE,EAAE,CACxD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,IAAI,CACzC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC7B,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CACpE,CAAC;IACJ,MAAM,CAAU,SAAS,GAAG,CAC1B,QAA+D,EAC/D,EAAE,CACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,IAAI,CACzC,KAAK,CAAC,OAAO,CACX,KAAK,CAAC,MAAM,CACV,QAAQ,CAAC,qBAAqB,EAC9B,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CACjE,CACF,CACF,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ServiceLogger } from "@effect-aws/commons";
2
+ import { Effect, FiberRef, Layer } from "effect";
3
+ import { dual } from "effect/Function";
4
+ import { globalValue } from "effect/GlobalValue";
5
+ /**
6
+ * @since 1.0.0
7
+ * @category account service config
8
+ */
9
+ const currentAccountServiceConfig = globalValue("@effect-aws/client-account/currentAccountServiceConfig", () => FiberRef.unsafeMake({}));
10
+ /**
11
+ * @since 1.0.0
12
+ * @category account service config
13
+ */
14
+ export const withAccountServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentAccountServiceConfig, config));
15
+ /**
16
+ * @since 1.0.0
17
+ * @category account service config
18
+ */
19
+ export const setAccountServiceConfig = (config) => Layer.locallyScoped(currentAccountServiceConfig, config);
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export const toAccountClientConfig = Effect.gen(function* () {
25
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentAccountServiceConfig);
26
+ const logger = serviceLogger === true
27
+ ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
28
+ : (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
29
+ return { logger, ...config };
30
+ });
31
+ //# sourceMappingURL=AccountServiceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountServiceConfig.js","sourceRoot":"","sources":["../../src/AccountServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD;;;GAGG;AACH,MAAM,2BAA2B,GAAG,WAAW,CAC7C,wDAAwD,EACxD,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAwB,EAAE,CAAC,CACrD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAGjC,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAA6B,EAA0B,EAAE,CACjG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,2BAA2B,EAAE,MAAM,CAAC,CAC9D,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAA6B,EAAE,EAAE,CACvE,KAAK,CAAC,aAAa,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAuC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC3F,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAE9F,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"}
@@ -0,0 +1,11 @@
1
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
2
+ export const AllServiceErrors = [
3
+ "AccessDeniedException",
4
+ "ConflictException",
5
+ "InternalServerException",
6
+ "ResourceNotFoundException",
7
+ "TooManyRequestsException",
8
+ "ValidationException",
9
+ ];
10
+ export const SdkError = CommonSdkError;
11
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,2BAA2B;IAC3B,0BAA0B;IAC1B,qBAAqB;CACb,CAAC;AAUX,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AccountService } from "./AccountService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as AccountClientInstance from "./AccountClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as AccountServiceConfig from "./AccountServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./AccountService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias AccountService
25
+ */
26
+ export const Account = AccountService;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AAEpE;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAElE;;GAEG;AACH,cAAc,qBAAqB,CAAC;AAepC;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": []
4
+ }
package/package.json CHANGED
@@ -1,54 +1,71 @@
1
1
  {
2
2
  "name": "@effect-aws/client-account",
3
+ "version": "1.9.0",
4
+ "description": "Effectful AWS Account client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-account"
10
+ },
11
+ "sideEffects": [],
3
12
  "author": {
4
13
  "name": "Victor Korzunin",
5
- "email": "ifloydrose@gmail.com",
6
- "organization": false
14
+ "email": "ifloydrose@gmail.com"
7
15
  },
8
- "devDependencies": {
9
- "@types/node": "^18",
10
- "@typescript-eslint/eslint-plugin": "^7",
11
- "@typescript-eslint/parser": "^7",
12
- "aws-sdk-client-mock": "^4.0.2",
13
- "aws-sdk-client-mock-vitest": "^4.0.0",
14
- "effect": "3.0.0",
15
- "eslint": "^8",
16
- "eslint-config-prettier": "^9.1.0",
17
- "eslint-import-resolver-typescript": "^3.6.1",
18
- "eslint-plugin-import": "^2.29.1",
19
- "eslint-plugin-prettier": "^5.2.1",
20
- "prettier": "^3.2.5",
21
- "typescript": "^5.4.2",
22
- "vitest": "^2.0.5"
16
+ "homepage": "https://floydspace.github.io/effect-aws/docs/client-account",
17
+ "dependencies": {
18
+ "@aws-sdk/client-account": "^3",
19
+ "@effect-aws/commons": "^0.1.0"
23
20
  },
24
21
  "peerDependencies": {
25
- "effect": ">=3.0.0 <4.0.0"
22
+ "effect": ">=3.0.4 <4.0.0"
26
23
  },
27
- "dependencies": {
28
- "@aws-sdk/client-account": "^3"
29
- },
30
- "main": "lib/index.js",
31
- "license": "MIT",
32
- "homepage": "https://floydspace.github.io/effect-aws",
33
- "publishConfig": {
34
- "access": "public"
24
+ "main": "./dist/cjs/index.js",
25
+ "module": "./dist/esm/index.js",
26
+ "types": "./dist/dts/index.d.ts",
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ ".": {
30
+ "types": "./dist/dts/index.d.ts",
31
+ "import": "./dist/esm/index.js",
32
+ "default": "./dist/cjs/index.js"
33
+ },
34
+ "./AccountClientInstance": {
35
+ "types": "./dist/dts/AccountClientInstance.d.ts",
36
+ "import": "./dist/esm/AccountClientInstance.js",
37
+ "default": "./dist/cjs/AccountClientInstance.js"
38
+ },
39
+ "./AccountService": {
40
+ "types": "./dist/dts/AccountService.d.ts",
41
+ "import": "./dist/esm/AccountService.js",
42
+ "default": "./dist/cjs/AccountService.js"
43
+ },
44
+ "./AccountServiceConfig": {
45
+ "types": "./dist/dts/AccountServiceConfig.d.ts",
46
+ "import": "./dist/esm/AccountServiceConfig.js",
47
+ "default": "./dist/cjs/AccountServiceConfig.js"
48
+ },
49
+ "./Errors": {
50
+ "types": "./dist/dts/Errors.d.ts",
51
+ "import": "./dist/esm/Errors.js",
52
+ "default": "./dist/cjs/Errors.js"
53
+ }
35
54
  },
36
- "version": "1.2.0",
37
- "types": "lib/index.d.ts",
38
- "module": "lib/esm/index.js",
39
- "sideEffects": [],
40
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
41
- "scripts": {
42
- "build": "npx projen build",
43
- "compile": "npx projen compile",
44
- "default": "npx projen default",
45
- "eslint": "npx projen eslint",
46
- "package": "npx projen package",
47
- "post-compile": "npx projen post-compile",
48
- "pre-compile": "npx projen pre-compile",
49
- "test": "npx projen test",
50
- "test:watch": "npx projen test:watch",
51
- "watch": "npx projen watch",
52
- "docgen": "docgen"
55
+ "typesVersions": {
56
+ "*": {
57
+ "AccountClientInstance": [
58
+ "./dist/dts/AccountClientInstance.d.ts"
59
+ ],
60
+ "AccountService": [
61
+ "./dist/dts/AccountService.d.ts"
62
+ ],
63
+ "AccountServiceConfig": [
64
+ "./dist/dts/AccountServiceConfig.d.ts"
65
+ ],
66
+ "Errors": [
67
+ "./dist/dts/Errors.d.ts"
68
+ ]
69
+ }
53
70
  }
54
71
  }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AccountClient } from "@aws-sdk/client-account";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as AccountServiceConfig from "./AccountServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class AccountClientInstance extends Context.Tag(
13
+ "@effect-aws/client-account/AccountClientInstance",
14
+ )<AccountClientInstance, AccountClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ AccountServiceConfig.toAccountClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new AccountClient(config)),
25
+ (client) => Effect.sync(() => client.destroy()),
26
+ ),
27
+ );
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category layers
32
+ */
33
+ export const layer = Layer.scoped(AccountClientInstance, make);