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

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 (69) hide show
  1. package/dist/index.cjs +169 -288
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +11 -11
  4. package/dist/index.d.ts +11 -11
  5. package/dist/index.js +169 -288
  6. package/dist/index.js.map +1 -1
  7. package/package.json +3 -3
  8. package/plugin.schema.json +38 -157
  9. package/src/agent/KmsRestClient.ts +16 -17
  10. package/src/models/AwsAssumeRoleCredentials.ts +49 -57
  11. package/src/models/AwsClientConfiguration.ts +29 -32
  12. package/src/models/AwsKmsSetting.ts +71 -85
  13. package/src/models/AwsStaticCredentials.ts +49 -57
  14. package/src/models/AwsWebIdentityTokenCredentials.ts +50 -58
  15. package/src/models/AzureClientSecretCredentialOpts.ts +45 -50
  16. package/src/models/AzureCredentialOpts.ts +24 -29
  17. package/src/models/AzureKeyVaultSetting.ts +60 -71
  18. package/src/models/CoseKey.ts +96 -104
  19. package/src/models/CoseKeyPair.ts +32 -38
  20. package/src/models/CoseKeyType.ts +18 -21
  21. package/src/models/CreateKeyProvider.ts +60 -74
  22. package/src/models/CreateRawSignature.ts +33 -39
  23. package/src/models/CreateRawSignatureResponse.ts +22 -25
  24. package/src/models/CreateSimpleSignature.ts +45 -59
  25. package/src/models/CryptoAlg.ts +18 -21
  26. package/src/models/Curve.ts +22 -25
  27. package/src/models/DigestAlg.ts +21 -24
  28. package/src/models/ErrorResponse.ts +39 -42
  29. package/src/models/GenerateKey.ts +51 -65
  30. package/src/models/GenerateKeyGlobal.ts +59 -73
  31. package/src/models/GenerateKeyResponse.ts +24 -30
  32. package/src/models/GetKeyResponse.ts +24 -30
  33. package/src/models/IdentifierMethod.ts +19 -22
  34. package/src/models/JoseKeyPair.ts +32 -38
  35. package/src/models/Jwk.ts +190 -207
  36. package/src/models/JwkKeyType.ts +18 -21
  37. package/src/models/JwkUse.ts +16 -19
  38. package/src/models/KeyEncoding.ts +16 -19
  39. package/src/models/KeyInfo.ts +103 -123
  40. package/src/models/KeyOperations.ts +22 -25
  41. package/src/models/KeyProvider.ts +33 -41
  42. package/src/models/KeyProviderResponse.ts +33 -41
  43. package/src/models/KeyProviderType.ts +17 -20
  44. package/src/models/KeyResolver.ts +44 -51
  45. package/src/models/KeyType.ts +17 -20
  46. package/src/models/KeyVisibility.ts +16 -19
  47. package/src/models/ListKeyProvidersResponse.ts +24 -30
  48. package/src/models/ListKeysResponse.ts +24 -30
  49. package/src/models/ListResolversResponse.ts +24 -30
  50. package/src/models/LookupMode.ts +17 -20
  51. package/src/models/ManagedKeyInfo.ts +106 -126
  52. package/src/models/ManagedKeyPair.ts +61 -70
  53. package/src/models/MaskGenFunction.ts +15 -18
  54. package/src/models/ProviderCapabilities.ts +65 -81
  55. package/src/models/ResolvePublicKey.ts +50 -61
  56. package/src/models/ResolvedKeyInfo.ts +104 -124
  57. package/src/models/Resolver.ts +44 -51
  58. package/src/models/SignInput.ts +42 -47
  59. package/src/models/SignOutput.ts +32 -38
  60. package/src/models/Signature.ts +51 -62
  61. package/src/models/SignatureAlgorithm.ts +26 -29
  62. package/src/models/StoreKey.ts +32 -38
  63. package/src/models/StoreKeyResponse.ts +24 -30
  64. package/src/models/UpdateKeyProvider.ts +49 -58
  65. package/src/models/VerifyRawSignature.ts +42 -48
  66. package/src/models/VerifyRawSignatureResponse.ts +22 -25
  67. package/src/models/VerifySimpleSignature.ts +35 -44
  68. package/src/models/index.ts +58 -58
  69. package/src/types/IKmsRestClient.ts +2 -2
