@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.
Files changed (70) hide show
  1. package/dist/index.cjs +1056 -1185
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1137 -17
  4. package/dist/index.d.ts +1137 -17
  5. package/dist/index.js +1049 -1179
  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 +19 -20
  10. package/src/index.ts +1 -1
  11. package/src/models/AwsAssumeRoleCredentials.ts +49 -57
  12. package/src/models/AwsClientConfiguration.ts +29 -32
  13. package/src/models/AwsKmsSetting.ts +71 -85
  14. package/src/models/AwsStaticCredentials.ts +49 -57
  15. package/src/models/AwsWebIdentityTokenCredentials.ts +50 -58
  16. package/src/models/AzureClientSecretCredentialOpts.ts +45 -50
  17. package/src/models/AzureCredentialOpts.ts +24 -29
  18. package/src/models/AzureKeyVaultSetting.ts +60 -71
  19. package/src/models/CoseKey.ts +96 -104
  20. package/src/models/CoseKeyPair.ts +32 -38
  21. package/src/models/CoseKeyType.ts +18 -21
  22. package/src/models/CreateKeyProvider.ts +60 -74
  23. package/src/models/CreateRawSignature.ts +33 -39
  24. package/src/models/CreateRawSignatureResponse.ts +22 -25
  25. package/src/models/CreateSimpleSignature.ts +45 -59
  26. package/src/models/CryptoAlg.ts +18 -21
  27. package/src/models/Curve.ts +22 -25
  28. package/src/models/DigestAlg.ts +21 -24
  29. package/src/models/ErrorResponse.ts +39 -42
  30. package/src/models/GenerateKey.ts +51 -65
  31. package/src/models/GenerateKeyGlobal.ts +59 -73
  32. package/src/models/GenerateKeyResponse.ts +24 -30
  33. package/src/models/GetKeyResponse.ts +24 -30
  34. package/src/models/IdentifierMethod.ts +19 -22
  35. package/src/models/JoseKeyPair.ts +32 -38
  36. package/src/models/Jwk.ts +190 -207
  37. package/src/models/JwkKeyType.ts +18 -21
  38. package/src/models/JwkUse.ts +16 -19
  39. package/src/models/KeyEncoding.ts +16 -19
  40. package/src/models/KeyInfo.ts +103 -123
  41. package/src/models/KeyOperations.ts +22 -25
  42. package/src/models/KeyProvider.ts +33 -41
  43. package/src/models/KeyProviderResponse.ts +33 -41
  44. package/src/models/KeyProviderType.ts +17 -20
  45. package/src/models/KeyResolver.ts +44 -51
  46. package/src/models/KeyType.ts +17 -20
  47. package/src/models/KeyVisibility.ts +16 -19
  48. package/src/models/ListKeyProvidersResponse.ts +24 -30
  49. package/src/models/ListKeysResponse.ts +24 -30
  50. package/src/models/ListResolversResponse.ts +24 -30
  51. package/src/models/LookupMode.ts +17 -20
  52. package/src/models/ManagedKeyInfo.ts +106 -126
  53. package/src/models/ManagedKeyPair.ts +61 -70
  54. package/src/models/MaskGenFunction.ts +15 -18
  55. package/src/models/ProviderCapabilities.ts +65 -81
  56. package/src/models/ResolvePublicKey.ts +50 -61
  57. package/src/models/ResolvedKeyInfo.ts +104 -124
  58. package/src/models/Resolver.ts +44 -51
  59. package/src/models/SignInput.ts +42 -47
  60. package/src/models/SignOutput.ts +32 -38
  61. package/src/models/Signature.ts +51 -62
  62. package/src/models/SignatureAlgorithm.ts +26 -29
  63. package/src/models/StoreKey.ts +32 -38
  64. package/src/models/StoreKeyResponse.ts +24 -30
  65. package/src/models/UpdateKeyProvider.ts +49 -58
  66. package/src/models/VerifyRawSignature.ts +42 -48
  67. package/src/models/VerifyRawSignatureResponse.ts +22 -25
  68. package/src/models/VerifySimpleSignature.ts +35 -44
  69. package/src/models/index.ts +58 -58
  70. package/src/types/IKmsRestClient.ts +2 -2
@@ -18,48 +18,45 @@
18
18
  * @interface CreateRawSignatureResponse
19
19
  */
