@effect-aws/client-kms 1.10.3 → 2.0.0-beta.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 (37) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/dist/dts/KMSClientInstance.d.ts +2 -2
  4. package/dist/dts/KMSClientInstance.d.ts.map +1 -1
  5. package/dist/dts/KMSService.d.ts +55 -57
  6. package/dist/dts/KMSService.d.ts.map +1 -1
  7. package/dist/dts/KMSServiceConfig.d.ts.map +1 -1
  8. package/dist/esm/KMSClientInstance.js +3 -3
  9. package/dist/esm/KMSClientInstance.js.map +1 -1
  10. package/dist/esm/KMSService.js +2 -2
  11. package/dist/esm/KMSService.js.map +1 -1
  12. package/dist/esm/KMSServiceConfig.js +5 -6
  13. package/dist/esm/KMSServiceConfig.js.map +1 -1
  14. package/package.json +8 -14
  15. package/src/KMSClientInstance.ts +4 -4
  16. package/src/KMSService.ts +56 -62
  17. package/src/KMSServiceConfig.ts +6 -7
  18. package/dist/cjs/Errors.d.ts +0 -55
  19. package/dist/cjs/Errors.d.ts.map +0 -1
  20. package/dist/cjs/Errors.js +0 -54
  21. package/dist/cjs/Errors.js.map +0 -1
  22. package/dist/cjs/KMSClientInstance.d.ts +0 -24
  23. package/dist/cjs/KMSClientInstance.d.ts.map +0 -1
  24. package/dist/cjs/KMSClientInstance.js +0 -50
  25. package/dist/cjs/KMSClientInstance.js.map +0 -1
  26. package/dist/cjs/KMSService.d.ts +0 -258
  27. package/dist/cjs/KMSService.d.ts.map +0 -1
  28. package/dist/cjs/KMSService.js +0 -112
  29. package/dist/cjs/KMSService.js.map +0 -1
  30. package/dist/cjs/KMSServiceConfig.d.ts +0 -25
  31. package/dist/cjs/KMSServiceConfig.d.ts.map +0 -1
  32. package/dist/cjs/KMSServiceConfig.js +0 -35
  33. package/dist/cjs/KMSServiceConfig.js.map +0 -1
  34. package/dist/cjs/index.d.ts +0 -44
  35. package/dist/cjs/index.d.ts.map +0 -1
  36. package/dist/cjs/index.js +0 -56
  37. package/dist/cjs/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-aws/client-kms",
3
- "version": "1.10.3",
3
+ "version": "2.0.0-beta.0",
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.0"
19
+ "@effect-aws/commons": "^1.0.0-beta.0"
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,16 @@
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 { Effect, Layer, ServiceMap } from "effect";
6
6
  import * as KMSServiceConfig from "./KMSServiceConfig.js";
7
7
 
8
8
  /**
9
9
  * @since 1.0.0
10
10
  * @category tags
11
11
  */
12
- export class KMSClientInstance extends Context.Tag(
12
+ export class KMSClientInstance extends ServiceMap.Service<KMSClientInstance, KMSClient>()(
13
13
  "@effect-aws/client-kms/KMSClientInstance",
14
- )<KMSClientInstance, KMSClient>() {}
14
+ ) {}
15
15
 
16
16
  /**
17
17
  * @since 1.0.0
@@ -30,4 +30,4 @@ export const make = Effect.flatMap(
30
30
  * @since 1.0.0
31
31
  * @category layers
32
32
  */