@@ -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
- KeyTypeFromJSON,
18
- KeyTypeToJSON,
19
- } from './KeyType';
20
- import type { KeyVisibility } from './KeyVisibility';
21
- import {
22
- KeyVisibilityFromJSON,
23
- KeyVisibilityToJSON,
24
- } from './KeyVisibility';
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
  * Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key.
@@ -44,124 +29,119 @@ import {
44
29
  * @interface ManagedKeyInfo
45
30
  */
46
31
  export interface ManagedKeyInfo {
47
- /**
48
- * Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
49
- * @type {string}
50
- * @memberof ManagedKeyInfo
51
- */
52
- kid?: string;
53
- /**
54
- *
55
- * @type {Jwk}
56
- * @memberof ManagedKeyInfo
57
- */
58
- key: Jwk;
59
- /**
60
- *
61
- * @type {SignatureAlgorithm}
62
- * @memberof ManagedKeyInfo
63
- */
64
- signatureAlgorithm?: SignatureAlgorithm;
65
- /**
66
- *
67
- * @type {KeyVisibility}
68
- * @memberof ManagedKeyInfo
69
- */
70
- keyVisibility?: KeyVisibility;
71
- /**
72
- * X.509 certificate chain associated with the key.
73
- * @type {Array<string>}
74
- * @memberof ManagedKeyInfo
75
- */
76
- x5c?: Array<string>;
77
- /**
78
- * A reference or alias to the key in the Key Management Service (KMS).
79
- * @type {string}
80
- * @memberof ManagedKeyInfo
81
- */
82
- alias: string;
83
- /**
84
- * The Key Management System (KMS) identifier associated with the key.
85
- * @type {string}
86
- * @memberof ManagedKeyInfo
87
- */
88
- providerId: string;
89
- /**
90
- *
91
- * @type {KeyType}
92
- * @memberof ManagedKeyInfo
93
- */
94
- keyType?: KeyType;
95
- /**
96
- *
97
- * @type {KeyEncoding}
98
- * @memberof ManagedKeyInfo
99
- */
100
- keyEncoding?: KeyEncoding;
101
- /**
102
- * Additional configuration options as key-value pairs.
103
- * @type {{ [key: string]: string; }}
104
- * @memberof ManagedKeyInfo
105
- */
106
- opts?: { [key: string]: string; };
32
+ /**
33
+ * Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
34
+ * @type {string}
35
+ * @memberof ManagedKeyInfo
36
+ */
37
+ kid?: string
38
+ /**
39
+ *
40
+ * @type {Jwk}
41
+ * @memberof ManagedKeyInfo
42
+ */
43
+ key: Jwk
44
+ /**
45
+ *
46
+ * @type {SignatureAlgorithm}
47
+ * @memberof ManagedKeyInfo
48
+ */
49
+ signatureAlgorithm?: SignatureAlgorithm
50
+ /**
51
+ *
52
+ * @type {KeyVisibility}
53
+ * @memberof ManagedKeyInfo
54
+ */
55
+ keyVisibility?: KeyVisibility
56
+ /**
57
+ * X.509 certificate chain associated with the key.
58
+ * @type {Array<string>}
59
+ * @memberof ManagedKeyInfo
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 ManagedKeyInfo
66
+ */
67
+ alias: string
68
+ /**
69
+ * The Key Management System (KMS) identifier associated with the key.
70
+ * @type {string}
71
+ * @memberof ManagedKeyInfo
72
+ */
73
+ providerId: string
74
+ /**
75
+ *
76
+ * @type {KeyType}
77
+ * @memberof ManagedKeyInfo
78
+ */
79
+ keyType?: KeyType
80
+ /**
81
+ *
82
+ * @type {KeyEncoding}
83
+ * @memberof ManagedKeyInfo
84
+ */
85
+ keyEncoding?: KeyEncoding
86
+ /**
87
+ * Additional configuration options as key-value pairs.
88
+ * @type {{ [key: string]: string; }}
89
+ * @memberof ManagedKeyInfo
90
+ */
91
+ opts?: { [key: string]: string }
107
92
  }
108
93
 
109
-
110
-
111
94
  /**
112
95
  * Check if a given object implements the ManagedKeyInfo interface.
113
96
  */
114
97
  export function instanceOfManagedKeyInfo(value: object): value is ManagedKeyInfo {
115
- if (!('key' in value) || value['key'] === undefined) return false;
116
- if (!('alias' in value) || value['alias'] === undefined) return false;
117
- if (!('providerId' in value) || value['providerId'] === undefined) return false;
118
- return true;
98
+ if (!('key' in value) || value['key'] === undefined) return false
99
+ if (!('alias' in value) || value['alias'] === undefined) return false
100
+ if (!('providerId' in value) || value['providerId'] === undefined) return false
101
+ return true
119
102
  }
120
103
 
121
104
  export function ManagedKeyInfoFromJSON(json: any): ManagedKeyInfo {
122
- return ManagedKeyInfoFromJSONTyped(json, false);
105
+ return ManagedKeyInfoFromJSONTyped(json, false)
123
106
  }
124
107
 
125
108
  export function ManagedKeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyInfo {
126
- if (json == null) {
127
- return json;
128
- }
129
- return {
130
-
131
- 'kid': json['kid'] == null ? undefined : json['kid'],
132
- 'key': JwkFromJSON(json['key']),
133
- 'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
134
- 'keyVisibility': json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
135
- 'x5c': json['x5c'] == null ? undefined : json['x5c'],
136
- 'alias': json['alias'],
137
- 'providerId': json['providerId'],
138
- 'keyType': json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
139
- 'keyEncoding': json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
140
- 'opts': json['opts'] == null ? undefined : json['opts'],
141
- };
109
+ if (json == null) {
110
+ return json
111
+ }
112
+ return {
113
+ kid: json['kid'] == null ? undefined : json['kid'],
114
+ key: JwkFromJSON(json['key']),
115
+ signatureAlgorithm: json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
116
+ keyVisibility: json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
117
+ x5c: json['x5c'] == null ? undefined : json['x5c'],
118
+ alias: json['alias'],
119
+ providerId: json['providerId'],
120
+ keyType: json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
121
+ keyEncoding: json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
122
+ opts: json['opts'] == null ? undefined : json['opts'],
123
+ }
142
124
  }
143
125
 
144
126
  export function ManagedKeyInfoToJSON(json: any): ManagedKeyInfo {
145
- return ManagedKeyInfoToJSONTyped(json, false);
127
+ return ManagedKeyInfoToJSONTyped(json, false)
146
128
  }
147
129
 
148
130
  export function ManagedKeyInfoToJSONTyped(value?: ManagedKeyInfo | null, ignoreDiscriminator: boolean = false): any {
149
- if (value == null) {
150
- return value;
151
- }
131
+ if (value == null) {
132
+ return value
133
+ }
152
134
 
153
- return {
154
-
155
- 'kid': value['kid'],
156
- 'key': JwkToJSON(value['key']),
157
- 'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
158
- 'keyVisibility': KeyVisibilityToJSON(value['keyVisibility']),
159
- 'x5c': value['x5c'],
160
- 'alias': value['alias'],
161
- 'providerId': value['providerId'],
162
- 'keyType': KeyTypeToJSON(value['keyType']),
163
- 'keyEncoding': KeyEncodingToJSON(value['keyEncoding']),
164
- 'opts': value['opts'],
165
- };
135
+ return {
136
+ kid: value['kid'],
137
+ key: JwkToJSON(value['key']),
138
+ signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
139
+ keyVisibility: KeyVisibilityToJSON(value['keyVisibility']),
140
+ x5c: value['x5c'],
141
+ alias: value['alias'],
142
+ providerId: value['providerId'],
143
+ keyType: KeyTypeToJSON(value['keyType']),
144
+ keyEncoding: KeyEncodingToJSON(value['keyEncoding']),
145
+ opts: value['opts'],
146
+ }
166
147
  }
167
-
@@ -12,16 +12,10 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import type { JoseKeyPair } from './JoseKeyPair';
16
- import {
17
- JoseKeyPairFromJSON,
18
- JoseKeyPairToJSON,
19
- } from './JoseKeyPair';
20
- import type { CoseKeyPair } from './CoseKeyPair';
21
- import {
22
- CoseKeyPairFromJSON,
23
- CoseKeyPairToJSON,
24
- } from './CoseKeyPair';
15
+ import type { JoseKeyPair } from './JoseKeyPair'
16
+ import { JoseKeyPairFromJSON, JoseKeyPairToJSON } from './JoseKeyPair'
17
+ import type { CoseKeyPair } from './CoseKeyPair'
18
+ import { CoseKeyPairFromJSON, CoseKeyPairToJSON } from './CoseKeyPair'
25
19
 
26
20
  /**
27
21
  * Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs.
@@ -29,83 +23,80 @@ import {
29
23
  * @interface ManagedKeyPair
30
24
  */
31
25
  export interface ManagedKeyPair {
32
- /**
33
- * Key identifier, may be null.
34
- * @type {string}
35
- * @memberof ManagedKeyPair
36
- */
37
- kid?: string;
38
- /**
39
- * Key Management System identifier.
40
- * @type {string}
41
- * @memberof ManagedKeyPair
42
- */
43
- providerId: string;
44
- /**
45
- * Reference to the key in the KMS.
46
- * @type {string}
47
- * @memberof ManagedKeyPair
48
- */
49
- alias: string;
50
- /**
51
- *
52
- * @type {CoseKeyPair}
53
- * @memberof ManagedKeyPair
54
- */
55
- cose: CoseKeyPair;
56
- /**
57
- *
58
- * @type {JoseKeyPair}
59
- * @memberof ManagedKeyPair
60
- */
61
- jose: JoseKeyPair;
26
+ /**
27
+ * Key identifier, may be null.
28
+ * @type {string}
29
+ * @memberof ManagedKeyPair
30
+ */
31
+ kid?: string
32
+ /**
33
+ * Key Management System identifier.
34
+ * @type {string}
35
+ * @memberof ManagedKeyPair
36
+ */
37
+ providerId: string
38
+ /**
39
+ * Reference to the key in the KMS.
40
+ * @type {string}
41
+ * @memberof ManagedKeyPair
42
+ */
43
+ alias: string
44
+ /**
45
+ *
46
+ * @type {CoseKeyPair}
47
+ * @memberof ManagedKeyPair
48
+ */
49
+ cose: CoseKeyPair
50
+ /**
51
+ *
52
+ * @type {JoseKeyPair}
53
+ * @memberof ManagedKeyPair
54
+ */
55
+ jose: JoseKeyPair
62
56
  }
63
57
 
64
58
  /**
65
59
  * Check if a given object implements the ManagedKeyPair interface.
66
60
  */
67
61
  export function instanceOfManagedKeyPair(value: object): value is ManagedKeyPair {
68
- if (!('providerId' in value) || value['providerId'] === undefined) return false;
69
- if (!('alias' in value) || value['alias'] === undefined) return false;
70
- if (!('cose' in value) || value['cose'] === undefined) return false;
71
- if (!('jose' in value) || value['jose'] === undefined) return false;
72
- return true;
62
+ if (!('providerId' in value) || value['providerId'] === undefined) return false
63
+ if (!('alias' in value) || value['alias'] === undefined) return false
64
+ if (!('cose' in value) || value['cose'] === undefined) return false
65
+ if (!('jose' in value) || value['jose'] === undefined) return false
66
+ return true
73
67
  }
74
68
 
75
69
  export function ManagedKeyPairFromJSON(json: any): ManagedKeyPair {
76
- return ManagedKeyPairFromJSONTyped(json, false);
70
+ return ManagedKeyPairFromJSONTyped(json, false)
77
71
  }
78
72
 
79
73
  export function ManagedKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyPair {
80
- if (json == null) {
81
- return json;
82
- }
83
- return {
84
-
85
- 'kid': json['kid'] == null ? undefined : json['kid'],
86
- 'providerId': json['providerId'],
87
- 'alias': json['alias'],
88
- 'cose': CoseKeyPairFromJSON(json['cose']),
89
- 'jose': JoseKeyPairFromJSON(json['jose']),
90
- };
74
+ if (json == null) {
75
+ return json
76
+ }
77
+ return {
78
+ kid: json['kid'] == null ? undefined : json['kid'],
79
+ providerId: json['providerId'],
80
+ alias: json['alias'],
81
+ cose: CoseKeyPairFromJSON(json['cose']),
82
+ jose: JoseKeyPairFromJSON(json['jose']),
83
+ }
91
84
  }
92
85
 
93
86
  export function ManagedKeyPairToJSON(json: any): ManagedKeyPair {
94
- return ManagedKeyPairToJSONTyped(json, false);
87
+ return ManagedKeyPairToJSONTyped(json, false)
95
88
  }
96
89
 
97
90
  export function ManagedKeyPairToJSONTyped(value?: ManagedKeyPair | null, ignoreDiscriminator: boolean = false): any {
98
- if (value == null) {
99
- return value;
100
- }
101
-
102
- return {
91
+ if (value == null) {
92
+ return value
93
+ }
103
94
 
104
- 'kid': value['kid'],
105
- 'providerId': value['providerId'],
106
- 'alias': value['alias'],
107
- 'cose': CoseKeyPairToJSON(value['cose']),
108
- 'jose': JoseKeyPairToJSON(value['jose']),
109
- };
95
+ return {
96
+ kid: value['kid'],
97
+ providerId: value['providerId'],
98
+ alias: value['alias'],
99
+ cose: CoseKeyPairToJSON(value['cose']),
100
+ jose: JoseKeyPairToJSON(value['jose']),
101
+ }
110
102
  }
111
-
@@ -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,41 +12,38 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  * Mask generation function algorithm.
18
17
  * @export
19
18
  */
20
19
  export const MaskGenFunction = {
21
- Mgf1: 'MGF1'
22
- } as const;
23
- export type MaskGenFunction = typeof MaskGenFunction[keyof typeof MaskGenFunction];
24
-
20
+ Mgf1: 'MGF1',
21
+ } as const
22
+ export type MaskGenFunction = (typeof MaskGenFunction)[keyof typeof MaskGenFunction]
25
23
 
