@effect-aws/client-organizations 1.1.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/Errors/package.json +6 -0
- package/OrganizationsClientInstance/package.json +6 -0
- package/OrganizationsService/package.json +6 -0
- package/OrganizationsServiceConfig/package.json +6 -0
- package/{lib → dist/cjs}/Errors.d.ts +7 -12
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +55 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/OrganizationsClientInstance.d.ts +24 -0
- package/dist/cjs/OrganizationsClientInstance.d.ts.map +1 -0
- package/dist/cjs/OrganizationsClientInstance.js +50 -0
- package/dist/cjs/OrganizationsClientInstance.js.map +1 -0
- package/{lib → dist/cjs}/OrganizationsService.d.ts +16 -38
- package/dist/cjs/OrganizationsService.d.ts.map +1 -0
- package/dist/cjs/OrganizationsService.js +111 -0
- package/dist/cjs/OrganizationsService.js.map +1 -0
- package/dist/cjs/OrganizationsServiceConfig.d.ts +25 -0
- package/dist/cjs/OrganizationsServiceConfig.d.ts.map +1 -0
- package/dist/cjs/OrganizationsServiceConfig.js +35 -0
- package/dist/cjs/OrganizationsServiceConfig.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 +54 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/OrganizationsClientInstance.d.ts +24 -0
- package/dist/dts/OrganizationsClientInstance.d.ts.map +1 -0
- package/dist/dts/OrganizationsService.d.ts +318 -0
- package/dist/dts/OrganizationsService.d.ts.map +1 -0
- package/dist/dts/OrganizationsServiceConfig.d.ts +25 -0
- package/dist/dts/OrganizationsServiceConfig.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 +52 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/OrganizationsClientInstance.js +23 -0
- package/dist/esm/OrganizationsClientInstance.js.map +1 -0
- package/dist/esm/OrganizationsService.js +84 -0
- package/dist/esm/OrganizationsService.js.map +1 -0
- package/dist/esm/OrganizationsServiceConfig.js +31 -0
- package/dist/esm/OrganizationsServiceConfig.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 +154 -0
- package/src/OrganizationsClientInstance.ts +33 -0
- package/src/OrganizationsService.ts +1382 -0
- package/src/OrganizationsServiceConfig.ts +52 -0
- package/src/index.ts +44 -0
- package/CHANGELOG.md +0 -17
- package/docgen.json +0 -8
- package/lib/Errors.js +0 -55
- package/lib/OrganizationsClientInstance.d.ts +0 -31
- package/lib/OrganizationsClientInstance.js +0 -57
- package/lib/OrganizationsClientInstanceConfig.d.ts +0 -23
- package/lib/OrganizationsClientInstanceConfig.js +0 -44
- package/lib/OrganizationsService.js +0 -143
- package/lib/esm/Errors.js +0 -52
- package/lib/esm/OrganizationsClientInstance.js +0 -30
- package/lib/esm/OrganizationsClientInstanceConfig.js +0 -40
- package/lib/esm/OrganizationsService.js +0 -139
- 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,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OrganizationsService } from "./OrganizationsService.js";
|
|
5
|
+
/**
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
export * from "./Errors.js";
|
|
9
|
+
/**
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
export * as OrganizationsClientInstance from "./OrganizationsClientInstance.js";
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
export * as OrganizationsServiceConfig from "./OrganizationsServiceConfig.js";
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
export * from "./OrganizationsService.js";
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category exports
|
|
24
|
+
* @alias OrganizationsService
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace Organizations {
|
|
27
|
+
/**
|
|
28
|
+
* @since 1.0.0
|
|
29
|
+
* @alias OrganizationsService.Config
|
|
30
|
+
*/
|
|
31
|
+
type Config = OrganizationsService.Config;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
* @category exports
|
|
36
|
+
* @alias OrganizationsService
|
|
37
|
+
*/
|
|
38
|
+
export declare const Organizations: typeof OrganizationsService;
|
|
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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,2BAA2B,MAAM,kCAAkC,CAAC;AAEhF;;GAEG;AACH,OAAO,KAAK,0BAA0B,MAAM,iCAAiC,CAAC;AAE9E;;GAEG;AACH,cAAc,2BAA2B,CAAC;AAE1C;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC;;;OAGG;IACH,KAAY,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC;CAClD;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,6BAAuB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
2
|
+
export const AllServiceErrors = [
|
|
3
|
+
"AWSOrganizationsNotInUseException",
|
|
4
|
+
"AccessDeniedException",
|
|
5
|
+
"AccessDeniedForDependencyException",
|
|
6
|
+
"AccountAlreadyClosedException",
|
|
7
|
+
"AccountAlreadyRegisteredException",
|
|
8
|
+
"AccountNotFoundException",
|
|
9
|
+
"AccountNotRegisteredException",
|
|
10
|
+
"AccountOwnerNotVerifiedException",
|
|
11
|
+
"AlreadyInOrganizationException",
|
|
12
|
+
"ChildNotFoundException",
|
|
13
|
+
"ConcurrentModificationException",
|
|
14
|
+
"ConflictException",
|
|
15
|
+
"ConstraintViolationException",
|
|
16
|
+
"CreateAccountStatusNotFoundException",
|
|
17
|
+
"DestinationParentNotFoundException",
|
|
18
|
+
"DuplicateAccountException",
|
|
19
|
+
"DuplicateHandshakeException",
|
|
20
|
+
"DuplicateOrganizationalUnitException",
|
|
21
|
+
"DuplicatePolicyAttachmentException",
|
|
22
|
+
"DuplicatePolicyException",
|
|
23
|
+
"EffectivePolicyNotFoundException",
|
|
24
|
+
"FinalizingOrganizationException",
|
|
25
|
+
"HandshakeAlreadyInStateException",
|
|
26
|
+
"HandshakeConstraintViolationException",
|
|
27
|
+
"HandshakeNotFoundException",
|
|
28
|
+
"InvalidHandshakeTransitionException",
|
|
29
|
+
"InvalidInputException",
|
|
30
|
+
"MalformedPolicyDocumentException",
|
|
31
|
+
"MasterCannotLeaveOrganizationException",
|
|
32
|
+
"OrganizationNotEmptyException",
|
|
33
|
+
"OrganizationalUnitNotEmptyException",
|
|
34
|
+
"OrganizationalUnitNotFoundException",
|
|
35
|
+
"ParentNotFoundException",
|
|
36
|
+
"PolicyChangesInProgressException",
|
|
37
|
+
"PolicyInUseException",
|
|
38
|
+
"PolicyNotAttachedException",
|
|
39
|
+
"PolicyNotFoundException",
|
|
40
|
+
"PolicyTypeAlreadyEnabledException",
|
|
41
|
+
"PolicyTypeNotAvailableForOrganizationException",
|
|
42
|
+
"PolicyTypeNotEnabledException",
|
|
43
|
+
"ResourcePolicyNotFoundException",
|
|
44
|
+
"RootNotFoundException",
|
|
45
|
+
"ServiceException",
|
|
46
|
+
"SourceParentNotFoundException",
|
|
47
|
+
"TargetNotFoundException",
|
|
48
|
+
"TooManyRequestsException",
|
|
49
|
+
"UnsupportedAPIEndpointException",
|
|
50
|
+
];
|
|
51
|
+
export const SdkError = CommonSdkError;
|
|
52
|
+
//# sourceMappingURL=Errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAkDA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,mCAAmC;IACnC,uBAAuB;IACvB,oCAAoC;IACpC,+BAA+B;IAC/B,mCAAmC;IACnC,0BAA0B;IAC1B,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,wBAAwB;IACxB,iCAAiC;IACjC,mBAAmB;IACnB,8BAA8B;IAC9B,sCAAsC;IACtC,oCAAoC;IACpC,2BAA2B;IAC3B,6BAA6B;IAC7B,sCAAsC;IACtC,oCAAoC;IACpC,0BAA0B;IAC1B,kCAAkC;IAClC,iCAAiC;IACjC,kCAAkC;IAClC,uCAAuC;IACvC,4BAA4B;IAC5B,qCAAqC;IACrC,uBAAuB;IACvB,kCAAkC;IAClC,wCAAwC;IACxC,+BAA+B;IAC/B,qCAAqC;IACrC,qCAAqC;IACrC,yBAAyB;IACzB,kCAAkC;IAClC,sBAAsB;IACtB,4BAA4B;IAC5B,yBAAyB;IACzB,mCAAmC;IACnC,gDAAgD;IAChD,+BAA+B;IAC/B,iCAAiC;IACjC,uBAAuB;IACvB,kBAAkB;IAClB,+BAA+B;IAC/B,yBAAyB;IACzB,0BAA0B;IAC1B,iCAAiC;CACzB,CAAC;AAqDX,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OrganizationsClient } from "@aws-sdk/client-organizations";
|
|
5
|
+
import { Context, Effect, Layer } from "effect";
|
|
6
|
+
import * as OrganizationsServiceConfig from "./OrganizationsServiceConfig.js";
|
|
7
|
+
/**
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category tags
|
|
10
|
+
*/
|
|
11
|
+
export class OrganizationsClientInstance extends Context.Tag("@effect-aws/client-organizations/OrganizationsClientInstance")() {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
* @category constructors
|
|
16
|
+
*/
|
|
17
|
+
export const make = Effect.flatMap(OrganizationsServiceConfig.toOrganizationsClientConfig, (config) => Effect.acquireRelease(Effect.sync(() => new OrganizationsClient(config)), (client) => Effect.sync(() => client.destroy())));
|
|
18
|
+
/**
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
* @category layers
|
|
21
|
+
*/
|
|
22
|
+
export const layer = Layer.scoped(OrganizationsClientInstance, make);
|
|
23
|
+
//# sourceMappingURL=OrganizationsClientInstance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationsClientInstance.js","sourceRoot":"","sources":["../../src/OrganizationsClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,0BAA0B,MAAM,iCAAiC,CAAC;AAE9E;;;GAGG;AACH,MAAM,OAAO,2BAA4B,SAAQ,OAAO,CAAC,GAAG,CAC1D,8DAA8D,CAC/D,EAAoD;CAAG;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,0BAA0B,CAAC,2BAA2B,EACtD,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAClD,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,2BAA2B,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { AcceptHandshakeCommand, AttachPolicyCommand, CancelHandshakeCommand, CloseAccountCommand, CreateAccountCommand, CreateGovCloudAccountCommand, CreateOrganizationalUnitCommand, CreateOrganizationCommand, CreatePolicyCommand, DeclineHandshakeCommand, DeleteOrganizationalUnitCommand, DeleteOrganizationCommand, DeletePolicyCommand, DeleteResourcePolicyCommand, DeregisterDelegatedAdministratorCommand, DescribeAccountCommand, DescribeCreateAccountStatusCommand, DescribeEffectivePolicyCommand, DescribeHandshakeCommand, DescribeOrganizationalUnitCommand, DescribeOrganizationCommand, DescribePolicyCommand, DescribeResourcePolicyCommand, DetachPolicyCommand, DisableAWSServiceAccessCommand, DisablePolicyTypeCommand, EnableAllFeaturesCommand, EnableAWSServiceAccessCommand, EnablePolicyTypeCommand, InviteAccountToOrganizationCommand, LeaveOrganizationCommand, ListAccountsCommand, ListAccountsForParentCommand, ListAWSServiceAccessForOrganizationCommand, ListChildrenCommand, ListCreateAccountStatusCommand, ListDelegatedAdministratorsCommand, ListDelegatedServicesForAccountCommand, ListHandshakesForAccountCommand, ListHandshakesForOrganizationCommand, ListOrganizationalUnitsForParentCommand, ListParentsCommand, ListPoliciesCommand, ListPoliciesForTargetCommand, ListRootsCommand, ListTagsForResourceCommand, ListTargetsForPolicyCommand, MoveAccountCommand, PutResourcePolicyCommand, RegisterDelegatedAdministratorCommand, RemoveAccountFromOrganizationCommand, TagResourceCommand, UntagResourceCommand, UpdateOrganizationalUnitCommand, UpdatePolicyCommand, } from "@aws-sdk/client-organizations";
|
|
5
|
+
import { Service } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, Layer } from "effect";
|
|
7
|
+
import { AllServiceErrors } from "./Errors.js";
|
|
8
|
+
import * as Instance from "./OrganizationsClientInstance.js";
|
|
9
|
+
import * as OrganizationsServiceConfig from "./OrganizationsServiceConfig.js";
|
|
10
|
+
const commands = {
|
|
11
|
+
AcceptHandshakeCommand,
|
|
12
|
+
AttachPolicyCommand,
|
|
13
|
+
CancelHandshakeCommand,
|
|
14
|
+
CloseAccountCommand,
|
|
15
|
+
CreateAccountCommand,
|
|
16
|
+
CreateGovCloudAccountCommand,
|
|
17
|
+
CreateOrganizationCommand,
|
|
18
|
+
CreateOrganizationalUnitCommand,
|
|
19
|
+
CreatePolicyCommand,
|
|
20
|
+
DeclineHandshakeCommand,
|
|
21
|
+
DeleteOrganizationCommand,
|
|
22
|
+
DeleteOrganizationalUnitCommand,
|
|
23
|
+
DeletePolicyCommand,
|
|
24
|
+
DeleteResourcePolicyCommand,
|
|
25
|
+
DeregisterDelegatedAdministratorCommand,
|
|
26
|
+
DescribeAccountCommand,
|
|
27
|
+
DescribeCreateAccountStatusCommand,
|
|
28
|
+
DescribeEffectivePolicyCommand,
|
|
29
|
+
DescribeHandshakeCommand,
|
|
30
|
+
DescribeOrganizationCommand,
|
|
31
|
+
DescribeOrganizationalUnitCommand,
|
|
32
|
+
DescribePolicyCommand,
|
|
33
|
+
DescribeResourcePolicyCommand,
|
|
34
|
+
DetachPolicyCommand,
|
|
35
|
+
DisableAWSServiceAccessCommand,
|
|
36
|
+
DisablePolicyTypeCommand,
|
|
37
|
+
EnableAWSServiceAccessCommand,
|
|
38
|
+
EnableAllFeaturesCommand,
|
|
39
|
+
EnablePolicyTypeCommand,
|
|
40
|
+
InviteAccountToOrganizationCommand,
|
|
41
|
+
LeaveOrganizationCommand,
|
|
42
|
+
ListAWSServiceAccessForOrganizationCommand,
|
|
43
|
+
ListAccountsCommand,
|
|
44
|
+
ListAccountsForParentCommand,
|
|
45
|
+
ListChildrenCommand,
|
|
46
|
+
ListCreateAccountStatusCommand,
|
|
47
|
+
ListDelegatedAdministratorsCommand,
|
|
48
|
+
ListDelegatedServicesForAccountCommand,
|
|
49
|
+
ListHandshakesForAccountCommand,
|
|
50
|
+
ListHandshakesForOrganizationCommand,
|
|
51
|
+
ListOrganizationalUnitsForParentCommand,
|
|
52
|
+
ListParentsCommand,
|
|
53
|
+
ListPoliciesCommand,
|
|
54
|
+
ListPoliciesForTargetCommand,
|
|
55
|
+
ListRootsCommand,
|
|
56
|
+
ListTagsForResourceCommand,
|
|
57
|
+
ListTargetsForPolicyCommand,
|
|
58
|
+
MoveAccountCommand,
|
|
59
|
+
PutResourcePolicyCommand,
|
|
60
|
+
RegisterDelegatedAdministratorCommand,
|
|
61
|
+
RemoveAccountFromOrganizationCommand,
|
|
62
|
+
TagResourceCommand,
|
|
63
|
+
UntagResourceCommand,
|
|
64
|
+
UpdateOrganizationalUnitCommand,
|
|
65
|
+
UpdatePolicyCommand,
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @since 1.0.0
|
|
69
|
+
* @category constructors
|
|
70
|
+
*/
|
|
71
|
+
export const makeOrganizationsService = Effect.gen(function* () {
|
|
72
|
+
const client = yield* Instance.OrganizationsClientInstance;
|
|
73
|
+
return Service.fromClientAndCommands(client, commands, AllServiceErrors);
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* @since 1.0.0
|
|
77
|
+
* @category models
|
|
78
|
+
*/
|
|
79
|
+
export class OrganizationsService extends Effect.Tag("@effect-aws/client-organizations/OrganizationsService")() {
|
|
80
|
+
static defaultLayer = Layer.effect(this, makeOrganizationsService).pipe(Layer.provide(Instance.layer));
|
|
81
|
+
static layer = (config) => Layer.effect(this, makeOrganizationsService).pipe(Layer.provide(Instance.layer), Layer.provide(OrganizationsServiceConfig.setOrganizationsServiceConfig(config)));
|
|
82
|
+
static baseLayer = (evaluate) => Layer.effect(this, makeOrganizationsService).pipe(Layer.provide(Layer.effect(Instance.OrganizationsClientInstance, Effect.map(OrganizationsServiceConfig.toOrganizationsClientConfig, evaluate))));
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=OrganizationsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationsService.js","sourceRoot":"","sources":["../../src/OrganizationsService.ts"],"names":[],"mappings":"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"}
|
|
@@ -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 organizations service config
|
|
8
|
+
*/
|
|
9
|
+
const currentOrganizationsServiceConfig = globalValue("@effect-aws/client-organizations/currentOrganizationsServiceConfig", () => FiberRef.unsafeMake({}));
|
|
10
|
+
/**
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category organizations service config
|
|
13
|
+
*/
|
|
14
|
+
export const withOrganizationsServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentOrganizationsServiceConfig, config));
|
|
15
|
+
/**
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
* @category organizations service config
|
|
18
|
+
*/
|
|
19
|
+
export const setOrganizationsServiceConfig = (config) => Layer.locallyScoped(currentOrganizationsServiceConfig, config);
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category adapters
|
|
23
|
+
*/
|
|
24
|
+
export const toOrganizationsClientConfig = Effect.gen(function* () {
|
|
25
|
+
const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentOrganizationsServiceConfig);
|
|
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=OrganizationsServiceConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationsServiceConfig.js","sourceRoot":"","sources":["../../src/OrganizationsServiceConfig.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,iCAAiC,GAAG,WAAW,CACnD,oEAAoE,EACpE,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAA8B,EAAE,CAAC,CAC3D,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAGvC,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAmC,EAA0B,EAAE,CACvG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,iCAAiC,EAAE,MAAM,CAAC,CACpE,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,MAAmC,EAAE,EAAE,CACnF,KAAK,CAAC,aAAa,CAAC,iCAAiC,EAAE,MAAM,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAA6C,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACvG,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;IAEpG,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,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OrganizationsService } from "./OrganizationsService.js";
|
|
5
|
+
/**
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
export * from "./Errors.js";
|
|
9
|
+
/**
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
export * as OrganizationsClientInstance from "./OrganizationsClientInstance.js";
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
export * as OrganizationsServiceConfig from "./OrganizationsServiceConfig.js";
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
export * from "./OrganizationsService.js";
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category exports
|
|
24
|
+
* @alias OrganizationsService
|
|
25
|
+
*/
|
|
26
|
+
export const Organizations = OrganizationsService;
|
|
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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,2BAA2B,MAAM,kCAAkC,CAAC;AAEhF;;GAEG;AACH,OAAO,KAAK,0BAA0B,MAAM,iCAAiC,CAAC;AAE9E;;GAEG;AACH,cAAc,2BAA2B,CAAC;AAe1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,54 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-aws/client-organizations",
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"description": "Effectful AWS Organizations client",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "github:floydspace/effect-aws",
|
|
9
|
+
"directory": "packages/client-organizations"
|
|
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
|
-
"
|
|
9
|
-
|
|
10
|
-
"@
|
|
11
|
-
"@
|
|
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-organizations",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@aws-sdk/client-organizations": "^3",
|
|
19
|
+
"@effect-aws/commons": "^0.1.0"
|
|
23
20
|
},
|
|
24
21
|
"peerDependencies": {
|
|
25
|
-
"effect": ">=3.0.
|
|
22
|
+
"effect": ">=3.0.4 <4.0.0"
|
|
26
23
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
"./Errors": {
|
|
35
|
+
"types": "./dist/dts/Errors.d.ts",
|
|
36
|
+
"import": "./dist/esm/Errors.js",
|
|
37
|
+
"default": "./dist/cjs/Errors.js"
|
|
38
|
+
},
|
|
39
|
+
"./OrganizationsClientInstance": {
|
|
40
|
+
"types": "./dist/dts/OrganizationsClientInstance.d.ts",
|
|
41
|
+
"import": "./dist/esm/OrganizationsClientInstance.js",
|
|
42
|
+
"default": "./dist/cjs/OrganizationsClientInstance.js"
|
|
43
|
+
},
|
|
44
|
+
"./OrganizationsService": {
|
|
45
|
+
"types": "./dist/dts/OrganizationsService.d.ts",
|
|
46
|
+
"import": "./dist/esm/OrganizationsService.js",
|
|
47
|
+
"default": "./dist/cjs/OrganizationsService.js"
|
|
48
|
+
},
|
|
49
|
+
"./OrganizationsServiceConfig": {
|
|
50
|
+
"types": "./dist/dts/OrganizationsServiceConfig.d.ts",
|
|
51
|
+
"import": "./dist/esm/OrganizationsServiceConfig.js",
|
|
52
|
+
"default": "./dist/cjs/OrganizationsServiceConfig.js"
|
|
53
|
+
}
|
|
35
54
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"watch": "npx projen watch",
|
|
52
|
-
"docgen": "docgen"
|
|
55
|
+
"typesVersions": {
|
|
56
|
+
"*": {
|
|
57
|
+
"Errors": [
|
|
58
|
+
"./dist/dts/Errors.d.ts"
|
|
59
|
+
],
|
|
60
|
+
"OrganizationsClientInstance": [
|
|
61
|
+
"./dist/dts/OrganizationsClientInstance.d.ts"
|
|
62
|
+
],
|
|
63
|
+
"OrganizationsService": [
|
|
64
|
+
"./dist/dts/OrganizationsService.d.ts"
|
|
65
|
+
],
|
|
66
|
+
"OrganizationsServiceConfig": [
|
|
67
|
+
"./dist/dts/OrganizationsServiceConfig.d.ts"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
53
70
|
}
|
|
54
71
|
}
|
package/src/Errors.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccessDeniedException,
|
|
3
|
+
AccessDeniedForDependencyException,
|
|
4
|
+
AccountAlreadyClosedException,
|
|
5
|
+
AccountAlreadyRegisteredException,
|
|
6
|
+
AccountNotFoundException,
|
|
7
|
+
AccountNotRegisteredException,
|
|
8
|
+
AccountOwnerNotVerifiedException,
|
|
9
|
+
AlreadyInOrganizationException,
|
|
10
|
+
AWSOrganizationsNotInUseException,
|
|
11
|
+
ChildNotFoundException,
|
|
12
|
+
ConcurrentModificationException,
|
|
13
|
+
ConflictException,
|
|
14
|
+
ConstraintViolationException,
|
|
15
|
+
CreateAccountStatusNotFoundException,
|
|
16
|
+
DestinationParentNotFoundException,
|
|
17
|
+
DuplicateAccountException,
|
|
18
|
+
DuplicateHandshakeException,
|
|
19
|
+
DuplicateOrganizationalUnitException,
|
|
20
|
+
DuplicatePolicyAttachmentException,
|
|
21
|
+
DuplicatePolicyException,
|
|
22
|
+
EffectivePolicyNotFoundException,
|
|
23
|
+
FinalizingOrganizationException,
|
|
24
|
+
HandshakeAlreadyInStateException,
|
|
25
|
+
HandshakeConstraintViolationException,
|
|
26
|
+
HandshakeNotFoundException,
|
|
27
|
+
InvalidHandshakeTransitionException,
|
|
28
|
+
InvalidInputException,
|
|
29
|
+
MalformedPolicyDocumentException,
|
|
30
|
+
MasterCannotLeaveOrganizationException,
|
|
31
|
+
OrganizationalUnitNotEmptyException,
|
|
32
|
+
OrganizationalUnitNotFoundException,
|
|
33
|
+
OrganizationNotEmptyException,
|
|
34
|
+
ParentNotFoundException,
|
|
35
|
+
PolicyChangesInProgressException,
|
|
36
|
+
PolicyInUseException,
|
|
37
|
+
PolicyNotAttachedException,
|
|
38
|
+
PolicyNotFoundException,
|
|
39
|
+
PolicyTypeAlreadyEnabledException,
|
|
40
|
+
PolicyTypeNotAvailableForOrganizationException,
|
|
41
|
+
PolicyTypeNotEnabledException,
|
|
42
|
+
ResourcePolicyNotFoundException,
|
|
43
|
+
RootNotFoundException,
|
|
44
|
+
ServiceException,
|
|
45
|
+
SourceParentNotFoundException,
|
|
46
|
+
TargetNotFoundException,
|
|
47
|
+
TooManyRequestsException,
|
|
48
|
+
UnsupportedAPIEndpointException,
|
|
49
|
+
} from "@aws-sdk/client-organizations";
|
|
50
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
51
|
+
import { SdkError as CommonSdkError } from "@effect-aws/commons";
|
|
52
|
+
|
|
53
|
+
export const AllServiceErrors = [
|
|
54
|
+
"AWSOrganizationsNotInUseException",
|
|
55
|
+
"AccessDeniedException",
|
|
56
|
+
"AccessDeniedForDependencyException",
|
|
57
|
+
"AccountAlreadyClosedException",
|
|
58
|
+
"AccountAlreadyRegisteredException",
|
|
59
|
+
"AccountNotFoundException",
|
|
60
|
+
"AccountNotRegisteredException",
|
|
61
|
+
"AccountOwnerNotVerifiedException",
|
|
62
|
+
"AlreadyInOrganizationException",
|
|
63
|
+
"ChildNotFoundException",
|
|
64
|
+
"ConcurrentModificationException",
|
|
65
|
+
"ConflictException",
|
|
66
|
+
"ConstraintViolationException",
|
|
67
|
+
"CreateAccountStatusNotFoundException",
|
|
68
|
+
"DestinationParentNotFoundException",
|
|
69
|
+
"DuplicateAccountException",
|
|
70
|
+
"DuplicateHandshakeException",
|
|
71
|
+
"DuplicateOrganizationalUnitException",
|
|
72
|
+
"DuplicatePolicyAttachmentException",
|
|
73
|
+
"DuplicatePolicyException",
|
|
74
|
+
"EffectivePolicyNotFoundException",
|
|
75
|
+
"FinalizingOrganizationException",
|
|
76
|
+
"HandshakeAlreadyInStateException",
|
|
77
|
+
"HandshakeConstraintViolationException",
|
|
78
|
+
"HandshakeNotFoundException",
|
|
79
|
+
"InvalidHandshakeTransitionException",
|
|
80
|
+
"InvalidInputException",
|
|
81
|
+
"MalformedPolicyDocumentException",
|
|
82
|
+
"MasterCannotLeaveOrganizationException",
|
|
83
|
+
"OrganizationNotEmptyException",
|
|
84
|
+
"OrganizationalUnitNotEmptyException",
|
|
85
|
+
"OrganizationalUnitNotFoundException",
|
|
86
|
+
"ParentNotFoundException",
|
|
87
|
+
"PolicyChangesInProgressException",
|
|
88
|
+
"PolicyInUseException",
|
|
89
|
+
"PolicyNotAttachedException",
|
|
90
|
+
"PolicyNotFoundException",
|
|
91
|
+
"PolicyTypeAlreadyEnabledException",
|
|
92
|
+
"PolicyTypeNotAvailableForOrganizationException",
|
|
93
|
+
"PolicyTypeNotEnabledException",
|
|
94
|
+
"ResourcePolicyNotFoundException",
|
|
95
|
+
"RootNotFoundException",
|
|
96
|
+
"ServiceException",
|
|
97
|
+
"SourceParentNotFoundException",
|
|
98
|
+
"TargetNotFoundException",
|
|
99
|
+
"TooManyRequestsException",
|
|
100
|
+
"UnsupportedAPIEndpointException",
|
|
101
|
+
] as const;
|
|
102
|
+
|
|
103
|
+
export type AWSOrganizationsNotInUseError = TaggedException<AWSOrganizationsNotInUseException>;
|
|
104
|
+
export type AccessDeniedError = TaggedException<AccessDeniedException>;
|
|
105
|
+
export type AccessDeniedForDependencyError = TaggedException<AccessDeniedForDependencyException>;
|
|
106
|
+
export type AccountAlreadyClosedError = TaggedException<AccountAlreadyClosedException>;
|
|
107
|
+
export type AccountAlreadyRegisteredError = TaggedException<AccountAlreadyRegisteredException>;
|
|
108
|
+
export type AccountNotFoundError = TaggedException<AccountNotFoundException>;
|
|
109
|
+
export type AccountNotRegisteredError = TaggedException<AccountNotRegisteredException>;
|
|
110
|
+
export type AccountOwnerNotVerifiedError = TaggedException<AccountOwnerNotVerifiedException>;
|
|
111
|
+
export type AlreadyInOrganizationError = TaggedException<AlreadyInOrganizationException>;
|
|
112
|
+
export type ChildNotFoundError = TaggedException<ChildNotFoundException>;
|
|
113
|
+
export type ConcurrentModificationError = TaggedException<ConcurrentModificationException>;
|
|
114
|
+
export type ConflictError = TaggedException<ConflictException>;
|
|
115
|
+
export type ConstraintViolationError = TaggedException<ConstraintViolationException>;
|
|
116
|
+
export type CreateAccountStatusNotFoundError = TaggedException<CreateAccountStatusNotFoundException>;
|
|
117
|
+
export type DestinationParentNotFoundError = TaggedException<DestinationParentNotFoundException>;
|
|
118
|
+
export type DuplicateAccountError = TaggedException<DuplicateAccountException>;
|
|
119
|
+
export type DuplicateHandshakeError = TaggedException<DuplicateHandshakeException>;
|
|
120
|
+
export type DuplicateOrganizationalUnitError = TaggedException<DuplicateOrganizationalUnitException>;
|
|
121
|
+
export type DuplicatePolicyAttachmentError = TaggedException<DuplicatePolicyAttachmentException>;
|
|
122
|
+
export type DuplicatePolicyError = TaggedException<DuplicatePolicyException>;
|
|
123
|
+
export type EffectivePolicyNotFoundError = TaggedException<EffectivePolicyNotFoundException>;
|
|
124
|
+
export type FinalizingOrganizationError = TaggedException<FinalizingOrganizationException>;
|
|
125
|
+
export type HandshakeAlreadyInStateError = TaggedException<HandshakeAlreadyInStateException>;
|
|
126
|
+
export type HandshakeConstraintViolationError = TaggedException<HandshakeConstraintViolationException>;
|
|
127
|
+
export type HandshakeNotFoundError = TaggedException<HandshakeNotFoundException>;
|
|
128
|
+
export type InvalidHandshakeTransitionError = TaggedException<InvalidHandshakeTransitionException>;
|
|
129
|
+
export type InvalidInputError = TaggedException<InvalidInputException>;
|
|
130
|
+
export type MalformedPolicyDocumentError = TaggedException<MalformedPolicyDocumentException>;
|
|
131
|
+
export type MasterCannotLeaveOrganizationError = TaggedException<MasterCannotLeaveOrganizationException>;
|
|
132
|
+
export type OrganizationNotEmptyError = TaggedException<OrganizationNotEmptyException>;
|
|
133
|
+
export type OrganizationalUnitNotEmptyError = TaggedException<OrganizationalUnitNotEmptyException>;
|
|
134
|
+
export type OrganizationalUnitNotFoundError = TaggedException<OrganizationalUnitNotFoundException>;
|
|
135
|
+
export type ParentNotFoundError = TaggedException<ParentNotFoundException>;
|
|
136
|
+
export type PolicyChangesInProgressError = TaggedException<PolicyChangesInProgressException>;
|
|
137
|
+
export type PolicyInUseError = TaggedException<PolicyInUseException>;
|
|
138
|
+
export type PolicyNotAttachedError = TaggedException<PolicyNotAttachedException>;
|
|
139
|
+
export type PolicyNotFoundError = TaggedException<PolicyNotFoundException>;
|
|
140
|
+
export type PolicyTypeAlreadyEnabledError = TaggedException<PolicyTypeAlreadyEnabledException>;
|
|
141
|
+
export type PolicyTypeNotAvailableForOrganizationError = TaggedException<
|
|
142
|
+
PolicyTypeNotAvailableForOrganizationException
|
|
143
|
+
>;
|
|
144
|
+
export type PolicyTypeNotEnabledError = TaggedException<PolicyTypeNotEnabledException>;
|
|
145
|
+
export type ResourcePolicyNotFoundError = TaggedException<ResourcePolicyNotFoundException>;
|
|
146
|
+
export type RootNotFoundError = TaggedException<RootNotFoundException>;
|
|
147
|
+
export type ServiceError = TaggedException<ServiceException>;
|
|
148
|
+
export type SourceParentNotFoundError = TaggedException<SourceParentNotFoundException>;
|
|
149
|
+
export type TargetNotFoundError = TaggedException<TargetNotFoundException>;
|
|
150
|
+
export type TooManyRequestsError = TaggedException<TooManyRequestsException>;
|
|
151
|
+
export type UnsupportedAPIEndpointError = TaggedException<UnsupportedAPIEndpointException>;
|
|
152
|
+
|
|
153
|
+
export type SdkError = CommonSdkError;
|
|
154
|
+
export const SdkError = CommonSdkError;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { OrganizationsClient } from "@aws-sdk/client-organizations";
|
|
5
|
+
import { Context, Effect, Layer } from "effect";
|
|
6
|
+
import * as OrganizationsServiceConfig from "./OrganizationsServiceConfig.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category tags
|
|
11
|
+
*/
|
|
12
|
+
export class OrganizationsClientInstance extends Context.Tag(
|
|
13
|
+
"@effect-aws/client-organizations/OrganizationsClientInstance",
|
|
14
|
+
)<OrganizationsClientInstance, OrganizationsClient>() {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
* @category constructors
|
|
19
|
+
*/
|
|
20
|
+
export const make = Effect.flatMap(
|
|
21
|
+
OrganizationsServiceConfig.toOrganizationsClientConfig,
|
|
22
|
+
(config) =>
|
|
23
|
+
Effect.acquireRelease(
|
|
24
|
+
Effect.sync(() => new OrganizationsClient(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(OrganizationsClientInstance, make);
|