@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48

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 (71) hide show
  1. package/LICENSE +201 -0
  2. package/dist/index.cjs +2083 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1468 -0
  5. package/dist/index.d.ts +1468 -0
  6. package/dist/index.js +2063 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +60 -0
  9. package/plugin.schema.json +1123 -0
  10. package/src/agent/KmsRestClient.ts +468 -0
  11. package/src/index.ts +7 -0
  12. package/src/models/AwsAssumeRoleCredentials.ts +98 -0
  13. package/src/models/AwsClientConfiguration.ts +72 -0
  14. package/src/models/AwsKmsSetting.ts +126 -0
  15. package/src/models/AwsStaticCredentials.ts +98 -0
  16. package/src/models/AwsWebIdentityTokenCredentials.ts +99 -0
  17. package/src/models/AzureClientSecretCredentialOpts.ts +90 -0
  18. package/src/models/AzureCredentialOpts.ts +70 -0
  19. package/src/models/AzureKeyVaultSetting.ts +112 -0
  20. package/src/models/CoseKey.ts +145 -0
  21. package/src/models/CoseKeyPair.ts +79 -0
  22. package/src/models/CoseKeyType.ts +55 -0
  23. package/src/models/CreateKeyProvider.ts +115 -0
  24. package/src/models/CreateRawSignature.ts +80 -0
  25. package/src/models/CreateRawSignatureResponse.ts +65 -0
  26. package/src/models/CreateSimpleSignature.ts +100 -0
  27. package/src/models/CryptoAlg.ts +55 -0
  28. package/src/models/Curve.ts +59 -0
  29. package/src/models/DigestAlg.ts +58 -0
  30. package/src/models/ErrorResponse.ts +82 -0
  31. package/src/models/GenerateKey.ts +106 -0
  32. package/src/models/GenerateKeyGlobal.ts +114 -0
  33. package/src/models/GenerateKeyResponse.ts +71 -0
  34. package/src/models/GetKeyResponse.ts +71 -0
  35. package/src/models/IdentifierMethod.ts +56 -0
  36. package/src/models/JoseKeyPair.ts +79 -0
  37. package/src/models/Jwk.ts +248 -0
  38. package/src/models/JwkKeyType.ts +55 -0
  39. package/src/models/JwkUse.ts +53 -0
  40. package/src/models/KeyEncoding.ts +53 -0
  41. package/src/models/KeyInfo.ts +164 -0
  42. package/src/models/KeyOperations.ts +59 -0
  43. package/src/models/KeyProvider.ts +82 -0
  44. package/src/models/KeyProviderResponse.ts +82 -0
  45. package/src/models/KeyProviderType.ts +54 -0
  46. package/src/models/KeyResolver.ts +92 -0
  47. package/src/models/KeyType.ts +54 -0
  48. package/src/models/KeyVisibility.ts +53 -0
  49. package/src/models/ListKeyProvidersResponse.ts +71 -0
  50. package/src/models/ListKeysResponse.ts +71 -0
  51. package/src/models/ListResolversResponse.ts +71 -0
  52. package/src/models/LookupMode.ts +54 -0
  53. package/src/models/ManagedKeyInfo.ts +167 -0
  54. package/src/models/ManagedKeyPair.ts +111 -0
  55. package/src/models/MaskGenFunction.ts +52 -0
  56. package/src/models/ProviderCapabilities.ts +122 -0
  57. package/src/models/ResolvePublicKey.ts +102 -0
  58. package/src/models/ResolvedKeyInfo.ts +165 -0
  59. package/src/models/Resolver.ts +92 -0
  60. package/src/models/SignInput.ts +92 -0
  61. package/src/models/SignOutput.ts +79 -0
  62. package/src/models/Signature.ts +103 -0
  63. package/src/models/SignatureAlgorithm.ts +63 -0
  64. package/src/models/StoreKey.ts +79 -0
  65. package/src/models/StoreKeyResponse.ts +71 -0
  66. package/src/models/UpdateKeyProvider.ts +99 -0
  67. package/src/models/VerifyRawSignature.ts +89 -0
  68. package/src/models/VerifyRawSignatureResponse.ts +65 -0
  69. package/src/models/VerifySimpleSignature.ts +85 -0
  70. package/src/models/index.ts +60 -0
  71. package/src/types/IKmsRestClient.ts +133 -0