26
24
  export function instanceOfMaskGenFunction(value: any): boolean {
27
- for (const key in MaskGenFunction) {
28
- if (Object.prototype.hasOwnProperty.call(MaskGenFunction, key)) {
29
- if (MaskGenFunction[key as keyof typeof MaskGenFunction] === value) {
30
- return true;
31
- }
32
- }
25
+ for (const key in MaskGenFunction) {
26
+ if (Object.prototype.hasOwnProperty.call(MaskGenFunction, key)) {
27
+ if (MaskGenFunction[key as keyof typeof MaskGenFunction] === value) {
28
+ return true
29
+ }
33
30
  }
34
- return false;
31
+ }
32
+ return false
35
33
  }
36
34
 
37
35
  export function MaskGenFunctionFromJSON(json: any): MaskGenFunction {
38
- return MaskGenFunctionFromJSONTyped(json, false);
36
+ return MaskGenFunctionFromJSONTyped(json, false)
39
37
  }
40
38
 
41
39
  export function MaskGenFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MaskGenFunction {
42
- return json as MaskGenFunction;
40
+ return json as MaskGenFunction
43
41
  }
44
42
 
45
43
  export function MaskGenFunctionToJSON(value?: MaskGenFunction | null): any {
46
- return value as any;
44
+ return value as any
47
45
  }
48
46
 
49
47
  export function MaskGenFunctionToJSONTyped(value: any, ignoreDiscriminator: boolean): MaskGenFunction {
50
- return value as MaskGenFunction;
48
+ return value as MaskGenFunction
51
49
  }
52
-