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

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 (72) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +369 -0
  3. package/dist/index.cjs +3924 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +3927 -0
  6. package/dist/index.d.ts +3927 -0
  7. package/dist/index.js +3903 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +60 -0
  10. package/plugin.schema.json +1004 -0
  11. package/src/agent/KmsRestClient.ts +468 -0
  12. package/src/index.ts +8 -0
  13. package/src/models/AwsAssumeRoleCredentials.ts +90 -0
  14. package/src/models/AwsClientConfiguration.ts +69 -0
  15. package/src/models/AwsKmsSetting.ts +112 -0
  16. package/src/models/AwsStaticCredentials.ts +90 -0
  17. package/src/models/AwsWebIdentityTokenCredentials.ts +91 -0
  18. package/src/models/AzureClientSecretCredentialOpts.ts +85 -0
  19. package/src/models/AzureCredentialOpts.ts +65 -0
  20. package/src/models/AzureKeyVaultSetting.ts +101 -0
  21. package/src/models/CoseKey.ts +137 -0
  22. package/src/models/CoseKeyPair.ts +73 -0
  23. package/src/models/CoseKeyType.ts +52 -0
  24. package/src/models/CreateKeyProvider.ts +101 -0
  25. package/src/models/CreateRawSignature.ts +74 -0
  26. package/src/models/CreateRawSignatureResponse.ts +62 -0
  27. package/src/models/CreateSimpleSignature.ts +86 -0
  28. package/src/models/CryptoAlg.ts +52 -0
  29. package/src/models/Curve.ts +56 -0
  30. package/src/models/DigestAlg.ts +55 -0
  31. package/src/models/ErrorResponse.ts +79 -0
  32. package/src/models/GenerateKey.ts +92 -0
  33. package/src/models/GenerateKeyGlobal.ts +100 -0
  34. package/src/models/GenerateKeyResponse.ts +65 -0
  35. package/src/models/GetKeyResponse.ts +65 -0
  36. package/src/models/IdentifierMethod.ts +53 -0
  37. package/src/models/JoseKeyPair.ts +73 -0
  38. package/src/models/Jwk.ts +231 -0
  39. package/src/models/JwkKeyType.ts +52 -0
  40. package/src/models/JwkUse.ts +50 -0
  41. package/src/models/KeyEncoding.ts +50 -0
  42. package/src/models/KeyInfo.ts +144 -0
  43. package/src/models/KeyOperations.ts +56 -0
  44. package/src/models/KeyProvider.ts +74 -0
  45. package/src/models/KeyProviderResponse.ts +74 -0
  46. package/src/models/KeyProviderType.ts +51 -0
  47. package/src/models/KeyResolver.ts +85 -0
  48. package/src/models/KeyType.ts +51 -0
  49. package/src/models/KeyVisibility.ts +50 -0
  50. package/src/models/ListKeyProvidersResponse.ts +65 -0
  51. package/src/models/ListKeysResponse.ts +65 -0
  52. package/src/models/ListResolversResponse.ts +65 -0
  53. package/src/models/LookupMode.ts +51 -0
  54. package/src/models/ManagedKeyInfo.ts +147 -0
  55. package/src/models/ManagedKeyPair.ts +102 -0
  56. package/src/models/MaskGenFunction.ts +49 -0
  57. package/src/models/ProviderCapabilities.ts +106 -0
  58. package/src/models/ResolvePublicKey.ts +91 -0
  59. package/src/models/ResolvedKeyInfo.ts +145 -0
  60. package/src/models/Resolver.ts +85 -0
  61. package/src/models/SignInput.ts +87 -0
  62. package/src/models/SignOutput.ts +73 -0
  63. package/src/models/Signature.ts +92 -0
  64. package/src/models/SignatureAlgorithm.ts +60 -0
  65. package/src/models/StoreKey.ts +73 -0
  66. package/src/models/StoreKeyResponse.ts +65 -0
  67. package/src/models/UpdateKeyProvider.ts +90 -0
  68. package/src/models/VerifyRawSignature.ts +83 -0
  69. package/src/models/VerifyRawSignatureResponse.ts +62 -0
  70. package/src/models/VerifySimpleSignature.ts +76 -0
  71. package/src/models/index.ts +60 -0
  72. package/src/types/IKmsRestClient.ts +134 -0
