@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.
- package/LICENSE +201 -0
- package/README.md +369 -0
- package/dist/index.cjs +3924 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3927 -0
- package/dist/index.d.ts +3927 -0
- package/dist/index.js +3903 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
- package/plugin.schema.json +1004 -0
- package/src/agent/KmsRestClient.ts +468 -0
- package/src/index.ts +8 -0
- package/src/models/AwsAssumeRoleCredentials.ts +90 -0
- package/src/models/AwsClientConfiguration.ts +69 -0
- package/src/models/AwsKmsSetting.ts +112 -0
- package/src/models/AwsStaticCredentials.ts +90 -0
- package/src/models/AwsWebIdentityTokenCredentials.ts +91 -0
- package/src/models/AzureClientSecretCredentialOpts.ts +85 -0
- package/src/models/AzureCredentialOpts.ts +65 -0
- package/src/models/AzureKeyVaultSetting.ts +101 -0
- package/src/models/CoseKey.ts +137 -0
- package/src/models/CoseKeyPair.ts +73 -0
- package/src/models/CoseKeyType.ts +52 -0
- package/src/models/CreateKeyProvider.ts +101 -0
- package/src/models/CreateRawSignature.ts +74 -0
- package/src/models/CreateRawSignatureResponse.ts +62 -0
- package/src/models/CreateSimpleSignature.ts +86 -0
- package/src/models/CryptoAlg.ts +52 -0
- package/src/models/Curve.ts +56 -0
- package/src/models/DigestAlg.ts +55 -0
- package/src/models/ErrorResponse.ts +79 -0
- package/src/models/GenerateKey.ts +92 -0
- package/src/models/GenerateKeyGlobal.ts +100 -0
- package/src/models/GenerateKeyResponse.ts +65 -0
- package/src/models/GetKeyResponse.ts +65 -0
- package/src/models/IdentifierMethod.ts +53 -0
- package/src/models/JoseKeyPair.ts +73 -0
- package/src/models/Jwk.ts +231 -0
- package/src/models/JwkKeyType.ts +52 -0
- package/src/models/JwkUse.ts +50 -0
- package/src/models/KeyEncoding.ts +50 -0
- package/src/models/KeyInfo.ts +144 -0
- package/src/models/KeyOperations.ts +56 -0
- package/src/models/KeyProvider.ts +74 -0
- package/src/models/KeyProviderResponse.ts +74 -0
- package/src/models/KeyProviderType.ts +51 -0
- package/src/models/KeyResolver.ts +85 -0
- package/src/models/KeyType.ts +51 -0
- package/src/models/KeyVisibility.ts +50 -0
- package/src/models/ListKeyProvidersResponse.ts +65 -0
- package/src/models/ListKeysResponse.ts +65 -0
- package/src/models/ListResolversResponse.ts +65 -0
- package/src/models/LookupMode.ts +51 -0
- package/src/models/ManagedKeyInfo.ts +147 -0
- package/src/models/ManagedKeyPair.ts +102 -0
- package/src/models/MaskGenFunction.ts +49 -0
- package/src/models/ProviderCapabilities.ts +106 -0
- package/src/models/ResolvePublicKey.ts +91 -0
- package/src/models/ResolvedKeyInfo.ts +145 -0
- package/src/models/Resolver.ts +85 -0
- package/src/models/SignInput.ts +87 -0
- package/src/models/SignOutput.ts +73 -0
- package/src/models/Signature.ts +92 -0
- package/src/models/SignatureAlgorithm.ts +60 -0
- package/src/models/StoreKey.ts +73 -0
- package/src/models/StoreKeyResponse.ts +65 -0
- package/src/models/UpdateKeyProvider.ts +90 -0
- package/src/models/VerifyRawSignature.ts +83 -0
- package/src/models/VerifyRawSignatureResponse.ts +62 -0
- package/src/models/VerifySimpleSignature.ts +76 -0
- package/src/models/index.ts +60 -0
- package/src/types/IKmsRestClient.ts +134 -0
|
@@ -0,0 +1,73 @@
|
|
|
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 { CoseKey } from './CoseKey'
|
|
16
|
+
import { CoseKeyFromJSON, CoseKeyToJSON } from './CoseKey'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface CoseKeyPair
|
|
22
|
+
*/
|
|
23
|
+
export interface CoseKeyPair {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {CoseKey}
|
|
27
|
+
* @memberof CoseKeyPair
|
|
28
|
+
*/
|
|
29
|
+
privateCoseKey?: CoseKey
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {CoseKey}
|
|
33
|
+
* @memberof CoseKeyPair
|
|
34
|
+
*/
|
|
35
|
+
publicCoseKey: CoseKey
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CoseKeyPair interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCoseKeyPair(value: object): value is CoseKeyPair {
|
|
42
|
+
if (!('publicCoseKey' in value) || value['publicCoseKey'] === undefined) return false
|
|
43
|
+
return true
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CoseKeyPairFromJSON(json: any): CoseKeyPair {
|
|
47
|
+
return CoseKeyPairFromJSONTyped(json, false)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CoseKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKeyPair {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
privateCoseKey: json['privateCoseKey'] == null ? undefined : CoseKeyFromJSON(json['privateCoseKey']),
|
|
56
|
+
publicCoseKey: CoseKeyFromJSON(json['publicCoseKey']),
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CoseKeyPairToJSON(json: any): CoseKeyPair {
|
|
61
|
+
return CoseKeyPairToJSONTyped(json, false)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CoseKeyPairToJSONTyped(value?: CoseKeyPair | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
privateCoseKey: CoseKeyToJSON(value['privateCoseKey']),
|
|
71
|
+
publicCoseKey: CoseKeyToJSON(value['publicCoseKey']),
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -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
|
+
* COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const CoseKeyType = {
|
|
20
|
+
NUMBER_1: 1,
|
|
21
|
+
NUMBER_2: 2,
|
|
22
|
+
NUMBER_3: 3,
|
|
23
|
+
NUMBER_4: 4,
|
|
24
|
+
} as const
|
|
25
|
+
export type CoseKeyType = (typeof CoseKeyType)[keyof typeof CoseKeyType]
|
|
26
|
+
|
|
27
|
+
export function instanceOfCoseKeyType(value: any): boolean {
|
|
28
|
+
for (const key in CoseKeyType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(CoseKeyType, key)) {
|
|
30
|
+
if (CoseKeyType[key as keyof typeof CoseKeyType] === value) {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CoseKeyTypeFromJSON(json: any): CoseKeyType {
|
|
39
|
+
return CoseKeyTypeFromJSONTyped(json, false)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CoseKeyTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKeyType {
|
|
43
|
+
return json as CoseKeyType
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CoseKeyTypeToJSON(value?: CoseKeyType | null): any {
|
|
47
|
+
return value as any
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CoseKeyTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CoseKeyType {
|
|
51
|
+
return value as CoseKeyType
|
|
52
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { AwsKmsSetting } from './AwsKmsSetting'
|
|
16
|
+
import { AwsKmsSettingFromJSON, AwsKmsSettingToJSON } from './AwsKmsSetting'
|
|
17
|
+
import type { AzureKeyVaultSetting } from './AzureKeyVaultSetting'
|
|
18
|
+
import { AzureKeyVaultSettingFromJSON, AzureKeyVaultSettingToJSON } from './AzureKeyVaultSetting'
|
|
19
|
+
import type { KeyProviderType } from './KeyProviderType'
|
|
20
|
+
import { KeyProviderTypeFromJSON, KeyProviderTypeToJSON } from './KeyProviderType'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Request body for creating a new Key Provider instance.
|
|
24
|
+
* @export
|
|
25
|
+
* @interface CreateKeyProvider
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateKeyProvider {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {KeyProviderType}
|
|
31
|
+
* @memberof CreateKeyProvider
|
|
32
|
+
*/
|
|
33
|
+
type: KeyProviderType
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {AzureKeyVaultSetting}
|
|
37
|
+
* @memberof CreateKeyProvider
|
|
38
|
+
*/
|
|
39
|
+
azureKeyvaultSettings?: AzureKeyVaultSetting
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {AwsKmsSetting}
|
|
43
|
+
* @memberof CreateKeyProvider
|
|
44
|
+
*/
|
|
45
|
+
awsKmsSettings?: AwsKmsSetting
|
|
46
|
+
/**
|
|
47
|
+
* Whether to enable caching for keys retrieved from this provider.
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof CreateKeyProvider
|
|
50
|
+
*/
|
|
51
|
+
cacheEnabled?: boolean
|
|
52
|
+
/**
|
|
53
|
+
* Time-to-live for cached keys in seconds (if cacheEnabled is true).
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof CreateKeyProvider
|
|
56
|
+
*/
|
|
57
|
+
cacheTTLInSeconds?: number
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the CreateKeyProvider interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfCreateKeyProvider(value: object): value is CreateKeyProvider {
|
|
64
|
+
if (!('type' in value) || value['type'] === undefined) return false
|
|
65
|
+
return true
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CreateKeyProviderFromJSON(json: any): CreateKeyProvider {
|
|
69
|
+
return CreateKeyProviderFromJSONTyped(json, false)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateKeyProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateKeyProvider {
|
|
73
|
+
if (json == null) {
|
|
74
|
+
return json
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
type: KeyProviderTypeFromJSON(json['type']),
|
|
78
|
+
azureKeyvaultSettings: json['azureKeyvaultSettings'] == null ? undefined : AzureKeyVaultSettingFromJSON(json['azureKeyvaultSettings']),
|
|
79
|
+
awsKmsSettings: json['awsKmsSettings'] == null ? undefined : AwsKmsSettingFromJSON(json['awsKmsSettings']),
|
|
80
|
+
cacheEnabled: json['cacheEnabled'] == null ? undefined : json['cacheEnabled'],
|
|
81
|
+
cacheTTLInSeconds: json['cacheTTLInSeconds'] == null ? undefined : json['cacheTTLInSeconds'],
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function CreateKeyProviderToJSON(json: any): CreateKeyProvider {
|
|
86
|
+
return CreateKeyProviderToJSONTyped(json, false)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function CreateKeyProviderToJSONTyped(value?: CreateKeyProvider | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
type: KeyProviderTypeToJSON(value['type']),
|
|
96
|
+
azureKeyvaultSettings: AzureKeyVaultSettingToJSON(value['azureKeyvaultSettings']),
|
|
97
|
+
awsKmsSettings: AwsKmsSettingToJSON(value['awsKmsSettings']),
|
|
98
|
+
cacheEnabled: value['cacheEnabled'],
|
|
99
|
+
cacheTTLInSeconds: value['cacheTTLInSeconds'],
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -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 { KeyInfo } from './KeyInfo'
|
|
16
|
+
import { KeyInfoFromJSON, KeyInfoToJSON } from './KeyInfo'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Request body for creating a raw signature.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface CreateRawSignature
|
|
22
|
+
*/
|
|
23
|
+
export interface CreateRawSignature {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {KeyInfo}
|
|
27
|
+
* @memberof CreateRawSignature
|
|
28
|
+
*/
|
|
29
|
+
keyInfo: KeyInfo
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateRawSignature
|
|
34
|
+
*/
|
|
35
|
+
input: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CreateRawSignature interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCreateRawSignature(value: object): value is CreateRawSignature {
|
|
42
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false
|
|
43
|
+
if (!('input' in value) || value['input'] === undefined) return false
|
|
44
|
+
return true
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function CreateRawSignatureFromJSON(json: any): CreateRawSignature {
|
|
48
|
+
return CreateRawSignatureFromJSONTyped(json, false)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CreateRawSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignature {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
keyInfo: KeyInfoFromJSON(json['keyInfo']),
|
|
57
|
+
input: json['input'],
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function CreateRawSignatureToJSON(json: any): CreateRawSignature {
|
|
62
|
+
return CreateRawSignatureToJSONTyped(json, false)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function CreateRawSignatureToJSONTyped(value?: CreateRawSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
keyInfo: KeyInfoToJSON(value['keyInfo']),
|
|
72
|
+
input: value['input'],
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* Response body containing the created signature.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface CreateRawSignatureResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface CreateRawSignatureResponse {
|
|
21
|
+
/**
|
|
22
|
+
* The created signature encoded as a base64 string.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CreateRawSignatureResponse
|
|
25
|
+
*/
|
|
26
|
+
signature: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the CreateRawSignatureResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfCreateRawSignatureResponse(value: object): value is CreateRawSignatureResponse {
|
|
33
|
+
if (!('signature' in value) || value['signature'] === undefined) return false
|
|
34
|
+
return true
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function CreateRawSignatureResponseFromJSON(json: any): CreateRawSignatureResponse {
|
|
38
|
+
return CreateRawSignatureResponseFromJSONTyped(json, false)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CreateRawSignatureResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignatureResponse {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
signature: json['signature'],
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CreateRawSignatureResponseToJSON(json: any): CreateRawSignatureResponse {
|
|
51
|
+
return CreateRawSignatureResponseToJSONTyped(json, false)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CreateRawSignatureResponseToJSONTyped(value?: CreateRawSignatureResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
signature: value['signature'],
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { KeyInfo } from './KeyInfo'
|
|
16
|
+
import { KeyInfoFromJSON, KeyInfoToJSON } from './KeyInfo'
|
|
17
|
+
import type { SignInput } from './SignInput'
|
|
18
|
+
import { SignInputFromJSON, SignInputToJSON } from './SignInput'
|
|
19
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm'
|
|
20
|
+
import { SignatureAlgorithmFromJSON, SignatureAlgorithmToJSON } from './SignatureAlgorithm'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Request body for creating a digital signature.
|
|
24
|
+
* @export
|
|
25
|
+
* @interface CreateSimpleSignature
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateSimpleSignature {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {SignInput}
|
|
31
|
+
* @memberof CreateSimpleSignature
|
|
32
|
+
*/
|
|
33
|
+
signInput: SignInput
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {KeyInfo}
|
|
37
|
+
* @memberof CreateSimpleSignature
|
|
38
|
+
*/
|
|
39
|
+
keyInfo: KeyInfo
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {SignatureAlgorithm}
|
|
43
|
+
* @memberof CreateSimpleSignature
|
|
44
|
+
*/
|
|
45
|
+
signatureAlgorithm?: SignatureAlgorithm
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the CreateSimpleSignature interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfCreateSimpleSignature(value: object): value is CreateSimpleSignature {
|
|
52
|
+
if (!('signInput' in value) || value['signInput'] === undefined) return false
|
|
53
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false
|
|
54
|
+
return true
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function CreateSimpleSignatureFromJSON(json: any): CreateSimpleSignature {
|
|
58
|
+
return CreateSimpleSignatureFromJSONTyped(json, false)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function CreateSimpleSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSimpleSignature {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
signInput: SignInputFromJSON(json['signInput']),
|
|
67
|
+
keyInfo: KeyInfoFromJSON(json['keyInfo']),
|
|
68
|
+
signatureAlgorithm: json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateSimpleSignatureToJSON(json: any): CreateSimpleSignature {
|
|
73
|
+
return CreateSimpleSignatureToJSONTyped(json, false)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CreateSimpleSignatureToJSONTyped(value?: CreateSimpleSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
signInput: SignInputToJSON(value['signInput']),
|
|
83
|
+
keyInfo: KeyInfoToJSON(value['keyInfo']),
|
|
84
|
+
signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -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
|
+
* Cryptographic algorithm type.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const CryptoAlg = {
|
|
20
|
+
Ed25519: 'ED25519',
|
|
21
|
+
Ecdsa: 'ECDSA',
|
|
22
|
+
Hmac: 'HMAC',
|
|
23
|
+
Rsa: 'RSA',
|
|
24
|
+
} as const
|
|
25
|
+
export type CryptoAlg = (typeof CryptoAlg)[keyof typeof CryptoAlg]
|
|
26
|
+
|
|
27
|
+
export function instanceOfCryptoAlg(value: any): boolean {
|
|
28
|
+
for (const key in CryptoAlg) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(CryptoAlg, key)) {
|
|
30
|
+
if (CryptoAlg[key as keyof typeof CryptoAlg] === value) {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CryptoAlgFromJSON(json: any): CryptoAlg {
|
|
39
|
+
return CryptoAlgFromJSONTyped(json, false)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CryptoAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
43
|
+
return json as CryptoAlg
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CryptoAlgToJSON(value?: CryptoAlg | null): any {
|
|
47
|
+
return value as any
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CryptoAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
51
|
+
return value as CryptoAlg
|
|
52
|
+
}
|
|
@@ -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
|
+
* Elliptic curve identifier.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const Curve = {
|
|
20
|
+
P256: 'P-256',
|
|
21
|
+
P384: 'P-384',
|
|
22
|
+
P521: 'P-521',
|
|
23
|
+
Secp256k1: 'secp256k1',
|
|
24
|
+
Ed25519: 'Ed25519',
|
|
25
|
+
Ed448: 'Ed448',
|
|
26
|
+
X25519: 'X25519',
|
|
27
|
+
X448: 'X448',
|
|
28
|
+
} as const
|
|
29
|
+
export type Curve = (typeof Curve)[keyof typeof Curve]
|
|
30
|
+
|
|
31
|
+
export function instanceOfCurve(value: any): boolean {
|
|
32
|
+
for (const key in Curve) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(Curve, key)) {
|
|
34
|
+
if (Curve[key as keyof typeof Curve] === value) {
|
|
35
|
+
return true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CurveFromJSON(json: any): Curve {
|
|
43
|
+
return CurveFromJSONTyped(json, false)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): Curve {
|
|
47
|
+
return json as Curve
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CurveToJSON(value?: Curve | null): any {
|
|
51
|
+
return value as any
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CurveToJSONTyped(value: any, ignoreDiscriminator: boolean): Curve {
|
|
55
|
+
return value as Curve
|
|
56
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 digest (hash) algorithm identifier.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const DigestAlg = {
|
|
20
|
+
None: 'NONE',
|
|
21
|
+
Sha256: 'SHA256',
|
|
22
|
+
Sha384: 'SHA384',
|
|
23
|
+
Sha512: 'SHA512',
|
|
24
|
+
Sha3256: 'SHA3_256',
|
|
25
|
+
Sha3384: 'SHA3_384',
|
|
26
|
+
Sha3512: 'SHA3_512',
|
|
27
|
+
} as const
|
|
28
|
+
export type DigestAlg = (typeof DigestAlg)[keyof typeof DigestAlg]
|
|
29
|
+
|
|
30
|
+
export function instanceOfDigestAlg(value: any): boolean {
|
|
31
|
+
for (const key in DigestAlg) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(DigestAlg, key)) {
|
|
33
|
+
if (DigestAlg[key as keyof typeof DigestAlg] === value) {
|
|
34
|
+
return true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function DigestAlgFromJSON(json: any): DigestAlg {
|
|
42
|
+
return DigestAlgFromJSONTyped(json, false)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DigestAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigestAlg {
|
|
46
|
+
return json as DigestAlg
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DigestAlgToJSON(value?: DigestAlg | null): any {
|
|
50
|
+
return value as any
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function DigestAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): DigestAlg {
|
|
54
|
+
return value as DigestAlg
|
|
55
|
+
}
|
|
@@ -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
|
+
/**
|
|
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
|
+
code: json['code'],
|
|
60
|
+
message: json['message'],
|
|
61
|
+
details: json['details'] == null ? undefined : json['details'],
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ErrorResponseToJSON(json: any): ErrorResponse {
|
|
66
|
+
return ErrorResponseToJSONTyped(json, false)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
code: value['code'],
|
|
76
|
+
message: value['message'],
|
|
77
|
+
details: value['details'],
|
|
78
|
+
}
|
|
79
|
+
}
|