@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.SSISDK.70.integrate.digidentity.308 → 0.34.1-feature.SSISDK.70.integrate.digidentity.311

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/dist/index.cjs CHANGED
@@ -337,7 +337,7 @@ var plugin_schema_default = {
337
337
  IKmsRestClient: {
338
338
  components: {
339
339
  schemas: {
340
- KmsCreateRawSignatureArgs: {
340
+ KmsClientCreateRawSignatureArgs: {
341
341
  type: "object",
342
342
  additionalProperties: false,
343
343
  properties: {
@@ -351,7 +351,10 @@ var plugin_schema_default = {
351
351
  type: "string"
352
352
  }
353
353
  },
354
- required: ["input", "keyInfo"]
354
+ required: [
355
+ "input",
356
+ "keyInfo"
357
+ ]
355
358
  },
356
359
  KeyInfo: {
357
360
  type: "object",
@@ -492,28 +495,56 @@ var plugin_schema_default = {
492
495
  description: "X.509 certificate SHA-256 thumbprint (base64url-encoded)."
493
496
  }
494
497
  },
495
- required: ["kty"],
498
+ required: [
499
+ "kty"
500
+ ],
496
501
  additionalProperties: false,
497
502
  description: "Represents a JSON Web Key (JWK) as defined by the JSON Web Key specification."
498
503
  },
499
504
  JwkKeyType: {
500
505
  type: "string",
501
- enum: ["EC", "RSA", "OKP", "oct"],
506
+ enum: [
507
+ "EC",
508
+ "RSA",
509
+ "OKP",
510
+ "oct"
511
+ ],
502
512
  description: "JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family."
503
513
  },
504
514
  JwkUse: {
505
515
  type: "string",
506
- enum: ["sig", "enc"],
516
+ enum: [
517
+ "sig",
518
+ "enc"
519
+ ],
507
520
  description: "Intended use of the key (signing or encryption)."
508
521
  },
509
522
  KeyOperations: {
510
523
  type: "string",
511
- enum: ["sign", "verify", "encrypt", "decrypt", "wrapKey", "unwrapKey", "deriveKey", "deriveBits"],
524
+ enum: [
525
+ "sign",
526
+ "verify",
527
+ "encrypt",
528
+ "decrypt",
529
+ "wrapKey",
530
+ "unwrapKey",
531
+ "deriveKey",
532
+ "deriveBits"
533
+ ],
512
534
  description: "Specific operations the key is intended for."
513
535
  },
514
536
  Curve: {
515
537
  type: "string",
516
- enum: ["P-256", "P-384", "P-521", "secp256k1", "Ed25519", "Ed448", "X25519", "X448"],
538
+ enum: [
539
+ "P-256",
540
+ "P-384",
541
+ "P-521",
542
+ "secp256k1",
543
+ "Ed25519",
544
+ "Ed448",
545
+ "X25519",
546
+ "X448"
547
+ ],
517
548
  description: "Elliptic curve identifier."
518
549
  },
519
550
  SignatureAlgorithm: {
@@ -536,17 +567,27 @@ var plugin_schema_default = {
536
567
  },
537
568
  KeyVisibility: {
538
569
  type: "string",
539
- enum: ["PUBLIC", "PRIVATE"],
570
+ enum: [
571
+ "PUBLIC",
572
+ "PRIVATE"
573
+ ],
540
574
  description: "Indicates the visibility status of a cryptographic key."
541
575
  },
542
576
  KeyType: {
543
577
  type: "string",
544
- enum: ["OKP", "EC", "RSA"],
578
+ enum: [
579
+ "OKP",
580
+ "EC",
581
+ "RSA"
582
+ ],
545
583
  description: "Cryptographic key type identifier."
546
584
  },
547
585
  KeyEncoding: {
548
586
  type: "string",
549
- enum: ["COSE", "JOSE"],
587
+ enum: [
588
+ "COSE",
589
+ "JOSE"
590
+ ],
550
591
  description: "The encoding format of the cryptographic key."
551
592
  },
552
593
  CreateRawSignatureResponse: {
@@ -557,11 +598,13 @@ var plugin_schema_default = {
557
598
  description: "The created signature encoded as a base64 string."
558
599
  }
559
600
  },
560
- required: ["signature"],
601
+ required: [
602
+ "signature"
603
+ ],
561
604
  additionalProperties: false,
562
605
  description: "Response body containing the created signature."
563
606
  },
564
- KmsDeleteKeyArgs: {
607
+ KmsClientDeleteKeyArgs: {
565
608
  type: "object",
566
609
  properties: {
567
610
  baseUrl: {
@@ -571,9 +614,12 @@ var plugin_schema_default = {
571
614
  type: "string"
572
615
  }
573
616
  },
617
+ required: [
618
+ "aliasOrKid"
619
+ ],
574
620
  additionalProperties: false
575
621
  },
576
- KmsGenerateKeyArgs: {
622
+ KmsClientGenerateKeyArgs: {
577
623
  type: "object",
578
624
  additionalProperties: false,
579
625
  properties: {
@@ -602,6 +648,19 @@ var plugin_schema_default = {
602
648
  }
603
649
  }
604
650
  },
651
+ GenerateKeyResponse: {
652
+ type: "object",
653
+ properties: {
654
+ keyPair: {
655
+ $ref: "#/components/schemas/ManagedKeyPair"
656
+ }
657
+ },
658
+ required: [
659
+ "keyPair"
660
+ ],
661
+ additionalProperties: false,
662
+ description: "Response body containing a generated key pair."
663
+ },
605
664
  ManagedKeyPair: {
606
665
  type: "object",
607
666
  properties: {
@@ -624,7 +683,12 @@ var plugin_schema_default = {
624
683
  $ref: "#/components/schemas/JoseKeyPair"
625
684
  }
626
685
  },
627
- required: ["providerId", "alias", "cose", "jose"],
686
+ required: [
687
+ "providerId",
688
+ "alias",
689
+ "cose",
690
+ "jose"
691
+ ],
628
692
  additionalProperties: false,
629
693
  description: "Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs."
630
694
  },
@@ -638,7 +702,9 @@ var plugin_schema_default = {
638
702
  $ref: "#/components/schemas/CoseKey"
639
703
  }
640
704
  },
641
- required: ["publicCoseKey"],
705
+ required: [
706
+ "publicCoseKey"
707
+ ],
642
708
  additionalProperties: false,
643
709
  description: "Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations."
644
710
  },
@@ -691,13 +757,20 @@ var plugin_schema_default = {
691
757
  description: "X.509 certificate chain as base64-encoded certificates."
692
758
  }
693
759
  },
694
- required: ["kty"],
760
+ required: [
761
+ "kty"
762
+ ],
695
763
  additionalProperties: false,
696
764
  description: "Represents a COSE (CBOR Object Signing and Encryption) key in JSON format."
697
765
  },
698
766
  CoseKeyType: {
699
767
  type: "number",
700
- enum: [1, 2, 3, 4],
768
+ enum: [
769
+ 1,
770
+ 2,
771
+ 3,
772
+ 4
773
+ ],
701
774
  description: "COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric."
702
775
  },
703
776
  JoseKeyPair: {
@@ -710,11 +783,13 @@ var plugin_schema_default = {
710
783
  $ref: "#/components/schemas/Jwk"
711
784
  }
712
785
  },
713
- required: ["publicJwk"],
786
+ required: [
787
+ "publicJwk"
788
+ ],
714
789
  additionalProperties: false,
715
790
  description: "Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption)."
716
791
  },
717
- KmsGetKeyArgs: {
792
+ KmsClientGetKeyArgs: {
718
793
  type: "object",
719
794
  properties: {
720
795
  baseUrl: {
@@ -724,9 +799,24 @@ var plugin_schema_default = {
724
799
  type: "string"
725
800
  }
726
801
  },
727
- required: ["aliasOrKid"],
802
+ required: [
803
+ "aliasOrKid"
804
+ ],
728
805
  additionalProperties: false
729
806
  },
807
+ GetKeyResponse: {
808
+ type: "object",
809
+ properties: {
810
+ keyInfo: {
811
+ $ref: "#/components/schemas/ManagedKeyInfo"
812
+ }
813
+ },
814
+ required: [
815
+ "keyInfo"
816
+ ],
817
+ additionalProperties: false,
818
+ description: "Response body containing a managed key."
819
+ },
730
820
  ManagedKeyInfo: {
731
821
  type: "object",
732
822
  properties: {
@@ -772,11 +862,15 @@ var plugin_schema_default = {
772
862
  description: "Additional configuration options as key-value pairs."
773
863
  }
774
864
  },
775
- required: ["key", "alias", "providerId"],
865
+ required: [
866
+ "key",
867
+ "alias",
868
+ "providerId"
869
+ ],
776
870
  additionalProperties: false,
777
871
  description: "Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key."
778
872
  },
779
- KmsGetKeyProviderArgs: {
873
+ KmsClientGetKeyProviderArgs: {
780
874
  type: "object",
781
875
  properties: {
782
876
  baseUrl: {
@@ -786,6 +880,9 @@ var plugin_schema_default = {
786
880
  type: "string"
787
881
  }
788
882
  },
883
+ required: [
884
+ "providerId"
885
+ ],
789
886
  additionalProperties: false
790
887
  },
791
888
  KeyProviderResponse: {
@@ -799,16 +896,23 @@ var plugin_schema_default = {
799
896
  $ref: "#/components/schemas/KeyProviderType"
800
897
  }
801
898
  },
802
- required: ["providerId", "type"],
899
+ required: [
900
+ "providerId",
901
+ "type"
902
+ ],
803
903
  additionalProperties: false,
804
904
  description: "Response body containing the details of a Key Provider instance."
805
905
  },
806
906
  KeyProviderType: {
807
907
  type: "string",
808
- enum: ["SOFTWARE", "AZURE_KEYVAULT", "AWS_KMS"],
908
+ enum: [
909
+ "SOFTWARE",
910
+ "AZURE_KEYVAULT",
911
+ "AWS_KMS"
912
+ ],
809
913
  description: "The type of Key Provider. Determines the required configuration settings. - AZURE_KEYVAULT: Microsoft Azure Key Vault or Managed HSM. - AWS_KMS: Amazon Web Services Key Management Service."
810
914
  },
811
- kmsGetResolverArgs: {
915
+ kmsClientGetResolverArgs: {
812
916
  type: "object",
813
917
  properties: {
814
918
  baseUrl: {
@@ -818,7 +922,9 @@ var plugin_schema_default = {
818
922
  type: "string"
819
923
  }
820
924
  },
821
- required: ["resolverId"],
925
+ required: [
926
+ "resolverId"
927
+ ],
822
928
  additionalProperties: false
823
929
  },
824
930
  Resolver: {
@@ -843,16 +949,24 @@ var plugin_schema_default = {
843
949
  description: "List of key types supported by this resolver."
844
950
  }
845
951
  },
846
- required: ["resolverId"],
952
+ required: [
953
+ "resolverId"
954
+ ],
847
955
  additionalProperties: false,
848
956
  description: "Represents a key resolver configuration."
849
957
  },
850
958
  IdentifierMethod: {
851
959
  type: "string",
852
- enum: ["JWK", "KID", "COSE_KEY", "X5C", "DID"],
960
+ enum: [
961
+ "JWK",
962
+ "KID",
963
+ "COSE_KEY",
964
+ "X5C",
965
+ "DID"
966
+ ],
853
967
  description: "Method used to identify cryptographic keys."
854
968
  },
855
- KmsIsValidRawSignatureArgs: {
969
+ KmsClientIsValidRawSignatureArgs: {
856
970
  type: "object",
857
971
  additionalProperties: false,
858
972
  properties: {
@@ -869,7 +983,11 @@ var plugin_schema_default = {
869
983
  type: "string"
870
984
  }
871
985
  },
872
- required: ["input", "keyInfo", "signature"]
986
+ required: [
987
+ "input",
988
+ "keyInfo",
989
+ "signature"
990
+ ]
873
991
  },
874
992
  VerifyRawSignatureResponse: {
875
993
  type: "object",
@@ -879,11 +997,13 @@ var plugin_schema_default = {
879
997
  description: "Indicates whether the signature is valid or not."
880
998
  }
881
999
  },
882
- required: ["isValid"],
1000
+ required: [
1001
+ "isValid"
1002
+ ],
883
1003
  additionalProperties: false,
884
1004
  description: "Response body containing the details of the signature verification."
885
1005
  },
886
- KmsListKeyProvidersArgs: {
1006
+ KmsClientListKeyProvidersArgs: {
887
1007
  type: "object",
888
1008
  properties: {
889
1009
  baseUrl: {
@@ -902,7 +1022,9 @@ var plugin_schema_default = {
902
1022
  }
903
1023
  }
904
1024
  },
905
- required: ["providers"],
1025
+ required: [
1026
+ "providers"
1027
+ ],
906
1028
  additionalProperties: false,
907
1029
  description: "Response body containing the details of a Key Provider instance."
908
1030
  },
@@ -917,11 +1039,14 @@ var plugin_schema_default = {
917
1039
  $ref: "#/components/schemas/KeyProviderType"
918
1040
  }
919
1041
  },
920
- required: ["providerId", "type"],
1042
+ required: [
1043
+ "providerId",
1044
+ "type"
1045
+ ],
921
1046
  additionalProperties: false,
922
1047
  description: "Response body containing the details of a Key Provider instance."
923
1048
  },
924
- KmsListKeysArgs: {
1049
+ KmsClientListKeysArgs: {
925
1050
  type: "object",
926
1051
  properties: {
927
1052
  baseUrl: {
@@ -943,11 +1068,13 @@ var plugin_schema_default = {
943
1068
  }
944
1069
  }
945
1070
  },
946
- required: ["keyInfos"],
1071
+ required: [
1072
+ "keyInfos"
1073
+ ],
947
1074
  additionalProperties: false,
948
1075
  description: "Response body containing all the managed keys."
949
1076
  },
950
- KmsListResolversArgs: {
1077
+ KmsClientListResolversArgs: {
951
1078
  type: "object",
952
1079
  properties: {
953
1080
  baseUrl: {
@@ -966,11 +1093,13 @@ var plugin_schema_default = {
966
1093
  }
967
1094
  }
968
1095
  },
969
- required: ["resolvers"],
1096
+ required: [
1097
+ "resolvers"
1098
+ ],
970
1099
  additionalProperties: false,
971
1100
  description: "Response body containing all the resolvers."
972
1101
  },
973
- KmsProviderDeleteKeyArgs: {
1102
+ KmsClientProviderDeleteKeyArgs: {
974
1103
  type: "object",
975
1104
  properties: {
976
1105
  baseUrl: {
@@ -983,10 +1112,13 @@ var plugin_schema_default = {
983
1112
  type: "string"
984
1113
  }
985
1114
  },
986
- required: ["providerId", "aliasOrKid"],
1115
+ required: [
1116
+ "providerId",
1117
+ "aliasOrKid"
1118
+ ],
987
1119
  additionalProperties: false
988
1120
  },
989
- KmsProviderGenerateKey: {
1121
+ KmsClientProviderGenerateKeyArgs: {
990
1122
  type: "object",
991
1123
  additionalProperties: false,
992
1124
  properties: {
@@ -1013,9 +1145,11 @@ var plugin_schema_default = {
1013
1145
  type: "string"
1014
1146
  }
1015
1147
  },
1016
- required: ["providerId"]
1148
+ required: [
1149
+ "providerId"
1150
+ ]
1017
1151
  },
1018
- KmsProviderGetKeyArgs: {
1152
+ KmsClientProviderGetKeyArgs: {
1019
1153
  type: "object",
1020
1154
  properties: {
1021
1155
  baseUrl: {
@@ -1028,10 +1162,13 @@ var plugin_schema_default = {
1028
1162
  type: "string"
1029
1163
  }
1030
1164
  },
1031
- required: ["providerId", "aliasOrKid"],
1165
+ required: [
1166
+ "providerId",
1167
+ "aliasOrKid"
1168
+ ],
1032
1169
  additionalProperties: false
1033
1170
  },
1034
- KmsProviderListKeysArgs: {
1171
+ KmsClientProviderListKeysArgs: {
1035
1172
  type: "object",
1036
1173
  properties: {
1037
1174
  baseUrl: {
@@ -1041,10 +1178,12 @@ var plugin_schema_default = {
1041
1178
  type: "string"
1042
1179
  }
1043
1180
  },
1044
- required: ["providerId"],
1181
+ required: [
1182
+ "providerId"
1183
+ ],
1045
1184
  additionalProperties: false
1046
1185
  },
1047
- KmsProviderStoreKey: {
1186
+ KmsClientProviderStoreKeyArgs: {
1048
1187
  type: "object",
1049
1188
  additionalProperties: false,
1050
1189
  properties: {
@@ -1065,7 +1204,10 @@ var plugin_schema_default = {
1065
1204
  type: "string"
1066
1205
  }
1067
1206
  },
1068
- required: ["keyInfo", "providerId"]
1207
+ required: [
1208
+ "keyInfo",
1209
+ "providerId"
1210
+ ]
1069
1211
  },
1070
1212
  ResolvedKeyInfo: {
1071
1213
  type: "object",
@@ -1112,11 +1254,26 @@ var plugin_schema_default = {
1112
1254
  description: "Additional configuration options as key-value pairs."
1113
1255
  }
1114
1256
  },
1115
- required: ["key"],
1257
+ required: [
1258
+ "key"
1259
+ ],
1116
1260
  additionalProperties: false,
1117
1261
  description: "Represents a resolved cryptographic key information where the key is guaranteed to be present and resolved, providing concrete access to the key."
1118
1262
  },
1119
- KmsResolveKeyArgs: {
1263
+ StoreKeyResponse: {
1264
+ type: "object",
1265
+ properties: {
1266
+ keyInfo: {
1267
+ $ref: "#/components/schemas/ManagedKeyInfo"
1268
+ }
1269
+ },
1270
+ required: [
1271
+ "keyInfo"
1272
+ ],
1273
+ additionalProperties: false,
1274
+ description: "Response body containing a stored key."
1275
+ },
1276
+ KmsClientResolveKeyArgs: {
1120
1277
  type: "object",
1121
1278
  additionalProperties: false,
1122
1279
  properties: {
@@ -1144,7 +1301,10 @@ var plugin_schema_default = {
1144
1301
  $ref: "#/components/schemas/String"
1145
1302
  }
1146
1303
  },
1147
- required: ["keyInfo", "resolverId"]
1304
+ required: [
1305
+ "keyInfo",
1306
+ "resolverId"
1307
+ ]
1148
1308
  },
1149
1309
  String: {
1150
1310
  type: "object",
@@ -1153,12 +1313,14 @@ var plugin_schema_default = {
1153
1313
  type: "number"
1154
1314
  }
1155
1315
  },
1156
- required: ["length"],
1316
+ required: [
1317
+ "length"
1318
+ ],
1157
1319
  additionalProperties: {
1158
1320
  type: "string"
1159
1321
  }
1160
1322
  },
1161
- KmsStoreKeyArgs: {
1323
+ KmsClientStoreKeyArgs: {
1162
1324
  type: "object",
1163
1325
  additionalProperties: false,
1164
1326
  properties: {
@@ -1176,161 +1338,163 @@ var plugin_schema_default = {
1176
1338
  type: "string"
1177
1339
  }
1178
1340
  },
1179
- required: ["keyInfo"]
1341
+ required: [
1342
+ "keyInfo"
1343
+ ]
1180
1344
  }
1181
1345
  },
1182
1346
  methods: {
1183
- kmsCreateRawSignature: {
1347
+ kmsClientCreateRawSignature: {
1184
1348
  description: "",
1185
1349
  arguments: {
1186
- $ref: "#/components/schemas/KmsCreateRawSignatureArgs"
1350
+ $ref: "#/components/schemas/KmsClientCreateRawSignatureArgs"
1187
1351
  },
1188
1352
  returnType: {
1189
1353
  $ref: "#/components/schemas/CreateRawSignatureResponse"
1190
1354
  }
1191
1355
  },
1192
- kmsDeleteKey: {
1356
+ kmsClientDeleteKey: {
1193
1357
  description: "",
1194
1358
  arguments: {
1195
- $ref: "#/components/schemas/KmsDeleteKeyArgs"
1359
+ $ref: "#/components/schemas/KmsClientDeleteKeyArgs"
1196
1360
  },
1197
1361
  returnType: {
1198
1362
  type: "boolean"
1199
1363
  }
1200
1364
  },
1201
- kmsGenerateKey: {
1365
+ kmsClientGenerateKey: {
1202
1366
  description: "",
1203
1367
  arguments: {
1204
- $ref: "#/components/schemas/KmsGenerateKeyArgs"
1368
+ $ref: "#/components/schemas/KmsClientGenerateKeyArgs"
1205
1369
  },
1206
1370
  returnType: {
1207
- $ref: "#/components/schemas/ManagedKeyPair"
1371
+ $ref: "#/components/schemas/GenerateKeyResponse"
1208
1372
  }
1209
1373
  },
1210
- kmsGetKey: {
1374
+ kmsClientGetKey: {
1211
1375
  description: "",
1212
1376
  arguments: {
1213
- $ref: "#/components/schemas/KmsGetKeyArgs"
1377
+ $ref: "#/components/schemas/KmsClientGetKeyArgs"
1214
1378
  },
1215
1379
  returnType: {
1216
- $ref: "#/components/schemas/ManagedKeyInfo"
1380
+ $ref: "#/components/schemas/GetKeyResponse"
1217
1381
  }
1218
1382
  },
1219
- kmsGetKeyProvider: {
1383
+ kmsClientGetKeyProvider: {
1220
1384
  description: "",
1221
1385
  arguments: {
1222
- $ref: "#/components/schemas/KmsGetKeyProviderArgs"
1386
+ $ref: "#/components/schemas/KmsClientGetKeyProviderArgs"
1223
1387
  },
1224
1388
  returnType: {
1225
1389
  $ref: "#/components/schemas/KeyProviderResponse"
1226
1390
  }
1227
1391
  },
1228
- kmsGetResolver: {
1392
+ kmsClientGetResolver: {
1229
1393
  description: "",
1230
1394
  arguments: {
1231
- $ref: "#/components/schemas/kmsGetResolverArgs"
1395
+ $ref: "#/components/schemas/kmsClientGetResolverArgs"
1232
1396
  },
1233
1397
  returnType: {
1234
1398
  $ref: "#/components/schemas/Resolver"
1235
1399
  }
1236
1400
  },
1237
- kmsIsValidRawSignature: {
1401
+ kmsClientIsValidRawSignature: {
1238
1402
  description: "",
1239
1403
  arguments: {
1240
- $ref: "#/components/schemas/KmsIsValidRawSignatureArgs"
1404
+ $ref: "#/components/schemas/KmsClientIsValidRawSignatureArgs"
1241
1405
  },
1242
1406
  returnType: {
1243
1407
  $ref: "#/components/schemas/VerifyRawSignatureResponse"
1244
1408
  }
1245
1409
  },
1246
- kmsListKeyProviders: {
1410
+ kmsClientListKeyProviders: {
1247
1411
  description: "",
1248
1412
  arguments: {
1249
- $ref: "#/components/schemas/KmsListKeyProvidersArgs"
1413
+ $ref: "#/components/schemas/KmsClientListKeyProvidersArgs"
1250
1414
  },
1251
1415
  returnType: {
1252
1416
  $ref: "#/components/schemas/ListKeyProvidersResponse"
1253
1417
  }
1254
1418
  },
1255
- kmsListKeys: {
1419
+ kmsClientListKeys: {
1256
1420
  description: "",
1257
1421
  arguments: {
1258
- $ref: "#/components/schemas/KmsListKeysArgs"
1422
+ $ref: "#/components/schemas/KmsClientListKeysArgs"
1259
1423
  },
1260
1424
  returnType: {
1261
1425
  $ref: "#/components/schemas/ListKeysResponse"
1262
1426
  }
1263
1427
  },
1264
- kmsListResolvers: {
1428
+ kmsClientListResolvers: {
1265
1429
  description: "",
1266
1430
  arguments: {
1267
- $ref: "#/components/schemas/KmsListResolversArgs"
1431
+ $ref: "#/components/schemas/KmsClientListResolversArgs"
1268
1432
  },
1269
1433
  returnType: {
1270
1434
  $ref: "#/components/schemas/ListResolversResponse"
1271
1435
  }
1272
1436
  },
1273
- kmsProviderDeleteKey: {
1437
+ kmsClientProviderDeleteKey: {
1274
1438
  description: "",
1275
1439
  arguments: {
1276
- $ref: "#/components/schemas/KmsProviderDeleteKeyArgs"
1440
+ $ref: "#/components/schemas/KmsClientProviderDeleteKeyArgs"
1277
1441
  },
1278
1442
  returnType: {
1279
1443
  type: "boolean"
1280
1444
  }
1281
1445
  },
1282
- kmsProviderGenerateKey: {
1446
+ kmsClientProviderGenerateKey: {
1283
1447
  description: "",
1284
1448
  arguments: {
1285
- $ref: "#/components/schemas/KmsProviderGenerateKey"
1449
+ $ref: "#/components/schemas/KmsClientProviderGenerateKeyArgs"
1286
1450
  },
1287
1451
  returnType: {
1288
- $ref: "#/components/schemas/ManagedKeyPair"
1452
+ $ref: "#/components/schemas/GenerateKeyResponse"
1289
1453
  }
1290
1454
  },
1291
- kmsProviderGetKey: {
1455
+ kmsClientProviderGetKey: {
1292
1456
  description: "",
1293
1457
  arguments: {
1294
- $ref: "#/components/schemas/KmsProviderGetKeyArgs"
1458
+ $ref: "#/components/schemas/KmsClientProviderGetKeyArgs"
1295
1459
  },
1296
1460
  returnType: {
1297
- $ref: "#/components/schemas/ManagedKeyInfo"
1461
+ $ref: "#/components/schemas/GetKeyResponse"
1298
1462
  }
1299
1463
  },
1300
- kmsProviderListKeys: {
1464
+ kmsClientProviderListKeys: {
1301
1465
  description: "",
1302
1466
  arguments: {
1303
- $ref: "#/components/schemas/KmsProviderListKeysArgs"
1467
+ $ref: "#/components/schemas/KmsClientProviderListKeysArgs"
1304
1468
  },
1305
1469
  returnType: {
1306
1470
  $ref: "#/components/schemas/ListKeysResponse"
1307
1471
  }
1308
1472
  },
1309
- kmsProviderStoreKey: {
1473
+ kmsClientProviderStoreKey: {
1310
1474
  description: "",
1311
1475
  arguments: {
1312
- $ref: "#/components/schemas/KmsProviderStoreKey"
1476
+ $ref: "#/components/schemas/KmsClientProviderStoreKeyArgs"
1313
1477
  },
1314
1478
  returnType: {
1315
- $ref: "#/components/schemas/ManagedKeyInfo"
1479
+ $ref: "#/components/schemas/StoreKeyResponse"
1316
1480
  }
1317
1481
  },
1318
- kmsResolveKey: {
1482
+ kmsClientResolveKey: {
1319
1483
  description: "",
1320
1484
  arguments: {
1321
- $ref: "#/components/schemas/KmsResolveKeyArgs"
1485
+ $ref: "#/components/schemas/KmsClientResolveKeyArgs"
1322
1486
  },
1323
1487
  returnType: {
1324
1488
  $ref: "#/components/schemas/ResolvedKeyInfo"
1325
1489
  }
1326
1490
  },
1327
- kmsStoreKey: {
1491
+ kmsClientStoreKey: {
1328
1492
  description: "",
1329
1493
  arguments: {
1330
- $ref: "#/components/schemas/KmsStoreKeyArgs"
1494
+ $ref: "#/components/schemas/KmsClientStoreKeyArgs"
1331
1495
  },
1332
1496
  returnType: {
1333
- $ref: "#/components/schemas/ManagedKeyInfo"
1497
+ $ref: "#/components/schemas/StoreKeyResponse"
1334
1498
  }
1335
1499
  }
1336
1500
  }
@@ -3603,7 +3767,11 @@ var KmsRestClient = class _KmsRestClient {
3603
3767
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3604
3768
  const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
3605
3769
  const response = await (0, import_cross_fetch.fetch)(url, {
3606
- method: "GET"
3770
+ method: "GET",
3771
+ headers: await this.createHeaders({
3772
+ tenantId: args.tenantId,
3773
+ userId: args.userId
3774
+ })
3607
3775
  });
3608
3776
  logger.debug(`get resolver response: ${response}`);
3609
3777
  if (!response.ok) {
@@ -3616,7 +3784,11 @@ var KmsRestClient = class _KmsRestClient {
3616
3784
  const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
3617
3785
  const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
3618
3786
  const response = await (0, import_cross_fetch.fetch)(url, {
3619
- method: "GET"
3787
+ method: "GET",
3788
+ headers: await this.createHeaders({
3789
+ tenantId: args?.tenantId,
3790
+ userId: args?.userId
3791
+ })
3620
3792
  });
3621
3793
  logger.debug(`list resolvers response: ${response}`);
3622
3794
  if (!response.ok) {
@@ -3637,7 +3809,9 @@ var KmsRestClient = class _KmsRestClient {
3637
3809
  const response = await (0, import_cross_fetch.fetch)(url, {
3638
3810
  method: "POST",
3639
3811
  headers: await this.createHeaders({
3640
- "Content-Type": "application/json"
3812
+ contentType: "application/json",
3813
+ tenantId: args.tenantId,
3814
+ userId: args.userId
3641
3815
  }),
3642
3816
  body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
3643
3817
  });
@@ -3658,7 +3832,9 @@ var KmsRestClient = class _KmsRestClient {
3658
3832
  const response = await (0, import_cross_fetch.fetch)(url, {
3659
3833
  method: "POST",
3660
3834
  headers: await this.createHeaders({
3661
- "Content-Type": "application/json"
3835
+ contentType: "application/json",
3836
+ tenantId: args.tenantId,
3837
+ userId: args.userId
3662
3838
  }),
3663
3839
  body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
3664
3840
  });
@@ -3680,7 +3856,9 @@ var KmsRestClient = class _KmsRestClient {
3680
3856
  const response = await (0, import_cross_fetch.fetch)(url, {
3681
3857
  method: "POST",
3682
3858
  headers: await this.createHeaders({
3683
- "Content-Type": "application/json"
3859
+ contentType: "application/json",
3860
+ tenantId: args.tenantId,
3861
+ userId: args.userId
3684
3862
  }),
3685
3863
  body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
3686
3864
  });
@@ -3695,7 +3873,11 @@ var KmsRestClient = class _KmsRestClient {
3695
3873
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3696
3874
  const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
3697
3875
  const response = await (0, import_cross_fetch.fetch)(url, {
3698
- method: "GET"
3876
+ method: "GET",
3877
+ headers: await this.createHeaders({
3878
+ tenantId: args.tenantId,
3879
+ userId: args.userId
3880
+ })
3699
3881
  });
3700
3882
  logger.debug(`get key response: ${response}`);
3701
3883
  if (!response.ok) {
@@ -3712,7 +3894,11 @@ var KmsRestClient = class _KmsRestClient {
3712
3894
  }
3713
3895
  });
3714
3896
  const response = await (0, import_cross_fetch.fetch)(url, {
3715
- method: "GET"
3897
+ method: "GET",
3898
+ headers: await this.createHeaders({
3899
+ tenantId: args?.tenantId,
3900
+ userId: args?.userId
3901
+ })
3716
3902
  });
3717
3903
  logger.debug(`list keys response: ${response}`);
3718
3904
  if (!response.ok) {
@@ -3731,7 +3917,9 @@ var KmsRestClient = class _KmsRestClient {
3731
3917
  const response = await (0, import_cross_fetch.fetch)(url, {
3732
3918
  method: "POST",
3733
3919
  headers: await this.createHeaders({
3734
- "Content-Type": "application/json"
3920
+ contentType: "application/json",
3921
+ tenantId: args.tenantId,
3922
+ userId: args.userId
3735
3923
  }),
3736
3924
  body: JSON.stringify(StoreKeyToJSONTyped(body))
3737
3925
  });
@@ -3754,7 +3942,9 @@ var KmsRestClient = class _KmsRestClient {
3754
3942
  const response = await (0, import_cross_fetch.fetch)(url, {
3755
3943
  method: "POST",
3756
3944
  headers: await this.createHeaders({
3757
- "Content-Type": "application/json"
3945
+ contentType: "application/json",
3946
+ tenantId: args.tenantId,
3947
+ userId: args.userId
3758
3948
  }),
3759
3949
  body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
3760
3950
  });
@@ -3769,7 +3959,11 @@ var KmsRestClient = class _KmsRestClient {
3769
3959
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3770
3960
  const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
3771
3961
  const response = await (0, import_cross_fetch.fetch)(url, {
3772
- method: "DELETE"
3962
+ method: "DELETE",
3963
+ headers: await this.createHeaders({
3964
+ tenantId: args.tenantId,
3965
+ userId: args.userId
3966
+ })
3773
3967
  });
3774
3968
  logger.debug(`delete key response: ${response}`);
3775
3969
  if (!response.ok) {
@@ -3782,7 +3976,11 @@ var KmsRestClient = class _KmsRestClient {
3782
3976
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3783
3977
  const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
3784
3978
  const response = await (0, import_cross_fetch.fetch)(url, {
3785
- method: "GET"
3979
+ method: "GET",
3980
+ headers: await this.createHeaders({
3981
+ tenantId: args.tenantId,
3982
+ userId: args.userId
3983
+ })
3786
3984
  });
3787
3985
  logger.debug(`get provider response: ${response}`);
3788
3986
  if (!response.ok) {
@@ -3795,7 +3993,11 @@ var KmsRestClient = class _KmsRestClient {
3795
3993
  const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
3796
3994
  const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
3797
3995
  const response = await (0, import_cross_fetch.fetch)(url, {
3798
- method: "GET"
3996
+ method: "GET",
3997
+ headers: await this.createHeaders({
3998
+ tenantId: args?.tenantId,
3999
+ userId: args?.userId
4000
+ })
3799
4001
  });
3800
4002
  logger.debug(`list providers response: ${response}`);
3801
4003
  if (!response.ok) {
@@ -3808,7 +4010,11 @@ var KmsRestClient = class _KmsRestClient {
3808
4010
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3809
4011
  const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
3810
4012
  const response = await (0, import_cross_fetch.fetch)(url, {
3811
- method: "GET"
4013
+ method: "GET",
4014
+ headers: await this.createHeaders({
4015
+ tenantId: args.tenantId,
4016
+ userId: args.userId
4017
+ })
3812
4018
  });
3813
4019
  logger.debug(`list provider keys response: ${response}`);
3814
4020
  if (!response.ok) {
@@ -3827,7 +4033,9 @@ var KmsRestClient = class _KmsRestClient {
3827
4033
  const response = await (0, import_cross_fetch.fetch)(url, {
3828
4034
  method: "POST",
3829
4035
  headers: await this.createHeaders({
3830
- "Content-Type": "application/json"
4036
+ contentType: "application/json",
4037
+ tenantId: args.tenantId,
4038
+ userId: args.userId
3831
4039
  }),
3832
4040
  body: JSON.stringify(StoreKeyToJSONTyped(body))
3833
4041
  });
@@ -3850,7 +4058,9 @@ var KmsRestClient = class _KmsRestClient {
3850
4058
  const response = await (0, import_cross_fetch.fetch)(url, {
3851
4059
  method: "POST",
3852
4060
  headers: await this.createHeaders({
3853
- "Content-Type": "application/json"
4061
+ contentType: "application/json",
4062
+ tenantId: args.tenantId,
4063
+ userId: args.userId
3854
4064
  }),
3855
4065
  body: JSON.stringify(GenerateKeyToJSONTyped(body))
3856
4066
  });
@@ -3865,7 +4075,11 @@ var KmsRestClient = class _KmsRestClient {
3865
4075
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3866
4076
  const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
3867
4077
  const response = await (0, import_cross_fetch.fetch)(url, {
3868
- method: "GET"
4078
+ method: "GET",
4079
+ headers: await this.createHeaders({
4080
+ tenantId: args.tenantId,
4081
+ userId: args.userId
4082
+ })
3869
4083
  });
3870
4084
  logger.debug(`get provider key response: ${response}`);
3871
4085
  if (!response.ok) {
@@ -3878,7 +4092,11 @@ var KmsRestClient = class _KmsRestClient {
3878
4092
  const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
3879
4093
  const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
3880
4094
  const response = await (0, import_cross_fetch.fetch)(url, {
3881
- method: "DELETE"
4095
+ method: "DELETE",
4096
+ headers: await this.createHeaders({
4097
+ tenantId: args.tenantId,
4098
+ userId: args.userId
4099
+ })
3882
4100
  });
3883
4101
  logger.debug(`delete key response: ${response}`);
3884
4102
  if (!response.ok) {
@@ -3894,9 +4112,17 @@ var KmsRestClient = class _KmsRestClient {
3894
4112
  }
3895
4113
  throw new Error("No base url has been provided");
3896
4114
  }
3897
- async createHeaders(existing) {
4115
+ async createHeaders(args) {
3898
4116
  const headers = {
3899
- ...existing,
4117
+ ...args?.contentType ? {
4118
+ "Content-Type": args.contentType
4119
+ } : {},
4120
+ ...args?.tenantId ? {
4121
+ "X-Tenant-ID": args.tenantId
4122
+ } : {},
4123
+ ...args?.userId ? {
4124
+ "X-User-ID": args.userId
4125
+ } : {},
3900
4126
  Accept: "application/json"
3901
4127
  };
3902
4128
  if (this.authOpts?.enabled === true) {