@@ -0,0 +1,52 @@
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
+ * JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family.
17
+ * @export
18
+ */
19
+ export const JwkKeyType = {
20
+ Ec: 'EC',
21
+ Rsa: 'RSA',
22
+ Okp: 'OKP',
23
+ Oct: 'oct',
24
+ } as const
25
+ export type JwkKeyType = (typeof JwkKeyType)[keyof typeof JwkKeyType]
26
+
27
+ export function instanceOfJwkKeyType(value: any): boolean {
28
+ for (const key in JwkKeyType) {
29
+ if (Object.prototype.hasOwnProperty.call(JwkKeyType, key)) {
30
+ if (JwkKeyType[key as keyof typeof JwkKeyType] === value) {
31
+ return true
32
+ }
33
+ }
34
+ }
35
+ return false
36
+ }
37
+
38
+ export function JwkKeyTypeFromJSON(json: any): JwkKeyType {
39
+ return JwkKeyTypeFromJSONTyped(json, false)
40
+ }
41
+
42
+ export function JwkKeyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwkKeyType {
43
+ return json as JwkKeyType
44
+ }
45
+
46
+ export function JwkKeyTypeToJSON(value?: JwkKeyType | null): any {
47
+ return value as any
48
+ }
49
+
50
+ export function JwkKeyTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): JwkKeyType {
51
+ return value as JwkKeyType
52
+ }
@@ -0,0 +1,50 @@
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
+ * Intended use of the key (signing or encryption).
17
+ * @export
18
+ */
19
+ export const JwkUse = {
20
+ Sig: 'sig',
21
+ Enc: 'enc',
22
+ } as const
23
+ export type JwkUse = (typeof JwkUse)[keyof typeof JwkUse]
24
+
25
+ export function instanceOfJwkUse(value: any): boolean {
26
+ for (const key in JwkUse) {
27
+ if (Object.prototype.hasOwnProperty.call(JwkUse, key)) {
28
+ if (JwkUse[key as keyof typeof JwkUse] === value) {
29
+ return true
30
+ }
31
+ }
32
+ }
33
+ return false
34
+ }
35
+
36
+ export function JwkUseFromJSON(json: any): JwkUse {
37
+ return JwkUseFromJSONTyped(json, false)
38
+ }
39
+
40
+ export function JwkUseFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwkUse {
41
+ return json as JwkUse
42
+ }
43
+
44
+ export function JwkUseToJSON(value?: JwkUse | null): any {
45
+ return value as any
46
+ }
47
+
48
+ export function JwkUseToJSONTyped(value: any, ignoreDiscriminator: boolean): JwkUse {
49
+ return value as JwkUse
50
+ }
@@ -0,0 +1,50 @@
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
+ * The encoding format of the cryptographic key.
17
+ * @export
18
+ */
19
+ export const KeyEncoding = {
20
+ Cose: 'COSE',
21
+ Jose: 'JOSE',
22
+ } as const
23
+ export type KeyEncoding = (typeof KeyEncoding)[keyof typeof KeyEncoding]
24
+
25
+ export function instanceOfKeyEncoding(value: any): boolean {
26
+ for (const key in KeyEncoding) {
27
+ if (Object.prototype.hasOwnProperty.call(KeyEncoding, key)) {
28
+ if (KeyEncoding[key as keyof typeof KeyEncoding] === value) {
29
+ return true
30
+ }
31
+ }
32
+ }
33
+ return false
34
+ }
35
+
36
+ export function KeyEncodingFromJSON(json: any): KeyEncoding {
37
+ return KeyEncodingFromJSONTyped(json, false)
38
+ }
39
+
40
+ export function KeyEncodingFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyEncoding {
41
+ return json as KeyEncoding
42
+ }
43
+
44
+ export function KeyEncodingToJSON(value?: KeyEncoding | null): any {
45
+ return value as any
46
+ }
47
+
48
+ export function KeyEncodingToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyEncoding {
49
+ return value as KeyEncoding
50
+ }
@@ -0,0 +1,144 @@
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 { KeyType } from './KeyType'
16
+ import { KeyTypeFromJSON, KeyTypeToJSON } from './KeyType'
17
+ import type { KeyVisibility } from './KeyVisibility'
18
+ import { KeyVisibilityFromJSON, KeyVisibilityToJSON } from './KeyVisibility'
19
+ import type { SignatureAlgorithm } from './SignatureAlgorithm'
20
+ import { SignatureAlgorithmFromJSON, SignatureAlgorithmToJSON } from './SignatureAlgorithm'
21
+ import type { KeyEncoding } from './KeyEncoding'
22
+ import { KeyEncodingFromJSON, KeyEncodingToJSON } from './KeyEncoding'
23
+ import type { Jwk } from './Jwk'
24
+ import { JwkFromJSON, JwkToJSON } from './Jwk'
25
+
26
+ /**
27
+ * Information about a cryptographic key, providing metadata and configuration details necessary for cryptographic operations.
28
+ * @export
29
+ * @interface KeyInfo
30
+ */
31
+ export interface KeyInfo {
32
+ /**
33
+ * Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
34
+ * @type {string}
35
+ * @memberof KeyInfo
36
+ */
37
+ kid?: string
38
+ /**
39
+ *
40
+ * @type {Jwk}
41
+ * @memberof KeyInfo
42
+ */
43
+ key?: Jwk
44
+ /**
45
+ *
46
+ * @type {SignatureAlgorithm}
47
+ * @memberof KeyInfo
48
+ */
49
+ signatureAlgorithm?: SignatureAlgorithm
50
+ /**
51
+ *
52
+ * @type {KeyVisibility}
53
+ * @memberof KeyInfo
54
+ */
55
+ keyVisibility?: KeyVisibility
56
+ /**
57
+ * X.509 certificate chain associated with the key.
58
+ * @type {Array<string>}
59
+ * @memberof KeyInfo
60
+ */
61
+ x5c?: Array<string>
62
+ /**
63
+ * A reference or alias to the key in the Key Management Service (KMS).
64
+ * @type {string}
65
+ * @memberof KeyInfo
66
+ */
67
+ alias?: string
68
+ /**
69
+ * The Key Management System (KMS) identifier associated with the key.
70
+ * @type {string}
71
+ * @memberof KeyInfo
72
+ */
73
+ providerId?: string
74
+ /**
75
+ *
76
+ * @type {KeyType}
77
+ * @memberof KeyInfo
78
+ */
79
+ keyType?: KeyType
80
+ /**
81
+ *
82
+ * @type {KeyEncoding}
83
+ * @memberof KeyInfo
84
+ */
85
+ keyEncoding?: KeyEncoding
86
+ /**
87
+ * Additional configuration options as key-value pairs.
88
+ * @type {{ [key: string]: string; }}
89
+ * @memberof KeyInfo
90
+ */
91
+ opts?: { [key: string]: string }
92
+ }
93
+
94
+ /**
95
+ * Check if a given object implements the KeyInfo interface.
96
+ */
97
+ export function instanceOfKeyInfo(value: object): value is KeyInfo {
98
+ return true
99
+ }
100
+
101
+ export function KeyInfoFromJSON(json: any): KeyInfo {
102
+ return KeyInfoFromJSONTyped(json, false)
103
+ }
104
+
105
+ export function KeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyInfo {
106
+ if (json == null) {
107
+ return json
108
+ }
109
+ return {
110
+ kid: json['kid'] == null ? undefined : json['kid'],
111
+ key: json['key'] == null ? undefined : JwkFromJSON(json['key']),
112
+ signatureAlgorithm: json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
113
+ keyVisibility: json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
114
+ x5c: json['x5c'] == null ? undefined : json['x5c'],
115
+ alias: json['alias'] == null ? undefined : json['alias'],
116
+ providerId: json['providerId'] == null ? undefined : json['providerId'],
117
+ keyType: json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
118
+ keyEncoding: json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
119
+ opts: json['opts'] == null ? undefined : json['opts'],
120
+ }
121
+ }
122
+
123
+ export function KeyInfoToJSON(json: any): KeyInfo {
124
+ return KeyInfoToJSONTyped(json, false)
125
+ }
126
+
127
+ export function KeyInfoToJSONTyped(value?: KeyInfo | null, ignoreDiscriminator: boolean = false): any {
128
+ if (value == null) {
129
+ return value
130
+ }
131
+
132
+ return {
133
+ kid: value['kid'],
134
+ key: JwkToJSON(value['key']),
135
+ signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
136
+ keyVisibility: KeyVisibilityToJSON(value['keyVisibility']),
137
+ x5c: value['x5c'],
138
+ alias: value['alias'],
139
+ providerId: value['providerId'],
140
+ keyType: KeyTypeToJSON(value['keyType']),
141
+ keyEncoding: KeyEncodingToJSON(value['keyEncoding']),
142
+ opts: value['opts'],
143
+ }
144
+ }
@@ -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
+ * Specific operations the key is intended for.
17
+ * @export
18
+ */
19
+ export const KeyOperations = {
20
+ Sign: 'sign',
21
+ Verify: 'verify',
22
+ Encrypt: 'encrypt',
23
+ Decrypt: 'decrypt',
24
+ WrapKey: 'wrapKey',
25
+ UnwrapKey: 'unwrapKey',
26
+ DeriveKey: 'deriveKey',
27
+ DeriveBits: 'deriveBits',
28
+ } as const
29
+ export type KeyOperations = (typeof KeyOperations)[keyof typeof KeyOperations]
30
+
31
+ export function instanceOfKeyOperations(value: any): boolean {
32
+ for (const key in KeyOperations) {
33
+ if (Object.prototype.hasOwnProperty.call(KeyOperations, key)) {
34
+ if (KeyOperations[key as keyof typeof KeyOperations] === value) {
35
+ return true
36
+ }
37
+ }
38
+ }
39
+ return false
40
+ }
41
+
42
+ export function KeyOperationsFromJSON(json: any): KeyOperations {
43
+ return KeyOperationsFromJSONTyped(json, false)
44
+ }
45
+
46
+ export function KeyOperationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyOperations {
47
+ return json as KeyOperations
48
+ }
49
+
50
+ export function KeyOperationsToJSON(value?: KeyOperations | null): any {
51
+ return value as any
52
+ }
53
+
54
+ export function KeyOperationsToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyOperations {
55
+ return value as KeyOperations
56
+ }
@@ -0,0 +1,74 @@
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 { KeyProviderType } from './KeyProviderType'
16
+ import { KeyProviderTypeFromJSON, KeyProviderTypeToJSON } from './KeyProviderType'
17
+
18
+ /**
19
+ * Response body containing the details of a Key Provider instance.
20
+ * @export
21
+ * @interface KeyProvider
22
+ */
23
+ export interface KeyProvider {
24
+ /**
25
+ * The unique identifier assigned to the Key Provider instance upon creation.
26
+ * @type {string}
27
+ * @memberof KeyProvider
28
+ */
29
+ providerId: string
30
+ /**
31
+ *
32
+ * @type {KeyProviderType}
33
+ * @memberof KeyProvider
34
+ */
35
+ type: KeyProviderType
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the KeyProvider interface.
40
+ */
41
+ export function instanceOfKeyProvider(value: object): value is KeyProvider {
42
+ if (!('providerId' in value) || value['providerId'] === undefined) return false
43
+ if (!('type' in value) || value['type'] === undefined) return false
44
+ return true
45
+ }
46
+
47
+ export function KeyProviderFromJSON(json: any): KeyProvider {
48
+ return KeyProviderFromJSONTyped(json, false)
49
+ }
50
+
51
+ export function KeyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProvider {
52
+ if (json == null) {
53
+ return json
54
+ }
55
+ return {
56
+ providerId: json['providerId'],
57
+ type: KeyProviderTypeFromJSON(json['type']),
58
+ }
59
+ }
60
+
61
+ export function KeyProviderToJSON(json: any): KeyProvider {
62
+ return KeyProviderToJSONTyped(json, false)
63
+ }
64
+
65
+ export function KeyProviderToJSONTyped(value?: KeyProvider | null, ignoreDiscriminator: boolean = false): any {
66
+ if (value == null) {
67
+ return value
68
+ }
69
+
70
+ return {
71
+ providerId: value['providerId'],
72
+ type: KeyProviderTypeToJSON(value['type']),
73
+ }
74
+ }
@@ -0,0 +1,74 @@
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 { KeyProviderType } from './KeyProviderType'
16
+ import { KeyProviderTypeFromJSON, KeyProviderTypeToJSON } from './KeyProviderType'
17
+
18
+ /**
19
+ * Response body containing the details of a Key Provider instance.
20
+ * @export
21
+ * @interface KeyProviderResponse
22
+ */
23
+ export interface KeyProviderResponse {
24
+ /**
25
+ * The unique identifier assigned to the Key Provider instance upon creation.
26
+ * @type {string}
27
+ * @memberof KeyProviderResponse
28
+ */
29
+ providerId: string
30
+ /**
31
+ *
32
+ * @type {KeyProviderType}
33
+ * @memberof KeyProviderResponse
34
+ */
35
+ type: KeyProviderType
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the KeyProviderResponse interface.
40
+ */
41
+ export function instanceOfKeyProviderResponse(value: object): value is KeyProviderResponse {
42
+ if (!('providerId' in value) || value['providerId'] === undefined) return false
43
+ if (!('type' in value) || value['type'] === undefined) return false
44
+ return true
45
+ }
46
+
47
+ export function KeyProviderResponseFromJSON(json: any): KeyProviderResponse {
48
+ return KeyProviderResponseFromJSONTyped(json, false)
49
+ }
50
+
51
+ export function KeyProviderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProviderResponse {
52
+ if (json == null) {
53
+ return json
54
+ }
55
+ return {
56
+ providerId: json['providerId'],
57
+ type: KeyProviderTypeFromJSON(json['type']),
58
+ }
59
+ }
60
+
61
+ export function KeyProviderResponseToJSON(json: any): KeyProviderResponse {
62
+ return KeyProviderResponseToJSONTyped(json, false)
63
+ }
64
+
65
+ export function KeyProviderResponseToJSONTyped(value?: KeyProviderResponse | null, ignoreDiscriminator: boolean = false): any {
66
+ if (value == null) {
67
+ return value
68
+ }
69
+
70
+ return {
71
+ providerId: value['providerId'],
72
+ type: KeyProviderTypeToJSON(value['type']),
73
+ }
74
+ }
@@ -0,0 +1,51 @@
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
+ * 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.
17
+ * @export
18
+ */
19
+ export const KeyProviderType = {
20
+ Software: 'SOFTWARE',
21
+ AzureKeyvault: 'AZURE_KEYVAULT',
22
+ AwsKms: 'AWS_KMS',
23
+ } as const
24
+ export type KeyProviderType = (typeof KeyProviderType)[keyof typeof KeyProviderType]
25
+
26
+ export function instanceOfKeyProviderType(value: any): boolean {
27
+ for (const key in KeyProviderType) {
28
+ if (Object.prototype.hasOwnProperty.call(KeyProviderType, key)) {
29
+ if (KeyProviderType[key as keyof typeof KeyProviderType] === value) {
30
+ return true
31
+ }
32
+ }
33
+ }
34
+ return false
35
+ }
36
+
37
+ export function KeyProviderTypeFromJSON(json: any): KeyProviderType {
38
+ return KeyProviderTypeFromJSONTyped(json, false)
39
+ }
40
+
41
+ export function KeyProviderTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProviderType {
42
+ return json as KeyProviderType
43
+ }
44
+
45
+ export function KeyProviderTypeToJSON(value?: KeyProviderType | null): any {
46
+ return value as any
47
+ }
48
+
49
+ export function KeyProviderTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyProviderType {
50
+ return value as KeyProviderType
51
+ }
@@ -0,0 +1,85 @@
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 { KeyType } from './KeyType'
16
+ import { KeyTypeFromJSON, KeyTypeToJSON } from './KeyType'
17
+ import type { IdentifierMethod } from './IdentifierMethod'
18
+ import { IdentifierMethodFromJSON, IdentifierMethodToJSON } from './IdentifierMethod'
19
+
20
+ /**
21
+ * Represents a key resolver instance with detailed configuration.
22
+ * @export
23
+ * @interface KeyResolver
24
+ */
25
+ export interface KeyResolver {
26
+ /**
27
+ * Unique identifier for the resolver.
28
+ * @type {string}
29
+ * @memberof KeyResolver
30
+ */
31
+ resolverId: string
32
+ /**
33
+ * List of identifier methods supported by this resolver.
34
+ * @type {Array<IdentifierMethod>}
35
+ * @memberof KeyResolver
36
+ */
37
+ supportedIdentifierMethods?: Array<IdentifierMethod>
38
+ /**
39
+ * List of key types supported by this resolver.
40
+ * @type {Array<KeyType>}
41
+ * @memberof KeyResolver
42
+ */
43
+ supportedKeyTypes?: Array<KeyType>
44
+ }
45
+
46
+ /**
47
+ * Check if a given object implements the KeyResolver interface.
48
+ */
49
+ export function instanceOfKeyResolver(value: object): value is KeyResolver {
50
+ if (!('resolverId' in value) || value['resolverId'] === undefined) return false
51
+ return true
52
+ }
53
+
54
+ export function KeyResolverFromJSON(json: any): KeyResolver {
55
+ return KeyResolverFromJSONTyped(json, false)
56
+ }
57
+
58
+ export function KeyResolverFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyResolver {
59
+ if (json == null) {
60
+ return json
61
+ }
62
+ return {
63
+ resolverId: json['resolverId'],
64
+ supportedIdentifierMethods:
65
+ json['supportedIdentifierMethods'] == null ? undefined : (json['supportedIdentifierMethods'] as Array<any>).map(IdentifierMethodFromJSON),
66
+ supportedKeyTypes: json['supportedKeyTypes'] == null ? undefined : (json['supportedKeyTypes'] as Array<any>).map(KeyTypeFromJSON),
67
+ }
68
+ }
69
+
70
+ export function KeyResolverToJSON(json: any): KeyResolver {
71
+ return KeyResolverToJSONTyped(json, false)
72
+ }
73
+
74
+ export function KeyResolverToJSONTyped(value?: KeyResolver | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value
77
+ }
78
+
79
+ return {
80
+ resolverId: value['resolverId'],
81
+ supportedIdentifierMethods:
82
+ value['supportedIdentifierMethods'] == null ? undefined : (value['supportedIdentifierMethods'] as Array<any>).map(IdentifierMethodToJSON),
83
+ supportedKeyTypes: value['supportedKeyTypes'] == null ? undefined : (value['supportedKeyTypes'] as Array<any>).map(KeyTypeToJSON),
84
+ }
85
+ }
@@ -0,0 +1,51 @@
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
+ * Cryptographic key type identifier.
17
+ * @export
18
+ */
19
+ export const KeyType = {
20
+ Okp: 'OKP',
21
+ Ec: 'EC',
22
+ Rsa: 'RSA',
23
+ } as const
24
+ export type KeyType = (typeof KeyType)[keyof typeof KeyType]
25
+
26
+ export function instanceOfKeyType(value: any): boolean {
27
+ for (const key in KeyType) {
28
+ if (Object.prototype.hasOwnProperty.call(KeyType, key)) {
29
+ if (KeyType[key as keyof typeof KeyType] === value) {
30
+ return true
31
+ }
32
+ }
33
+ }
34
+ return false
35
+ }
36
+
37
+ export function KeyTypeFromJSON(json: any): KeyType {
38
+ return KeyTypeFromJSONTyped(json, false)
39
+ }
40
+
41
+ export function KeyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyType {
42
+ return json as KeyType
43
+ }
44
+
45
+ export function KeyTypeToJSON(value?: KeyType | null): any {
46
+ return value as any
47
+ }
48
+
49
+ export function KeyTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyType {
50
+ return value as KeyType
51
+ }