20
20
  export interface CreateRawSignatureResponse {
21
- /**
22
- * The created signature encoded as a base64 string.
23
- * @type {string}
24
- * @memberof CreateRawSignatureResponse
25
- */
26
- signature: string;
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
- if (!('signature' in value) || value['signature'] === undefined) return false;
34
- return true;
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
- return CreateRawSignatureResponseFromJSONTyped(json, false);
38
+ return CreateRawSignatureResponseFromJSONTyped(json, false)
39
39
  }
40
40
 
41
41
  export function CreateRawSignatureResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRawSignatureResponse {
42
- if (json == null) {
43
- return json;
44
- }
45
- return {
46
-
47
- 'signature': json['signature'],
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
- return CreateRawSignatureResponseToJSONTyped(json, false);
51
+ return CreateRawSignatureResponseToJSONTyped(json, false)
53
52
  }
54
53
 
55
54
  export function CreateRawSignatureResponseToJSONTyped(value?: CreateRawSignatureResponse | null, ignoreDiscriminator: boolean = false): any {
56
- if (value == null) {
57
- return value;
58
- }
59
-
60
- return {
55
+ if (value == null) {
56
+ return value
57
+ }
61
58
 
62
- 'signature': value['signature'],
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
- KeyInfoFromJSON,
18
- KeyInfoToJSON,
19
- } from './KeyInfo';
20
- import type { SignInput } from './SignInput';
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
- * @type {SignInput}
40
- * @memberof CreateSimpleSignature
41
- */
42
- signInput: SignInput;
43
- /**
44
- *
45
- * @type {KeyInfo}
46
- * @memberof CreateSimpleSignature
47
- */
48
- keyInfo: KeyInfo;
49
- /**
50
- *
51
- * @type {SignatureAlgorithm}
52
- * @memberof CreateSimpleSignature
53
- */
54
- signatureAlgorithm?: SignatureAlgorithm;
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
- if (!('signInput' in value) || value['signInput'] === undefined) return false;
64
- if (!('keyInfo' in value) || value['keyInfo'] === undefined) return false;
65
- return true;
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
- return CreateSimpleSignatureFromJSONTyped(json, false);
58
+ return CreateSimpleSignatureFromJSONTyped(json, false)
70
59
  }
71
60
 
72
61
  export function CreateSimpleSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSimpleSignature {
73
- if (json == null) {
74
- return json;
75
- }
76
- return {
77
-
78
- 'signInput': SignInputFromJSON(json['signInput']),
79
- 'keyInfo': KeyInfoFromJSON(json['keyInfo']),
80
- 'signatureAlgorithm': json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
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
- return CreateSimpleSignatureToJSONTyped(json, false);
73
+ return CreateSimpleSignatureToJSONTyped(json, false)
86
74
  }
87
75
 
88
76
  export function CreateSimpleSignatureToJSONTyped(value?: CreateSimpleSignature | null, ignoreDiscriminator: boolean = false): any {
89
- if (value == null) {
90
- return value;
91
- }
77
+ if (value == null) {
78
+ return value
79
+ }
92
80
 
93
- return {
94
-
95
- 'signInput': SignInputToJSON(value['signInput']),
96
- 'keyInfo': KeyInfoToJSON(value['keyInfo']),
97
- 'signatureAlgorithm': SignatureAlgorithmToJSON(value['signatureAlgorithm']),
98
- };
81
+ return {
82
+ signInput: SignInputToJSON(value['signInput']),
83
+ keyInfo: KeyInfoToJSON(value['keyInfo']),
84
+ signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
85
+ }
99
86
  }
100
-
@@ -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
- Ed25519: 'ED25519',
22
- Ecdsa: 'ECDSA',
23
- Hmac: 'HMAC',
24
- Rsa: 'RSA'
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
- for (const key in CryptoAlg) {
31
- if (Object.prototype.hasOwnProperty.call(CryptoAlg, key)) {
32
- if (CryptoAlg[key as keyof typeof CryptoAlg] === value) {
33
- return true;
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
- return false;
34
+ }
35
+ return false
38
36
  }
39
37
 
40
38
  export function CryptoAlgFromJSON(json: any): CryptoAlg {
41
- return CryptoAlgFromJSONTyped(json, false);
39
+ return CryptoAlgFromJSONTyped(json, false)
42
40
  }
43
41
 
44
42
  export function CryptoAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): CryptoAlg {
45
- return json as CryptoAlg;
43
+ return json as CryptoAlg
46
44
  }
47
45
 
48
46
  export function CryptoAlgToJSON(value?: CryptoAlg | null): any {
49
- return value as any;
47
+ return value as any
50
48
  }
51
49
 
52
50
  export function CryptoAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): CryptoAlg {
53
- return value as CryptoAlg;
51
+ return value as CryptoAlg
54
52
  }
55
-
@@ -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
- P256: 'P-256',
22
- P384: 'P-384',
23
- P521: 'P-521',
24
- Secp256k1: 'secp256k1',
25
- Ed25519: 'Ed25519',
26
- Ed448: 'Ed448',
27
- X25519: 'X25519',
28
- X448: 'X448'
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
- for (const key in Curve) {
35
- if (Object.prototype.hasOwnProperty.call(Curve, key)) {
36
- if (Curve[key as keyof typeof Curve] === value) {
37
- return true;
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
- return false;
38
+ }
39
+ return false
42
40
  }
43
41
 
44
42
  export function CurveFromJSON(json: any): Curve {
45
- return CurveFromJSONTyped(json, false);
43
+ return CurveFromJSONTyped(json, false)
46
44
  }
47
45
 
48
46
  export function CurveFromJSONTyped(json: any, ignoreDiscriminator: boolean): Curve {
49
- return json as Curve;
47
+ return json as Curve
50
48
  }
51
49
 
52
50
  export function CurveToJSON(value?: Curve | null): any {
53
- return value as any;
51
+ return value as any
54
52
  }
55
53
 
56
54
  export function CurveToJSONTyped(value: any, ignoreDiscriminator: boolean): Curve {
57
- return value as Curve;
55
+ return value as Curve
58
56
  }
59
-
@@ -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
- None: 'NONE',
22
- Sha256: 'SHA256',
23
- Sha384: 'SHA384',
24
- Sha512: 'SHA512',
25
- Sha3256: 'SHA3_256',
26
- Sha3384: 'SHA3_384',
27
- Sha3512: 'SHA3_512'
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
- for (const key in DigestAlg) {
34
- if (Object.prototype.hasOwnProperty.call(DigestAlg, key)) {
35
- if (DigestAlg[key as keyof typeof DigestAlg] === value) {
36
- return true;
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
- return false;
37
+ }
38
+ return false
41
39
  }
42
40
 
43
41
  export function DigestAlgFromJSON(json: any): DigestAlg {
44
- return DigestAlgFromJSONTyped(json, false);
42
+ return DigestAlgFromJSONTyped(json, false)
45
43
  }
46
44
 
47
45
  export function DigestAlgFromJSONTyped(json: any, ignoreDiscriminator: boolean): DigestAlg {
48
- return json as DigestAlg;
46
+ return json as DigestAlg
49
47
  }
50
48
 
51
49
  export function DigestAlgToJSON(value?: DigestAlg | null): any {
52
- return value as any;
50
+ return value as any
53
51
  }
54
52
 
55
53
  export function DigestAlgToJSONTyped(value: any, ignoreDiscriminator: boolean): DigestAlg {
56
- return value as DigestAlg;
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
- * 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; };
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
- if (!('code' in value) || value['code'] === undefined) return false;
46
- if (!('message' in value) || value['message'] === undefined) return false;
47
- return true;
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
- return ErrorResponseFromJSONTyped(json, false);
51
+ return ErrorResponseFromJSONTyped(json, false)
52
52
  }
53
53
 
54
54
  export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse {
55
- if (json == null) {
56
- return json;
57
- }
58
- return {
59
-
60
- 'code': json['code'],
61
- 'message': json['message'],
62
- 'details': json['details'] == null ? undefined : json['details'],
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
- return ErrorResponseToJSONTyped(json, false);
66
+ return ErrorResponseToJSONTyped(json, false)
68
67
  }
69
68
 
70
69
  export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any {
71
- if (value == null) {
72
- return value;
73
- }
74
-
75
- return {
70
+ if (value == null) {
71
+ return value
72
+ }
76
73
 
77
- 'code': value['code'],
78
- 'message': value['message'],
79
- 'details': value['details'],
80
- };
74
+ return {
75
+ code: value['code'],
76
+ message: value['message'],
77
+ details: value['details'],
78
+ }
81
79
  }
82
-