33
- export const layer = Layer.scoped(KMSClientInstance, make);
33
+ export const layer = Layer.effect(KMSClientInstance, make);
package/src/KMSService.ts CHANGED
@@ -167,7 +167,7 @@ import {
167
167
  import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
168
168
  import { Service } from "@effect-aws/commons";
169
169
  import type { Cause } from "effect";
170
- import { Effect, Layer } from "effect";
170
+ import { Effect, Layer, ServiceMap } from "effect";
171
171
  import type {
172
172
  AlreadyExistsError,
173
173
  CloudHsmClusterInUseError,
@@ -290,7 +290,7 @@ interface KMSService$ {
290
290
  options?: HttpHandlerOptions,
291
291
  ): Effect.Effect<
292
292
  CancelKeyDeletionCommandOutput,
293
- | Cause.TimeoutException
293
+ | Cause.TimeoutError
294
294
  | SdkError
295
295
  | DependencyTimeoutError
296
296
  | InvalidArnError
@@ -307,7 +307,7 @@ interface KMSService$ {
307
307
  options?: HttpHandlerOptions,
308
308
  ): Effect.Effect<
309
309
  ConnectCustomKeyStoreCommandOutput,
310
- | Cause.TimeoutException
310
+ | Cause.TimeoutError
311
311
  | SdkError
312
312
  | CloudHsmClusterInvalidConfigurationError
313
313
  | CloudHsmClusterNotActiveError
@@ -324,7 +324,7 @@ interface KMSService$ {
324
324
  options?: HttpHandlerOptions,
325
325
  ): Effect.Effect<
326
326
  CreateAliasCommandOutput,
327
- | Cause.TimeoutException
327
+ | Cause.TimeoutError
328
328
  | SdkError
329
329
  | AlreadyExistsError
330
330
  | DependencyTimeoutError
@@ -343,7 +343,7 @@ interface KMSService$ {
343
343
  options?: HttpHandlerOptions,
344
344
  ): Effect.Effect<
345
345
  CreateCustomKeyStoreCommandOutput,
346
- | Cause.TimeoutException
346
+ | Cause.TimeoutError
347
347
  | SdkError
348
348
  | CloudHsmClusterInUseError
349
349
  | CloudHsmClusterInvalidConfigurationError
@@ -372,7 +372,7 @@ interface KMSService$ {
372
372
  options?: HttpHandlerOptions,
373
373
  ): Effect.Effect<
374
374
  CreateGrantCommandOutput,
375
- | Cause.TimeoutException
375
+ | Cause.TimeoutError
376
376
  | SdkError
377
377
  | DependencyTimeoutError
378
378
  | DisabledError
@@ -393,7 +393,7 @@ interface KMSService$ {
393
393
  options?: HttpHandlerOptions,
394
394
  ): Effect.Effect<
395
395
  CreateKeyCommandOutput,
396
- | Cause.TimeoutException
396
+ | Cause.TimeoutError
397
397
  | SdkError
398
398
  | CloudHsmClusterInvalidConfigurationError
399
399
  | CustomKeyStoreInvalidStateError
@@ -418,7 +418,7 @@ interface KMSService$ {
418
418
  options?: HttpHandlerOptions,
419
419
  ): Effect.Effect<
420
420
  DecryptCommandOutput,
421
- | Cause.TimeoutException
421
+ | Cause.TimeoutError
422
422
  | SdkError
423
423
  | DependencyTimeoutError
424
424
  | DisabledError
@@ -441,7 +441,7 @@ interface KMSService$ {
441
441
  options?: HttpHandlerOptions,
442
442
  ): Effect.Effect<
443
443
  DeleteAliasCommandOutput,
444
- Cause.TimeoutException | SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
444
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
445
445
  >;
446
446
 
447
447
  /**
@@ -452,7 +452,7 @@ interface KMSService$ {
452
452
  options?: HttpHandlerOptions,
453
453
  ): Effect.Effect<
454
454
  DeleteCustomKeyStoreCommandOutput,
455
- | Cause.TimeoutException
455
+ | Cause.TimeoutError
456
456
  | SdkError
457
457
  | CustomKeyStoreHasCMKsError
458
458
  | CustomKeyStoreInvalidStateError
@@ -468,7 +468,7 @@ interface KMSService$ {
468
468
  options?: HttpHandlerOptions,
469
469
  ): Effect.Effect<
470
470
  DeleteImportedKeyMaterialCommandOutput,
471
- | Cause.TimeoutException
471
+ | Cause.TimeoutError
472
472
  | SdkError
473
473
  | DependencyTimeoutError
474
474
  | InvalidArnError
@@ -486,7 +486,7 @@ interface KMSService$ {
486
486
  options?: HttpHandlerOptions,
487
487
  ): Effect.Effect<
488
488
  DeriveSharedSecretCommandOutput,
489
- | Cause.TimeoutException
489
+ | Cause.TimeoutError
490
490
  | SdkError
491
491
  | DependencyTimeoutError
492
492
  | DisabledError
@@ -507,7 +507,7 @@ interface KMSService$ {
507
507
  options?: HttpHandlerOptions,
508
508
  ): Effect.Effect<
509
509
  DescribeCustomKeyStoresCommandOutput,
510
- Cause.TimeoutException | SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
510
+ Cause.TimeoutError | SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
511
511
  >;
512
512
 
513
513
  /**
@@ -518,7 +518,7 @@ interface KMSService$ {
518
518
  options?: HttpHandlerOptions,
519
519
  ): Effect.Effect<
520
520
  DescribeKeyCommandOutput,
521
- Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
521
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
522
522
  >;
523
523
 
524
524
  /**
@@ -529,7 +529,7 @@ interface KMSService$ {
529
529
  options?: HttpHandlerOptions,
530
530
  ): Effect.Effect<
531
531
  DisableKeyCommandOutput,
532
- | Cause.TimeoutException
532
+ | Cause.TimeoutError
533
533
  | SdkError
534
534
  | DependencyTimeoutError
535
535
  | InvalidArnError
@@ -546,7 +546,7 @@ interface KMSService$ {
546
546
  options?: HttpHandlerOptions,
547
547
  ): Effect.Effect<
548
548
  DisableKeyRotationCommandOutput,
549
- | Cause.TimeoutException
549
+ | Cause.TimeoutError
550
550
  | SdkError
551
551
  | DependencyTimeoutError
552
552
  | DisabledError
@@ -565,7 +565,7 @@ interface KMSService$ {
565
565
  options?: HttpHandlerOptions,
566
566
  ): Effect.Effect<
567
567
  DisconnectCustomKeyStoreCommandOutput,
568
- Cause.TimeoutException | SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
568
+ Cause.TimeoutError | SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
569
569
  >;
570
570
 
571
571
  /**
@@ -576,7 +576,7 @@ interface KMSService$ {
576
576
  options?: HttpHandlerOptions,
577
577
  ): Effect.Effect<
578
578
  EnableKeyCommandOutput,
579
- | Cause.TimeoutException
579
+ | Cause.TimeoutError
580
580
  | SdkError
581
581
  | DependencyTimeoutError
582
582
  | InvalidArnError
@@ -594,7 +594,7 @@ interface KMSService$ {
594
594
  options?: HttpHandlerOptions,
595
595
  ): Effect.Effect<
596
596
  EnableKeyRotationCommandOutput,
597
- | Cause.TimeoutException
597
+ | Cause.TimeoutError
598
598
  | SdkError
599
599
  | DependencyTimeoutError
600
600
  | DisabledError
@@ -613,7 +613,7 @@ interface KMSService$ {
613
613
  options?: HttpHandlerOptions,
614
614
  ): Effect.Effect<
615
615
  EncryptCommandOutput,
616
- | Cause.TimeoutException
616
+ | Cause.TimeoutError
617
617
  | SdkError
618
618
  | DependencyTimeoutError
619
619
  | DisabledError
@@ -634,7 +634,7 @@ interface KMSService$ {
634
634
  options?: HttpHandlerOptions,
635
635
  ): Effect.Effect<
636
636
  GenerateDataKeyCommandOutput,
637
- | Cause.TimeoutException
637
+ | Cause.TimeoutError
638
638
  | SdkError
639
639
  | DependencyTimeoutError
640
640
  | DisabledError
@@ -655,7 +655,7 @@ interface KMSService$ {
655
655
  options?: HttpHandlerOptions,
656
656
  ): Effect.Effect<
657
657
  GenerateDataKeyPairCommandOutput,
658
- | Cause.TimeoutException
658
+ | Cause.TimeoutError
659
659
  | SdkError
660
660
  | DependencyTimeoutError
661
661
  | DisabledError
@@ -677,7 +677,7 @@ interface KMSService$ {
677
677
  options?: HttpHandlerOptions,
678
678
  ): Effect.Effect<
679
679
  GenerateDataKeyPairWithoutPlaintextCommandOutput,
680
- | Cause.TimeoutException
680
+ | Cause.TimeoutError
681
681
  | SdkError
682
682
  | DependencyTimeoutError
683
683
  | DisabledError
@@ -699,7 +699,7 @@ interface KMSService$ {
699
699
  options?: HttpHandlerOptions,
700
700
  ): Effect.Effect<
701
701
  GenerateDataKeyWithoutPlaintextCommandOutput,
702
- | Cause.TimeoutException
702
+ | Cause.TimeoutError
703
703
  | SdkError
704
704
  | DependencyTimeoutError
705
705
  | DisabledError
@@ -720,7 +720,7 @@ interface KMSService$ {
720
720
  options?: HttpHandlerOptions,
721
721
  ): Effect.Effect<
722
722
  GenerateMacCommandOutput,
723
- | Cause.TimeoutException
723
+ | Cause.TimeoutError
724
724
  | SdkError
725
725
  | DisabledError
726
726
  | DryRunOperationError
@@ -740,7 +740,7 @@ interface KMSService$ {
740
740
  options?: HttpHandlerOptions,
741
741
  ): Effect.Effect<
742
742
  GenerateRandomCommandOutput,
743
- | Cause.TimeoutException
743
+ | Cause.TimeoutError
744
744
  | SdkError
745
745
  | CustomKeyStoreInvalidStateError
746
746
  | CustomKeyStoreNotFoundError
@@ -757,7 +757,7 @@ interface KMSService$ {
757
757
  options?: HttpHandlerOptions,
758
758
  ): Effect.Effect<
759
759
  GetKeyPolicyCommandOutput,
760
- | Cause.TimeoutException
760
+ | Cause.TimeoutError
761
761
  | SdkError
762
762
  | DependencyTimeoutError
763
763
  | InvalidArnError
@@ -774,7 +774,7 @@ interface KMSService$ {
774
774
  options?: HttpHandlerOptions,
775
775
  ): Effect.Effect<
776
776
  GetKeyRotationStatusCommandOutput,
777
- | Cause.TimeoutException
777
+ | Cause.TimeoutError
778
778
  | SdkError
779
779
  | DependencyTimeoutError
780
780
  | InvalidArnError
@@ -792,7 +792,7 @@ interface KMSService$ {
792
792
  options?: HttpHandlerOptions,
793
793
  ): Effect.Effect<
794
794
  GetParametersForImportCommandOutput,
795
- | Cause.TimeoutException
795
+ | Cause.TimeoutError
796
796
  | SdkError
797
797
  | DependencyTimeoutError
798
798
  | InvalidArnError
@@ -810,7 +810,7 @@ interface KMSService$ {
810
810
  options?: HttpHandlerOptions,
811
811
  ): Effect.Effect<
812
812
  GetPublicKeyCommandOutput,
813
- | Cause.TimeoutException
813
+ | Cause.TimeoutError
814
814
  | SdkError
815
815
  | DependencyTimeoutError
816
816
  | DisabledError
@@ -832,7 +832,7 @@ interface KMSService$ {
832
832
  options?: HttpHandlerOptions,
833
833
  ): Effect.Effect<
834
834
  ImportKeyMaterialCommandOutput,
835
- | Cause.TimeoutException
835
+ | Cause.TimeoutError
836
836
  | SdkError
837
837
  | DependencyTimeoutError
838
838
  | ExpiredImportTokenError
@@ -854,7 +854,7 @@ interface KMSService$ {
854
854
  options?: HttpHandlerOptions,
855
855
  ): Effect.Effect<
856
856
  ListAliasesCommandOutput,
857
- | Cause.TimeoutException
857
+ | Cause.TimeoutError
858
858
  | SdkError
859
859
  | DependencyTimeoutError
860
860
  | InvalidArnError
@@ -871,7 +871,7 @@ interface KMSService$ {
871
871
  options?: HttpHandlerOptions,
872
872
  ): Effect.Effect<
873
873
  ListGrantsCommandOutput,
874
- | Cause.TimeoutException
874
+ | Cause.TimeoutError
875
875
  | SdkError
876
876
  | DependencyTimeoutError
877
877
  | InvalidArnError
@@ -890,7 +890,7 @@ interface KMSService$ {
890
890
  options?: HttpHandlerOptions,
891
891
  ): Effect.Effect<
892
892
  ListKeyPoliciesCommandOutput,
893
- | Cause.TimeoutException
893
+ | Cause.TimeoutError
894
894
  | SdkError
895
895
  | DependencyTimeoutError
896
896
  | InvalidArnError
@@ -907,7 +907,7 @@ interface KMSService$ {
907
907
  options?: HttpHandlerOptions,
908
908
  ): Effect.Effect<
909
909
  ListKeyRotationsCommandOutput,
910
- | Cause.TimeoutException
910
+ | Cause.TimeoutError
911
911
  | SdkError
912
912
  | InvalidArnError
913
913
  | InvalidMarkerError
@@ -925,7 +925,7 @@ interface KMSService$ {
925
925
  options?: HttpHandlerOptions,
926
926
  ): Effect.Effect<
927
927
  ListKeysCommandOutput,
928
- Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
928
+ Cause.TimeoutError | SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
929
929
  >;
930
930
 
931
931
  /**
@@ -936,7 +936,7 @@ interface KMSService$ {
936
936
  options?: HttpHandlerOptions,
937
937
  ): Effect.Effect<
938
938
  ListResourceTagsCommandOutput,
939
- Cause.TimeoutException | SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
939
+ Cause.TimeoutError | SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
940
940
  >;
941
941
 
942
942
  /**
@@ -947,7 +947,7 @@ interface KMSService$ {
947
947
  options?: HttpHandlerOptions,
948
948
  ): Effect.Effect<
949
949
  ListRetirableGrantsCommandOutput,
950
- | Cause.TimeoutException
950
+ | Cause.TimeoutError
951
951
  | SdkError
952
952
  | DependencyTimeoutError
953
953
  | InvalidArnError
@@ -964,7 +964,7 @@ interface KMSService$ {
964
964
  options?: HttpHandlerOptions,
965
965
  ): Effect.Effect<
966
966
  PutKeyPolicyCommandOutput,
967
- | Cause.TimeoutException
967
+ | Cause.TimeoutError
968
968
  | SdkError
969
969
  | DependencyTimeoutError
970
970
  | InvalidArnError
@@ -984,7 +984,7 @@ interface KMSService$ {
984
984
  options?: HttpHandlerOptions,
985
985
  ): Effect.Effect<
986
986
  ReEncryptCommandOutput,
987
- | Cause.TimeoutException
987
+ | Cause.TimeoutError
988
988
  | SdkError
989
989
  | DependencyTimeoutError
990
990
  | DisabledError
@@ -1007,7 +1007,7 @@ interface KMSService$ {
1007
1007
  options?: HttpHandlerOptions,
1008
1008
  ): Effect.Effect<
1009
1009
  ReplicateKeyCommandOutput,
1010
- | Cause.TimeoutException
1010
+ | Cause.TimeoutError
1011
1011
  | SdkError
1012
1012
  | AlreadyExistsError
1013
1013
  | DisabledError
@@ -1029,7 +1029,7 @@ interface KMSService$ {
1029
1029
  options?: HttpHandlerOptions,
1030
1030
  ): Effect.Effect<
1031
1031
  RetireGrantCommandOutput,
1032
- | Cause.TimeoutException
1032
+ | Cause.TimeoutError
1033
1033
  | SdkError
1034
1034
  | DependencyTimeoutError
1035
1035
  | DryRunOperationError
@@ -1049,7 +1049,7 @@ interface KMSService$ {
1049
1049
  options?: HttpHandlerOptions,
1050
1050
  ): Effect.Effect<
1051
1051
  RevokeGrantCommandOutput,
1052
- | Cause.TimeoutException
1052
+ | Cause.TimeoutError
1053
1053
  | SdkError
1054
1054
  | DependencyTimeoutError
1055
1055
  | DryRunOperationError
@@ -1068,7 +1068,7 @@ interface KMSService$ {
1068
1068
  options?: HttpHandlerOptions,
1069
1069
  ): Effect.Effect<
1070
1070
  RotateKeyOnDemandCommandOutput,
1071
- | Cause.TimeoutException
1071
+ | Cause.TimeoutError
1072
1072
  | SdkError
1073
1073
  | ConflictError
1074
1074
  | DependencyTimeoutError
@@ -1089,7 +1089,7 @@ interface KMSService$ {
1089
1089
  options?: HttpHandlerOptions,
1090
1090
  ): Effect.Effect<
1091
1091
  ScheduleKeyDeletionCommandOutput,
1092
- | Cause.TimeoutException
1092
+ | Cause.TimeoutError
1093
1093
  | SdkError
1094
1094
  | DependencyTimeoutError
1095
1095
  | InvalidArnError
@@ -1106,7 +1106,7 @@ interface KMSService$ {
1106
1106
  options?: HttpHandlerOptions,
1107
1107
  ): Effect.Effect<
1108
1108
  SignCommandOutput,
1109
- | Cause.TimeoutException
1109
+ | Cause.TimeoutError
1110
1110
  | SdkError
1111
1111
  | DependencyTimeoutError
1112
1112
  | DisabledError
@@ -1127,7 +1127,7 @@ interface KMSService$ {
1127
1127
  options?: HttpHandlerOptions,
1128
1128
  ): Effect.Effect<
1129
1129
  TagResourceCommandOutput,
1130
- | Cause.TimeoutException
1130
+ | Cause.TimeoutError
1131
1131
  | SdkError
1132
1132
  | InvalidArnError
1133
1133
  | KMSInternalError
@@ -1145,13 +1145,7 @@ interface KMSService$ {
1145
1145
  options?: HttpHandlerOptions,
1146
1146
  ): Effect.Effect<
1147
1147
  UntagResourceCommandOutput,
1148
- | Cause.TimeoutException
1149
- | SdkError
1150
- | InvalidArnError
1151
- | KMSInternalError
1152
- | KMSInvalidStateError
1153
- | NotFoundError
1154
- | TagError
1148
+ Cause.TimeoutError | SdkError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError | TagError
1155
1149
  >;
1156
1150
 
1157
1151
  /**
@@ -1162,7 +1156,7 @@ interface KMSService$ {
1162
1156
  options?: HttpHandlerOptions,
1163
1157
  ): Effect.Effect<
1164
1158
  UpdateAliasCommandOutput,
1165
- | Cause.TimeoutException
1159
+ | Cause.TimeoutError
1166
1160
  | SdkError
1167
1161
  | DependencyTimeoutError
1168
1162
  | KMSInternalError
@@ -1179,7 +1173,7 @@ interface KMSService$ {
1179
1173
  options?: HttpHandlerOptions,
1180
1174
  ): Effect.Effect<
1181
1175
  UpdateCustomKeyStoreCommandOutput,
1182
- | Cause.TimeoutException
1176
+ | Cause.TimeoutError
1183
1177
  | SdkError
1184
1178
  | CloudHsmClusterInvalidConfigurationError
1185
1179
  | CloudHsmClusterNotActiveError
@@ -1208,7 +1202,7 @@ interface KMSService$ {
1208
1202
  options?: HttpHandlerOptions,
1209
1203
  ): Effect.Effect<
1210
1204
  UpdateKeyDescriptionCommandOutput,
1211
- | Cause.TimeoutException
1205
+ | Cause.TimeoutError
1212
1206
  | SdkError
1213
1207
  | DependencyTimeoutError
1214
1208
  | InvalidArnError
@@ -1225,7 +1219,7 @@ interface KMSService$ {
1225
1219
  options?: HttpHandlerOptions,
1226
1220
  ): Effect.Effect<
1227
1221
  UpdatePrimaryRegionCommandOutput,
1228
- | Cause.TimeoutException
1222
+ | Cause.TimeoutError
1229
1223
  | SdkError
1230
1224
  | DisabledError
1231
1225
  | InvalidArnError
@@ -1243,7 +1237,7 @@ interface KMSService$ {
1243
1237
  options?: HttpHandlerOptions,
1244
1238
  ): Effect.Effect<
1245
1239
  VerifyCommandOutput,
1246
- | Cause.TimeoutException
1240
+ | Cause.TimeoutError
1247
1241
  | SdkError
1248
1242
  | DependencyTimeoutError
1249
1243
  | DisabledError
@@ -1265,7 +1259,7 @@ interface KMSService$ {
1265
1259
  options?: HttpHandlerOptions,
1266
1260
  ): Effect.Effect<
1267
1261
  VerifyMacCommandOutput,
1268
- | Cause.TimeoutException
1262
+ | Cause.TimeoutError
1269
1263
  | SdkError
1270
1264
  | DisabledError
1271
1265
  | DryRunOperationError
@@ -1300,10 +1294,10 @@ export const makeKMSService = Effect.gen(function*() {
1300
1294
  * @since 1.0.0
1301
1295
  * @category models
1302
1296
  */
1303
- export class KMSService extends Effect.Tag("@effect-aws/client-kms/KMSService")<
1297
+ export class KMSService extends ServiceMap.Service<
1304
1298
  KMSService,
1305
1299
  KMSService$
1306
- >() {
1300
+ >()("@effect-aws/client-kms/KMSService") {
1307
1301
  static readonly defaultLayer = Layer.effect(this, makeKMSService).pipe(Layer.provide(Instance.layer));
1308
1302
  static readonly layer = (config: KMSService.Config) =>
1309
1303
  Layer.effect(this, makeKMSService).pipe(
@@ -3,18 +3,17 @@
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 { Effect, Layer, ServiceMap } from "effect";
7
7
  import { dual } from "effect/Function";
8
- import { globalValue } from "effect/GlobalValue";
9
8
  import type { KMSService } from "./KMSService.js";
10
9
 
11
10
  /**
12
11
  * @since 1.0.0
13
12
  * @category kms service config
14
13
  */
15
- const currentKMSServiceConfig = globalValue(
14
+ const currentKMSServiceConfig = ServiceMap.Reference<KMSService.Config>(
16
15
  "@effect-aws/client-kms/currentKMSServiceConfig",
17
- () => FiberRef.unsafeMake<KMSService.Config>({}),
16
+ { defaultValue: () => ({}) },
18
17
  );
19
18
 
20
19
  /**
@@ -27,21 +26,21 @@ export const withKMSServiceConfig: {
27
26
  } = dual(
28
27
  2,
29
28
  <A, E, R>(effect: Effect.Effect<A, E, R>, config: KMSService.Config): Effect.Effect<A, E, R> =>
30
- Effect.locally(effect, currentKMSServiceConfig, config),
29
+ Effect.provideService(effect, currentKMSServiceConfig, config),
31
30
  );
32
31
 
33
32
  /**
34
33
  * @since 1.0.0
35
34
  * @category kms service config
36
35
  */
37
- export const setKMSServiceConfig = (config: KMSService.Config) => Layer.locallyScoped(currentKMSServiceConfig, config);
36
+ export const setKMSServiceConfig = (config: KMSService.Config) => Layer.succeed(currentKMSServiceConfig, config);
38
37
 
39
38
  /**
40
39
  * @since 1.0.0
41
40
  * @category adapters
42
41
  */
43
42
  export const toKMSClientConfig: Effect.Effect<KMSClientConfig> = Effect.gen(function*() {
44
- const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentKMSServiceConfig);
43
+ const { logger: serviceLogger, ...config } = yield* currentKMSServiceConfig;
45
44
 
46
45
  const logger = serviceLogger === true
47
46
  ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
@@ -1,55 +0,0 @@
1
- import type { AlreadyExistsException, CloudHsmClusterInUseException, CloudHsmClusterInvalidConfigurationException, CloudHsmClusterNotActiveException, CloudHsmClusterNotFoundException, CloudHsmClusterNotRelatedException, ConflictException, CustomKeyStoreHasCMKsException, CustomKeyStoreInvalidStateException, CustomKeyStoreNameInUseException, CustomKeyStoreNotFoundException, DependencyTimeoutException, DisabledException, DryRunOperationException, ExpiredImportTokenException, IncorrectKeyException, IncorrectKeyMaterialException, IncorrectTrustAnchorException, InvalidAliasNameException, InvalidArnException, InvalidCiphertextException, InvalidGrantIdException, InvalidGrantTokenException, InvalidImportTokenException, InvalidKeyUsageException, InvalidMarkerException, KeyUnavailableException, KMSInternalException, KMSInvalidMacException, KMSInvalidSignatureException, KMSInvalidStateException, LimitExceededException, MalformedPolicyDocumentException, NotFoundException, TagException, UnsupportedOperationException, XksKeyAlreadyInUseException, XksKeyInvalidConfigurationException, XksKeyNotFoundException, XksProxyIncorrectAuthenticationCredentialException, XksProxyInvalidConfigurationException, XksProxyInvalidResponseException, XksProxyUriEndpointInUseException, XksProxyUriInUseException, XksProxyUriUnreachableException, XksProxyVpcEndpointServiceInUseException, XksProxyVpcEndpointServiceInvalidConfigurationException, XksProxyVpcEndpointServiceNotFoundException } from "@aws-sdk/client-kms";
2
- import type { TaggedException } from "@effect-aws/commons";
3
- export declare const AllServiceErrors: readonly ["AlreadyExistsException", "CloudHsmClusterInUseException", "CloudHsmClusterInvalidConfigurationException", "CloudHsmClusterNotActiveException", "CloudHsmClusterNotFoundException", "CloudHsmClusterNotRelatedException", "ConflictException", "CustomKeyStoreHasCMKsException", "CustomKeyStoreInvalidStateException", "CustomKeyStoreNameInUseException", "CustomKeyStoreNotFoundException", "DependencyTimeoutException", "DisabledException", "DryRunOperationException", "ExpiredImportTokenException", "IncorrectKeyException", "IncorrectKeyMaterialException", "IncorrectTrustAnchorException", "InvalidAliasNameException", "InvalidArnException", "InvalidCiphertextException", "InvalidGrantIdException", "InvalidGrantTokenException", "InvalidImportTokenException", "InvalidKeyUsageException", "InvalidMarkerException", "KMSInternalException", "KMSInvalidMacException", "KMSInvalidSignatureException", "KMSInvalidStateException", "KeyUnavailableException", "LimitExceededException", "MalformedPolicyDocumentException", "NotFoundException", "TagException", "UnsupportedOperationException", "XksKeyAlreadyInUseException", "XksKeyInvalidConfigurationException", "XksKeyNotFoundException", "XksProxyIncorrectAuthenticationCredentialException", "XksProxyInvalidConfigurationException", "XksProxyInvalidResponseException", "XksProxyUriEndpointInUseException", "XksProxyUriInUseException", "XksProxyUriUnreachableException", "XksProxyVpcEndpointServiceInUseException", "XksProxyVpcEndpointServiceInvalidConfigurationException", "XksProxyVpcEndpointServiceNotFoundException"];
4
- export type AlreadyExistsError = TaggedException<AlreadyExistsException>;
5
- export type CloudHsmClusterInUseError = TaggedException<CloudHsmClusterInUseException>;
6
- export type CloudHsmClusterInvalidConfigurationError = TaggedException<CloudHsmClusterInvalidConfigurationException>;
7
- export type CloudHsmClusterNotActiveError = TaggedException<CloudHsmClusterNotActiveException>;
8
- export type CloudHsmClusterNotFoundError = TaggedException<CloudHsmClusterNotFoundException>;
9
- export type CloudHsmClusterNotRelatedError = TaggedException<CloudHsmClusterNotRelatedException>;
10
- export type ConflictError = TaggedException<ConflictException>;
11
- export type CustomKeyStoreHasCMKsError = TaggedException<CustomKeyStoreHasCMKsException>;
12
- export type CustomKeyStoreInvalidStateError = TaggedException<CustomKeyStoreInvalidStateException>;
13
- export type CustomKeyStoreNameInUseError = TaggedException<CustomKeyStoreNameInUseException>;
14
- export type CustomKeyStoreNotFoundError = TaggedException<CustomKeyStoreNotFoundException>;
15
- export type DependencyTimeoutError = TaggedException<DependencyTimeoutException>;
16
- export type DisabledError = TaggedException<DisabledException>;
17
- export type DryRunOperationError = TaggedException<DryRunOperationException>;
18
- export type ExpiredImportTokenError = TaggedException<ExpiredImportTokenException>;
19
- export type IncorrectKeyError = TaggedException<IncorrectKeyException>;
20
- export type IncorrectKeyMaterialError = TaggedException<IncorrectKeyMaterialException>;
21
- export type IncorrectTrustAnchorError = TaggedException<IncorrectTrustAnchorException>;
22
- export type InvalidAliasNameError = TaggedException<InvalidAliasNameException>;
23
- export type InvalidArnError = TaggedException<InvalidArnException>;
24
- export type InvalidCiphertextError = TaggedException<InvalidCiphertextException>;
25
- export type InvalidGrantIdError = TaggedException<InvalidGrantIdException>;
26
- export type InvalidGrantTokenError = TaggedException<InvalidGrantTokenException>;
27
- export type InvalidImportTokenError = TaggedException<InvalidImportTokenException>;
28
- export type InvalidKeyUsageError = TaggedException<InvalidKeyUsageException>;
29
- export type InvalidMarkerError = TaggedException<InvalidMarkerException>;
30
- export type KMSInternalError = TaggedException<KMSInternalException>;
31
- export type KMSInvalidMacError = TaggedException<KMSInvalidMacException>;
32
- export type KMSInvalidSignatureError = TaggedException<KMSInvalidSignatureException>;
33
- export type KMSInvalidStateError = TaggedException<KMSInvalidStateException>;
34
- export type KeyUnavailableError = TaggedException<KeyUnavailableException>;
35
- export type LimitExceededError = TaggedException<LimitExceededException>;
36
- export type MalformedPolicyDocumentError = TaggedException<MalformedPolicyDocumentException>;
37
- export type NotFoundError = TaggedException<NotFoundException>;
38
- export type TagError = TaggedException<TagException>;
39
- export type UnsupportedOperationError = TaggedException<UnsupportedOperationException>;
40
- export type XksKeyAlreadyInUseError = TaggedException<XksKeyAlreadyInUseException>;
41
- export type XksKeyInvalidConfigurationError = TaggedException<XksKeyInvalidConfigurationException>;
42
- export type XksKeyNotFoundError = TaggedException<XksKeyNotFoundException>;
43
- export type XksProxyIncorrectAuthenticationCredentialError = TaggedException<XksProxyIncorrectAuthenticationCredentialException>;
44
- export type XksProxyInvalidConfigurationError = TaggedException<XksProxyInvalidConfigurationException>;
45
- export type XksProxyInvalidResponseError = TaggedException<XksProxyInvalidResponseException>;
46
- export type XksProxyUriEndpointInUseError = TaggedException<XksProxyUriEndpointInUseException>;
47
- export type XksProxyUriInUseError = TaggedException<XksProxyUriInUseException>;
48
- export type XksProxyUriUnreachableError = TaggedException<XksProxyUriUnreachableException>;
49
- export type XksProxyVpcEndpointServiceInUseError = TaggedException<XksProxyVpcEndpointServiceInUseException>;
50
- export type XksProxyVpcEndpointServiceInvalidConfigurationError = TaggedException<XksProxyVpcEndpointServiceInvalidConfigurationException>;
51
- export type XksProxyVpcEndpointServiceNotFoundError = TaggedException<XksProxyVpcEndpointServiceNotFoundException>;
52
- export type SdkError = TaggedException<Error & {
53
- name: "SdkError";
54
- }>;
55
- //# sourceMappingURL=Errors.d.ts.map