@effect-aws/client-kms 1.10.9 → 2.0.0-beta.1

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 (38) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/dist/dts/KMSClientInstance.d.ts +4 -2
  4. package/dist/dts/KMSClientInstance.d.ts.map +1 -1
  5. package/dist/dts/KMSService.d.ts +58 -58
  6. package/dist/dts/KMSService.d.ts.map +1 -1
  7. package/dist/dts/KMSServiceConfig.d.ts +2 -1
  8. package/dist/dts/KMSServiceConfig.d.ts.map +1 -1
  9. package/dist/esm/KMSClientInstance.js +5 -3
  10. package/dist/esm/KMSClientInstance.js.map +1 -1
  11. package/dist/esm/KMSService.js +4 -2
  12. package/dist/esm/KMSService.js.map +1 -1
  13. package/dist/esm/KMSServiceConfig.js +7 -6
  14. package/dist/esm/KMSServiceConfig.js.map +1 -1
  15. package/package.json +8 -14
  16. package/src/KMSClientInstance.ts +6 -4
  17. package/src/KMSService.ts +59 -63
  18. package/src/KMSServiceConfig.ts +8 -7
  19. package/dist/cjs/Errors.d.ts +0 -55
  20. package/dist/cjs/Errors.d.ts.map +0 -1
  21. package/dist/cjs/Errors.js +0 -54
  22. package/dist/cjs/Errors.js.map +0 -1
  23. package/dist/cjs/KMSClientInstance.d.ts +0 -24
  24. package/dist/cjs/KMSClientInstance.d.ts.map +0 -1
  25. package/dist/cjs/KMSClientInstance.js +0 -50
  26. package/dist/cjs/KMSClientInstance.js.map +0 -1
  27. package/dist/cjs/KMSService.d.ts +0 -258
  28. package/dist/cjs/KMSService.d.ts.map +0 -1
  29. package/dist/cjs/KMSService.js +0 -112
  30. package/dist/cjs/KMSService.js.map +0 -1
  31. package/dist/cjs/KMSServiceConfig.d.ts +0 -25
  32. package/dist/cjs/KMSServiceConfig.d.ts.map +0 -1
  33. package/dist/cjs/KMSServiceConfig.js +0 -35
  34. package/dist/cjs/KMSServiceConfig.js.map +0 -1
  35. package/dist/cjs/index.d.ts +0 -44
  36. package/dist/cjs/index.d.ts.map +0 -1
  37. package/dist/cjs/index.js +0 -56
  38. package/dist/cjs/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"KMSServiceConfig.js","sourceRoot":"","sources":["../../src/KMSServiceConfig.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,uBAAuB,GAAG,WAAW,CACzC,gDAAgD,EAChD,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAoB,EAAE,CAAC,CACjD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAG7B,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAyB,EAA0B,EAAE,CAC7F,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CAC1D,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAEvH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE1F,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"}