@@ -0,0 +1,59 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Elliptic curve identifier.
18
+ * @export
19
+ */
20
+ export const Curve = {
21
+ P256: 'P-256',
22
+ P384: 'P-384',
23
+ P521: 'P-521',
24
+ Secp256k1: 'secp256k1',
25
+ Ed25519: 'Ed25519',
26
+ Ed448: 'Ed448',
27
+ X25519: 'X25519',
28
+ X448: 'X448'
29
+ } as const;
30
+ export type Curve = typeof Curve[keyof typeof Curve];
31
+
32
+
33
+ export function instanceOfCurve(value: any): boolean {
34
+ for (const key in Curve) {
35
+ if (Object.prototype.hasOwnProperty.call(Curve, key)) {
36
+ if (Curve[key as keyof typeof Curve] === value) {
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+ return false;
42
+ }
43
+
44
+ export function CurveFromJSON(json: any): Curve {
45
+ return CurveFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function CurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): Curve {
49
+ return json as Curve;
50
+ }
51
+
52
+ export function CurveToJSON(value?: Curve | null): any {
53
+ return value as any;
54
+ }
55
+
56
+ export function CurveToJSONTyped(value: any, ignoreDiscriminator: boolean): Curve {
57
+ return value as Curve;
58
+ }
59
+
@@ -0,0 +1,58 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Cryptographic digest (hash) algorithm identifier.
18
+ * @export
19
+ */
20
+ export const DigestAlg = {
21
+ None: 'NONE',
22
+ Sha256: 'SHA256',
23
+ Sha384: 'SHA384',
24
+ Sha512: 'SHA512',
25
+ Sha3256: 'SHA3_256',
26
+ Sha3384: 'SHA3_384',
27
+ Sha3512: 'SHA3_512'
28
+ } as const;
29
+ export type DigestAlg = typeof DigestAlg[keyof typeof DigestAlg];
30
+
31
+
32
+ export function instanceOfDigestAlg(value: any): boolean {
33
+ for (const key in DigestAlg) {
34
+ if (Object.prototype.hasOwnProperty.call(DigestAlg, key)) {
35
+ if (DigestAlg[key as keyof typeof DigestAlg] === value) {
36
+ return true;
37
+ }
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+
43
+ export function DigestAlgFromJSON(json: any): DigestAlg {
44
+ return DigestAlgFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function DigestAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigestAlg {
48
+ return json as DigestAlg;
49
+ }
50
+
51
+ export function DigestAlgToJSON(value?: DigestAlg | null): any {
52
+ return value as any;
53
+ }
54
+
55
+ export function DigestAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): DigestAlg {
56
+ return value as DigestAlg;
57
+ }
58
+
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface ErrorResponse
19
+ */
20
+ export interface ErrorResponse {
21
+ /**
22
+ * Error code identifying the type of error.
23
+ * @type {string}
24
+ * @memberof ErrorResponse
25
+ */
26
+ code: string;
27
+ /**
28
+ * Human-readable error message.
29
+ * @type {string}
30
+ * @memberof ErrorResponse
31
+ */
32
+ message: string;
33
+ /**
34
+ * Additional error details.
35
+ * @type {{ [key: string]: any; }}
36
+ * @memberof ErrorResponse
37
+ */
38
+ details?: { [key: string]: any; };
39
+ }
40
+
41
+ /**
42
+ * Check if a given object implements the ErrorResponse interface.
43
+ */
44
+ export function instanceOfErrorResponse(value: object): value is ErrorResponse {
45
+ if (!('code' in value) || value['code'] === undefined) return false;
46
+ if (!('message' in value) || value['message'] === undefined) return false;
47
+ return true;
48
+ }
49
+
50
+ export function ErrorResponseFromJSON(json: any): ErrorResponse {
51
+ return ErrorResponseFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'code': json['code'],
61
+ 'message': json['message'],
62
+ 'details': json['details'] == null ? undefined : json['details'],
63
+ };
64
+ }
65
+
66
+ export function ErrorResponseToJSON(json: any): ErrorResponse {
67
+ return ErrorResponseToJSONTyped(json, false);
68
+ }
69
+
70
+ export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'code': value['code'],
78
+ 'message': value['message'],
79
+ 'details': value['details'],
80
+ };
81
+ }
82
+
@@ -0,0 +1,106 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { KeyOperations } from './KeyOperations';
16
+ import {
17
+ KeyOperationsFromJSON,
18
+ KeyOperationsToJSON,
19
+ } from './KeyOperations';
20
+ import type { SignatureAlgorithm } from './SignatureAlgorithm';
21
+ import {
22
+ SignatureAlgorithmFromJSON,
23
+ SignatureAlgorithmToJSON,
24
+ } from './SignatureAlgorithm';
25
+ import type { JwkUse } from './JwkUse';
26
+ import {
27
+ JwkUseFromJSON,
28
+ JwkUseToJSON,
29
+ } from './JwkUse';
30
+
31
+ /**
32
+ * Parameters for key generation.
33
+ * @export
34
+ * @interface GenerateKey
35
+ */
36
+ export interface GenerateKey {
37
+ /**
38
+ * Alias for the generated key.
39
+ * @type {string}
40
+ * @memberof GenerateKey
41
+ */
42
+ alias?: string;
43
+ /**
44
+ *
45
+ * @type {JwkUse}
46
+ * @memberof GenerateKey
47
+ */
48
+ use?: JwkUse;
49
+ /**
50
+ *
51
+ * @type {Array<KeyOperations>}
52
+ * @memberof GenerateKey
53
+ */
54
+ keyOperations?: Array<KeyOperations>;
55
+ /**
56
+ *
57
+ * @type {SignatureAlgorithm}
58
+ * @memberof GenerateKey
59
+ */
60
+ alg?: SignatureAlgorithm;
61
+ }
62
+
63
+
64
+
65
+ /**
66
+ * Check if a given object implements the GenerateKey interface.
67
+ */
68
+ export function instanceOfGenerateKey(value: object): value is GenerateKey {
69
+ return true;
70
+ }
71
+
72
+ export function GenerateKeyFromJSON(json: any): GenerateKey {
73
+ return GenerateKeyFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function GenerateKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKey {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'alias': json['alias'] == null ? undefined : json['alias'],
83
+ 'use': json['use'] == null ? undefined : JwkUseFromJSON(json['use']),
84
+ 'keyOperations': json['keyOperations'] == null ? undefined : ((json['keyOperations'] as Array<any>).map(KeyOperationsFromJSON)),
85
+ 'alg': json['alg'] == null ? undefined : SignatureAlgorithmFromJSON(json['alg']),
86
+ };
87
+ }
88
+
89
+ export function GenerateKeyToJSON(json: any): GenerateKey {
90
+ return GenerateKeyToJSONTyped(json, false);
91
+ }
92
+
93
+ export function GenerateKeyToJSONTyped(value?: GenerateKey | null, ignoreDiscriminator: boolean = false): any {
94
+ if (value == null) {
95
+ return value;
96
+ }
97
+
98
+ return {
99
+
100
+ 'alias': value['alias'],
101
+ 'use': JwkUseToJSON(value['use']),
102
+ 'keyOperations': value['keyOperations'] == null ? undefined : ((value['keyOperations'] as Array<any>).map(KeyOperationsToJSON)),
103
+ 'alg': SignatureAlgorithmToJSON(value['alg']),
104
+ };
105
+ }
106
+
@@ -0,0 +1,114 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { KeyOperations } from './KeyOperations';
16
+ import {
17
+ KeyOperationsFromJSON,
18
+ KeyOperationsToJSON,
19
+ } from './KeyOperations';
20
+ import type { SignatureAlgorithm } from './SignatureAlgorithm';
21
+ import {
22
+ SignatureAlgorithmFromJSON,
23
+ SignatureAlgorithmToJSON,
24
+ } from './SignatureAlgorithm';
25
+ import type { JwkUse } from './JwkUse';
26
+ import {
27
+ JwkUseFromJSON,
28
+ JwkUseToJSON,
29
+ } from './JwkUse';
30
+
31
+ /**
32
+ * Parameters for global key generation with optional provider specification.
33
+ * @export
34
+ * @interface GenerateKeyGlobal
35
+ */
36
+ export interface GenerateKeyGlobal {
37
+ /**
38
+ * Alias for the generated key.
39
+ * @type {string}
40
+ * @memberof GenerateKeyGlobal
41
+ */
42
+ alias?: string;
43
+ /**
44
+ *
45
+ * @type {JwkUse}
46
+ * @memberof GenerateKeyGlobal
47
+ */
48
+ use?: JwkUse;
49
+ /**
50
+ *
51
+ * @type {Array<KeyOperations>}
52
+ * @memberof GenerateKeyGlobal
53
+ */
54
+ keyOperations?: Array<KeyOperations>;
55
+ /**
56
+ *
57
+ * @type {SignatureAlgorithm}
58
+ * @memberof GenerateKeyGlobal
59
+ */
60
+ alg?: SignatureAlgorithm;
61
+ /**
62
+ * Optional provider ID. If not specified, the default provider will be used.
63
+ * @type {string}
64
+ * @memberof GenerateKeyGlobal
65
+ */
66
+ providerId?: string;
67
+ }
68
+
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the GenerateKeyGlobal interface.
73
+ */
74
+ export function instanceOfGenerateKeyGlobal(value: object): value is GenerateKeyGlobal {
75
+ return true;
76
+ }
77
+
78
+ export function GenerateKeyGlobalFromJSON(json: any): GenerateKeyGlobal {
79
+ return GenerateKeyGlobalFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function GenerateKeyGlobalFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKeyGlobal {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'alias': json['alias'] == null ? undefined : json['alias'],
89
+ 'use': json['use'] == null ? undefined : JwkUseFromJSON(json['use']),
90
+ 'keyOperations': json['keyOperations'] == null ? undefined : ((json['keyOperations'] as Array<any>).map(KeyOperationsFromJSON)),
91
+ 'alg': json['alg'] == null ? undefined : SignatureAlgorithmFromJSON(json['alg']),
92
+ 'providerId': json['providerId'] == null ? undefined : json['providerId'],
93
+ };
94
+ }
95
+
96
+ export function GenerateKeyGlobalToJSON(json: any): GenerateKeyGlobal {
97
+ return GenerateKeyGlobalToJSONTyped(json, false);
98
+ }
99
+
100
+ export function GenerateKeyGlobalToJSONTyped(value?: GenerateKeyGlobal | null, ignoreDiscriminator: boolean = false): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+
105
+ return {
106
+
107
+ 'alias': value['alias'],
108
+ 'use': JwkUseToJSON(value['use']),
109
+ 'keyOperations': value['keyOperations'] == null ? undefined : ((value['keyOperations'] as Array<any>).map(KeyOperationsToJSON)),
110
+ 'alg': SignatureAlgorithmToJSON(value['alg']),
111
+ 'providerId': value['providerId'],
112
+ };
113
+ }
114
+
@@ -0,0 +1,71 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { ManagedKeyPair } from './ManagedKeyPair';
16
+ import {
17
+ ManagedKeyPairFromJSON,
18
+ ManagedKeyPairToJSON,
19
+ } from './ManagedKeyPair';
20
+
21
+ /**
22
+ * Response body containing a generated key pair.
23
+ * @export
24
+ * @interface GenerateKeyResponse
25
+ */
26
+ export interface GenerateKeyResponse {
27
+ /**
28
+ *
29
+ * @type {ManagedKeyPair}
30
+ * @memberof GenerateKeyResponse
31
+ */
32
+ keyPair: ManagedKeyPair;
33
+ }
34
+
35
+ /**
36
+ * Check if a given object implements the GenerateKeyResponse interface.
37
+ */
38
+ export function instanceOfGenerateKeyResponse(value: object): value is GenerateKeyResponse {
39
+ if (!('keyPair' in value) || value['keyPair'] === undefined) return false;
40
+ return true;
41
+ }
42
+
43
+ export function GenerateKeyResponseFromJSON(json: any): GenerateKeyResponse {
44
+ return GenerateKeyResponseFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function GenerateKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerateKeyResponse {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'keyPair': ManagedKeyPairFromJSON(json['keyPair']),
54
+ };
55
+ }
56
+
57
+ export function GenerateKeyResponseToJSON(json: any): GenerateKeyResponse {
58
+ return GenerateKeyResponseToJSONTyped(json, false);
59
+ }
60
+
61
+ export function GenerateKeyResponseToJSONTyped(value?: GenerateKeyResponse | null, ignoreDiscriminator: boolean = false): any {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+
66
+ return {
67
+
68
+ 'keyPair': ManagedKeyPairToJSON(value['keyPair']),
69
+ };
70
+ }
71
+
@@ -0,0 +1,71 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { ManagedKeyInfo } from './ManagedKeyInfo';
16
+ import {
17
+ ManagedKeyInfoFromJSON,
18
+ ManagedKeyInfoToJSON,
19
+ } from './ManagedKeyInfo';
20
+
21
+ /**
22
+ * Response body containing a managed key.
23
+ * @export
24
+ * @interface GetKeyResponse
25
+ */
26
+ export interface GetKeyResponse {
27
+ /**
28
+ *
29
+ * @type {ManagedKeyInfo}
30
+ * @memberof GetKeyResponse
31
+ */
32
+ keyInfo: ManagedKeyInfo;
33
+ }
34
+
35
+ /**
36
+ * Check if a given object implements the GetKeyResponse interface.
37
+ */
38
+ export function instanceOfGetKeyResponse(value: object): value is GetKeyResponse {
39
+ if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
40
+ return true;
41
+ }
42
+
43
+ export function GetKeyResponseFromJSON(json: any): GetKeyResponse {
44
+ return GetKeyResponseFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function GetKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetKeyResponse {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'keyInfo': ManagedKeyInfoFromJSON(json['keyInfo']),
54
+ };
55
+ }
56
+
57
+ export function GetKeyResponseToJSON(json: any): GetKeyResponse {
58
+ return GetKeyResponseToJSONTyped(json, false);
59
+ }
60
+
61
+ export function GetKeyResponseToJSONTyped(value?: GetKeyResponse | null, ignoreDiscriminator: boolean = false): any {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+
66
+ return {
67
+
68
+ 'keyInfo': ManagedKeyInfoToJSON(value['keyInfo']),
69
+ };
70
+ }
71
+
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Method used to identify cryptographic keys.
18
+ * @export
19
+ */
20
+ export const IdentifierMethod = {
21
+ Jwk: 'JWK',
22
+ Kid: 'KID',
23
+ CoseKey: 'COSE_KEY',
24
+ X5C: 'X5C',
25
+ Did: 'DID'
26
+ } as const;
27
+ export type IdentifierMethod = typeof IdentifierMethod[keyof typeof IdentifierMethod];
28
+
29
+
30
+ export function instanceOfIdentifierMethod(value: any): boolean {
31
+ for (const key in IdentifierMethod) {
32
+ if (Object.prototype.hasOwnProperty.call(IdentifierMethod, key)) {
33
+ if (IdentifierMethod[key as keyof typeof IdentifierMethod] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+
41
+ export function IdentifierMethodFromJSON(json: any): IdentifierMethod {
42
+ return IdentifierMethodFromJSONTyped(json, false);
43
+ }
44
+
45
+ export function IdentifierMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentifierMethod {
46
+ return json as IdentifierMethod;
47
+ }
48
+
49
+ export function IdentifierMethodToJSON(value?: IdentifierMethod | null): any {
50
+ return value as any;
51
+ }
52
+
53
+ export function IdentifierMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): IdentifierMethod {
54
+ return value as IdentifierMethod;
55
+ }
56
+
@@ -0,0 +1,79 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KMS REST Server API
5
+ * A REST API for managing cryptographic keys and performing signing and verification operations.
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: support@sphereon.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { Jwk } from './Jwk';
16
+ import {
17
+ JwkFromJSON,
18
+ JwkToJSON,
19
+ } from './Jwk';
20
+
21
+ /**
22
+ * Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption).
23
+ * @export
24
+ * @interface JoseKeyPair
25
+ */
26
+ export interface JoseKeyPair {
27
+ /**
28
+ *
29
+ * @type {Jwk}
30
+ * @memberof JoseKeyPair
31
+ */
32
+ privateJwk?: Jwk;
33
+ /**
34
+ *
35
+ * @type {Jwk}
36
+ * @memberof JoseKeyPair
37
+ */
38
+ publicJwk: Jwk;
39
+ }
40
+
41
+ /**
42
+ * Check if a given object implements the JoseKeyPair interface.
43
+ */
44
+ export function instanceOfJoseKeyPair(value: object): value is JoseKeyPair {
45
+ if (!('publicJwk' in value) || value['publicJwk'] === undefined) return false;
46
+ return true;
47
+ }
48
+
49
+ export function JoseKeyPairFromJSON(json: any): JoseKeyPair {
50
+ return JoseKeyPairFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function JoseKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): JoseKeyPair {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'privateJwk': json['privateJwk'] == null ? undefined : JwkFromJSON(json['privateJwk']),
60
+ 'publicJwk': JwkFromJSON(json['publicJwk']),
61
+ };
62
+ }
63
+
64
+ export function JoseKeyPairToJSON(json: any): JoseKeyPair {
65
+ return JoseKeyPairToJSONTyped(json, false);
66
+ }
67
+
68
+ export function JoseKeyPairToJSONTyped(value?: JoseKeyPair | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+
73
+ return {
74
+
75
+ 'privateJwk': JwkToJSON(value['privateJwk']),
76
+ 'publicJwk': JwkToJSON(value['publicJwk']),
77
+ };
78
+ }
79
+