@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
|
@@ -18,48 +18,45 @@
|
|
|
18
18
|
* @interface CreateRawSignatureResponse
|
|
19
19
|
*/
|
|
20
20
|
export interface CreateRawSignatureResponse {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The created signature encoded as a base64 string.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CreateRawSignatureResponse
|
|
25
|
+
*/
|
|
26
|
+
signature: string
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Check if a given object implements the CreateRawSignatureResponse interface.
|
|
31
31
|
*/
|
|
32
32
|
export function instanceOfCreateRawSignatureResponse(value: object): value is CreateRawSignatureResponse {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (!('signature' in value) || value['signature'] === undefined) return false
|
|
34
|
+
return true
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function CreateRawSignatureResponseFromJSON(json: any): CreateRawSignatureResponse {
|
|
38
|
-
|
|
38
|
+
return CreateRawSignatureResponseFromJSONTyped(json, false)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export function CreateRawSignatureResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignatureResponse {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
signature: json['signature'],
|
|
47
|
+
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
export function CreateRawSignatureResponseToJSON(json: any): CreateRawSignatureResponse {
|
|
52
|
-
|
|
51
|
+
return CreateRawSignatureResponseToJSONTyped(json, false)
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
export function CreateRawSignatureResponseToJSONTyped(value?: CreateRawSignatureResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value
|
|
57
|
+
}
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
return {
|
|
60
|
+
signature: value['signature'],
|
|
61
|
+
}
|
|
64
62
|
}
|
|
65
|
-
|
|
@@ -12,21 +12,12 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { KeyInfo } from './KeyInfo'
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from './
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
SignInputFromJSON,
|
|
23
|
-
SignInputToJSON,
|
|
24
|
-
} from './SignInput';
|
|
25
|
-
import type { SignatureAlgorithm } from './SignatureAlgorithm';
|
|
26
|
-
import {
|
|
27
|
-
SignatureAlgorithmFromJSON,
|
|
28
|
-
SignatureAlgorithmToJSON,
|
|
29
|
-
} from './SignatureAlgorithm';
|
|
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'
|
|
30
21
|
|
|
31
22
|
/**
|
|
32
23
|
* Request body for creating a digital signature.
|
|
@@ -34,67 +25,62 @@ import {
|
|
|
34
25
|
* @interface CreateSimpleSignature
|
|
35
26
|
*/
|
|
36
27
|
export interface CreateSimpleSignature {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
55
46
|
}
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
48
|
/**
|
|
60
49
|
* Check if a given object implements the CreateSimpleSignature interface.
|
|
61
50
|
*/
|
|
62
51
|
export function instanceOfCreateSimpleSignature(value: object): value is CreateSimpleSignature {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
if (!('signInput' in value) || value['signInput'] === undefined) return false
|
|
53
|
+
if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false
|
|
54
|
+
return true
|
|
66
55
|
}
|
|
67
56
|
|
|
68
57
|
export function CreateSimpleSignatureFromJSON(json: any): CreateSimpleSignature {
|
|
69
|
-
|
|
58
|
+
return CreateSimpleSignatureFromJSONTyped(json, false)
|
|
70
59
|
}
|
|
71
60
|
|
|
72
61
|
export function CreateSimpleSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSimpleSignature {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
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
|
+
}
|
|
82
70
|
}
|
|
83
71
|
|
|
84
72
|
export function CreateSimpleSignatureToJSON(json: any): CreateSimpleSignature {
|
|
85
|
-
|
|
73
|
+
return CreateSimpleSignatureToJSONTyped(json, false)
|
|
86
74
|
}
|
|
87
75
|
|
|
88
76
|
export function CreateSimpleSignatureToJSONTyped(value?: CreateSimpleSignature | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value
|
|
79
|
+
}
|
|
92
80
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
81
|
+
return {
|
|
82
|
+
signInput: SignInputToJSON(value['signInput']),
|
|
83
|
+
keyInfo: KeyInfoToJSON(value['keyInfo']),
|
|
84
|
+
signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
|
|
85
|
+
}
|
|
99
86
|
}
|
|
100
|
-
|
package/src/models/CryptoAlg.ts
CHANGED
|
@@ -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,44 +12,41 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* Cryptographic algorithm type.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const CryptoAlg = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} as const
|
|
26
|
-
export type CryptoAlg = typeof CryptoAlg[keyof typeof CryptoAlg]
|
|
27
|
-
|
|
20
|
+
Ed25519: 'ED25519',
|
|
21
|
+
Ecdsa: 'ECDSA',
|
|
22
|
+
Hmac: 'HMAC',
|
|
23
|
+
Rsa: 'RSA',
|
|
24
|
+
} as const
|
|
25
|
+
export type CryptoAlg = (typeof CryptoAlg)[keyof typeof CryptoAlg]
|
|
28
26
|
|
|
29
27
|
export function instanceOfCryptoAlg(value: any): boolean {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
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
|
+
}
|
|
36
33
|
}
|
|
37
|
-
|
|
34
|
+
}
|
|
35
|
+
return false
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export function CryptoAlgFromJSON(json: any): CryptoAlg {
|
|
41
|
-
|
|
39
|
+
return CryptoAlgFromJSONTyped(json, false)
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export function CryptoAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
45
|
-
|
|
43
|
+
return json as CryptoAlg
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
export function CryptoAlgToJSON(value?: CryptoAlg | null): any {
|
|
49
|
-
|
|
47
|
+
return value as any
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function CryptoAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): CryptoAlg {
|
|
53
|
-
|
|
51
|
+
return value as CryptoAlg
|
|
54
52
|
}
|
|
55
|
-
|
package/src/models/Curve.ts
CHANGED
|
@@ -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
|
* Elliptic curve identifier.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const Curve = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} as const
|
|
30
|
-
export type Curve = typeof Curve[keyof typeof Curve]
|
|
31
|
-
|
|
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]
|
|
32
30
|
|
|
33
31
|
export function instanceOfCurve(value: any): boolean {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
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
|
+
}
|
|
40
37
|
}
|
|
41
|
-
|
|
38
|
+
}
|
|
39
|
+
return false
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export function CurveFromJSON(json: any): Curve {
|
|
45
|
-
|
|
43
|
+
return CurveFromJSONTyped(json, false)
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
export function CurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): Curve {
|
|
49
|
-
|
|
47
|
+
return json as Curve
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
export function CurveToJSON(value?: Curve | null): any {
|
|
53
|
-
|
|
51
|
+
return value as any
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
export function CurveToJSONTyped(value: any, ignoreDiscriminator: boolean): Curve {
|
|
57
|
-
|
|
55
|
+
return value as Curve
|
|
58
56
|
}
|
|
59
|
-
|
package/src/models/DigestAlg.ts
CHANGED
|
@@ -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,47 +12,44 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* Cryptographic digest (hash) algorithm identifier.
|
|
18
17
|
* @export
|
|
19
18
|
*/
|
|
20
19
|
export const DigestAlg = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} as const
|
|
29
|
-
export type DigestAlg = typeof DigestAlg[keyof typeof DigestAlg]
|
|
30
|
-
|
|
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]
|
|
31
29
|
|
|
32
30
|
export function instanceOfDigestAlg(value: any): boolean {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
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
|
+
}
|
|
39
36
|
}
|
|
40
|
-
|
|
37
|
+
}
|
|
38
|
+
return false
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
export function DigestAlgFromJSON(json: any): DigestAlg {
|
|
44
|
-
|
|
42
|
+
return DigestAlgFromJSONTyped(json, false)
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
export function DigestAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigestAlg {
|
|
48
|
-
|
|
46
|
+
return json as DigestAlg
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
export function DigestAlgToJSON(value?: DigestAlg | null): any {
|
|
52
|
-
|
|
50
|
+
return value as any
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
export function DigestAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): DigestAlg {
|
|
56
|
-
|
|
54
|
+
return value as DigestAlg
|
|
57
55
|
}
|
|
58
|
-
|
|
@@ -18,65 +18,62 @@
|
|
|
18
18
|
* @interface ErrorResponse
|
|
19
19
|
*/
|
|
20
20
|
export interface ErrorResponse {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Check if a given object implements the ErrorResponse interface.
|
|
43
43
|
*/
|
|
44
44
|
export function instanceOfErrorResponse(value: object): value is ErrorResponse {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (!('code' in value) || value['code'] === undefined) return false
|
|
46
|
+
if (!('message' in value) || value['message'] === undefined) return false
|
|
47
|
+
return true
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function ErrorResponseFromJSON(json: any): ErrorResponse {
|
|
51
|
-
|
|
51
|
+
return ErrorResponseFromJSONTyped(json, false)
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
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
|
+
}
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
export function ErrorResponseToJSON(json: any): ErrorResponse {
|
|
67
|
-
|
|
66
|
+
return ErrorResponseToJSONTyped(json, false)
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value
|
|
72
|
+
}
|
|
76
73
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
return {
|
|
75
|
+
code: value['code'],
|
|
76
|
+
message: value['message'],
|
|
77
|
+
details: value['details'],
|
|
78
|
+
}
|
|
81
79
|
}
|
|
82
|
-
|