@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48 → 0.34.1-feature.IDK.11.50
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 +1056 -1185
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1137 -17
- package/dist/index.d.ts +1137 -17
- package/dist/index.js +1049 -1179
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/plugin.schema.json +38 -157
- package/src/agent/KmsRestClient.ts +19 -20
- package/src/index.ts +1 -1
- package/src/models/AwsAssumeRoleCredentials.ts +49 -57
- package/src/models/AwsClientConfiguration.ts +29 -32
- package/src/models/AwsKmsSetting.ts +71 -85
- package/src/models/AwsStaticCredentials.ts +49 -57
- package/src/models/AwsWebIdentityTokenCredentials.ts +50 -58
- package/src/models/AzureClientSecretCredentialOpts.ts +45 -50
- package/src/models/AzureCredentialOpts.ts +24 -29
- package/src/models/AzureKeyVaultSetting.ts +60 -71
- package/src/models/CoseKey.ts +96 -104
- package/src/models/CoseKeyPair.ts +32 -38
- package/src/models/CoseKeyType.ts +18 -21
- package/src/models/CreateKeyProvider.ts +60 -74
- package/src/models/CreateRawSignature.ts +33 -39
- package/src/models/CreateRawSignatureResponse.ts +22 -25
- package/src/models/CreateSimpleSignature.ts +45 -59
- package/src/models/CryptoAlg.ts +18 -21
- package/src/models/Curve.ts +22 -25
- package/src/models/DigestAlg.ts +21 -24
- package/src/models/ErrorResponse.ts +39 -42
- package/src/models/GenerateKey.ts +51 -65
- package/src/models/GenerateKeyGlobal.ts +59 -73
- package/src/models/GenerateKeyResponse.ts +24 -30
- package/src/models/GetKeyResponse.ts +24 -30
- package/src/models/IdentifierMethod.ts +19 -22
- package/src/models/JoseKeyPair.ts +32 -38
- package/src/models/Jwk.ts +190 -207
- package/src/models/JwkKeyType.ts +18 -21
- package/src/models/JwkUse.ts +16 -19
- package/src/models/KeyEncoding.ts +16 -19
- package/src/models/KeyInfo.ts +103 -123
- package/src/models/KeyOperations.ts +22 -25
- package/src/models/KeyProvider.ts +33 -41
- package/src/models/KeyProviderResponse.ts +33 -41
- package/src/models/KeyProviderType.ts +17 -20
- package/src/models/KeyResolver.ts +44 -51
- package/src/models/KeyType.ts +17 -20
- package/src/models/KeyVisibility.ts +16 -19
- package/src/models/ListKeyProvidersResponse.ts +24 -30
- package/src/models/ListKeysResponse.ts +24 -30
- package/src/models/ListResolversResponse.ts +24 -30
- package/src/models/LookupMode.ts +17 -20
- package/src/models/ManagedKeyInfo.ts +106 -126
- package/src/models/ManagedKeyPair.ts +61 -70
- package/src/models/MaskGenFunction.ts +15 -18
- package/src/models/ProviderCapabilities.ts +65 -81
- package/src/models/ResolvePublicKey.ts +50 -61
- package/src/models/ResolvedKeyInfo.ts +104 -124
- package/src/models/Resolver.ts +44 -51
- package/src/models/SignInput.ts +42 -47
- package/src/models/SignOutput.ts +32 -38
- package/src/models/Signature.ts +51 -62
- package/src/models/SignatureAlgorithm.ts +26 -29
- package/src/models/StoreKey.ts +32 -38
- package/src/models/StoreKeyResponse.ts +24 -30
- package/src/models/UpdateKeyProvider.ts +49 -58
- package/src/models/VerifyRawSignature.ts +42 -48
- package/src/models/VerifyRawSignatureResponse.ts +22 -25
- package/src/models/VerifySimpleSignature.ts +35 -44
- package/src/models/index.ts +58 -58
- package/src/types/IKmsRestClient.ts +2 -2
package/src/models/KeyInfo.ts
CHANGED
|
@@ -12,31 +12,16 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyType } from './KeyType'
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from './
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from './
|
|
25
|
-
import type { SignatureAlgorithm } from './SignatureAlgorithm';
|
|
26
|
-
import {
|
|
27
|
-
SignatureAlgorithmFromJSON,
|
|
28
|
-
SignatureAlgorithmToJSON,
|
|
29
|
-
} from './SignatureAlgorithm';
|
|
30
|
-
import type { KeyEncoding } from './KeyEncoding';
|
|
31
|
-
import {
|
|
32
|
-
KeyEncodingFromJSON,
|
|
33
|
-
KeyEncodingToJSON,
|
|
34
|
-
} from './KeyEncoding';
|
|
35
|
-
import type { Jwk } from './Jwk';
|
|
36
|
-
import {
|
|
37
|
-
JwkFromJSON,
|
|
38
|
-
JwkToJSON,
|
|
39
|
-
} from './Jwk';
|
|
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'
|
|
40
25
|
|
|
41
26
|
/**
|
|
42
27
|
* Information about a cryptographic key, providing metadata and configuration details necessary for cryptographic operations.
|
|
@@ -44,121 +29,116 @@ import {
|
|
|
44
29
|
* @interface KeyInfo
|
|
45
30
|
*/
|
|
46
31
|
export interface KeyInfo {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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 }
|
|
107
92
|
}
|
|
108
93
|
|
|
109
|
-
|
|
110
|
-
|
|
111
94
|
/**
|
|
112
95
|
* Check if a given object implements the KeyInfo interface.
|
|
113
96
|
*/
|
|
114
97
|
export function instanceOfKeyInfo(value: object): value is KeyInfo {
|
|
115
|
-
|
|
98
|
+
return true
|
|
116
99
|
}
|
|
117
100
|
|
|
118
101
|
export function KeyInfoFromJSON(json: any): KeyInfo {
|
|
119
|
-
|
|
102
|
+
return KeyInfoFromJSONTyped(json, false)
|
|
120
103
|
}
|
|
121
104
|
|
|
122
105
|
export function KeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyInfo {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
};
|
|
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
|
+
}
|
|
139
121
|
}
|
|
140
122
|
|
|
141
123
|
export function KeyInfoToJSON(json: any): KeyInfo {
|
|
142
|
-
|
|
124
|
+
return KeyInfoToJSONTyped(json, false)
|
|
143
125
|
}
|
|
144
126
|
|
|
145
127
|
export function KeyInfoToJSONTyped(value?: KeyInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
128
|
+
if (value == null) {
|
|
129
|
+
return value
|
|
130
|
+
}
|
|
149
131
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
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
|
+
}
|
|
163
144
|
}
|
|
164
|
-
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* KMS REST Server API
|
|
5
|
-
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 0.0.1
|
|
8
8
|
* Contact: support@sphereon.com
|
|
@@ -12,48 +12,45 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* Specific operations the key is intended for.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const KeyOperations = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} as const
|
|
30
|
-
export type KeyOperations = typeof KeyOperations[keyof typeof KeyOperations]
|
|
31
|
-
|
|
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]
|
|
32
30
|
|
|
33
31
|
export function instanceOfKeyOperations(value: any): boolean {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
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
|
+
}
|
|
40
37
|
}
|
|
41
|
-
|
|
38
|
+
}
|
|
39
|
+
return false
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export function KeyOperationsFromJSON(json: any): KeyOperations {
|
|
45
|
-
|
|
43
|
+
return KeyOperationsFromJSONTyped(json, false)
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
export function KeyOperationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyOperations {
|
|
49
|
-
|
|
47
|
+
return json as KeyOperations
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function KeyOperationsToJSON(value?: KeyOperations | null): any {
|
|
53
|
-
|
|
51
|
+
return value as any
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function KeyOperationsToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyOperations {
|
|
57
|
-
|
|
55
|
+
return value as KeyOperations
|
|
58
56
|
}
|
|
59
|
-
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyProviderType } from './KeyProviderType'
|
|
16
|
-
import {
|
|
17
|
-
KeyProviderTypeFromJSON,
|
|
18
|
-
KeyProviderTypeToJSON,
|
|
19
|
-
} from './KeyProviderType';
|
|
15
|
+
import type { KeyProviderType } from './KeyProviderType'
|
|
16
|
+
import { KeyProviderTypeFromJSON, KeyProviderTypeToJSON } from './KeyProviderType'
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Response body containing the details of a Key Provider instance.
|
|
@@ -24,59 +21,54 @@ import {
|
|
|
24
21
|
* @interface KeyProvider
|
|
25
22
|
*/
|
|
26
23
|
export interface KeyProvider {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
38
|
/**
|
|
44
39
|
* Check if a given object implements the KeyProvider interface.
|
|
45
40
|
*/
|
|
46
41
|
export function instanceOfKeyProvider(value: object): value is KeyProvider {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
if (!('providerId' in value) || value['providerId'] === undefined) return false
|
|
43
|
+
if (!('type' in value) || value['type'] === undefined) return false
|
|
44
|
+
return true
|
|
50
45
|
}
|
|
51
46
|
|
|
52
47
|
export function KeyProviderFromJSON(json: any): KeyProvider {
|
|
53
|
-
|
|
48
|
+
return KeyProviderFromJSONTyped(json, false)
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
export function KeyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProvider {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
providerId: json['providerId'],
|
|
57
|
+
type: KeyProviderTypeFromJSON(json['type']),
|
|
58
|
+
}
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
export function KeyProviderToJSON(json: any): KeyProvider {
|
|
68
|
-
|
|
62
|
+
return KeyProviderToJSONTyped(json, false)
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
export function KeyProviderToJSONTyped(value?: KeyProvider | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value
|
|
68
|
+
}
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
70
|
+
return {
|
|
71
|
+
providerId: value['providerId'],
|
|
72
|
+
type: KeyProviderTypeToJSON(value['type']),
|
|
73
|
+
}
|
|
81
74
|
}
|
|
82
|
-
|
|
@@ -12,11 +12,8 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyProviderType } from './KeyProviderType'
|
|
16
|
-
import {
|
|
17
|
-
KeyProviderTypeFromJSON,
|
|
18
|
-
KeyProviderTypeToJSON,
|
|
19
|
-
} from './KeyProviderType';
|
|
15
|
+
import type { KeyProviderType } from './KeyProviderType'
|
|
16
|
+
import { KeyProviderTypeFromJSON, KeyProviderTypeToJSON } from './KeyProviderType'
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
19
|
* Response body containing the details of a Key Provider instance.
|
|
@@ -24,59 +21,54 @@ import {
|
|
|
24
21
|
* @interface KeyProviderResponse
|
|
25
22
|
*/
|
|
26
23
|
export interface KeyProviderResponse {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
38
|
/**
|
|
44
39
|
* Check if a given object implements the KeyProviderResponse interface.
|
|
45
40
|
*/
|
|
46
41
|
export function instanceOfKeyProviderResponse(value: object): value is KeyProviderResponse {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
if (!('providerId' in value) || value['providerId'] === undefined) return false
|
|
43
|
+
if (!('type' in value) || value['type'] === undefined) return false
|
|
44
|
+
return true
|
|
50
45
|
}
|
|
51
46
|
|
|
52
47
|
export function KeyProviderResponseFromJSON(json: any): KeyProviderResponse {
|
|
53
|
-
|
|
48
|
+
return KeyProviderResponseFromJSONTyped(json, false)
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
export function KeyProviderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProviderResponse {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
providerId: json['providerId'],
|
|
57
|
+
type: KeyProviderTypeFromJSON(json['type']),
|
|
58
|
+
}
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
export function KeyProviderResponseToJSON(json: any): KeyProviderResponse {
|
|
68
|
-
|
|
62
|
+
return KeyProviderResponseToJSONTyped(json, false)
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
export function KeyProviderResponseToJSONTyped(value?: KeyProviderResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value
|
|
68
|
+
}
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
70
|
+
return {
|
|
71
|
+
providerId: value['providerId'],
|
|
72
|
+
type: KeyProviderTypeToJSON(value['type']),
|
|
73
|
+
}
|
|
81
74
|
}
|
|
82
|
-
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* KMS REST Server API
|
|
5
|
-
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 0.0.1
|
|
8
8
|
* Contact: support@sphereon.com
|
|
@@ -12,43 +12,40 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
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.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const KeyProviderType = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} as const
|
|
25
|
-
export type KeyProviderType = typeof KeyProviderType[keyof typeof KeyProviderType]
|
|
26
|
-
|
|
20
|
+
Software: 'SOFTWARE',
|
|
21
|
+
AzureKeyvault: 'AZURE_KEYVAULT',
|
|
22
|
+
AwsKms: 'AWS_KMS',
|
|
23
|
+
} as const
|
|
24
|
+
export type KeyProviderType = (typeof KeyProviderType)[keyof typeof KeyProviderType]
|
|
27
25
|
|
|
28
26
|
export function instanceOfKeyProviderType(value: any): boolean {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
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
|
+
}
|
|
35
32
|
}
|
|
36
|
-
|
|
33
|
+
}
|
|
34
|
+
return false
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
export function KeyProviderTypeFromJSON(json: any): KeyProviderType {
|
|
40
|
-
|
|
38
|
+
return KeyProviderTypeFromJSONTyped(json, false)
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
export function KeyProviderTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyProviderType {
|
|
44
|
-
|
|
42
|
+
return json as KeyProviderType
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
export function KeyProviderTypeToJSON(value?: KeyProviderType | null): any {
|
|
48
|
-
|
|
46
|
+
return value as any
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
export function KeyProviderTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyProviderType {
|
|
52
|
-
|
|
50
|
+
return value as KeyProviderType
|
|
53
51
|
}
|
|
54
|
-
|