1
+ {"version":3,"file":"KMSServiceConfig.js","sourceRoot":"","sources":["../../src/KMSServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAGhD;;;GAGG;AACH,MAAM,uBAAuB,GAAG,UAAU,CAAC,SAAS,CAClD,gDAAgD,EAChD,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAC7B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAG7B,IAAI,CACN,CAAC,EACD,CAAU,MAA8B,EAAE,MAAyB,EAA0B,EAAE,CAC7F,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAEjH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnF,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,uBAAuB,CAAC;IAE5E,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-aws/client-kms",
3
- "version": "1.10.9",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Effectful AWS KMS client",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,40 +16,34 @@
16
16
  "homepage": "https://floydspace.github.io/effect-aws/docs/client-kms",
17
17
  "dependencies": {
18
18
  "@aws-sdk/client-kms": "^3",
19
- "@effect-aws/commons": "^0.3.1"
19
+ "@effect-aws/commons": "^1.0.0-beta.1"
20
20
  },
21
21
  "peerDependencies": {
22
- "effect": ">=3.0.4 <4.0.0"
22
+ "effect": ">=4.0.0 <5.0.0"
23
23
  },
24
- "main": "./dist/cjs/index.js",
25
24
  "module": "./dist/esm/index.js",
26
25
  "types": "./dist/dts/index.d.ts",
27
26
  "exports": {
28
27
  "./package.json": "./package.json",
29
28
  ".": {
30
29
  "types": "./dist/dts/index.d.ts",
31
- "import": "./dist/esm/index.js",
32
- "default": "./dist/cjs/index.js"
30
+ "import": "./dist/esm/index.js"
33
31
  },
34
32
  "./Errors": {
35
33
  "types": "./dist/dts/Errors.d.ts",
36
- "import": "./dist/esm/Errors.js",
37
- "default": "./dist/cjs/Errors.js"
34
+ "import": "./dist/esm/Errors.js"
38
35
  },
39
36
  "./KMSClientInstance": {
40
37
  "types": "./dist/dts/KMSClientInstance.d.ts",
41
- "import": "./dist/esm/KMSClientInstance.js",
42
- "default": "./dist/cjs/KMSClientInstance.js"
38
+ "import": "./dist/esm/KMSClientInstance.js"
43
39
  },
44
40
  "./KMSService": {
45
41
  "types": "./dist/dts/KMSService.d.ts",
46
- "import": "./dist/esm/KMSService.js",
47
- "default": "./dist/cjs/KMSService.js"
42
+ "import": "./dist/esm/KMSService.js"
48
43
  },
49
44
  "./KMSServiceConfig": {
50
45
  "types": "./dist/dts/KMSServiceConfig.d.ts",
51
- "import": "./dist/esm/KMSServiceConfig.js",
52
- "default": "./dist/cjs/KMSServiceConfig.js"
46
+ "import": "./dist/esm/KMSServiceConfig.js"
53
47
  }
54
48
  },
55
49
  "typesVersions": {
@@ -2,16 +2,18 @@
2
2
  * @since 1.0.0
3
3
  */
4
4
  import { KMSClient } from "@aws-sdk/client-kms";
5
- import { Context, Effect, Layer } from "effect";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Layer from "effect/Layer";
7
+ import * as ServiceMap from "effect/ServiceMap";
6
8
  import * as KMSServiceConfig from "./KMSServiceConfig.js";
7
9
 
8
10
  /**
9
11
  * @since 1.0.0
10
12
  * @category tags
11
13
  */
12
- export class KMSClientInstance extends Context.Tag(
14
+ export class KMSClientInstance extends ServiceMap.Service<KMSClientInstance, KMSClient>()(
13
15
  "@effect-aws/client-kms/KMSClientInstance",
14
- )<KMSClientInstance, KMSClient>() {}
16
+ ) {}
15
17
 
16
18
  /**
17
19
  * @since 1.0.0
@@ -30,4 +32,4 @@ export const make = Effect.flatMap(
30
32
  * @since 1.0.0
31
33
  * @category layers
32
34
  */
33
- export const layer = Layer.scoped(KMSClientInstance, make);
35
+ export const layer = Layer.effect(KMSClientInstance, make);
package/src/KMSService.ts CHANGED
@@ -166,8 +166,10 @@ import {
166
166
  } from "@aws-sdk/client-kms";
167
167
  import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
168
168
  import { Service } from "@effect-aws/commons";
169
- import type { Cause } from "effect";
170
- import { Effect, Layer } from "effect";
169
+ import type * as Cause from "effect/Cause";
170
+ import * as Effect from "effect/Effect";
171
+ import * as Layer from "effect/Layer";
172
+ import * as ServiceMap from "effect/ServiceMap";
171
173
  import type {
172
174
  AlreadyExistsError,
173
175
  CloudHsmClusterInUseError,
@@ -290,7 +292,7 @@ interface KMSService$ {
290
292
  options?: HttpHandlerOptions,
291
293
  ): Effect.Effect<
292
294
  CancelKeyDeletionCommandOutput,
293
- | Cause.TimeoutException
295
+ | Cause.TimeoutError
294
296
  | SdkError
295
297
  | DependencyTimeoutError
296
298
  | InvalidArnError
@@ -307,7 +309,7 @@ interface KMSService$ {
307
309
  options?: HttpHandlerOptions,
308
310
  ): Effect.Effect<
309
311
  ConnectCustomKeyStoreCommandOutput,
310
- | Cause.TimeoutException
312
+ | Cause.TimeoutError
311
313
  | SdkError
312
314
  | CloudHsmClusterInvalidConfigurationError
313
315
  | CloudHsmClusterNotActiveError
@@ -324,7 +326,7 @@ interface KMSService$ {
324
326
  options?: HttpHandlerOptions,
325
327
  ): Effect.Effect<
326
328
  CreateAliasCommandOutput,
327
- | Cause.TimeoutException
329
+ | Cause.TimeoutError
328
330
  | SdkError
329
331
  | AlreadyExistsError
330
332
  | DependencyTimeoutError
@@ -343,7 +345,7 @@ interface KMSService$ {
343
345
  options?: HttpHandlerOptions,
344
346
  ): Effect.Effect<
345
347
  CreateCustomKeyStoreCommandOutput,
346
- | Cause.TimeoutException
348
+ | Cause.TimeoutError
347
349
  | SdkError
348
350
  | CloudHsmClusterInUseError
349
351
  | CloudHsmClusterInvalidConfigurationError
@@ -372,7 +374,7 @@ interface KMSService$ {
372
374
  options?: HttpHandlerOptions,
373
375
  ): Effect.Effect<
374
376
  CreateGrantCommandOutput,
375
- | Cause.TimeoutException
377
+ | Cause.TimeoutError
376
378
  | SdkError
377
379
  | DependencyTimeoutError
378
380
  | DisabledError
@@ -393,7 +395,7 @@ interface KMSService$ {
393
395
  options?: HttpHandlerOptions,
394
396
  ): Effect.Effect<
395
397
  CreateKeyCommandOutput,
396
- | Cause.TimeoutException
398
+ | Cause.TimeoutError
397
399
  | SdkError
398
400
  | CloudHsmClusterInvalidConfigurationError
399
401
  | CustomKeyStoreInvalidStateError
@@ -418,7 +420,7 @@ interface KMSService$ {
418
420
  options?: HttpHandlerOptions,
419
421
  ): Effect.Effect<
420
422
  DecryptCommandOutput,
421
- | Cause.TimeoutException
423
+ | Cause.TimeoutError
422
424
  | SdkError
423
425
  | DependencyTimeoutError
424
426
  | DisabledError
@@ -441,7 +443,7 @@ interface KMSService$ {
441
443
  options?: HttpHandlerOptions,
442
444
  ): Effect.Effect<
443
445
  DeleteAliasCommandOutput,
444
- Cause.TimeoutException | SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
446
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
445
447
  >;
446
448
 
447
449
  /**
@@ -452,7 +454,7 @@ interface KMSService$ {
452
454
  options?: HttpHandlerOptions,
453
455
  ): Effect.Effect<
454
456
  DeleteCustomKeyStoreCommandOutput,
455
- | Cause.TimeoutException
457
+ | Cause.TimeoutError
456
458
  | SdkError
457
459
  | CustomKeyStoreHasCMKsError
458
460
  | CustomKeyStoreInvalidStateError
@@ -468,7 +470,7 @@ interface KMSService$ {
468
470
  options?: HttpHandlerOptions,
469
471
  ): Effect.Effect<
470
472
  DeleteImportedKeyMaterialCommandOutput,
471
- | Cause.TimeoutException
473
+ | Cause.TimeoutError
472
474
  | SdkError
473
475
  | DependencyTimeoutError
474
476
  | InvalidArnError
@@ -486,7 +488,7 @@ interface KMSService$ {
486
488
  options?: HttpHandlerOptions,
487
489
  ): Effect.Effect<
488
490
  DeriveSharedSecretCommandOutput,
489
- | Cause.TimeoutException
491
+ | Cause.TimeoutError
490
492
  | SdkError
491
493
  | DependencyTimeoutError
492
494
  | DisabledError
@@ -507,7 +509,7 @@ interface KMSService$ {
507
509
  options?: HttpHandlerOptions,
508
510
  ): Effect.Effect<
509
511
  DescribeCustomKeyStoresCommandOutput,
510
- Cause.TimeoutException | SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
512
+ Cause.TimeoutError | SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
511
513
  >;
512
514
 
513
515
  /**
@@ -518,7 +520,7 @@ interface KMSService$ {
518
520
  options?: HttpHandlerOptions,
519
521
  ): Effect.Effect<
520
522
  DescribeKeyCommandOutput,
521
- Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
523
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
522
524
  >;
523
525
 
524
526
  /**
@@ -529,7 +531,7 @@ interface KMSService$ {
529
531
  options?: HttpHandlerOptions,
530
532
  ): Effect.Effect<
531
533
  DisableKeyCommandOutput,
532
- | Cause.TimeoutException
534
+ | Cause.TimeoutError
533
535
  | SdkError
534
536
  | DependencyTimeoutError
535
537
  | InvalidArnError
@@ -546,7 +548,7 @@ interface KMSService$ {
546
548
  options?: HttpHandlerOptions,
547
549
  ): Effect.Effect<
548
550
  DisableKeyRotationCommandOutput,
549
- | Cause.TimeoutException
551
+ | Cause.TimeoutError
550
552
  | SdkError
551
553
  | DependencyTimeoutError
552
554
  | DisabledError
@@ -565,7 +567,7 @@ interface KMSService$ {
565
567
  options?: HttpHandlerOptions,
566
568
  ): Effect.Effect<
567
569
  DisconnectCustomKeyStoreCommandOutput,
568
- Cause.TimeoutException | SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
570
+ Cause.TimeoutError | SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
569
571
  >;
570
572
 
571
573
  /**
@@ -576,7 +578,7 @@ interface KMSService$ {
576
578
  options?: HttpHandlerOptions,
577
579
  ): Effect.Effect<
578
580
  EnableKeyCommandOutput,
579
- | Cause.TimeoutException
581
+ | Cause.TimeoutError
580
582
  | SdkError
581
583
  | DependencyTimeoutError
582
584
  | InvalidArnError
@@ -594,7 +596,7 @@ interface KMSService$ {
594
596
  options?: HttpHandlerOptions,
595
597
  ): Effect.Effect<
596
598
  EnableKeyRotationCommandOutput,
597
- | Cause.TimeoutException
599
+ | Cause.TimeoutError
598
600
  | SdkError
599
601
  | DependencyTimeoutError
600
602
  | DisabledError
@@ -613,7 +615,7 @@ interface KMSService$ {
613
615
  options?: HttpHandlerOptions,
614
616
  ): Effect.Effect<
615
617
  EncryptCommandOutput,
616
- | Cause.TimeoutException
618
+ | Cause.TimeoutError
617
619
  | SdkError
618
620
  | DependencyTimeoutError
619
621
  | DisabledError
@@ -634,7 +636,7 @@ interface KMSService$ {
634
636
  options?: HttpHandlerOptions,
635
637
  ): Effect.Effect<
636
638
  GenerateDataKeyCommandOutput,
637
- | Cause.TimeoutException
639
+ | Cause.TimeoutError
638
640
  | SdkError
639
641
  | DependencyTimeoutError
640
642
  | DisabledError
@@ -655,7 +657,7 @@ interface KMSService$ {
655
657
  options?: HttpHandlerOptions,
656
658
  ): Effect.Effect<
657
659
  GenerateDataKeyPairCommandOutput,
658
- | Cause.TimeoutException
660
+ | Cause.TimeoutError
659
661
  | SdkError
660
662
  | DependencyTimeoutError
661
663
  | DisabledError
@@ -677,7 +679,7 @@ interface KMSService$ {
677
679
  options?: HttpHandlerOptions,
678
680
  ): Effect.Effect<
679
681
  GenerateDataKeyPairWithoutPlaintextCommandOutput,
680
- | Cause.TimeoutException
682
+ | Cause.TimeoutError
681
683
  | SdkError
682
684
  | DependencyTimeoutError
683
685
  | DisabledError
@@ -699,7 +701,7 @@ interface KMSService$ {
699
701
  options?: HttpHandlerOptions,
700
702
  ): Effect.Effect<
701
703
  GenerateDataKeyWithoutPlaintextCommandOutput,
702
- | Cause.TimeoutException
704
+ | Cause.TimeoutError
703
705
  | SdkError
704
706
  | DependencyTimeoutError
705
707
  | DisabledError
@@ -720,7 +722,7 @@ interface KMSService$ {
720
722
  options?: HttpHandlerOptions,
721
723
  ): Effect.Effect<
722
724
  GenerateMacCommandOutput,
723
- | Cause.TimeoutException
725
+ | Cause.TimeoutError
724
726
  | SdkError
725
727
  | DisabledError
726
728
  | DryRunOperationError
@@ -740,7 +742,7 @@ interface KMSService$ {
740
742
  options?: HttpHandlerOptions,
741
743
  ): Effect.Effect<
742
744
  GenerateRandomCommandOutput,
743
- | Cause.TimeoutException
745
+ | Cause.TimeoutError
744
746
  | SdkError
745
747
  | CustomKeyStoreInvalidStateError
746
748
  | CustomKeyStoreNotFoundError
@@ -757,7 +759,7 @@ interface KMSService$ {
757
759
  options?: HttpHandlerOptions,
758
760
  ): Effect.Effect<
759
761
  GetKeyPolicyCommandOutput,
760
- | Cause.TimeoutException
762
+ | Cause.TimeoutError
761
763
  | SdkError
762
764
  | DependencyTimeoutError
763
765
  | InvalidArnError
@@ -774,7 +776,7 @@ interface KMSService$ {
774
776
  options?: HttpHandlerOptions,
775
777
  ): Effect.Effect<
776
778
  GetKeyRotationStatusCommandOutput,
777
- | Cause.TimeoutException
779
+ | Cause.TimeoutError
778
780
  | SdkError
779
781
  | DependencyTimeoutError
780
782
  | InvalidArnError
@@ -792,7 +794,7 @@ interface KMSService$ {
792
794
  options?: HttpHandlerOptions,
793
795
  ): Effect.Effect<
794
796
  GetParametersForImportCommandOutput,
795
- | Cause.TimeoutException
797
+ | Cause.TimeoutError
796
798
  | SdkError
797
799
  | DependencyTimeoutError
798
800
  | InvalidArnError
@@ -810,7 +812,7 @@ interface KMSService$ {
810
812
  options?: HttpHandlerOptions,
811
813
  ): Effect.Effect<
812
814
  GetPublicKeyCommandOutput,
813
- | Cause.TimeoutException
815
+ | Cause.TimeoutError
814
816
  | SdkError
815
817
  | DependencyTimeoutError
816
818
  | DisabledError
@@ -832,7 +834,7 @@ interface KMSService$ {
832
834
  options?: HttpHandlerOptions,
833
835
  ): Effect.Effect<
834
836
  ImportKeyMaterialCommandOutput,
835
- | Cause.TimeoutException
837
+ | Cause.TimeoutError
836
838
  | SdkError
837
839
  | DependencyTimeoutError
838
840
  | ExpiredImportTokenError
@@ -854,7 +856,7 @@ interface KMSService$ {
854
856
  options?: HttpHandlerOptions,
855
857
  ): Effect.Effect<
856
858
  ListAliasesCommandOutput,
857
- | Cause.TimeoutException
859
+ | Cause.TimeoutError
858
860
  | SdkError
859
861
  | DependencyTimeoutError
860
862
  | InvalidArnError
@@ -871,7 +873,7 @@ interface KMSService$ {
871
873
  options?: HttpHandlerOptions,
872
874
  ): Effect.Effect<
873
875
  ListGrantsCommandOutput,
874
- | Cause.TimeoutException
876
+ | Cause.TimeoutError
875
877
  | SdkError
876
878
  | DependencyTimeoutError
877
879
  | InvalidArnError
@@ -890,7 +892,7 @@ interface KMSService$ {
890
892
  options?: HttpHandlerOptions,
891
893
  ): Effect.Effect<
892
894
  ListKeyPoliciesCommandOutput,
893
- | Cause.TimeoutException
895
+ | Cause.TimeoutError
894
896
  | SdkError
895
897
  | DependencyTimeoutError
896
898
  | InvalidArnError
@@ -907,7 +909,7 @@ interface KMSService$ {
907
909
  options?: HttpHandlerOptions,
908
910
  ): Effect.Effect<
909
911
  ListKeyRotationsCommandOutput,
910
- | Cause.TimeoutException
912
+ | Cause.TimeoutError
911
913
  | SdkError
912
914
  | InvalidArnError
913
915
  | InvalidMarkerError
@@ -925,7 +927,7 @@ interface KMSService$ {
925
927
  options?: HttpHandlerOptions,
926
928
  ): Effect.Effect<
927
929
  ListKeysCommandOutput,
928
- Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
930
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
929
931
  >;
930
932
 
931
933
  /**
@@ -936,7 +938,7 @@ interface KMSService$ {
936
938
  options?: HttpHandlerOptions,
937
939
  ): Effect.Effect<
938
940
  ListResourceTagsCommandOutput,
939
- Cause.TimeoutException | SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
941
+ Cause.TimeoutError | SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
940
942
  >;
941
943
 
942
944
  /**
@@ -947,7 +949,7 @@ interface KMSService$ {
947
949
  options?: HttpHandlerOptions,
948
950
  ): Effect.Effect<
949
951
  ListRetirableGrantsCommandOutput,
950
- | Cause.TimeoutException
952
+ | Cause.TimeoutError
951
953
  | SdkError
952
954
  | DependencyTimeoutError
953
955
  | InvalidArnError
@@ -964,7 +966,7 @@ interface KMSService$ {
964
966
  options?: HttpHandlerOptions,
965
967
  ): Effect.Effect<
966
968
  PutKeyPolicyCommandOutput,
967
- | Cause.TimeoutException
969
+ | Cause.TimeoutError
968
970
  | SdkError
969
971
  | DependencyTimeoutError
970
972
  | InvalidArnError
@@ -984,7 +986,7 @@ interface KMSService$ {
984
986
  options?: HttpHandlerOptions,
985
987
  ): Effect.Effect<
986
988
  ReEncryptCommandOutput,
987
- | Cause.TimeoutException
989
+ | Cause.TimeoutError
988
990
  | SdkError
989
991
  | DependencyTimeoutError
990
992
  | DisabledError
@@ -1007,7 +1009,7 @@ interface KMSService$ {
1007
1009
  options?: HttpHandlerOptions,
1008
1010
  ): Effect.Effect<
1009
1011
  ReplicateKeyCommandOutput,
1010
- | Cause.TimeoutException
1012
+ | Cause.TimeoutError
1011
1013
  | SdkError
1012
1014
  | AlreadyExistsError
1013
1015
  | DisabledError
@@ -1029,7 +1031,7 @@ interface KMSService$ {
1029
1031
  options?: HttpHandlerOptions,
1030
1032
  ): Effect.Effect<
1031
1033
  RetireGrantCommandOutput,
1032
- | Cause.TimeoutException
1034
+ | Cause.TimeoutError
1033
1035
  | SdkError
1034
1036
  | DependencyTimeoutError
1035
1037
  | DryRunOperationError
@@ -1049,7 +1051,7 @@ interface KMSService$ {
1049
1051
  options?: HttpHandlerOptions,
1050
1052
  ): Effect.Effect<
1051
1053
  RevokeGrantCommandOutput,
1052
- | Cause.TimeoutException
1054
+ | Cause.TimeoutError
1053
1055
  | SdkError
1054
1056
  | DependencyTimeoutError
1055
1057
  | DryRunOperationError
@@ -1068,7 +1070,7 @@ interface KMSService$ {
1068
1070
  options?: HttpHandlerOptions,
1069
1071
  ): Effect.Effect<
1070
1072
  RotateKeyOnDemandCommandOutput,
1071
- | Cause.TimeoutException
1073
+ | Cause.TimeoutError
1072
1074
  | SdkError
1073
1075
  | ConflictError
1074
1076
  | DependencyTimeoutError
@@ -1089,7 +1091,7 @@ interface KMSService$ {
1089
1091
  options?: HttpHandlerOptions,
1090
1092
  ): Effect.Effect<
1091
1093
  ScheduleKeyDeletionCommandOutput,
1092
- | Cause.TimeoutException
1094
+ | Cause.TimeoutError
1093
1095
  | SdkError
1094
1096
  | DependencyTimeoutError
1095
1097
  | InvalidArnError
@@ -1106,7 +1108,7 @@ interface KMSService$ {
1106
1108
  options?: HttpHandlerOptions,
1107
1109
  ): Effect.Effect<
1108
1110
  SignCommandOutput,
1109
- | Cause.TimeoutException
1111
+ | Cause.TimeoutError
1110
1112
  | SdkError
1111
1113
  | DependencyTimeoutError
1112
1114
  | DisabledError
@@ -1127,7 +1129,7 @@ interface KMSService$ {
1127
1129
  options?: HttpHandlerOptions,
1128
1130
  ): Effect.Effect<
1129
1131
  TagResourceCommandOutput,
1130
- | Cause.TimeoutException
1132
+ | Cause.TimeoutError
1131
1133
  | SdkError
1132
1134
  | InvalidArnError
1133
1135
  | KMSInternalError
@@ -1145,13 +1147,7 @@ interface KMSService$ {
1145
1147
  options?: HttpHandlerOptions,
1146
1148
  ): Effect.Effect<
1147
1149
  UntagResourceCommandOutput,
1148
- | Cause.TimeoutException
1149
- | SdkError
1150
- | InvalidArnError
1151
- | KMSInternalError
1152
- | KMSInvalidStateError
1153
- | NotFoundError
1154
- | TagError
1150
+ Cause.TimeoutError | SdkError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError | TagError
1155
1151
  >;
1156
1152
 
1157
1153
  /**
@@ -1162,7 +1158,7 @@ interface KMSService$ {
1162
1158
  options?: HttpHandlerOptions,
1163
1159
  ): Effect.Effect<
1164
1160
  UpdateAliasCommandOutput,
1165
- | Cause.TimeoutException
1161
+ | Cause.TimeoutError
1166
1162
  | SdkError
1167
1163
  | DependencyTimeoutError
1168
1164
  | KMSInternalError
@@ -1179,7 +1175,7 @@ interface KMSService$ {
1179
1175
  options?: HttpHandlerOptions,
1180
1176
  ): Effect.Effect<
1181
1177
  UpdateCustomKeyStoreCommandOutput,
1182
- | Cause.TimeoutException
1178
+ | Cause.TimeoutError
1183
1179
  | SdkError
1184
1180
  | CloudHsmClusterInvalidConfigurationError
1185
1181
  | CloudHsmClusterNotActiveError
@@ -1208,7 +1204,7 @@ interface KMSService$ {
1208
1204
  options?: HttpHandlerOptions,
1209
1205
  ): Effect.Effect<
1210
1206
  UpdateKeyDescriptionCommandOutput,
1211
- | Cause.TimeoutException
1207
+ | Cause.TimeoutError
1212
1208
  | SdkError
1213
1209
  | DependencyTimeoutError
1214
1210
  | InvalidArnError
@@ -1225,7 +1221,7 @@ interface KMSService$ {
1225
1221
  options?: HttpHandlerOptions,
1226
1222
  ): Effect.Effect<
1227
1223
  UpdatePrimaryRegionCommandOutput,
1228
- | Cause.TimeoutException
1224
+ | Cause.TimeoutError
1229
1225
  | SdkError
1230
1226
  | DisabledError
1231
1227
  | InvalidArnError
@@ -1243,7 +1239,7 @@ interface KMSService$ {
1243
1239
  options?: HttpHandlerOptions,
1244
1240
  ): Effect.Effect<
1245
1241
  VerifyCommandOutput,
1246
- | Cause.TimeoutException
1242
+ | Cause.TimeoutError
1247
1243
  | SdkError
1248
1244
  | DependencyTimeoutError
1249
1245
  | DisabledError
@@ -1265,7 +1261,7 @@ interface KMSService$ {
1265
1261
  options?: HttpHandlerOptions,
1266
1262
  ): Effect.Effect<
1267
1263
  VerifyMacCommandOutput,
1268
- | Cause.TimeoutException
1264
+ | Cause.TimeoutError
1269
1265
  | SdkError
1270
1266
  | DisabledError
1271
1267
  | DryRunOperationError
@@ -1300,10 +1296,10 @@ export const makeKMSService = Effect.gen(function*() {
1300
1296
  * @since 1.0.0
1301
1297
  * @category models
1302
1298
  */
1303
- export class KMSService extends Effect.Tag("@effect-aws/client-kms/KMSService")<
1299
+ export class KMSService extends ServiceMap.Service<
1304
1300
  KMSService,
1305
1301
  KMSService$
1306
- >() {
1302
+ >()("@effect-aws/client-kms/KMSService") {
1307
1303
  static readonly defaultLayer = Layer.effect(this, makeKMSService).pipe(Layer.provide(Instance.layer));
1308
1304
  static readonly layer = (config: KMSService.Config) =>
1309
1305
  Layer.effect(this, makeKMSService).pipe(
@@ -3,18 +3,19 @@
3
3
  */
4
4
  import type { KMSClientConfig } from "@aws-sdk/client-kms";
5
5
  import { ServiceLogger } from "@effect-aws/commons";
6
- import { Effect, FiberRef, Layer } from "effect";
6
+ import * as Effect from "effect/Effect";
7
7
  import { dual } from "effect/Function";
8
- import { globalValue } from "effect/GlobalValue";
8
+ import * as Layer from "effect/Layer";
9
+ import * as ServiceMap from "effect/ServiceMap";
9
10
  import type { KMSService } from "./KMSService.js";
10
11
 
11
12
  /**
12
13
  * @since 1.0.0
13
14
  * @category kms service config
14
15
  */
15
- const currentKMSServiceConfig = globalValue(
16
+ const currentKMSServiceConfig = ServiceMap.Reference<KMSService.Config>(
16
17
  "@effect-aws/client-kms/currentKMSServiceConfig",
17
- () => FiberRef.unsafeMake<KMSService.Config>({}),
18
+ { defaultValue: () => ({}) },
18
19
  );
19
20
 
20
21
  /**
@@ -27,21 +28,21 @@ export const withKMSServiceConfig: {
27
28
  } = dual(
28
29
  2,
29
30
  <A, E, R>(effect: Effect.Effect<A, E, R>, config: KMSService.Config): Effect.Effect<A, E, R> =>
30
- Effect.locally(effect, currentKMSServiceConfig, config),
31
+ Effect.provideService(effect, currentKMSServiceConfig, config),
31
32
  );
32
33
 
33
34
  /**
34
35
  * @since 1.0.0
35
36
  * @category kms service config
36
37
  */
37
- export const setKMSServiceConfig = (config: KMSService.Config) => Layer.locallyScoped(currentKMSServiceConfig, config);
38
+ export const setKMSServiceConfig = (config: KMSService.Config) => Layer.succeed(currentKMSServiceConfig, config);
38
39
 
39
40
  /**
40
41
  * @since 1.0.0
41
42
  * @category adapters
42
43
  */
43
44
  export const toKMSClientConfig: Effect.Effect<KMSClientConfig> = Effect.gen(function*() {
44
- const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentKMSServiceConfig);
45
+ const { logger: serviceLogger, ...config } = yield* currentKMSServiceConfig;
45
46
 
46
47
  const logger = serviceLogger === true
47
48
  ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)