@effect-aws/client-elasticache 1.5.0 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/ElastiCacheClientInstance/package.json +6 -0
  2. package/ElastiCacheService/package.json +6 -0
  3. package/ElastiCacheServiceConfig/package.json +6 -0
  4. package/Errors/package.json +6 -0
  5. package/dist/cjs/ElastiCacheClientInstance.d.ts +24 -0
  6. package/dist/cjs/ElastiCacheClientInstance.d.ts.map +1 -0
  7. package/dist/cjs/ElastiCacheClientInstance.js +50 -0
  8. package/dist/cjs/ElastiCacheClientInstance.js.map +1 -0
  9. package/dist/cjs/ElastiCacheService.d.ts +341 -0
  10. package/dist/cjs/ElastiCacheService.d.ts.map +1 -0
  11. package/dist/cjs/ElastiCacheService.js +134 -0
  12. package/dist/cjs/ElastiCacheService.js.map +1 -0
  13. package/dist/cjs/ElastiCacheServiceConfig.d.ts +25 -0
  14. package/dist/cjs/ElastiCacheServiceConfig.d.ts.map +1 -0
  15. package/dist/cjs/ElastiCacheServiceConfig.js +35 -0
  16. package/dist/cjs/ElastiCacheServiceConfig.js.map +1 -0
  17. package/{lib → dist/cjs}/Errors.d.ts +7 -12
  18. package/dist/cjs/Errors.d.ts.map +1 -0
  19. package/dist/cjs/Errors.js +84 -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/ElastiCacheClientInstance.d.ts +24 -0
  26. package/dist/dts/ElastiCacheClientInstance.d.ts.map +1 -0
  27. package/dist/dts/ElastiCacheService.d.ts +341 -0
  28. package/dist/dts/ElastiCacheService.d.ts.map +1 -0
  29. package/dist/dts/ElastiCacheServiceConfig.d.ts +25 -0
  30. package/dist/dts/ElastiCacheServiceConfig.d.ts.map +1 -0
  31. package/dist/dts/Errors.d.ts +83 -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/ElastiCacheClientInstance.js +23 -0
  36. package/dist/esm/ElastiCacheClientInstance.js.map +1 -0
  37. package/dist/esm/ElastiCacheService.js +107 -0
  38. package/dist/esm/ElastiCacheService.js.map +1 -0
  39. package/dist/esm/ElastiCacheServiceConfig.js +31 -0
  40. package/dist/esm/ElastiCacheServiceConfig.js.map +1 -0
  41. package/dist/esm/Errors.js +81 -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/ElastiCacheClientInstance.ts +33 -0
  48. package/src/ElastiCacheService.ts +1662 -0
  49. package/src/ElastiCacheServiceConfig.ts +52 -0
  50. package/src/Errors.ts +245 -0
  51. package/src/index.ts +44 -0
  52. package/CHANGELOG.md +0 -43
  53. package/docgen.json +0 -8
  54. package/lib/ElastiCacheClientInstance.d.ts +0 -31
  55. package/lib/ElastiCacheClientInstance.js +0 -57
  56. package/lib/ElastiCacheClientInstanceConfig.d.ts +0 -23
  57. package/lib/ElastiCacheClientInstanceConfig.js +0 -44
  58. package/lib/ElastiCacheService.d.ts +0 -440
  59. package/lib/ElastiCacheService.js +0 -163
  60. package/lib/Errors.js +0 -84
  61. package/lib/esm/ElastiCacheClientInstance.js +0 -30
  62. package/lib/esm/ElastiCacheClientInstanceConfig.js +0 -40
  63. package/lib/esm/ElastiCacheService.js +0 -159
  64. package/lib/esm/Errors.js +0 -81
  65. package/lib/esm/index.js +0 -5
  66. package/lib/index.d.ts +0 -4
  67. package/lib/index.js +0 -21
  68. package/project.json +0 -77
  69. package/vitest.config.ts +0 -3
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { ElastiCacheClient } from "@aws-sdk/client-elasticache";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as ElastiCacheServiceConfig from "./ElastiCacheServiceConfig.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category tags
10
+ */
11
+ export class ElastiCacheClientInstance extends Context.Tag("@effect-aws/client-elasticache/ElastiCacheClientInstance")() {
12
+ }
13
+ /**
14
+ * @since 1.0.0
15
+ * @category constructors
16
+ */
17
+ export const make = Effect.flatMap(ElastiCacheServiceConfig.toElastiCacheClientConfig, (config) => Effect.acquireRelease(Effect.sync(() => new ElastiCacheClient(config)), (client) => Effect.sync(() => client.destroy())));
18
+ /**
19
+ * @since 1.0.0
20
+ * @category layers
21
+ */
22
+ export const layer = Layer.scoped(ElastiCacheClientInstance, make);
23
+ //# sourceMappingURL=ElastiCacheClientInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElastiCacheClientInstance.js","sourceRoot":"","sources":["../../src/ElastiCacheClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,wBAAwB,MAAM,+BAA+B,CAAC;AAE1E;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAAO,CAAC,GAAG,CACxD,0DAA0D,CAC3D,EAAgD;CAAG;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,wBAAwB,CAAC,yBAAyB,EAClD,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAChD,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,yBAAyB,EAAE,IAAI,CAAC,CAAC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { AddTagsToResourceCommand, AuthorizeCacheSecurityGroupIngressCommand, BatchApplyUpdateActionCommand, BatchStopUpdateActionCommand, CompleteMigrationCommand, CopyServerlessCacheSnapshotCommand, CopySnapshotCommand, CreateCacheClusterCommand, CreateCacheParameterGroupCommand, CreateCacheSecurityGroupCommand, CreateCacheSubnetGroupCommand, CreateGlobalReplicationGroupCommand, CreateReplicationGroupCommand, CreateServerlessCacheCommand, CreateServerlessCacheSnapshotCommand, CreateSnapshotCommand, CreateUserCommand, CreateUserGroupCommand, DecreaseNodeGroupsInGlobalReplicationGroupCommand, DecreaseReplicaCountCommand, DeleteCacheClusterCommand, DeleteCacheParameterGroupCommand, DeleteCacheSecurityGroupCommand, DeleteCacheSubnetGroupCommand, DeleteGlobalReplicationGroupCommand, DeleteReplicationGroupCommand, DeleteServerlessCacheCommand, DeleteServerlessCacheSnapshotCommand, DeleteSnapshotCommand, DeleteUserCommand, DeleteUserGroupCommand, DescribeCacheClustersCommand, DescribeCacheEngineVersionsCommand, DescribeCacheParameterGroupsCommand, DescribeCacheParametersCommand, DescribeCacheSecurityGroupsCommand, DescribeCacheSubnetGroupsCommand, DescribeEngineDefaultParametersCommand, DescribeEventsCommand, DescribeGlobalReplicationGroupsCommand, DescribeReplicationGroupsCommand, DescribeReservedCacheNodesCommand, DescribeReservedCacheNodesOfferingsCommand, DescribeServerlessCachesCommand, DescribeServerlessCacheSnapshotsCommand, DescribeServiceUpdatesCommand, DescribeSnapshotsCommand, DescribeUpdateActionsCommand, DescribeUserGroupsCommand, DescribeUsersCommand, DisassociateGlobalReplicationGroupCommand, ExportServerlessCacheSnapshotCommand, FailoverGlobalReplicationGroupCommand, IncreaseNodeGroupsInGlobalReplicationGroupCommand, IncreaseReplicaCountCommand, ListAllowedNodeTypeModificationsCommand, ListTagsForResourceCommand, ModifyCacheClusterCommand, ModifyCacheParameterGroupCommand, ModifyCacheSubnetGroupCommand, ModifyGlobalReplicationGroupCommand, ModifyReplicationGroupCommand, ModifyReplicationGroupShardConfigurationCommand, ModifyServerlessCacheCommand, ModifyUserCommand, ModifyUserGroupCommand, PurchaseReservedCacheNodesOfferingCommand, RebalanceSlotsInGlobalReplicationGroupCommand, RebootCacheClusterCommand, RemoveTagsFromResourceCommand, ResetCacheParameterGroupCommand, RevokeCacheSecurityGroupIngressCommand, StartMigrationCommand, TestFailoverCommand, TestMigrationCommand, } from "@aws-sdk/client-elasticache";
5
+ import { Service } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import * as Instance from "./ElastiCacheClientInstance.js";
8
+ import * as ElastiCacheServiceConfig from "./ElastiCacheServiceConfig.js";
9
+ import { AllServiceErrors } from "./Errors.js";
10
+ const commands = {
11
+ AddTagsToResourceCommand,
12
+ AuthorizeCacheSecurityGroupIngressCommand,
13
+ BatchApplyUpdateActionCommand,
14
+ BatchStopUpdateActionCommand,
15
+ CompleteMigrationCommand,
16
+ CopyServerlessCacheSnapshotCommand,
17
+ CopySnapshotCommand,
18
+ CreateCacheClusterCommand,
19
+ CreateCacheParameterGroupCommand,
20
+ CreateCacheSecurityGroupCommand,
21
+ CreateCacheSubnetGroupCommand,
22
+ CreateGlobalReplicationGroupCommand,
23
+ CreateReplicationGroupCommand,
24
+ CreateServerlessCacheCommand,
25
+ CreateServerlessCacheSnapshotCommand,
26
+ CreateSnapshotCommand,
27
+ CreateUserCommand,
28
+ CreateUserGroupCommand,
29
+ DecreaseNodeGroupsInGlobalReplicationGroupCommand,
30
+ DecreaseReplicaCountCommand,
31
+ DeleteCacheClusterCommand,
32
+ DeleteCacheParameterGroupCommand,
33
+ DeleteCacheSecurityGroupCommand,
34
+ DeleteCacheSubnetGroupCommand,
35
+ DeleteGlobalReplicationGroupCommand,
36
+ DeleteReplicationGroupCommand,
37
+ DeleteServerlessCacheCommand,
38
+ DeleteServerlessCacheSnapshotCommand,
39
+ DeleteSnapshotCommand,
40
+ DeleteUserCommand,
41
+ DeleteUserGroupCommand,
42
+ DescribeCacheClustersCommand,
43
+ DescribeCacheEngineVersionsCommand,
44
+ DescribeCacheParameterGroupsCommand,
45
+ DescribeCacheParametersCommand,
46
+ DescribeCacheSecurityGroupsCommand,
47
+ DescribeCacheSubnetGroupsCommand,
48
+ DescribeEngineDefaultParametersCommand,
49
+ DescribeEventsCommand,
50
+ DescribeGlobalReplicationGroupsCommand,
51
+ DescribeReplicationGroupsCommand,
52
+ DescribeReservedCacheNodesCommand,
53
+ DescribeReservedCacheNodesOfferingsCommand,
54
+ DescribeServerlessCacheSnapshotsCommand,
55
+ DescribeServerlessCachesCommand,
56
+ DescribeServiceUpdatesCommand,
57
+ DescribeSnapshotsCommand,
58
+ DescribeUpdateActionsCommand,
59
+ DescribeUserGroupsCommand,
60
+ DescribeUsersCommand,
61
+ DisassociateGlobalReplicationGroupCommand,
62
+ ExportServerlessCacheSnapshotCommand,
63
+ FailoverGlobalReplicationGroupCommand,
64
+ IncreaseNodeGroupsInGlobalReplicationGroupCommand,
65
+ IncreaseReplicaCountCommand,
66
+ ListAllowedNodeTypeModificationsCommand,
67
+ ListTagsForResourceCommand,
68
+ ModifyCacheClusterCommand,
69
+ ModifyCacheParameterGroupCommand,
70
+ ModifyCacheSubnetGroupCommand,
71
+ ModifyGlobalReplicationGroupCommand,
72
+ ModifyReplicationGroupCommand,
73
+ ModifyReplicationGroupShardConfigurationCommand,
74
+ ModifyServerlessCacheCommand,
75
+ ModifyUserCommand,
76
+ ModifyUserGroupCommand,
77
+ PurchaseReservedCacheNodesOfferingCommand,
78
+ RebalanceSlotsInGlobalReplicationGroupCommand,
79
+ RebootCacheClusterCommand,
80
+ RemoveTagsFromResourceCommand,
81
+ ResetCacheParameterGroupCommand,
82
+ RevokeCacheSecurityGroupIngressCommand,
83
+ StartMigrationCommand,
84
+ TestFailoverCommand,
85
+ TestMigrationCommand,
86
+ };
87
+ /**
88
+ * @since 1.0.0
89
+ * @category constructors
90
+ */
91
+ export const makeElastiCacheService = Effect.gen(function* () {
92
+ const client = yield* Instance.ElastiCacheClientInstance;
93
+ return Service.fromClientAndCommands(client, commands, {
94
+ errorTags: AllServiceErrors,
95
+ resolveClientConfig: ElastiCacheServiceConfig.toElastiCacheClientConfig,
96
+ });
97
+ });
98
+ /**
99
+ * @since 1.0.0
100
+ * @category models
101
+ */
102
+ export class ElastiCacheService extends Effect.Tag("@effect-aws/client-elasticache/ElastiCacheService")() {
103
+ static defaultLayer = Layer.effect(this, makeElastiCacheService).pipe(Layer.provide(Instance.layer));
104
+ static layer = (config) => Layer.effect(this, makeElastiCacheService).pipe(Layer.provide(Instance.layer), Layer.provide(ElastiCacheServiceConfig.setElastiCacheServiceConfig(config)));
105
+ static baseLayer = (evaluate) => Layer.effect(this, makeElastiCacheService).pipe(Layer.provide(Layer.effect(Instance.ElastiCacheClientInstance, Effect.map(ElastiCacheServiceConfig.toElastiCacheClientConfig, evaluate))));
106
+ }
107
+ //# sourceMappingURL=ElastiCacheService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElastiCacheService.js","sourceRoot":"","sources":["../../src/ElastiCacheService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,wBAAwB,EAGxB,yCAAyC,EAGzC,6BAA6B,EAG7B,4BAA4B,EAG5B,wBAAwB,EAGxB,kCAAkC,EAGlC,mBAAmB,EAGnB,yBAAyB,EAGzB,gCAAgC,EAGhC,+BAA+B,EAG/B,6BAA6B,EAG7B,mCAAmC,EAGnC,6BAA6B,EAG7B,4BAA4B,EAG5B,oCAAoC,EAGpC,qBAAqB,EAGrB,iBAAiB,EAGjB,sBAAsB,EAGtB,iDAAiD,EAGjD,2BAA2B,EAG3B,yBAAyB,EAGzB,gCAAgC,EAGhC,+BAA+B,EAG/B,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EACR;QACE,SAAS,EAAE,gBAAgB;QAC3B,mBAAmB,EAAE,wBAAwB,CAAC,yBAAyB;KACxE,CACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,GAAG,CAAC,mDAAmD,CAAC,EAGpG;IACD,MAAM,CAAU,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9G,MAAM,CAAU,KAAK,GAAG,CAAC,MAAiC,EAAE,EAAE,CAC5D,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC,IAAI,CAC7C,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC7B,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAC5E,CAAC;IACJ,MAAM,CAAU,SAAS,GAAG,CAC1B,QAAuE,EACvE,EAAE,CACF,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC,IAAI,CAC7C,KAAK,CAAC,OAAO,CACX,KAAK,CAAC,MAAM,CACV,QAAQ,CAAC,yBAAyB,EAClC,MAAM,CAAC,GAAG,CAAC,wBAAwB,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CACzE,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 elasticache service config
8
+ */
9
+ const currentElastiCacheServiceConfig = globalValue("@effect-aws/client-elasticache/currentElastiCacheServiceConfig", () => FiberRef.unsafeMake({}));
10
+ /**
11
+ * @since 1.0.0
12
+ * @category elasticache service config
13
+ */
14
+ export const withElastiCacheServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentElastiCacheServiceConfig, config));
15
+ /**
16
+ * @since 1.0.0
17
+ * @category elasticache service config
18
+ */
19
+ export const setElastiCacheServiceConfig = (config) => Layer.locallyScoped(currentElastiCacheServiceConfig, config);
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export const toElastiCacheClientConfig = Effect.gen(function* () {
25
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentElastiCacheServiceConfig);
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=ElastiCacheServiceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElastiCacheServiceConfig.js","sourceRoot":"","sources":["../../src/ElastiCacheServiceConfig.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,+BAA+B,GAAG,WAAW,CACjD,gEAAgE,EAChE,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAA4B,EAAE,CAAC,CACzD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAGrC,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAiC,EAA0B,EAAE,CACrG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,+BAA+B,EAAE,MAAM,CAAC,CAClE,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,MAAiC,EAAE,EAAE,CAC/E,KAAK,CAAC,aAAa,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA2C,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnG,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAElG,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,81 @@
1
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
2
+ export const AllServiceErrors = [
3
+ "APICallRateForCustomerExceededFault",
4
+ "AuthorizationAlreadyExistsFault",
5
+ "AuthorizationNotFoundFault",
6
+ "CacheClusterAlreadyExistsFault",
7
+ "CacheClusterNotFoundFault",
8
+ "CacheParameterGroupAlreadyExistsFault",
9
+ "CacheParameterGroupNotFoundFault",
10
+ "CacheParameterGroupQuotaExceededFault",
11
+ "CacheSecurityGroupAlreadyExistsFault",
12
+ "CacheSecurityGroupNotFoundFault",
13
+ "CacheSecurityGroupQuotaExceededFault",
14
+ "CacheSubnetGroupAlreadyExistsFault",
15
+ "CacheSubnetGroupInUse",
16
+ "CacheSubnetGroupNotFoundFault",
17
+ "CacheSubnetGroupQuotaExceededFault",
18
+ "CacheSubnetQuotaExceededFault",
19
+ "ClusterQuotaForCustomerExceededFault",
20
+ "DefaultUserAssociatedToUserGroupFault",
21
+ "DefaultUserRequired",
22
+ "DuplicateUserNameFault",
23
+ "GlobalReplicationGroupAlreadyExistsFault",
24
+ "GlobalReplicationGroupNotFoundFault",
25
+ "InsufficientCacheClusterCapacityFault",
26
+ "InvalidARNFault",
27
+ "InvalidCacheClusterStateFault",
28
+ "InvalidCacheParameterGroupStateFault",
29
+ "InvalidCacheSecurityGroupStateFault",
30
+ "InvalidCredentialsException",
31
+ "InvalidGlobalReplicationGroupStateFault",
32
+ "InvalidKMSKeyFault",
33
+ "InvalidParameterCombinationException",
34
+ "InvalidParameterValueException",
35
+ "InvalidReplicationGroupStateFault",
36
+ "InvalidServerlessCacheSnapshotStateFault",
37
+ "InvalidServerlessCacheStateFault",
38
+ "InvalidSnapshotStateFault",
39
+ "InvalidSubnet",
40
+ "InvalidUserGroupStateFault",
41
+ "InvalidUserStateFault",
42
+ "InvalidVPCNetworkStateFault",
43
+ "NoOperationFault",
44
+ "NodeGroupNotFoundFault",
45
+ "NodeGroupsPerReplicationGroupQuotaExceededFault",
46
+ "NodeQuotaForClusterExceededFault",
47
+ "NodeQuotaForCustomerExceededFault",
48
+ "ReplicationGroupAlreadyExistsFault",
49
+ "ReplicationGroupAlreadyUnderMigrationFault",
50
+ "ReplicationGroupNotFoundFault",
51
+ "ReplicationGroupNotUnderMigrationFault",
52
+ "ReservedCacheNodeAlreadyExistsFault",
53
+ "ReservedCacheNodeNotFoundFault",
54
+ "ReservedCacheNodeQuotaExceededFault",
55
+ "ReservedCacheNodesOfferingNotFoundFault",
56
+ "ServerlessCacheAlreadyExistsFault",
57
+ "ServerlessCacheNotFoundFault",
58
+ "ServerlessCacheQuotaForCustomerExceededFault",
59
+ "ServerlessCacheSnapshotAlreadyExistsFault",
60
+ "ServerlessCacheSnapshotNotFoundFault",
61
+ "ServerlessCacheSnapshotQuotaExceededFault",
62
+ "ServiceLinkedRoleNotFoundFault",
63
+ "ServiceUpdateNotFoundFault",
64
+ "SnapshotAlreadyExistsFault",
65
+ "SnapshotFeatureNotSupportedFault",
66
+ "SnapshotNotFoundFault",
67
+ "SnapshotQuotaExceededFault",
68
+ "SubnetInUse",
69
+ "SubnetNotAllowedFault",
70
+ "TagNotFoundFault",
71
+ "TagQuotaPerResourceExceeded",
72
+ "TestFailoverNotAvailableFault",
73
+ "UserAlreadyExistsFault",
74
+ "UserGroupAlreadyExistsFault",
75
+ "UserGroupNotFoundFault",
76
+ "UserGroupQuotaExceededFault",
77
+ "UserNotFoundFault",
78
+ "UserQuotaExceededFault",
79
+ ];
80
+ export const SdkError = CommonSdkError;
81
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AA+EA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,qCAAqC;IACrC,iCAAiC;IACjC,4BAA4B;IAC5B,gCAAgC;IAChC,2BAA2B;IAC3B,uCAAuC;IACvC,kCAAkC;IAClC,uCAAuC;IACvC,sCAAsC;IACtC,iCAAiC;IACjC,sCAAsC;IACtC,oCAAoC;IACpC,uBAAuB;IACvB,+BAA+B;IAC/B,oCAAoC;IACpC,+BAA+B;IAC/B,sCAAsC;IACtC,uCAAuC;IACvC,qBAAqB;IACrB,wBAAwB;IACxB,0CAA0C;IAC1C,qCAAqC;IACrC,uCAAuC;IACvC,iBAAiB;IACjB,+BAA+B;IAC/B,sCAAsC;IACtC,qCAAqC;IACrC,6BAA6B;IAC7B,yCAAyC;IACzC,oBAAoB;IACpB,sCAAsC;IACtC,gCAAgC;IAChC,mCAAmC;IACnC,0CAA0C;IAC1C,kCAAkC;IAClC,2BAA2B;IAC3B,eAAe;IACf,4BAA4B;IAC5B,uBAAuB;IACvB,6BAA6B;IAC7B,kBAAkB;IAClB,wBAAwB;IACxB,iDAAiD;IACjD,kCAAkC;IAClC,mCAAmC;IACnC,oCAAoC;IACpC,4CAA4C;IAC5C,+BAA+B;IAC/B,wCAAwC;IACxC,qCAAqC;IACrC,gCAAgC;IAChC,qCAAqC;IACrC,yCAAyC;IACzC,mCAAmC;IACnC,8BAA8B;IAC9B,8CAA8C;IAC9C,2CAA2C;IAC3C,sCAAsC;IACtC,2CAA2C;IAC3C,gCAAgC;IAChC,4BAA4B;IAC5B,4BAA4B;IAC5B,kCAAkC;IAClC,uBAAuB;IACvB,4BAA4B;IAC5B,aAAa;IACb,uBAAuB;IACvB,kBAAkB;IAClB,6BAA6B;IAC7B,+BAA+B;IAC/B,wBAAwB;IACxB,6BAA6B;IAC7B,wBAAwB;IACxB,6BAA6B;IAC7B,mBAAmB;IACnB,wBAAwB;CAChB,CAAC;AAsFX,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { ElastiCacheService } from "./ElastiCacheService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as ElastiCacheClientInstance from "./ElastiCacheClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as ElastiCacheServiceConfig from "./ElastiCacheServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./ElastiCacheService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias ElastiCacheService
25
+ */
26
+ export const ElastiCache = ElastiCacheService;
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,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,yBAAyB,MAAM,gCAAgC,CAAC;AAE5E;;GAEG;AACH,OAAO,KAAK,wBAAwB,MAAM,+BAA+B,CAAC;AAE1E;;GAEG;AACH,cAAc,yBAAyB,CAAC;AAexC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,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-elasticache",
3
+ "version": "1.9.3",
4
+ "description": "Effectful AWS ElastiCache client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-elasticache"
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-elasticache",
17
+ "dependencies": {
18
+ "@aws-sdk/client-elasticache": "^3",
19
+ "@effect-aws/commons": "^0.2.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-elasticache": "^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
+ "./ElastiCacheClientInstance": {
35
+ "types": "./dist/dts/ElastiCacheClientInstance.d.ts",
36
+ "import": "./dist/esm/ElastiCacheClientInstance.js",
37
+ "default": "./dist/cjs/ElastiCacheClientInstance.js"
38
+ },
39
+ "./ElastiCacheService": {
40
+ "types": "./dist/dts/ElastiCacheService.d.ts",
41
+ "import": "./dist/esm/ElastiCacheService.js",
42
+ "default": "./dist/cjs/ElastiCacheService.js"
43
+ },
44
+ "./ElastiCacheServiceConfig": {
45
+ "types": "./dist/dts/ElastiCacheServiceConfig.d.ts",
46
+ "import": "./dist/esm/ElastiCacheServiceConfig.js",
47
+ "default": "./dist/cjs/ElastiCacheServiceConfig.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.5.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
+ "ElastiCacheClientInstance": [
58
+ "./dist/dts/ElastiCacheClientInstance.d.ts"
59
+ ],
60
+ "ElastiCacheService": [
61
+ "./dist/dts/ElastiCacheService.d.ts"
62
+ ],
63
+ "ElastiCacheServiceConfig": [
64
+ "./dist/dts/ElastiCacheServiceConfig.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 { ElastiCacheClient } from "@aws-sdk/client-elasticache";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as ElastiCacheServiceConfig from "./ElastiCacheServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class ElastiCacheClientInstance extends Context.Tag(
13
+ "@effect-aws/client-elasticache/ElastiCacheClientInstance",
14
+ )<ElastiCacheClientInstance, ElastiCacheClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ ElastiCacheServiceConfig.toElastiCacheClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new ElastiCacheClient(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(ElastiCacheClientInstance, make);